[IMP] website: add menu item in backend
bzr revid: chm@openerp.com-20130731090625-6q7d2kmgaslvu3dl
This commit is contained in:
@@ -471,4 +471,9 @@ instance.web.ActionRedirect = function(parent, action) {
|
||||
};
|
||||
instance.web.client_actions.add("redirect", "instance.web.ActionRedirect");
|
||||
|
||||
instance.web.GoToWebsite = function(parent, action) {
|
||||
window.location.href = window.location.href.replace(/[?#].*/, '').replace(/\/admin[\/]?$/, '');
|
||||
};
|
||||
instance.web.client_actions.add("website.gotowebsite", "instance.web.GoToWebsite");
|
||||
|
||||
};
|
||||
|
||||
@@ -16,5 +16,20 @@
|
||||
<field name="users" eval="[(4, ref('public_user'))]"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_gotowebsite" model="ir.actions.client">
|
||||
<field name="name">Website</field>
|
||||
<field name="tag">website.gotowebsite</field>
|
||||
<field name="res_model">website</field>
|
||||
</record>
|
||||
<menuitem id="website.menu" name="Website" sequence="11"/>
|
||||
<menuitem id="website.submenu" name="Website" parent="website.menu" sequence="10"/>
|
||||
<record id="mail_inboxfeeds" model="ir.ui.menu">
|
||||
<field name="name">Go to Website</field>
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="action" ref="website.action_gotowebsite"/>
|
||||
<field name="parent_id" ref="website.submenu"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user