This question has been flagged
5 Replies
6612 Views

I have created an analytic account for an installation project. The analytic account of the sale order with all products and fixed hours are reflected on invoice and become income on the analytic account. This is perfect.

For the spend hours the employees enter their time sheet and this is added as cost on the analytic account. Also perfect.

But...The products come from stock. So we can't connect the analytic account to the purchase of the products.

So how to get the cost of the products to the analytic account? Is there a way to make 2 analytic entries on sale invoice? 1 for the income=qtysale price and 1 for cost=qtycost price?

Avatar
Discard
Author

Anyone an idea?

Best Answer

There is no way in stock Odoo to do this, at least not that I could find. However,  we can create a solution.

My solution was to add on to my existing (custom) accounting module. It was quite some hassle to figure out the best way to do this, but I managed a solution, although I am not sure if it is elegant.

Background:

Journal Entries are created in the accounting account (distinct from an analytic account) by the system for outgoing stock moves for delivery orders (in the default setup, anyway). Each of these journal entries can optionally have an associated analytic _distribution_. In turn, this distribution can be associated with a specific analytic account (Ugh).

I have modified the python method used to create these such that the accounting entry will inherit the analytic account from the sale order (if one is specified). In addition, I have a procedure for automatically creating analytic Distributions linked to the appropriate analytic accounts at the level of a job (in my instance, we use Opportunities). If you do not have the ability to create a custom module, you can also perform the same functionality by creating an automated action triggered on creation.

Note that it is also possible to set an analytic account by default for each product sold - so, for example, a purchase of an 'Airfare' product would automatically be appended to an 'Airfare' analytic account. This might conflict with any automated rule, so a custom module is the best option.

I consider the lack of this feature in stock Odoo to be a pretty big gaping hole. I imagine most people don't use the analytics, then, or most companies that use them are service companies. O I missing something big (very very possible, but I couldnt figure out a better way in the existing codebase after some searching... :( )

Sorry, looks like I cant post screenshots, but I'll make a post to the OCA, and anyone interested in this in more detail can contact me privately.

Avatar
Discard
Author Best Answer

Anyone, please?

Avatar
Discard
Best Answer

Same question here! Anyone?

Avatar
Discard
Best Answer

same question here , but am thinking the only was is to run a custom report thats the only solution


Avatar
Discard
Best Answer

Hi, 

a custom solution is necessary. Please pay attention to do not post cost twice, i.e. at consumption and at vendor invoice posting. Unfortunately in odoo it is possible to buy a storage item on stock by entering an analytic account also. therefore we have the item on stock and its analytic cost posted also.

Regards

Claudio Candito

Avatar
Discard