[MERGE] forward port of branch saas-5 up to 24c25f5
This commit is contained in:
@@ -806,8 +806,7 @@ class account_invoice(models.Model):
|
||||
inv.check_tax_lines(compute_taxes)
|
||||
|
||||
# I disabled the check_total feature
|
||||
group_check_total = self.env.ref('account.group_supplier_inv_check_total')
|
||||
if self.env.user in group_check_total.users:
|
||||
if self.env['res.users'].has_group('account.group_supplier_inv_check_total'):
|
||||
if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding / 2.0):
|
||||
raise except_orm(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class mail_compose_message(osv.TransientModel):
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'template_id': fields.many2one('email.template', 'Use template', select=True, groups="base.group_user"),
|
||||
'template_id': fields.many2one('email.template', 'Use template', select=True),
|
||||
}
|
||||
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
|
||||
<record id="property_rule_holidays_employee_write" model="ir.rule">
|
||||
<field name="name">Employee Holidays Create, Write, Unlink</field>
|
||||
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel'])]</field>
|
||||
<field name="perm_read" eval="False"/>
|
||||
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="property_rule_holidays_officer" model="ir.rule">
|
||||
<field name="name">Holidays Officer</field>
|
||||
<field name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="domain_force">[(1,'=',1)]</field>
|
||||
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="resource_leaves_officer" model="ir.rule">
|
||||
<field name="name">Leaves Officer</field>
|
||||
<field name="model_id" ref="model_resource_calendar_leaves"/>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_hr_employee_public,hr.employee.public,hr.model_hr_employee,base.group_public,1,0,0,0
|
||||
access_hr_employee_public,hr.employee.public,hr.model_hr_employee,base.group_public,1,0,0,0
|
||||
access_resource_public,resource.resource.public,resource.model_resource_resource,base.group_public,1,0,0,0
|
||||
|
||||
|
Reference in New Issue
Block a user