This commit adds two buttons on the link.tracker tree view:
- Visit Page : Redirects the user to the visited page
- Statistics : Redirects to the page statistics
(with the '+' at the end of the shortened url)
In this commit we also add some padding to the graph of the page statistics
LINKS
closes odoo/odoo#37378
Taskid: 2075858
Pr: #37344
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
16 lines
432 B
Python
16 lines
432 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models, _
|
|
|
|
class LinkTracker(models.Model):
|
|
_inherit = ['link.tracker']
|
|
|
|
def action_visit_page_statistics(self):
|
|
return {
|
|
'name': _("Visit Webpage Statistics"),
|
|
'type': 'ir.actions.act_url',
|
|
'url': '%s+' % (self.short_url),
|
|
'target': 'new',
|
|
}
|