XML : How to link menu in Odoo to a computed URL

I need to link a menu item in Odoo to an external link, but this external link is a string stored in model and it is different for every user. I'm not sure how to code this inside the eval attribute of field name url. Or is this possible?

  <openerp>     <data>          <record id="open_retainer" model="ir.actions.act_url">              <field name="name">Pay Retainer</field>              <field name="type">ir.actions.act_url</field>              <field name="target">new</field>              <field name="url" eval="'some_url' if True else ''"/>          </record>            <menuitem                  name="Pay Retainer"                  id="menu_pay_retainer"                  groups="base.group_portal"                  action="open_retainer"                  parent="portal.portal_orders"/>        </data>  </openerp>    

No comments:

Post a Comment