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 :
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 :(
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 get(pricetype. field, context= ctx)[prod. id]
amount_unit = prod.price_
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 :(