跳至內容
選單
此問題已被標幟
1 回覆
2757 瀏覽次數

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...








頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
4月 23
4656
1
5月 25
2608
3
5月 24
2219
2
4月 24
2003
3
11月 24
4336