Skip to Content
Menu
This question has been flagged

Without going into much detail...

overriding the _store_get_values of a custom model i have gives a different result when i return the super directly then when i use a temp result variable

def _store_get_values(self, cr, uid, ids, fields, context=None):
    return super(purchase_approval_item, self)._store_get_values(cr, uid, ids, fields, context)


returns

[(10, 'purchase.approval.item', [13484L], ['line_next_approver_id', 'next_approver_id', 'line_id', 'partner_id'])]

and 

def _store_get_values(self, cr, uid, ids, fields, context=None):
    result = super(purchase_approval_item, self)._store_get_values(cr, uid, ids, fields, context)
    return result

returns

[(10, 'purchase.approval.item', [13485L], ['line_id', 'next_approver_id', 'partner_id', 'line_next_approver_id'])]

You see the order of the fields ['line_id', 'next_approver_id', 'partner_id', 'line_next_approver_id'] is different.

What am i doing different or could be the reason of this behaviour?

Avatar
Discard

Are you sure that you are calling exactly the same operation... the order can differ based on the operation. """Returns an ordered list of fields.function to call due to an update operation on ``fields`` of records with ``ids``, """

Related Posts Replies Views Activity
1
Jan 24
3464
2
Dec 15
2985
1
Mar 15
3155
1
Mar 15
30319
2
Mar 15
3334