[16.0][Backport] [FIX] safe_eval: 3.11 compatibility#156438
Closed
hugosantosred wants to merge 1 commit intoodoo:16.0from
Closed
[16.0][Backport] [FIX] safe_eval: 3.11 compatibility#156438hugosantosred wants to merge 1 commit intoodoo:16.0from
hugosantosred wants to merge 1 commit intoodoo:16.0from
Conversation
Complement on 1e35315 (odoo#112450): alongside the split between forwards and backwards jump we missed that 3.11 has a specialized version of each for the `is None` and `is not None` cases. A use of that was added in standard in 16.5 (odoo#120446) but more generally it makes sense that server actions would support conditional tests against `None`, probably...
Contributor
Collaborator
|
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Mar 6, 2024
Complement on 1e35315 (#112450): alongside the split between forwards and backwards jump we missed that 3.11 has a specialized version of each for the `is None` and `is not None` cases. A use of that was added in standard in 16.5 (#120446) but more generally it makes sense that server actions would support conditional tests against `None`, probably... closes #156438 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
DavidFesquet
referenced
this pull request
Mar 6, 2024
When there is a discrepancy of reserved quantity between `stock.quant.reserved_quantity` and `stock.move.line.product_qty` the UserError 'It is not possible to unreserve more products of %s than you have in stock' is raised. This discrepancy can be caused by past bug, customization or direct manipulation of `stock.quant` or `stock.move.line` by the users. Once this discrepancy is present, it will not disappear by itself. Currently, there is no functional method to fix these discrepancies, the user encountering this message is stuck until they contact the Odoo support team. Ideally, we would fix every bug related to the reservation so that this UserError almost never appears. However, even after multiple bugs fixed (ex: #144176 , #154327 ) and multiple years of feedback, the users keep encountering this error and keep getting stuck when validating/cancelling transfers. So the idea is to re-introduce a server action like it was done for Odoo 13 & Odoo 14 2 years ago: d99e173 to the current stable version (except the latest one Odoo 17 as we do not have enough perspectives on this version). The server action checks all the quants and their relative move line to check if match correctly. If not, it will remove the reservation from both. It could remove the reservation from some unrelated `pickings` and `stock.move` Forward-Port of #79180 Related to #62139 closes #155910 X-original-commit: e16cd27 Signed-off-by: David Fesquet (dafr) <dafr@odoo.com> Co-authored-by: Arnold Moyaux <arm@odoo.com>
This was referenced Mar 6, 2024
gamarino
pushed a commit
to numaes/numa-public-odoo
that referenced
this pull request
Mar 9, 2024
Complement on 1e35315 (#112450): alongside the split between forwards and backwards jump we missed that 3.11 has a specialized version of each for the `is None` and `is not None` cases. A use of that was added in standard in 16.5 (#120446) but more generally it makes sense that server actions would support conditional tests against `None`, probably... closes odoo/odoo#156438 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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.

Backport of #136943 to 16.0 branch
Description of the issue/feature this PR addresses: This fixes the issue #149524
Current behavior before PR: When creating a server action with 16.0 branch throws the error:
forbidden opcode(s) in 'lambda': POP_JUMP_FORWARD_IF_NOT_NONE, POP_JUMP_FORWARD_IF_NONEDesired behavior after PR is merged: Server actions created without problemas
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr