From d4b2eadf17ba56bfe6de4f8797be9e04bd6b9bdc Mon Sep 17 00:00:00 2001
From: manu
Date: Tue, 5 Apr 2022 11:17:25 +0200
Subject: [PATCH] [MIG]account_payment_sale: Migration to 15.0
---
account_payment_sale/README.rst | 11 +++++-----
account_payment_sale/__manifest__.py | 2 +-
.../i18n/account_payment_sale.pot | 20 +------------------
account_payment_sale/i18n/ca.po | 15 +++++++-------
account_payment_sale/i18n/es.po | 8 ++++----
account_payment_sale/readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 7 ++++---
account_payment_sale/tests/__init__.py | 1 -
account_payment_sale/tests/common.py | 5 +++--
account_payment_sale/tests/test_sale_order.py | 2 +-
.../views/sale_report_templates.xml | 10 ++++++++--
11 files changed, 36 insertions(+), 46 deletions(-)
diff --git a/account_payment_sale/README.rst b/account_payment_sale/README.rst
index 435bb23cd..3371c898c 100644
--- a/account_payment_sale/README.rst
+++ b/account_payment_sale/README.rst
@@ -14,13 +14,13 @@ Account Payment Sale
: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/14.0/account_payment_sale
+ :target: https://github.com/OCA/bank-payment/tree/15.0/account_payment_sale
: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-14-0/bank-payment-14-0-account_payment_sale
+ :target: https://translation.odoo-community.org/projects/bank-payment-15-0/bank-payment-15-0-account_payment_sale
: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/14.0
+ :target: https://runbot.odoo-community.org/runbot/173/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -47,7 +47,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.
@@ -69,6 +69,7 @@ Contributors
* Danimar Ribeiro
* Raphaël Valyi
* Raf Ven
+* Manuel Regidor
Maintainers
~~~~~~~~~~~
@@ -83,6 +84,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_sale/__manifest__.py b/account_payment_sale/__manifest__.py
index 775aae7f0..ea20463a6 100644
--- a/account_payment_sale/__manifest__.py
+++ b/account_payment_sale/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Payment Sale",
- "version": "14.0.1.0.0",
+ "version": "15.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Adds payment mode on sale orders",
diff --git a/account_payment_sale/i18n/account_payment_sale.pot b/account_payment_sale/i18n/account_payment_sale.pot
index ae2c55844..b6bc3c59b 100644
--- a/account_payment_sale/i18n/account_payment_sale.pot
+++ b/account_payment_sale/i18n/account_payment_sale.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -18,24 +18,6 @@ msgstr ""
msgid "Payment Mode:"
msgstr ""
-#. module: account_payment_sale
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv__display_name
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__display_name
-msgid "Display Name"
-msgstr ""
-
-#. module: account_payment_sale
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv__id
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__id
-msgid "ID"
-msgstr ""
-
-#. module: account_payment_sale
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv____last_update
-#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order____last_update
-msgid "Last Modified on"
-msgstr ""
-
#. module: account_payment_sale
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__payment_mode_id
msgid "Payment Mode"
diff --git a/account_payment_sale/i18n/ca.po b/account_payment_sale/i18n/ca.po
index 647d677cb..78e24d1de 100644
--- a/account_payment_sale/i18n/ca.po
+++ b/account_payment_sale/i18n/ca.po
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: bank-payment (10.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-18 00:42+0000\n"
-"PO-Revision-Date: 2019-10-07 09:24+0000\n"
-"Last-Translator: Jaume Planas \n"
+"PO-Revision-Date: 2022-04-13 10:05+0000\n"
+"Last-Translator: Noel estudillo \n"
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-bank-payment-10-0/"
"language/ca/)\n"
"Language: ca\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.8\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: account_payment_sale
#: model_terms:ir.ui.view,arch_db:account_payment_sale.report_sale_payment_mode
@@ -28,19 +28,19 @@ msgstr "Mode de pagament:"
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv__display_name
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Nom de visualització"
#. module: account_payment_sale
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv__id
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: account_payment_sale
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_advance_payment_inv____last_update
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Última modificació el"
#. module: account_payment_sale
#: model:ir.model.fields,field_description:account_payment_sale.field_sale_order__payment_mode_id
@@ -54,6 +54,5 @@ msgstr "Factura d'avançament de venda"
#. module: account_payment_sale
#: model:ir.model,name:account_payment_sale.model_sale_order
-#, fuzzy
msgid "Sales Order"
-msgstr "Comanda"
+msgstr "Comanda de venda"
diff --git a/account_payment_sale/i18n/es.po b/account_payment_sale/i18n/es.po
index 0fe29a625..09df33aae 100644
--- a/account_payment_sale/i18n/es.po
+++ b/account_payment_sale/i18n/es.po
@@ -9,15 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-02 03:43+0000\n"
-"PO-Revision-Date: 2022-02-02 14:33+0000\n"
-"Last-Translator: Olga Marco Puértolas \n"
+"PO-Revision-Date: 2018-07-13 09:23+0000\n"
+"Last-Translator: Enric Tobella \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\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"
+"X-Generator: Weblate 3.0.1\n"
#. module: account_payment_sale
#: model_terms:ir.ui.view,arch_db:account_payment_sale.report_sale_payment_mode
@@ -42,7 +42,7 @@ msgstr "Ventas. Anticipo pago factura"
#. module: account_payment_sale
#: model:ir.model,name:account_payment_sale.model_sale_order
msgid "Sales Order"
-msgstr "Órdenes de venta"
+msgstr ""
#~ msgid "Quotation"
#~ msgstr "Presupuesto"
diff --git a/account_payment_sale/readme/CONTRIBUTORS.rst b/account_payment_sale/readme/CONTRIBUTORS.rst
index 66e1e8090..408931b06 100644
--- a/account_payment_sale/readme/CONTRIBUTORS.rst
+++ b/account_payment_sale/readme/CONTRIBUTORS.rst
@@ -4,3 +4,4 @@
* Danimar Ribeiro
* Raphaël Valyi
* Raf Ven
+* Manuel Regidor
diff --git a/account_payment_sale/static/description/index.html b/account_payment_sale/static/description/index.html
index 952aff84c..80157fc74 100644
--- a/account_payment_sale/static/description/index.html
+++ b/account_payment_sale/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 modules adds one field on sale orders: Payment Mode.
This field is copied from customer to sale order and then from sale order to
customer invoice.
@@ -395,7 +395,7 @@ This default value can be changed sale orders or on draft invoices.
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.
@@ -425,7 +426,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_sale/tests/__init__.py b/account_payment_sale/tests/__init__.py
index 55d111022..6f699d0d8 100644
--- a/account_payment_sale/tests/__init__.py
+++ b/account_payment_sale/tests/__init__.py
@@ -1,2 +1 @@
-from . import common
from . import test_sale_order
diff --git a/account_payment_sale/tests/common.py b/account_payment_sale/tests/common.py
index 3164e8b06..a2d6ae887 100644
--- a/account_payment_sale/tests/common.py
+++ b/account_payment_sale/tests/common.py
@@ -1,13 +1,14 @@
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo.tests.common import SavepointCase
+from odoo.tests.common import TransactionCase
-class CommonTestCase(SavepointCase):
+class CommonTestCase(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
+ cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
cls.bank = cls.env["res.partner.bank"].create(
{"acc_number": "test", "partner_id": cls.env.user.company_id.partner_id.id}
diff --git a/account_payment_sale/tests/test_sale_order.py b/account_payment_sale/tests/test_sale_order.py
index 10be023e0..a2c5e994b 100644
--- a/account_payment_sale/tests/test_sale_order.py
+++ b/account_payment_sale/tests/test_sale_order.py
@@ -91,7 +91,7 @@ class TestSaleOrder(CommonTestCase):
"product_id": self.env.ref("sale.advance_product_0").id,
}
)
- payment.with_context(context).create_invoices()
+ payment.with_context(**context).create_invoices()
invoice = order.invoice_ids
self.assertEqual(len(invoice), 1)
self.assertEqual(invoice.payment_mode_id, self.payment_mode_2)
diff --git a/account_payment_sale/views/sale_report_templates.xml b/account_payment_sale/views/sale_report_templates.xml
index 1122770c8..d9e2f8271 100644
--- a/account_payment_sale/views/sale_report_templates.xml
+++ b/account_payment_sale/views/sale_report_templates.xml
@@ -1,8 +1,14 @@
-
-
+
+
Payment Mode: