From 7d868e066fca84dae5c499be1e5e322c9d3a0dd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Marques?=
Date: Wed, 17 Mar 2021 15:01:02 +0000
Subject: [PATCH] [MIG] account_payment_order_return: Migration to 14.0
TT28728
---
account_payment_order_return/README.rst | 10 ++---
account_payment_order_return/__manifest__.py | 2 +-
.../i18n/account_payment_order_return.pot | 17 +++++++-
account_payment_order_return/i18n/es_AR.po | 42 +++++++++++++++++++
account_payment_order_return/i18n/fr_FR.po | 42 +++++++++++++++++++
.../static/description/index.html | 6 +--
.../test_account_payment_order_return.py | 16 +++----
.../wizards/account_payment_line_create.py | 2 +-
8 files changed, 118 insertions(+), 19 deletions(-)
create mode 100644 account_payment_order_return/i18n/es_AR.po
create mode 100644 account_payment_order_return/i18n/fr_FR.po
diff --git a/account_payment_order_return/README.rst b/account_payment_order_return/README.rst
index 2efdd62ab..9fab6b5e9 100644
--- a/account_payment_order_return/README.rst
+++ b/account_payment_order_return/README.rst
@@ -14,13 +14,13 @@ Account Payment Order Return
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github
- :target: https://github.com/OCA/bank-payment/tree/13.0/account_payment_order_return
+ :target: https://github.com/OCA/bank-payment/tree/14.0/account_payment_order_return
:alt: OCA/bank-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_order_return
+ :target: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order_return
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/173/13.0
+ :target: https://runbot.odoo-community.org/runbot/173/14.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.
@@ -94,6 +94,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/bank-payment `_ project on GitHub.
+This module is part of the `OCA/bank-payment `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_payment_order_return/__manifest__.py b/account_payment_order_return/__manifest__.py
index b2dc1d29c..678e6c24f 100644
--- a/account_payment_order_return/__manifest__.py
+++ b/account_payment_order_return/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Payment Order Return",
- "version": "13.0.1.0.1",
+ "version": "14.0.1.0.0",
"category": "Banking addons",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
diff --git a/account_payment_order_return/i18n/account_payment_order_return.pot b/account_payment_order_return/i18n/account_payment_order_return.pot
index e887c6a65..986952f3f 100644
--- a/account_payment_order_return/i18n/account_payment_order_return.pot
+++ b/account_payment_order_return/i18n/account_payment_order_return.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -13,11 +13,26 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__id
+msgid "ID"
+msgstr ""
+
#. module: account_payment_order_return
#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__include_returned
msgid "Include move lines from returns"
msgstr ""
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: account_payment_order_return
#: model:ir.model,name:account_payment_order_return.model_account_payment_line_create
msgid "Wizard to create payment lines"
diff --git a/account_payment_order_return/i18n/es_AR.po b/account_payment_order_return/i18n/es_AR.po
new file mode 100644
index 000000000..b6bc55ead
--- /dev/null
+++ b/account_payment_order_return/i18n/es_AR.po
@@ -0,0 +1,42 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_payment_order_return
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2021-04-01 03:48+0000\n"
+"Last-Translator: Ignacio Buioli \n"
+"Language-Team: none\n"
+"Language: es_AR\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"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__display_name
+msgid "Display Name"
+msgstr "Mostrar Nombre"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__id
+msgid "ID"
+msgstr "ID"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__include_returned
+msgid "Include move lines from returns"
+msgstr "Incluir líneas de movimiento de devoluciones"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create____last_update
+msgid "Last Modified on"
+msgstr "Última modificación en"
+
+#. module: account_payment_order_return
+#: model:ir.model,name:account_payment_order_return.model_account_payment_line_create
+msgid "Wizard to create payment lines"
+msgstr "Asistente para crear líneas de pago"
diff --git a/account_payment_order_return/i18n/fr_FR.po b/account_payment_order_return/i18n/fr_FR.po
new file mode 100644
index 000000000..8ed2cf9c3
--- /dev/null
+++ b/account_payment_order_return/i18n/fr_FR.po
@@ -0,0 +1,42 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_payment_order_return
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2021-04-10 16:46+0000\n"
+"Last-Translator: Yves Le Doeuff \n"
+"Language-Team: none\n"
+"Language: fr_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"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__id
+msgid "ID"
+msgstr ""
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create__include_returned
+msgid "Include move lines from returns"
+msgstr "Inclure les lignes d'écritures des retours"
+
+#. module: account_payment_order_return
+#: model:ir.model.fields,field_description:account_payment_order_return.field_account_payment_line_create____last_update
+msgid "Last Modified on"
+msgstr "Dernière modification"
+
+#. module: account_payment_order_return
+#: model:ir.model,name:account_payment_order_return.model_account_payment_line_create
+msgid "Wizard to create payment lines"
+msgstr "Assistant pour créer des lignes de paiement"
diff --git a/account_payment_order_return/static/description/index.html b/account_payment_order_return/static/description/index.html
index 9d9bfe4c5..113a9f6b9 100644
--- a/account_payment_order_return/static/description/index.html
+++ b/account_payment_order_return/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module adds a check in the wizard where move lines are imported into
payment order.
This check lets include in selection lines from invoices linked to a
@@ -408,7 +408,7 @@ wizard.
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.
@@ -438,7 +438,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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/bank-payment project on GitHub.
+
This module is part of the OCA/bank-payment project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_payment_order_return/tests/test_account_payment_order_return.py b/account_payment_order_return/tests/test_account_payment_order_return.py
index 722af7fdd..abc9c88ec 100644
--- a/account_payment_order_return/tests/test_account_payment_order_return.py
+++ b/account_payment_order_return/tests/test_account_payment_order_return.py
@@ -28,7 +28,7 @@ class TestAccountPaymentOrderReturn(common.SavepointCase):
)
move_form = Form(
cls.env["account.move"].with_context(
- default_type="out_invoice", default_journal_id=cls.sale_journal.id
+ default_move_type="out_invoice", default_journal_id=cls.sale_journal.id
)
)
move_form.partner_id = cls.partner
@@ -83,21 +83,21 @@ class TestAccountPaymentOrderReturn(common.SavepointCase):
}
)
wizard.populate()
- self.assertEquals(len(wizard.move_line_ids), 1)
- payment = Form(
- self.env["account.payment"].with_context(
+ self.assertEqual(len(wizard.move_line_ids), 1)
+ payment_register = Form(
+ self.env["account.payment.register"].with_context(
active_model="account.move", active_ids=self.invoice.ids
)
)
- self.payment = payment.save()
- self.payment.post()
+ self.payment = payment_register.save()._create_payments()
+ self.payment.action_post()
wizard.populate()
# Create payment return
payment_return_form = Form(self.env["payment.return"])
payment_return_form.journal_id = self.bank_journal
with payment_return_form.line_ids.new() as line_form:
line_form.move_line_ids.add(
- self.payment.move_line_ids.filtered(
+ self.payment.move_id.line_ids.filtered(
lambda x: x.account_id.internal_type == "receivable"
)
)
@@ -105,4 +105,4 @@ class TestAccountPaymentOrderReturn(common.SavepointCase):
self.payment_return.action_confirm()
wizard.include_returned = False
wizard.populate()
- self.assertEquals(len(wizard.move_line_ids), 0)
+ self.assertEqual(len(wizard.move_line_ids), 0)
diff --git a/account_payment_order_return/wizards/account_payment_line_create.py b/account_payment_order_return/wizards/account_payment_line_create.py
index d8fa00944..a70c84cac 100644
--- a/account_payment_order_return/wizards/account_payment_line_create.py
+++ b/account_payment_order_return/wizards/account_payment_line_create.py
@@ -11,7 +11,7 @@ class AccountPaymentLineCreate(models.TransientModel):
include_returned = fields.Boolean(string="Include move lines from returns")
def _prepare_move_line_domain(self):
- domain = super(AccountPaymentLineCreate, self)._prepare_move_line_domain()
+ domain = super()._prepare_move_line_domain()
if not self.include_returned:
domain += [
("move_id.returned_payment", "=", False),