初始提交

This commit is contained in:
2026-11-04 19:58:07 +08:00
commit 53b7d22429
829 changed files with 469986 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import ast
from odoo import models, fields
class AccountAccount(models.Model):
_inherit = "account.account"
is_deferred = fields.Boolean(string="Deferred", tracking=True, help="Check to enable deferred accounting, deferred dates will be required on invoice / bill")
deferred_account_id = fields.Many2one(
comodel_name="account.account",
string="Deferred Account",
copy=False,
check_company=True,
tracking=True,
help="Account automatically used for deferred entries on this account.",
)
def action_open_reconcile(self):
self.ensure_one()
# Open reconciliation view for this account
action_values = self.env['ir.actions.act_window']._for_xml_id('account_accountant.action_move_line_posted_unreconciled')
domain = ast.literal_eval(action_values['domain'])
domain.append(('account_id', '=', self.id))
action_values['domain'] = domain
return action_values