[FIX] point_of_sale: Avoid transaction aborted errors when handling failed orders#27932
Open
BT-sschmid wants to merge 7 commits into16.0from
Open
[FIX] point_of_sale: Avoid transaction aborted errors when handling failed orders#27932BT-sschmid wants to merge 7 commits into16.0from
BT-sschmid wants to merge 7 commits into16.0from
Conversation
In the context of an export with a lot of records containing a 'stock.move' field (ex: stock.valuation.layer.stock_move_id): - Only the picking_id.origin, product_id.code and location(_dest)_id.name are needed. - Most of the data of picking_id, product_id and location(_dest)_id will be fetch and put in cache. This can result in a memory error as multiple thousands of records values (at the very least) will be stored in the cache. Customer cases: STOCK.MOVE: 350_000 BEFORE: 980 MB AFTER: 105 MB OPW-3911127 closes odoo#167587 X-original-commit: b755048 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
Check that order is not finalized when trying to updateRewards on a paid order. Part-of: odoo#168142 Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
closes odoo#168142 Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
In the journal entry you can group by partner/date/journal/company, but in vendor bill or customer invoice you cannot. closes odoo#168339 X-original-commit: 0377960 Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
Steps to reproduce: - Install "Time Off" and `l10n_be` - "Time Off" -> "Reporting" -> "by Type" - Unselect the company with the time off Issues: All the time off will be shown, company selection will not be taken into account. This is due to a missing security rules. opw-3954393 closes odoo#168860 X-original-commit: b756dbd Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
413de0d to
c0f15e5
Compare
…ailed orders POSSession._handle_order_process_fail is usally called on any Exceptions, also on DB-related exception which may abort the current transaction. In this case, the call to _is_capture_system_activated raises with an TransactionAborted Error, which shadows the real traceback of the original Exception. This PR moves the Rollback to the top of the Method. This is safe as the caller raises anyway.
c0f15e5 to
391e695
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POSSession._handle_order_process_fail is usally called on any Exceptions, also on DB-related exception which may abort the current transaction.
In this case, the call to _is_capture_system_activated raises with an TransactionAborted Error, which shadows the real traceback of the original
Exception.
This PR moves the Rollback to the top of the Method.
This is safe as the caller raises anyway.