Metadata-Version: 2.1
Name: odoo-addon-account_invoice_advance_compensation
Version: 18.0.1.0.0.2
Requires-Python: >=3.10
Requires-Dist: odoo==18.0.*
Summary: Compensate advance payments from invoices
Home-page: https://github.com/OCA/account-invoicing
License: AGPL-3
Author: Escodoo, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

====================================
Account Invoice Advance Compensation
====================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
    :target: https://github.com/OCA/account-invoicing/tree/18.0/account_invoice_advance_compensation
    :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-18-0/account-invoicing-18-0-account_invoice_advance_compensation
    :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=18.0
    :alt: Try me on Runboat

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

This module provides a comprehensive solution for managing advance
payments and their compensation in Odoo. It enables businesses to
efficiently handle prepayments and their application against regular
invoices through a user-friendly interface.

Key Features:

- Dedicated advance payment tracking for both customers and suppliers
- Flexible compensation wizard for applying advances against invoices
- Automatic reconciliation of advance payments with regular invoices
- Configurable advance payment journals
- Multi-currency support for advance payments

The module streamlines the advance payment process by providing a
structured workflow for recording, tracking, and compensating advance
payments, ensuring accurate financial records and improved cash flow
management.

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

Module Context and Implementation Guide
=======================================

When to Use This Module
-----------------------

This module is particularly valuable for businesses that:

- Regularly process advance payments from customers or to suppliers
- Need to track prepayments separately from regular invoices
- Require precise reconciliation of advances against final invoices
- Operate in project-based or milestone-payment environments

Key Implementation Scenarios
----------------------------

Customer Advances
~~~~~~~~~~~~~~~~~

1. **Service Retainers**

   - Track client deposits against monthly service invoices
   - Example: Law firm applying retainer payments to monthly bills

2. **Product Deposits**

   - Manage customer down payments for goods
   - Example: Manufacturer applying 30% deposit against production order

Supplier Prepayments
~~~~~~~~~~~~~~~~~~~~

1. **Material Purchases**

   - Track and apply prepayments to supplier invoices
   - Example: Construction company managing material prepayments

2. **Service Contracts**

   - Reconcile advance payments to contractors
   - Example: IT firm managing vendor retainers

Technical Context
-----------------

Prerequisites
~~~~~~~~~~~~~

- Odoo Accounting module installed
- Properly configured Chart of Accounts
- At least one journal marked as "Advance Journal"

Integration Points
~~~~~~~~~~~~~~~~~~

- Works with standard Odoo invoicing workflow
- Extends the account.move model
- Compatible with:

  - Odoo's native multi-currency
  - Multi-company setups
  - Standard reporting features

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

Configuration Guide
===================

Core Setup
----------

1. Journal Configuration
~~~~~~~~~~~~~~~~~~~~~~~~

| **Path:** ``Accounting → Configuration → Journals``
| **For new journal:**

1. Create → Type: Miscellaneous
2. Name: "Advance Compensation"
3. Code: ADV
4. Default Account: [Select prepayment account]
5. Advanced Settings → ☑ **Is Advance Journal**

2. Prepayment Accounts
~~~~~~~~~~~~~~~~~~~~~~

**Path:** ``Accounting → Configuration → Chart of Accounts``

- **Customer Advances**:

  - Type: Current Assets
  - Name: "Advances Receivable"
  - ☑ Allow Reconciliation

- **Supplier Advances**:

  - Type: Current Liabilities
  - Name: "Advances Payable"
  - ☑ Allow Reconciliation

3. Advance Product
~~~~~~~~~~~~~~~~~~

**Path:** ``Inventory → Products``

- Name: "Advance Payment"
- Type: Service
- Accounting:

  - Income/Expense: [Linked to prepayment account]

Usage
=====

This module allows you to manage advance payments and their compensation
against regular invoices. It supports both customer and supplier
invoices, with multi-currency capabilities.

Step-by-Step Process
--------------------

1. Recording an Advance Payment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Create a new invoice with the "Advance" product
2. Register the complete payment for the advance invoice
3. The advance will be available for compensation once fully paid

2. Applying Compensation
~~~~~~~~~~~~~~~~~~~~~~~~

1. Open the regular invoice (must be for the same partner)
2. Click the **Compensate Advance** button
3. In the compensation wizard:

   - Select available advance(s) from the left panel
   - Choose invoice lines to compensate on the right
   - Enter the compensation amount

4. Click **Compensate** to apply the compensation

Key Features
------------

Supported Scenarios
~~~~~~~~~~~~~~~~~~~

- Customer and supplier invoices
- Partial compensation of advances
- Multi-currency transactions
- Multiple advance compensations per invoice

Prerequisites
~~~~~~~~~~~~~

- Advance invoice must be fully paid
- Regular invoice must be for the same partner
- Accounts must be reconcilable
- Proper journal configuration

Troubleshooting
---------------

Common Issues
~~~~~~~~~~~~~

1. **Advance not appearing in compensation wizard**

   - Verify the advance invoice is fully paid
   - Check if the partner matches
   - Confirm journal settings are correct

2. **Compensation not working**

   - Ensure accounts are properly configured
   - Check currency compatibility
   - Verify user has necessary permissions

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_advance_compensation%0Aversion:%2018.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
-------

* Escodoo

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

- ``Escodoo <https://www.escodoo.com.br>``\ \_:

  - Marcel Savegnago marcel.savegnago@escodoo.com.br
  - Kaynnan Lemes kaynnan.lemes@escodoo.com.br

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/18.0/account_invoice_advance_compensation>`_ project on GitHub.

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