[MERGE] forward port of branch saas-3 up to a6b11a1
This commit is contained in:
commit
c4844675b8
|
@ -307,3 +307,9 @@ class res_users(osv.Model):
|
||||||
except MailDeliveryException:
|
except MailDeliveryException:
|
||||||
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
|
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
|
||||||
return user_id
|
return user_id
|
||||||
|
|
||||||
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
|
if not default or not default.get('email'):
|
||||||
|
# avoid sending email to the user we are duplicating
|
||||||
|
context = dict(context or {}, reset_password=False)
|
||||||
|
return super(res_users, self).copy(cr, uid, id, default=default, context=context)
|
||||||
|
|
|
@ -949,7 +949,7 @@ class hr_employee(osv.osv):
|
||||||
current_date = datetime.now().strftime('%Y-%m-%d')
|
current_date = datetime.now().strftime('%Y-%m-%d')
|
||||||
for employee in self.browse(cr, uid, ids, context=context):
|
for employee in self.browse(cr, uid, ids, context=context):
|
||||||
if not employee.contract_ids:
|
if not employee.contract_ids:
|
||||||
res[employee.id] = {'basic': 0.0}
|
res[employee.id] = 0.0
|
||||||
continue
|
continue
|
||||||
cr.execute( 'SELECT SUM(wage) '\
|
cr.execute( 'SELECT SUM(wage) '\
|
||||||
'FROM hr_contract '\
|
'FROM hr_contract '\
|
||||||
|
@ -958,7 +958,7 @@ class hr_employee(osv.osv):
|
||||||
'AND (date_end > %s OR date_end is NULL)',
|
'AND (date_end > %s OR date_end is NULL)',
|
||||||
(employee.id, current_date, current_date))
|
(employee.id, current_date, current_date))
|
||||||
result = dict(cr.dictfetchone())
|
result = dict(cr.dictfetchone())
|
||||||
res[employee.id] = {'basic': result['sum']}
|
res[employee.id] = result['sum']
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _payslip_count(self, cr, uid, ids, field_name, arg, context=None):
|
def _payslip_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
|
|
|
@ -542,7 +542,7 @@ openerp.mail = function (session) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.do_action(action, {
|
self.do_action(action, {
|
||||||
'on_close': function(){ self.is_log && self.parent_thread.message_fetch() }
|
'on_close': function(){ !self.parent_thread.options.view_inbox && self.parent_thread.message_fetch() }
|
||||||
});
|
});
|
||||||
self.on_cancel();
|
self.on_cancel();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue