From afc02cdecc1499a5ab9e25cfd0d1244fb450b923 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 22 Apr 2021 14:57:02 +0200 Subject: [PATCH] [MIG] account_invoice_report_grouped_by_picking_sale_mrp to 13.0 --- .../README.rst | 11 ++++++----- .../__manifest__.py | 4 ++-- ...unt_invoice_report_grouped_by_picking_sale_mrp.pot | 11 +++++------ .../i18n/es.po | 6 ------ .../models/__init__.py | 2 +- .../models/{account_invoice.py => account_move.py} | 2 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 ++++--- .../tests/test_report_grouped_sale_mrp.py | 10 ++++------ 9 files changed, 24 insertions(+), 30 deletions(-) rename account_invoice_report_grouped_by_picking_sale_mrp/models/{account_invoice.py => account_move.py} (95%) diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/README.rst b/account_invoice_report_grouped_by_picking_sale_mrp/README.rst index f995e8c30..e4df16c43 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/README.rst +++ b/account_invoice_report_grouped_by_picking_sale_mrp/README.rst @@ -14,13 +14,13 @@ Account Invoice Grouped by Picking - Sale MRP :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github - :target: https://github.com/OCA/account-invoice-reporting/tree/12.0/account_invoice_report_grouped_by_picking_sale_mrp + :target: https://github.com/OCA/account-invoice-reporting/tree/13.0/account_invoice_report_grouped_by_picking_sale_mrp :alt: OCA/account-invoice-reporting .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-invoice-reporting-12-0/account-invoice-reporting-12-0-account_invoice_report_grouped_by_picking_sale_mrp + :target: https://translation.odoo-community.org/projects/account-invoice-reporting-13-0/account-invoice-reporting-13-0-account_invoice_report_grouped_by_picking_sale_mrp :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/94/12.0 + :target: https://runbot.odoo-community.org/runbot/94/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -58,7 +58,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -76,6 +76,7 @@ Contributors * `Tecnativa `__: * Ernesto Tejeda + * David Vidal Maintainers ~~~~~~~~~~~ @@ -90,6 +91,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/account-invoice-reporting `_ project on GitHub. +This module is part of the `OCA/account-invoice-reporting `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/__manifest__.py b/account_invoice_report_grouped_by_picking_sale_mrp/__manifest__.py index 793e72a5b..5e0f296ff 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/__manifest__.py +++ b/account_invoice_report_grouped_by_picking_sale_mrp/__manifest__.py @@ -4,10 +4,10 @@ { "name": "Account Invoice Grouped by Picking - Sale MRP", "summary": "Take into account BoM kits in invoice report " "grouped by picking", - "version": "12.0.1.0.2", + "version": "13.0.1.0.0", "category": "Accounting & Finance", "website": "https://github.com/OCA/account-invoice-reporting", - "author": "Tecnativa, " "Odoo Community Association (OCA)", + "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "depends": ["sale_mrp", "account_invoice_report_grouped_by_picking"], } diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/i18n/account_invoice_report_grouped_by_picking_sale_mrp.pot b/account_invoice_report_grouped_by_picking_sale_mrp/i18n/account_invoice_report_grouped_by_picking_sale_mrp.pot index 436d56c82..0368f6907 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/i18n/account_invoice_report_grouped_by_picking_sale_mrp.pot +++ b/account_invoice_report_grouped_by_picking_sale_mrp/i18n/account_invoice_report_grouped_by_picking_sale_mrp.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_invoice_report_grouped_by_picking_sale_mrp +# * account_invoice_report_grouped_by_picking_sale_mrp # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,6 @@ msgstr "" "Plural-Forms: \n" #. module: account_invoice_report_grouped_by_picking_sale_mrp -#: model:ir.model,name:account_invoice_report_grouped_by_picking_sale_mrp.model_account_invoice -msgid "Invoice" +#: model:ir.model,name:account_invoice_report_grouped_by_picking_sale_mrp.model_account_move +msgid "Journal Entries" msgstr "" - diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po b/account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po index 30bc7692f..4dec47bcf 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po +++ b/account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po @@ -21,9 +21,3 @@ msgstr "" #: model:ir.model,name:account_invoice_report_grouped_by_picking_sale_mrp.model_account_invoice msgid "Invoice" msgstr "Factura" - -#~ msgid "Bill of Material" -#~ msgstr "Lista de materiales" - -#~ msgid "Components Total Qty" -#~ msgstr "Cantidad total de componentes" diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/models/__init__.py b/account_invoice_report_grouped_by_picking_sale_mrp/models/__init__.py index 3a3cf6bb9..0c439503c 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/models/__init__.py +++ b/account_invoice_report_grouped_by_picking_sale_mrp/models/__init__.py @@ -1,3 +1,3 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from . import account_invoice +from . import account_move diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/models/account_invoice.py b/account_invoice_report_grouped_by_picking_sale_mrp/models/account_move.py similarity index 95% rename from account_invoice_report_grouped_by_picking_sale_mrp/models/account_invoice.py rename to account_invoice_report_grouped_by_picking_sale_mrp/models/account_move.py index 1457434d1..38142daa9 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/models/account_invoice.py +++ b/account_invoice_report_grouped_by_picking_sale_mrp/models/account_move.py @@ -5,7 +5,7 @@ class AccountInvoice(models.Model): - _inherit = "account.invoice" + _inherit = "account.move" def _get_signed_quantity_done(self, invoice_line, move, sign): res = super()._get_signed_quantity_done(invoice_line, move, sign) diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/readme/CONTRIBUTORS.rst b/account_invoice_report_grouped_by_picking_sale_mrp/readme/CONTRIBUTORS.rst index c31a3c109..a9a081d44 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/readme/CONTRIBUTORS.rst +++ b/account_invoice_report_grouped_by_picking_sale_mrp/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * `Tecnativa `__: * Ernesto Tejeda + * David Vidal diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/static/description/index.html b/account_invoice_report_grouped_by_picking_sale_mrp/static/description/index.html index 7b74fb411..9dfb7f520 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/static/description/index.html +++ b/account_invoice_report_grouped_by_picking_sale_mrp/static/description/index.html @@ -367,7 +367,7 @@

Account Invoice Grouped by Picking - Sale MRP

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-invoice-reporting Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/account-invoice-reporting Translate me on Weblate Try me on Runbot

This module extends the functionality of ‘Account Invoice Grouped by Picking’ module to allow you to to print correctly invoices with picking info when there are mrp kits in them.

@@ -408,7 +408,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -424,6 +424,7 @@

Contributors

@@ -435,7 +436,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/account-invoice-reporting project on GitHub.

+

This module is part of the OCA/account-invoice-reporting project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_invoice_report_grouped_by_picking_sale_mrp/tests/test_report_grouped_sale_mrp.py b/account_invoice_report_grouped_by_picking_sale_mrp/tests/test_report_grouped_sale_mrp.py index 6a94bdbc2..7087214cf 100644 --- a/account_invoice_report_grouped_by_picking_sale_mrp/tests/test_report_grouped_sale_mrp.py +++ b/account_invoice_report_grouped_by_picking_sale_mrp/tests/test_report_grouped_sale_mrp.py @@ -87,17 +87,15 @@ def test_account_invoice_group_picking(self): picking_2.action_confirm() picking_2.mapped("move_lines").write({"quantity_done": 1}) picking_2.action_done() - # invoice the sales order - invoice_id = self.sale_order.action_invoice_create() # Test directly grouping method - invoice = self.env["account.invoice"].browse(invoice_id) - groups = invoice.lines_grouped_by_picking() + move = self.sale_order._create_invoices() + groups = move.lines_grouped_by_picking() self.assertEqual(len(groups), 2) self.assertDictEqual( groups[0], - {"line": invoice.invoice_line_ids, "picking": picking_1, "quantity": 2.0}, + {"line": move.invoice_line_ids, "picking": picking_1, "quantity": 2.0}, ) self.assertDictEqual( groups[1], - {"line": invoice.invoice_line_ids, "picking": picking_2, "quantity": 1.0}, + {"line": move.invoice_line_ids, "picking": picking_2, "quantity": 1.0}, )