24 lines
764 B
Python
24 lines
764 B
Python
|
# Part of Flectra See LICENSE file for full copyright and licensing details.
|
||
|
|
||
|
from flectra import api, fields, models
|
||
|
|
||
|
|
||
|
class ResConfigSettings(models.TransientModel):
|
||
|
_inherit = 'res.config.settings'
|
||
|
|
||
|
use_project = fields.Boolean("Use Projects")
|
||
|
|
||
|
@api.model
|
||
|
def get_values(self):
|
||
|
res = super(ResConfigSettings, self).get_values()
|
||
|
get_param = self.env['ir.config_parameter'].sudo().get_param
|
||
|
res.update(
|
||
|
use_project=get_param('helpdesk_project_ext.use_project'),
|
||
|
)
|
||
|
return res
|
||
|
|
||
|
def set_values(self):
|
||
|
super(ResConfigSettings, self).set_values()
|
||
|
set_param = self.env['ir.config_parameter'].sudo().set_param
|
||
|
set_param('helpdesk_project_ext.use_project', self.use_project)
|