Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
9744 Переглядів

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
2977
2
бер. 18
4984
3
лист. 20
14653
2
лют. 17
7661