[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
This commit is contained in:
Serpent Consulting Services 2012-12-16 23:57:00 +05:30
parent 0c5bf7e819
commit 12b699150c
1 changed files with 5 additions and 2 deletions

View File

@ -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: