Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
964 Lượt xem

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>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 20
4156
1
thg 8 19
6994
1
thg 10 16
7125
1
thg 4 25
1628
1
thg 2 25
3034