| 1 |
from odoo import fields, models |
| 2 |
|
| 3 |
|
| 4 |
class ResConfigSettings(models.TransientModel): |
| 5 |
_inherit = 'res.config.settings' |
| 6 |
|
| 7 |
l10n_hr_mer_connection_state = fields.Selection(related='company_id.l10n_hr_mer_connection_state') |
| 8 |
l10n_hr_mer_connection_mode = fields.Selection(related='company_id.l10n_hr_mer_connection_mode', readonly=False) |
| 9 |
|
| 10 |
l10n_hr_mer_username = fields.Char(related='company_id.l10n_hr_mer_username', readonly=False) |
| 11 |
l10n_hr_mer_password = fields.Char(related='company_id.l10n_hr_mer_password', readonly=False) |
| 12 |
l10n_hr_mer_company_ident = fields.Char(related='company_id.l10n_hr_mer_company_ident', readonly=False) |
| 13 |
l10n_hr_mer_company_bu = fields.Char(related='company_id.partner_id.l10n_hr_business_unit_code', readonly=False) |
| 14 |
l10n_hr_mer_software_ident = fields.Char(related='company_id.l10n_hr_mer_software_ident', readonly=False) |
| 15 |
l10n_hr_mer_purchase_journal_id = fields.Many2one(related='company_id.l10n_hr_mer_purchase_journal_id', readonly=False) |
| 16 |
|
| 17 |
# ------------------------------------------------------------------------- |
| 18 |
# BUSINESS ACTIONS |
| 19 |
# ------------------------------------------------------------------------- |
| 20 |
|
| 21 |
def button_l10n_hr_activate_mojeracun(self): |
| 22 |
self.ensure_one() |
| 23 |
self.company_id._l10n_hr_activate_mojeracun() |
| 24 |
|
| 25 |
def button_l10n_hr_deactivate_mojeracun(self): |
| 26 |
self.ensure_one() |
| 27 |
self.company_id.l10n_hr_mer_connection_state = 'inactive' |