[MERGE] forward port of branch saas-3 up to c914893

This commit is contained in:
Christophe Simonis 2014-08-28 19:25:08 +02:00
commit 010dd70894
5 changed files with 8 additions and 9 deletions

View File

@ -928,9 +928,7 @@ class account_invoice(osv.osv):
self.check_tax_lines(cr, uid, inv, compute_taxes, ait_obj)
# I disabled the check_total feature
group_check_total_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'group_supplier_inv_check_total')[1]
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
if group_check_total and uid in [x.id for x in group_check_total.users]:
if self.pool['res.users'].has_group(cr, uid, '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 osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))

View File

@ -57,7 +57,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):

View File

@ -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"/>

View File

@ -771,7 +771,7 @@ class mail_message(osv.Model):
email_reply_to = None
ir_config_parameter = self.pool.get("ir.config_parameter")
catchall_domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context)
catchall_domain = ir_config_parameter.get_param(cr, SUPERUSER_ID, "mail.catchall.domain", context=context)
# model, res_id, email_from: comes from values OR related message
model, res_id, email_from = values.get('model'), values.get('res_id'), values.get('email_from')
@ -781,7 +781,7 @@ class mail_message(osv.Model):
email_reply_to = self.pool[model].message_get_reply_to(cr, uid, [res_id], context=context)[0]
# no alias reply_to -> catchall alias
if not email_reply_to and catchall_domain:
catchall_alias = ir_config_parameter.get_param(cr, uid, "mail.catchall.alias", context=context)
catchall_alias = ir_config_parameter.get_param(cr, SUPERUSER_ID, "mail.catchall.alias", context=context)
if catchall_alias:
email_reply_to = '%s@%s' % (catchall_alias, catchall_domain)
# still no reply_to -> reply_to will be the email_from

View File

@ -53,6 +53,7 @@
"access_res_currency_group_system","res_currency group_system","model_res_currency","group_system",1,1,1,1
"access_res_currency_rate_group_system","res_currency_rate group_system","model_res_currency_rate","group_system",1,1,1,1
"access_res_groups_group_erp_manager","res_groups group_erp_manager","model_res_groups","group_erp_manager",1,1,1,1
"access_res_groups_group_user","res_groups group_user","model_res_groups",group_user,1,0,0,0
"access_res_lang_group_all","res_lang group_all","model_res_lang",,1,0,0,0
"access_res_lang_group_user","res_lang group_user","model_res_lang","group_system",1,1,1,1
"access_res_partner_public","res_partner group_public","model_res_partner","group_public",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
53 access_res_currency_group_system res_currency group_system model_res_currency group_system 1 1 1 1
54 access_res_currency_rate_group_system res_currency_rate group_system model_res_currency_rate group_system 1 1 1 1
55 access_res_groups_group_erp_manager res_groups group_erp_manager model_res_groups group_erp_manager 1 1 1 1
56 access_res_groups_group_user res_groups group_user model_res_groups group_user 1 0 0 0
57 access_res_lang_group_all res_lang group_all model_res_lang 1 0 0 0
58 access_res_lang_group_user res_lang group_user model_res_lang group_system 1 1 1 1
59 access_res_partner_public res_partner group_public model_res_partner group_public 1 0 0 0