-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0] Too many calculations on price_subtotal field on sale.order.line #8537
Comments
Taxes are not re-calculated when you change the fiscal position by default. You should have a module that does that. It's the same problem highlighted in this PR: OCA/sale-workflow#54 (comment), but I haven't found a solution to disable compute triggers temporarily |
@hugosantosred yes on 6.1 already ;-) ... In any case you are right, that would be cool Odoo to be tested with large orders and not only 2 lines orders to avoid these issues. I m curious about your feedback if you manage to work around it. |
I think the context key in v8 is |
I tried that on this PR OCA/sale-workflow#54 and didn't work. Maybe I missed something? |
Well, it seems that it is only for new-style fields: https://github.com/odoo/odoo/blob/8.0/openerp/models.py#L4029, I have not found similar key for the old-API. |
Let's wait until @odony (hopefully) has time to check this out. The problem to fix this in v8 (I suppose) is that with the changes on sale order in v9 this issue is going to be deprecated. |
Does this also affect OpenERP v7? I have a client whose large sales orders (~300 lines) are taking upwards of five minutes to confirm (from quote to order). I had to increase |
@JakeStoeffler The answer seems to be NO without developing some module to improve performance. |
@JakeStoeffler Have you made any modifications to |
Hi @hugosantosred , Thank you for your bug report and our apoligies that we haven't had the time to look at this bug report. We do our best to handle all of them, but we sometimes miss some. Regards, |
We are experiencing issues when saving big sale orders (~ 500 Lines) it always throws a CPU Time limit Exceeded error.
Debugging this I've noticed than price_subtotal field is recomputed too many times (Also I tested with a database with demo data and only sale module installed)
I've put a logger in _amount_line in sale.py and for a 2 line sale order is doing this:
So if the order has 500 lines, when saving it, will block the ERP in multiple workers mode or it will spend nearly a half hour on saving this sale order.
To reproduce this behaviour:
Anyone else has noticed this behaviour?
The text was updated successfully, but these errors were encountered: