Comment 7 for bug 507454

Revision history for this message
Ferdinand (office-chricar) wrote :

thanks for pointing out

"That one is a nasty bug that causes the transactions to commit each time a sequence number is get!"
this obviously breaks any transaction logic - indeed very nasty

probably the was ir_sequence get_id is programmed could be improved

IMHO the "select for .... update" is not necessary
the "update" statement locks the row - this should be sufficient.

I do not see the need of the commit - except for allowing a very high number of concurrent transaction - the high price for this is "no transaction".
may be we need blocking and not blocking ir_sequences, but for all accounting purpose (most documents created by OpenERP) gapless number series must have highest priority to pass audits.

BTW the provided patch
* will at least avoid wrong invoice numbers
* I could live with with the fact that moves are created - in case of failure these must be canceled - which is some lines of code and should not happen often.

I realized that the workflow advances - but I could not figure out where this is info stored.
If the patch raises an exception further validations after correcting the former error do nothing, although the account_invoice does not show any changes. (or at least I didn't see them) . Would be great if you can point this out