diff --git a/privacy_partner_report/static/description/icon.png b/privacy_partner_report/static/description/icon.png
index 3a0328b..f36112b 100644
Binary files a/privacy_partner_report/static/description/icon.png and b/privacy_partner_report/static/description/icon.png differ
diff --git a/privacy_partner_report/wizard/privacy_report_partner.py b/privacy_partner_report/wizard/privacy_report_partner.py
index f1680cd..e61e867 100644
--- a/privacy_partner_report/wizard/privacy_report_partner.py
+++ b/privacy_partner_report/wizard/privacy_report_partner.py
@@ -2,6 +2,7 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import api, fields, models, _
from odoo.exceptions import UserError
+import ast
class PrivacyPartnerReport(models.TransientModel):
@@ -142,6 +143,7 @@ class PrivacyPartnerReport(models.TransientModel):
[('model', '=', res._name)]).id,
'count_rows': len(res.ids),
'field_type': field_type,
+ 'res_ids': res.ids,
}
return values
return {}
@@ -223,3 +225,20 @@ class PrivacyPartnerData(models.TransientModel):
default=0,
string='Number of lines',
)
+ res_ids = fields.Char('Related Document IDs', index=True,
+ help='List of Related Document IDs')
+
+ @api.multi
+ def action_view_records(self):
+ self.ensure_one()
+ response = {
+ 'name': self.model_id.display_name,
+ 'type': 'ir.actions.act_window',
+ 'res_model': self.model_id.model,
+ 'view_mode': 'tree,form',
+ 'domain': [('id', 'in', ast.literal_eval(self.res_ids))],
+ 'target': 'current',
+ 'context': {'delete': True},
+ }
+ return response
+
diff --git a/privacy_partner_report/wizard/privacy_report_partner_wizard.xml b/privacy_partner_report/wizard/privacy_report_partner_wizard.xml
index bc75960..3d119a7 100644
--- a/privacy_partner_report/wizard/privacy_report_partner_wizard.xml
+++ b/privacy_partner_report/wizard/privacy_report_partner_wizard.xml
@@ -8,6 +8,9 @@
privacy.partner.report
@@ -44,8 +45,7 @@
form
form
- {}
- new
+ current