Files
odoo_source/addons/website_hr/models/hr.py
T
David Monjoie b81d384c52 [IMP][REF] website_hr: add of published mixin, update of displayed
employees. Website publishers now see all employees + a publish button, like
for other website documents. Other people see the same published employees
as before.

The URL link for employees is not a specific url for each employee but the
about us page.
2015-01-20 17:34:33 +01:00

18 lines
532 B
Python

# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class hr_employee(osv.osv):
_name = 'hr.employee'
_inherit = ['hr.employee', 'website.published.mixin']
_columns = {
'public_info': fields.text('Public Info'),
}
def _website_url(self, cr, uid, ids, field_name, arg, context=None):
res = super(hr_employee, self)._website_url(cr, uid, ids, field_name, arg, context=context)
res.update({(employee_id, '/page/website.aboutus#team') for employee_id in ids})
return res