From 2ae9b8a809c62a21db4655aa9da98d4840bc7d57 Mon Sep 17 00:00:00 2001
From: Carlos Roca
Date: Fri, 22 Jan 2021 12:46:11 +0100
Subject: [PATCH] [MIG] account_payment_purchase: Migration to v14
---
account_payment_purchase/README.rst | 15 +++++------
account_payment_purchase/__manifest__.py | 2 +-
.../i18n/account_payment_purchase.pot | 22 ++++++++++++++--
account_payment_purchase/i18n/fr_FR.po | 25 +++++++++++--------
account_payment_purchase/i18n/sv.po | 17 +++++++------
.../models/account_invoice.py | 4 +--
.../readme/CONTRIBUTORS.rst | 5 ++--
.../static/description/index.html | 11 ++++----
.../tests/test_account_payment_purchase.py | 8 +++---
9 files changed, 68 insertions(+), 41 deletions(-)
diff --git a/account_payment_purchase/README.rst b/account_payment_purchase/README.rst
index 03b8575df..1418325fa 100644
--- a/account_payment_purchase/README.rst
+++ b/account_payment_purchase/README.rst
@@ -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 `_.
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.
@@ -92,8 +92,9 @@ Contributors
* Abraham Anes
* `Tecnativa `_:
- * Pedro M. Baeza
- * Vicent Cubells
+ * Pedro M. Baeza
+ * Vicent Cubells
+ * Carlos Roca
* Nikul Chaudhary
* Miquel Raïch
@@ -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 `_ 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_purchase/__manifest__.py b/account_payment_purchase/__manifest__.py
index 090741a04..7fbadc487 100644
--- a/account_payment_purchase/__manifest__.py
+++ b/account_payment_purchase/__manifest__.py
@@ -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",
diff --git a/account_payment_purchase/i18n/account_payment_purchase.pot b/account_payment_purchase/i18n/account_payment_purchase.pot
index 0cda87a5c..a466db856 100644
--- a/account_payment_purchase/i18n/account_payment_purchase.pot
+++ b/account_payment_purchase/i18n/account_payment_purchase.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,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
diff --git a/account_payment_purchase/i18n/fr_FR.po b/account_payment_purchase/i18n/fr_FR.po
index ed1bfdb7e..8cf3339bf 100644
--- a/account_payment_purchase/i18n/fr_FR.po
+++ b/account_payment_purchase/i18n/fr_FR.po
@@ -8,25 +8,26 @@ msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-21 01:10+0000\n"
-"PO-Revision-Date: 2016-04-06 00:16+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: French (France) (http://www.transifex.com/oca/OCA-bank-"
-"payment-8-0/language/fr_FR/)\n"
+"PO-Revision-Date: 2021-02-12 18:45+0000\n"
+"Last-Translator: Yves Le Doeuff \n"
+"Language-Team: French (France) (http://www.transifex.com/oca/"
+"OCA-bank-payment-8-0/language/fr_FR/)\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"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_account_move
msgid "Journal Entries"
-msgstr ""
+msgstr "Écritures comptabilisées + non-comptabilisées"
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__payment_mode_id
msgid "Payment Mode"
-msgstr ""
+msgstr "Mode de règlement"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
@@ -40,26 +41,30 @@ msgid ""
"the payment. This field is copied from the partner and will be copied to the "
"supplier invoice."
msgstr ""
+"Sélectionnez le compte bancaire de votre fournisseur sur lequel votre "
+"société pourra envoyer le paiement. Cette information est reprise de la "
+"fiche partenaire et copiée sur la facture fournisseur."
#. module: account_payment_purchase
#: code:addons/account_payment_purchase/models/account_invoice.py:0
#, python-format
msgid "Selected purchase order have different payment mode."
msgstr ""
+"Les commandes d'achat sélectionnées ont des modes de paiement différents."
#. module: account_payment_purchase
#: code:addons/account_payment_purchase/models/account_invoice.py:0
#, python-format
msgid "Selected purchase order have different supplier bank."
-msgstr ""
+msgstr "Les commandes d'achat sélectionnées ont des banques différentes."
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__supplier_partner_bank_id
msgid "Supplier Bank Account"
-msgstr ""
+msgstr "Compte bancaire fournisseur"
#. module: account_payment_purchase
#: code:addons/account_payment_purchase/models/account_invoice.py:0
#, python-format
msgid "Warning"
-msgstr ""
+msgstr "Attention"
diff --git a/account_payment_purchase/i18n/sv.po b/account_payment_purchase/i18n/sv.po
index 32b0335db..e7ff200fd 100644
--- a/account_payment_purchase/i18n/sv.po
+++ b/account_payment_purchase/i18n/sv.po
@@ -9,29 +9,30 @@ msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-17 02:46+0000\n"
-"PO-Revision-Date: 2017-05-17 02:46+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
+"PO-Revision-Date: 2021-11-17 13:36+0000\n"
+"Last-Translator: Simon S \n"
"Language-Team: Swedish (https://www.transifex.com/oca/teams/23907/sv/)\n"
"Language: sv\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"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_account_move
msgid "Journal Entries"
-msgstr ""
+msgstr "Verifikat"
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__payment_mode_id
msgid "Payment Mode"
-msgstr ""
+msgstr "Betalningssätt"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
-msgstr ""
+msgstr "Inköpsorder"
#. module: account_payment_purchase
#: model:ir.model.fields,help:account_payment_purchase.field_purchase_order__supplier_partner_bank_id
@@ -56,13 +57,13 @@ msgstr ""
#. module: account_payment_purchase
#: model:ir.model.fields,field_description:account_payment_purchase.field_purchase_order__supplier_partner_bank_id
msgid "Supplier Bank Account"
-msgstr ""
+msgstr "Leverantörens bankkonto"
#. module: account_payment_purchase
#: code:addons/account_payment_purchase/models/account_invoice.py:0
#, python-format
msgid "Warning"
-msgstr ""
+msgstr "Varning"
#~ msgid "Invoice"
#~ msgstr "Faktura"
diff --git a/account_payment_purchase/models/account_invoice.py b/account_payment_purchase/models/account_invoice.py
index 9b4b4a4c4..6b0432006 100644
--- a/account_payment_purchase/models/account_invoice.py
+++ b/account_payment_purchase/models/account_invoice.py
@@ -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
diff --git a/account_payment_purchase/readme/CONTRIBUTORS.rst b/account_payment_purchase/readme/CONTRIBUTORS.rst
index 2cecd6336..9a2efc631 100644
--- a/account_payment_purchase/readme/CONTRIBUTORS.rst
+++ b/account_payment_purchase/readme/CONTRIBUTORS.rst
@@ -5,8 +5,9 @@
* Abraham Anes
* `Tecnativa `_:
- * Pedro M. Baeza
- * Vicent Cubells
+ * Pedro M. Baeza
+ * Vicent Cubells
+ * Carlos Roca
* Nikul Chaudhary
* Miquel Raïch
diff --git a/account_payment_purchase/static/description/index.html b/account_payment_purchase/static/description/index.html
index fd81d2242..5db43ee37 100644
--- a/account_payment_purchase/static/description/index.html
+++ b/account_payment_purchase/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 2 fields on purchase orders: Bank Account and Payment
Mode. These fields are copied from partner to purchase order and then from
purchase order to supplier invoice.
@@ -414,7 +414,7 @@ Invoices without any payment mode are displayed too.
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.
@@ -435,8 +435,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Raphaël Valyi
Abraham Anes <abraham@studio73.es>
Tecnativa:
Nikul Chaudhary <nikulchaudhary2112@gmail.com>
@@ -451,7 +452,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_purchase/tests/test_account_payment_purchase.py b/account_payment_purchase/tests/test_account_payment_purchase.py
index 46d0f57b9..474634546 100644
--- a/account_payment_purchase/tests/test_account_payment_purchase.py
+++ b/account_payment_purchase/tests/test_account_payment_purchase.py
@@ -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()