projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f4f9a
)
[FIX] sale_margin: stored field functions cannot trigger other stored field functions
author
Denis Ledoux
<dle@odoo.com>
Tue, 30 Sep 2014 15:19:00 +0000
(17:19 +0200)
committer
Denis Ledoux
<dle@odoo.com>
Thu, 27 Nov 2014 11:06:19 +0000
(12:06 +0100)
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
addons/sale_margin/sale_margin.py
patch
|
blob
|
history
diff --git
a/addons/sale_margin/sale_margin.py
b/addons/sale_margin/sale_margin.py
index
6329463
..
b5c1821
100644
(file)
--- a/
addons/sale_margin/sale_margin.py
+++ b/
addons/sale_margin/sale_margin.py
@@
-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),
}),
}