Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5102 Visualizzazioni

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


Avatar
Abbandona
Autore

Thanks for your help.!! 

Saved me from a lot of debugging.

Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
gen 24
18403
1
ago 25
218
4
lug 25
1594
1
lug 25
896
2
lug 25
910