[FIX] rename ir.actions.url to match action's type
bzr revid: xmo@openerp.com-20120608101710-ncwcmu9u72u7mxcy
This commit is contained in:
parent
4dcc28c2c9
commit
48166edeb8
|
@ -375,7 +375,7 @@ class act_wizard(osv.osv):
|
|||
act_wizard()
|
||||
|
||||
class act_url(osv.osv):
|
||||
_name = 'ir.actions.url'
|
||||
_name = 'ir.actions.act_url'
|
||||
_table = 'ir_act_url'
|
||||
_sequence = 'ir_actions_id_seq'
|
||||
_order = 'name'
|
||||
|
|
|
@ -293,7 +293,7 @@ class ir_ui_menu(osv.osv):
|
|||
('ir.actions.report.xml', 'ir.actions.report.xml'),
|
||||
('ir.actions.act_window', 'ir.actions.act_window'),
|
||||
('ir.actions.wizard', 'ir.actions.wizard'),
|
||||
('ir.actions.url', 'ir.actions.url'),
|
||||
('ir.actions.act_url', 'ir.actions.act_url'),
|
||||
('ir.actions.server', 'ir.actions.server'),
|
||||
('ir.actions.client', 'ir.actions.client'),
|
||||
]),
|
||||
|
|
|
@ -384,18 +384,20 @@ form: module.record_id""" % (xml_id,)
|
|||
|
||||
res = {'name': name, 'url': url, 'target':target}
|
||||
|
||||
id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.url", self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode)
|
||||
act_url = "ir.actions.act_url"
|
||||
id = self.pool.get('ir.model.data')._update(cr, self.uid, act_url, self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode)
|
||||
self.idref[xml_id] = int(id)
|
||||
# ir_set
|
||||
if (not rec.get('menu') or eval(rec.get('menu','False'))) and id:
|
||||
keyword = str(rec.get('keyword','') or 'client_action_multi')
|
||||
value = 'ir.actions.url,'+str(id)
|
||||
value = act_url + ',' + str(id)
|
||||
replace = rec.get("replace",'') or True
|
||||
self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', keyword, url, ["ir.actions.url"], value, replace=replace, isobject=True, xml_id=xml_id)
|
||||
self.pool.get('ir.model.data').ir_set(cr, self.uid, 'action', keyword, url, [
|
||||
act_url], value, replace=replace, isobject=True, xml_id=xml_id)
|
||||
elif self.mode=='update' and (rec.get('menu') and eval(rec.get('menu','False'))==False):
|
||||
# Special check for URL having attribute menu=False on update
|
||||
value = 'ir.actions.url,'+str(id)
|
||||
self._remove_ir_values(cr, url, value, "ir.actions.url")
|
||||
value = act_url + ',' + str(id)
|
||||
self._remove_ir_values(cr, url, value, act_url)
|
||||
|
||||
def _tag_act_window(self, cr, rec, data_node=None):
|
||||
name = rec.get('name','').encode('utf-8')
|
||||
|
|
|
@ -728,15 +728,15 @@ class YamlInterpreter(object):
|
|||
res = {'name': node.name, 'url': node.url, 'target': node.target}
|
||||
|
||||
id = self.pool.get('ir.model.data')._update(self.cr, 1, \
|
||||
"ir.actions.url", self.module, res, node.id, mode=self.mode)
|
||||
"ir.actions.act_url", self.module, res, node.id, mode=self.mode)
|
||||
self.id_map[node.id] = int(id)
|
||||
# ir_set
|
||||
if (not node.menu or eval(node.menu)) and id:
|
||||
keyword = node.keyword or 'client_action_multi'
|
||||
value = 'ir.actions.url,%s' % id
|
||||
value = 'ir.actions.act_url,%s' % id
|
||||
replace = node.replace or True
|
||||
self.pool.get('ir.model.data').ir_set(self.cr, 1, 'action', \
|
||||
keyword, node.url, ["ir.actions.url"], value, replace=replace, \
|
||||
keyword, node.url, ["ir.actions.act_url"], value, replace=replace, \
|
||||
noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id)
|
||||
|
||||
def process_ir_set(self, node):
|
||||
|
|
Loading…
Reference in New Issue