[FIX] hr: more hr.config.settings removal

hr.config.settings was still inherited in python by hr_timesheet_sheet
This commit is contained in:
Antony Lesuisse
2015-08-26 22:03:45 +02:00
parent 2fbb0fe5d8
commit 97cc5b4dc5
3 changed files with 0 additions and 46 deletions
@@ -326,21 +326,6 @@ class HrEquipmentRequest(models.Model):
'stage_id': _read_group_stage_ids
}
@api.model
def get_empty_list_help(self, help):
res = super(HrEquipmentRequest, self).get_empty_list_help(help)
alias_record = self.env.ref('hr_equipment.mail_alias_equipment')
check_alias_manage = self.env['ir.values'].get_default('hr.config.settings', 'alias_manage')
if alias_record and alias_record.alias_domain and alias_record.alias_name and res and check_alias_manage:
return _("""<p class="oe_view_nocontent_create">
Click to add a new maintenance request or send an email to: <a>%(alias_name)s</a>
</p>
<p>
Follow the process of the request and communicate with the collaborator.
</p>"""
) % {'alias_name': alias_record.alias_name + '@' + alias_record.alias_domain}
return res
@api.model
def message_new(self, msg, custom_values=None):
""" Overrides mail_thread message_new that is called by the mailgateway
-1
View File
@@ -5,4 +5,3 @@ import hr_timesheet_sheet
import hr_department
import wizard
import report
import res_config
-30
View File
@@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
class hr_timesheet_settings(osv.osv_memory):
_inherit = 'hr.config.settings'
_columns = {
'timesheet_range': fields.selection([('day','Day'),('week','Week'),('month','Month')],
'Validate timesheets every', help="Periodicity on which you validate your timesheets."),
'timesheet_max_difference': fields.float('Allow a difference of time between timesheets and attendances of (in hours)',
help='Allowed difference in hours between the sign in/out and the timesheet '
'computation for one sheet. Set this to 0 if you do not want any control.'),
}
def get_default_timesheet(self, cr, uid, fields, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return {
'timesheet_range': user.company_id.timesheet_range,
'timesheet_max_difference': user.company_id.timesheet_max_difference,
}
def set_default_timesheet(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
user = self.pool.get('res.users').browse(cr, uid, uid, context)
user.company_id.write({
'timesheet_range': config.timesheet_range,
'timesheet_max_difference': config.timesheet_max_difference,
})