how can i get all sale order.lines that currently reserve a product stock-quantity?
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
1
Reply
1873
Views
Hi,
In order to get all sale orders (v12)
stock_move = self.env['stock.move'].search([('reserved_availability', '!=', 0)])
sale_orders = stock_move.sudo().mapped('picking_id.sale_id')
In order to get all sale order lines
stock_move = self.env['stock.move'].search([('reserved_availability', '!=', 0)])
sale_orders = stock_move.sudo().mapped('sale_line_id')
Please make sufficient changes according to your need
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up