[IMP] stock: product category for inventory Lines
Add `categ_id` field (related of `product_id`) in `stock.inventory.line` model to able user to filter and group by product category. Task #2026952 closes odoo/odoo#34349 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -287,6 +287,7 @@ class InventoryLine(models.Model):
|
||||
product_qty = fields.Float(
|
||||
'Counted Quantity',
|
||||
digits=dp.get_precision('Product Unit of Measure'), default=0)
|
||||
categ_id = fields.Many2one(related='product_id.categ_id', store=True)
|
||||
location_id = fields.Many2one(
|
||||
'stock.location', 'Location',
|
||||
domain=lambda self: self._domain_location_id(),
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
<group expand='0' string='Group by...'>
|
||||
<filter string='Location' name="location" domain="[]" context="{'group_by' : 'location_id'}"/>
|
||||
<filter string='Packaging' name="packaging" domain="[]" context="{'group_by' : 'package_id'}"/>
|
||||
<filter string='Product' name="product" domain="[]" context="{'group_by' : 'product_id'}"/>
|
||||
<filter string='Product Category' name="product_category" domain="[]" context="{'group_by' : 'categ_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user