Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
7355 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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>



Imagine profil
Abandonează
Autor Cel mai bun răspuns

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)]"






Imagine profil
Abandonează

My answer updated.

Autor

Thank you!! Solved!!