Skip to content
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4ba37c5
[ADD] account_payment_promissory_note: Module that adds a due date on…
CarlosRoca13 Sep 21, 2020
991ad28
[FIX+IMP] account_payment_promissory_note: Bug on payments + Unnecesa…
CarlosRoca13 Oct 23, 2020
8c9c67c
[IMP] account_payment_promissory_note: black, isort, prettier
CarlosRoca13 Oct 29, 2020
7efe8eb
[MIG] account_payment_promissory_note: Migration to v13.0
CarlosRoca13 Oct 29, 2020
4fcb0e4
[IMP] account_payment_promissory_note: Changes on due_date
CarlosRoca13 Nov 18, 2020
5eaa2db
account_payment_promissory_note 13.0.1.1.0
OCA-git-bot Mar 19, 2021
17a4d7e
[FIX] account_payment_promissory_note: Due Date not moved to account.…
CarlosRoca13 Sep 29, 2021
e83c1f3
account_payment_promissory_note 13.0.1.1.1
OCA-git-bot Sep 30, 2021
ab9a6d2
[IMP] account_payment_promissory_note: black, isort, prettier
cesar-tecnativa Jul 13, 2022
4878f30
[MIG] account_payment_promissory_note: Migration to 15.0
cesar-tecnativa Jul 13, 2022
ae14c30
[MIG] account_payment_promissory_note: Migration to 15.0
CarlosRoca13 Oct 27, 2022
9006c83
[UPD] Update account_payment_promissory_note.pot
Nov 3, 2022
8f5fe17
[UPD] README.rst
OCA-git-bot Nov 3, 2022
195c545
[MIG] account_payment_promissory_note: Migration to 16.0
oihane Mar 24, 2023
f1512bb
[UPD] Update account_payment_promissory_note.pot
Apr 18, 2023
ac4d02e
[UPD] README.rst
OCA-git-bot Apr 18, 2023
ce4d6fe
Update translation files
weblate Apr 18, 2023
5674d59
Translated using Weblate (Spanish)
Gelo-fl May 17, 2023
376ab73
[UPD] README.rst
OCA-git-bot Sep 3, 2023
21dd828
[FIX] account_payment_promissory_note: Fixed payment test to use corr…
pilarvargas-tecnativa Feb 19, 2024
9910f87
[BOT] post-merge updates
OCA-git-bot Feb 19, 2024
048383c
Added translation using Weblate (Italian)
mymage Feb 21, 2024
6a16dac
Translated using Weblate (Italian)
mymage Feb 21, 2024
7847e81
Translated using Weblate (Italian)
mymage Feb 29, 2024
21a4d0b
Translated using Weblate (Italian)
mymage Mar 14, 2025
7990783
[IMP] account_payment_promissory_note: pre-commit auto fixes
DantePereyra Aug 5, 2025
fc1d1e6
[MIG] account_payment_promissory_note: Migration to 17.0
CarlosRoca13 Jan 21, 2025
96c6ff0
[DON'T MERGE] Dummy change to re-run tests
DantePereyra Oct 13, 2025
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
91 changes: 91 additions & 0 deletions account_payment_promissory_note/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
===============================
Account Payment Promissory Note
===============================

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

.. |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/licence-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%2Faccount--payment-lightgray.png?logo=github
:target: https://github.com/OCA/account-payment/tree/17.0/account_payment_promissory_note
:alt: OCA/account-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-payment-17-0/account-payment-17-0-account_payment_promissory_note
: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/account-payment&target_branch=17.0
:alt: Try me on Runboat

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

This module allows you to set a date due in a payment, as promissory
notes require.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Go to Invoicing > Customers / Vendors > Payments.
2. Create a new one and select the 'Promissory Note' option.
3. Now you can select a date for the due of the promissory note
(Automatically will be selected the lastest due date of the invoices
if any selected).

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/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/account-payment/issues/new?body=module:%20account_payment_promissory_note%0Aversion:%2017.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
-------

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- Sergio Teruel
- Alexandre Díaz
- Carlos Roca
- César A. Sánchez

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/account-payment <https://github.com/OCA/account-payment/tree/17.0/account_payment_promissory_note>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_payment_promissory_note/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
17 changes: 17 additions & 0 deletions account_payment_promissory_note/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Account Payment Promissory Note",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"category": "Invoicing Management",
"website": "https://github.com/OCA/account-payment",
"depends": ["account"],
"data": [
"views/account_payment_view.xml",
"views/account_payment_invoice_view.xml",
],
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_promissory_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: account_payment_promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_form_multi
msgid ""
"<span class=\"text-muted\" attrs=\"{'invisible': [('promissory_note','=', False)]}\">\n"
" Set date due to all payments or empty to select last date due of each partner invoices group\n"
" </span>"
msgstr ""

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__date_due
msgid "Due Date"
msgstr ""

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment
msgid "Payments"
msgstr ""

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_search
msgid "Promissory Note"
msgstr ""

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_promissory_note_mixin
msgid "Promissory Note Mixin"
msgstr ""

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment_register
msgid "Register Payment"
msgstr ""
82 changes: 82 additions & 0 deletions account_payment_promissory_note/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_promissory_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-18 14:51+0000\n"
"PO-Revision-Date: 2023-05-17 11:34+0000\n"
"Last-Translator: gelo joga Rodríguez <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: account_payment_promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_form_multi
msgid ""
"<span class=\"text-muted\" attrs=\"{'invisible': [('promissory_note','=', "
"False)]}\">\n"
" Set date due to all payments or empty to select last "
"date due of each partner invoices group\n"
" </span>"
msgstr ""
"<span class=\"text-muted\" attrs=\"{'invisible': [('promissory_note','=', "
"False)]}\">\n"
" Selecciona una fecha de vencimiento para todos los pagos "
"o dejalo vacío para que se seleccione la última fecha de vencimiento para "
"cada agrupación de facturas de un partner.\n"
" </span>"

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__date_due
msgid "Due Date"
msgstr "Fecha de Vencimiento"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment
msgid "Payments"
msgstr "Pagos"

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_search
msgid "Promissory Note"
msgstr "Pagaré"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_promissory_note_mixin
msgid "Promissory Note Mixin"
msgstr "Mezcla de pagarés"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment_register
msgid "Register Payment"
msgstr "Registrar pago"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última modificación en"

#~ msgid ""
#~ "Contains the logic shared between models which allows to register payments"
#~ msgstr ""
#~ "Contiene la lógica compartida entre los modelos que permiten el registro "
#~ "de pagos"

#~ msgid "Register Payments"
#~ msgstr "Registrar pagos"
61 changes: 61 additions & 0 deletions account_payment_promissory_note/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_promissory_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-03-14 14:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\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 5.10.2\n"

#. module: account_payment_promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_form_multi
msgid ""
"<span class=\"text-muted\" attrs=\"{'invisible': [('promissory_note','=', False)]}\">\n"
" Set date due to all payments or empty to select last date due of each partner invoices group\n"
" </span>"
msgstr ""
"<span class=\"text-muted\" attrs=\"{'invisible': [('promissory_note','=', "
"False)]}\">\n"
" Impostare la data scadenza in tutti i pagamenti o "
"lasciare vuoto per selezionare l'ultima data scadenza di ogni gruppo fatture "
"partner\n"
" </span>"

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__date_due
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__date_due
msgid "Due Date"
msgstr "Scadenza"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment
msgid "Payments"
msgstr "Pagamenti"

#. module: account_payment_promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_payment_register__promissory_note
#: model:ir.model.fields,field_description:account_payment_promissory_note.field_account_promissory_note_mixin__promissory_note
#: model_terms:ir.ui.view,arch_db:account_payment_promissory_note.view_account_payment_search
msgid "Promissory Note"
msgstr "Cambiale"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_promissory_note_mixin
msgid "Promissory Note Mixin"
msgstr "Mixin cambiale"

#. module: account_payment_promissory_note
#: model:ir.model,name:account_payment_promissory_note.model_account_payment_register
msgid "Register Payment"
msgstr "Registra pagamento"
2 changes: 2 additions & 0 deletions account_payment_promissory_note/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import account_abstract_payment
from . import account_payment
20 changes: 20 additions & 0 deletions account_payment_promissory_note/models/account_abstract_payment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2018 Sergio Teruel <[email protected]>
# Copyright 2018 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class AccountAbstractPayment(models.AbstractModel):
_name = "account.promissory.note.mixin"
_description = "Promissory Note Mixin"

promissory_note = fields.Boolean()
date_due = fields.Date(
string="Due Date",
)

@api.onchange("promissory_note")
def _onchange_promissory_note(self):
if not self.promissory_note:
self.date_due = False
32 changes: 32 additions & 0 deletions account_payment_promissory_note/models/account_payment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2018 Sergio Teruel <[email protected]>
# Copyright 2018 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class AccountPayment(models.Model):
_name = "account.payment"
_inherit = ["account.payment", "account.promissory.note.mixin"]

@api.onchange("promissory_note")
def _onchange_promissory_note(self):
result = super()._onchange_promissory_note()
if not self.date_due and self.promissory_note:
invoices = self.reconciled_invoice_ids
same_partner = len(invoices.mapped("partner_id")) == 1
if invoices and same_partner:
self.date_due = max(invoices.mapped("invoice_date_due"))
return result

def write(self, vals):
for payment in self:
lines = payment.move_id.line_ids
if "promissory_note" in vals:
if not vals["promissory_note"]:
lines.date_maturity = vals.get("date", payment.date)
elif "date_due" in vals:
lines.date_maturity = vals["date_due"]
elif payment.promissory_note and "date_due" in vals:
lines.date_maturity = vals["date_due"]
return super().write(vals)
3 changes: 3 additions & 0 deletions account_payment_promissory_note/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions account_payment_promissory_note/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Tecnativa](https://www.tecnativa.com):
- Sergio Teruel
- Alexandre Díaz
- Carlos Roca
- César A. Sánchez
2 changes: 2 additions & 0 deletions account_payment_promissory_note/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows you to set a date due in a payment, as promissory
notes require.
5 changes: 5 additions & 0 deletions account_payment_promissory_note/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Go to Invoicing \> Customers / Vendors \> Payments.
2. Create a new one and select the 'Promissory Note' option.
3. Now you can select a date for the due of the promissory note
(Automatically will be selected the lastest due date of the invoices
if any selected).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading