تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5170 أدوات العرض

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
يناير 20
6794
2
يوليو 25
1691
1
مايو 24
2547
3
أكتوبر 23
8649
1
سبتمبر 23
3248