Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

how can i hide or invisible sale order lines on basis of condition

形象
丢弃
1 答案
0
形象
odoo
最佳答案

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​

形象
丢弃