コンテンツへスキップ
メニュー
この質問にフラグが付けられました

Hello everyone,

I am using Odoo 12 and need your help on setting a domain based on variable set on "ir.config_parameter".
On invoice form view, I need to change "partner_id" domain to include a specific value from "ir.config_parameter".

My actual domain is:

      domain="[('customer', '=', True)]"

I need to check the value of "ir.config_parameter" (True or False) and depending on the value, include it on the domain.
So, I need to do something like:

      domain="[('customer', '=', True), (what to enter here.......)]"

Is there any way I can achieve this?

Thank you in advance

Best regards

PM


アバター
破棄

Odoo Tips, helps in future: http://learnopenerp.blogspot.com

著作者

Thank you @Sehrish. I usually use it as a reference. :o)

最善の回答

Bring that ir.config_parameter's value to your res.partner model by adding new field for that.
Then apply domain just like ('field_name', '=', True/False)

アバター
破棄
著作者

Great @Cybrosys Techno Solutions Pvt.Ltd,

It was some tricky but I achieve what I need with your help.

Thank you very much

Best regards

関連投稿 返信 ビュー 活動
3
1月 20
6804
2
7月 25
1702
1
5月 24
2556
3
10月 23
8671
1
9月 23
3254