跳至內容
選單
此問題已被標幟
2530 瀏覽次數

Hi everybody,
I'm writing you to ask how to write the formula to access a one2many item internal field.

To be more precise I need to set the "auto_fill" field formula in a Odoo Sign signature item type that is linked to a Contact (so that the module to be signed can be autocompleted with the Contact data I am sending the module to).

I can easily set the "auto_fill" for fields directly belonging to the Contact (res.partner table) and I also found the way to set the decode for many2one fields (e.g. I can get the autofill for the state code setting the formula as "state_id.code", where state_id is the external reference to the res.country.state table.

Now I'm trying to set the "auto_fill" on a signature item type for a field belonging to an item in the "child_ids" one2many collection of the Contact (res.partner) object.
I've tried to set it in several ways (e.g. "child_ids[0].name", child_ids[0].["other"].name, child_ids[0].partner_id.name, child_ids[0].child_id.name ...) but it does not work. How should it be written?

Please take note that I personally can't go deep in view to code so I have no clue about how the code of Contact module is written and how the Contact model is structured...
I know that "child_ids" is a one2many property of the Contact and that refers to a collection of Contacts but I'm missing something...

Thank you if you can help me.
Dario

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 22
2502
1
6月 22
1618
1
4月 24
1350
1
10月 23
1473
1
5月 23
1997