Skip to content

Feature Request - Analytic Distribution based on sales team #855

@rfindling-gpc

Description

@rfindling-gpc

1. Project Overview

In Odoo standard, it’s possible to create the analytic distribution based on:

  • Partner

  • Partner Category

  • Accounts Prefixes

  • Product

  • Product Category

  • Company

And we need the analytic distribution based on the Sales Team.

Workflow Summary:

When the Sales Order is created, it should trigger the analytic account set in the analytic distribution linked to the sales team set in the sales order and configured in the Analytic Distribution.


2. Practical Information

Odoo Version | 18.0 -- | --
  • Once the user saves the Analytic Distribution based on the sales team, it will be triggered automatically in the sales order level (Odoo standard behavior).

  • When the invoice is created, the invoice triggers the same sales team set in the sales order and when the invoice is posted, the analytic items are created (Odoo standard behavior).

  • When the invoice is posted, analytic entries are created. They should follow the distribution defined on the analytic distribution configuration, unless the distribution is manually updated on the sales order or invoice level, or not configured for selected conditions (Odoo standard behavior).

  • The customization will create the sales team as a new field in the analytic distribution condition.

  • If the sales team is updated on the sales order level or invoice level, the analytic account will be updated based on the new distribution linked to the selected sales team.


5. Functional Requirements

  • Select the sales team as a condition to create analytic distributions

  • If no sales team is configured on a model, it behaves exactly as today.

  • If, on the SO level, the sales team is updated, the analytic account should be updated as well.

  • No migration of existing tags is required.

  • Implementation Notes - Partner categories should remain untouched to avoid breaking existing setups.

  • This customization should be applied to sales orders, invoices, and credit notes.

  • The analytic distribution must be updated in case the sales team is changed. However, the update will not be applicable if the sales order is confirmed, or invoiced and credit note posted. Once the journal items are posted, the analytic accounts will not be updated in case of changes in the SO, unless the invoice is reset to draft.


6. User Interface (UI) Changes Mock-ups


Image

Image

7. Odoo Modules to Be Customized

  • Accounting

  • Sales

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions