[REF] stock_account: filters on valuation layer
closes odoo/odoo#37701 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -13,8 +13,11 @@ class StockValuationLayer(models.Model):
|
||||
|
||||
_rec_name = 'product_id'
|
||||
|
||||
active = fields.Boolean(related='product_id.active')
|
||||
company_id = fields.Many2one('res.company', 'Company', readonly=True, required=True)
|
||||
product_id = fields.Many2one('product.product', 'Product', readonly=True, required=True, check_company=True)
|
||||
categ_id = fields.Many2one('product.category', related='product_id.categ_id')
|
||||
product_tmpl_id = fields.Many2one('product.template', related='product_id.product_tmpl_id')
|
||||
quantity = fields.Float('Quantity', digits=0, help='Quantity', readonly=True)
|
||||
uom_id = fields.Many2one(related='product_id.uom_id', readonly=True, required=True)
|
||||
currency_id = fields.Many2one('res.currency', 'Currency', related='company_id.currency_id', readonly=True, required=True)
|
||||
|
||||
@@ -67,16 +67,14 @@
|
||||
</record>
|
||||
|
||||
<record id="view_inventory_valuation_search" model="ir.ui.view">
|
||||
<field name="name">product.product</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="name">Inventory Valuation</field>
|
||||
<field name="model">stock.valuation.layer</field>
|
||||
<field name="priority" eval="17"/>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Inventory Valuation">
|
||||
<field name="name" string="Product"/>
|
||||
<field name="product_id"/>
|
||||
<field name="categ_id" />
|
||||
<field name="product_tmpl_id" />
|
||||
<field name="product_template_attribute_value_ids" />
|
||||
<filter string="Category" name="categ_id" context="{'group_by':'categ_id'}"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
</search>
|
||||
@@ -88,6 +86,7 @@
|
||||
<field name="res_model">stock.valuation.layer</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_group_by_product_id': 1}</field>
|
||||
<field name="search_view_id" ref="view_inventory_valuation_search"/>
|
||||
</record>
|
||||
<menuitem id="menu_valuation" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="110" action="action_stock_inventory_valuation"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user