Comment 4 for bug 704469

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Just a little things more. I think just adding the currency (in context) in which you want the result in the on_change_unit_amount of analytic_line, should give the right result :

context['currency_id']=company_obj.browse(cr,uid,company_id).currency_id.id
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]

This trouble comes, as you said Quentin, cause you remove my code (with full support of multi-currency / multi-comapny in analytic accounting). But you let some parts... without lots of testing I think :(