Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8512 มุมมอง

I've inherited an existing model and added 3 fields to it. Wrote XML view for these fields and everything worked. But I forgot to add another field in the same inherited model, so when I define another field it gives me an error:

ProgrammingError: column res_partner.street3 does not exist
LINE 1: ...,"res_partner"."purchase_warn" as "purchase_warn","res_partn...
                                                             ^
HINT: Perhaps you meant to reference the column "res_partner.street" or the column "res_partner.street2".

Any ideas why it's happening? It feels like I can't add any fields after I've defined my model and ran the server.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

It looks like you have inherited res.partner model and added field street3.

You have to find module where street3 field is and upgrade this module.

Whenever create new field in res.partner and res.users then always open that module from app menu in browser so you can directly click on upgrade button, other wise it gives error as you mention. 

If you forget and error raised the you have to upgrade module from terminal.

python openerp-server --config=give path of your config file --update=your module name

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Thanks, Vishal! It worked just like you said. I couldn't upgrade my custom module from the app menu because it kept showing me this error, so i did it in terminal:

python openerp-server -c /path/to/my/config/file/my_file.cfg -d my_db_name -u my_custom_module_name
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, I think you need to upgrade your module from the app menu ...

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 17
5906
0
ธ.ค. 16
3129
0
มี.ค. 24
3379
18
ธ.ค. 22
37091
1
พ.ย. 19
5118