[MIG] account_financial_report: Migration to 15.0
This commit is contained in:
@@ -7,7 +7,6 @@ class AccountAccount(models.Model):
|
||||
_inherit = "account.account"
|
||||
|
||||
centralized = fields.Boolean(
|
||||
"Centralized",
|
||||
help="If flagged, no details will be displayed in "
|
||||
"the General Ledger report (the webkit one only), "
|
||||
"only centralized amounts per period.",
|
||||
|
||||
@@ -10,7 +10,7 @@ class AccountGroup(models.Model):
|
||||
group_child_ids = fields.One2many(
|
||||
comodel_name="account.group", inverse_name="parent_id", string="Child Groups"
|
||||
)
|
||||
level = fields.Integer(string="Level", compute="_compute_level")
|
||||
level = fields.Integer(compute="_compute_level", recursive=True)
|
||||
account_ids = fields.One2many(
|
||||
comodel_name="account.account", inverse_name="group_id", string="Accounts"
|
||||
)
|
||||
@@ -20,8 +20,12 @@ class AccountGroup(models.Model):
|
||||
string="Compute accounts",
|
||||
store=True,
|
||||
)
|
||||
complete_name = fields.Char("Full Name", compute="_compute_complete_name")
|
||||
complete_code = fields.Char("Full Code", compute="_compute_complete_code")
|
||||
complete_name = fields.Char(
|
||||
"Full Name", compute="_compute_complete_name", recursive=True
|
||||
)
|
||||
complete_code = fields.Char(
|
||||
"Full Code", compute="_compute_complete_code", recursive=True
|
||||
)
|
||||
|
||||
@api.depends("name", "parent_id.complete_name")
|
||||
def _compute_complete_name(self):
|
||||
|
||||
@@ -15,11 +15,11 @@ class IrActionsReport(models.Model):
|
||||
@api.model
|
||||
def _render_qweb_html(self, docids, data=None):
|
||||
context = self._prepare_account_financial_report_context(data)
|
||||
obj = self.with_context(context) if context else self
|
||||
obj = self.with_context(**context) if context else self
|
||||
return super(IrActionsReport, obj)._render_qweb_html(docids, data)
|
||||
|
||||
@api.model
|
||||
def _render_xlsx(self, docids, data):
|
||||
context = self._prepare_account_financial_report_context(data)
|
||||
obj = self.with_context(context) if context else self
|
||||
obj = self.with_context(**context) if context else self
|
||||
return super(IrActionsReport, obj)._render_xlsx(docids, data)
|
||||
|
||||
Reference in New Issue
Block a user