From b640b7395a03f287cb7563bfd70f2cb64fd840f3 Mon Sep 17 00:00:00 2001 From: Shakir Date: Tue, 31 May 2022 14:51:03 +0530 Subject: [PATCH] [MIG] account_cost_centre: Migration to 15.0 --- account_cost_center/__manifest__.py | 15 +- .../i18n/account_cost_center.pot | 125 ---------------- account_cost_center/i18n/fr.po | 17 ++- account_cost_center/i18n/it.po | 15 +- account_cost_center/models/__init__.py | 3 +- .../models/account_cost_center.py | 6 +- account_cost_center/models/account_invoice.py | 35 ----- .../models/account_invoice_line.py | 21 --- .../models/account_invoice_report.py | 17 +-- account_cost_center/models/account_move.py | 15 ++ .../models/account_move_line.py | 6 +- .../security/account_cost_center_security.xml | 26 ++-- account_cost_center/tests/test_cost_center.py | 136 +++++++++--------- ...nter.xml => account_cost_center_views.xml} | 13 +- account_cost_center/views/account_invoice.xml | 50 ------- ...t.xml => account_invoice_report_views.xml} | 2 - ...e_line.xml => account_move_line_views.xml} | 3 - ...ccount_move.xml => account_move_views.xml} | 13 +- 18 files changed, 140 insertions(+), 378 deletions(-) delete mode 100644 account_cost_center/i18n/account_cost_center.pot delete mode 100644 account_cost_center/models/account_invoice.py delete mode 100644 account_cost_center/models/account_invoice_line.py create mode 100644 account_cost_center/models/account_move.py rename account_cost_center/views/{account_cost_center.xml => account_cost_center_views.xml} (94%) delete mode 100644 account_cost_center/views/account_invoice.xml rename account_cost_center/views/{account_invoice_report.xml => account_invoice_report_views.xml} (99%) rename account_cost_center/views/{account_move_line.xml => account_move_line_views.xml} (99%) rename account_cost_center/views/{account_move.xml => account_move_views.xml} (50%) diff --git a/account_cost_center/__manifest__.py b/account_cost_center/__manifest__.py index baa774c5f..b45aaacd3 100644 --- a/account_cost_center/__manifest__.py +++ b/account_cost_center/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2016-2019 Onestein () +# Copyright 2016-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { @@ -8,16 +8,15 @@ "license": "AGPL-3", "website": "https://github.com/OCA/account-financial-tools", "category": "Accounting", - "version": "12.0.1.0.0", - "depends": ["account", "base_view_inheritance_extension"], + "version": "15.0.1.0.0", + "depends": ["account"], "data": [ "security/ir.model.access.csv", "security/account_cost_center_security.xml", - "views/account_cost_center.xml", - "views/account_move.xml", - "views/account_move_line.xml", - "views/account_invoice.xml", - "views/account_invoice_report.xml", + "views/account_cost_center_views.xml", + "views/account_move_views.xml", + "views/account_move_line_views.xml", + "views/account_invoice_report_views.xml", ], "installable": True, } diff --git a/account_cost_center/i18n/account_cost_center.pot b/account_cost_center/i18n/account_cost_center.pot deleted file mode 100644 index 0dc2385e7..000000000 --- a/account_cost_center/i18n/account_cost_center.pot +++ /dev/null @@ -1,125 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_cost_center -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.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: account_cost_center -#: model:ir.model,name:account_cost_center.model_account_cost_center -msgid "Account Cost Center" -msgstr "" - -#. module: account_cost_center -#: model_terms:ir.actions.act_window,help:account_cost_center.account_cost_center_action -msgid "Click to add a new cost center." -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__code -msgid "Code" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__company_id -msgid "Company" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_invoice__cost_center_id -#: model:ir.model.fields,field_description:account_cost_center.field_account_invoice_line__cost_center_id -#: model:ir.model.fields,field_description:account_cost_center.field_account_invoice_report__cost_center_id -#: model:ir.model.fields,field_description:account_cost_center.field_account_move_line__cost_center_id -#: model_terms:ir.ui.view,arch_db:account_cost_center.view_account_invoice_report_search -msgid "Cost Center" -msgstr "" - -#. module: account_cost_center -#: model:ir.actions.act_window,name:account_cost_center.account_cost_center_action -#: model:ir.ui.menu,name:account_cost_center.cost_center_menu -msgid "Cost Centers" -msgstr "" - -#. module: account_cost_center -#: model_terms:ir.actions.act_window,help:account_cost_center.account_cost_center_action -msgid "Cost centers provide an extra analytic dimension" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__create_uid -msgid "Created by" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__create_date -msgid "Created on" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,help:account_cost_center.field_account_invoice__cost_center_id -msgid "Default Cost Center" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__display_name -msgid "Display Name" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__id -msgid "ID" -msgstr "" - -#. module: account_cost_center -#: model:ir.model,name:account_cost_center.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_cost_center -#: model:ir.model,name:account_cost_center.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - -#. module: account_cost_center -#: model:ir.model,name:account_cost_center.model_account_invoice_report -msgid "Invoices Statistics" -msgstr "" - -#. module: account_cost_center -#: model:ir.model,name:account_cost_center.model_account_move_line -msgid "Journal Item" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center____last_update -msgid "Last Modified on" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__write_uid -msgid "Last Updated by" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__write_date -msgid "Last Updated on" -msgstr "" - -#. module: account_cost_center -#: model_terms:ir.ui.view,arch_db:account_cost_center.account_cost_center_view_search -msgid "Name/Code" -msgstr "" - -#. module: account_cost_center -#: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__name -msgid "Title" -msgstr "" - diff --git a/account_cost_center/i18n/fr.po b/account_cost_center/i18n/fr.po index b94dddf46..ed2a4ce09 100644 --- a/account_cost_center/i18n/fr.po +++ b/account_cost_center/i18n/fr.po @@ -11,25 +11,24 @@ msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-12 03:43+0000\n" -"PO-Revision-Date: 2021-08-04 11:49+0000\n" -"Last-Translator: Pascal GOUHIER \n" +"PO-Revision-Date: 2017-01-12 03:43+0000\n" +"Last-Translator: Zwygart , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.2\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_cost_center #: model:ir.model,name:account_cost_center.model_account_cost_center msgid "Account Cost Center" -msgstr "Centre de Coût" +msgstr "" #. module: account_cost_center #: model_terms:ir.actions.act_window,help:account_cost_center.account_cost_center_action msgid "Click to add a new cost center." -msgstr "Cliquer pour ajouter un Nouveau Centre de Coût." +msgstr "" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__code @@ -48,18 +47,18 @@ msgstr "Société" #: model:ir.model.fields,field_description:account_cost_center.field_account_move_line__cost_center_id #: model_terms:ir.ui.view,arch_db:account_cost_center.view_account_invoice_report_search msgid "Cost Center" -msgstr "Centre de coût" +msgstr "" #. module: account_cost_center #: model:ir.actions.act_window,name:account_cost_center.account_cost_center_action #: model:ir.ui.menu,name:account_cost_center.cost_center_menu msgid "Cost Centers" -msgstr "Centres de Coût" +msgstr "" #. module: account_cost_center #: model_terms:ir.actions.act_window,help:account_cost_center.account_cost_center_action msgid "Cost centers provide an extra analytic dimension" -msgstr "Les centres de coût fournissent une dimension analytique supplémentaire" +msgstr "" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__create_uid diff --git a/account_cost_center/i18n/it.po b/account_cost_center/i18n/it.po index bc7ab5cd9..1de3caba9 100644 --- a/account_cost_center/i18n/it.po +++ b/account_cost_center/i18n/it.po @@ -12,15 +12,14 @@ msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-12 03:43+0000\n" -"PO-Revision-Date: 2021-07-09 15:49+0000\n" -"Last-Translator: Francesco Foresti \n" +"PO-Revision-Date: 2017-01-12 03:43+0000\n" +"Last-Translator: Andrea Cometa , 2017\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_cost_center #: model:ir.model,name:account_cost_center.model_account_cost_center @@ -65,12 +64,12 @@ msgstr "" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__create_uid msgid "Created by" -msgstr "Creato da" +msgstr "Created by" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__create_date msgid "Created on" -msgstr "Creato il" +msgstr "Created on" #. module: account_cost_center #: model:ir.model.fields,help:account_cost_center.field_account_invoice__cost_center_id @@ -116,12 +115,12 @@ msgstr "Ultima modifica il" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__write_uid msgid "Last Updated by" -msgstr "Ultimo Aggiornamento di" +msgstr "Last Updated by" #. module: account_cost_center #: model:ir.model.fields,field_description:account_cost_center.field_account_cost_center__write_date msgid "Last Updated on" -msgstr "Ultimo Aggiornamento il" +msgstr "Last Updated on" #. module: account_cost_center #: model_terms:ir.ui.view,arch_db:account_cost_center.account_cost_center_view_search diff --git a/account_cost_center/models/__init__.py b/account_cost_center/models/__init__.py index c3ff2676c..d473b1c8f 100644 --- a/account_cost_center/models/__init__.py +++ b/account_cost_center/models/__init__.py @@ -1,7 +1,6 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import account_move from . import account_move_line -from . import account_invoice -from . import account_invoice_line from . import account_invoice_report from . import account_cost_center diff --git a/account_cost_center/models/account_cost_center.py b/account_cost_center/models/account_cost_center.py index 21e65da0a..32c27b55b 100644 --- a/account_cost_center/models/account_cost_center.py +++ b/account_cost_center/models/account_cost_center.py @@ -1,4 +1,4 @@ -# Copyright 2015-2019 Onestein () +# Copyright 2015-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -10,6 +10,4 @@ class AccountCostCenter(models.Model): name = fields.Char(string="Title", required=True) code = fields.Char(required=True) - company_id = fields.Many2one( - "res.company", string="Company", default=lambda self: self.env.user.company_id - ) + company_id = fields.Many2one("res.company", default=lambda self: self.env.company) diff --git a/account_cost_center/models/account_invoice.py b/account_cost_center/models/account_invoice.py deleted file mode 100644 index ed614300b..000000000 --- a/account_cost_center/models/account_invoice.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015-2019 Onestein () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo import api, fields, models - - -class AccountInvoice(models.Model): - _inherit = "account.invoice" - - cost_center_id = fields.Many2one( - "account.cost.center", - string="Cost Center", - readonly=True, - states={"draft": [("readonly", False)]}, - help="Default Cost Center", - ) - - @api.model - def line_get_convert(self, line, part): - res = super(AccountInvoice, self).line_get_convert(line, part) - if line.get("cost_center_id"): - res["cost_center_id"] = line["cost_center_id"] - return res - - @api.model - def invoice_line_move_line_get(self): - res = super(AccountInvoice, self).invoice_line_move_line_get() - - for dict_data in res: - invl_id = dict_data.get("invl_id") - line = self.env["account.invoice.line"].browse(invl_id) - if line.cost_center_id: - dict_data["cost_center_id"] = line.cost_center_id.id - - return res diff --git a/account_cost_center/models/account_invoice_line.py b/account_cost_center/models/account_invoice_line.py deleted file mode 100644 index 0c56a13de..000000000 --- a/account_cost_center/models/account_invoice_line.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2015-2019 Onestein () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo import api, fields, models - - -class AccountInvoiceLine(models.Model): - _inherit = "account.invoice.line" - - @api.model - def _default_cost_center(self): - return self.env["account.cost.center"].browse( - self.env.context.get("cost_center_id") - ) - - cost_center_id = fields.Many2one( - "account.cost.center", - string="Cost Center", - index=True, - default=lambda self: self._default_cost_center(), - ) diff --git a/account_cost_center/models/account_invoice_report.py b/account_cost_center/models/account_invoice_report.py index 1b03698bc..1dd9fd246 100644 --- a/account_cost_center/models/account_invoice_report.py +++ b/account_cost_center/models/account_invoice_report.py @@ -1,4 +1,4 @@ -# Copyright 2015-2019 Onestein () +# Copyright 2015-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -7,21 +7,10 @@ from odoo import fields, models class AccountInvoiceReport(models.Model): _inherit = "account.invoice.report" - cost_center_id = fields.Many2one( - "account.cost.center", string="Cost Center", readonly=True - ) + cost_center_id = fields.Many2one("account.cost.center", readonly=True) def _select(self): return ( super(AccountInvoiceReport, self)._select() - + ", sub.cost_center_id as cost_center_id" + + ", line.cost_center_id as cost_center_id" ) - - def _sub_select(self): - return ( - super(AccountInvoiceReport, self)._sub_select() - + ", ail.cost_center_id as cost_center_id" - ) - - def _group_by(self): - return super(AccountInvoiceReport, self)._group_by() + ", ail.cost_center_id" diff --git a/account_cost_center/models/account_move.py b/account_cost_center/models/account_move.py new file mode 100644 index 000000000..cc792c30e --- /dev/null +++ b/account_cost_center/models/account_move.py @@ -0,0 +1,15 @@ +# Copyright 2015-2020 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + cost_center_id = fields.Many2one( + "account.cost.center", + readonly=True, + states={"draft": [("readonly", False)]}, + help="Default Cost Center", + ) diff --git a/account_cost_center/models/account_move_line.py b/account_cost_center/models/account_move_line.py index 950389de4..373f94a47 100644 --- a/account_cost_center/models/account_move_line.py +++ b/account_cost_center/models/account_move_line.py @@ -1,4 +1,4 @@ -# Copyright 2015-2019 Onestein () +# Copyright 2015-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -7,6 +7,4 @@ from odoo import fields, models class AccountMoveLine(models.Model): _inherit = "account.move.line" - cost_center_id = fields.Many2one( - "account.cost.center", index=True, string="Cost Center" - ) + cost_center_id = fields.Many2one("account.cost.center", index=True) diff --git a/account_cost_center/security/account_cost_center_security.xml b/account_cost_center/security/account_cost_center_security.xml index c78fffe16..273ab718d 100644 --- a/account_cost_center/security/account_cost_center_security.xml +++ b/account_cost_center/security/account_cost_center_security.xml @@ -1,18 +1,12 @@ - - - - - Cost center multi company rule - - - ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - + + + Cost center multi company rule + + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + diff --git a/account_cost_center/tests/test_cost_center.py b/account_cost_center/tests/test_cost_center.py index 29c034552..a34252a96 100644 --- a/account_cost_center/tests/test_cost_center.py +++ b/account_cost_center/tests/test_cost_center.py @@ -1,92 +1,98 @@ -# Copyright 2017-2019 Onestein () +# Copyright 2017-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo.tests import common +from odoo.tests import Form, tagged + +from odoo.addons.account.tests.common import AccountTestInvoicingCommon -class TestAccountCostCenter(common.TransactionCase): - def setUp(self): - super(TestAccountCostCenter, self).setUp() - - acc_rec = self.env.ref("account.data_account_type_receivable") - acc_exp = self.env.ref("account.data_account_type_expenses") - self.invoice_account = ( - self.env["account.account"] - .search([("user_type_id", "=", acc_rec.id)], limit=1) - .id - ) - self.invoice_line_account = ( - self.env["account.account"] - .search([("user_type_id", "=", acc_exp.id)], limit=1) - .id - ) - - self.invoice1 = self.env["account.invoice"].create( +@tagged("post_install", "-at_install") +class TestAccountCostCenter(AccountTestInvoicingCommon): + @classmethod + def setUpClass(cls, chart_template_ref=None): + super().setUpClass(chart_template_ref=chart_template_ref) + cls.expenses_account = cls.env["account.account"].create( { - "partner_id": self.env.ref("base.res_partner_2").id, - "account_id": self.invoice_account, - "type": "in_invoice", + "user_type_id": cls.env.ref("account.data_account_type_expenses").id, + "code": "EXPTEST", + "name": "Test expense account", } ) - self.line1 = self.env["account.invoice.line"].create( - { - "product_id": self.env.ref("product.product_product_2").id, - "quantity": 1.0, - "price_unit": 100.0, - "invoice_id": self.invoice1.id, - "name": "product that cost 100", - "account_id": self.invoice_line_account, - } - ) - - self.costcenter = self.env["account.cost.center"].create( + cls.costcenter = cls.env["account.cost.center"].create( { "name": "Cost Center Test", "code": "CC1", - "company_id": self.env.user.company_id.id, + "company_id": cls.env.company.id, } ) - self.invoice2 = self.env["account.invoice"].create( - { - "partner_id": self.env.ref("base.res_partner_2").id, - "account_id": self.invoice_account, - "type": "in_invoice", - "cost_center_id": self.costcenter.id, - } - ) + # Invoice created with tests Form + cls.invoice1 = cls.init_invoice("in_invoice") - self.line2 = ( - self.env["account.invoice.line"] - .with_context(cost_center_id=self.costcenter.id) + # Invoice created with standard create + cls.invoice2 = ( + cls.env["account.move"] + .with_context(cost_center_id=cls.costcenter.id) .create( { - "product_id": self.env.ref("product.product_product_4").id, - "quantity": 1.0, - "price_unit": 130.0, - "invoice_id": self.invoice2.id, - "name": "product that cost 130", - "account_id": self.invoice_line_account, + "partner_id": cls.env.ref("base.res_partner_2").id, + "move_type": "in_invoice", + "cost_center_id": cls.costcenter.id, } ) ) + cls.invoice2.invoice_line_ids += cls.env["account.move.line"].new( + { + "product_id": cls.env.ref("product.product_product_4").id, + "quantity": 1.0, + "price_unit": 130.0, + "name": "product that cost 130", + "cost_center_id": cls.costcenter.id, + } + ) + def test_01_check_lines(self): self.assertFalse( - self.line1.cost_center_id, "Default cost center per line not set" + self.invoice1.invoice_line_ids.cost_center_id, + "Default cost center per line not set", ) - self.assertTrue( - (self.line2.cost_center_id == self.costcenter), - "Default cost center per line set", + self.assertEqual( + self.invoice2.invoice_line_ids[0].cost_center_id, self.costcenter ) - def test_02_confirm_invoice(self): - self.invoice2.action_invoice_open() - for move in self.invoice2.move_id.line_ids: - cost_center = move.cost_center_id - if move.name == "product that cost 130": - self.assertTrue(cost_center) - else: - self.assertFalse(cost_center) + def test_02_check_lines(self): + invoice_lines = self.invoice1.invoice_line_ids + self.assertFalse(any(line.cost_center_id for line in invoice_lines)) + + invoice_form = Form(self.invoice1) + invoice_form.cost_center_id = self.costcenter + with invoice_form.invoice_line_ids.new() as line: + line.name = "Test line2" + line.quantity = 2.0 + line.price_unit = 200.0 + line.account_id = self.expenses_account + self.invoice1 = invoice_form.save() + + invoice_lines = self.invoice1.invoice_line_ids + self.assertFalse(any(line.cost_center_id for line in invoice_lines)) + self.assertTrue(any(not line.cost_center_id for line in invoice_lines)) + + def test_03_confirm_invoice(self): + invoice_lines = self.invoice2.invoice_line_ids + for move_line in invoice_lines: + self.assertEqual(move_line.cost_center_id, self.costcenter) + for move_line in self.invoice2.line_ids - invoice_lines: + self.assertFalse(move_line.cost_center_id) + + def test_04_search_read(self): + expected_cost_center = self.costcenter + + records = self.env["account.invoice.report"].sudo().search_read([]) + result = records[0].get("cost_center_id") + + self.assertTrue(result) + self.assertEqual(result[0], expected_cost_center.id) + self.assertEqual(result[1], expected_cost_center.name) diff --git a/account_cost_center/views/account_cost_center.xml b/account_cost_center/views/account_cost_center_views.xml similarity index 94% rename from account_cost_center/views/account_cost_center.xml rename to account_cost_center/views/account_cost_center_views.xml index 030be2694..944f0dae6 100644 --- a/account_cost_center/views/account_cost_center.xml +++ b/account_cost_center/views/account_cost_center_views.xml @@ -1,7 +1,6 @@ - - + account.cost.center @@ -33,7 +32,6 @@ - account.cost.center @@ -44,7 +42,6 @@ - account.cost.center @@ -57,12 +54,10 @@ - Cost Centers ir.actions.act_window account.cost.center - form tree,form @@ -75,12 +70,12 @@ - + diff --git a/account_cost_center/views/account_invoice.xml b/account_cost_center/views/account_invoice.xml deleted file mode 100644 index fdd918243..000000000 --- a/account_cost_center/views/account_invoice.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - account.invoice - - - - - - - - - - cost_center_id - - - - - - account.invoice - - - - - - - - - - cost_center_id - - - - - diff --git a/account_cost_center/views/account_invoice_report.xml b/account_cost_center/views/account_invoice_report_views.xml similarity index 99% rename from account_cost_center/views/account_invoice_report.xml rename to account_cost_center/views/account_invoice_report_views.xml index 68f3c3164..19b560195 100644 --- a/account_cost_center/views/account_invoice_report.xml +++ b/account_cost_center/views/account_invoice_report_views.xml @@ -1,6 +1,5 @@ - account.invoice.report @@ -14,5 +13,4 @@ - diff --git a/account_cost_center/views/account_move_line.xml b/account_cost_center/views/account_move_line_views.xml similarity index 99% rename from account_cost_center/views/account_move_line.xml rename to account_cost_center/views/account_move_line_views.xml index ce117e1c8..c56fafff0 100644 --- a/account_cost_center/views/account_move_line.xml +++ b/account_cost_center/views/account_move_line_views.xml @@ -1,6 +1,5 @@ - account.move.line @@ -10,7 +9,6 @@ - account.move.line @@ -21,5 +19,4 @@ - diff --git a/account_cost_center/views/account_move.xml b/account_cost_center/views/account_move_views.xml similarity index 50% rename from account_cost_center/views/account_move.xml rename to account_cost_center/views/account_move_views.xml index 551d5a3d5..a668e797d 100644 --- a/account_cost_center/views/account_move.xml +++ b/account_cost_center/views/account_move_views.xml @@ -1,17 +1,24 @@ - account.move + + + + + + -