[MERGE] Fix sale.order.line's `invoiced` flag, as part of forward-port of 6.1 server...
authorOlivier Dony <odo@openerp.com>
Fri, 30 Nov 2012 16:18:09 +0000 (17:18 +0100)
committerOlivier Dony <odo@openerp.com>
Fri, 30 Nov 2012 16:18:09 +0000 (17:18 +0100)
After forward-porting the 6.1 server bugfixes to trunk, a hidden bug
was revealed in the way sale.order.line's `invoiced` field
is updated. It makes the sale/test/cancel_order.yml test fail,
because the "recreate invoice" action does not work properly
if there are multiple cancelled invoices, due to incorrect
and outdated `invoiced` values on sale.order.lines.

By replacing the invoiced field with a stored fields.function
we simplify the code and fix this incorrect behavior at the
same time.

bzr revid: odo@openerp.com-20121130161809-0sf3z8k2530ze2zl


Trivial merge