Files
odoo_source/addons/website_links/models/link_tracker.py
T
qmo-odoo 403bf9e76f [IMP] website_links, link_tracker: Add action buttons on tree view
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>
2019-09-25 14:06:24 +00:00

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',
}