Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
2951 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
3
abr. 23
5151
1
mai. 25
2960
3
mai. 24
2534
2
abr. 24
2354
3
nov. 24
4725