[FIX] Project_long_term : Better ordering on phase
authorRaphael Valyi(Akretion) <>
Tue, 14 Sep 2010 12:57:44 +0000 (18:27 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Tue, 14 Sep 2010 12:57:44 +0000 (18:27 +0530)
lp bug: https://launchpad.net/bugs/629735 fixed

bzr revid: jvo@tinyerp.com-20100914125744-78lz9uaby27z4a07

addons/project_long_term/project_long_term.py

index 04fde75..79baff6 100644 (file)
@@ -116,7 +116,7 @@ class project_phase(osv.osv):
         'sequence': 10,
         'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0]
     }
-    _order = "name"
+    _order = "project_id, date_start, sequence, name"
     _constraints = [
         (_check_recursion,'Loops in phases not allowed',['next_phase_ids', 'previous_phase_ids']),
         (_check_dates, 'Phase start-date must be lower than phase end-date.', ['date_start', 'date_end']),