[IMP] account: make product menus show templates instead of variants
As of this commit, the menu items Customers/Products and Vendors/Products now display product templates instead of product variants, which makes more sense in the scope of invoicing/accounting. task-2052537 closes odoo/odoo#36802 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
@@ -1803,14 +1803,13 @@ action = model.setting_init_bank_account_action()
|
||||
parent="account.menu_finance_receivables"
|
||||
action="res_partner_action_customer" sequence="110"/>
|
||||
|
||||
<record id="product_product_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.product.tree</field>
|
||||
<field name="model">product.product</field>
|
||||
<record id="product_template_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.template.tree</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Products">
|
||||
<field name="default_code"/>
|
||||
<field name="name"/>
|
||||
<field name="product_template_attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="taxes_id" widget="many2many_tags"/>
|
||||
<field name="supplier_taxes_id" widget="many2many_tags"/>
|
||||
@@ -1819,21 +1818,13 @@ action = model.setting_init_bank_account_action()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_action" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_id" ref="product_product_view_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_action_sellable" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form,activity</field>
|
||||
<field name="context">{'search_default_filter_to_sell': 1}</field>
|
||||
<field name="view_id" ref="product_product_view_tree"/>
|
||||
<field name="view_id" ref="product_template_view_tree"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new sellable product
|
||||
@@ -1844,10 +1835,10 @@ action = model.setting_init_bank_account_action()
|
||||
<record id="product_product_action_purchasable" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form,activity</field>
|
||||
<field name="context">{'search_default_filter_to_purchase': 1}</field>
|
||||
<field name="view_id" ref="product_product_view_tree"/>
|
||||
<field name="view_id" ref="product_template_view_tree"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new purchasable product
|
||||
|
||||
Reference in New Issue
Block a user