Repository navigation
[16.0][IMP] shopfloor_reception(_mobile): enables to go back from 'set_destination' to 'set_quantity' - #1312
Open
nicolas-delbovier-acsone wants to merge 2 commits into
Conversation
Contributor
|
Hi @JuMiSanAr, @mmequignon, @rousseldenis, |
nicolas-delbovier-acsone
force-pushed
the
16.0-imp-shopfloor_reception__mobile__-back-btn-on-set-destination
branch
from
October 27, 2026 10:30
7abd128 to
325bf88
Compare
jbaudoux
requested changes
Oct 27, 2026
| if package: | ||
| selected_line.result_package_id = False | ||
| # If the package was newly generated and is empty, remove it | ||
| other_lines = self.env["stock.move.line"].search( |
Contributor
There was a problem hiding this comment.
Use search count with limit 1
| other_lines = self.env["stock.move.line"].search( | ||
| [("result_package_id", "=", package.id), ("id", "!=", selected_line.id)] | ||
| ) | ||
| if not package.quant_ids and not other_lines: |
Contributor
There was a problem hiding this comment.
If you search first for other lines, then you should test it first in your if condition.
| [("result_package_id", "=", package.id), ("id", "!=", selected_line.id)] | ||
| ) | ||
| if not package.quant_ids and not other_lines: | ||
| package.unlink() |
Contributor
There was a problem hiding this comment.
Check also it has been created by this user
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.
cc @jbaudoux