From ad1650854eead5af703d535cb03d5bdf56088cde Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sun, 7 Apr 2013 23:23:33 +0200 Subject: [PATCH 01/18] [FIX] account: recursively find proper partner to link to journal items, as discussed in bugs 1160365 and 1151947 lp bug: https://launchpad.net/bugs/1160365 fixed lp bug: https://launchpad.net/bugs/1151947 fixed bzr revid: odo@openerp.com-20130407212333-34jahthhppcz2wju --- addons/account/account_invoice.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index eb362455cd9..4611e0ab240 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1260,9 +1260,7 @@ class account_invoice(osv.osv): ref = invoice.reference else: ref = self._convert_ref(cr, uid, invoice.number) - partner = invoice.partner_id - if partner.parent_id and not partner.is_company: - partner = partner.parent_id + partner = self.pool['res.partner']._find_accounting_partner(invoice.partner_id) # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'debit': direction * pay_amount>0 and direction * pay_amount, @@ -1733,15 +1731,17 @@ class res_partner(osv.osv): 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True), } - def _find_accounting_partner(self, part): + def _find_accounting_partner(self, partner): ''' Find the partner for which the accounting entries will be created ''' + # FIXME: after 7.0, to replace by function field partner.commercial_id + #if the chosen partner is not a company and has a parent company, use the parent for the journal entries #because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait' - if part.parent_id and not part.is_company: - part = part.parent_id - return part + while not partner.is_company and partner.parent_id: + partner = partner.parent_id + return partner def copy(self, cr, uid, id, default=None, context=None): default = default or {} From 438e1c1daf5bc4eb212f78b87f277fff8e8a0ceb Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 01:50:13 +0200 Subject: [PATCH 02/18] [FIX] res.partner: Hide commercial-related fields on contacts form + autosync them from parent company Fixes handling of accounting/invoicing-related fields on partners that are not "commercial entities" (either marked as "is_company" or parentless). The corresponding fields are also hidden from form views on these partners and replaced by a short sentence and a link to edit the "master fields" on the commercial entity. This corresponds to part B of the solution described on bug 1160365. lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130407235013-j3tv4uxy46eej43i --- addons/account/partner.py | 5 +++++ addons/account/partner_view.xml | 7 ++++++- addons/base_vat/base_vat.py | 3 +++ addons/l10n_be_invoice_bba/partner.py | 5 +++++ addons/l10n_ro/res_partner.py | 4 ++++ addons/product/partner.py | 3 +++ addons/product/partner_view.xml | 5 ++++- addons/purchase/partner.py | 3 +++ addons/sale_journal/sale_journal.py | 4 ++++ addons/sale_journal/sale_journal_view.xml | 2 +- 10 files changed, 38 insertions(+), 3 deletions(-) diff --git a/addons/account/partner.py b/addons/account/partner.py index ae8d2fc1871..4914a17dd2b 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -236,6 +236,11 @@ class res_partner(osv.osv): 'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.') } + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + \ + ['debit_limit', 'property_account_payable', 'property_account_receivable', 'property_account_position', + 'property_payment_term', 'property_supplier_payment_term', 'last_reconciliation_date'] + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 1267e20165b..abded67f6ab 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -73,7 +73,7 @@ - + @@ -103,6 +103,11 @@ + +
+

Accounting-related settings are managed on

+
diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py index 616333e3b47..3366101c7c7 100644 --- a/addons/base_vat/base_vat.py +++ b/addons/base_vat/base_vat.py @@ -134,6 +134,9 @@ class res_partner(osv.osv): 'vat_subjected': fields.boolean('VAT Legal Statement', help="Check this box if the partner is subjected to the VAT. It will be used for the VAT legal statement.") } + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['vat_subjected'] + def _construct_constraint_msg(self, cr, uid, ids, context=None): def default_vat_check(cn, vn): # by default, a VAT number is valid if: diff --git a/addons/l10n_be_invoice_bba/partner.py b/addons/l10n_be_invoice_bba/partner.py index 9e0eec10713..df68268bf43 100644 --- a/addons/l10n_be_invoice_bba/partner.py +++ b/addons/l10n_be_invoice_bba/partner.py @@ -44,6 +44,11 @@ class res_partner(osv.osv): help='Select Algorithm to generate the Structured Communication on Outgoing Invoices.' ), } + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + \ + ['out_inv_comm_type', 'out_inv_comm_algorithm'] + + _default = { 'out_inv_comm_type': 'none', } diff --git a/addons/l10n_ro/res_partner.py b/addons/l10n_ro/res_partner.py index 1cfe7390a77..95867f8e883 100755 --- a/addons/l10n_ro/res_partner.py +++ b/addons/l10n_ro/res_partner.py @@ -32,6 +32,10 @@ class res_partner(osv.osv): ('vat_uniq', 'unique (vat)', 'The vat of the partner must be unique !'), ('nrc_uniq', 'unique (nrc)', 'The code of the partner must be unique !') ] + + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['nrc'] + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/partner.py b/addons/product/partner.py index 1d11e909346..4a291a8ddd3 100644 --- a/addons/product/partner.py +++ b/addons/product/partner.py @@ -36,6 +36,9 @@ class res_partner(osv.osv): help="This pricelist will be used, instead of the default one, for sales to the current partner"), } + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['property_product_pricelist'] + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/partner_view.xml b/addons/product/partner_view.xml index acb087533ac..5117da6044e 100644 --- a/addons/product/partner_view.xml +++ b/addons/product/partner_view.xml @@ -8,9 +8,12 @@ - + +
+

Pricelists are managed on

diff --git a/addons/purchase/partner.py b/addons/purchase/partner.py index 56eaf288fe6..e05f6b9c9c6 100644 --- a/addons/purchase/partner.py +++ b/addons/purchase/partner.py @@ -43,6 +43,9 @@ class res_partner(osv.osv): super(res_partner, self).copy(cr, uid, id, default=default, context=context) + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['property_product_pricelist_purchase'] + _columns = { 'property_product_pricelist_purchase': fields.property( 'product.pricelist', diff --git a/addons/sale_journal/sale_journal.py b/addons/sale_journal/sale_journal.py index 8463ab3f3bd..cb33d7e2334 100644 --- a/addons/sale_journal/sale_journal.py +++ b/addons/sale_journal/sale_journal.py @@ -52,6 +52,10 @@ class res_partner(osv.osv): group_name = "Accounting Properties", help = "This invoicing type will be used, by default, to invoice the current partner."), } + + def _commercial_fields(self, cr, uid, context=None): + return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['property_invoice_type'] + res_partner() class picking(osv.osv): diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml index bcd83b5be84..9d41103252e 100644 --- a/addons/sale_journal/sale_journal_view.xml +++ b/addons/sale_journal/sale_journal_view.xml @@ -146,7 +146,7 @@ - + From dcac505a5b83888d847c65b3ec3443aa47271e4f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 01:51:15 +0200 Subject: [PATCH 03/18] [FIX] sale: remove useless code to select commercial entity, now handled by res.partner.address_get directly lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130407235115-4kovy1jngblrdd5z --- addons/sale/sale.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index a6be2838171..a52efc12467 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -314,10 +314,6 @@ class sale_order(osv.osv): return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'payment_term': False, 'fiscal_position': False}} part = self.pool.get('res.partner').browse(cr, uid, part, context=context) - #if the chosen partner is not a company and has a parent company, use the parent to choose the delivery, the - #invoicing addresses and all the fields related to the partner. - if part.parent_id and not part.is_company: - part = part.parent_id addr = self.pool.get('res.partner').address_get(cr, uid, [part.id], ['delivery', 'invoice', 'contact']) pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False payment_term = part.property_payment_term and part.property_payment_term.id or False From 347c784dabb42f907abc33a2b40de082b815d3f8 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 01:56:40 +0200 Subject: [PATCH 04/18] [FIX] account: include contacts matches when searching for company invoices This implements part E of the solution described on bug 1160365 lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130407235640-cg02qh4ittc743zw --- addons/account/account_invoice_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 8c7cec67ac5..1fbdbf26453 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -447,14 +447,14 @@ account.invoice - + - + From e4f04efdd6ffb3e599bde28bd87b6ebc8f963400 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 02:01:24 +0200 Subject: [PATCH 05/18] [FIX] account.invoice: only allow selecting partners that are `commercial entities` Following-up to the discussion on bug 1160365, this will help users make the right choice when manualling creating invoices. lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130408000124-wcmjco9561hc9fbl --- addons/account/account_invoice_view.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 1fbdbf26453..59c78c98e54 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -166,7 +166,7 @@ + domain="[('supplier', '=', True),'|',('parent_id','=',False),('is_company','=',True)]"/> @@ -320,7 +320,8 @@ + options='{"always_reload": True}' + domain="[('customer', '=', True),'|',('parent_id','=',False),('is_company','=',True)]"/> From ed62e366918ace0988c9edfc2594f9e31650b590 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 02:55:26 +0200 Subject: [PATCH 06/18] [FIX] account_voucher,sale,purchase: include contacts matches when searching for company documents This implements part E of the solution described on bug 1160365 lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130408005526-7124r7u39yhh9la3 --- addons/account_voucher/account_voucher_view.xml | 2 +- addons/purchase/purchase_view.xml | 6 +++--- addons/sale/sale_view.xml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index f429480f656..4674d62b6a0 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -129,7 +129,7 @@ - + diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 63735b090dd..b497599f848 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -270,7 +270,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -481,7 +481,7 @@ - + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index a6cc7df1f12..8a0c6c9e6a4 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -308,7 +308,7 @@ - + @@ -472,7 +472,7 @@ - + @@ -498,7 +498,7 @@ - + From 41d3c2ae88d89daabbdba64b899a221a7aeebf81 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 05:00:52 +0200 Subject: [PATCH 07/18] [FIX] sale: use invoicing partner rather than main one for analytic account context, spotted by Raphael Valyi on bug 1160365 lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130408030052-xgk5p8zkagu21scs --- addons/sale/sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 8a0c6c9e6a4..094e19c050f 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -156,7 +156,7 @@ - + From 140554c9f8311892885a7658f13dc28d7deaa105 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 10 Apr 2013 15:53:08 +0200 Subject: [PATCH 08/18] [REVERT] account.invoice: remove "commercial entity" domain on partner_id, to keep it consistent everywhere Being able to choose a contact to invoice is very important because the invoice must go to the right person. When the invoice creation is automated by e.g. a Sales Order any partner can be used (even though the system will preselect the `invoicing` partner of the company if one exists). We have to keep that freedom when manually creating invoices. bzr revid: odo@openerp.com-20130410135308-pd54c7ml8t3pcefl --- addons/account/account_invoice_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 59c78c98e54..046350f302e 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -166,7 +166,7 @@ + domain="[('supplier', '=', True)]"/> @@ -321,7 +321,7 @@ on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}' - domain="[('customer', '=', True),'|',('parent_id','=',False),('is_company','=',True)]"/> + domain="[('customer', '=', True)]"/> From 5937980b1d20aba620665b21c0d3412cbde04fbf Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 10 Apr 2013 19:04:37 +0200 Subject: [PATCH 09/18] [FIX] res.partner form view: inherited view now hides `use_parent_address` on top of `type` + fix embedded form view too The `use_parent_address` flag is meant for advanced use in companies that want to make sure their contact/company addresses are always in sync, at the possible cost of some usability loss when editing existing addresses (need to open the company form view, contact fields are read-only). The embedded mini-form view of the contacts also need to be inherited to make it match the main view. bzr revid: odo@openerp.com-20130410170437-2v4ehptknk6yf1x2 --- addons/sale/res_partner_view.xml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/addons/sale/res_partner_view.xml b/addons/sale/res_partner_view.xml index 54a9813eea9..40ac119fdee 100644 --- a/addons/sale/res_partner_view.xml +++ b/addons/sale/res_partner_view.xml @@ -63,14 +63,34 @@ sale.group_delivery_invoice_address - - False False + sale.group_delivery_invoice_address - + + False + sale.group_delivery_invoice_address + + + False + sale.group_delivery_invoice_address + + + False + sale.group_delivery_invoice_address + + + False + sale.group_delivery_invoice_address + + + False + sale.group_delivery_invoice_address + + + False sale.group_delivery_invoice_address From b9eafcde227a21f2e7a6e4c796cc440244bfd24f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 11 Apr 2013 14:55:25 +0200 Subject: [PATCH 10/18] [ADD] account_report_company module: new module for adding "commercial entity" m2o on invoices and "Partner Company" dimension on Invoice Analysis bzr revid: odo@openerp.com-20130411125525-1typd4fuuvrbobae --- addons/account_report_company/__init__.py | 25 +++++++++ addons/account_report_company/__openerp__.py | 56 +++++++++++++++++++ .../account_report_company/account_invoice.py | 31 ++++++++++ .../account_invoice_view.xml | 24 ++++++++ .../account_report_company/report/__init__.py | 24 ++++++++ .../report/account_invoice_report.py | 36 ++++++++++++ .../report/account_invoice_report_view.xml | 24 ++++++++ 7 files changed, 220 insertions(+) create mode 100644 addons/account_report_company/__init__.py create mode 100644 addons/account_report_company/__openerp__.py create mode 100644 addons/account_report_company/account_invoice.py create mode 100644 addons/account_report_company/account_invoice_view.xml create mode 100644 addons/account_report_company/report/__init__.py create mode 100644 addons/account_report_company/report/account_invoice_report.py create mode 100644 addons/account_report_company/report/account_invoice_report_view.xml diff --git a/addons/account_report_company/__init__.py b/addons/account_report_company/__init__.py new file mode 100644 index 00000000000..623cb467c25 --- /dev/null +++ b/addons/account_report_company/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013 OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import account_invoice +import report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report_company/__openerp__.py b/addons/account_report_company/__openerp__.py new file mode 100644 index 00000000000..9ee15e1556c --- /dev/null +++ b/addons/account_report_company/__openerp__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013 OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'Invoice Analysis per Company', + 'version': '1.0', + 'category': 'Accounting & Finance', + 'description': """ +Add an extra Company dimension on Invoices for consolidated Invoice Analysis +============================================================================ + +By default Customer and Supplier invoices can be linked to a contact within +a company, but the company is not a direct reference in the database structure for +invoices. Journal Entries are however always linked to the company and not to +contacts, so that Accounts Payable and Receivable are always correct and consolidated +at company level. + +When many different contacts/departments need to be invoiced within the same parent company, +this can make reporting by Company more difficult: reports are directly based on the +database structure and would not provide an aggregated company dimension. + +This modules solves the problem by adding an explicit company reference on invoices, +automatically computed from the invoice contact, and use this new dimension +when grouping the list of Invoices or the Invoice Analysis report by Partner. + +Note: this module will likely be removed for the next major OpenERP version and +directly integrated in the core accounting. +""", + 'author': 'OpenERP SA', + 'website': 'http://www.openerp.com', + 'depends': ['account'], + 'data': [ + 'account_invoice_view.xml', + 'report/account_invoice_report_view.xml', + ], + 'auto_install': True, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report_company/account_invoice.py b/addons/account_report_company/account_invoice.py new file mode 100644 index 00000000000..aae1ee77d0e --- /dev/null +++ b/addons/account_report_company/account_invoice.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013 S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import osv, fields + +class account_invoice(osv.Model): + _inherit = 'account.invoice' + + _columns = { + 'partner_commercial_id': fields.related('partner_id', 'commercial_id', string='Commercial Entity', type='many2one', + relation='res.partner', store=True, readonly=True, + help="The commercial entity that will be used on Journal Entries for this invoice") + } \ No newline at end of file diff --git a/addons/account_report_company/account_invoice_view.xml b/addons/account_report_company/account_invoice_view.xml new file mode 100644 index 00000000000..2db2d77ad87 --- /dev/null +++ b/addons/account_report_company/account_invoice_view.xml @@ -0,0 +1,24 @@ + + + + + account.invoice + + + + + + + + + + account.invoice + + + + + + + + + \ No newline at end of file diff --git a/addons/account_report_company/report/__init__.py b/addons/account_report_company/report/__init__.py new file mode 100644 index 00000000000..0fa7453c913 --- /dev/null +++ b/addons/account_report_company/report/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013 OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import account_invoice_report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report_company/report/account_invoice_report.py b/addons/account_report_company/report/account_invoice_report.py new file mode 100644 index 00000000000..09cf1caca83 --- /dev/null +++ b/addons/account_report_company/report/account_invoice_report.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013 OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp.osv import osv, fields + +class account_invoice_report(osv.Model): + _inherit = 'account.invoice.report' + _columns = { + 'partner_commercial_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"), + } + + def _select(self): + return super(account_invoice_report, self)._select() + ", sub.partner_commercial_id as partner_commercial_id" + + def _sub_select(self): + return super(account_invoice_report, self)._sub_select() + ", ai.partner_commercial_id as partner_commercial_id" + + def _group_by(self): + return super(account_invoice_report, self)._group_by() + ", ai.partner_commercial_id" diff --git a/addons/account_report_company/report/account_invoice_report_view.xml b/addons/account_report_company/report/account_invoice_report_view.xml new file mode 100644 index 00000000000..bfdc99b1361 --- /dev/null +++ b/addons/account_report_company/report/account_invoice_report_view.xml @@ -0,0 +1,24 @@ + + + + + account.invoice.report + + + + + + + + + + account.invoice.report + + + + + + + + + \ No newline at end of file From 3bd4cef043141500276e743beb8028e1151d4825 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 11 Apr 2013 16:56:36 +0200 Subject: [PATCH 11/18] [FIX] sale_stock: when creating invoices after delivery, use invoicing contact from SO + update test (reported by Joel Grand-Guillaume while reviewing bug 1160365) The existing tests were modified to explicitly cover the case where the "invoice partner" is set on the Sales Order. This minimal change was done with a !python block because !record triggers the on_change calls on the SO and cause undesired changes. This could be improved by creating a new customer with a real invoicing contact and creating a new SO. bzr revid: odo@openerp.com-20130411145636-emmagu7uu5kis1aa --- addons/sale_stock/stock.py | 2 +- addons/sale_stock/test/picking_order_policy.yml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/sale_stock/stock.py b/addons/sale_stock/stock.py index 93acf8579f5..b69a8a27ef6 100644 --- a/addons/sale_stock/stock.py +++ b/addons/sale_stock/stock.py @@ -53,7 +53,7 @@ class stock_picking(osv.osv): We select the partner of the sales order as the partner of the customer invoice """ if picking.sale_id: - return picking.sale_id.partner_id + return picking.sale_id.partner_invoice_id return super(stock_picking, self)._get_partner_to_invoice(cr, uid, picking, context=context) def _get_comment_invoice(self, cursor, user, picking): diff --git a/addons/sale_stock/test/picking_order_policy.yml b/addons/sale_stock/test/picking_order_policy.yml index 720c79685fa..09a8b73ffee 100644 --- a/addons/sale_stock/test/picking_order_policy.yml +++ b/addons/sale_stock/test/picking_order_policy.yml @@ -5,6 +5,12 @@ - !assert {model: sale.order, id: sale.sale_order_6, string: The amount of the Quotation is not correctly computed}: - sum([l.price_subtotal for l in order_line]) == amount_untaxed +- + I set an explicit invoicing partner that is different from the main SO Customer +- + !python {model: sale.order, id: sale.sale_order_6}: | + order = self.browse(cr, uid, ref("sale.sale_order_6")) + order.write({'partner_invoice_id': ref('base.res_partner_address_29')}) - I confirm the quotation with Invoice based on deliveries policy. - @@ -110,13 +116,13 @@ !python {model: sale.order}: | order = self.browse(cr, uid, ref("sale.sale_order_6")) assert order.invoice_ids, "Invoice is not created." - ac = order.partner_id.property_account_receivable.id + ac = order.partner_invoice_id.property_account_receivable.id journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'sale'), ('company_id', '=', order.company_id.id)]) for invoice in order.invoice_ids: assert invoice.type == 'out_invoice',"Invoice should be Customer Invoice." assert invoice.account_id.id == ac,"Invoice account is not correspond." assert invoice.reference == order.client_order_ref or order.name,"Reference is not correspond." - assert invoice.partner_id.id == order.partner_id.id,"Customer is not correspond." + assert invoice.partner_id.id == order.partner_invoice_id.id,"Customer does not correspond." assert invoice.currency_id.id == order.pricelist_id.currency_id.id, "Currency is not correspond." assert invoice.comment == (order.note or ''),"Note is not correspond." assert invoice.journal_id.id in journal_ids,"Sales Journal is not link on Invoice." From 556e4e76c37419c810bfe0da6b13f2a19c4f0a72 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 15 Apr 2013 19:52:58 +0200 Subject: [PATCH 12/18] [FIX] l10n_ro: unique constraints on `vat` and `nrc` columns need to be updated for 7.0 model With the 7.0 model all accounting-related fields are synchronized from company to contacts (both are res.partner records), so the unique check is not a trivial unique constraint. It must be updated to use a *partial unique index* that applies only to "commercial entities" and not to contacts. The condition for being a commercial entity is "is_company is true or parent_id is NULL". If companies have unique vat/nrc numbers, then their contacts will be consistent because they are automatically synchronized, so the uniqueness between contacts does not have to be checked. (The auto-sync is performed by res.partner automatically and covered by tests in the "base" module) bzr revid: odo@openerp.com-20130415175258-l15meqin80sbhggu --- addons/l10n_ro/res_partner.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/addons/l10n_ro/res_partner.py b/addons/l10n_ro/res_partner.py index 95867f8e883..4720c6f8157 100755 --- a/addons/l10n_ro/res_partner.py +++ b/addons/l10n_ro/res_partner.py @@ -28,11 +28,30 @@ class res_partner(osv.osv): _columns = { 'nrc' : fields.char('NRC', size=16, help='Registration number at the Registry of Commerce'), } + + # The SQL constraints are no-ops but present only to display the right error message to the + # user when the partial unique indexes defined below raise errors/ + # The real constraints need to be implemented with PARTIAL UNIQUE INDEXES (see auto_init), + # due to the way accounting data is delegated by contacts to their companies in OpenERP 7.0. _sql_constraints = [ - ('vat_uniq', 'unique (vat)', 'The vat of the partner must be unique !'), - ('nrc_uniq', 'unique (nrc)', 'The code of the partner must be unique !') + ('vat_uniq', 'unique (id)', 'The vat of the partner must be unique !'), + ('nrc_uniq', 'unique (id)', 'The code of the partner must be unique !') ] + def _auto_init(self, cr, context=None): + result = super(res_partner, self)._auto_init(cr, context=context) + # Real implementation of the vat/nrc constraints: only "commercial entities" need to have + # unique numbers, and the condition for being a commercial entity is "is_company or parent_id IS NULL". + # Contacts inside a company automatically have a copy of the company's commercial fields + # (see _commercial_fields()), so they are automatically consistent. + cr.execute(""" + DROP INDEX IF EXISTS res_partner_vat_uniq_for_companies; + DROP INDEX IF EXISTS res_partner_nrc_uniq_for_companies; + CREATE UNIQUE INDEX res_partner_vat_uniq_for_companies ON res_partner (vat) WHERE is_company OR parent_id IS NULL; + CREATE UNIQUE INDEX res_partner_nrc_uniq_for_companies ON res_partner (nrc) WHERE is_company OR parent_id IS NULL; + """) + return result + def _commercial_fields(self, cr, uid, context=None): return super(res_partner, self)._commercial_fields(cr, uid, context=context) + ['nrc'] From a9d5c2d37ef8150e90e6dc1082d721400075f468 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 18 Apr 2013 17:40:22 +0200 Subject: [PATCH 13/18] [FIX] res.partner: rename commercial_id to commercial_partner_id, following corresponding change in `base` bzr revid: odo@openerp.com-20130418154022-lt7frhp9c8f2boo0 --- addons/account/account_invoice.py | 2 +- addons/account_report_company/account_invoice.py | 4 ++-- addons/account_report_company/account_invoice_view.xml | 4 ++-- .../report/account_invoice_report.py | 8 ++++---- .../report/account_invoice_report_view.xml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 4611e0ab240..2d09753e584 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1735,7 +1735,7 @@ class res_partner(osv.osv): ''' Find the partner for which the accounting entries will be created ''' - # FIXME: after 7.0, to replace by function field partner.commercial_id + # FIXME: after 7.0, to replace by function field partner.commercial_partner_id #if the chosen partner is not a company and has a parent company, use the parent for the journal entries #because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait' diff --git a/addons/account_report_company/account_invoice.py b/addons/account_report_company/account_invoice.py index aae1ee77d0e..fe4a7b2c256 100644 --- a/addons/account_report_company/account_invoice.py +++ b/addons/account_report_company/account_invoice.py @@ -25,7 +25,7 @@ class account_invoice(osv.Model): _inherit = 'account.invoice' _columns = { - 'partner_commercial_id': fields.related('partner_id', 'commercial_id', string='Commercial Entity', type='many2one', + 'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one', relation='res.partner', store=True, readonly=True, help="The commercial entity that will be used on Journal Entries for this invoice") - } \ No newline at end of file + } diff --git a/addons/account_report_company/account_invoice_view.xml b/addons/account_report_company/account_invoice_view.xml index 2db2d77ad87..89479c5a5e7 100644 --- a/addons/account_report_company/account_invoice_view.xml +++ b/addons/account_report_company/account_invoice_view.xml @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/addons/account_report_company/report/account_invoice_report.py b/addons/account_report_company/report/account_invoice_report.py index 09cf1caca83..5941aef9e6e 100644 --- a/addons/account_report_company/report/account_invoice_report.py +++ b/addons/account_report_company/report/account_invoice_report.py @@ -23,14 +23,14 @@ from openerp.osv import osv, fields class account_invoice_report(osv.Model): _inherit = 'account.invoice.report' _columns = { - 'partner_commercial_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"), + 'commercial_partner_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"), } def _select(self): - return super(account_invoice_report, self)._select() + ", sub.partner_commercial_id as partner_commercial_id" + return super(account_invoice_report, self)._select() + ", sub.commercial_partner_id as commercial_partner_id" def _sub_select(self): - return super(account_invoice_report, self)._sub_select() + ", ai.partner_commercial_id as partner_commercial_id" + return super(account_invoice_report, self)._sub_select() + ", ai.commercial_partner_id as commercial_partner_id" def _group_by(self): - return super(account_invoice_report, self)._group_by() + ", ai.partner_commercial_id" + return super(account_invoice_report, self)._group_by() + ", ai.commercial_partner_id" diff --git a/addons/account_report_company/report/account_invoice_report_view.xml b/addons/account_report_company/report/account_invoice_report_view.xml index bfdc99b1361..90fa4bdf2ec 100644 --- a/addons/account_report_company/report/account_invoice_report_view.xml +++ b/addons/account_report_company/report/account_invoice_report_view.xml @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ - + From 850396421693c405c2ab2763f3734628b09be7ad Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 19 Apr 2013 15:43:35 +0200 Subject: [PATCH 14/18] [IMP] account_report_company: make res.partner.commercial_partner_id field stored, for further reporting needs This is not strictly necessary, but can be useful for other modules in order to ease SQL reporting, without even needing to store a denormalized copy of the "commercial partner" key on the documents themselves. Also renamed the Python fiel to something generic since it now inherits multiple models. bzr revid: odo@openerp.com-20130419134335-rhsg24f2uuwl3kla --- addons/account_report_company/__init__.py | 2 +- ...unt_invoice.py => account_report_company.py} | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) rename addons/account_report_company/{account_invoice.py => account_report_company.py} (63%) diff --git a/addons/account_report_company/__init__.py b/addons/account_report_company/__init__.py index 623cb467c25..42ec779494e 100644 --- a/addons/account_report_company/__init__.py +++ b/addons/account_report_company/__init__.py @@ -19,7 +19,7 @@ # ############################################################################## -import account_invoice +import account_report_company import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report_company/account_invoice.py b/addons/account_report_company/account_report_company.py similarity index 63% rename from addons/account_report_company/account_invoice.py rename to addons/account_report_company/account_report_company.py index fe4a7b2c256..d643acd0c95 100644 --- a/addons/account_report_company/account_invoice.py +++ b/addons/account_report_company/account_report_company.py @@ -21,6 +21,23 @@ from openerp.osv import osv, fields +class res_partner(osv.Model): + _inherit = 'res.partner' + + # indirection to avoid passing a copy of the overridable method when declaring the function field + _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs) + + _commercial_partner_id_store_triggers = { + 'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)]), + ['parent_id', 'is_company'], 10) + } + + _columns = { + # make the original field stored, in case it's needed for reporting purposes + 'commercial_partner_id': fields.function(_commercial_partner_id, type='many2one', relation='res.partner', string='Commercial Entity', + store=_commercial_partner_id_store_triggers) + } + class account_invoice(osv.Model): _inherit = 'account.invoice' From 5e2ce8b709528f8bcf9376c84c49cb90d3422c2a Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 19 Apr 2013 18:52:39 +0200 Subject: [PATCH 15/18] [IMP] account_report_company: add extra stored function field `display_name` on res.partner and use it for sorting This makes name_search() results, group_by, etc. all behave as expected bzr revid: odo@openerp.com-20130419165239-15szgi0e686k6mh9 --- .../account_report_company.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/addons/account_report_company/account_report_company.py b/addons/account_report_company/account_report_company.py index d643acd0c95..22719440dec 100644 --- a/addons/account_report_company/account_report_company.py +++ b/addons/account_report_company/account_report_company.py @@ -23,19 +23,27 @@ from openerp.osv import osv, fields class res_partner(osv.Model): _inherit = 'res.partner' - - # indirection to avoid passing a copy of the overridable method when declaring the function field - _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs) + _order = 'display_name' + + def _display_name_compute(self, cr, uid, ids, name, args, context=None): + return dict(self.name_get(cr, uid, ids, context=context)) _commercial_partner_id_store_triggers = { 'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)]), ['parent_id', 'is_company'], 10) } + # indirections to avoid passing a copy of the overridable method when declaring the function field + _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs) + _display_name = lambda self, *args, **kwargs: self._display_name_compute(*args, **kwargs) + _columns = { # make the original field stored, in case it's needed for reporting purposes 'commercial_partner_id': fields.function(_commercial_partner_id, type='many2one', relation='res.partner', string='Commercial Entity', - store=_commercial_partner_id_store_triggers) + store=_commercial_partner_id_store_triggers), + + # extra field to allow ORDER BY to match visible names + 'display_name': fields.function(_display_name, type='char', string='Name', store=_commercial_partner_id_store_triggers), } class account_invoice(osv.Model): From 64f29cfa1010a5af437f36056c53db995e185e78 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 19 Apr 2013 19:18:53 +0200 Subject: [PATCH 16/18] [IMP] account_report_company: use `display_name` instead of name in kanban and list views, so labels visually match order bzr revid: odo@openerp.com-20130419171853-dvfi5jvvlof9afoo --- addons/account_report_company/__openerp__.py | 1 + .../res_partner_view.xml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 addons/account_report_company/res_partner_view.xml diff --git a/addons/account_report_company/__openerp__.py b/addons/account_report_company/__openerp__.py index 9ee15e1556c..6c2f89c62c0 100644 --- a/addons/account_report_company/__openerp__.py +++ b/addons/account_report_company/__openerp__.py @@ -48,6 +48,7 @@ directly integrated in the core accounting. 'depends': ['account'], 'data': [ 'account_invoice_view.xml', + 'res_partner_view.xml', 'report/account_invoice_report_view.xml', ], 'auto_install': True, diff --git a/addons/account_report_company/res_partner_view.xml b/addons/account_report_company/res_partner_view.xml new file mode 100644 index 00000000000..cae010f3066 --- /dev/null +++ b/addons/account_report_company/res_partner_view.xml @@ -0,0 +1,24 @@ + + + + + res.partner + + + + + + + + + + res.partner + + + + + + + + + \ No newline at end of file From b91cd6127ad295a272c52b714d7ebefb3c40f446 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sat, 20 Apr 2013 03:50:03 +0200 Subject: [PATCH 17/18] [REVERT] account_report_company: undo override of res.partner.commercial_partner_id field to store it, as the ORM does not support it and it's not strictly necessary It works when installing the module but would break everytime another module that inherits from res.partner is installed/update from command-line (e.g. -i/-u crm), as account_report_company is low in the dependency graph so the field is dropped when the ORM notices that the current field definition is not stored. This can be solved in trunk by making the field stored directly in 'base'. bzr revid: odo@openerp.com-20130420015003-8y48xrb14cjif60w --- .../account_report_company/account_report_company.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/addons/account_report_company/account_report_company.py b/addons/account_report_company/account_report_company.py index 22719440dec..0c102fcc4e1 100644 --- a/addons/account_report_company/account_report_company.py +++ b/addons/account_report_company/account_report_company.py @@ -28,22 +28,17 @@ class res_partner(osv.Model): def _display_name_compute(self, cr, uid, ids, name, args, context=None): return dict(self.name_get(cr, uid, ids, context=context)) - _commercial_partner_id_store_triggers = { + _display_name_store_triggers = { 'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)]), ['parent_id', 'is_company'], 10) } - # indirections to avoid passing a copy of the overridable method when declaring the function field - _commercial_partner_id = lambda self, *args, **kwargs: self._commercial_partner_compute(*args, **kwargs) + # indirection to avoid passing a copy of the overridable method when declaring the function field _display_name = lambda self, *args, **kwargs: self._display_name_compute(*args, **kwargs) _columns = { - # make the original field stored, in case it's needed for reporting purposes - 'commercial_partner_id': fields.function(_commercial_partner_id, type='many2one', relation='res.partner', string='Commercial Entity', - store=_commercial_partner_id_store_triggers), - # extra field to allow ORDER BY to match visible names - 'display_name': fields.function(_display_name, type='char', string='Name', store=_commercial_partner_id_store_triggers), + 'display_name': fields.function(_display_name, type='char', string='Name', store=_display_name_store_triggers), } class account_invoice(osv.Model): From feefb0ad36f055167d21ae20ef3a5f5c928b709a Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sat, 20 Apr 2013 04:26:42 +0200 Subject: [PATCH 18/18] [FIX] search views: use child_of operator for partner_id fields that can reference both companies and contacts The goal is to match both the Company and its contacts when searching for the Company bzr revid: odo@openerp.com-20130420022642-6qe8pp4ifexjms65 --- addons/account/project/project_view.xml | 2 +- .../account_analytic_analysis_view.xml | 2 +- addons/account_asset/account_asset_view.xml | 2 +- addons/account_asset/report/account_asset_report_view.xml | 2 +- addons/account_voucher/voucher_payment_receipt_view.xml | 4 ++-- addons/account_voucher/voucher_sales_purchase_view.xml | 4 ++-- addons/crm/crm_lead_view.xml | 4 ++-- addons/crm/crm_phonecall_view.xml | 2 +- addons/crm/report/crm_lead_report_view.xml | 2 +- addons/crm/report/crm_phonecall_report_view.xml | 2 +- addons/crm_claim/crm_claim_view.xml | 2 +- addons/crm_claim/report/crm_claim_report_view.xml | 2 +- addons/crm_helpdesk/crm_helpdesk_view.xml | 2 +- addons/crm_helpdesk/report/crm_helpdesk_report_view.xml | 1 + addons/mrp_repair/mrp_repair_view.xml | 2 +- addons/project/project_view.xml | 2 +- addons/project/report/project_report_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 3 ++- addons/project_issue/report/project_issue_report_view.xml | 2 +- addons/stock/report/report_stock_move_view.xml | 2 +- addons/stock/stock_view.xml | 6 ++++-- 21 files changed, 28 insertions(+), 24 deletions(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index aa567d2fc79..79a1e76c7e7 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -31,7 +31,7 @@ - + diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index a9437267611..8d7a89e4622 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -186,7 +186,7 @@ - + diff --git a/addons/account_asset/account_asset_view.xml b/addons/account_asset/account_asset_view.xml index c4cb17bded3..fe1fcf473ba 100644 --- a/addons/account_asset/account_asset_view.xml +++ b/addons/account_asset/account_asset_view.xml @@ -223,7 +223,7 @@ - + diff --git a/addons/account_asset/report/account_asset_report_view.xml b/addons/account_asset/report/account_asset_report_view.xml index 4865196c4a8..c772c6e4103 100644 --- a/addons/account_asset/report/account_asset_report_view.xml +++ b/addons/account_asset/report/account_asset_report_view.xml @@ -49,7 +49,7 @@ - + diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index de873c9195c..109c2f9aec9 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -11,7 +11,7 @@ - + @@ -34,7 +34,7 @@ - + diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index 05b783dd339..6a84a09d5e6 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -10,7 +10,7 @@ - + @@ -32,7 +32,7 @@ - + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index fb18e747fd7..be153167473 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -328,7 +328,7 @@ - + @@ -546,7 +546,7 @@ - + diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 67df85e6178..4530f412e07 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -185,7 +185,7 @@ - + diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index 0e5df8837f1..f05e8ee896b 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -80,7 +80,7 @@ - + diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml index 1f1a4f91046..06966f3a0a8 100644 --- a/addons/crm/report/crm_phonecall_report_view.xml +++ b/addons/crm/report/crm_phonecall_report_view.xml @@ -62,7 +62,7 @@ - + diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index b1ab72e20f6..f545406187d 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -201,7 +201,7 @@ - + diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml index a61490c6086..a9a4bcb27c1 100644 --- a/addons/crm_claim/report/crm_claim_report_view.xml +++ b/addons/crm_claim/report/crm_claim_report_view.xml @@ -63,7 +63,7 @@ - + diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 6c0e3433afe..d833e7bbcf6 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -152,7 +152,7 @@ - + diff --git a/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml b/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml index 05f502656d2..f6522a15c9f 100644 --- a/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml +++ b/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml @@ -62,6 +62,7 @@ + diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index d35a9ebcf1d..a4526b5b581 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -210,7 +210,7 @@ - + diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index e25a5b1eb93..f0092a1dd33 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -182,7 +182,7 @@ - + diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml index 10f3f4a8c7c..d9650e165ce 100644 --- a/addons/project/report/project_report_view.xml +++ b/addons/project/report/project_report_view.xml @@ -69,7 +69,7 @@ - + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index f4710766d61..74c83afd304 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -139,7 +139,7 @@ project.issue - + @@ -150,6 +150,7 @@ + diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml index 47ea91fad5f..93233704e65 100644 --- a/addons/project_issue/report/project_issue_report_view.xml +++ b/addons/project_issue/report/project_issue_report_view.xml @@ -55,7 +55,7 @@ - + diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml index 4f3e256389c..fcf99f6e51e 100644 --- a/addons/stock/report/report_stock_move_view.xml +++ b/addons/stock/report/report_stock_move_view.xml @@ -149,7 +149,7 @@ - + diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 14a1dca7dc7..83362ab5d6f 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -807,7 +807,7 @@ - + @@ -934,6 +934,7 @@ + @@ -1059,6 +1060,7 @@ + @@ -1370,7 +1372,7 @@ - +