[FIX] project_long_term: remove onchange day on project.phase module. no need to change end date of phase. we can schedule end date using scheduler phase
bzr revid: hmo@tinyerp.com-20101230105727-ev1fppejij0ngv32
This commit is contained in:
parent
224253a44d
commit
74287c7893
|
@ -144,13 +144,6 @@ class project_phase(osv.osv):
|
|||
result['date_start'] = project_id.date_start
|
||||
return {'value': result}
|
||||
|
||||
def onchange_days(self, cr, uid, ids, project, context=None):
|
||||
result = {}
|
||||
for id in ids:
|
||||
project_id = self.browse(cr, uid, id, context=context)
|
||||
newdate = datetime.strptime(project_id.date_start, '%Y-%m-%d') + relativedelta(days=project_id.duration or 0.0)
|
||||
result['date_end'] = newdate.strftime('%Y-%m-%d')
|
||||
return {'value': result}
|
||||
|
||||
def _check_date_start(self, cr, uid, phase, date_end, context=None):
|
||||
"""
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
</group>
|
||||
<group colspan="6" col="6">
|
||||
<field name="date_start"/>
|
||||
<field name="duration" on_change="onchange_days(project_id)" />
|
||||
<field name="duration"/>
|
||||
<field name="product_uom" nolabel="1" domain="[('category_id.name', '=', 'Working Time')]"/>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue