account_analytic_default not working?

Asked by Andreas Porevopoulos

OpenERP 5.0.6 stable
account_analytic_default 5.0.1.0
Windows XPSP3

I'm trying to use this module. As far as I understand it makes a connection (relation) with one
analytic account and one of products, partners, users.
I'm registering a sale order, deliver goods, invoicing, but at the invoice line of my related product with an analytic account,
there is no mention of that analytic account, the user must enter it manually.
Isn't this what it's supposed to do?

I found out from the code that the def responsible for filling the analytic account field is product_id_change.
When you are starting from a sale and delivery order the invoice created is already filled with lines so there is no
product_id_change event to trigger the action.
If you enter a new invoice with new lines it works.
But not so well.
I have two products one related with an analytic, the other not.
New invoice, new line with the first product analytic field filled.
Before pressing OK I changed my mind, it's not this product I want, it's the other.
Pressing magnifying glass, changing to second product, the analytic account field stays filled with the previous data.

Also, the declaration of argument "type='out_invoice'" makes this a module used only for selling.
Omitting it would make it usable at purchasing too.

Best regards
Andreas

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Andreas Porevopoulos
Solved:
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello,

Please check the attached bug related patch :

https://bugs.launchpad.net/openobject-addons/+bug/493444

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#2

Hello Andreas,

Would you please comment on this one?

Thanks.

Revision history for this message
Andreas Porevopoulos (sv1jsb) said :
#3

Hello Jay,

This is resolved. vra has changed this from question to a bug report and solved it.
At the stable branch is fine.

Thanks

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#4

Thank you for your response.