diff --git a/shift/__manifest__.py b/shift/__manifest__.py index 454f2730e..ac571cb46 100644 --- a/shift/__manifest__.py +++ b/shift/__manifest__.py @@ -14,7 +14,7 @@ ), "website": "https://github.com/beescoop/Obeesdoo", "category": "Cooperative management", - "version": "12.0.5.0.2", + "version": "12.0.5.0.3", "depends": ["mail"], "data": [ "data/system_parameter.xml", diff --git a/shift/models/cooperative_status.py b/shift/models/cooperative_status.py index 1583b03f7..70c7a8a06 100644 --- a/shift/models/cooperative_status.py +++ b/shift/models/cooperative_status.py @@ -25,7 +25,7 @@ class HistoryStatus(models.Model): _name = "cooperative.status.history" _description = "cooperative.status.history" - _order = "create_date desc" + _order = "create_date desc, id" status_id = fields.Many2one("cooperative.status") cooperator_id = fields.Many2one("res.partner") diff --git a/shift/models/planning.py b/shift/models/planning.py index 3e7745ff4..9076c9498 100644 --- a/shift/models/planning.py +++ b/shift/models/planning.py @@ -40,7 +40,7 @@ class ShiftDayNumber(models.Model): _name = "shift.daynumber" _description = "shift.daynumber" - _order = "number asc" + _order = "number asc, id" name = fields.Char() number = fields.Integer( @@ -55,7 +55,7 @@ class ShiftDayNumber(models.Model): class ShiftPlanning(models.Model): _name = "shift.planning" _description = "shift.planning" - _order = "sequence asc" + _order = "sequence asc, id" sequence = fields.Integer() name = fields.Char() @@ -198,7 +198,7 @@ def get_future_shifts( class ShiftTemplate(models.Model): _name = "shift.template" _description = "shift.template" - _order = "start_time" + _order = "planning_id, task_type_id, start_time, id" name = fields.Char(required=True) planning_id = fields.Many2one("shift.planning", required=True) diff --git a/shift/models/shift_shift.py b/shift/models/shift_shift.py index 0500fd505..363707f97 100644 --- a/shift/models/shift_shift.py +++ b/shift/models/shift_shift.py @@ -10,7 +10,7 @@ class ShiftShift(models.Model): _name = "shift.shift" _inherit = ["mail.thread"] - _order = "start_time asc" + _order = "start_time asc, task_template_id, task_type_id, worker_id, id" ################################## # Method to override #