Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2891 Visualizzazioni

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
Abbandona

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``, """

Post correlati Risposte Visualizzazioni Attività
1
gen 24
4269
2
dic 15
3695
1
mar 15
3690
1
mar 15
31550
2
mar 15
4244