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

My python code is put  in  a  file  res_users.py :

class Users(models.Model):
    _inherit = 'res.users'
    _description = "Users and the properties he handles"
   facades = fields.Char('Facades')

Then  I type  ./odoo/odoo-bin --addons-path=./custom,./odoo/odoo/addons -d rd-demo -u res_users --dev xml

 when I upgrade the module, I got the following error message:

psycopg2.errors.UndefinedColumn: column res_users.facades does not exist
LINE 1: ...share", "res_users"."company_id" as "company_id", "res_users...
This is quite confusing. I though _inherit tells odoo that I want to extend the model res.user by adding one more field. What did I missing so that odoo though my inheritance does not take effect?

아바타
취소
베스트 답변

Try upgrading your app using these options:
 -d {db_name}  -u {custom_app_name_in_which_you_inherit_res_users_model}
It will work.

아바타
취소
작성자 베스트 답변

Thank you very much. Indeed it works. It seems that app_name is the directory name which holds all my models and views. I used -u model1, model2, etc where model1, model2 are the python file names under the directory with  directory_name. Then I use -u directory_name, all functions well. Is my understanding correct?

아바타
취소
관련 게시물 답글 화면 활동
4
2월 25
2720
1
8월 24
2242
2
11월 24
3388
3
10월 23
14918
2
2월 23
2516