跳至內容
選單
此問題已被標幟
4 回覆
5848 瀏覽次數

Hi everybody 

I have created a custom field ( x_name )  with type char in the account.invoice and i want get the value from another existed field  in res.partner

for now and don't now how to make  a relation between existed field and my new custom field


http://imgur.com/GNM2t1u

頭像
捨棄

i use odoo v 9 

最佳答案

The easier way is to set the relation in the declaration of your field.

It should be as follows, in your module.py:

new_field = fields.Char(string='...', related="partner_id.partner_field_name")

頭像
捨棄
作者

thanks for the reply, but is there another way to make this from odoo ( developper mode ) without enter to the module .py because i'm using lunix and i dont know how and were to find such as files as you said ( hh and this is also another probleme ) thanks

作者

I found module.py but really I cant understood where to add your code plz can you make for me some catch of screen I will be very grateful i'm new on odoo plateforme, and i hope find the support here thanks so much

相關帖文 回覆 瀏覽次數 活動
2
10月 23
5750
3
9月 23
2591
0
5月 23
2589
1
5月 23
2075
1
4月 23
1884