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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 23
4786
1
พ.ค. 25
2738
3
พ.ค. 24
2342
2
เม.ย. 24
2115
3
พ.ย. 24
4480