Skip to Content
Menu
This question has been flagged
2 Replies
3368 Views

I want to track Profit made by each sale person.

Each sale person has multiple customers (i have already added sale person in customers' profile)

Odoo 13 community

I want to add analytic account automatically , because i am afraid my accountant would forget to add analytic account , and analytic P&L would be incorrect.

Avatar
Discard
Best Answer

The method you use could depend on the business logic for deriving the analytic account.

If each salesperson is supposed to assign the same account on all transactions, you can easily do it by assigning user defaults. If it is not that straightforward, you have the option of using either automated actions or python code.

Avatar
Discard
Author

Example. Customer A,B& C are always served by 1 same sale person .( sale person name added to customer profile upon creation)

Should add analytic account automatically when i use customer in invoice.

is it possible to set user default like that?

Please provide an example of what you will be setting up for the Analytic Account and what is the logic for assigning them to the Invoice transaction.

Author

For example, My sale person's name is - Jack

Jack's customer are A , B & C (jack has already been added to saleperson tab in his customer profile)

So jack(sale person) and his customer are linked ( saleperson added automatically in invoice when i choose his customer)

I create an analytic account for him - Jack sale ( need to see P&L and give him sale commission)

***now i only need to link jack(sale person) to his analytic account( Jack sale)***

Jack sale ( analytic account) should be added to invoice line automatically if i choose his customer A, B or C.

Author

Maybe I question should be:

Profit & Loss report based on Sale person/ sale team?

Looks like the user defaults option is off the table since the Analytic Account field is at the line item level and user defaults can be specified only at the top level of the model.

That makes things a bit more complicated. The next best option would be to define automated actions to look up the Analytic Account based on the Salesperson. You will first need to add an attribute to the res.partner model to store the default analytic account for each salesperson and then define an automated action on every model that has an analytic account field to populate the analytic account based on the salesperson associated with the transaction.

Doing this using python code would involve a similar exercise.

Best Answer

Hello

I would rather use the Analytic Default Rule in the Analytic Configuration that enables you to set an analytic account destination related to the  salesperson

Avatar
Discard