Help

2

how to get url of project.task

Hi friends,

I viewed the coding and procedures to get url but it is always used with respect to a partner object. For more info: Q/A @ help.openerp.com.

I am in need to send the email to users if the task is gonna be expired soon. In the email, I need to have a link to the project.task record similar to Sales Order.

Thanks & Regards,

Atchuthan
Avatar
Discard
1 Answer
2
Avatar
nazarii
Best Answer

You can can web_base_url option (Settings-->Customisation-->Low level objects-->System parameters) to get your custom url and append additional info to it like action_id and model name. So as an example to get link to specific product your code will looks like:

action_id = Get action id opening your form
base_url = Url from system parameters
product_id = Id of product you want to get link to
link = '%s:8069/web/webclient/home#id=%s&view_type=form&title=Products&model=product.product&action_id=%s' % (base_url, product_id, action_id)
2 Comments
Avatar
Discard

Thanks,

link = '%s/?db=%s#id=%s&view_type=form&model=project.task' % (base_url, database_name, object_id)

How to get the Database name?

Avatar
nazarii
-

You can get it from cr.dbname.