Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5188 Lượt xem

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


Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Câu trả lời hay nhất

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)

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 1 20
6849
2
thg 7 25
1753
1
thg 5 24
2590
3
thg 10 23
8736
1
thg 9 23
3306