[MERGE] merged with lp:openobject-addons
bzr revid: shp@tinyerp.com-20121010052449-hvnp0e53d1sp6xs2
This commit is contained in:
parent
bea6f1bbf3
commit
28bc19896d
|
@ -65,6 +65,7 @@ class hr_analytic_timesheet(osv.osv):
|
|||
return False
|
||||
|
||||
|
||||
|
||||
def on_change_account_id(self, cr, uid, ids, account_id, user_id, unit_amount=0):
|
||||
res = {}
|
||||
if not (account_id):
|
||||
|
@ -106,6 +107,7 @@ class hr_analytic_timesheet(osv.osv):
|
|||
return res
|
||||
|
||||
def on_change_user_id(self, cr, uid, ids, user_id, account_id, unit_amount=0):
|
||||
print "---------------onchageuser id",user_id
|
||||
res = {}
|
||||
if not (user_id):
|
||||
#avoid a useless call to super
|
||||
|
|
|
@ -155,6 +155,7 @@ class hr_timesheet_sheet(osv.osv):
|
|||
return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
|
||||
|
||||
def write(self, cr, uid, ids, vals, *args, **argv):
|
||||
print "------------vvvvvvvvvals",vals
|
||||
if 'employee_id' in vals:
|
||||
new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False
|
||||
if not new_user_id:
|
||||
|
@ -308,6 +309,7 @@ hr_timesheet_sheet()
|
|||
class hr_timesheet_line(osv.osv):
|
||||
_inherit = "hr.analytic.timesheet"
|
||||
|
||||
|
||||
def _get_default_date(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
@ -404,6 +406,7 @@ class hr_attendance(osv.osv):
|
|||
return time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
def _get_hr_timesheet_sheet(self, cr, uid, ids, context=None):
|
||||
print "-----------get_hr_time sheet"
|
||||
attendance_ids = []
|
||||
for ts in self.browse(cr, uid, ids, context=context):
|
||||
cr.execute("""
|
||||
|
@ -470,6 +473,7 @@ class hr_attendance(osv.osv):
|
|||
return super(hr_attendance,self).unlink(cr, uid, ids,*args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
print "------------write "
|
||||
if context is None:
|
||||
context = {}
|
||||
if isinstance(ids, (int, long)):
|
||||
|
|
Loading…
Reference in New Issue