forked from Mapan/odoo17e
33 lines
1.5 KiB
Python
33 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from calendar import monthrange
|
|
|
|
from odoo import api, fields, models, _
|
|
from dateutil.relativedelta import relativedelta
|
|
from odoo.tools.misc import format_date
|
|
from odoo.tools import date_utils
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = 'res.config.settings'
|
|
|
|
totals_below_sections = fields.Boolean(related='company_id.totals_below_sections', string='Add totals below sections', readonly=False,
|
|
help='When ticked, totals and subtotals appear below the sections of the report.')
|
|
account_tax_periodicity = fields.Selection(related='company_id.account_tax_periodicity', string='Periodicity', readonly=False, required=True)
|
|
account_tax_periodicity_reminder_day = fields.Integer(related='company_id.account_tax_periodicity_reminder_day', string='Reminder', readonly=False, required=True)
|
|
account_tax_periodicity_journal_id = fields.Many2one(related='company_id.account_tax_periodicity_journal_id', string='Journal', readonly=False)
|
|
|
|
def open_tax_group_list(self):
|
|
self.ensure_one()
|
|
return {
|
|
'type': 'ir.actions.act_window',
|
|
'name': 'Tax groups',
|
|
'res_model': 'account.tax.group',
|
|
'view_mode': 'tree',
|
|
'context': {
|
|
'default_country_id': self.account_fiscal_country_id.id,
|
|
'search_default_country_id': self.account_fiscal_country_id.id,
|
|
},
|
|
}
|