Ir al contenido
Menú
Se marcó esta pregunta
987 Vistas

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 20
4163
1
ago 19
7006
1
oct 16
7151
1
abr 25
1634
1
feb 25
3041