Better handling of translation to avoid to have a menu entry "Variantes d'articles"
This commit is contained in:
committed by
David Beal
parent
92ef5170e0
commit
3e26d60503
@@ -39,7 +39,7 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
""",
|
""",
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['purchase', 'sale'],
|
'depends': ['purchase', 'sale', 'base_usability'],
|
||||||
'data': ['view.xml'],
|
'data': ['view.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
33
sale_purchase_no_product_template_menu/i18n/fr.po
Normal file
33
sale_purchase_no_product_template_menu/i18n/fr.po
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * sale_purchase_no_product_template_menu
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 8.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-05-30 15:27+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-05-30 15:27+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: model:ir.ui.menu,name:sale_purchase_no_product_template_menu.sale_config_product_template_menu
|
||||||
|
msgid "Product Templates"
|
||||||
|
msgstr "Modèles d'article"
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_puchased
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
|
||||||
|
msgid "Products"
|
||||||
|
msgstr "Articles"
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: view:product.product:sale_purchase_no_product_template_menu.product_normal_form_view
|
||||||
|
msgid "{'invisible': 1, 'required': 0}"
|
||||||
|
msgstr "{'invisible': 1, 'required': 0}"
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * sale_purchase_no_product_template_menu
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 8.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-05-30 15:27+0000\n"
|
||||||
|
"PO-Revision-Date: 2016-05-30 15:27+0000\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: model:ir.ui.menu,name:sale_purchase_no_product_template_menu.sale_config_product_template_menu
|
||||||
|
msgid "Product Templates"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_puchased
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
|
||||||
|
msgid "Products"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: sale_purchase_no_product_template_menu
|
||||||
|
#: view:product.product:sale_purchase_no_product_template_menu.product_normal_form_view
|
||||||
|
msgid "{'invisible': 1, 'required': 0}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
© 2015-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<openerp>
|
<openerp>
|
||||||
@@ -13,7 +12,7 @@
|
|||||||
<field name="name">Products</field>
|
<field name="name">Products</field>
|
||||||
<field name="res_model">product.product</field>
|
<field name="res_model">product.product</field>
|
||||||
<field name="view_mode">tree,form,kanban</field>
|
<field name="view_mode">tree,form,kanban</field>
|
||||||
<field name="context">{"search_default_filter_to_purchase":1}</field>
|
<field name="context">{'search_default_filter_to_purchase': 1}</field>
|
||||||
<field name="search_view_id" eval="False"/> <!-- Force empty -->
|
<field name="search_view_id" eval="False"/> <!-- Force empty -->
|
||||||
<field name="view_id" eval="False"/> <!-- Force empty -->
|
<field name="view_id" eval="False"/> <!-- Force empty -->
|
||||||
</record>
|
</record>
|
||||||
@@ -27,16 +26,25 @@
|
|||||||
<field name="action" ref="product.product_normal_action"/>
|
<field name="action" ref="product.product_normal_action"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Rename from 'Product Variants' to 'Products' -->
|
<!-- SALE -->
|
||||||
<record id="product.product_normal_action" model="ir.actions.act_window">
|
<!-- I'd prefer to inherit product.product_normal_action_sell and
|
||||||
|
change the "name" field, but it doesn't work with translation,
|
||||||
|
so I redefine a new menu entry -->
|
||||||
|
<record id="product_product_action_sell" model="ir.actions.act_window">
|
||||||
<field name="name">Products</field>
|
<field name="name">Products</field>
|
||||||
|
<field name="res_model">product.product</field>
|
||||||
|
<field name="view_mode">tree,form,kanban</field>
|
||||||
|
<field name="context">{'search_default_filter_to_sell': 1}</field>
|
||||||
|
<field name="search_view_id" eval="False"/>
|
||||||
|
<field name="view_id" ref="product.product_product_tree_view"/>
|
||||||
|
<field name="search_view_id" ref="product.product_search_form_view"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- SALE -->
|
<!-- To keep good translations, we re-use the product.template menu
|
||||||
<!-- Move template menu entry to configuration menu -->
|
entry and link it to product product -->
|
||||||
<record id="product.menu_product_template_action" model="ir.ui.menu">
|
<record id="product.menu_product_template_action" model="ir.ui.menu">
|
||||||
<!-- related action is "product.product_template_action" -->
|
<!-- related action is "product.product_template_action" -->
|
||||||
<field name="parent_id" ref="product.prod_config_main"/>
|
<field name="action" ref="product_product_action_sell"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="product.product_template_action" model="ir.actions.act_window">
|
<record id="product.product_template_action" model="ir.actions.act_window">
|
||||||
@@ -46,16 +54,18 @@
|
|||||||
<field name="context">{}</field>
|
<field name="context">{}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Create a product template menu entry in configuration -->
|
||||||
|
<menuitem id="sale_config_product_template_menu" action="product.product_template_action"
|
||||||
|
parent="product.prod_config_main"/>
|
||||||
|
|
||||||
|
|
||||||
<record id="product.product_normal_action_sell" model="ir.actions.act_window">
|
<record id="product.product_normal_action_sell" model="ir.actions.act_window">
|
||||||
<field name="name">Products</field> <!-- native value is "Product Variants" -->
|
|
||||||
<field name="view_mode">tree,form,kanban</field>
|
<field name="view_mode">tree,form,kanban</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Show the native 'Product Variants' menu entry for everybody -->
|
<!-- Hide native 'Product Variants' menu -->
|
||||||
<record id="product.menu_products" model="ir.ui.menu">
|
<record id="product.menu_products" model="ir.ui.menu">
|
||||||
<!-- related action is "product.product_normal_action_sell" -->
|
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
|
||||||
<field name="groups_id" eval="[(6, 0, [])]"/>
|
|
||||||
<field name="name">Products</field>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- set name as editable on product.product form -->
|
<!-- set name as editable on product.product form -->
|
||||||
|
|||||||
Reference in New Issue
Block a user