old_contents: # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  
  from odoo import fields, models
  
  
  class AccountFiscalYearClosingUnbalancedMove(models.TransientModel):
      _name = "account.fiscalyear.closing.unbalanced.move"
      _description = "Account fiscalyear closing unbalanced move"
  
      journal_id = fields.Many2one(
          comodel_name="account.journal",
          string="Journal",
          readonly=True,
      )
      ref = fields.Char(
          string="Reference",
          readonly=True,
      )
      date = fields.Date(
          string="Date",
          readonly=True,
      )
      line_ids = fields.One2many(
          comodel_name="account.fiscalyear.closing.unbalanced.move.line",
          inverse_name="move_id",
          string="Unbalanced move lines",
          readonly=True,
      )
  
  
  class AccountFiscalYearClosingUnbalancedMoveLine(models.TransientModel):
      _name = "account.fiscalyear.closing.unbalanced.move.line"
      _description = "Account fiscalyear closing unbalanced move line"
  
      move_id = fields.Many2one(
          comodel_name="account.fiscalyear.closing.unbalanced.move",
          string="Unbalanced move",
      )
      account_id = fields.Many2one(
          comodel_name="account.account",
          string="Account",
      )
      credit = fields.Float()
      debit = fields.Float()
      partner_id = fields.Many2one(
          comodel_name="res.partner",
          string="Partner",
      )
      name = fields.Char()
  
new_contents: # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  
  from odoo import fields, models
  
  
  class AccountFiscalYearClosingUnbalancedMove(models.TransientModel):
      _name = "account.fiscalyear.closing.unbalanced.move"
      _description = "Account fiscalyear closing unbalanced move"
  
      journal_id = fields.Many2one(
          comodel_name="account.journal",
          string="Journal",
          readonly=True,
      )
      ref = fields.Char(
          string="Reference",
          readonly=True,
      )
      date = fields.Date(
          string="Date",
          readonly=True,
      )
      line_ids = fields.One2many(
          comodel_name="account.fiscalyear.closing.unbalanced.move.line",
          inverse_name="move_id",
          string="Unbalanced move lines",
          readonly=True,
      )
  
  
  class AccountFiscalYearClosingUnbalancedMoveLine(models.TransientModel):
      _name = "account.fiscalyear.closing.unbalanced.move.line"
      _description = "Account fiscalyear closing unbalanced move line"
  
      move_id = fields.Many2one(
          comodel_name="account.fiscalyear.closing.unbalanced.move",
          string="Unbalanced move",
      )
      account_id = fields.Many2one(
          comodel_name="account.account",
          string="Account",
      )
      credit = fields.Float()
      debit = fields.Float()
      partner_id = fields.Many2one(
          comodel_name="res.partner",
          string="Partner",
      )
      name = fields.Char()
      date = fields.Date(
          string="Date",
      )
  
subject: Add date field to unbalanced move line. Otherwise the following might happen: File "/path/to/odoo/addons/account_fiscal_year_closing/models/account_fiscalyear_closing.py", line 328, in button_calculate res = self.calculate() File "/path/to/odoo/addons/account_fiscal_year_closing/models/account_fiscalyear_closing.py", line 315, in calculate return self._show_unbalanced_move_wizard(data) File "/path/to/odoo/addons/account_fiscal_year_closing/models/account_fiscalyear_closing.py", line 295, in _show_unbalanced_move_wizard wizard = self.env["account.fiscalyear.closing.unbalanced.move"].create(data) [...] ValueError: Invalid field 'date' on model 'account.fiscalyear.closing.unbalanced.move.line'