Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
133 changes: 133 additions & 0 deletions account_supplier_early_payment_discount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============================
Supplier Early Payment Discount
===============================

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

.. |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%2Faccount--payment-lightgray.png?logo=github
:target: https://github.com/OCA/account-payment/tree/19.0/account_supplier_early_payment_discount
: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-19-0/account-payment-19-0-account_supplier_early_payment_discount
: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=19.0
:alt: Try me on Runboat

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

Suppliers often grant a discount when their bills are paid within a few
days, and many of them settle it with a credit note of their own that
reaches the company weeks later, if ever. This module keeps that
discount on the supplier and on its bills, takes it when the bill is
paid in time, and follows up the credit note the supplier owes.

- **Early payment terms on the supplier**: up to two chained discounts,
the days to pay within, and whether they count from the invoice date
or from the receipt of the goods.
- **On the vendor bill**: the last day to pay to earn the discount and
what the discount takes off.
- **Apply Early Payment**: posts an internal credit note for the
discount and reconciles it with the bill, so what is left to pay is
the net amount.
- **Follow-up**: the internal credit note raises a to-do for the *Early
Payment Credit Notes* activity team, made of the users of the *Follow
Up Early Payment Credit Notes* group, until the credit note of the
supplier arrives.

The native early payment discount of the payment terms does not fit this
flow: it knows a single discount counted from the invoice date and books
it as a write-off when the payment is registered. Here there are two
chained discounts, a base on the receipt date, a credit note because the
supplier issues one, and someone chasing it.

**Table of contents**

.. contents::
:local:

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

- Open a supplier, *Sales & Purchase* tab, *Early Payment* group: fill
in the discount percentages, the days and whether they count from the
invoice or from the receipt.
- Add the users who chase the credit notes of the suppliers to the group
*Follow Up Early Payment Credit Notes* (accounting managers have it by
default). They form the *Early Payment Credit Notes* activity team,
synced every time a credit note is chased.

Usage
=====

A posted vendor bill of a supplier with early payment terms shows the
last day to pay and the discount. Press *Apply Early Payment*: an
internal credit note for the discount is posted and reconciled with the
bill, and a to-do for the credit note the supplier owes goes to the
follow-up team, on that internal credit note. Close it when the credit
note of the supplier arrives.

The business day the discount is paid on is exposed through
``account.move._early_payment_pay_date()``: the early payment date
itself, or the business day before when it falls on a weekend or a
holiday of the working calendar of the company. Payment order
integration lives in ``account_payment_order_early_payment_discount``
(OCA/bank-payment).

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_supplier_early_payment_discount%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
-------

* Jarsa

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

- Jarsa

- Alan Ramos <alan.ramos@jarsa.com>

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/19.0/account_supplier_early_payment_discount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_supplier_early_payment_discount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions account_supplier_early_payment_discount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Jarsa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Supplier Early Payment Discount",
"summary": "Early payment discount of the supplier settled by a credit note",
"version": "19.0.1.0.0",
"category": "Accounting",
"website": "https://github.com/OCA/account-payment",
"author": "Jarsa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"development_status": "Beta",
"depends": ["purchase_stock", "resource", "mail_activity_team"],
"data": [
"security/account_move_security.xml",
"data/mail_activity_team_data.xml",
"views/account_move_views.xml",
"views/res_partner_views.xml",
],
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Its members are the users of the follow-up group, synced every time
a credit note is chased, so the group is the only thing to maintain. -->
<record
id="mail_activity_team_early_payment_credit_note"
model="mail.activity.team"
>
<field name="name">Early Payment Credit Notes</field>
<field name="res_model_ids" eval="[(4, ref('account.model_account_move'))]" />
</record>
</odoo>
225 changes: 225 additions & 0 deletions account_supplier_early_payment_discount/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_supplier_early_payment_discount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-15 22:50+0000\n"
"PO-Revision-Date: 2026-09-15 22:50+0000\n"
"Last-Translator: \n"
"Language-Team: \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"

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid ""
"%(supplier)s owes a credit note for %(amount)s of early payment discount on "
"%(bill)s, taken with this internal credit note. When its credit note "
"arrives, attach it here and close this activity."
msgstr ""
"%(supplier)s debe una nota de crédito por %(amount)s de descuento por pronto"
" pago sobre %(bill)s, tomado con esta nota de crédito interna. Cuando llegue"
" su nota de crédito, adjúntala aquí y cierra esta actividad."

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid "%s has no early payment discount."
msgstr "%s no tiene descuento por pronto pago."

#. module: account_supplier_early_payment_discount
#: model_terms:ir.ui.view,arch_db:account_supplier_early_payment_discount.account_move_view_form
msgid ""
"A credit note for the discount will be posted and applied to this bill, and "
"an activity will follow up the credit note of the supplier. Continue?"
msgstr ""
"Se publicará una nota de crédito por el descuento y se aplicará a esta "
"factura, y una actividad dará seguimiento a la nota de crédito del "
"proveedor. ¿Continuar?"

#. module: account_supplier_early_payment_discount
#: model_terms:ir.ui.view,arch_db:account_supplier_early_payment_discount.account_move_view_form
msgid "Apply Early Payment"
msgstr "Aplicar pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model,name:account_supplier_early_payment_discount.model_res_company
msgid "Companies"
msgstr "Compañías"

#. module: account_supplier_early_payment_discount
#: model:ir.model,name:account_supplier_early_payment_discount.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_credit_note_id
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_move__early_payment_credit_note_id
msgid ""
"Credit note applied to this bill for the early payment discount. The "
"supplier still owes its own credit note; an activity follows it up."
msgstr ""
"Nota de crédito aplicada a esta factura por el descuento de pronto pago. El "
"proveedor sigue debiendo su propia nota de crédito; una actividad le da "
"seguimiento."

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_partner__early_payment_days
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_users__early_payment_days
msgid "Days to pay within to earn the discount."
msgstr "Días en los que hay que pagar para ganar el descuento."

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_partner__early_payment_percent
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_users__early_payment_percent
msgid ""
"Discount the supplier grants when its bills are paid within the early "
"payment days."
msgstr ""
"Descuento que otorga el proveedor cuando sus facturas se pagan dentro de los"
" días de pronto pago."

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_move__display_name
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_company__display_name
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__display_name
msgid "Display Name"
msgstr "Nombre en pantalla"

#. module: account_supplier_early_payment_discount
#: model_terms:ir.ui.view,arch_db:account_supplier_early_payment_discount.res_partner_view_form
msgid "Early Payment"
msgstr "Pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_amount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_move__early_payment_amount
msgid "Early Payment Amount"
msgstr "Importe de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__early_payment_base
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_users__early_payment_base
msgid "Early Payment Counted From"
msgstr "Pronto pago contado desde"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_credit_note_id
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_move__early_payment_credit_note_id
msgid "Early Payment Credit Note"
msgstr "Nota de crédito de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:mail.activity.team,name:account_supplier_early_payment_discount.mail_activity_team_early_payment_credit_note
msgid "Early Payment Credit Notes"
msgstr "Notas de crédito de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_date
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_move__early_payment_date
msgid "Early Payment Date"
msgstr "Fecha de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__early_payment_days
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_users__early_payment_days
msgid "Early Payment Days"
msgstr "Días de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__early_payment_percent
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_users__early_payment_percent
msgid "Early Payment Discount (%)"
msgstr "Descuento por pronto pago (%)"

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid "Early payment credit note pending"
msgstr "Nota de crédito de pronto pago pendiente"

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid "Early payment discount of %s"
msgstr "Descuento por pronto pago de %s"

#. module: account_supplier_early_payment_discount
#: model:res.groups,name:account_supplier_early_payment_discount.account_move_group_early_payment_credit_note
msgid "Follow Up Early Payment Credit Notes"
msgstr "Seguimiento de notas de crédito de pronto pago"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_account_move__id
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_company__id
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__id
msgid "ID"
msgstr ""

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields.selection,name:account_supplier_early_payment_discount.selection__res_partner__early_payment_base__invoice
msgid "Invoice Date"
msgstr "Fecha de factura"

#. module: account_supplier_early_payment_discount
#: model:ir.model,name:account_supplier_early_payment_discount.model_account_move
msgid "Journal Entry"
msgstr "Asiento contable"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_date
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_move__early_payment_date
msgid ""
"Last day to pay to earn the early payment discount of the supplier, counted "
"from the invoice or from the receipt as its conditions say."
msgstr ""
"Último día para pagar y ganar el descuento por pronto pago del proveedor, "
"contado desde la factura o desde la recepción según sus condiciones."

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields.selection,name:account_supplier_early_payment_discount.selection__res_partner__early_payment_base__receipt
msgid "Receipt Date"
msgstr "Fecha de recepción"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_partner__early_payment_percent_2
#: model:ir.model.fields,field_description:account_supplier_early_payment_discount.field_res_users__early_payment_percent_2
msgid "Second Early Payment Discount (%)"
msgstr "Segundo descuento por pronto pago (%)"

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_partner__early_payment_percent_2
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_res_users__early_payment_percent_2
msgid ""
"Some suppliers grant a second discount on top of the first one. It applies "
"to what is left after the first: 2 and then 1 take 2.98, not 3."
msgstr ""
"Algunos proveedores dan un segundo descuento encima del primero. Se aplica "
"sobre lo que queda tras el primero: 2 y luego 1 descuentan 2.98, no 3."

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid "The early payment discount applies to posted vendor bills only."
msgstr ""
"El descuento por pronto pago aplica solo a facturas de proveedor publicadas."

#. module: account_supplier_early_payment_discount
#. odoo-python
#: code:addons/account_supplier_early_payment_discount/models/account_move.py:0
msgid "The early payment discount of %s is already taken."
msgstr "El descuento por pronto pago de %s ya fue aplicado."

#. module: account_supplier_early_payment_discount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_bank_statement_line__early_payment_amount
#: model:ir.model.fields,help:account_supplier_early_payment_discount.field_account_move__early_payment_amount
msgid "What the early payment discount of the supplier takes off this bill."
msgstr ""
"Lo que el descuento por pronto pago del proveedor le quita a esta factura."
3 changes: 3 additions & 0 deletions account_supplier_early_payment_discount/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import account_move
from . import res_company
from . import res_partner
Loading
Loading