diff options
| author | Jérome Maes <jem@openerp.com> | 2016-04-14 15:17:30 +0200 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2016-07-12 11:43:49 +0200 |
| commit | 65dcfbbbc94dcf53823df53c6ad4dc17c651aac2 (patch) | |
| tree | c4edb7f51baca49cfad8729a75524561189fc49b /addons/website_rating_project_issue/models/project.py | |
| parent | 28313ab57422d1b35cec1031fcbce606dbe4cf37 (diff) | |
[MOV] website_rating_project_issue : move files to reorder module
Diffstat (limited to 'addons/website_rating_project_issue/models/project.py')
| -rw-r--r-- | addons/website_rating_project_issue/models/project.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/website_rating_project_issue/models/project.py b/addons/website_rating_project_issue/models/project.py new file mode 100644 index 00000000000..fe4d4f7abf6 --- /dev/null +++ b/addons/website_rating_project_issue/models/project.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +from openerp import api, fields, models + + +class Project(models.Model): + + _name = "project.project" + _inherit = ['project.project', 'website.published.mixin'] + + @api.multi + def action_view_all_rating(self): + """ Override this method without calling parent to redirect to rating website project page """ + self.ensure_one() + return { + 'type': 'ir.actions.act_url', + 'name': "Redirect to the Website Projcet Rating Page", + 'target': 'self', + 'url': "/project/rating/%s" % (self.id,) + } + + @api.multi + def _website_url(self, field_name, arg): + res = dict() + for project in self: + res[project.id] = "/project/rating/%s" % project.id + return res |
