File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -231,12 +231,13 @@ def ref(xid):
231
231
232
232
def get_anchor_link_to_record (model , id , name , action_id = None ):
233
233
_validate_model (model )
234
- anchor_tag = '<a target="_blank" href="/web?debug=1#view_type=form&model=%s&action=%s&id=%s">%s</a>' % (
235
- model ,
236
- action_id or "" ,
237
- id ,
238
- html_escape (name ),
239
- )
234
+ if version_gte ("saas~17.2" ):
235
+ part1 = "action-{}" .format (action_id ) if action_id else model
236
+ url = "/odoo/{}/{}?debug=1" .format (part1 , id )
237
+ else :
238
+ url = "/web?debug=1#view_type=form&model={}&action={}&id={}" .format (model , action_id or "" , id )
239
+
240
+ anchor_tag = '<a target="_blank" href="{}">{}</a>' .format (url , html_escape (name ))
240
241
if Markup :
241
242
anchor_tag = Markup (anchor_tag )
242
243
return anchor_tag
You can’t perform that action at this time.
0 commit comments