[REM] ir_set from _tag_url's convert

Hinges on @menu (not allowed on the url tag), @keyword (not allowed either) and sets the url on the url

bzr revid: xmo@openerp.com-20120608103815-n20dhponzinhr7xf
This commit is contained in:
Xavier Morel
2012-06-08 12:38:15 +02:00
parent 48166edeb8
commit a59da4d476
+1 -13
View File
@@ -384,20 +384,8 @@ form: module.record_id""" % (xml_id,)
res = {'name': name, 'url': url, 'target':target}
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)
id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.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 = act_url + ',' + str(id)
replace = rec.get("replace",'') or True
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 = 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')