Comment 3 for bug 1026578

Revision history for this message
Andrius Preimantas @ hbee (andrius-preimantas) wrote :

Ok, so that's what I've figured out so far:

All the action takes place in BaseModel class, inside create method, on lines 4233-4240:

At the beginning of new account.invoice creation, an ID is acquired for this new object. This ID is passed to _store_get_values method (line 4234) which returns a list of tuples, which looks like this:

[(10, 'account.invoice', [52L], ['number']), (50, 'test.invoice', [52L], ['reconciled'])]

Then (line 4239) _store_set_values method is invoked on every object from the list, but IDS passed for each method invocation is one of the account.invoice object, which second invocation (test.invoice object) makes illogical (because IDS belongs to account.invoice object, not test.invoice).

Of course the problem lies somewhere deeper, but this should be good entry point for solving this issue.

Cheers,