From 12b699150cabcb7870d25fdb4096819baaa97a1f Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Date: Sun, 16 Dec 2012 23:57:00 +0530 Subject: [PATCH] [FIX] sale_margin : function _get_order cannot use super call lp bug: https://launchpad.net/bugs/1090931 fixed bzr revid: support@serpentcs.com-20121216182700-63fzj4wi6d49kz1d --- addons/sale_margin/sale_margin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/sale_margin/sale_margin.py b/addons/sale_margin/sale_margin.py index bbb2df673ff..1e5756d9aee 100644 --- a/addons/sale_margin/sale_margin.py +++ b/addons/sale_margin/sale_margin.py @@ -70,7 +70,10 @@ class sale_order(osv.osv): return result def _get_order(self, cr, uid, ids, context=None): - return super(sale_order, self)._get_order(cr, uid, ids, context=context) + result = {} + for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): + result[line.order_id.id] = True + return result.keys() _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={ @@ -81,4 +84,4 @@ class sale_order(osv.osv): sale_order() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file