Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2855 มุมมอง

Good day everyone

We have this custom code to add a field to sales order object and shows error.  Any idea what could be wrong?    Version 15

source:

from odoo import models, fields, api,exceptions



class SaleOrder2Sap(models.Model):



    _inherit = 'sale.order'



    pedido = fields.Char(string="No Pedido") 





Error:

psycopg2.errors.UndefinedColumn: column sale_order.pedido does not exist


Thanks in advance


อวตาร
ละทิ้ง

upgraded the custom module after adding the field ?

Make sure you added the sale module to depends in manifest python file and as Niyas said you need to restart the service upgrade the module

ผู้เขียน คำตอบที่ดีที่สุด

thanks both for your help, I was upgrading the module from list view in apps.  then I clicked the module to open details and upgraded from de command button that did the trick.



อวตาร
ละทิ้ง