Skip to Content
Menú
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
Descartar

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 Respostes Vistes Activitat
1
de gen. 24
4347
2
de des. 15
3742
1
de març 15
3748
1
de març 15
31633
2
de març 15
4329