merging changes from stable addons
bzr revid: vinusoft85@gmail.com-20090609042051-uarkzai16e7ei0ue
This commit is contained in:
@@ -56,14 +56,16 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
res[op.id]=False
|
||||
return res
|
||||
def _get_date_end(self, cr, uid, ids, field_name, arg, context):
|
||||
res={}
|
||||
res = {}
|
||||
for op in self.browse(cr, uid, ids, context=context):
|
||||
d = DateTime.strptime(op.date_planned,'%Y-%m-%d %H:%M:%S')
|
||||
i = self.pool.get('hr.timesheet.group').interval_get(cr, uid, op.workcenter_id.timesheet_id.id or False, d, op.hour or 0.0)
|
||||
if i:
|
||||
res[op.id] = i[-1][1].strftime('%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
res[op.id] = op.date_planned
|
||||
res[op.id]= False
|
||||
if op.date_planned:
|
||||
d = DateTime.strptime(op.date_planned,'%Y-%m-%d %H:%M:%S')
|
||||
i = self.pool.get('hr.timesheet.group').interval_get(cr, uid, op.workcenter_id.timesheet_id.id or False, d, op.hour or 0.0)
|
||||
if i:
|
||||
res[op.id] = i[-1][1].strftime('%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
res[op.id] = op.date_planned
|
||||
return res
|
||||
_inherit = 'mrp.production.workcenter.line'
|
||||
_columns = {
|
||||
|
||||
Reference in New Issue
Block a user