Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
75c6a5f
contract_payment_mode module
Oct 14, 2015
6467dfe
contract_payment_mode: Several fixes+imps:
antespi Jan 27, 2016
9821081
contract_payment_mode: get bank account from partner (#30)
jabibi Apr 25, 2016
ce0be17
OCA Transbot updated translations from Transifex
oca-transbot Nov 8, 2015
891da07
contract_payment_mode: Migration to 9.0
cubells Mar 28, 2017
6447891
OCA Transbot updated translations from Transifex
oca-transbot May 1, 2017
42cf636
[MIG] contract_payment_mode: Migration to 10.0
chienandalu May 25, 2017
1314c32
OCA Transbot updated translations from Transifex
oca-transbot Jun 17, 2017
9234c73
[IMP] contract_payment_mode: Onchange payment mode vals
carlosdauden Aug 4, 2017
54ccdd8
OCA Transbot updated translations from Transifex
oca-transbot Aug 19, 2017
570d226
[FIX] contract_payment_auto: Fix freze wkhtmltopdf freezed
moylop260 Nov 10, 2017
8c36dd7
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
4a45702
[MIG] contract_payment_mode: Migration to 11.0
cubells May 17, 2018
f3c4caa
[UPD] Update contract_payment_mode.pot
oca-travis Jun 21, 2018
1c14b45
[MIG] Contract Payment Mode to 12.0
ThomasBinsfeld Dec 18, 2018
15ae1dc
Fix unit test
sbejaoui Sep 30, 2019
37f1206
Update translation files
oca-transbot Oct 1, 2019
595eba0
Translated using Weblate (Catalan)
albertpons Oct 9, 2019
b948433
Translated using Weblate (Portuguese (Brazil))
britoederr Oct 10, 2019
04ede7f
Translated using Weblate (Chinese (Simplified))
liweijie0812 Oct 16, 2019
735f312
Translated using Weblate (German)
rschnapka Oct 29, 2019
ad14668
Translated using Weblate (Portuguese)
pedrocs-exo Feb 17, 2020
4950754
<!--Supplier--FORM view-->
vinclar Feb 14, 2020
0b9ed4c
[IMP] contract_payment_mode: black, isort, prettier
Oct 21, 2020
e90c717
[MIG] contract_payment_mode: Migration to 13.0
Oct 21, 2020
eca0dd8
[14.0][MIG] Migarted contract_payment_mode module.
Ammar-OSI Apr 15, 2021
7ad447f
[15.0][MIG] contract_payment_mode: Migration to 15.0
palkesh-aktivsoftware Mar 28, 2022
c4bb525
[FIX] contract_mode: fix payment_mode_id domain on supplier form
marcelsavegnago Jan 2, 2023
bb983ce
[FIX] contract_payment_mode: set default payment mode by contract type
marcelsavegnago Feb 1, 2023
b93c0e4
[MIG] contract_payment_mode: Migration to 16.0
carolinafernandez-tecnativa Oct 3, 2023
8e08706
Update translation files
weblate Oct 10, 2023
3dd32f6
Translated using Weblate (Spanish)
Ivorra78 Oct 10, 2023
b124f2b
Translated using Weblate (Dutch)
ThijsvOers Apr 2, 2024
a6cc07f
Translated using Weblate (Italian)
mymage May 6, 2024
790be6b
Translated using Weblate (Croatian)
badbole Jun 17, 2024
1d2b29c
[IMP] contract_payment_mode: pre-commit auto fixes
Tisho99 Aug 11, 2024
e553014
[MIG] contract_payment_mode: Migration to 17.0
Tisho99 Aug 11, 2024
2417f6c
[MIG] contract_payment_mode: Migration to 18.0
AndreuOForgeFlow Mar 17, 2025
a978386
Added translation using Weblate (Swedish)
jakobkrabbe Jul 4, 2025
c75fe6d
Translated using Weblate (French)
qtheuret Jan 4, 2026
212d33c
Translated using Weblate (Slovenian)
sysadminmatmoz Jun 7, 2026
3c32538
[IMP] contract_payment_mode: auto fixes
carlos-lopez-tecnativa Jul 13, 2026
5c15b8d
[MIG] contract_payment_mode: Migration to version 19.0
carlos-lopez-tecnativa Jul 20, 2026
98f1478
Merge PR #1489 into 19.0
OCA-git-bot Jul 23, 2026
281bfc6
[UPD] Update contract_payment_mode.pot
Jul 23, 2026
d1761ba
[BOT] post-merge updates
OCA-git-bot Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[contract](contract/) | 19.0.1.0.2 | | Recurring - Contracts Management
[contract_analytic_tag](contract_analytic_tag/) | 19.0.1.0.0 | <a href='https://github.com/victoralmau'><img src='https://github.com/victoralmau.png' width='32' height='32' style='border-radius:50%;' alt='victoralmau'/></a> | Contract Analytic Tag
[contract_payment_mode](contract_payment_mode/) | 19.0.1.0.0 | | Payment mode in contracts and their invoices
[contract_sale](contract_sale/) | 19.0.1.0.0 | | Contract from Sale
[contract_update_last_date_invoiced](contract_update_last_date_invoiced/) | 19.0.1.0.0 | <a href='https://github.com/rafaelbn'><img src='https://github.com/rafaelbn.png' width='32' height='32' style='border-radius:50%;' alt='rafaelbn'/></a> <a href='https://github.com/Andrii9090'><img src='https://github.com/Andrii9090.png' width='32' height='32' style='border-radius:50%;' alt='Andrii9090'/></a> | This module allows to update the last date invoiced if invoices are deleted.
[contract_variable_quantity](contract_variable_quantity/) | 19.0.1.0.0 | | Variable quantity in contract recurrent invoicing
Expand Down
112 changes: 112 additions & 0 deletions contract_payment_mode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Contract Payment Mode
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:262b19d899fda352913b0e46be81b4cfc4de906b9beee21d72ea675d4cfc0107
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
: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/19.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-19-0/contract-19-0-contract_payment_mode
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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

**Table of contents**

.. contents::
:local:

Configuration
=============

Your user should be a Sales Manager or Accountant.

Usage
=====

1. Go to *Invoicing > Customers > Customer Contracts*.
2. Create one.
3. Select a partner to which invoice.
4. If the partner has a payment mode, this payment mode is selected
here.
5. If not, or if you want another payment mode, you can change it in the
corresponding field.
6. Add a product to invoice.
7. If you create an invoice, new invoice will have the selected payment
mode.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract_payment_mode%0Aversion:%2019.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.

Credits
=======

Authors
-------

* Domatix
* Tecnativa

Contributors
------------

- Ángel Moya <angel.moya@domatix.com>
- Antonio Espinosa <antonioea@antiun.com>
- Vicent Cubells <vicent.cubells@tecnativa.com>
- David Vidal <david.vidal@tecnativa.com>
- Carlos Dauden <carlos.dauden@tecnativa.com>
- Guillermo Llinares <guillermo@studio73.es>
- Amamr Officewala <aofficewala@opensourceintegrators.com>
- Carolina Fernandez <carolina.fernandez@tecnativa.com>
- David Jaen david.jaen.revert@gmail.com
- Alberto Martínez <alberto.martinez@sygel.es>
- Harald Panten <harald.panten@sygel.es>
- Valentin Vinagre <valentin.vinagre@sygel.es>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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 <https://github.com/OCA/contract/tree/19.0/contract_payment_mode>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions contract_payment_mode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
from .hooks import pre_init_hook
24 changes: 24 additions & 0 deletions contract_payment_mode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2015 Domatix (<www.domatix.com>)
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2017 Tecnativa - Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2017-2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# Copyright (C) 2021 Open Source Integrators
# Copyright 2023 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Contract Payment Mode",
"summary": "Payment mode in contracts and their invoices",
"version": "19.0.1.0.0",
"author": "Domatix, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/contract",
"depends": ["contract", "account_payment_mode"],
"external_dependencies": {"python": ["openupgradelib"]},
"category": "Sales Management",
"license": "AGPL-3",
"pre_init_hook": "pre_init_hook",
"data": ["views/contract_view.xml"],
"installable": True,
"auto_install": True,
}
34 changes: 34 additions & 0 deletions contract_payment_mode/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2026 Tecnativa - Carlos Lopez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


def pre_init_hook(env):
"""Create and prefill payment_mode_id before stored compute runs."""
openupgrade.add_columns(
env,
[
(
"contract.contract",
"payment_mode_id",
"many2one",
None,
"contract_contract",
)
],
)
openupgrade.logged_query(
env.cr,
"""
UPDATE contract_contract AS c
SET payment_mode_id = CASE
WHEN c.contract_type = 'purchase' THEN
(rp.supplier_payment_mode_id ->> c.company_id::text)::int
ELSE (rp.customer_payment_mode_id ->> c.company_id::text)::int
END
FROM res_partner rp
WHERE rp.id = c.partner_id AND c.payment_mode_id IS NULL
""",
)
34 changes: 34 additions & 0 deletions contract_payment_mode/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Marc Tormo i Bochaca <mtbochaca@gmail.com>, 2017
msgid ""
msgstr ""
"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"
"Last-Translator: Albert Pons <a.pons@escaner.ad>\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\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 3.8\n"

#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_contract_contract
msgid "Contract"
msgstr "Contracte"

#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id
msgid "Payment Mode"
msgstr "Forma de pagament"

#~ msgid "Analytic Account"
#~ msgstr "Compte analític"
34 changes: 34 additions & 0 deletions contract_payment_mode/i18n/contract_payment_mode.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_contract_contract
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__payment_mode_id
msgid "Payment Mode"
msgstr ""
33 changes: 33 additions & 0 deletions contract_payment_mode/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"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"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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 3.8\n"

#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_contract_contract
msgid "Contract"
msgstr "Vertrag"

#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id
msgid "Payment Mode"
msgstr "Zahlweise"

#~ msgid "Analytic Account"
#~ msgstr "Kostenstelle"
32 changes: 32 additions & 0 deletions contract_payment_mode/i18n/el_GR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
msgid ""
msgstr ""
"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"
"Last-Translator: <>\n"
"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-contract-8-0/"
"language/el_GR/)\n"
"Language: el_GR\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"

#. module: contract_payment_mode
#: model:ir.model,name:contract_payment_mode.model_contract_contract
msgid "Contract"
msgstr ""

#. module: contract_payment_mode
#: model:ir.model.fields,field_description:contract_payment_mode.field_contract_contract__payment_mode_id
msgid "Payment Mode"
msgstr ""

#~ msgid "Analytic Account"
#~ msgstr "Αναλυτικός Λογαριασμός"
33 changes: 33 additions & 0 deletions contract_payment_mode/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"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: 2023-10-10 22:58+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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.17\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__payment_mode_id
msgid "Payment Mode"
msgstr "Modo de pago"

#~ msgid "Analytic Account"
#~ msgstr "Cuenta analítica"
27 changes: 27 additions & 0 deletions contract_payment_mode/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * contract_payment_mode
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-09-05 07:07+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: 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__payment_mode_id
msgid "Payment Mode"
msgstr "Método de Pago"
Loading