Browse Source

Merge pull request #135 from yelizariev/8.0

web_last_viewed_records: add active_id to url
pull/167/head
Sylvain LE GAL 10 years ago
parent
commit
c2a8edde9f
  1. 4
      web_last_viewed_records/static/src/js/main.js

4
web_last_viewed_records/static/src/js/main.js

@ -22,7 +22,7 @@ openerp.web_last_viewed_records = function(instance){
x['view_type'] != item['view_type'] || x['view_type'] != item['view_type'] ||
x['url']['model'] != item['url']['model']) x['url']['model'] != item['url']['model'])
return false; return false;
if (x['view_type'] == 'form' && x['id'] != item['id'])
if (x['view_type'] == 'form' && x['url']['id'] != item['url']['id'])
return false; return false;
return true; return true;
})) }))
@ -129,6 +129,8 @@ openerp.web_last_viewed_records = function(instance){
} }
if (view_type=='form' && !url['id']) if (view_type=='form' && !url['id'])
return false; return false;
if (act.context && act.context.active_id)
url['active_id'] = act.context.active_id;
var last_viewed_item = { var last_viewed_item = {
'title': title, 'title': title,
'url': url, 'url': url,

Loading…
Cancel
Save