Skip to Content
Menu
This question has been flagged
1 Reply
3643 Views

Hi all,i have added a button on sale order line along each line,,,upon pressing that button i want to show the stock for that product in each warehouse on a wizard,like this

product            wrehouse                location                quantity
abc
                    one                           xyz                        55

how can i do that

Avatar
Discard
Best Answer

Hi,

You can apply your logic and add one2many lines in the wizard, to get the product qty in the particular warehouse or location, you can pass the warehouse and location in the context.

See A sample Code:

quantity = self.product_id.with_context(warehouse=warehouse.id).virtual_available


Also check the working of this free module, which show available qty in order line, but it is not exact as you want : https://apps.odoo.com/apps/modules/12.0/sale_stock_availability/

Thanks

Avatar
Discard