summaryrefslogtreecommitdiff
path: root/addons/share
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-04-15 12:34:31 +0200
committerChristophe Matthieu <chm@openerp.com>2013-04-15 12:34:31 +0200
commited4b70dfe33605fde42cccd788bb0f43ffefbec6 (patch)
tree970ec3a89a382a0d2d8182710081206fb815ef4d /addons/share
parent177f51cb541f6f635d445ca24ce4453d79eb6d39 (diff)
parent53f168daaf989d97a4e514934afc7fe04d21193b (diff)
[MERGE] from trunk
bzr revid: chm@openerp.com-20130415103431-y96fhba0502b6aqc
Diffstat (limited to 'addons/share')
-rw-r--r--addons/share/wizard/share_wizard.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 0189c1682dd..cf350f4da1c 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -205,7 +205,7 @@ class share_wizard(osv.TransientModel):
raise osv.except_osv(_('No email address configured'),
_('You must configure your email address in the user preferences before using the Share button.'))
model, res_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'action_share_wizard_step1')
- action = self.pool.get(model).read(cr, uid, res_id, context=context)
+ action = self.pool[model].read(cr, uid, res_id, context=context)
action['res_id'] = ids[0]
action.pop('context', '')
return action
@@ -405,7 +405,7 @@ class share_wizard(osv.TransientModel):
local_rel_fields = []
models = [x[1].model for x in relation_fields]
model_obj = self.pool.get('ir.model')
- model_osv = self.pool.get(model.model)
+ model_osv = self.pool[model.model]
for colinfo in model_osv._all_columns.itervalues():
coldef = colinfo.column
coltype = coldef._type
@@ -413,7 +413,7 @@ class share_wizard(osv.TransientModel):
if coltype in ttypes and colinfo.column._obj not in models:
relation_model_id = model_obj.search(cr, UID_ROOT, [('model','=',coldef._obj)])[0]
relation_model_browse = model_obj.browse(cr, UID_ROOT, relation_model_id, context=context)
- relation_osv = self.pool.get(coldef._obj)
+ relation_osv = self.pool[coldef._obj]
if coltype == 'one2many':
# don't record reverse path if it's not a real m2o (that happens, but rarely)
dest_model_ci = relation_osv._all_columns
@@ -423,7 +423,7 @@ class share_wizard(osv.TransientModel):
local_rel_fields.append((relation_field, relation_model_browse))
for parent in relation_osv._inherits:
if parent not in models:
- parent_model = self.pool.get(parent)
+ parent_model = self.pool[parent]
parent_colinfos = parent_model._all_columns
parent_model_browse = model_obj.browse(cr, UID_ROOT,
model_obj.search(cr, UID_ROOT, [('model','=',parent)]))[0]
@@ -459,7 +459,7 @@ class share_wizard(osv.TransientModel):
"""
# obj0 class and its parents
obj0 = [(None, model)]
- model_obj = self.pool.get(model.model)
+ model_obj = self.pool[model.model]
ir_model_obj = self.pool.get('ir.model')
for parent in model_obj._inherits:
parent_model_browse = ir_model_obj.browse(cr, UID_ROOT,
@@ -778,7 +778,7 @@ class share_wizard(osv.TransientModel):
# Record id not found: issue
if res_id <= 0:
raise osv.except_osv(_('Record id not found'), _('The share engine has not been able to fetch a record_id for your invitation.'))
- self.pool.get(model.model).message_subscribe(cr, uid, [res_id], new_ids + existing_ids, context=context)
+ self.pool[model.model].message_subscribe(cr, uid, [res_id], new_ids + existing_ids, context=context)
# self.send_invite_email(cr, uid, wizard_data, context=context)
# self.send_invite_note(cr, uid, model.model, res_id, wizard_data, context=context)
@@ -824,7 +824,7 @@ class share_wizard(osv.TransientModel):
elif tmp_idx == len(wizard_data.result_line_ids)-2:
body += ' and'
body += '.'
- return self.pool.get(model_name).message_post(cr, uid, [res_id], body=body, context=context)
+ return self.pool[model_name].message_post(cr, uid, [res_id], body=body, context=context)
def send_invite_email(self, cr, uid, wizard_data, context=None):
# TDE Note: not updated because will disappear