how can i get product quantity for a particular date based on stock.move in odoo 11 community version
please help
thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
how can i get product quantity for a particular date based on stock.move in odoo 11 community version
please help
thanks in advance
I think this can help you without any customisation
Inventory --> Reporting --> Product Moves after that set group by Product, measures as Done and Pivot view. From here we can download as XLS file also.
You can add multiple filters as per your need
HI,
@api.multi
def count_product_qty(self):
stock_move= self.env['stock.move'].search([
('product_id', '=', <your_product_id>),
('date', '>=', <your date>),
('date', '<=', <your date>),
('state', '=', 'done')])
qty = sum(move.qty_done for move in stock_move if move)
i hope it will helpful.
Thank you.
Hi Mr.Stephen,
Yeah, we can get the value via self.env with search date.
@api.multi
def generate_record(self):
stock_obj= self.env['stock.picking'].search([('date','>=',self.date),('date','<=',self.date)])
if stock_obj:
for record in stock_obj:
for line in record.move_lines:
qty =[]
if line.state =='done' and line.product_id.id:
qty += line.quantity
I hope my answer will for you...
Thank You.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up