diff options
| author | Antoine Vandevenne (anv) <anv@odoo.com> | 2019-09-12 15:30:05 +0000 |
|---|---|---|
| committer | Antoine Vandevenne (anv) <anv@odoo.com> | 2019-09-12 15:42:20 +0000 |
| commit | abbc44952d3453f0facce70ead6af2e2bdde95f8 (patch) | |
| tree | 750239ba7fe782325afb078a2b4635db719a1ef7 | |
| parent | 2d066a4ed084ad8548e06542710fc9df9ca436a4 (diff) | |
[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>
| -rw-r--r-- | addons/account/views/account_view.xml | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index e5e3bfc66c5..a488cc09ed0 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -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 |
