From 777fc149084b9dfbddaa32764cda4502d7a4cbf8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 9 Dec 2016 15:30:38 +0100 Subject: [PATCH 1/3] Change menu position --- base_partner_one2many_phone/partner_phone_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_partner_one2many_phone/partner_phone_view.xml b/base_partner_one2many_phone/partner_phone_view.xml index 94c3494..2dfd8fa 100644 --- a/base_partner_one2many_phone/partner_phone_view.xml +++ b/base_partner_one2many_phone/partner_phone_view.xml @@ -41,7 +41,7 @@ + parent="sales_team.menu_sales" sequence="10"/> add.phone_ids.on.partner.form From 85f505bd2d44e8bacb8095ec8fda2d687f4b66d9 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 12 Dec 2016 13:36:52 +0100 Subject: [PATCH 2/3] Add module mrp_no_product_template_menu --- mrp_no_product_template_menu/__init__.py | 1 + mrp_no_product_template_menu/__manifest__.py | 26 ++++++++++++++++++++ mrp_no_product_template_menu/mrp_view.xml | 20 +++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 mrp_no_product_template_menu/__init__.py create mode 100644 mrp_no_product_template_menu/__manifest__.py create mode 100644 mrp_no_product_template_menu/mrp_view.xml diff --git a/mrp_no_product_template_menu/__init__.py b/mrp_no_product_template_menu/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/mrp_no_product_template_menu/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/mrp_no_product_template_menu/__manifest__.py b/mrp_no_product_template_menu/__manifest__.py new file mode 100644 index 0000000..2df7c38 --- /dev/null +++ b/mrp_no_product_template_menu/__manifest__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'MRP No Product Template Menu', + 'version': '10.0.1.0.0', + 'category': 'Manufacturing', + 'license': 'AGPL-3', + 'summary': "Remplace product.template menu entries by product.product menu entries", + 'description': """ +MRP No Product Template +======================= + +This module replaces the menu entry for product.template by menu entries for product.product in the *Manufacturing > Master Data* menu. + +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 . + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['mrp'], + 'data': ['mrp_view.xml'], + 'installable': True, +} diff --git a/mrp_no_product_template_menu/mrp_view.xml b/mrp_no_product_template_menu/mrp_view.xml new file mode 100644 index 0000000..f875d15 --- /dev/null +++ b/mrp_no_product_template_menu/mrp_view.xml @@ -0,0 +1,20 @@ + + + + + + + Products + product.product + tree,form,kanban + {'search_default_consumable': 1, 'default_type': 'product'} + + + + + + + From 8fc54fd37a18681c3b971a4dc6df9d124b69904f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 13 Dec 2016 12:01:44 +0100 Subject: [PATCH 3/3] Add unicity constraint on analytic codes per company --- account_usability/account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/account_usability/account.py b/account_usability/account.py index b664227..2d03b1e 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -105,6 +105,12 @@ class AccountAnalyticAccount(models.Model): else: return super(AccountAnalyticAccount, self).name_get() + _sql_constraints = [( + 'code_company_unique', + 'unique(code, company_id)', + 'An analytic account with the same code already ' + 'exists in the same company!')] + class AccountMoveLine(models.Model): _inherit = 'account.move.line'