0
votes

Hi,
which is the class responsible of creating the URL in OpenERP 7.
Is it in web module or in other controllers?
Thanks for your help.

1

1 Answers

0
votes

If I'm not wrong, URLs are composed by the widgets of the web client.

If you need, you can compose URLs in python like this:

def link_item(item, name_field='name'):
    default = getattr(item, '_rec_name', 'Unknown')
    name = getattr(item, name_field, default)
    link = """
    <a href='/web?#id={id}&view_type=form&model={model}>{name}</a>"
    """.format(id=item.id,
               model=item._name,
               name=name)
    return link