Skip to Content
Menu
This question has been flagged
961 Views

First of all, hi everyone and grettings from Chile.


I am experiencing a weird error on Odoo (12, Community). I made a custom function to get data from the model repair, and when it return the data appears an unknown CORS error. 


After reviewing several times the code and convince myself that the error is not right there, I was testing the site, when I click outside the inputfield instead or pressing "tab", and I noticed that the CORS error didn't appear. Why? What could happen there?


Truth be told, I'm kind of new in Odoo and this code was originally made by another colleague.


I put some pieces of the code, if that could help.


Thanks in advance.


This is the Model : 


class Repair(models.Model): _inherit = "repair.order"

user_id = fields.Many2one('res.users',string='Responsable') code_end = fields.Char("Firma") code = fields.Char('Producto Entregado',compute="_firma") confir = fields.Char('msj') recib = fields.Char('Ingresado por') recib2 = fields.Char('Producto recibido',compute="_firma2") recib_ = fields.Char('msj2') fecha_repa = fields.Datetime('Salida de Taller', default=fields.Datetime.now, copy=False, help="Date of the repair, this field " "and user_id defines the calendar") fecha_hoy = fields.Datetime("salida de taller")


And this is the view : 


<xpath expr="//field[@name='code']" position="after">                <field name="confir" invisible="1" groups="maintenance.group_equipment_manager"/>                    <field name="recib" password="True"  attrs="{'invisible':[('recib_', '=', '1')],'required':[('state', '=', 'draft')]}"/>                <field name="recib_" invisible="1" />                <field name="fecha_repa" attrs="{'readonly':
[('confir', '=', '1')],'invisible':[('state', '!=', 'done')]}"/> </xpath>
Avatar
Discard
Related Posts Replies Views Activity
0
Apr 20
4156
1
Aug 19
6994
1
Oct 16
7120
1
Apr 25
1626
1
Feb 25
3034