Initial commit: OCA Financial packages (186 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:04 +02:00
commit 3e0e8473fb
8757 changed files with 947473 additions and 0 deletions

View file

@ -0,0 +1,44 @@
# Account Invoice Payment Retention
Odoo addon: account_invoice_payment_retention
## Installation
```bash
pip install odoo-bringout-oca-account-invoicing-account_invoice_payment_retention
```
## Dependencies
This addon depends on:
- account
## Manifest Information
- **Name**: Account Invoice Payment Retention
- **Version**: 16.0.1.0.0
- **Category**: Accounting & Finance
- **License**: AGPL-3
- **Installable**: True
## Source
Based on [OCA/account-invoicing](https://github.com/OCA/account-invoicing) branch 16.0, addon `account_invoice_payment_retention`.
## License
This package maintains the original AGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,124 @@
=================================
Account Invoice Payment Retention
=================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3777e106c2b9db81bc85f12be1c15069f383283a5b4dccab992fdfa8b2bcfd4c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-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--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_payment_retention
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_invoice_payment_retention
: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-invoicing&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module provide a feature to plan for retention during invoice / payment. And return it at later time.
#. At Vendor Bill (or Customer Invoice), user can plan the retention by percent/amount
#. At Payment, to retain the amount as planned (enforce / not enforce)
#. At a later time, with another Vendor Bill (or Customer Invoice), user can select the retained payment in order to return it
Note: This feature works on both customer invoice and vendor bill alike.
.. 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 <https://odoo-community.org/page/development-status>`_
**Table of contents**
.. contents::
:local:
Configuration
=============
#. Go to menu > Invoicing > Configurations > Settings
#. Enable Invoice's Retention on Payment
#. Select the Retention Payable Account and Retention Receivalbe Account, make sure this account allow reconciliation
#. Once setup, user will see new Retention fields in Customer Invoice / Vendor Bill.
Usage
=====
**To plan for retention during invoice**
#. Create new Vendor Bill (or Customer Invoice).
#. Specify amount to retain, by percent or amount.
#. Validate invoice as per normal.
**To make payment retention**
#. From the invoice, click Register Payment.
#. On the payment window, system suggest the retention amount, click on helper toggle to apply it.
#. By default, enforce retention is checked to ensure that, a valid retention amount and retention account is applied.
#. Once ready, make payment as per normal. Journal Entry created with a retention account move line (to be cleared at later time).
**Note:** System just help to validate retention. At the end, user can ignore the retention.
**To return the retained amount**
#. As time arrived to return the retained amount. Create the new Vendor Bill (or Customer Invoice).
#. Select the partner. Return Retention field will list only uncleared retained amount for this partner.
#. Select one or multiple payments (journal entry), system will auto populate the retained amount.
#. Validate invoice as per normal, system will now clear (reconcile) that retention.
#. Proceed to payment as per normal.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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-invoicing/issues/new?body=module:%20account_invoice_payment_retention%0Aversion:%2016.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
~~~~~~~
* Ecosoft
Contributors
~~~~~~~~~~~~
* `Ecosoft <http://ecosoft.co.th>`__:
* Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th>
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-invoicing <https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_payment_retention>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
from . import wizard

View file

@ -0,0 +1,21 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Invoice Payment Retention",
"version": "16.0.1.0.0",
"category": "Accounting & Finance",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/account-invoicing",
"depends": ["account"],
"data": [
"security/security.xml",
"views/res_config_settings_views.xml",
"views/account_move_views.xml",
"wizard/account_payment_register_views.xml",
],
"maintainer": ["kittiu"],
"installable": True,
"development_status": "Alpha",
}

View file

@ -0,0 +1,273 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_payment_retention
#
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_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__amount
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid "Amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__apply_payment_retention
msgid "Apply Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Based on retention type, this field show the amount to retain."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_company
msgid "Companies"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Default your retention method"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__domain_retained_move_ids
msgid "Domain Retained Move"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__group_payment_retention
msgid "Enable Invoice's Retention on Payment"
msgstr ""
#. module: account_invoice_payment_retention
#: model:res.groups,name:account_invoice_payment_retention.group_payment_retention
msgid "Enable Payment Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid "Enforce Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid ""
"Enforce retention amount as suggested, otherwise, user can ignore the "
"retention."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Expected amount to retain on payment currency"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_method
msgid ""
"Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__payment_retention
msgid "Payment Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__percent
msgid "Percent"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_payment_register
msgid "Register Payment"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention Account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Retention Amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_method
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Method"
msgstr ""
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Payable Account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Receivable Account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_residual_currency
msgid "Retention Residual"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention account used for case payment retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention in percent of this invoice, or by amount"
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/account_move.py:0
#, python-format
msgid "Retention must not exceed the total untaxed amount"
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention payable account should be set to allow Reconciliation"
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention receivable account should be set to allow Reconciliation"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
msgid "Retention receivable account used for case payment retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retained_move_ids
msgid "Return Retention"
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"Selected invoice(s) require payment retentions, multi invoices payment is "
"not allowed."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Suggested Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__payment_retention
msgid ""
"Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it."
msgstr ""
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid ""
"This enable retention option in invoice, to be retained on its payment."
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"This payment has retention, please make sure you fill in valid retaintion "
"amount and retention account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__total
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__total
msgid "Total"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__untax
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__untax
msgid "Untaxed Amount"
msgstr ""

View file

@ -0,0 +1,273 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_payment_retention
#
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_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__amount
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid "Amount"
msgstr "Iznos"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__apply_payment_retention
msgid "Apply Retention"
msgstr "Primijeni zadržavanje"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Based on retention type, this field show the amount to retain."
msgstr "Na osnovu tipa zadržavanja, ovo polje prikazuje iznos za zadržavanje."
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_company
msgid "Companies"
msgstr "Kompanije"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_config_settings
msgid "Config Settings"
msgstr "Postavke"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Default your retention method"
msgstr "Zadati vaš metod zadržavanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__domain_retained_move_ids
msgid "Domain Retained Move"
msgstr "Domen zadržanog zapisa"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__group_payment_retention
msgid "Enable Invoice's Retention on Payment"
msgstr "Omogući zadržavanje fakture pri plaćanju"
#. module: account_invoice_payment_retention
#: model:res.groups,name:account_invoice_payment_retention.group_payment_retention
msgid "Enable Payment Retention"
msgstr "Omogući zadržavanje plaćanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid "Enforce Retention"
msgstr "Nametni zadržavanje"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid ""
"Enforce retention amount as suggested, otherwise, user can ignore the "
"retention."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Expected amount to retain on payment currency"
msgstr "Očekivani iznos za zadržavanje u valuti plaćanja"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move
msgid "Journal Entry"
msgstr "Žurnal"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move_line
msgid "Journal Item"
msgstr "Stavka žurnala"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_method
msgid ""
"Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__payment_retention
msgid "Payment Retention"
msgstr "Zadržavanje plaćanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__percent
msgid "Percent"
msgstr "Procenat"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_payment_register
msgid "Register Payment"
msgstr "Registracija uplate"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention"
msgstr "Zadržavanje"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention Account"
msgstr "Račun zadržavanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Retention Amount"
msgstr "Iznos zadržavanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_method
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Method"
msgstr "Metoda zadržavanja"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Payable Account"
msgstr "Račun zadržavanja obveza"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Receivable Account"
msgstr "Račun potraživanja zadržavanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_residual_currency
msgid "Retention Residual"
msgstr "Ostatak zadržavanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention account used for case payment retention"
msgstr "Račun zadržavanja korišten za slučaj zadržavanja plaćanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention in percent of this invoice, or by amount"
msgstr "Zadržavanje u postotku ove fakture, ili po iznosu"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/account_move.py:0
#, python-format
msgid "Retention must not exceed the total untaxed amount"
msgstr "Zadržavanje ne smije prelaziti ukupan iznos bez poreza"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention payable account should be set to allow Reconciliation"
msgstr "Račun obveza zadržavanja trebao bi biti postavljen da dozvoljava usklađivanje"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention receivable account should be set to allow Reconciliation"
msgstr "Račun potraživanja zadržavanja trebao bi biti postavljen da dozvoljava usklađivanje"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
msgid "Retention receivable account used for case payment retention"
msgstr "Račun potraživanja zadržavanja korišten za slučaj zadržavanja plaćanja"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retained_move_ids
msgid "Return Retention"
msgstr "Povrat zadržavanja"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"Selected invoice(s) require payment retentions, multi invoices payment is "
"not allowed."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Suggested Retention"
msgstr "Predloženo zadržavanje"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__payment_retention
msgid ""
"Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it."
msgstr ""
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid ""
"This enable retention option in invoice, to be retained on its payment."
msgstr ""
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"This payment has retention, please make sure you fill in valid retaintion "
"amount and retention account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__total
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__total
msgid "Total"
msgstr "Ukupno"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__untax
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__untax
msgid "Untaxed Amount"
msgstr "Iznos bez PDV"

View file

@ -0,0 +1,219 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_payment_retention
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\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"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__amount
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid "Amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__apply_payment_retention
msgid "Apply Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Based on retention type, this field show the amount to retain."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_company
msgid "Companies"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__display_name
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move_line__display_name
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__display_name
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__display_name
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__display_name
msgid "Display Name"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__group_payment_retention
msgid "Enable Invoice's Retention on Payment"
msgstr ""
#. module: account_invoice_payment_retention
#: model:res.groups,name:account_invoice_payment_retention.group_payment_retention
msgid "Enable Payment Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid "Enforce Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid ""
"Enforce retention amount as suggested, otherwise, user can ignore the "
"retention."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Expected amount to retain on payment currency"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move_line__id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__id
msgid "ID"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move____last_update
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move_line____last_update
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register____last_update
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company____last_update
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__payment_retention
msgid "Payment Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__percent
msgid "Percent"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_payment_register
msgid "Register Payment"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_account_id
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Account"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Retention Amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_residual_currency
msgid "Retention Residual"
msgstr ""
#. module: account_invoice_payment_retention
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention account should be set to allow Reconciliation"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention account used for case payment retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention in percent of this invoice, or by amount"
msgstr ""
#. module: account_invoice_payment_retention
#: code:addons/account_invoice_payment_retention/models/account_move.py:0
#, python-format
msgid "Retention must not exceed the total untaxed amount"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retained_move_ids
msgid "Return Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"Selected invoice(s) require payment retentions, multi invoices payment is "
"not allowed."
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Suggested Retention"
msgstr ""
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__payment_retention
msgid ""
"Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it."
msgstr ""
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "This enable retention option in invoice, to be retained on its payment."
msgstr ""
#. module: account_invoice_payment_retention
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"This payment has retention, please make sure you fill in valid retaintion "
"amount and retention account"
msgstr ""

View file

@ -0,0 +1,298 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_payment_retention
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-23 09:36+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\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: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
msgstr ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__amount
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid "Amount"
msgstr "Importe"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__apply_payment_retention
msgid "Apply Retention"
msgstr "Aplicar Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Based on retention type, this field show the amount to retain."
msgstr ""
"En función del tipo de retención, este campo muestra el importe a retener."
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_company
msgid "Companies"
msgstr "Empresas"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes Config"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Default your retention method"
msgstr "Defina su método de retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__domain_retained_move_ids
msgid "Domain Retained Move"
msgstr "Dominio retenido Traslado"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__group_payment_retention
msgid "Enable Invoice's Retention on Payment"
msgstr "Activar la retención de facturas en el momento del pago"
#. module: account_invoice_payment_retention
#: model:res.groups,name:account_invoice_payment_retention.group_payment_retention
msgid "Enable Payment Retention"
msgstr "Permitir la Retención de Pagos"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid "Enforce Retention"
msgstr "Imponer la Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid ""
"Enforce retention amount as suggested, otherwise, user can ignore the "
"retention."
msgstr ""
"Aplique la cantidad de retención sugerida, de lo contrario, el usuario puede "
"ignorar la retención."
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Expected amount to retain on payment currency"
msgstr "Importe previsto a retener en la moneda de pago"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move
msgid "Journal Entry"
msgstr "Entrada en Diario"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move_line
msgid "Journal Item"
msgstr "Elemento de Diario"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_method
msgid ""
"Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount"
msgstr ""
"Método de cálculo de la retención\n"
"- Importe no tributado: La retención se computa a partir del importe no "
"tributado\n"
"- Total: La retención se computa a partir del importe total"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__payment_retention
msgid "Payment Retention"
msgstr "Retención de Pagos"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__percent
msgid "Percent"
msgstr "Porcentaje"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_payment_register
msgid "Register Payment"
msgstr "Registrar Pago"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention"
msgstr "Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention Account"
msgstr "Cuenta de Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Retention Amount"
msgstr "Importe de Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_method
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Method"
msgstr "Método de Retención"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Payable Account"
msgstr "Cuenta por Pagar de Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Receivable Account"
msgstr "Cuenta por Cobrar de Retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_residual_currency
msgid "Retention Residual"
msgstr "Retención Residual"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention account used for case payment retention"
msgstr "Cuenta de retención utilizada para la retención de pagos de casos"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention in percent of this invoice, or by amount"
msgstr "Retención en porcentaje de esta factura, o por importe"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/account_move.py:0
#, python-format
msgid "Retention must not exceed the total untaxed amount"
msgstr "La retención no debe superar el importe total no gravado"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention payable account should be set to allow Reconciliation"
msgstr ""
"La cuenta de retención a pagar debe estar configurada para permitir la "
"Conciliación"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention receivable account should be set to allow Reconciliation"
msgstr ""
"La cuenta de retenciones a cobrar debe configurarse para permitir la "
"conciliación"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
msgid "Retention receivable account used for case payment retention"
msgstr ""
"Cuenta por cobrar de retención utilizada para la retención de pagos de casos"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retained_move_ids
msgid "Return Retention"
msgstr "Retención de Devoluciones"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"Selected invoice(s) require payment retentions, multi invoices payment is "
"not allowed."
msgstr ""
"Las facturas seleccionadas requieren retenciones de pago, no se permite el "
"pago de varias facturas."
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Suggested Retention"
msgstr "Retención Sugerida"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__payment_retention
msgid ""
"Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it."
msgstr ""
"Importe de retención sugerido para retener en el pago.\n"
"Nota: como sugerencia, durante el pago, el usuario puede ignorarlo."
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid ""
"This enable retention option in invoice, to be retained on its payment."
msgstr ""
"Esto habilita la opción de retención en factura, para ser retenida en su "
"pago."
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"This payment has retention, please make sure you fill in valid retaintion "
"amount and retention account"
msgstr ""
"Este pago tiene retención, por favor asegúrese de rellenar la cantidad de "
"retención válida y la cuenta de retención"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__total
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__total
msgid "Total"
msgstr "Total"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__untax
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__untax
msgid "Untaxed Amount"
msgstr "Importe no sujeto a Impuestos"

View file

@ -0,0 +1,296 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_payment_retention
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-12-10 18:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
msgstr ""
"<span class=\"oe_edit_only\" attrs=\"{'invisible': [('payment_retention', "
"'=', False)]}\"> = </span>"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__amount
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.view_move_form
msgid "Amount"
msgstr "Valore"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__apply_payment_retention
msgid "Apply Retention"
msgstr "Applica ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Based on retention type, this field show the amount to retain."
msgstr ""
"In base al tipo di ritenuta, questo campo mostra il valore da trattenere."
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_company
msgid "Companies"
msgstr "Aziende"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Default your retention method"
msgstr "Vostro metodo ritenuta predefinito"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__domain_retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__domain_retained_move_ids
msgid "Domain Retained Move"
msgstr "Movimento ritenuta dominio"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__group_payment_retention
msgid "Enable Invoice's Retention on Payment"
msgstr "Abilita la ritenuta fattura nel pagamento"
#. module: account_invoice_payment_retention
#: model:res.groups,name:account_invoice_payment_retention.group_payment_retention
msgid "Enable Payment Retention"
msgstr "Abilita trattenuta pagamento"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid "Enforce Retention"
msgstr "Forza trattenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__enforce_payment_retention
msgid ""
"Enforce retention amount as suggested, otherwise, user can ignore the "
"retention."
msgstr ""
"Forza il valore trattenuta come suggerito, altrimenti l'utente può ignorare "
"la trattenuta."
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Expected amount to retain on payment currency"
msgstr "Valore previsto da trattenere in valuta pagamento"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_move_line
msgid "Journal Item"
msgstr "Movimento contabile"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_method
msgid ""
"Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount"
msgstr ""
"Metodo per calcolare la ritenuta\n"
"- Importo non tassato: la ritenuta calcolata dall'importo non tassato\n"
"- Totale: la ritenuta calcolata dall'importo totale"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__payment_retention
msgid "Payment Retention"
msgstr "Trattenuta pagamento"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__payment_retention__percent
msgid "Percent"
msgstr "Percentuale"
#. module: account_invoice_payment_retention
#: model:ir.model,name:account_invoice_payment_retention.model_account_payment_register
msgid "Register Payment"
msgstr "Registra pagamento"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention"
msgstr "Ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention Account"
msgstr "Conto ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_amount_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_amount_currency
msgid "Retention Amount"
msgstr "Valore ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_method
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_method
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Method"
msgstr "Metodo ritenuta"
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Payable Account"
msgstr "Conto ritenuta pagabile"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid "Retention Receivable Account"
msgstr "Conto ricezione ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retention_residual_currency
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retention_residual_currency
msgid "Retention Residual"
msgstr "Residuo ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_company__retention_receivable_account_id
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_account_id
msgid "Retention account used for case payment retention"
msgstr "Conto ritenuta utilizzato per la ritenuta pagamento del caso"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__amount_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__amount_retention
msgid "Retention in percent of this invoice, or by amount"
msgstr "Ritenuta in percentuale di questa fattura, o per valore"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/account_move.py:0
#, python-format
msgid "Retention must not exceed the total untaxed amount"
msgstr "La ritenuta non deve superare il totale valore non tassato"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention payable account should be set to allow Reconciliation"
msgstr ""
"Il conto pagabile ritenuta deve essere impostato per consentire la "
"riconciliazione"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/models/res_company.py:0
#, python-format
msgid "Retention receivable account should be set to allow Reconciliation"
msgstr ""
"Il conto ricezione ritenuta deve essere impostato per consentire la "
"riconciliazione"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_res_config_settings__retention_receivable_account_id
msgid "Retention receivable account used for case payment retention"
msgstr "Conto ricevimento ritenuta utilizzato la ritenuta pagamento del caso"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_bank_statement_line__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_move__retained_move_ids
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment__retained_move_ids
msgid "Return Retention"
msgstr "Ritenuta rimborso"
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"Selected invoice(s) require payment retentions, multi invoices payment is "
"not allowed."
msgstr ""
"Le fatture selezionate richiedono la ritenuta del pagamento, il pagamento di "
"fatture multiple non è consentito."
#. module: account_invoice_payment_retention
#: model:ir.model.fields,field_description:account_invoice_payment_retention.field_account_payment_register__retention_amount_currency
msgid "Suggested Retention"
msgstr "Ritenuta suggerita"
#. module: account_invoice_payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_bank_statement_line__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_move__payment_retention
#: model:ir.model.fields,help:account_invoice_payment_retention.field_account_payment__payment_retention
msgid ""
"Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it."
msgstr ""
"Valore ritenuta suggerito da trattenere nel pagamento.\n"
"Nota: come suggerimento, durante il pagamento, l'utente la può ignorare."
#. module: account_invoice_payment_retention
#: model_terms:ir.ui.view,arch_db:account_invoice_payment_retention.res_config_settings_view_form
msgid ""
"This enable retention option in invoice, to be retained on its payment."
msgstr ""
"Questo abilita l'opzione di ritenuta nella fattura, da trattenere al suo "
"pagamento."
#. module: account_invoice_payment_retention
#. odoo-python
#: code:addons/account_invoice_payment_retention/wizard/account_payment_register.py:0
#, python-format
msgid ""
"This payment has retention, please make sure you fill in valid retaintion "
"amount and retention account"
msgstr ""
"Questo pagamento ha ritenute, assicurarsi di compilare un valore ritenuta "
"valido e il conto ritenuta"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__total
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__total
msgid "Total"
msgstr "Totale"
#. module: account_invoice_payment_retention
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__account_move__retention_method__untax
#: model:ir.model.fields.selection,name:account_invoice_payment_retention.selection__res_company__retention_method__untax
msgid "Untaxed Amount"
msgstr "Imponibile"

View file

@ -0,0 +1,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import res_config_settings
from . import res_company
from . import account_move

View file

@ -0,0 +1,225 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import Command, _, api, fields, models
from odoo.exceptions import ValidationError
class AccountMove(models.Model):
_inherit = "account.move"
payment_retention = fields.Selection(
selection=[("percent", "Percent"), ("amount", "Amount")],
readonly=True,
states={"draft": [("readonly", False)]},
help="Suggested retention amount to be withheld on payment.\n"
"Note: as a suggestiong, during payment, user can ignore it.",
)
retention_method = fields.Selection(
selection=[("untax", "Untaxed Amount"), ("total", "Total")],
default=lambda self: self.env.company.retention_method,
readonly=True,
states={"draft": [("readonly", False)]},
help="Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount",
)
amount_retention = fields.Float(
string="Retention",
readonly=True,
states={"draft": [("readonly", False)]},
help="Retention in percent of this invoice, or by amount",
)
retention_amount_currency = fields.Monetary(
string="Retention Amount",
compute="_compute_retention_amount_currency",
store=True,
help="Based on retention type, this field show the amount to retain.",
)
retention_residual_currency = fields.Monetary(
string="Retention Residual",
compute="_compute_retention_residual_currency",
)
domain_retained_move_ids = fields.Many2many(
comodel_name="account.move",
relation="account_move_domain_retained_rel",
column1="move_id",
column2="retained_id",
readonly=True,
copy=False,
)
retained_move_ids = fields.Many2many(
comodel_name="account.move",
relation="account_invoice_move_rel",
column1="invoice_id",
column2="move_id",
string="Return Retention",
readonly=True,
states={"draft": [("readonly", False)]},
copy=False,
)
@api.onchange("payment_retention")
def _onchange_payment_retention(self):
self.amount_retention = False
self.retained_move_ids = False
@api.onchange("partner_id")
def _onchange_domain_retained_move_ids(self):
"""Get all account move (retention) to domain_retained_move_ids
for filter return retention"""
self.domain_retained_move_ids = False
if self.env.user.has_group(
"account_invoice_payment_retention.group_payment_retention"
):
retention_account = (
self.env.company.retention_account_id
if self.move_type == "in_invoice"
else self.env.company.retention_receivable_account_id
)
dom = [
("parent_state", "=", "posted"),
("account_id", "=", retention_account.id),
("reconciled", "=", False),
("partner_id", "=", self.partner_id.id),
]
move_lines = self.env["account.move.line"].search(dom)
self.domain_retained_move_ids = [
Command.set(move_lines.mapped("move_id").ids)
]
@api.model
def _move_lines_retained_moves(self, retained_moves):
"""Get move_lines from selected retained moves in list of dict"""
retention_account = (
self.env.company.retention_account_id
if self.move_type == "in_invoice"
else self.env.company.retention_receivable_account_id
)
move_lines = retained_moves.mapped("line_ids").filtered(
lambda l: l.account_id == retention_account and not l.reconciled
)
retained_move_lines = [
line._prepare_retained_move_lines(self) for line in move_lines
]
return retained_move_lines
@api.onchange("retained_move_ids")
def _onchange_retained_move_ids(self):
self.invoice_line_ids = False
self.payment_retention = False
if self.retained_move_ids:
lines = self._move_lines_retained_moves(self.retained_move_ids)
for line in lines:
self.invoice_line_ids += self.env["account.move.line"].new(line)
self.currency_id = self.env.company.currency_id
@api.depends(
"payment_retention",
"retention_method",
"amount_retention",
"amount_untaxed",
"amount_total",
)
def _compute_retention_amount_currency(self):
for rec in self:
retention_amount = 0.0
if rec.payment_retention == "amount":
retention_amount = rec.amount_retention
elif rec.payment_retention == "percent":
# Ensure working with purchase deposit, sum only positive qty lines
amount = sum(
rec.invoice_line_ids.filtered(lambda l: l.quantity > 0).mapped(
"amount_currency"
)
)
if rec.retention_method == "total":
# Ensure working with purchase deposit, sum only positive qty lines
# and not Payable or Receivable account
amount += sum(
rec.line_ids.filtered(lambda l: l.display_type == "tax").mapped(
"amount_currency"
)
)
sign = 1 if rec.move_type in ["in_invoice", "out_refund"] else -1
retention_amount = sign * (amount * rec.amount_retention / 100)
rec.retention_amount_currency = retention_amount
def _get_retained_move_lines(self, retained_invoice):
move_lines = retained_invoice.line_ids
reconciled_moves = move_lines.mapped(
"matched_debit_ids.debit_move_id.move_id"
) + move_lines.mapped("matched_credit_ids.credit_move_id.move_id")
retention_account = (
self.env.company.retention_account_id
if retained_invoice.move_type == "in_invoice"
else self.env.company.retention_receivable_account_id
)
retained_move_lines = reconciled_moves.mapped("line_ids").filtered(
lambda l: l.account_id == retention_account
)
return retained_move_lines
@api.depends("line_ids.matched_debit_ids", "line_ids.matched_credit_ids")
def _compute_retention_residual_currency(self):
"""Expected retention amount minus payment retention"""
for rec in self:
if not rec.payment_retention:
rec.retention_residual_currency = 0.0
continue
retained_moves = self._get_retained_move_lines(rec)
retained = 0.0
sign = 1 if rec.move_type in ["in_invoice", "out_refund"] else -1
if rec.currency_id == rec.company_currency_id:
retained = sum(retained_moves.mapped("balance"))
else:
for move in retained_moves:
retained += rec.company_currency_id._convert(
move.balance, rec.currency_id, rec.company_id, move.date
)
rec.retention_residual_currency = rec.retention_amount_currency + (
sign * retained
)
@api.constrains("amount_retention", "retention_amount_currency")
def _check_retention_amount_currency(self):
for rec in self.filtered("payment_retention"):
if rec.retention_amount_currency > rec.amount_untaxed:
raise ValidationError(
_("Retention must not exceed the total untaxed amount")
)
def action_post(self):
res = super().action_post()
for rec in self.filtered(lambda l: l.retained_move_ids):
retention_account = (
self.env.company.retention_account_id
if rec.move_type == "in_invoice"
else self.env.company.retention_receivable_account_id
)
retained_move_lines = rec.retained_move_ids.mapped("line_ids").filtered(
lambda l: l.account_id == retention_account and not l.reconciled
)
return_move_lines = rec.line_ids.filtered(
lambda l: l.account_id == retention_account
)
move_lines = retained_move_lines + return_move_lines
move_lines.filtered(lambda line: not line.reconciled).with_context(
skip_account_move_synchronization=True
).reconcile()
return res
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
def _prepare_retained_move_lines(self, move):
self.ensure_one()
copied_vals = self.copy_data()[0]
copied_vals.update(
{
"price_unit": abs(copied_vals["balance"]),
"currency_id": move.currency_id.id,
}
)
return copied_vals

View file

@ -0,0 +1,57 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ResCompany(models.Model):
_inherit = "res.company"
retention_account_id = fields.Many2one(
comodel_name="account.account",
domain=[
(
"account_type",
"not in",
["asset_receivable", "asset_cash", "liability_payable"],
),
],
help="Retention account used for case payment retention",
)
retention_receivable_account_id = fields.Many2one(
comodel_name="account.account",
domain=[
(
"account_type",
"not in",
["asset_receivable", "asset_cash", "liability_payable"],
),
],
help="Retention account used for case payment retention",
)
retention_method = fields.Selection(
selection=[("untax", "Untaxed Amount"), ("total", "Total")],
default="untax",
help="Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount",
)
@api.constrains("retention_account_id")
def _check_retention_account_id(self):
for rec in self.filtered("retention_account_id"):
if not rec.retention_account_id.reconcile:
raise ValidationError(
_("Retention payable account should be set to allow Reconciliation")
)
@api.constrains("retention_receivable_account_id")
def _check_retention_receivable_account_id(self):
for rec in self.filtered("retention_receivable_account_id"):
if not rec.retention_receivable_account_id.reconcile:
raise ValidationError(
_(
"Retention receivable account should be set to allow Reconciliation"
)
)

View file

@ -0,0 +1,33 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
group_payment_retention = fields.Boolean(
string="Enable Invoice's Retention on Payment",
implied_group="account_invoice_payment_retention.group_payment_retention",
)
retention_account_id = fields.Many2one(
comodel_name="account.account",
related="company_id.retention_account_id",
readonly=False,
help="Retention account used for case payment retention",
)
retention_receivable_account_id = fields.Many2one(
comodel_name="account.account",
related="company_id.retention_receivable_account_id",
readonly=False,
help="Retention receivable account used for case payment retention",
)
retention_method = fields.Selection(
related="company_id.retention_method",
string="Retention Method",
readonly=False,
help="Method for computing the retention\n"
"- Untaxed Amount: The retention compute from the untaxed amount\n"
"- Total: The retention compute from the total amount",
)

View file

@ -0,0 +1,4 @@
#. Go to menu > Invoicing > Configurations > Settings
#. Enable Invoice's Retention on Payment
#. Select the Retention Payable Account and Retention Receivalbe Account, make sure this account allow reconciliation
#. Once setup, user will see new Retention fields in Customer Invoice / Vendor Bill.

View file

@ -0,0 +1,4 @@
* `Ecosoft <http://ecosoft.co.th>`__:
* Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th>

View file

@ -0,0 +1,7 @@
This module provide a feature to plan for retention during invoice / payment. And return it at later time.
#. At Vendor Bill (or Customer Invoice), user can plan the retention by percent/amount
#. At Payment, to retain the amount as planned (enforce / not enforce)
#. At a later time, with another Vendor Bill (or Customer Invoice), user can select the retained payment in order to return it
Note: This feature works on both customer invoice and vendor bill alike.

View file

@ -0,0 +1,22 @@
**To plan for retention during invoice**
#. Create new Vendor Bill (or Customer Invoice).
#. Specify amount to retain, by percent or amount.
#. Validate invoice as per normal.
**To make payment retention**
#. From the invoice, click Register Payment.
#. On the payment window, system suggest the retention amount, click on helper toggle to apply it.
#. By default, enforce retention is checked to ensure that, a valid retention amount and retention account is applied.
#. Once ready, make payment as per normal. Journal Entry created with a retention account move line (to be cleared at later time).
**Note:** System just help to validate retention. At the end, user can ignore the retention.
**To return the retained amount**
#. As time arrived to return the retained amount. Create the new Vendor Bill (or Customer Invoice).
#. Select the partner. Return Retention field will list only uncleared retained amount for this partner.
#. Select one or multiple payments (journal entry), system will auto populate the retained amount.
#. Validate invoice as per normal, system will now clear (reconcile) that retention.
#. Proceed to payment as per normal.

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="group_payment_retention" model="res.groups">
<field name="name">Enable Payment Retention</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
</odoo>

View file

@ -0,0 +1,473 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Invoice Payment Retention</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="account-invoice-payment-retention">
<h1 class="title">Account Invoice Payment Retention</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3777e106c2b9db81bc85f12be1c15069f383283a5b4dccab992fdfa8b2bcfd4c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_payment_retention"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_invoice_payment_retention"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module provide a feature to plan for retention during invoice / payment. And return it at later time.</p>
<ol class="arabic simple">
<li>At Vendor Bill (or Customer Invoice), user can plan the retention by percent/amount</li>
<li>At Payment, to retain the amount as planned (enforce / not enforce)</li>
<li>At a later time, with another Vendor Bill (or Customer Invoice), user can select the retained payment in order to return it</li>
</ol>
<p>Note: This feature works on both customer invoice and vendor bill alike.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">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.
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
</div>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<ol class="arabic simple">
<li>Go to menu &gt; Invoicing &gt; Configurations &gt; Settings</li>
<li>Enable Invoices Retention on Payment</li>
<li>Select the Retention Payable Account and Retention Receivalbe Account, make sure this account allow reconciliation</li>
<li>Once setup, user will see new Retention fields in Customer Invoice / Vendor Bill.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p><strong>To plan for retention during invoice</strong></p>
<ol class="arabic simple">
<li>Create new Vendor Bill (or Customer Invoice).</li>
<li>Specify amount to retain, by percent or amount.</li>
<li>Validate invoice as per normal.</li>
</ol>
<p><strong>To make payment retention</strong></p>
<ol class="arabic simple">
<li>From the invoice, click Register Payment.</li>
<li>On the payment window, system suggest the retention amount, click on helper toggle to apply it.</li>
<li>By default, enforce retention is checked to ensure that, a valid retention amount and retention account is applied.</li>
<li>Once ready, make payment as per normal. Journal Entry created with a retention account move line (to be cleared at later time).</li>
</ol>
<p><strong>Note:</strong> System just help to validate retention. At the end, user can ignore the retention.</p>
<p><strong>To return the retained amount</strong></p>
<ol class="arabic simple">
<li>As time arrived to return the retained amount. Create the new Vendor Bill (or Customer Invoice).</li>
<li>Select the partner. Return Retention field will list only uncleared retained amount for this partner.</li>
<li>Select one or multiple payments (journal entry), system will auto populate the retained amount.</li>
<li>Validate invoice as per normal, system will now clear (reconcile) that retention.</li>
<li>Proceed to payment as per normal.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_payment_retention%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple">
<li>Ecosoft</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="http://ecosoft.co.th">Ecosoft</a>:<ul>
<li>Kitti U. &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoicing/tree/16.0/account_invoice_payment_retention">OCA/account-invoicing</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_invoice_payment_retention

View file

@ -0,0 +1,397 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import Command, fields
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import Form, TransactionCase
class TestInvoicePaymentRetention(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.invoice_model = cls.env["account.move"]
cls.payment_model = cls.env["account.payment"]
cls.payment_register_model = cls.env["account.payment.register"]
cls.register_view_id = "account.view_account_payment_register_form"
cls.partner = cls.env.ref("base.res_partner_12")
cls.product_3 = cls.env.ref("product.product_product_3")
cls.account_receivable = cls.partner.property_account_receivable_id
cls.account_retention = cls.env["account.account"].create(
{
"code": "RE",
"name": "Retention Account",
"account_type": "liability_current",
"reconcile": True,
}
)
cls.account_receivable_retention = cls.env["account.account"].create(
{
"code": "RE2",
"name": "Retention Receivable Account",
"account_type": "liability_current",
"reconcile": True,
}
)
# Enable retention feature
cls.env.user.groups_id += cls.env.ref(
"account_invoice_payment_retention.group_payment_retention"
)
cls.env.company.retention_account_id = cls.account_retention
cls.env.company.retention_receivable_account_id = (
cls.account_receivable_retention
)
cls.account_revenue = cls.env["account.account"].search(
[
("account_type", "=", "income"),
("company_id", "=", cls.env.company.id),
],
limit=1,
)
cls.account_expense = cls.env["account.account"].search(
[
("account_type", "=", "expense"),
("company_id", "=", cls.env.company.id),
],
limit=1,
)
cls.sale_journal = cls.env["account.journal"].search(
[("type", "=", "sale"), ("company_id", "=", cls.env.company.id)], limit=1
)
cls.purchase_journal = cls.env["account.journal"].search(
[("type", "=", "purchase"), ("company_id", "=", cls.env.company.id)],
limit=1,
)
cls.cust_invoice = cls.invoice_model.create(
{
"name": "Test Customer Invoice",
"move_type": "out_invoice",
"journal_id": cls.sale_journal.id,
"partner_id": cls.partner.id,
"invoice_date": fields.Date.today(),
"invoice_line_ids": [
Command.create(
{
"product_id": cls.product_3.id,
"quantity": 1.0,
"account_id": cls.account_revenue.id,
"name": "[PCSC234] PC Assemble SC234",
"price_unit": 500.00,
},
),
],
}
)
cls.vendor_bill = cls.invoice_model.create(
{
"name": "Test Vendor Bill",
"move_type": "in_invoice",
"journal_id": cls.purchase_journal.id,
"partner_id": cls.partner.id,
"invoice_date": fields.Date.today(),
"invoice_line_ids": [
Command.create(
{
"product_id": cls.env.ref("product.product_product_3").id,
"quantity": 1.0,
"account_id": cls.account_expense.id,
"name": "[PCSC234] PC Assemble SC234",
"price_unit": 500.00,
},
)
],
}
)
# New currency, 2X lower
cls.company_currency = cls.cust_invoice.currency_id
cls.company_currency.write(
{
"rate_ids": [
Command.create(
{
"name": fields.Date.today(),
"rate": 1,
},
)
]
}
)
cls.currency_2x = cls.env["res.currency"].create(
{
"name": "2X", # Foreign currency, 2 time
"symbol": "X",
"rate_ids": [
Command.create(
{
"name": fields.Date.today(),
"rate": cls.company_currency.rate * 2,
},
)
],
}
)
def test_01_retention_account(self):
"""Retention account must be set as allow reconciliation"""
self.env.company.retention_account_id = False
self.account_retention.reconcile = False
with self.assertRaises(ValidationError):
self.env.company.retention_account_id = self.account_retention
self.account_retention.reconcile = True
self.env.company.retention_account_id = self.account_retention
# Receivable
self.env.company.retention_receivable_account_id = False
self.account_receivable_retention.reconcile = False
with self.assertRaises(ValidationError):
self.env.company.retention_receivable_account_id = (
self.account_receivable_retention
)
self.account_receivable_retention.reconcile = True
self.env.company.retention_receivable_account_id = (
self.account_receivable_retention
)
def test_02_invoice_payment_retention_errors(self):
"""Test invoice retention amount warning
Test enforce retention warning when no valid retention
"""
# Test invoice retention amount calculation
with self.assertRaises(ValidationError):
self.cust_invoice.payment_retention = "percent"
self.cust_invoice.retention_method = "untax"
self.cust_invoice.amount_retention = 101.0
with self.assertRaises(ValidationError):
self.cust_invoice.payment_retention = "percent"
self.cust_invoice.retention_method = "total"
self.cust_invoice.amount_retention = 101.0
with self.assertRaises(ValidationError):
self.cust_invoice.payment_retention = "amount"
self.cust_invoice.amount_retention = 501.0
# Now setup valid amount equal to 50
self.cust_invoice.payment_retention = "percent"
self.cust_invoice.retention_method = "untax"
self.cust_invoice.amount_retention = 10
self.assertEqual(self.cust_invoice.retention_amount_currency, 50.0)
self.cust_invoice.action_post()
# Register Payment
ctx = {
"active_ids": [self.cust_invoice.id],
"active_id": self.cust_invoice.id,
"active_model": "account.move",
"default_enforce_payment_retention": False,
}
with Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
) as f:
f.enforce_payment_retention = True
payment_register = f.save()
# Test enforce retention warning when retention amount/account not valid
with self.assertRaises(ValidationError):
payment_register.action_create_payments()
def test_03_cust_invoice_payment_retention_normal(self):
"""Test 2 invoice retention and 1 retetnion return invoice"""
self.cust_invoice2 = self.cust_invoice.copy({"name": "Test Invoice 2"})
# Invoice 1, 10% = 50.0
self.cust_invoice.payment_retention = "percent"
self.cust_invoice.retention_method = "untax"
self.cust_invoice.amount_retention = 10.0
self.assertEqual(self.cust_invoice.retention_amount_currency, 50.0)
self.cust_invoice.action_post()
# Invoice 2, 100.0
self.cust_invoice2.payment_retention = "amount"
self.cust_invoice2.amount_retention = 100.0
self.assertEqual(self.cust_invoice2.retention_amount_currency, 100.0)
self.cust_invoice2.action_post()
# Invoice 1 register payment
ctx = {
"active_ids": [self.cust_invoice.id],
"active_id": self.cust_invoice.id,
"active_model": "account.move",
}
with Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
) as f:
f.enforce_payment_retention = True
f.apply_payment_retention = True
payment_register = f.save()
self.assertEqual(payment_register.retention_amount_currency, 50.0)
# Test enforce retention warning when retention amount/account not valid
payment_dict = payment_register.action_create_payments()
payment = self.payment_model.browse(payment_dict.get("res_id", False))
self.assertEqual(payment.reconciled_invoice_ids, self.cust_invoice)
payment_moves = payment.line_ids.mapped("move_id")
# Invoice 2 register payment
ctx = {
"active_ids": [self.cust_invoice2.id],
"active_id": self.cust_invoice2.id,
"active_model": "account.move",
}
with Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
) as f:
f.enforce_payment_retention = True
f.apply_payment_retention = True
payment_register = f.save()
self.assertEqual(payment_register.retention_amount_currency, 100.0)
# Test enforce retention warning when retention amount/account not valid
payment_dict = payment_register.action_create_payments()
payment = self.payment_model.browse(payment_dict.get("res_id", False))
self.assertEqual(payment.reconciled_invoice_ids, self.cust_invoice2)
payment_moves += payment.line_ids.mapped("move_id")
# invoice 3, return retention
view_id = "account.view_move_form"
with Form(
self.invoice_model.with_context(default_move_type="out_invoice"),
view=view_id,
) as f:
f.partner_id = self.partner
cust_invoice3 = f.save()
self.assertEqual(cust_invoice3.domain_retained_move_ids, payment_moves)
self.assertFalse(cust_invoice3.invoice_line_ids)
# Select retained moves
with Form(
cust_invoice3.with_context(check_move_validity=False), view=view_id
) as inv:
for move in payment_moves:
inv.retained_move_ids.add(move)
cust_invoice3 = inv.save()
self.assertTrue(cust_invoice3.invoice_line_ids)
cust_invoice3.action_post()
def test_04_vendor_bill_payment_retention_currency(self):
"""Test 2 invoice retention and 1 retetnion return invoice"""
self.vendor_bill2 = self.vendor_bill.copy({"name": "Test Bill 2"})
# Invoice 1, 10% = 50.0
self.vendor_bill.payment_retention = "percent"
self.cust_invoice.retention_method = "untax"
self.vendor_bill.amount_retention = 10.0
self.assertEqual(self.vendor_bill.retention_amount_currency, 50.0)
self.vendor_bill.action_post()
# Invoice 2, 100.0
self.vendor_bill2.currency_id = self.currency_2x
self.vendor_bill2.payment_retention = "amount"
self.vendor_bill2.amount_retention = 100.0
self.assertEqual(self.vendor_bill2.retention_amount_currency, 100.0)
self.vendor_bill2.invoice_date = fields.Date.today()
self.vendor_bill2.action_post()
# Invoice 1 register payment
ctx = {
"active_ids": [self.vendor_bill.id],
"active_id": self.vendor_bill.id,
"active_model": "account.move",
}
with Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
) as f:
f.currency_id = self.currency_2x # --> Change to 2x currency
f.enforce_payment_retention = True
f.apply_payment_retention = True
payment_register = f.save()
self.assertEqual(payment_register.retention_amount_currency, 100)
# Test enforce retention warning when retention amount/account not valid
payment_dict = payment_register.action_create_payments()
payment = self.payment_model.browse(payment_dict.get("res_id", False))
self.assertEqual(payment.reconciled_bill_ids, self.vendor_bill)
payment_moves = payment.line_ids.mapped("move_id")
# Invoice 2 register payment
ctx = {
"active_ids": [self.vendor_bill2.id],
"active_id": self.vendor_bill2.id,
"active_model": "account.move",
}
with Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
) as f:
f.currency_id = self.currency_2x # --> Change to 2x currency
f.enforce_payment_retention = True
f.apply_payment_retention = True
payment_register = f.save()
self.assertEqual(payment_register.retention_amount_currency, 100)
# Test enforce retention warning when retention amount/account not valid
payment_dict = payment_register.action_create_payments()
payment = self.payment_model.browse(payment_dict.get("res_id", False))
self.assertEqual(payment.reconciled_bill_ids, self.vendor_bill2)
payment_moves += payment.line_ids.mapped("move_id")
# invoice 3, return retention
view_id = "account.view_move_form"
with Form(
self.invoice_model.with_context(default_move_type="in_invoice"),
view=view_id,
) as f:
f.partner_id = self.partner
vendor_bill3 = f.save()
self.assertEqual(vendor_bill3.domain_retained_move_ids, payment_moves)
# Select retained moves
with Form(
vendor_bill3.with_context(check_move_validity=False), view=view_id
) as inv:
for move in payment_moves:
inv.retained_move_ids.add(move)
vendor_bill3 = inv.save()
vendor_bill3.write(
{
"invoice_date": fields.Date.today(),
}
)
vendor_bill3.action_post()
def test_05_multi_invoice_payment(self):
"""Test multi invoice payment. Not allowed if retention"""
# Test multi invoice payment, no retention
self.invoice_normal1 = self.cust_invoice.copy({"name": "Normal 1"})
self.invoice_normal1.action_post()
self.invoice_normal2 = self.cust_invoice.copy({"name": "Normal 2"})
self.invoice_normal2.action_post()
self.invoice_normal3 = self.cust_invoice.copy({"name": "Normal 3"})
self.invoice_normal3.action_post()
ctx = {
"active_ids": [self.invoice_normal1.id, self.invoice_normal2.id],
"active_model": "account.move",
}
f = Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
)
payment_register = f.save()
payment_register.action_create_payments()
# Test multi invoice payment, with some retention, not allowed
self.cust_invoice2 = self.cust_invoice.copy({"name": "Test Invoice 2"})
self.cust_invoice3 = self.cust_invoice.copy({"name": "Test Invoice 3"})
# Invoice 1, 10% = 50.0 (Untaxed Amount)
self.cust_invoice.payment_retention = "percent"
self.cust_invoice.retention_method = "untax"
self.cust_invoice.amount_retention = 10.0
self.assertEqual(self.cust_invoice.retention_amount_currency, 50.0)
self.cust_invoice.action_post()
# Invoice 2, 5% = 25.0 (Total Amount)
self.cust_invoice2.payment_retention = "percent"
self.cust_invoice2.retention_method = "total"
self.cust_invoice2.amount_retention = 5.0
self.assertEqual(self.cust_invoice2.retention_amount_currency, 28.75)
self.cust_invoice2.action_post()
self.cust_invoice3.action_post()
ctx = {
"active_ids": [
self.cust_invoice.id,
self.cust_invoice2.id,
self.cust_invoice3.id,
],
"active_model": "account.move",
}
f = Form(
self.payment_register_model.with_context(**ctx), view=self.register_view_id
)
payment_register = f.save()
with self.assertRaises(UserError):
payment_register.action_create_payments()

View file

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='ref']" position="after">
<label
for="payment_retention"
attrs="{'invisible': ['|', ('retained_move_ids', '!=', []), ('move_type', '=', 'entry')]}"
groups="account_invoice_payment_retention.group_payment_retention"
/>
<div
class="d-flex"
groups="account_invoice_payment_retention.group_payment_retention"
attrs="{'invisible': ['|', ('retained_move_ids', '!=', []), ('move_type', '=', 'entry')]}"
>
<field name="payment_retention" class="oe_edit_only" />
<field
class="oe_edit_only"
name="retention_method"
attrs="{'invisible': [('payment_retention', '!=', 'percent')], 'required': [('payment_retention', '=', 'percent')]}"
/>
<field
class="oe_edit_only"
name="amount_retention"
placeholder="Amount"
attrs="{'invisible': [('payment_retention', '=', False)]}"
/>
<span
class="oe_edit_only"
attrs="{'invisible': [('payment_retention', '=', False)]}"
> = </span>
<field
name="retention_amount_currency"
attrs="{'invisible': ['|', ('retention_amount_currency', '=', False), ('payment_retention', '=', False)]}"
/>
</div>
<field name="retention_residual_currency" invisible="1" />
<field
name="domain_retained_move_ids"
widget="many2many_tags"
force_save="1"
invisible="1"
groups="account_invoice_payment_retention.group_payment_retention"
/>
<field
name="retained_move_ids"
widget="many2many_tags"
options="{'no_create': True, 'no_edit': True, 'no_open': True}"
attrs="{'invisible': ['|', ('payment_retention', '!=', False), ('move_type', '=', 'entry')]}"
domain="[('id', 'in', domain_retained_move_ids)]"
groups="account_invoice_payment_retention.group_payment_retention"
/>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="model">res.config.settings</field>
<field name="arch" type="xml">
<div id="account_vendor_bills" position="inside">
<div
class="col-12 col-lg-6 o_setting_box"
id="group_payment_retention_setting"
>
<div class="o_setting_left_pane">
<field name="group_payment_retention" />
</div>
<div class="o_setting_right_pane">
<label for="group_payment_retention" />
<div class="text-muted">
This enable retention option in invoice, to be retained on its payment.
</div>
<div
class="content-group"
attrs="{'invisible': [('group_payment_retention' ,'=', False)]}"
>
<div class="mt16">
<label
for="retention_account_id"
class="oe_edit_only"
string="Retention Payable Account"
/>
<field
name="retention_account_id"
attrs="{'required': [('group_payment_retention', '=', True)]}"
/>
</div>
<div class="mt16">
<label
for="retention_receivable_account_id"
class="oe_edit_only"
string="Retention Receivable Account"
/>
<field
name="retention_receivable_account_id"
attrs="{'required': [('group_payment_retention', '=', True)]}"
/>
</div>
</div>
</div>
</div>
<div
class="col-12 col-lg-6 o_setting_box"
id="retention_method_setting"
>
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="retention_method" string="Retention Method" />
<div class="text-muted">
Default your retention method
</div>
<div class="content-group">
<div class="mt16">
<field
name="retention_method"
class="o_light_label"
widget="radio"
/>
</div>
</div>
</div>
</div>
</div>
</field>
</record>
</odoo>

View file

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_payment_register

View file

@ -0,0 +1,92 @@
# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_is_zero
class AccountPaymentRegister(models.TransientModel):
_inherit = "account.payment.register"
retention_amount_currency = fields.Monetary(
string="Suggested Retention",
compute="_compute_retention_amount_currency",
store=True,
help="Expected amount to retain on payment currency",
)
enforce_payment_retention = fields.Boolean(
string="Enforce Retention",
default=True,
help="Enforce retention amount as suggested, otherwise, "
"user can ignore the retention.",
)
apply_payment_retention = fields.Boolean(string="Apply Retention")
@api.depends("journal_id", "currency_id")
def _compute_retention_amount_currency(self):
for rec in self:
rec.retention_amount_currency = 0.0
invoices = rec.line_ids.move_id
for invoice in invoices:
rec.retention_amount_currency += invoice.currency_id._convert(
invoice.retention_residual_currency,
rec.currency_id,
rec.journal_id.company_id,
fields.Date.today(),
)
@api.onchange("enforce_payment_retention")
def _onchange_enforce_payment_retention(self):
if not self.enforce_payment_retention:
self.apply_payment_retention = False
@api.depends(
"source_amount",
"source_amount_currency",
"source_currency_id",
"company_id",
"currency_id",
"payment_date",
"apply_payment_retention",
)
def _compute_amount(self):
res = super()._compute_amount()
for rec in self:
if rec.apply_payment_retention:
rec.amount -= rec.retention_amount_currency
rec.payment_difference_handling = "reconcile"
account = rec.env.company.retention_account_id
if rec.payment_type == "inbound":
account = rec.env.company.retention_receivable_account_id
rec.writeoff_account_id = account
rec.writeoff_label = account.name
return res
def _validate_payment_retention(self):
"""If this payment enforce_payment_retention, after reconciliation
is completed, invoice retention residual should be zero"""
self.ensure_one()
if self.enforce_payment_retention:
invoices = self.line_ids.move_id
residual = sum(invoices.mapped("retention_residual_currency"))
if not float_is_zero(residual, precision_digits=2):
raise ValidationError(
_(
"This payment has retention, please make sure you fill"
" in valid retaintion amount and retention account"
)
)
def action_create_payments(self):
invoices = self.env["account.move"].browse(self._context.get("active_ids"))
if len(invoices) > 1 and invoices.filtered("payment_retention"):
raise UserError(
_(
"Selected invoice(s) require payment retentions, "
"multi invoices payment is not allowed."
)
)
res = super().action_create_payments()
self._validate_payment_retention()
return res

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_payment_register_form" model="ir.ui.view">
<field name="name">account.payment.register.form</field>
<field name="model">account.payment.register</field>
<field name="inherit_id" ref="account.view_account_payment_register_form" />
<field name="arch" type="xml">
<field name="payment_method_line_id" position="after">
<label
for="retention_amount_currency"
attrs="{'invisible': [('retention_amount_currency', '=', 0)]}"
/>
<div
class="d-flex"
attrs="{'invisible': [('retention_amount_currency', '=', 0)]}"
>
<field name="retention_amount_currency" />
<span class="mx-3" />
<field name="apply_payment_retention" widget="boolean_toggle" />
</div>
<field
name="enforce_payment_retention"
attrs="{'invisible': [('retention_amount_currency', '=', 0)]}"
/>
</field>
</field>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Account_invoice_payment_retention Module - account_invoice_payment_retention
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for account_invoice_payment_retention. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,5 @@
# Dependencies
This addon depends on:
- [account](../../odoo-bringout-oca-ocb-account)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon account_invoice_payment_retention or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-account-invoicing-account_invoice_payment_retention"
# or
uv pip install odoo-bringout-oca-account-invoicing-account_invoice_payment_retention"
```

View file

@ -0,0 +1,15 @@
# Models
Detected core models and extensions in account_invoice_payment_retention.
```mermaid
classDiagram
class account_move
class account_move_line
class res_company
class res_config_settings
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: account_invoice_payment_retention. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon account_invoice_payment_retention
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,62 @@
# Security
Access control and security definitions in account_invoice_payment_retention.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[CHANGELOG.md](../CHANGELOG.md)**
- 132 model access rules
- **[doc](../doc)**
- **[docker](../docker)**
- **[input](../input)**
- **[nix](../nix)**
- **[odoo.conf](../odoo.conf)**
- 58 model access rules
- **[odoo_packages_bez_l10n.txt](../odoo_packages_bez_l10n.txt)**
- 1947 model access rules
- **[odoo_packages_bringout.txt](../odoo_packages_bringout.txt)**
- 1947 model access rules
- **[odoo_packages.txt](../odoo_packages.txt)**
- 2085 model access rules
- **[output](../output)**
- **[packages](../packages)**
- **[PACKAGES.md](../PACKAGES.md)**
- 298 model access rules
- **[README.md](../README.md)**
- 338 model access rules
- **[scripts](../scripts)**
- **[temp](../temp)**
- **[TRANSLATION_BS_SUMMARY.md](../TRANSLATION_BS_SUMMARY.md)**
- 146 model access rules
## Record Rules
Row-level security rules defined in:
## Security Groups & Configuration
Security groups and permissions defined in:
- **[security.xml](../account_invoice_payment_retention/security/security.xml)**
- 1 security groups defined
```mermaid
graph TB
subgraph "Security Layers"
A[Users] --> B[Groups]
B --> C[Access Control Lists]
C --> D[Models]
B --> E[Record Rules]
E --> F[Individual Records]
end
```
Security files overview:
- **[security.xml](../account_invoice_payment_retention/security/security.xml)**
- Security groups, categories, and XML-based rules
Notes
- Access Control Lists define which groups can access which models
- Record Rules provide row-level security (filter records by user/group)
- Security groups organize users and define permission sets
- All security is enforced at the ORM level by Odoo

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon account_invoice_payment_retention
```

View file

@ -0,0 +1,8 @@
# Wizards
Transient models exposed as UI wizards in account_invoice_payment_retention.
```mermaid
classDiagram
class AccountPaymentRegister
```

View file

@ -0,0 +1,42 @@
[project]
name = "odoo-bringout-oca-account-invoicing-account_invoice_payment_retention"
version = "16.0.0"
description = "Account Invoice Payment Retention - Odoo addon"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-account>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["account_invoice_payment_retention"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]