콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3926 화면

 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

아바타
취소
베스트 답변

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.

아바타
취소
작성자

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.

작성자

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.

작성자

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.

관련 게시물 답글 화면 활동
3
5월 18
7147
2
2월 18
7150
2
5월 17
7562
ODOO 18 Upgrade 해결 완료
2
6월 25
9882
1
11월 24
20518