[19.0][ADD] sale_order_priority_partner - #4537
Open
PaoloYam wants to merge 1 commit into
Open
Conversation
Ricardoalso
reviewed
Aug 20, 2026
| @@ -0,0 +1,3 @@ | |||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |||
There was a problem hiding this comment.
Suggested change
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
| @classmethod | ||
| def setUpClass(cls): | ||
| super().setUpClass() | ||
| cls.partner_urgent = cls.env["res.partner"].create( |
There was a problem hiding this comment.
Suggested change
| cls.partner_urgent = cls.env["res.partner"].create( | |
| cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) | |
| cls.partner_urgent = cls.env["res.partner"].create( |
missing cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
Ricardoalso
reviewed
Aug 20, 2026
| def create(self, vals_list): | ||
| # override to use partner_id.sale_priority as default priority if set | ||
| for vals in vals_list: | ||
| partner = self.env["res.partner"].browse(vals.get("partner_id")) |
There was a problem hiding this comment.
Suggested change
| partner = self.env["res.partner"].browse(vals.get("partner_id")) | |
| partner_id = vals.get("partner_id") or self.env.context.get( | |
| "default_partner_id" | |
| ) | |
| partner = self.env["res.partner"].browse(partner_id) |
If a caller creates an order relying on default_partner_id in context (quick-create/wizard flows)
Add sale_priority selection field on res.partner use this field as default at sale.order creation
PaoloYam
force-pushed
the
19.0-add-sale_order_priority_partner
branch
from
August 21, 2026 07:45
dbd6220 to
b8f2b9f
Compare
Ricardoalso
approved these changes
Aug 21, 2026
This file contains hidden or 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
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.
Add sale_priority selection field on res.partner
use this field as default at sale.order creation