-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
[18.0][FIX] partner_stage: Add 'order' in _read_group_stage_id to fix group… #1985
base: 18.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -14,8 +14,9 @@ def _get_default_stage_id(self): | |||||||||||||
) | ||||||||||||||
|
||||||||||||||
@api.model | ||||||||||||||
def _read_group_stage_id(self, states, domain, order): | ||||||||||||||
return states.search([]) | ||||||||||||||
def _read_group_stage_id(self, stages, domain, order=None): | ||||||||||||||
order = order or "sequence, id" | ||||||||||||||
return stages.search([], order=order) | ||||||||||||||
Comment on lines
+17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this change is correct. The original order should be preserved, like this:
Suggested change
Additionally, for consistency, this function should now be renamed to |
||||||||||||||
|
||||||||||||||
stage_id = fields.Many2one( | ||||||||||||||
comodel_name="res.partner.stage", | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even simpler, sparing 1 LOC?