Skip to Content
Menu
This question has been flagged
1 Reply
2939 Views

 I created a new module in odoo v.10 that add some new fields in res.partner
when installing the module first time everything is fine and all new fields add correctly
when I add some extra field in my module and upgrade the module using -u also the new field added correctly but when uploading my changes in live server ,server will be down and give me error in log
psycopg2.ProgrammingError: column res_partner.xyz does not exist
and to solve this I have to comment all new fields from python and keep them in xml then upgrade the module from ui after that remove the commented fields 
after this fields will be visible
this problem only in v10 and v11

Avatar
Discard
Best Answer

Hi Ahmed,

Check with following:

1. res.partner, inheritance should be correct, also add base in dependency.
         class Partner(models.Model):
            _inherit = 'res.partner' 
             xyz = fields.Char()
2. You need to restart your server before upgrade, though you've already doing with upgrading -u, So just look for how many instance you have for same server kill other instances then check for new start with -u upgrade.
3. If 1 & 2 won't help you upgrade base module.

Avatar
Discard
Author

I can not use -u in production server also server down when uploading code changes and restart service

so I can not upgrade any module using ui

Pull your changes to production, then restart production server, upgrade module manually.

Author

What do you mean of upgrading manually

I can not upgrade using -u

and odoo already down after restart service so I can not upgrade using odoo ui

Oh didn't realise your server is down, then i believe you must upgrade base using -u

Even whenever you're pulling you're changes to production, and after restarting services production is down, must be something wrong with your module or changes.

Author

no my module is correct

all what I have to do is to comment my changes and then remove the comment and everything is work

and this problem happen only in res.partber

all other models is working fine

while restarting - u MODULE_NAME -d DATABASE_NAME

hope this will solve your problem.

Related Posts Replies Views Activity
3
May 18
5630
2
Feb 18
5703
2
May 17
6220
1
Oct 24
3543
1
Nov 24
18019