Code review comment for lp:~akretion-team/account-invoicing/70-add-invoice_fiscal_position_update

Revision history for this message
Raphaƫl Valyi - http://www.akretion.com (rvalyi) wrote :

@Ronald,

"But what are the odds that AND an invoice will have > 200 lines AND the user will change the fiscal position by mistake?"

In our experience it's extremely slow (likes minutes) because OpenERP will trigger one of these computed fields cross fire. It's not that bad if adding 100 lines manually is slow because anyway user interaction will be the limiting factor, now having some Ajax change triggering an action that takes minutes really sucks.

In a project here were we needed the ability to re-apply the pricelist for say 100 items, we hacked the orm write method with a context key to enable a batch write (yes that 6, 0 cryptic API) and trigger the computed fields only at the very end.
Here is that patch for 6.1 https://gist.github.com/rvalyi/8238688
We are migrating that customer to v7, do you think it makes sense to extract this patch and submit it to OCB or as a module?
In our case, with the Brazilian localization which adds up tons of complex stored fields, we could improve the speed from 20 minutes to 20 seconds with that patch.

Thoughts?

« Back to merge proposal