Skip to Content
Menu
This question has been flagged

This is odoo model code. I would like to count total product quantity of product on category from my selected warehouse. How can I achive that?

classThreshold(models.Model):
_name="threshold.threshold"
main_location=fields.Many2many("stock.warehouse", string="Main Location")
product=fields.Many2many("product.template", string="Product")
category=fields.Many2one("product.category", string="Category")
attribute=fields.Many2many("product.attribute", string="Attribute")
threshold_value=fields.Integer(string="Threshold Value")
transfer_quantity=fields.Integer(string="Transfer Quantity")
status_button=fields.Selection([('0','Active'),('1','Dissmiss')], default='0', index=True, string="Status")
threshold_selection=fields.Selection([('0','Product'),('1','Category'),], default= '0', index=True, string="Threshold Selection")


Avatar
Discard
Related Posts Replies Views Activity
2
Aug 18
10305
3
Jul 23
15010
1
Nov 22
1734
2
Aug 22
5984
1
Nov 21
7406