-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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][MIG] - sale_exception #2319
Closed
Closed
Conversation
This file contains 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
Rule should only count available stock from selected warehouse from sale order. Without warehouse in context, it currently sums all stock available in all warehouses.
The previous parent menu has an action attached, and with these modules, it can't be clicked.
* [FIX] sale_exception confirm wizard * [FIX] add test of test_all_draft_orders & flake8 & readme.rst * [FIX] improve codecov test * [FIX] delete odl translation * [FIX] add Camptocamp to author * [FIX] readme.rst
Raise SingletonError when you have a recordset with multiple sale order. This restore the capability to write on multiple sale.order
Currently, it's located at the root menu because. It's a migration bug because the old menu was removed from 11.0.
The method called by 'sale_check_exception' has a side effect, it writes on 'exception.rule' + on the Many2many relation between it and sale.order(.line). When decorated by @api.constrains, any error during the method will be caught and re-raised as "ValidationError". This part of code is very prone to concurrent updates as 2 sales having the same exception will both write on the same 'exception.rule'. A concurrent update (OperationalError) is re-raised as ValidationError, and then is not retried properly. Calling the same method in create/write has the same effect than @api.constrains without shadowing the exception type. Full explanation: OCA/server-tools#1642
* [IMP] sale_exception: show menu only to Exception Rule Managers * [IMP] Reindent lines to 4 spaces * [IMP] Improve information messages that display exceptions * [REM] Remove exception_ids fields from the sale order view, because it's no longer necessary and it allowed users to accidentaly deactivate a Sale Exception Rule using the active widget. * [IMP] Rename exception_ids_formatted to exceptions_summary
Disable for now as the solution is not obvious. Partially fixes OCA#972
Other ways it provokes linter fail
TestSaleOrder was useless and making sale order tests run twice.
[UPD] Update sale_exception.pot [UPD] README.rst
So we can: * display the lines with an exception in red * show the exception messages when we click on a line It's a huge usability improvement when users have dozens or hundreds of lines.
[UPD] Update sale_exception.pot
Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-13.0/sale-workflow-13.0-sale_exception Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_exception/
[UPD] Update sale_exception.pot [UPD] README.rst
Currently translated at 21.0% (8 of 38 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_exception Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_exception/es/
Currently translated at 73.6% (28 of 38 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_exception Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_exception/de/
After the sale order has been confirmed, some fields can still be changed, those changes can raise some more excetptions again. Unfortunatelly those changes are raised as ValidationError and they are blocking. If during the confirmation of the sale.order the ignore excetpiton has been used. Those same ignored exception will block some changes made when the sale order is in `sale` state. And this problem is due to that onchange that this PR removes. Why should the ignore_exception be set to false when lines are changed but not when some fields on the sale.order record are changed ?
…eptions [UPD] Update sale_exception.pot [UPD] README.rst
Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-14.0/sale-workflow-14.0-sale_exception Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_exception/
[UPD] Update sale_exception.pot [UPD] README.rst
use model_create_multi
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.
needs OCA/server-tools#2463