Browse Source

[FIX] travis

pull/90/head
Holger Brunn 10 years ago
parent
commit
c830d8fff3
  1. 57
      mass_editing/models/mass_object.py
  2. 2
      server_environment/serv_config.py
  3. 7
      users_ldap_mail/users_ldap_model.py
  4. 4
      users_ldap_populate/__openerp__.py
  5. 2
      users_ldap_populate/model/populate_wizard.py
  6. 2
      users_ldap_populate/model/users_ldap.py

57
mass_editing/models/mass_object.py

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

2
server_environment/serv_config.py

@ -215,7 +215,7 @@ class ServerConfiguration(models.TransientModel):
self._arch = etree.fromstring(arch)
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
context=None, toolbar=False, submenu=False):
context=None, toolbar=False, submenu=False):
"""Overwrite the default method to render the custom view."""
res = super(ServerConfiguration, self).fields_view_get(cr, uid,
view_id,

7
users_ldap_mail/users_ldap_model.py

@ -35,11 +35,12 @@ class CompanyLDAP(orm.Model):
'mail_attribute': fields.char(
'E-mail attribute', size=64,
help="LDAP attribute to use to retrieve em-mail address."),
}
}
_defaults = {
'name_attribute': 'cn',
'mail_attribute': 'mail',
}
}
def get_ldap_dicts(self, cr, ids=None):
"""
@ -65,7 +66,7 @@ class CompanyLDAP(orm.Model):
mapping = [
('name', 'name_attribute'),
('email', 'mail_attribute'),
]
]
for value_key, conf_name in mapping:
try:
if conf[conf_name]:

4
users_ldap_populate/__openerp__.py

@ -39,10 +39,10 @@ object you want to query.
""",
"depends": [
'auth_ldap',
],
],
"data": [
'view/users_ldap.xml',
'view/populate_wizard.xml',
],
],
'installable': True,
}

2
users_ldap_populate/model/populate_wizard.py

@ -31,7 +31,7 @@ class CompanyLDAPPopulateWizard(orm.TransientModel):
'res.company.ldap', 'LDAP Configuration'),
'users_created': fields.integer(
'Number of users created', readonly=True),
}
}
def create(self, cr, uid, vals, context=None):
ldap_pool = self.pool.get('res.company.ldap')

2
users_ldap_populate/model/users_ldap.py

@ -93,4 +93,4 @@ class CompanyLDAP(orm.Model):
'target': 'new',
'res_id': res_id,
'nodestroy': True,
}
}
Loading…
Cancel
Save