Skip to content

[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
OCA:16.0from
acsone:16.0-imp-shopfloor_reception__mobile__-back-btn-on-set-destination
Open

nicolas-delbovier-acsone wants to merge 2 commits into
OCA:16.0from
acsone:16.0-imp-shopfloor_reception__mobile__-back-btn-on-set-destination

Conversation

@nicolas-delbovier-acsone

@nicolas-delbovier-acsone nicolas-delbovier-acsone commented Oct 27, 2026 •

Copy link
Copy Markdown

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @JuMiSanAr, @mmequignon, @rousseldenis,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:16.0 mod:shopfloor_reception Module shopfloor_reception mod:shopfloor_reception_mobile Module shopfloor_reception_mobile mod:shopfloor_reception_product_barcode_mobile Module shopfloor_reception_product_barcode_mobile labels Oct 27, 2026
@nicolas-delbovier-acsone
nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception__mobile__-back-btn-on-set-destination branch from 7abd128 to 325bf88 Compare October 27, 2026 10:30
@OCA-git-bot OCA-git-bot removed the mod:shopfloor_reception_product_barcode_mobile Module shopfloor_reception_product_barcode_mobile label 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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check also it has been created by this user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:shopfloor_reception_mobile Module shopfloor_reception_mobile mod:shopfloor_reception Module shopfloor_reception series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants