[MIG] sale_purchase_no_product_template_menu
This commit is contained in:
committed by
David Beal
parent
a3e23ab5e7
commit
6907302f8e
0
sale_purchase_no_product_template_menu/__init__.py
Normal file
0
sale_purchase_no_product_template_menu/__init__.py
Normal file
29
sale_purchase_no_product_template_menu/__manifest__.py
Normal file
29
sale_purchase_no_product_template_menu/__manifest__.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright 2015-2019 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Sale Purchase No Product Template Menu",
|
||||||
|
"version": "14.0.1.0.0",
|
||||||
|
"category": "Sale and Purchase",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"summary": "Replace product.template menu entries by product.product menu entries",
|
||||||
|
"description": """
|
||||||
|
Sale Purchase No Product Template
|
||||||
|
=================================
|
||||||
|
|
||||||
|
This module replaces the menu entries for product.template by menu entries for product.product in the *Sales* and *Purchases* menu entries. With this module, the only menu entry for product.template is in the menu *Sales > Configuration > Product Categories and Attributes*.
|
||||||
|
|
||||||
|
This module also switches to the tree view by default for Product menu entries, instead of the kanban view.
|
||||||
|
|
||||||
|
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||||
|
""",
|
||||||
|
"author": "Akretion",
|
||||||
|
"website": "http://www.akretion.com",
|
||||||
|
"depends": [
|
||||||
|
"purchase",
|
||||||
|
"sale",
|
||||||
|
],
|
||||||
|
"data": ["view.xml"],
|
||||||
|
"installable": True,
|
||||||
|
}
|
||||||
29
sale_purchase_no_product_template_menu/i18n/fr.po
Normal file
29
sale_purchase_no_product_template_menu/i18n/fr.po
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# 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: \n"
|
||||||
|
"PO-Revision-Date: 2022-03-28 17:19+0200\n"
|
||||||
|
"Last-Translator: <>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
"X-Generator: Poedit 3.0\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_purchased
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
|
||||||
|
msgid "Products"
|
||||||
|
msgstr "Articles"
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# 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 14.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \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_purchased
|
||||||
|
#: model:ir.actions.act_window,name:sale_purchase_no_product_template_menu.product_product_action_sell
|
||||||
|
msgid "Products"
|
||||||
|
msgstr ""
|
||||||
63
sale_purchase_no_product_template_menu/view.xml
Normal file
63
sale_purchase_no_product_template_menu/view.xml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2015-2019 Akretion France (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- PURCHASE -->
|
||||||
|
<record id="product_product_action_purchased" model="ir.actions.act_window">
|
||||||
|
<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_purchase': 1}</field>
|
||||||
|
<field name="search_view_id" eval="False"/> <!-- Force empty -->
|
||||||
|
<field name="view_id" eval="False"/> <!-- Force empty -->
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="purchase.menu_procurement_partner_contact_form" model="ir.ui.menu">
|
||||||
|
<field name="action" ref="product_product_action_purchased"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- SALE -->
|
||||||
|
<!-- 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="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>
|
||||||
|
|
||||||
|
<!-- To keep good translations, we re-use the product.template menu
|
||||||
|
entry and link it to product product -->
|
||||||
|
<record id="sale.menu_product_template_action" model="ir.ui.menu">
|
||||||
|
<!-- related action is "product.product_template_action" -->
|
||||||
|
<field name="action" ref="product_product_action_sell"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_template_action" model="ir.actions.act_window">
|
||||||
|
<field name="name">Product Templates</field> <!-- native value is "Products" -->
|
||||||
|
<field name="view_mode">tree,form,kanban</field>
|
||||||
|
<field name="view_id" eval="False"/>
|
||||||
|
<field name="context">{}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Create a product template menu entry in configuration -->
|
||||||
|
<menuitem id="sale_config_product_template_menu" action="product.product_template_action"
|
||||||
|
parent="sale.prod_config_main"/>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="product.product_normal_action_sell" model="ir.actions.act_window">
|
||||||
|
<field name="view_mode">tree,form,kanban</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user