Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] accounting/l10n_ar: purchase withholding automation #11770

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions content/applications/finance/fiscal_localizations/argentina.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ localization:
- `l10n_ar_website_sale`
- (optional) Allows the user to see Identification Type and AFIP Responsibility in the
eCommerce checkout form in order to create electronic invoices.
* - :ref:`Argentina - Payment Withholdings <l10n_ar/payment-withholdings>`
- `l10n_ar_withholding`
- Allows to register withholdings during the payment of an invoice.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Allows to register withholdings during the payment of an invoice.
- Allows registering withholdings during the payment of an invoice.


.. _argentina/configure-your-company:

Expand Down Expand Up @@ -678,6 +681,147 @@ the invoice can then be validated.
:align: center
:alt: Enter the perception amount.

.. _l10n_ar/payment-withholdings:

Withholding management
----------------------

The Argentinean fiscal localization module is already loaded with the necessary withholdings
records, which can be seen by navigating to :menuselection:`Accounting app --> Configuration -->
Taxes`. To verify these records, the **Argentina Payment Withholdings** (`l10n_ar_withholding`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Taxes`. To verify these records, the **Argentina Payment Withholdings** (`l10n_ar_withholding`)
Taxes` and removing the default :guilabel:`Sale or Purchase` filter. To verify these records, the **Argentina Payment Withholdings** (`l10n_ar_withholding`)

module must be :ref:`installed <general/install>`:

Journal entries are *not* created when payments are posted until outstanding accounts are set up.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Journal entries are *not* created when payments are posted until outstanding accounts are set up.
Journal entries are *not* created when payments are posted unless :ref:`outstanding accounts <accounting/bank/outstanding-accounts>` are set up.
  • Let's say "unless" instead of "until" because "until" makes it seem like setting up outstanding accounts might retroactively create payments for old journal entries.
  • Let's reference the outstanding accounts section of the bank doc that we just updated to explain this :)

Thus, for this feature to work properly, it is important to verify that *all* payment methods within
the bank journals have an outstanding payment and receipt account set.

.. image:: argentina/l10n-ar-outstanding-payments.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example of a useful screenshot for a few reasons:

  1. It shows an example of a configuration, not just something that comes included with the localization.
  2. It gives an example of what account could be used for the outstanding payments account.

It does more than just show that something exists. The other screenshots in this section don't, so let's remove them. Especially with these really long localization pages, we're just creating a huge amount of unnecessary work to maintain the screenshots when there are minor UI updates in future versions.

:alt: An outstanding payment account must be set.

This configuration is crucial for the proper accounting of withholding transactions with clients
and vendors.

Configuration
~~~~~~~~~~~~~

As mentioned, Odoo already creates most of the required withholdings inside the :guilabel:`Taxes`
menu. In several cases, it is necessary to apply or modify certain configurations to correctly
Comment on lines +707 to +708
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As mentioned, Odoo already creates most of the required withholdings inside the :guilabel:`Taxes`
menu. In several cases, it is necessary to apply or modify certain configurations to correctly
While Odoo already creates most of the required withholdings inside the :guilabel:`Taxes`
menu, in several cases, it is necessary to apply or modify certain configurations to correctly

calculate the withholding amount on vendor payments. The current withholding types available are:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
calculate the withholding amount on vendor payments. The current withholding types available are:
calculate the withholding amount on vendor payments. The following withholding types are available:


- :ref:`Earnings <l10n_ar/earnings-withholdings>`
- :ref:`Earnings Scale <l10n_ar/earnings-scale-withholdings>`
- :ref:`IIBB Total Amount <l10n_ar/iib-total-amount-withholdings>`
- :ref:`IIBB Non-Taxable <l10n_ar/iib-nontax-withholdings>`

.. _l10n_ar/earnings-withholdings:

Earnings withholdings
*********************
Comment on lines +718 to +719
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Earnings withholdings
*********************
Earnings
********


For :guilabel:`Earnings` withholdings, Odoo already has a record for each regime group, which is
stated under the name of the tax and the AFIP code.

Each of these records are ready to be used. As a good practice, the configuration should be double
checked to make sure the configuration is updated and well-applied. The fields to validate are:

- :guilabel:`Amount`: This is the percentage of the total payment amount which is withheld.
- :guilabel:`Non-Taxable Amount`: Up to this amount, the withholding does not apply.
- :guilabel:`Minimum Withholding`: If the calculated withholding amount is smaller than this value,
the total withholding amount is set to `0.0`.
- :guilabel:`Withholding Sequence`: This field helps to automate the capture of a withholding number
under the payment line. If this field is not set, a number is manually captured while adding a
withholding to a payment.
Comment on lines +724 to +733
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does all of this apply only to Earnings withholdings? It seems like it's the standard that you're using for all four withholding types. If that's the case, it would make more sense to put it in the Configuration section so that it's not isolated under only one withholding type but meant to be referenced for all of them.

It could come after the list of all four withholding types with something like the following:

All of the default withholding taxes are ready to be used, but as a good practice, the configuration should be double checked to make sure that all of the details are correct for the tax and jurisdiction. Although the visible fields and the fields to validate change slightly from one withholding type to another, generally, the fields to validate are the following:


.. image:: argentina/l10n-ar-earnings.png
:alt: Earnings withholding type.

.. _l10n_ar/earnings-scale-withholdings:

Earnings scale withholdings
***************************
Comment on lines +740 to +741
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Earnings scale withholdings
***************************
Earnings Scale
**************

Let's use the actual M2O names for the headings


In this particular case, a percentage does not need to be set. However, this withholding is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this particular case, a percentage does not need to be set. However, this withholding is
In this particular case, a percentage does not need to be set. Instead, this withholding is

calculated based on the :guilabel:`Scale` related to this field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
calculated based on the :guilabel:`Scale` related to this field.
calculated based on the value of the :guilabel:`Scale` field.


.. image:: argentina/l10n-ar-earnings-scale.png
:alt: Earnings Scales withholding type.

Comment on lines +746 to +748
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: argentina/l10n-ar-earnings-scale.png
:alt: Earnings Scales withholding type.

To view, modify, or create new scales, first activate :ref:`developer mode <developer-mode>` and
then navigate to :menuselection:`Accounting app --> Configuration --> Earnings Scale`. By default,
Comment on lines +749 to +750
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To view, modify, or create new scales, first activate :ref:`developer mode <developer-mode>` and
then navigate to :menuselection:`Accounting app --> Configuration --> Earnings Scale`. By default,
To view, modify, or create new scales, navigate to :menuselection:`Accounting app --> Configuration --> Earnings Scale`. By default,

From testing in runbot, it seems that developer mode isn't necessary

Odoo comes loaded with two main scales. However, scales should be created and updated as necessary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Odoo comes loaded with two main scales. However, scales should be created and updated as necessary
the Argentinian localization is preconfigured with two main scales. However, scales should be created and updated as necessary

to suit a business' needs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to suit a business' needs.
to suit a business's needs.

I know it looks weird, but it's actually "business's"


.. image:: argentina/l10n-ar-earnings-scale-1.png
:alt: Earnings Scale table to modify if applicable.

Comment on lines +754 to +756
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: argentina/l10n-ar-earnings-scale-1.png
:alt: Earnings Scale table to modify if applicable.

.. note::
Earnings Scales are cumulative, which means that Odoo keeps track of the different records
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Earnings Scales are cumulative, which means that Odoo keeps track of the different records
Earnings scales are cumulative, which means that Odoo keeps track of the different records

created for a bill and automatically calculating the proper withholding amount.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
created for a bill and automatically calculating the proper withholding amount.
created for a bill and automatically calculates the proper withholding amount.


.. _l10n_ar/iib-total-amount-withholdings:

IIBB total amount withholdings
******************************
Comment on lines +763 to +764
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IIBB total amount withholdings
******************************
IIBB Total Amount
*****************


In this case, the necessary records related to the applicable province need to be created. The
withholding amount is calculated based on the amount (%) set on the tax configuration. Since Odoo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
withholding amount is calculated based on the amount (%) set on the tax configuration. Since Odoo
withholding amount is calculated based on the percentage :guilabel:`Amount` set on the tax configuration. Since Odoo

does not automatically synchronize the percentages applicable to each province, this information
needs to be manually updated.

.. image:: argentina/l10n-ar-total-amount-withholding.png
:alt: Total Amount Withholding

Comment on lines +771 to +773
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: argentina/l10n-ar-total-amount-withholding.png
:alt: Total Amount Withholding

Comment on lines +771 to +773
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: argentina/l10n-ar-total-amount-withholding.png
:alt: Total Amount Withholding

The recommendation, in this case, is to always duplicate and apply the different configurations for
each record to safeguard any technical configurations that allow the proper calculation and
accounting of the withholding.

.. _l10n_ar/iib-nontax-withholdings:

IIBB non-taxable withholding
****************************
Comment on lines +780 to +781
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IIBB non-taxable withholding
****************************
IIBB Untaxed
************


The configuration of Non-Taxable Gross Income withholdings is very similar to that of a :ref:`total
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The configuration of Non-Taxable Gross Income withholdings is very similar to that of a :ref:`total
The configuration of non-taxable gross income withholdings is very similar to that of a :ref:`total

amount withholding <l10n_ar/iib-total-amount-withholdings>`, so the :guilabel:`Amount (%)` in each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
amount withholding <l10n_ar/iib-total-amount-withholdings>`, so the :guilabel:`Amount (%)` in each
amount withholding <l10n_ar/iib-total-amount-withholdings>`, so the percentage :guilabel:`Amount` in each

of the records needs to be maintained. However, Odoo comes loaded with several records that apply to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
of the records needs to be maintained. However, Odoo comes loaded with several records that apply to
of the records needs to be maintained. However, Odoo comes preconfigured with several records that apply to

different provinces. The difference, in this case, is that it is not necessary to establish a
*Non-Taxable Amount* or *Minimum Withholding* for this record type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Non-Taxable Amount* or *Minimum Withholding* for this record type.
non-taxable amount or minimum withholding for this record type.


.. image:: argentina/l10n-ar-non-taxable.png
:alt: Non Taxable

Comment on lines +789 to +791
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: argentina/l10n-ar-non-taxable.png
:alt: Non Taxable

Partner withholding assignation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Once the proper configuration is set on each possible withholding for partners, the applicable
withholdings need to be assigned to each contact. To do this, access the **Contacts** app and select
the desired record. Then, find the :guilabel:`Purchase Withholdings` field in the
:guilabel:`Accounting` tab. By default, only one withholding record is allowed for each type.
However, by using the additional fields :guilabel:`Initial date` and :guilabel:`End date`, new
withholding lines can be added of the same type with different date ranges.

.. image:: argentina/l10n-ar-partner-assignation.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few issues here:

  1. The zoom on this image is significantly different from the others. If we want to keep the image, let's retake it so it's the same as the others.
  2. The field labels seems to be "From Date" instead of not "Initial date", "To Date" instead of "End date", and "Purchase Withholding" instead of "Purchase Withholdings".
  3. When I tested in runbot, I was able to set two withholdings of the same type without using a "from date" or "to date" and save the record without issue.
  4. We should mention that "From Date" and "To Date" have to be revealed with the :icon:oi-settings-adjust (:guilabel:`adjust settings) menu.
  5. We should explain what the "ref" field is.

:alt: Partner assignation

Automatic withholding calculation and application per payment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By applying new payments to vendor bills, Odoo automatically applies and calculates the proper
withholding into the payment. Based on the record's configuration, it may be necessary to use a
reference number for each withholding line.

More withholdings can be added, or computed withholdings can be edited if necessary.

.. image:: argentina/l10n-ar-payment.png
:alt: Payment with applied withholdings.

.. important::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we're lacking a little bit of context for this information. Could you add just a brief explanation on the concept of how withholdings taxes work at the intro of the withholding management section?

The total amount of the debt to be canceled is the total amount of the payment. However, Odoo
still captures the net amount (i.e. the amount to be reconciled with the bank), which will be
represented as the payment amount after the withholding application.

.. image:: argentina/l10n-ar-payment-registered.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's resize this window a little bit so it's not so wide and retake the screenshot :) Instructions on different ways to do that if you need: https://www.odoo.com/documentation/master/contributing/documentation/content_guidelines.html#screenshots

:alt: Payment Registered

Check management
----------------

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.