Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
9735 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Post correlati Risposte Visualizzazioni Attività
3
set 17
8437
1
mag 23
2972
2
mar 18
4984
3
nov 20
14651
2
feb 17
7656