跳至內容
選單
此問題已被標幟
963 瀏覽次數

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>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
4月 20
4156
1
8月 19
6994
1
10月 16
7125
1
4月 25
1628
1
2月 25
3034