[ADD] product: New entry in the app switcher / root menu: Products
* This commit adds an easy access to products and variants from the app switcher / root menu, similar to what exists for contacts.
* Move an action to view stockable products to stock, as it is only executed from stock.
This commit is contained in:
committed by
Tanguy Charlier
parent
1cfc5c4983
commit
afd29b277d
@@ -407,13 +407,12 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_action_product" model="ir.actions.act_window">
|
||||
<record id="product_template_action_all" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_products": 1, 'default_type': 'product'}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new product.
|
||||
@@ -826,5 +825,101 @@
|
||||
<field name="context">{'visible_product_tmpl_id':False}</field>
|
||||
</record>
|
||||
|
||||
<!--App-like product catalog.-->
|
||||
<menuitem id="product_catalog_menu"
|
||||
name="Products"
|
||||
sequence="5"
|
||||
action="product_template_action_all"
|
||||
web_icon="product,static/description/product_catalog.png"
|
||||
groups="base.group_user"/>
|
||||
|
||||
<menuitem id="product_catalog_menu_product"
|
||||
name="Products"
|
||||
sequence="1"
|
||||
parent="product_catalog_menu"
|
||||
/>
|
||||
|
||||
<menuitem id="product_template_menu_catalog"
|
||||
action="product_template_action_all"
|
||||
parent="product_catalog_menu_product"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="product_product_menu_catalog"
|
||||
action="product_normal_action"
|
||||
parent="product_catalog_menu_product"
|
||||
sequence="2"
|
||||
groups="product.group_product_variant"/>
|
||||
|
||||
<menuitem id="product_catalog_menu_configuration"
|
||||
name="Configuration"
|
||||
sequence="2"
|
||||
parent="product_catalog_menu"
|
||||
/>
|
||||
|
||||
<record id="base_config_settings_form_product_catalog" model="ir.ui.view">
|
||||
<field name="name">base.config.settings.form.product.catalog</field>
|
||||
<field name="model">base.config.settings</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configuration" class="oe_form_configuration">
|
||||
<header>
|
||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<group string="Preferences">
|
||||
<field name="group_product_variant" widget="radio"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="base_config_settings_action_product_catalog" model="ir.actions.act_window">
|
||||
<field name="name">Product Settings</field>
|
||||
<field name="res_model">base.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="view_id" ref="base_config_settings_form_product_catalog"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="product_config_menu_catalog"
|
||||
name="Product Settings"
|
||||
action="base_config_settings_action_product_catalog"
|
||||
parent="product_catalog_menu_configuration"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem id="product_parameters_menu"
|
||||
name="Products"
|
||||
parent="product_catalog_menu_configuration"/>
|
||||
|
||||
<menuitem id="product_categories_menu_catalog"
|
||||
action="product_category_action_form"
|
||||
name="Product Categories"
|
||||
parent="product_parameters_menu"/>
|
||||
|
||||
<menuitem id="product_uom_menu_catalog"
|
||||
action="product_uom_form_action"
|
||||
name="Unit of Measures"
|
||||
parent="product_parameters_menu"
|
||||
groups="product.group_uom"/>
|
||||
|
||||
<menuitem id="product_uom_categ_menu_catalog"
|
||||
action="product_uom_categ_form_action"
|
||||
name="Unit of Measures Categories"
|
||||
parent="product_parameters_menu"
|
||||
groups="base.group_no_one"/>
|
||||
|
||||
<menuitem id="product_attribute_menu_catalog"
|
||||
action="attribute_action"
|
||||
name="Attributes"
|
||||
parent="product_parameters_menu"
|
||||
groups="product.group_product_variant"/>
|
||||
|
||||
<menuitem id="product_attribute_values_menu_catalog"
|
||||
action="variants_action"
|
||||
name="Attributes Values"
|
||||
parent="product_parameters_menu"
|
||||
groups="product.group_product_variant"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -9,7 +9,10 @@ class base_config_settings(osv.TransientModel):
|
||||
help="Share your product to all companies defined in your instance.\n"
|
||||
" * Checked : Product are visible for every company, even if a company is defined on the partner.\n"
|
||||
" * Unchecked : Each company can see only its product (product where company is defined). Product not related to a company are visible for all companies."),
|
||||
'group_product_variant': fields.boolean('Manage Product Variants',
|
||||
'group_product_variant': fields.selection([
|
||||
(0, "No variants on products"),
|
||||
(1, 'Products can have several attributes, defining variants (Example: size, color,...)')
|
||||
], "Product Variants",
|
||||
help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example',
|
||||
implied_group='product.group_product_variant'),
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -25,8 +25,23 @@
|
||||
|
||||
|
||||
<menuitem id="menu_stock_inventory_control" name="Inventory Control" parent="menu_stock_root" sequence="4"/>
|
||||
|
||||
<record id="product_template_action_product" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_products": 1, 'default_type': 'product'}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new product.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="product.product_template_action_product" id="menu_product_variant_config_stock" name="Products"
|
||||
action="product_template_action_product" id="menu_product_variant_config_stock" name="Products"
|
||||
parent="stock.menu_stock_inventory_control" sequence="1"/>
|
||||
|
||||
<menuitem id="product_product_menu" name="Product Variants" action="product.product_normal_action"
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="product_public_category_action" id="menu_product_public_category" parent="product.prod_config_main" sequence="2" />
|
||||
<menuitem action="product_public_category_action" id="menu_product_public_category_product_catalog" parent="product.product_parameters_menu" sequence="2"/>
|
||||
|
||||
<record id="website_sale_pricelists_by_website" model="ir.actions.act_window">
|
||||
<field name="name">Website Pricelist</field>
|
||||
|
||||
Reference in New Issue
Block a user