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

I'm trying to inherit res.partner
and i'm trying to add new fields to my res.partner but error occur
This is the code:

from odoo import models , fields,api,_

class ResPartner(models.Model):
_inherit='res.partner'
is_student=fields.Boolean(string="Is Student?")
birth_date=fields.Date(string="Birth Date")
This is the error:

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

LINE 1: ...uid", "res_partner"."write_date" AS "write_date", "res_partn...








Avatar
Abbandona
Risposta migliore

When you modify 'res.partner' or 'res.users' model you need to update your module using command line:
odoo-bin -d my_db -u my_module_name

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
apr 23
4456
1
mag 25
2417
3
mag 24
2066
2
apr 24
1795
3
nov 24
4148