[18.0][MIG] sale_order_priority: Migration to 18.0#3786
[18.0][MIG] sale_order_priority: Migration to 18.0#3786OCA-git-bot merged 15 commits intoOCA:18.0from
Conversation
apami0111
commented
Jul 2, 2025
- Migrated from 17.0 to 18.0.
- Updated xpath expression in the view to reflect Odoo 18.0 changes (//list instead of //tree).
- Test class now uses Command.create to define order_line values, in line with Odoo 18.0 conventions.
* [ADD] sale_order_priority * Code improvements * [FIX] Better not to call write in inverse
Currently translated at 100.0% (8 of 8 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_priority Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_priority/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_order_priority Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_order_priority/
Currently translated at 100.0% (7 of 7 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_priority Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_priority/it/
917ce0f to
3234a99
Compare
|
/ocabot migration sale_order_priority |
|
Thank you very much for your comment. I will be working on the suggested
changes and will update the PR accordingly.
El vie, 4 jul 2025 a las 9:54, Denis Roussel (ACSONE) (<
***@***.***>) escribió:
… ***@***.**** requested changes on this pull request.
------------------------------
In sale_order_priority/__manifest__.py
<#3786 (comment)>:
> @@ -3,7 +3,7 @@
{
"name": "Sale Order Priority",
"summary": "Define priority on sale orders",
- "version": "17.0.1.0.1",
+ "version": "18.0.1.0.1",
Please reset to 18.0.1.0.0
------------------------------
In sale_order_priority/models/sale.py
<#3786 (comment)>:
> + @api.depends("order_line.priority")
+ def _compute_priority(self):
+ for order in self.filtered(lambda x: x.order_line):
+ priority = order.mapped("order_line.priority")
+ order.priority = max([x for x in priority if x] or "0")
+
+ def _inverse_priority(self):
+ for order in self:
+ priority = order.priority
+ for line in order.order_line.filtered(
+ lambda x, pr=priority: x.priority != pr
+ ):
+ line.priority = priority
+
+ def action_confirm(self):
+ return super(
This is not correct as self can be multi recordset.
Moreover, I think the transmission of the priority should be done through
procurement if possible as context should be avoided.
—
Reply to this email directly, view it on GitHub
<#3786 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKVNRJ3QUYCLX6VP2YT44433G2IT3AVCNFSM6AAAAACAUN623OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDSOBXGUYTEOJQGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
3234a99 to
73e6517
Compare
|
@rousseldenis Thanks for your feedback! I've addressed the issue with the multi-recordset by adjusting the logic accordingly. I’ve also reworked the way priority is transmitted, avoiding the use of context as suggested. The following structural changes were made as well:
Feel free to review the updated implementation. Let me know if anything else needs to be improved. |
|
This PR has the |
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
Functional review LGTM!
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 71bba56. Thanks a lot for contributing to OCA. ❤️ |