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

[15.0][MIG] stock_inventory_verification_request #2131

Merged

Conversation

JoanSForgeFlow
Copy link
Contributor

Migration of the stock_inventory_verification_request to 15.0

  • Main Model Introduced: Slot Verification Request.
  • Threshold Handling: When the threshold defined in inventory adjustments is exceeded, users cannot validate the applied quantity. (This is already addressed in stock_inventory_discrepancy.)
  • Validation Process: The stock manager must handle the validation. A button will appear for the manager to create a Slot Verification Request, allowing the supervisor to review the issue later and ensure it is recorded.

@JoanSForgeFlow JoanSForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch 4 times, most recently from 75997a5 to 8ccfbe6 Compare August 6, 2024 09:42
LoisRForgeFlow and others added 26 commits August 6, 2024 11:44
 * Add tests.
 * Several minor fixes.
 * Update README.
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_inventory_verification_request
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_inventory_verification_request/
Currently translated at 100.0% (60 of 60 strings)

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_inventory_verification_request
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_inventory_verification_request/zh_CN/
Currently translated at 100.0% (60 of 60 strings)

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_inventory_verification_request
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_inventory_verification_request/pt_BR/
To appear in OCA shop in the good category.
Currently translated at 58.3% (35 of 60 strings)

Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_inventory_verification_request
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_inventory_verification_request/sl/
…uired and add slot_verification_ids to stock.location model

[ADD] button to create inventory adjustment from slot verification request

[FIX] slot verification request menu position
* link to created inv. adjustments
* add _descrition
* track changes in some fields.
* make product and location only editable in 'wait' state.
@JoanSForgeFlow JoanSForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch 3 times, most recently from 7e2577b to f19cc5d Compare August 6, 2024 10:43
@JoanSForgeFlow JoanSForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch from f19cc5d to 6914ac4 Compare August 27, 2024 10:26
@JoanSForgeFlow JoanSForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch 2 times, most recently from 44cbd5f to 76043b1 Compare October 8, 2024 07:34
@rousseldenis
Copy link
Contributor

/ocabot migration stock_inventory_verification_request

"lot_id": quant.lot_id.id if quant.lot_id else False,
}
)
self.requested_verification = True
Copy link
Contributor

Choose a reason for hiding this comment

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

quant.requested_verification = True

Copy link
Contributor

Choose a reason for hiding this comment

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

And add : return {"type": "ir.actions.act_window_close"} which is more correct syntaxically.

Choose a reason for hiding this comment

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

Thank you for yours comments, we have applied the changes.

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.

@JoanSForgeFlow No migration script for the requested_verification field ?

"lot_id": quant.lot_id.id if quant.lot_id else False,
}
)
self.requested_verification = True
Copy link
Contributor

Choose a reason for hiding this comment

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

And add : return {"type": "ir.actions.act_window_close"} which is more correct syntaxically.

@JoanSForgeFlow
Copy link
Contributor Author

Hello @rousseldenis

I think it doesn't make much sense to create a migration script for this, right? After all, it's just a field used to mark that a review is in progress.

But from 12.0 to 15.0, the adjustments flow have changed a lot technically. Previously, this field was in stock.inventory, and stock.inventory had stock.inventory.lines. Now, this field is in stock.quant. So, what would need to be done is to check which stock.inventory you have with requested_verification set to True in 12.0 and look at which lines you have with which products and where, and then make the equivalence to set those quants to True.

I think it's an effort that isn't worth it, right? Better before migrating closing the SVRs and start in 15.0 with all quants in requested=False.

Thank you

@ThiagoMForgeFlow ThiagoMForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch from 76043b1 to e126038 Compare October 17, 2024 09:20
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.

LGTM

@JoanSForgeFlow JoanSForgeFlow force-pushed the 15.0-mig-stock_inventory_verification_request branch from e126038 to 0eba1ac Compare October 22, 2024 08:24
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM

@LoisRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-2131-by-LoisRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit a584912 into OCA:15.0 Oct 22, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 1f0c538. Thanks a lot for contributing to OCA. ❤️

@LoisRForgeFlow LoisRForgeFlow deleted the 15.0-mig-stock_inventory_verification_request branch October 22, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.