Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
9736 Ansichten

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.

Avatar
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Autor

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.

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Sept. 17
8437
1
Mai 23
2972
2
März 18
4984
3
Nov. 20
14651
2
Feb. 17
7656