问题
How can I create a dynamic link in the odoo formview
for example Static text=http://maps.chef-debiscuit.com/map.php?sheetID=
dynamic text = record id
(solution) http://maps.chef-debiscuit.com/map.php?sheetID=32
For the moment i only have
<a href="http://maps.chef-debiscuit.com/map.php?sheetID=" target="_blank">View on Map</a>
回答1:
0) Create new computed field x_url
1) copy ID -> Field x_copy_id
2) Convert x_copy_id to string
3) Combine static text with IDCOPY
for record in self:
IDCOPY = str(record['x_copy_id'])
record['x_url']='http:///maps.chef-debiscuit.com/map.php?sheetID='+IDCOPY
来源:https://stackoverflow.com/questions/46338705/dynamic-url-in-odoo-form