Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
9738 Представления

Hello, Please help. I have this annoying error when I try to inherit the res.partner and create a field inside it:

class SampleSomething(models.Model):
_inherit = 'res.partner'

something = fields.Char(string='Sample')

I got this error:

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

LINE 1: ...res_partner"."region_contact" as "region_contact","res_partn...


It seems like it's querying the defined field but it should not be the odoo's default behavior when defining/adding a field, instead it should be migrating because I'm adding a new field. Any help will be highly appreciated. Thanks in advance.

Аватар
Отменить
Лучший ответ

Hi,

Once you add the new field to res.partner try to upgrade the module from terminal rather than going to apps menu to upgrade. I think the same issue wont be there if you upgrade module from terminal.


To upgrade the module from terminal : odoo-bin -c conf_file -d db_name -u module_name


also see:  https://www.youtube.com/watch?v=ErzOia_A21w


Thanks

Аватар
Отменить
Автор

Thank you very much brother Niyas. It works. God bless.

@Niyas Raphy

I am working with Jenkins pipeline, (get the production DB -> upgrade to staging server)

How I Can fix this, please?

I don't want to connect with ssh because I should have a successful build from Jenkins.

Related Posts Ответы Просмотры Активность
3
сент. 17
8438
1
мая 23
2976
2
мар. 18
4984
3
нояб. 20
14652
2
февр. 17
7659