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