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

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ม.ค. 20
6866
2
ก.ค. 25
1797
1
พ.ค. 24
2612
3
ต.ค. 23
8805
1
ก.ย. 23
3325