Skip to content

Commit

Permalink
[MIG] account_invoice_report_grouped_by_picking_sale_mrp to 13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chienandalu authored and pedrobaeza committed Aug 10, 2023
1 parent ba6b837 commit afc02cd
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 30 deletions.
11 changes: 6 additions & 5 deletions account_invoice_report_grouped_by_picking_sale_mrp/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -58,7 +58,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/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 <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_grouped_by_picking_sale_mrp%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_grouped_by_picking_sale_mrp%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand All @@ -76,6 +76,7 @@ Contributors
* `Tecnativa <https://www.tecnativa.com>`__:

* Ernesto Tejeda
* David Vidal

Maintainers
~~~~~~~~~~~
Expand All @@ -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 <https://github.com/OCA/account-invoice-reporting/tree/12.0/account_invoice_report_grouped_by_picking_sale_mrp>`_ project on GitHub.
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/13.0/account_invoice_report_grouped_by_picking_sale_mrp>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# 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"
"Content-Transfer-Encoding: \n"
"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 ""

6 changes: 0 additions & 6 deletions account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_invoice
from . import account_move
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* Ernesto Tejeda
* David Vidal
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Account Invoice Grouped by Picking - Sale MRP</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/tree/12.0/account_invoice_report_grouped_by_picking_sale_mrp"><img alt="OCA/account-invoice-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-invoice-reporting-12-0/account-invoice-reporting-12-0-account_invoice_report_grouped_by_picking_sale_mrp"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/94/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/tree/13.0/account_invoice_report_grouped_by_picking_sale_mrp"><img alt="OCA/account-invoice-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-invoice-reporting-13-0/account-invoice-reporting-13-0-account_invoice_report_grouped_by_picking_sale_mrp"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/94/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
Expand Down Expand Up @@ -408,7 +408,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_grouped_by_picking_sale_mrp%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_grouped_by_picking_sale_mrp%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -424,6 +424,7 @@ <h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Ernesto Tejeda</li>
<li>David Vidal</li>
</ul>
</li>
</ul>
Expand All @@ -435,7 +436,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/tree/12.0/account_invoice_report_grouped_by_picking_sale_mrp">OCA/account-invoice-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoice-reporting/tree/13.0/account_invoice_report_grouped_by_picking_sale_mrp">OCA/account-invoice-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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},
)

0 comments on commit afc02cd

Please sign in to comment.