Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
966 Weergaven

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
apr. 20
4159
1
aug. 19
6995
1
okt. 16
7128
1
apr. 25
1629
1
feb. 25
3037