<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Carlos Mayón Laurente on Medium]]></title>
        <description><![CDATA[Stories by Carlos Mayón Laurente on Medium]]></description>
        <link>https://medium.com/@cmayonlaurente?source=rss-5ef44423d49------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*31MLtz66zqkzftRO.</url>
            <title>Stories by Carlos Mayón Laurente on Medium</title>
            <link>https://medium.com/@cmayonlaurente?source=rss-5ef44423d49------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 13:29:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cmayonlaurente/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cargar traducción de módulo desde la terminal]]></title>
            <link>https://medium.com/odootips/cargar-traducci%C3%B3n-de-m%C3%B3dulo-desde-la-terminal-d8faa6bf7042?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8faa6bf7042</guid>
            <category><![CDATA[odoo]]></category>
            <category><![CDATA[odoo-development]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 17:38:38 GMT</pubDate>
            <atom:updated>2019-06-04T18:35:44.591Z</atom:updated>
            <content:encoded><![CDATA[<pre>$ odoo -c .file_config -d database -u module_name --i18n-overwrite</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*cK-yLBZQtXOvLGejdzN_QA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8faa6bf7042" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/cargar-traducci%C3%B3n-de-m%C3%B3dulo-desde-la-terminal-d8faa6bf7042">Cargar traducción de módulo desde la terminal</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obtener Usuario Logeado en un campo Many2one]]></title>
            <link>https://medium.com/odootips/obtener-usuario-logeado-en-un-campo-many2one-7cded191b314?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cded191b314</guid>
            <category><![CDATA[odoo]]></category>
            <category><![CDATA[openerp]]></category>
            <category><![CDATA[dev]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Mon, 27 Aug 2018 04:15:11 GMT</pubDate>
            <atom:updated>2018-08-27T04:15:11.213Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Para obtener el usuario logueado podemos usar:</em></p><pre>current_user_id = fields.Many2one(<br>    comodel_name=&#39;res.users&#39;,<br>    string=&#39;Usuario Actual&#39;,<br>    default=lambda self: self.env.user.id<br>)</pre><p><em>otra forma:</em></p><pre>current_user_id = fields.Many2one(<br>    comodel_name=&#39;res.users&#39;,<br>    string=&#39;Usuario Actual&#39;,<br>    default=lambda self: self.env.uid<br>)</pre><p><em>empleando una función</em></p><pre>current_user_id = fields.Many2one(<br>    comodel_name=&#39;res.users&#39;,<br>    string=&#39;Usuario Actual xxx&#39;,<br>    default=lambda self: self._default_current_user_id(),<br>)</pre><pre>@api.model<br>def _default_current_user_id(self):<br>    return self.env.uid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*nruLj59qN3aZJnb9aDTJ5g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cded191b314" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/obtener-usuario-logeado-en-un-campo-many2one-7cded191b314">Obtener Usuario Logeado en un campo Many2one</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IP Estática en POSBox]]></title>
            <link>https://medium.com/odootips/ip-est%C3%A1tica-en-posbox-8843a763216?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/8843a763216</guid>
            <category><![CDATA[pos]]></category>
            <category><![CDATA[odoo]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Fri, 27 Apr 2018 21:37:23 GMT</pubDate>
            <atom:updated>2019-09-17T14:53:02.298Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Cuando usamos el POSBox de Odoo es necesario que este tenga una IP estática ya que como me sucedió en cada reinicio del router la IP cambiaba y ya no funcionaba la impresión en el Terminal Punto de Venta (TPV). Para ello debemos hacer lo siguiente:</em></p><p><em>debemos ingresar mediante remotamente al POSBox, a la IP que nos imprime. En el caso no tengamos una impresora pero si el Raspberry PI con la imagen del POSBox podemos utilizar “</em><strong><em>nmap</em></strong><em>” para saber la IP de nuestro Raspberry PI tal como indica esta guía:</em></p><p><a href="https://nideaderedes.urlansoft.com/2013/12/23/linux-como-puedo-saber-que-maquinas-hay-conectadas-en-mi-red-local/">Linux: ¿Cómo puedo saber qué máquinas hay conectadas en mi red local?</a></p><p><em>ejecutar el comando:</em></p><pre>sudo nmap -sP 192.168.1.1-254</pre><p>que arrojará algo como esto:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*MyK9G8vUMB79LNyD8tg0dg.png" /></figure><p><strong><em>OJO: Estoy suponiendo que ya tienen el Raspberry PI en su RED</em></strong></p><p><em>Una vez que tengamos detectado la IP debemos conectarnos Remotamente mediante ssh con el usuario</em><strong><em> “pi”</em></strong><em> y la ip que tenga nuestro raspberry (en mi caso en mi red tiene la ip 192.168.1.100</em>)<em> ingresar en la contraseña </em><strong><em>“raspberry”</em></strong><em>:</em></p><pre>ssh pi@192.168.1.100</pre><pre>usuario: pi<br>contraseña: raspberry</pre><p>Bien, una vez tengamos el acceso remoto ejecutamos el comando:</p><pre>sudo mount -o rw,remount /<br>sudo mount -o remount,rw /root_bypass_ramdisks</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*YF6wZEXnbTelHt2QFqdj3Q.png" /></figure><pre>nano /root_bypass_ramdisks/etc/dhcpcd.conf</pre><p><em>nos dirigimos a la última línea del archivo </em><strong><em>dhcpcd.conf</em></strong><em> y agregamos las siguientes líneas</em></p><pre>interface wlan0<br>static ip_address=192.168.1.150/24<br>static routes=192.168.1.1<br>static domain_name_servers=192.168.1.150</pre><p><em>En este caso estoy configurando que tenga la IP estática </em><strong><em>192.168.1.150 </em></strong><em>(Uds. ponen la IP que deseen). Luego debemos guardar el archivo y reiniciar el Raspberry.</em></p><pre>sudo reboot 0</pre><p>Ahora el Raspberry ya tiene una IP estática y así se reinicie el router se mantendrá la IP que le asignamos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*nruLj59qN3aZJnb9aDTJ5g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8843a763216" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/ip-est%C3%A1tica-en-posbox-8843a763216">IP Estática en POSBox</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Caso insensible a mayúsculas y minúsculas]]></title>
            <link>https://medium.com/odootips/caso-insensible-a-may%C3%BAsculas-y-min%C3%BAsculas-cf9aed6f8d03?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf9aed6f8d03</guid>
            <category><![CDATA[odoo]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Sun, 05 Nov 2017 03:29:48 GMT</pubDate>
            <atom:updated>2017-11-05T03:32:56.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*nruLj59qN3aZJnb9aDTJ5g.png" /></figure><p><em>En ocasiones es necesario no permitir guardar registros que contengan los mismos nombres, por ejemplo si ya tenemos un registro con nombre “demo”. no debería permitir ingresar nuevos registros con el nombre “Demo”, “DEMO”, “DEmo”, “DeMO”, etc.</em></p><p>Si aplicamos<strong> _sql_constraints :</strong></p><pre>_sql_constraints = [<br>        (<br>            &#39;name_unique&#39;, <br>            &#39;UNIQUE(name)&#39;,<br>            &quot;Ya existe un registro con el mismo nombre&quot;<br>        )<br>    ]</pre><p><em>El anterior </em><strong>_sql_constraints </strong><em>si nos permite guardar los registros con nombre “Demo”, “DEMO”, y todas las posibles combinaciones, esto debido a que a nivel de SQL se maneja el caso sensible, es decir toma como diferentes si una letra de la palabra cambia de minúscula a mayúscula o viceversa.</em></p><p><em>Para realizar esta funcionalidad es necesario realizar un </em><strong>constrains</strong><em> como el siguiente:</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c07e501fc933f7cfaf963db1e0b3d20a/href">https://medium.com/media/c07e501fc933f7cfaf963db1e0b3d20a/href</a></iframe><p><em>Puede encontrar el módulo de ejemplo en: </em><a href="https://github.com/carlosmayon/odoo_tips/tree/10.0/case_insensitive">https://github.com/carlosmayon/odoo_tips/tree/10.0/case_insensitive</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf9aed6f8d03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/caso-insensible-a-may%C3%BAsculas-y-min%C3%BAsculas-cf9aed6f8d03">Caso insensible a mayúsculas y minúsculas</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Imprimir monto en letras — Reporte Facturas Odoo v10]]></title>
            <link>https://medium.com/odootips/imprimir-monto-en-letras-reporte-facturas-odoo-v10-545d753a254c?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/545d753a254c</guid>
            <category><![CDATA[report]]></category>
            <category><![CDATA[odoo]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Sun, 17 Sep 2017 05:40:33 GMT</pubDate>
            <atom:updated>2017-11-05T03:31:50.283Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ_CVr4UP3vq3T05DuZNzA.png" /></figure><p><em>En este blog veremos como extender el reporte de las facturas, y agregar el monto en letras. Para ello crearemos un nuevo modulo en este caso lo llamaré: </em><strong><em>report_number_to_letter</em></strong><em>, su estructura sera la siguiente:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/1*s_ihLfu616AWKW9QiDHDFA.png" /></figure><p><em>Primero agregaremos un campo tipo “Char” para poder poner el nombre completo de la moneda, para ello editamos el archivo</em> /models/res_currency.py</p><pre>from odoo import fields, models</pre><pre>class ResCurrency(models.Model):<br>    _inherit = &#39;res.currency&#39;</pre><pre>long_name = fields.Char(<br>        string=&#39;Nombre Completo&#39;,<br>    )</pre><p><em>La vista xml </em>/views/res_currency_view.xml:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;odoo&gt;<br>    &lt;data&gt;<br>        &lt;record model=&quot;ir.ui.view&quot; id=&quot;view_currency_form_inherit&quot;&gt;<br>            &lt;field name=&quot;name&quot;&gt;view.currency.form.inherit&lt;/field&gt;<br>            &lt;field name=&quot;model&quot;&gt;res.currency&lt;/field&gt;<br>            &lt;field name=&quot;inherit_id&quot; ref=&quot;base.view_currency_form&quot;/&gt;<br>            &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br>                &lt;xpath expr=&quot;//field[@name=&#39;symbol&#39;]&quot; position=&quot;before&quot;&gt;<br>                    &lt;field name=&quot;long_name&quot;/&gt;<br>                &lt;/xpath&gt;<br>            &lt;/field&gt;<br>        &lt;/record&gt;<br>    &lt;/data&gt;<br>&lt;/odoo&gt;</pre><p>El resultado debe ser el siguiente:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9OYy1cw1Bvw-yzG9xLkS8w.png" /></figure><p><em>Luego copiar el código o descargar el archivo de : </em><a href="https://raw.githubusercontent.com/carlosmayon/numero-a-letras/master/python/number_to_letter.py">https://raw.githubusercontent.com/carlosmayon/numero-a-letras/master/python/number_to_letter.py</a></p><p><em>Pondremos el código en la carpeta</em> reports/number_to_letter.py</p><p><em>Luego en el archivo reports/report_invice.py importamos el archivo number_to_letter, creamos una clase models.AbstractModel y en el nombre del modelo primero va</em> <strong>“report”</strong>, <em>seguido del</em> <strong>“nombre del modulo donde se creo el reporte” </strong><em>y por ultimo el</em> <strong>“id del reporte”</strong><em> este id es el dado en el xml. en nuestro ejemplo el nombre sería</em>: <strong>“report.account.report_invoice”</strong>.</p><p><em>Luego debemos sobrescribir la función render_html, Puede encontrar la documentación en:</em> <a href="https://www.odoo.com/documentation/10.0/reference/reports.html">https://www.odoo.com/documentation/10.0/reference/reports.html</a></p><p><em>Entre los parámetros devueltos, pondremos un atributo “to_word” que llamará a la funcion to_word del archivo number_to_letter, esta funcion se encarga de transformar un numero dado en letras.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c2497cd1a2cddac9ec22ec762571a9e/href">https://medium.com/media/1c2497cd1a2cddac9ec22ec762571a9e/href</a></iframe><p>Por último en el xml heredamos el reporte de la factura y agregamos el monto en letras :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6dadf0ce138f439f49835e27f82c269f/href">https://medium.com/media/6dadf0ce138f439f49835e27f82c269f/href</a></iframe><p><em>El resultado final es:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*MwRR1FMvagIN6nGwM2_WNg.png" /></figure><p><em>Puede encontrar el módulo en: </em><a href="https://github.com/carlosmayon/odoo_tips/tree/10.0/report_number_to_letter">https://github.com/carlosmayon/odoo_tips/tree/10.0/report_number_to_letter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=545d753a254c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/imprimir-monto-en-letras-reporte-facturas-odoo-v10-545d753a254c">Imprimir monto en letras — Reporte Facturas Odoo v10</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instalar wkhtmltopdf Ubuntu 16.04]]></title>
            <link>https://medium.com/odootips/instalar-wkhtmltopdf-ubuntu-16-04-974f4139e075?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/974f4139e075</guid>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Sat, 09 Sep 2017 15:46:07 GMT</pubDate>
            <atom:updated>2017-09-09T15:46:07.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ_CVr4UP3vq3T05DuZNzA.png" /></figure><p><em>Para instalar</em> <strong>wkhtmltopdf </strong><em>debemos dirigirnos a: </em><a href="https://wkhtmltopdf.org/downloads.html">https://wkhtmltopdf.org/downloads.html</a></p><p><em>Obtenemos la URL de la última versión estable. En este momento la url de la versión estable es: </em><a href="https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz">https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz</a></p><p><em>En la terminal tipeamos:</em></p><pre>$wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz</pre><p><em>luego debemos descomprimir y mover los archivos necesarios a la ruta /usr/local/bin/:</em></p><pre>$tar -xvf wkhtmltox-0.12.4_linux-generic-i386.tar.xz<br>$sudo mv wkhtmltox/bin/* /usr/local/bin/</pre><p><em>por último probamos si se instalo correctamente:</em></p><pre>$wkhtmltopdf https://www.openerp.com openerp.pdf</pre><p><em>Para ver el cambio en Odoo reiniciamos el servicio y eso es todo.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=974f4139e075" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/instalar-wkhtmltopdf-ubuntu-16-04-974f4139e075">Instalar wkhtmltopdf Ubuntu 16.04</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Saber si un usuario pertenece a un grupo]]></title>
            <link>https://medium.com/odootips/saber-si-un-usuario-pertenece-a-un-grupo-1c30d34fdcf1?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c30d34fdcf1</guid>
            <category><![CDATA[odoo]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Tue, 05 Sep 2017 03:01:19 GMT</pubDate>
            <atom:updated>2017-09-05T03:08:23.380Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ_CVr4UP3vq3T05DuZNzA.png" /></figure><p><em>Muchas veces es necesario saber si el usuario logueado pertenece a un determinado grupo para poder ocultar algunos campos o permitirle ejecutar algunas funciones.</em></p><p><em>Para ello crearemos un campo tipo Boolean, si el usuario pertenece al grupo estará </em><strong><em>True</em></strong><em>, de lo contrario estará</em><strong><em> False.</em></strong></p><p><em>Código:</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83e1b22dc4be4345a2f1534dcd732958/href">https://medium.com/media/83e1b22dc4be4345a2f1534dcd732958/href</a></iframe><p><em>El campo boolean sera computado, la función de dicho campo llama al método </em><strong>has_group</strong><em> de odoo el cual recibe como parámetro el id externo del grupo (este id esta compuesto por el nombre del módulo donde fue creado y el id del grupo , dado en el xml donde fue creado).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c30d34fdcf1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/saber-si-un-usuario-pertenece-a-un-grupo-1c30d34fdcf1">Saber si un usuario pertenece a un grupo</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Globo numérico en los elementos de menú]]></title>
            <link>https://medium.com/odootips/globo-num%C3%A9rico-en-los-elementos-de-men%C3%BA-b0c93b440326?source=rss-5ef44423d49------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0c93b440326</guid>
            <category><![CDATA[spanish]]></category>
            <category><![CDATA[odoo]]></category>
            <dc:creator><![CDATA[Carlos Mayón Laurente]]></dc:creator>
            <pubDate>Mon, 04 Sep 2017 15:54:19 GMT</pubDate>
            <atom:updated>2017-09-04T23:42:24.775Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ_CVr4UP3vq3T05DuZNzA.png" /></figure><p><em>Para poder visualizar una burbuja numérica en los elementos de un menú como la siguiente:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*3crkG9u7ueqN0ff1IlTiKA.png" /></figure><p><em>En nuestro modelo debemos de heredar </em><strong>ir.needaction_mixin</strong><em>:</em></p><pre>_inherit <strong>=</strong> [&#39;ir.needaction_mixin&#39;]</pre><p><em>Así también, definir el método llamado </em><strong>_needaction_domain_get</strong><em>, este debe devolver un dominio. En el globo o burbuja se mostrará el número de registros que cumplen con el dominio dado.</em></p><p><em>Ahora un ejemplo con el objeto</em><strong><em> account.invoice</em></strong><em>.</em></p><pre>class AccountInvoice(models.Model):<br>    _name = &#39;account.invoice&#39;<br>    _inherit = [&#39;ir.needaction_mixin&#39;, &#39;account.invoice&#39;]</pre><pre>    @api.model<br>    def _needaction_domain_get(self):<br>        return [(&#39;state&#39;, &#39;=&#39;, &#39;draft&#39;)]</pre><p><em>En el ejemplo, mostrará el número de los registros que estén en estado borrador.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWSE3cl4WKNDNXvHNDyYgw.png" /></figure><p><em>Si estamos creando un nuevo modelo heredaríamos de la siguiente manera.</em></p><pre>Class MyModel(models.Model):<br>    _name= &#39;my.model&#39;<br>    _inherit= [&#39;ir.needaction_mixin&#39;]</pre><pre>    @api.model<br>    def _needaction_domain_get(self):<br>        return [(&#39;field&#39;, &#39;operator&#39;, value)]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0c93b440326" width="1" height="1" alt=""><hr><p><a href="https://medium.com/odootips/globo-num%C3%A9rico-en-los-elementos-de-men%C3%BA-b0c93b440326">Globo numérico en los elementos de menú</a> was originally published in <a href="https://medium.com/odootips">Consejos Odoo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>