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

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​

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
3370
4
ม.ค. 24
14380
How to generate line numbers on quotes แก้ไขแล้ว
1
ม.ค. 25
3492
2
ส.ค. 24
5882
6
ธ.ค. 22
8861