- remove public project
- some data was depending on demo data, moved it to demo
- add website_published mixin on projects
- remove project members from frontend view
Since public projects do not exist anymore, project.project objects now have the website_published mixin; any project with the rating activated and published on the website will be visible in the "Project Customer Satisfaction" link for public users
The frontend template has also been modified to remove the team members photo since project members have disappeared as of 9398fe9 by our dear @tde-banana-odoo
27 lines
784 B
Python
27 lines
784 B
Python
# -*- 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
|