<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="http://mijail.ar/feed.xml" rel="self" type="application/atom+xml" /><link href="http://mijail.ar/" rel="alternate" type="text/html" /><updated>2021-12-28T10:15:11-03:00</updated><id>http://mijail.ar/feed.xml</id><title type="html">Mijail Todorovich</title><subtitle>Personal blog</subtitle><author><name>Mijail Todorovich</name></author><entry><title type="html">Debugging Odoo compute fields with `ir.logging`</title><link href="http://mijail.ar/blog/tips/computed-field-ir-logging/" rel="alternate" type="text/html" title="Debugging Odoo compute fields with `ir.logging`" /><published>2021-12-15T00:00:00-03:00</published><updated>2021-12-15T00:00:00-03:00</updated><id>http://mijail.ar/blog/tips/computed-field-ir-logging</id><content type="html" xml:base="http://mijail.ar/blog/tips/computed-field-ir-logging/">&lt;p&gt;I was trying determine why a computed field wasn’t working as expected and was really annoyed at the fact that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;log&lt;/code&gt; isn’t available on that context. 
We can create a record on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ir.logging&lt;/code&gt; table, though.&lt;/p&gt;

&lt;p&gt;(Tested on V13)&lt;/p&gt;
&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'ir.logging'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'client'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'my_compute_field'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'n/a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'n/a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;func&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'n/a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rec&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;records&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# [...]
&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello from the computed field&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;# [...]
&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rec&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;# [...]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Mijail Todorovich</name></author><category term="Blog" /><category term="Tips" /><category term="Odoo" /><summary type="html">I was trying determine why a computed field wasn’t working as expected and was really annoyed at the fact that log isn’t available on that context. We can create a record on the ir.logging table, though.</summary></entry><entry><title type="html">Electrostatics simulation with WASM</title><link href="http://mijail.ar/blog/projects/electrostatics-simulation-with-WASM/" rel="alternate" type="text/html" title="Electrostatics simulation with WASM" /><published>2021-02-09T00:00:00-03:00</published><updated>2021-02-09T00:00:00-03:00</updated><id>http://mijail.ar/blog/projects/electrostatics-simulation-with-WASM</id><content type="html" xml:base="http://mijail.ar/blog/projects/electrostatics-simulation-with-WASM/">&lt;p&gt;&lt;a href=&quot;/electrostatics&quot;&gt;&lt;img src=&quot;/assets/images/posts/electrostatics.png&quot; alt=&quot;Screenshot&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Old unfinished project which aimed to create a modern replacement to &lt;em&gt;Calculating Electromagnetic Fields and 
Potentials using Poisson’s Equation&lt;/em&gt; by Jarek Tuszynski. I wanted to allow the user to draw arbitrary electrodes at given voltages and simulate the electric potential and electric field.&lt;/p&gt;

&lt;p&gt;I finished the simulation but never got arround to the drawing part so it only has two scenarios.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/electrostatics&quot; class=&quot;btn btn--info&quot;&gt;&lt;i class=&quot;fas fa-play&quot;&gt;&lt;/i&gt;  Simulation&lt;/a&gt; &lt;a href=&quot;https://github.com/tmijail/electrostatics&quot; class=&quot;btn btn--primary&quot;&gt;&lt;i class=&quot;fab fa-github&quot;&gt;&lt;/i&gt;  Code&lt;/a&gt;&lt;/p&gt;</content><author><name>Mijail Todorovich</name></author><category term="Blog" /><category term="Projects" /><category term="WASM" /><category term="Physics" /><summary type="html">In-browser simulation of electric potential and field generated by 2D electrodes using Emscripten.</summary></entry></feed>