Skip to content

Conversation

@StephaneMangin
Copy link

Add a constraint on locked picking while an history snapshot is generated.

Included a light refactoring of tests suites.

Propagated from 14.0 PR

@OCA-git-bot
Copy link
Contributor

Hi @petrus-v,
some modules you are maintaining are being modified, check this out!

@StephaneMangin StephaneMangin force-pushed the 17.0_IMP_stock_quant_history_add_picking_lock_contraint branch 5 times, most recently from c23f748 to aee4b61 Compare May 21, 2025 15:55
@StephaneMangin StephaneMangin marked this pull request as ready for review May 21, 2025 15:55
@StephaneMangin StephaneMangin force-pushed the 17.0_IMP_stock_quant_history_add_picking_lock_contraint branch from aee4b61 to 47e9bd8 Compare May 21, 2025 17:14
@StephaneMangin StephaneMangin marked this pull request as draft May 22, 2025 06:48
@StephaneMangin StephaneMangin force-pushed the 17.0_IMP_stock_quant_history_add_picking_lock_contraint branch 12 times, most recently from 9d99d62 to f8197bf Compare June 3, 2025 11:44
@StephaneMangin StephaneMangin force-pushed the 17.0_IMP_stock_quant_history_add_picking_lock_contraint branch from f8197bf to 4207b65 Compare June 3, 2025 11:59
@StephaneMangin StephaneMangin marked this pull request as ready for review June 3, 2025 12:04
Copy link

@alexandregaldeano alexandregaldeano left a comment

Choose a reason for hiding this comment

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

LGTM

:return: stock.quant.history recordset"""
self.ensure_one()
history_model = self.env["stock.quant.history"]
if self.state == "done" and self.date_done:

Choose a reason for hiding this comment

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

nitpick: invert if + early return?

:return: True if the picking can be unlocked
:raises ValidationError: if not allowed to unlock"""
self.ensure_one()
if self.is_locked:

Choose a reason for hiding this comment

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

nitpick: invert if + early return?

self.ensure_one()
if self.is_locked:
history_lines = self.get_stock_quant_history()
if history_lines.exists():

Choose a reason for hiding this comment

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

nitpick: invert if + early return?

@bosd
Copy link
Contributor

bosd commented Aug 13, 2025

@rousseldenis Can you please merge?

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants