Skip to content

[IMP] accouting/l10n_br: Adding information about credit usage in the Avalara integration .rst #13630

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

Open
wants to merge 7 commits into
base: 18.0
Choose a base branch
from

Conversation

giri-odoo
Copy link

@giri-odoo giri-odoo commented Jun 9, 2025

To comply with legal requirements—especially consumer protection laws (Lei de Proteção ao Consumidor) — and to ensure full transparency with our users, we provide the following explanation of how credit consumption works in the Avalara integration.

o comply with legal requirements—especially consumer protection laws (Lei de Proteção ao Consumidor) — and to ensure full transparency with our users, we provide the following explanation of how credit consumption works in the Avalara integration.
@robodoo
Copy link
Collaborator

robodoo commented Jun 9, 2025

Pull request status dashboard

@giri-odoo
Copy link
Author

@sclo-odoo @vbe-odoo

@vbe-odoo vbe-odoo self-requested a review June 9, 2025 14:37
Copy link
Contributor

@vbe-odoo vbe-odoo left a comment

Choose a reason for hiding this comment

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

Hello @giri-odoo
Thanks for the PR with the improvements!

I left some comments as part of my pre-review, this PR will be reviewed by other teams after I conclude my review.

Help me improving the PR and commit title, you can take the PR done by @sclo-odoo here #12921
Example: [IMP] accouting/l10n_br: Adding NFC-e feature

That is the title convention needed. You can try using the GitHub desktop to make that edit, try here on the web-based GitHub, if close and create a new PR if those 2 steps weren't possible.

Thanks again!

Comment on lines 181 to 183
- Correction letter (Carta de Correção)
- Invoice cancellation
- Other tax validations
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
- Correction letter (Carta de Correção)
- Invoice cancellation
- Other tax validations
- :ref:`Correction letter (Carta de Correção) <localizations/brazil/correction-letter>`
- :ref:`Invoice cancellation <localizations/brazil/invoice-cancellation>`
- :ref:`Sales Refund via Credit Note <localizations/brazil/credit-notes>`
- :ref:`Sales Complementary Invoice via Debit Note <localizations/brazil/debit-notes>`
- :ref:`Invalidate invoice number range <localizations/brazil/invalidate-invoice-number-range>`
- Other tax validations.

Please do the same for the NFS-e section.
Feel free to modify of add cases, but if we are gonna add the detailed consumption, it is better to add all scenarios where a credit is consumed, which is every time a API call is done, like in the added scenarios. I've added the links to the specific section within the User Doc as we have it, and it is good to refer the user to that section if needed.

For Credit Notes (sales refund) and Debit Notes (Sales Complementary), there's also a Tax Computation required, so maybe you would like to add that a Tax Computation will be consumed on those scenarios as well.
:ref:create an account in AvaTax <localizations/brazil/avatax-account>

.. important::
The Avalara integration operates on a credit-based system, where each interaction with Avalara consumes 1 credit. Below are the main credit-consuming operations:

:guilabel:`Sales Application`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested changes on the NF-e section also applies here.

@giri-odoo giri-odoo changed the title Update brazil.rst [IMP] accouting/l10n_br: Adding information about credit usage in the Avalara integration .rst Jun 9, 2025
@giri-odoo
Copy link
Author

@vbe-odoo Thanks for the feedback! I've already made all the changes.

@vbe-odoo
Copy link
Contributor

vbe-odoo commented Jun 9, 2025

Hello @giri-odoo, thanks for the changes.

Just a few remarks:

  • The E-Invoice for goods (NF-e) and E-Invoice for services (NFS-e) sections are not looking so nice when checking in runbot (you can check this by copiying the branch name giri-odoo-patch-1 > go to https://runbot.odoo.com/ > Access and wake up the Documentation build and then when on the user documentation > go to Fiscal Localizations > Brazil > there you can check your changes > Video.
  • PoS Section has the same problem.

Here are the images:
image
image
image

Thanks!
cc' @sclo-odoo

@giri-odoo
Copy link
Author

Hi @vbe-odoo , I made the requested formatting changes. Please see the images. For some reason I couldn't identify, the initial text of the NFC-e is in bold. Do you have any idea why ?

Here the images:
image
image
image

@vbe-odoo
Copy link
Contributor

vbe-odoo commented Jun 10, 2025

Hi @giri-odoo I don't really know why it is bolded, and something else I could not identify why is not working, is the last link on the bullet points (- :ref:`Invalidate invoice number range <localizations/brazil/invalidate-invoice-number-range>) somehow that link is not showing up, but I think the guys from MKT could help us with this.

@samueljlieber hello 👋 !
Can you help me review this PR whenever you have some time?

Thanks! 🙏
cc' @sclo-odoo

@giri-odoo
Copy link
Author

@vbe-odoo Thanks for your response and your help! I'll be standing by!

cc: @sclo-odoo

@vbe-odoo vbe-odoo requested a review from samueljlieber June 12, 2025 12:58
@samueljlieber
Copy link
Contributor

samueljlieber commented Jun 13, 2025

Hi @giri-odoo! Thank you for your contribution! I took a quick look at the helpful information you've added, and there seems to be the same explination in two spots (in NF-e and NFS-e sections).

To avoid writing the same content twice, I suggest placeing this information in a single spot and then it can be referenced in multiple locations.

Since this information is about the Avalara integration, it makes sense to me to include this information in the Avalara integration section, what do you think?

I also suggest slightly modifying the formatting to utilize the note and example admonition blocks. And to try something different, we could use a flowchart to illustrate the credit consumption example:

Screenshot 2025-06-13 at 14-46-28 Brazil — Odoo 18 0 documentation

View the RST code for this 👆
.. important::
   The Avalara integration works on a credit-based system, where each interaction with Avalara
   consumes 1 credit. Below are the main credit-consuming operations:

   **Sales application**

   - Tax calculation on quotations and sales orders.

   **Accounting application**

   - Tax calculation on invoices.
   - Electronic invoice submission (NF-e or NFS-e).

   **Occasional operations**: (each step is billed separately)

   - :ref:`Correction letter (Carta de Correção) <localizations/brazil/correction-letter>`
   - :ref:`Invoice cancellation <localizations/brazil/invoice-cancellation>`
   - :ref:`Sales refund via credit note <localizations/brazil/credit-notes>`
   - :ref:`Sales complementary invoice via debit note <localizations/brazil/debit-notes>`
   - :ref:`Invalidate invoice number range <localizations/brazil/invalidate-invoice-number>`
   - Other tax validations.

.. note::
   If taxes are calculated in **Sales** and later issue the invoice in **Accounting**, the
   calculation happens twice, consuming 2 credits.

.. example::

   .. graphviz::

      digraph avalara_credit_consumption {
         rankdir=TB;
         node [shape=box];

         "Sales order confirmed" -> "Invoice created" [label=" 1 credit (tax calculation)"];
         "Invoice created" -> "Invoice confirmed and submitted"
         [label=" 1 credit (tax calculation)"];
         "Invoice confirmed and submitted" -> "Credits summary"
         [label=" 1 credit (tax calculation)\n+\n 1 credit (submit invoice)"];
         "Credits summary"
         [label="Total: 4 credits", shape=ellipse, style=filled, fillcolor=lightgrey];
      }

Let me know your thoughts @giri-odoo @vbe-odoo and I am happy to discuss further and/or make a second commit with these changes! Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants