Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] stock_inventory: create missing quants if needed #2058

Open
wants to merge 4 commits into
base: 16.0
Choose a base branch
from

Conversation

benwillig
Copy link
Contributor

Based on #2017

  • Display quant smartbutton even when there is no existing quant to allow creating new ones
  • Adds a boolean on the inventory to create missing quants with zero quantity

cc @DavidJForgeFlow @rousseldenis

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Great. Code review.

stock_inventory/models/res_company.py Outdated Show resolved Hide resolved
def _compute_virtual_in_progress_inventory_id(self):
Inventory = self.env["stock.inventory"]
for rec in self:
rec.virtual_in_progress_inventory_id = Inventory.search(
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer a search outside the loop and then filtered_domain on locations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@benwillig benwillig force-pushed the 16.0-stock_inventory_fix_no_quant-bwi branch 2 times, most recently from ea1ba34 to 9c57527 Compare June 24, 2024 12:15
@benwillig benwillig force-pushed the 16.0-stock_inventory_fix_no_quant-bwi branch 5 times, most recently from ee5aede to 037988e Compare July 17, 2024 10:25
@benwillig benwillig force-pushed the 16.0-stock_inventory_fix_no_quant-bwi branch 2 times, most recently from 0f7e1d6 to b393997 Compare August 1, 2024 12:01
@benwillig benwillig force-pushed the 16.0-stock_inventory_fix_no_quant-bwi branch from b393997 to 48178b1 Compare August 2, 2024 14:48
@benwillig
Copy link
Contributor Author

ping @DavidJForgeFlow @LoisRForgeFlow

just a gently reminder -> #1935 (comment)

@LoisRForgeFlow
Copy link
Contributor

Hi @benwillig

Thanks for the reminder and thanks for adding the optional stetting to enable that, when you do have a lot of bin locations and many products, creating all the quants for every inventory can become a little crazy, but I understand that in some situations is usefull.

Could you fix the conflicts that prevent merging?

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 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs review 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.

3 participants