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

Hi all

the properties field in sale.order.line model is a many2many field which display all the properties available and wont filter based on anything. So, I've created a field in sale_stock.py

'group_id': fields.many2one('mrp.property.group', 'Property Group', select=True),
and changed the default property_ids field as below,
        'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft': [('readonly', False)]}, domain="[('group_id.name', '=', group_id.name)]"),

and changed sale_stock.xml

<field name="group_id" widget="selection"/>
<field name="property_ids" widget="selection" groups="sale.group_mrp_properties" domain="[('group_id.name', '=', 'group_id.name')]"/>

But i'm not getting any filter of the list so can any one please help me out?

อวตาร
ละทิ้ง

You can leave out .name and the second group_id should not have '

ผู้เขียน

Sorry josse I didnt get you which second group_id

domain="[('group_id','=',group_id)]"

ผู้เขียน

Thanks Josse, I tried this but there is no error but there is no filter of the dropdown list

ผู้เขียน

an anyone help me on this i'm in great trouble please help me out

คำตอบที่ดีที่สุด

Hi,

Below link may help you

link1

link2

link3

อวตาร
ละทิ้ง
ผู้เขียน

thanks for your help Jack but nothing works all throws different errors. Please can you help me out in any way

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 17
2777
2
ส.ค. 22
2430
1
เม.ย. 20
3334
3
ก.ค. 15
7795
3
ก.พ. 25
16318