[MIG] account_payment_purchase: Migration to v14

This commit is contained in:
Carlos Roca
2021-01-22 12:46:11 +01:00
committed by David Ramia
parent feb6b55e9f
commit ab2736c56a
7 changed files with 44 additions and 23 deletions

View File

@@ -14,13 +14,13 @@ Account Payment Purchase
: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_purchase
:target: https://github.com/OCA/bank-payment/tree/14.0/account_payment_purchase
: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_purchase
:target: https://translation.odoo-community.org/projects/bank-payment-14-0/bank-payment-14-0-account_payment_purchase
: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|
@@ -69,7 +69,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_purchase%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_purchase%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.
@@ -92,8 +92,9 @@ Contributors
* Abraham Anes <abraham@studio73.es>
* `Tecnativa <https://www.tecnativa.com>`_:
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
* Pedro M. Baeza
* Vicent Cubells
* Carlos Roca
* Nikul Chaudhary <nikulchaudhary2112@gmail.com>
* Miquel Raïch <miquel.raich@forgeflow.com>
@@ -112,6 +113,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_purchase>`_ project on GitHub.
This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/14.0/account_payment_purchase>`_ 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 Purchase",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Adds Bank Account and Payment Mode on Purchase Orders",

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,9 +13,27 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_account_move__display_name
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__display_name
msgid "Display Name"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_account_move__id
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__id
msgid "ID"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_account_move
msgid "Journal Entries"
msgid "Journal Entry"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_account_move____last_update
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order____last_update
msgid "Last Modified on"
msgstr ""
#. module: account_payment_purchase

View File

@@ -20,11 +20,11 @@ class AccountMove(models.Model):
}
return res
self.payment_mode_id = new_mode
if self.invoice_partner_bank_id and self.invoice_partner_bank_id.id != new_bank:
if self.partner_bank_id and self.partner_bank_id.id != new_bank:
res["warning"] = {
"title": _("Warning"),
"message": _("Selected purchase order have different supplier bank."),
}
return res
self.invoice_partner_bank_id = new_bank
self.partner_bank_id = new_bank
return res

View File

@@ -5,8 +5,9 @@
* Abraham Anes <abraham@studio73.es>
* `Tecnativa <https://www.tecnativa.com>`_:
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
* Pedro M. Baeza
* Vicent Cubells
* Carlos Roca
* Nikul Chaudhary <nikulchaudhary2112@gmail.com>
* Miquel Raïch <miquel.raich@forgeflow.com>

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_purchase"><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_purchase"><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_purchase"><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_purchase"><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 2 fields on purchase orders: <em>Bank Account</em> and <em>Payment
Mode</em>. These fields are copied from partner to purchase order and then from
purchase order to supplier invoice.</p>
@@ -414,7 +414,7 @@ Invoices without any payment mode are displayed too.</p>
<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_purchase%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_purchase%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">
@@ -435,8 +435,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Raphaël Valyi</li>
<li>Abraham Anes &lt;<a class="reference external" href="mailto:abraham&#64;studio73.es">abraham&#64;studio73.es</a>&gt;</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Pedro M. Baeza &lt;<a class="reference external" href="mailto:pedro.baeza&#64;tecnativa.com">pedro.baeza&#64;tecnativa.com</a>&gt;</li>
<li>Vicent Cubells &lt;<a class="reference external" href="mailto:vicent.cubells&#64;tecnativa.com">vicent.cubells&#64;tecnativa.com</a>&gt;</li>
<li>Pedro M. Baeza</li>
<li>Vicent Cubells</li>
<li>Carlos Roca</li>
</ul>
</li>
<li>Nikul Chaudhary &lt;<a class="reference external" href="mailto:nikulchaudhary2112&#64;gmail.com">nikulchaudhary2112&#64;gmail.com</a>&gt;</li>
@@ -451,7 +452,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_purchase">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_purchase">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

@@ -78,7 +78,7 @@ class TestAccountPaymentPurchase(SavepointCase):
self.purchase.button_confirm()
invoice = self.env["account.move"].create(
{"partner_id": self.partner.id, "type": "in_invoice"}
{"partner_id": self.partner.id, "move_type": "in_invoice"}
)
with Form(invoice) as inv:
inv.purchase_id = self.purchase
@@ -93,7 +93,7 @@ class TestAccountPaymentPurchase(SavepointCase):
self.purchase.button_confirm()
invoice = self.env["account.move"].create(
{"partner_id": self.partner.id, "type": "in_invoice"}
{"partner_id": self.partner.id, "move_type": "in_invoice"}
)
invoice.purchase_id = self.purchase
invoice._onchange_purchase_auto_complete()
@@ -118,11 +118,11 @@ class TestAccountPaymentPurchase(SavepointCase):
self.purchase.button_confirm()
invoice = self.env["account.move"].create(
{"partner_id": self.partner.id, "type": "in_invoice"}
{"partner_id": self.partner.id, "move_type": "in_invoice"}
)
invoice.purchase_id = self.purchase
invoice._onchange_purchase_auto_complete()
self.assertEqual(invoice.invoice_partner_bank_id, self.bank)
self.assertEqual(invoice.partner_bank_id, self.bank)
purchase2 = self.purchase.copy()
purchase2.supplier_partner_bank_id = self.bank2
purchase2.button_confirm()