Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2794 Lượt xem

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








Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 4 23
4740
1
thg 5 25
2698
3
thg 5 24
2263
2
thg 4 24
2090
3
thg 11 24
4394