account_analytic_default not working

Bug #493444 reported by gpa(OpenERP)
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
gpa(OpenERP)

Bug Description

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

Related branches

summary: - account_analytic_default not working?
+ account_analytic_default not working
Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Andreas Porevopoulos (sv1jsb) wrote :

I would like to add another thought of mine.
At purchase order there is the possibility of the user to add an analytic account at every line of the order.
This is not available at a sale order.
By adding an analytic_account_id field to sale.order.line we solve the product_id_change event problem,
and we make sale and purchase procedures more alike to each other, something which is more easy for an average user.

Changed in openobject-addons:
assignee: nobody → gpa(Open ERP) (gpa-openerp)
status: Confirmed → In Progress
Revision history for this message
gpa(OpenERP) (gpa-openerp) wrote :

Hello,

Can you apply the attached patch and notify me?

Thanks.

Revision history for this message
Andreas Porevopoulos (sv1jsb) wrote :

Hello,

I applied the patch and it's working fine.

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

Fixed in stable addons, take update of your code
revision-id: <email address hidden>

Thanks

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

More accurate fix has been committed by revision 2476 <email address hidden>.

Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.