[MIG] account_payment_order_return: Migration to 14.0

TT28728
This commit is contained in:
João Marques
2021-03-17 15:01:02 +00:00
committed by almumu
parent b8d720a63b
commit 7d868e066f
8 changed files with 118 additions and 19 deletions

View File

@@ -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 <https://github.com/OCA/bank-payment/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/bank-payment/issues/new?body=module:%20account_payment_order_return%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_order_return%0Aversion:%2014.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.
@@ -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 <https://github.com/OCA/bank-payment/tree/13.0/account_payment_order_return>`_ project on GitHub.
This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/14.0/account_payment_order_return>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -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",

View File

@@ -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"

View File

@@ -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 <ibuioli@gmail.com>\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"

View File

@@ -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 <yld@alliasys.fr>\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"

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! 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/bank-payment/tree/13.0/account_payment_order_return"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_order_return"><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/173/13.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/bank-payment/tree/14.0/account_payment_order_return"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_order_return"><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/173/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-payment/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/bank-payment/issues/new?body=module:%20account_payment_order_return%0Aversion:%2013.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/bank-payment/issues/new?body=module:%20account_payment_order_return%0Aversion:%2014.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">
@@ -438,7 +438,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<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/bank-payment/tree/13.0/account_payment_order_return">OCA/bank-payment</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/14.0/account_payment_order_return">OCA/bank-payment</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>

View File

@@ -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)

View File

@@ -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),