تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5100 أدوات العرض

good day everyone,  I'm working on 13 community. I've been hitting my head against the wall trying to figure how to add simple field to customer. please anyone that can point me the proper direction.

 .py is:

class ResPartner(models.Model):
    _inherit = 'res.partner'

    partner_custref = fields.Char(string="Referencia Cliente2")

and throws this error:

psycopg2.errors.UndefinedColumn: column res_partner.partner_custref does not exist


الصورة الرمزية
إهمال
الكاتب

Thanks for your help.!! 

Saved me from a lot of debugging.

أفضل إجابة

Hi,

If this module is already installed in the database and then later if you added fields to res.partner model, you have to upgrade the module from terminal/CLI, else you will be getting the error field does not exist.

To upgrade module from terminal, see this: How To Upgrade Module From Terminal in Odoo


Also see: How To Solve Field Does Not Exist Error in Odoo


Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يناير 24
18395
1
أغسطس 25
203
4
يوليو 25
1575
1
يوليو 25
872
2
يوليو 25
896