From 640e947e6eb3e07fd252f41bcf8ff4a61de10f18 Mon Sep 17 00:00:00 2001 From: Palkesh Date: Mon, 28 Mar 2022 17:09:55 +0530 Subject: [PATCH] [15.0][MIG] contract_payment_mode: Migration to 15.0 --- contract_payment_mode/README.rst | 10 ++--- contract_payment_mode/__manifest__.py | 2 +- contract_payment_mode/hooks.py | 21 +++++----- contract_payment_mode/i18n/ca.po | 2 +- .../i18n/contract_payment_mode.pot | 17 +------- contract_payment_mode/i18n/de.po | 2 +- contract_payment_mode/i18n/el_GR.po | 2 +- contract_payment_mode/i18n/es.po | 2 +- contract_payment_mode/i18n/es_AR.po | 42 ------------------- contract_payment_mode/i18n/es_MX.po | 2 +- contract_payment_mode/i18n/fi.po | 2 +- contract_payment_mode/i18n/fr.po | 2 +- contract_payment_mode/i18n/gl.po | 2 +- contract_payment_mode/i18n/hi_IN.po | 2 +- contract_payment_mode/i18n/hr.po | 2 +- contract_payment_mode/i18n/hr_HR.po | 2 +- contract_payment_mode/i18n/hu.po | 2 +- contract_payment_mode/i18n/it.po | 11 +++-- contract_payment_mode/i18n/nl.po | 2 +- contract_payment_mode/i18n/pt.po | 2 +- contract_payment_mode/i18n/pt_BR.po | 2 +- contract_payment_mode/i18n/pt_PT.po | 2 +- contract_payment_mode/i18n/ro.po | 2 +- contract_payment_mode/i18n/ru.po | 2 +- contract_payment_mode/i18n/sk_SK.po | 2 +- contract_payment_mode/i18n/sl.po | 2 +- contract_payment_mode/i18n/tr.po | 2 +- contract_payment_mode/i18n/tr_TR.po | 2 +- contract_payment_mode/i18n/zh_CN.po | 2 +- .../static/description/index.html | 6 +-- .../tests/test_contract_payment.py | 27 +++++++++++- contract_payment_mode/views/contract_view.xml | 18 ++++---- 32 files changed, 81 insertions(+), 119 deletions(-) delete mode 100644 contract_payment_mode/i18n/es_AR.po diff --git a/contract_payment_mode/README.rst b/contract_payment_mode/README.rst index 2c61168f6..190926f23 100644 --- a/contract_payment_mode/README.rst +++ b/contract_payment_mode/README.rst @@ -14,13 +14,13 @@ Contract Payment Mode :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github - :target: https://github.com/OCA/contract/tree/14.0/contract_payment_mode + :target: https://github.com/OCA/contract/tree/15.0/contract_payment_mode :alt: OCA/contract .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/contract-14-0/contract-14-0-contract_payment_mode + :target: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract_payment_mode :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/110/14.0 + :target: https://runbot.odoo-community.org/runbot/110/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -57,7 +57,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/contract `_ project on GitHub. +This module is part of the `OCA/contract `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/contract_payment_mode/__manifest__.py b/contract_payment_mode/__manifest__.py index 50963dff3..0e76e5dc7 100644 --- a/contract_payment_mode/__manifest__.py +++ b/contract_payment_mode/__manifest__.py @@ -9,7 +9,7 @@ { "name": "Contract Payment Mode", "summary": "Payment mode in contracts and their invoices", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "author": "Domatix, " "Tecnativa, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/contract", "depends": ["contract", "account_payment_partner"], diff --git a/contract_payment_mode/hooks.py b/contract_payment_mode/hooks.py index 6d556f31f..1a2e46cda 100644 --- a/contract_payment_mode/hooks.py +++ b/contract_payment_mode/hooks.py @@ -10,14 +10,13 @@ _logger = logging.getLogger(__name__) def post_init_hook(cr, registry): """Copy payment mode from partner to the new field at contract.""" - with api.Environment.manage(): - env = api.Environment(cr, SUPERUSER_ID, {}) - m_contract = env["contract.contract"] - contracts = m_contract.search([("payment_mode_id", "=", False)]) - if contracts: - _logger.info("Setting payment mode: %d contracts" % len(contracts)) - for contract in contracts: - payment_mode = contract.partner_id.customer_payment_mode_id - if payment_mode: - contract.payment_mode_id = payment_mode.id - _logger.info("Setting payment mode: Done") + env = api.Environment(cr, SUPERUSER_ID, {}) + m_contract = env["contract.contract"] + contracts = m_contract.search([("payment_mode_id", "=", False)]) + if contracts: + _logger.info("Setting payment mode: %d contracts" % len(contracts)) + for contract in contracts: + payment_mode = contract.partner_id.customer_payment_mode_id + if payment_mode: + contract.payment_mode_id = payment_mode.id + _logger.info("Setting payment mode: Done") diff --git a/contract_payment_mode/i18n/ca.po b/contract_payment_mode/i18n/ca.po index 0412f7693..b58dfd90a 100644 --- a/contract_payment_mode/i18n/ca.po +++ b/contract_payment_mode/i18n/ca.po @@ -7,7 +7,7 @@ # Marc Tormo i Bochaca , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2019-10-09 18:37+0000\n" diff --git a/contract_payment_mode/i18n/contract_payment_mode.pot b/contract_payment_mode/i18n/contract_payment_mode.pot index c716972d1..2ce771729 100644 --- a/contract_payment_mode/i18n/contract_payment_mode.pot +++ b/contract_payment_mode/i18n/contract_payment_mode.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,21 +18,6 @@ msgstr "" msgid "Contract" msgstr "" -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__display_name -msgid "Display Name" -msgstr "" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__id -msgid "ID" -msgstr "" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract____last_update -msgid "Last Modified on" -msgstr "" - #. module: contract_payment_mode #: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id msgid "Payment Mode" diff --git a/contract_payment_mode/i18n/de.po b/contract_payment_mode/i18n/de.po index b7913aadd..06e49425c 100644 --- a/contract_payment_mode/i18n/de.po +++ b/contract_payment_mode/i18n/de.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2019-10-29 21:33+0000\n" diff --git a/contract_payment_mode/i18n/el_GR.po b/contract_payment_mode/i18n/el_GR.po index 201430d12..617fb23e3 100644 --- a/contract_payment_mode/i18n/el_GR.po +++ b/contract_payment_mode/i18n/el_GR.po @@ -5,7 +5,7 @@ # Translators: msgid "" msgstr "" -"Project-Id-Version: contract (8.0)\n" +"Project-Id-Version: contract (15.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2015-11-07 12:33+0000\n" diff --git a/contract_payment_mode/i18n/es.po b/contract_payment_mode/i18n/es.po index 13ffa4fd6..a0333da9c 100644 --- a/contract_payment_mode/i18n/es.po +++ b/contract_payment_mode/i18n/es.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/es_AR.po b/contract_payment_mode/i18n/es_AR.po deleted file mode 100644 index 8bbaab82e..000000000 --- a/contract_payment_mode/i18n/es_AR.po +++ /dev/null @@ -1,42 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * contract_payment_mode -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-02-06 20:59+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: contract_payment_mode -#: model:ir.model,name:contract_payment_mode.model_contract_contract -msgid "Contract" -msgstr "Contrato" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__display_name -msgid "Display Name" -msgstr "Mostrar Nombre" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__id -msgid "ID" -msgstr "ID" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract____last_update -msgid "Last Modified on" -msgstr "Última Modificación el" - -#. module: contract_payment_mode -#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id -msgid "Payment Mode" -msgstr "Modo de Pago" diff --git a/contract_payment_mode/i18n/es_MX.po b/contract_payment_mode/i18n/es_MX.po index edbb26e47..98da9b71d 100644 --- a/contract_payment_mode/i18n/es_MX.po +++ b/contract_payment_mode/i18n/es_MX.po @@ -5,7 +5,7 @@ # Translators: msgid "" msgstr "" -"Project-Id-Version: contract (8.0)\n" +"Project-Id-Version: contract (15.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2015-11-07 12:33+0000\n" diff --git a/contract_payment_mode/i18n/fi.po b/contract_payment_mode/i18n/fi.po index ce6a451ef..0b81986a7 100644 --- a/contract_payment_mode/i18n/fi.po +++ b/contract_payment_mode/i18n/fi.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/fr.po b/contract_payment_mode/i18n/fr.po index f8a07990e..2163b69c1 100644 --- a/contract_payment_mode/i18n/fr.po +++ b/contract_payment_mode/i18n/fr.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/gl.po b/contract_payment_mode/i18n/gl.po index 0c890c880..e4b37eb67 100644 --- a/contract_payment_mode/i18n/gl.po +++ b/contract_payment_mode/i18n/gl.po @@ -7,7 +7,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/hi_IN.po b/contract_payment_mode/i18n/hi_IN.po index f1682073d..db28ac217 100644 --- a/contract_payment_mode/i18n/hi_IN.po +++ b/contract_payment_mode/i18n/hi_IN.po @@ -6,7 +6,7 @@ # Ashish Deshmukh , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-08-17 01:05+0000\n" diff --git a/contract_payment_mode/i18n/hr.po b/contract_payment_mode/i18n/hr.po index 1f0db2322..7ecc8520c 100644 --- a/contract_payment_mode/i18n/hr.po +++ b/contract_payment_mode/i18n/hr.po @@ -7,7 +7,7 @@ # Bole , 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2018-02-10 03:15+0000\n" diff --git a/contract_payment_mode/i18n/hr_HR.po b/contract_payment_mode/i18n/hr_HR.po index 86a81bdbc..8c5f48ae4 100644 --- a/contract_payment_mode/i18n/hr_HR.po +++ b/contract_payment_mode/i18n/hr_HR.po @@ -7,7 +7,7 @@ # Bole , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-06-17 01:39+0000\n" diff --git a/contract_payment_mode/i18n/hu.po b/contract_payment_mode/i18n/hu.po index 15ef2ba49..73dab1d5e 100644 --- a/contract_payment_mode/i18n/hu.po +++ b/contract_payment_mode/i18n/hu.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/it.po b/contract_payment_mode/i18n/it.po index 901a6cf8e..e9219c2f5 100644 --- a/contract_payment_mode/i18n/it.po +++ b/contract_payment_mode/i18n/it.po @@ -7,23 +7,22 @@ # Stefano , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" -"PO-Revision-Date: 2022-03-27 00:17+0000\n" -"Last-Translator: Andrea Cometa \n" +"PO-Revision-Date: 2017-04-01 02:46+0000\n" +"Last-Translator: Stefano , 2017\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: contract_payment_mode #: model:ir.model,name:contract_payment_mode.model_contract_contract msgid "Contract" -msgstr "Contratto" +msgstr "" #. module: contract_payment_mode #: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id diff --git a/contract_payment_mode/i18n/nl.po b/contract_payment_mode/i18n/nl.po index 7dae37b55..52cdcc618 100644 --- a/contract_payment_mode/i18n/nl.po +++ b/contract_payment_mode/i18n/nl.po @@ -7,7 +7,7 @@ # Erwin van der Ploeg , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/pt.po b/contract_payment_mode/i18n/pt.po index eb65eff9a..dc1829c42 100644 --- a/contract_payment_mode/i18n/pt.po +++ b/contract_payment_mode/i18n/pt.po @@ -7,7 +7,7 @@ # Pedro Castro Silva , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2020-02-17 19:13+0000\n" diff --git a/contract_payment_mode/i18n/pt_BR.po b/contract_payment_mode/i18n/pt_BR.po index 71b3388ea..114674476 100644 --- a/contract_payment_mode/i18n/pt_BR.po +++ b/contract_payment_mode/i18n/pt_BR.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2019-10-10 20:36+0000\n" diff --git a/contract_payment_mode/i18n/pt_PT.po b/contract_payment_mode/i18n/pt_PT.po index d3e35d7ac..31eee89f8 100644 --- a/contract_payment_mode/i18n/pt_PT.po +++ b/contract_payment_mode/i18n/pt_PT.po @@ -6,7 +6,7 @@ # Daniel Reis , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/ro.po b/contract_payment_mode/i18n/ro.po index 8c7611bed..cc8d6f67f 100644 --- a/contract_payment_mode/i18n/ro.po +++ b/contract_payment_mode/i18n/ro.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/ru.po b/contract_payment_mode/i18n/ru.po index 4ef0aa1c7..3706ffa95 100644 --- a/contract_payment_mode/i18n/ru.po +++ b/contract_payment_mode/i18n/ru.po @@ -6,7 +6,7 @@ # nek, 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2018-03-17 03:26+0000\n" diff --git a/contract_payment_mode/i18n/sk_SK.po b/contract_payment_mode/i18n/sk_SK.po index 94109307f..d823b4780 100644 --- a/contract_payment_mode/i18n/sk_SK.po +++ b/contract_payment_mode/i18n/sk_SK.po @@ -5,7 +5,7 @@ # Translators: msgid "" msgstr "" -"Project-Id-Version: contract (8.0)\n" +"Project-Id-Version: contract (15.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2015-11-07 12:33+0000\n" diff --git a/contract_payment_mode/i18n/sl.po b/contract_payment_mode/i18n/sl.po index 3f48db116..deb601ad2 100644 --- a/contract_payment_mode/i18n/sl.po +++ b/contract_payment_mode/i18n/sl.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-04-01 02:46+0000\n" diff --git a/contract_payment_mode/i18n/tr.po b/contract_payment_mode/i18n/tr.po index 0a0d2878c..d12912ed6 100644 --- a/contract_payment_mode/i18n/tr.po +++ b/contract_payment_mode/i18n/tr.po @@ -6,7 +6,7 @@ # Ediz Duman , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-06-13 02:40+0000\n" diff --git a/contract_payment_mode/i18n/tr_TR.po b/contract_payment_mode/i18n/tr_TR.po index a9e79939c..491e1d069 100644 --- a/contract_payment_mode/i18n/tr_TR.po +++ b/contract_payment_mode/i18n/tr_TR.po @@ -6,7 +6,7 @@ # Ediz Duman , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2017-06-13 02:40+0000\n" diff --git a/contract_payment_mode/i18n/zh_CN.po b/contract_payment_mode/i18n/zh_CN.po index 30b5acc40..898d8a569 100644 --- a/contract_payment_mode/i18n/zh_CN.po +++ b/contract_payment_mode/i18n/zh_CN.po @@ -6,7 +6,7 @@ # ITGeeker , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 15.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-29 10:30+0000\n" "PO-Revision-Date: 2019-10-16 18:31+0000\n" diff --git a/contract_payment_mode/static/description/index.html b/contract_payment_mode/static/description/index.html index dadda4b5e..25e4e1e7b 100644 --- a/contract_payment_mode/static/description/index.html +++ b/contract_payment_mode/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

This module allows to set a payment mode on contract for creating the invoices with this payment mode.

Table of contents

@@ -407,7 +407,7 @@ corresponding field.

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/contract project on GitHub.

+

This module is part of the OCA/contract project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/contract_payment_mode/tests/test_contract_payment.py b/contract_payment_mode/tests/test_contract_payment.py index c714b0ffe..100b3dad9 100644 --- a/contract_payment_mode/tests/test_contract_payment.py +++ b/contract_payment_mode/tests/test_contract_payment.py @@ -3,9 +3,13 @@ # Copyright 2017 Tecnativa - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from unittest.mock import patch + import odoo.tests from odoo.tests import tagged +from odoo.addons.account.models.account_payment_method import AccountPaymentMethod + from ..hooks import post_init_hook @@ -14,9 +18,28 @@ class TestContractPaymentInit(odoo.tests.HttpCase): def setUp(self): super().setUp() - self.payment_method = self.env["account.payment.method"].create( - {"name": "Test Payment Method", "code": "Test", "payment_type": "inbound"} + Method_get_payment_method_information = ( + AccountPaymentMethod._get_payment_method_information ) + + def _get_payment_method_information(self): + res = Method_get_payment_method_information(self) + res["Test"] = {"mode": "multi", "domain": [("type", "=", "bank")]} + return res + + with patch.object( + AccountPaymentMethod, + "_get_payment_method_information", + _get_payment_method_information, + ): + self.payment_method = self.env["account.payment.method"].create( + { + "name": "Test Payment Method", + "code": "Test", + "payment_type": "inbound", + } + ) + self.payment_mode = self.env["account.payment.mode"].create( { "name": "Test payment mode", diff --git a/contract_payment_mode/views/contract_view.xml b/contract_payment_mode/views/contract_view.xml index 028fb4b1b..223bf181d 100644 --- a/contract_payment_mode/views/contract_view.xml +++ b/contract_payment_mode/views/contract_view.xml @@ -2,9 +2,8 @@ - contract.contract form view (in contract_payment_mode) + contract.contract form view (in contract_payment_mode) + contract.contract @@ -15,9 +14,8 @@ - contract.contract tree view (in contract_payment_mode) + contract.contract tree view (in contract_payment_mode) + contract.contract @@ -28,9 +26,8 @@ - contract.contract search view (in contract_payment_mode) + contract.contract search view (in contract_payment_mode) + contract.contract @@ -43,7 +40,8 @@ contract.contract supplier form view (in contract_payment_mode) + >contract.contract supplier form view (in contract_payment_mode) + contract.contract 18