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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Feb 22
|
1803 | ||
|
4
Jan 24
|
12874 | ||
|
2
Aug 24
|
4674 | ||
|
1
Dec 23
|
1098 | ||
|
6
Dec 22
|
7440 |