Browse Source

Merge pull request #90 from hbrunn/8.0-travis-2014-12-08

[FIX] travis
pull/93/head
Pedro M. Baeza 10 years ago
parent
commit
08fd5c5781
  1. 21
      mass_editing/models/mass_object.py
  2. 1
      users_ldap_mail/users_ldap_model.py

21
mass_editing/models/mass_object.py

@ -72,7 +72,9 @@ class MassObject(orm.Model):
for data in self.browse(cr, uid, ids, context=context): for data in self.browse(cr, uid, ids, context=context):
src_obj = data.model_id.model src_obj = data.model_id.model
button_name = _('Mass Editing (%s)') % data.name button_name = _('Mass Editing (%s)') % data.name
vals['ref_ir_act_window'] = action_obj.create(cr, SUPERUSER_ID, {
vals['ref_ir_act_window'] = action_obj.create(
cr, SUPERUSER_ID,
{
'name': button_name, 'name': button_name,
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'res_model': 'mass.editing.wizard', 'res_model': 'mass.editing.wizard',
@ -82,8 +84,11 @@ class MassObject(orm.Model):
'view_mode': 'form,tree', 'view_mode': 'form,tree',
'target': 'new', 'target': 'new',
'auto_refresh': 1, 'auto_refresh': 1,
}, context)
vals['ref_ir_value'] = ir_values_obj.create(cr, SUPERUSER_ID, {
},
context)
vals['ref_ir_value'] = ir_values_obj.create(
cr, SUPERUSER_ID,
{
'name': button_name, 'name': button_name,
'model': src_obj, 'model': src_obj,
'key2': 'client_action_multi', 'key2': 'client_action_multi',
@ -91,11 +96,15 @@ class MassObject(orm.Model):
"ir.actions.act_window," "ir.actions.act_window,"
+ str(vals['ref_ir_act_window'])), + str(vals['ref_ir_act_window'])),
'object': True, 'object': True,
}, context)
self.write(cr, uid, ids, {
},
context)
self.write(
cr, uid, ids,
{
'ref_ir_act_window': vals.get('ref_ir_act_window', False), 'ref_ir_act_window': vals.get('ref_ir_act_window', False),
'ref_ir_value': vals.get('ref_ir_value', False), 'ref_ir_value': vals.get('ref_ir_value', False),
}, context)
},
context)
return True return True
def unlink_action(self, cr, uid, ids, context=None): def unlink_action(self, cr, uid, ids, context=None):

1
users_ldap_mail/users_ldap_model.py

@ -36,6 +36,7 @@ class CompanyLDAP(orm.Model):
'E-mail attribute', size=64, 'E-mail attribute', size=64,
help="LDAP attribute to use to retrieve em-mail address."), help="LDAP attribute to use to retrieve em-mail address."),
} }
_defaults = { _defaults = {
'name_attribute': 'cn', 'name_attribute': 'cn',
'mail_attribute': 'mail', 'mail_attribute': 'mail',

Loading…
Cancel
Save