تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6066 أدوات العرض

how can i hide or invisible sale order lines on basis of condition I want to invisible more than 1 line in sale order line if user create three lines i want to show only first line

الصورة الرمزية
إهمال
أفضل إجابة

Hi,


Just define a new Boolean field called "active" in "sale.order.line" model. In Odoo, this "active" field toggle the visibility of a record.


As per your requirement, if you need to hide the order lines based on condition, you can create a compute function in sale order which fetch all the orderline in the corresponding order and check the len(order.order_line) , if it is greater than 1 , you can just assign active = False for all the lines except the first one


Hope it helps​

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 25
3285
4
يناير 24
14283
1
يناير 25
3386
2
أغسطس 24
5835
6
ديسمبر 22
8778