Skip to Content
Menu
This question has been flagged
2 Replies
6459 Views

Why the domain below is not correct?

I want to display record with

(type = delivery AND parent_id = partner_id) 
OR 
(is_company = True AND id = partner_id)

i want to edit domain attribute of field partner_shipping_id of model sale order

<attribute name="domain">"['|','&',('type', '=', 'delivery'),('parent_id', '=', partner_id),'&',('is_company', '=', 'True'),('id', '=', partner_id)]"</attribute>

Thanks

Avatar
Discard
Best Answer

Try this (True instead of 'True', replace & by &amp;) :

<attribute name="domain">['|','&amp;',('type', '=', 'delivery'),('parent_id', '=', partner_id),'&amp;',('is_company', '=', True),('id', '=', partner_id)]</attribute>



Avatar
Discard
Author Best Answer

it's not correct.

i can save only with the expression below (removing '&').

But with this expression Odoo returns 0 record


"['|',('type', '=', 'delivery'),('parent_id', '=', partner_id),('is_company', '=', True),('id', '=', partner_id)]"






Avatar
Discard

My answer updated.

Author

Thank you!! Solved!!