diff --git a/account_move_line_payment/README.rst b/account_move_line_payment/README.rst new file mode 100644 index 00000000000..33371a78e83 --- /dev/null +++ b/account_move_line_payment/README.rst @@ -0,0 +1,156 @@ +===================== +Register due payments +===================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b954e30cc41e6c3b424294b7eff1a2e1968588e534affb4f5275962087e9981d + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--payment-lightgray.png?logo=github + :target: https://github.com/OCA/account-payment/tree/18.0/account_move_line_payment + :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-18-0/account-payment-18-0-account_move_line_payment + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of accounting to let you quickly +find which journal items are due today and register payments for them +individually, even if they are partial invoice payments. They also get +appropriately matched automatically. + +In simpler words, you can find and register due payments, regardless if +the invoice had one or more payment terms. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +This module was developed because in the invoices list view, Odoo only +displays the due date of each invoice's last payment. However, most +times you only need to know which payments are due *today*, even if +there's a later payment for that invoice. + +At the same time, if you register a partial payment, Odoo will match it +only partially, even when that was the expected payment due. + +When there are a lot of partial payments, it becomes impossible to +handle manually without a module like this one. + +Configuration +============= + +To use this module, if you're using Odoo CE: + +#. Activate the developer mode. #. Go to *Settings > Users & Companies > +Groups*. #. Edit *Technical / Show Full Accounting Features*. #. Add +yourself to *Users* + +Usage +===== + +To find unmatched payments due today (or before): + +1. Go to *Accounting > Accounting > Journals > Journal Items*. +2. Go to *Filters > Overdue*. +3. Filter also by *Filters > Receivable* or *Filters > Payable*. You + can't mix both in the next step. +4. Select all payments to pay. +5. Click on *Actions > Register payment*. +6. Register the payment as you usually do from the invoices view. + +Only those payments that you selected will be registered. They will +become fully matched. + +Known issues / Roadmap +====================== + +- To use this new feature, you need full accounting permissions (a.k.a. + Bookkeeper). +- Invoicing users should be able too. +- A good improvement would be to display *Next due date* in invoices + views. +- Also to allow somehow paying only overdue payments when using the + register payment wizard. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Moduon + +Contributors +------------ + +- Rafael Blasco (`Moduon `__) +- Jairo Llopis (`Moduon `__) + +Other credits +------------- + +The development of this module has been financially supported by: + +- `Moduon Team S.L. `__ + +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. + +.. |maintainer-yajo| image:: https://github.com/yajo.png?size=40px + :target: https://github.com/yajo + :alt: yajo +.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px + :target: https://github.com/rafaelbn + :alt: rafaelbn + +Current `maintainers `__: + +|maintainer-yajo| |maintainer-rafaelbn| + +This module is part of the `OCA/account-payment `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_payment/__init__.py b/account_move_line_payment/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/account_move_line_payment/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_move_line_payment/__manifest__.py b/account_move_line_payment/__manifest__.py new file mode 100644 index 00000000000..9e567eb2234 --- /dev/null +++ b/account_move_line_payment/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2024 Moduon Team S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) + +{ + "name": "Register due payments", + "summary": "Register only due payments", + "version": "18.0.1.0.0", + "development_status": "Alpha", + "category": "Accounting/Payment", + "website": "https://github.com/OCA/account-payment", + "author": "Moduon, Odoo Community Association (OCA)", + "maintainers": ["yajo", "rafaelbn"], + "license": "LGPL-3", + "application": False, + "auto_install": False, + "depends": ["account"], + "data": [ + "views/account_move_line_view.xml", + ], +} diff --git a/account_move_line_payment/i18n/account_move_line_payment.pot b/account_move_line_payment/i18n/account_move_line_payment.pot new file mode 100644 index 00000000000..f8bb15c42ff --- /dev/null +++ b/account_move_line_payment/i18n/account_move_line_payment.pot @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_payment +# +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_move_line_payment +#: model:ir.model,name:account_move_line_payment.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_move_line_payment +#: model_terms:ir.ui.view,arch_db:account_move_line_payment.view_account_move_line_filter +msgid "Overdue" +msgstr "" + +#. module: account_move_line_payment +#: model:ir.actions.act_window,name:account_move_line_payment.action_pay +msgid "Register Payment" +msgstr "" + +#. module: account_move_line_payment +#: model:ir.model.fields,field_description:account_move_line_payment.field_account_move_line__pending_due_date +msgid "Remaining due days" +msgstr "" + +#. module: account_move_line_payment +#: model:ir.model.fields,help:account_move_line_payment.field_account_move_line__pending_due_date +msgid "The date when the payment is due, or empty if it's done." +msgstr "" diff --git a/account_move_line_payment/i18n/es.po b/account_move_line_payment/i18n/es.po new file mode 100644 index 00000000000..e8a9ba879e6 --- /dev/null +++ b/account_move_line_payment/i18n/es.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_payment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-20 13:09+0000\n" +"PO-Revision-Date: 2024-02-20 13:11+0000\n" +"Last-Translator: Jairo Llopis \n" +"Language-Team: \n" +"Language: es_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: Poedit 3.4.2\n" + +#. module: account_move_line_payment +#: model:ir.model,name:account_move_line_payment.model_account_move_line +msgid "Journal Item" +msgstr "Apunte contable" + +#. module: account_move_line_payment +#: model_terms:ir.ui.view,arch_db:account_move_line_payment.view_account_move_line_filter +msgid "Overdue" +msgstr "Vencidos" + +#. module: account_move_line_payment +#: model:ir.actions.act_window,name:account_move_line_payment.action_pay +msgid "Register Payment" +msgstr "Registrar pago" + +#. module: account_move_line_payment +#: model:ir.model.fields,field_description:account_move_line_payment.field_account_move_line__pending_due_date +msgid "Remaining due days" +msgstr "Días hasta el vencimiento" + +#. module: account_move_line_payment +#: model:ir.model.fields,help:account_move_line_payment.field_account_move_line__pending_due_date +msgid "The date when the payment is due, or empty if it's done." +msgstr "La fecha en que vence el pago, o vacío si ya está hecho." diff --git a/account_move_line_payment/i18n/it.po b/account_move_line_payment/i18n/it.po new file mode 100644 index 00000000000..223fd5a5f75 --- /dev/null +++ b/account_move_line_payment/i18n/it.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_payment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-08-07 17:58+0000\n" +"Last-Translator: mymage \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.6.2\n" + +#. module: account_move_line_payment +#: model:ir.model,name:account_move_line_payment.model_account_move_line +msgid "Journal Item" +msgstr "Movimento contabile" + +#. module: account_move_line_payment +#: model_terms:ir.ui.view,arch_db:account_move_line_payment.view_account_move_line_filter +msgid "Overdue" +msgstr "Scaduta" + +#. module: account_move_line_payment +#: model:ir.actions.act_window,name:account_move_line_payment.action_pay +msgid "Register Payment" +msgstr "Registra pagamento" + +#. module: account_move_line_payment +#: model:ir.model.fields,field_description:account_move_line_payment.field_account_move_line__pending_due_date +msgid "Remaining due days" +msgstr "Giorni alla scadenza" + +#. module: account_move_line_payment +#: model:ir.model.fields,help:account_move_line_payment.field_account_move_line__pending_due_date +msgid "The date when the payment is due, or empty if it's done." +msgstr "Data in cui scade il pagamento, o vuoto se eseguito." diff --git a/account_move_line_payment/i18n/pt_BR.po b/account_move_line_payment/i18n/pt_BR.po new file mode 100644 index 00000000000..611ab78a022 --- /dev/null +++ b/account_move_line_payment/i18n/pt_BR.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_payment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-09-04 21:42+0000\n" +"Last-Translator: Luis Felipe Miléo \n" +"Language-Team: none\n" +"Language: pt_BR\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.4\n" + +#. module: account_move_line_payment +#: model:ir.model,name:account_move_line_payment.model_account_move_line +msgid "Journal Item" +msgstr "Item de diário" + +#. module: account_move_line_payment +#: model_terms:ir.ui.view,arch_db:account_move_line_payment.view_account_move_line_filter +msgid "Overdue" +msgstr "Vencido" + +#. module: account_move_line_payment +#: model:ir.actions.act_window,name:account_move_line_payment.action_pay +msgid "Register Payment" +msgstr "Registrar Pagamento" + +#. module: account_move_line_payment +#: model:ir.model.fields,field_description:account_move_line_payment.field_account_move_line__pending_due_date +msgid "Remaining due days" +msgstr "Dias restantes para o vencimento" + +#. module: account_move_line_payment +#: model:ir.model.fields,help:account_move_line_payment.field_account_move_line__pending_due_date +msgid "The date when the payment is due, or empty if it's done." +msgstr "A data de vencimento do pagamento, ou vazia se já estiver concluído." diff --git a/account_move_line_payment/models/__init__.py b/account_move_line_payment/models/__init__.py new file mode 100644 index 00000000000..8795b3bea64 --- /dev/null +++ b/account_move_line_payment/models/__init__.py @@ -0,0 +1 @@ +from . import account_move_line diff --git a/account_move_line_payment/models/account_move_line.py b/account_move_line_payment/models/account_move_line.py new file mode 100644 index 00000000000..874b4fbc292 --- /dev/null +++ b/account_move_line_payment/models/account_move_line.py @@ -0,0 +1,27 @@ +# Copyright 2024 Moduon Team S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) + + +from odoo import api, fields, models + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + pending_due_date = fields.Date( + string="Remaining due days", + compute="_compute_pending_due_date", + help="The date when the payment is due, or empty if it's done.", + ) + + @api.depends("date_maturity", "matching_number") + def _compute_pending_due_date(self): + """Establish due date for pending payments. + + If a payment is matched, it means it's paid. We empty the field if the + payment is done, so the `remaining_days` widget is nicer for the user. + """ + matched = self.filtered("matching_number") + matched.pending_due_date = False + for move in self - matched: + move.pending_due_date = move.date_maturity diff --git a/account_move_line_payment/pyproject.toml b/account_move_line_payment/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/account_move_line_payment/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_move_line_payment/readme/CONFIGURE.md b/account_move_line_payment/readme/CONFIGURE.md new file mode 100644 index 00000000000..4fb2abc342f --- /dev/null +++ b/account_move_line_payment/readme/CONFIGURE.md @@ -0,0 +1,6 @@ +To use this module, if you're using Odoo CE: + +#. Activate the developer mode. +#. Go to *Settings > Users & Companies > Groups*. +#. Edit *Technical / Show Full Accounting Features*. +#. Add yourself to *Users* diff --git a/account_move_line_payment/readme/CONTEXT.md b/account_move_line_payment/readme/CONTEXT.md new file mode 100644 index 00000000000..f4ce3ad9b28 --- /dev/null +++ b/account_move_line_payment/readme/CONTEXT.md @@ -0,0 +1,10 @@ +This module was developed because in the invoices list view, Odoo only displays +the due date of each invoice's last payment. However, most times you only need +to know which payments are due *today*, even if there's a later payment for +that invoice. + +At the same time, if you register a partial payment, Odoo will match it only +partially, even when that was the expected payment due. + +When there are a lot of partial payments, it becomes impossible to handle +manually without a module like this one. diff --git a/account_move_line_payment/readme/CONTRIBUTORS.md b/account_move_line_payment/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..2849dd38292 --- /dev/null +++ b/account_move_line_payment/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Rafael Blasco ([Moduon](https://www.moduon.team/)) +- Jairo Llopis ([Moduon](https://www.moduon.team/)) diff --git a/account_move_line_payment/readme/CREDITS.md b/account_move_line_payment/readme/CREDITS.md new file mode 100644 index 00000000000..4246e4f779e --- /dev/null +++ b/account_move_line_payment/readme/CREDITS.md @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +- [Moduon Team S.L.](https://www.moduon.team/) diff --git a/account_move_line_payment/readme/DESCRIPTION.md b/account_move_line_payment/readme/DESCRIPTION.md new file mode 100644 index 00000000000..ede631c1787 --- /dev/null +++ b/account_move_line_payment/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module extends the functionality of accounting to let you quickly find +which journal items are due today and register payments for them individually, +even if they are partial invoice payments. They also get appropriately matched +automatically. + +In simpler words, you can find and register due payments, regardless if the +invoice had one or more payment terms. diff --git a/account_move_line_payment/readme/ROADMAP.md b/account_move_line_payment/readme/ROADMAP.md new file mode 100644 index 00000000000..0dde184f983 --- /dev/null +++ b/account_move_line_payment/readme/ROADMAP.md @@ -0,0 +1,4 @@ +- To use this new feature, you need full accounting permissions (a.k.a. Bookkeeper). +- Invoicing users should be able too. +- A good improvement would be to display *Next due date* in invoices views. +- Also to allow somehow paying only overdue payments when using the register payment wizard. diff --git a/account_move_line_payment/readme/USAGE.md b/account_move_line_payment/readme/USAGE.md new file mode 100644 index 00000000000..99d46da3184 --- /dev/null +++ b/account_move_line_payment/readme/USAGE.md @@ -0,0 +1,12 @@ +To find unmatched payments due today (or before): + +1. Go to *Accounting > Accounting > Journals > Journal Items*. +1. Go to *Filters > Overdue*. +1. Filter also by *Filters > Receivable* or *Filters > Payable*. You can't mix + both in the next step. +1. Select all payments to pay. +1. Click on *Actions > Register payment*. +1. Register the payment as you usually do from the invoices view. + +Only those payments that you selected will be registered. They will become +fully matched. diff --git a/account_move_line_payment/static/description/icon.png b/account_move_line_payment/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/account_move_line_payment/static/description/icon.png differ diff --git a/account_move_line_payment/static/description/index.html b/account_move_line_payment/static/description/index.html new file mode 100644 index 00000000000..82d3b9976b4 --- /dev/null +++ b/account_move_line_payment/static/description/index.html @@ -0,0 +1,494 @@ + + + + + +Register due payments + + + +
+

Register due payments

+ + +

Alpha License: LGPL-3 OCA/account-payment Translate me on Weblate Try me on Runboat

+

This module extends the functionality of accounting to let you quickly +find which journal items are due today and register payments for them +individually, even if they are partial invoice payments. They also get +appropriately matched automatically.

+

In simpler words, you can find and register due payments, regardless if +the invoice had one or more payment terms.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Use Cases / Context

+

This module was developed because in the invoices list view, Odoo only +displays the due date of each invoice’s last payment. However, most +times you only need to know which payments are due today, even if +there’s a later payment for that invoice.

+

At the same time, if you register a partial payment, Odoo will match it +only partially, even when that was the expected payment due.

+

When there are a lot of partial payments, it becomes impossible to +handle manually without a module like this one.

+
+
+

Configuration

+

To use this module, if you’re using Odoo CE:

+

#. Activate the developer mode. #. Go to Settings > Users & Companies > +Groups. #. Edit Technical / Show Full Accounting Features. #. Add +yourself to Users

+
+
+

Usage

+

To find unmatched payments due today (or before):

+
    +
  1. Go to Accounting > Accounting > Journals > Journal Items.
  2. +
  3. Go to Filters > Overdue.
  4. +
  5. Filter also by Filters > Receivable or Filters > Payable. You +can’t mix both in the next step.
  6. +
  7. Select all payments to pay.
  8. +
  9. Click on Actions > Register payment.
  10. +
  11. Register the payment as you usually do from the invoices view.
  12. +
+

Only those payments that you selected will be registered. They will +become fully matched.

+
+
+

Known issues / Roadmap

+
    +
  • To use this new feature, you need full accounting permissions (a.k.a. +Bookkeeper).
  • +
  • Invoicing users should be able too.
  • +
  • A good improvement would be to display Next due date in invoices +views.
  • +
  • Also to allow somehow paying only overdue payments when using the +register payment wizard.
  • +
+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Moduon
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The development of this module has been financially supported by:

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainers:

+

yajo rafaelbn

+

This module is part of the OCA/account-payment project on GitHub.

+

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

+
+
+
+ + diff --git a/account_move_line_payment/views/account_move_line_view.xml b/account_move_line_payment/views/account_move_line_view.xml new file mode 100644 index 00000000000..27d4f065223 --- /dev/null +++ b/account_move_line_payment/views/account_move_line_view.xml @@ -0,0 +1,29 @@ + + + + + Allow quickly finding overdue lines + account.move.line + + + + + + + + + + + Register Payment + account.payment.register + form + new + + list,form + +