OCA / account-analytic

Odoo Account Analytic Related Addons
GNU Affero General Public License v3.0
101 stars 358 forks source link

[17.0] [ADD] account_analytic_spread_by_tag: New module #655

Closed miquelalzanillas closed 1 day ago

miquelalzanillas commented 3 months ago

This module distributes the amount of the accounting entry among all the analytical accounts that share the same analytical tag. This module is particularly useful for managing costs in projects, departments, or any other analytic dimensions.

Configuration

Before using the module, you need to configure the Analytic Tags and Analytic Accounts.

Analytic Tags

Go to Accounting > Configuration > Analytic Accounting > Analytic Tags.

Create a new tag and enable 'Spread analytic amounts'. Include or exclude analytic accounts while spreading setting the filter located in the same view.

image

Analytic Accounts

Go to Accounting > Configuration > Analytic Accounting > Analytic Accounts.

Create new accounts as needed and set tags mapping field.

image

Usage

While creating an invoice or a move line, you can assign Analytic Tags to each invoice line. These tags will be used to distribute the cost of the line across the associated analytic accounts.

  1. Go to Accounting > Customers > Invoices.

  2. Click on "Create" to create a new invoice. In the invoice lines, select the product, enter the quantity and price, and select the analytic tags.

  3. After posting invoice or account move, this module will automatically create analytic lines for each invoice line based on the associated analytic tags.

Click on "Post" to post the invoice. Go to Accounting > Analytic Accounting > Analytic Items to see the created analytic lines.

image

  1. Cancelling invoice or move: If you cancel the invoice or move, associated analytic lines will be automatically deleted.

@peluko00 @lbarry-apsl @mpascuall @javierobcn Please review.

@APSL cc 155114

lbarry-apsl commented 3 months ago

@miquelalzanillas ,

I think it would be better if the analytic accounts filter showed a table where you could indicate what percentage goes into each analytical account.

miquelalzanillas commented 3 months ago

@miquelalzanillas ,

I think it would be better if the analytic accounts filter showed a table where you could indicate what percentage goes into each analytical account.

Thanks for the feedback.

Percentage distribution is not the purpose of this module, as this functionality is natively implemented from version 16 with the new analytic distribution feature. The main objective of this module is to automatically distribute account move lines among several analytic accounts without the need to specify each account individually (along with a percentage).

This module is useful when landing costs analytic lines need to be created massively on some analytic accounts related to departments or projects

Is true that right now is only covering one formula ( move_line.amount / N analytic accounts) and could be interesting to implement other formulas in the future.

pedrobaeza commented 3 months ago

You can put it in the ROADMAP.

OCA-git-bot commented 3 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

OCA-git-bot commented 3 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

miquelalzanillas commented 1 day ago

Hi @pedrobaeza , just added the ROADMAP.

Could you please review and check if is ready to merge?

Thanks.

pedrobaeza commented 1 day ago

/ocabot merge nobump

OCA-git-bot commented 1 day ago

What a great day to merge this nice PR. Let's do it! Prepared branch 17.0-ocabot-merge-pr-655-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot commented 1 day ago

Congratulations, your PR was merged at 1951ade0b64f90f41f04bcb761af7d46760f1a51. Thanks a lot for contributing to OCA. ❤️