package models import "odoo-go/pkg/orm" // initAccountCompanyExtension extends res.company with accounting lock date fields. // Mirrors: odoo/addons/account/models/company.py ResCompany (extends res.company) // // In Python Odoo: // // class ResCompany(models.Model): // _inherit = 'res.company' // period_lock_date = fields.Date(...) // fiscalyear_lock_date = fields.Date(...) // tax_lock_date = fields.Date(...) // // Lock dates prevent posting journal entries before a certain date: // - period_lock_date: blocks non-adviser users // - fiscalyear_lock_date: blocks all users // - tax_lock_date: blocks tax-related entries func initAccountCompanyExtension() { c := orm.ExtendModel("res.company") c.AddFields( orm.Date("period_lock_date", orm.FieldOpts{String: "Lock Date for Non-Advisers"}), orm.Date("fiscalyear_lock_date", orm.FieldOpts{String: "Lock Date for All Users"}), orm.Date("tax_lock_date", orm.FieldOpts{String: "Tax Lock Date"}), ) }