Files
account-financial-tools/account_permanent_lock_move/models/res_config.py
2016-10-17 09:35:52 +02:00

29 lines
980 B
Python

# -*- coding: utf-8 -*-
# © 2016 Camptocamp SA (Matthieu Dietrich)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountConfigSettings(models.TransientModel):
_inherit = 'account.config.settings'
permanent_lock_date = fields.Date(
string="Permanent Lock Date",
related='company_id.permanent_lock_date',
help='Non-revertible closing of accounts prior to and inclusive of '
'this date. Use it for fiscal year locking instead of "Lock Date".')
@api.multi
def change_permanent_lock_date(self):
wizard = self.env['permanent.lock.date.wizard'].create({
'company_id': self.company_id.id
})
return {
'type': 'ir.actions.act_window',
'res_model': 'permanent.lock.date.wizard',
'view_mode': 'form',
'view_type': 'form',
'res_id': wizard.id,
'target': 'new',
}