[FIX] sale_margin: stored field functions cannot trigger other stored field functions

the update of sale.order margin field was trigger with the margin stored field of sale.order.line: This cannot work with the old api
This commit is contained in:
Denis Ledoux 2014-09-30 17:19:00 +02:00
parent 02f4f9a572
commit 117d0d0ca2
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class sale_order(osv.osv):
_columns = {
'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and the cost price.", store={
'sale.order.line': (_get_order, ['margin'], 20),
'sale.order.line': (_get_order, ['margin', 'purchase_price'], 20),
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 20),
}),
}