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


 xpath expr="//field[@name='product_id']" position="attributes"
    attribute name="domain[('id', 'in', parent.product_id_domain)] /attribute
/xpath

I have skipped the please understand the code


how can add a condition to this domain as it has to execute only when parent.picking_type_code =='outgoing'

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Try this code:

<xpath expr="//field[@name='product_id']" position="attributes">
                <attribute name="domain">['|', ('id', 'in', parent.product_id_domain), ('parent.picking_type_code', '=', 'outgoing')]</attribute>
            </xpath>




Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 24
1939
4
พ.ย. 23
2753
1
พ.ย. 23
6
1
ต.ค. 23
2079
1
พ.ค. 23
2011