You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
1.1 KiB
Python
20 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models
|
|
|
|
class IrActionsAccountReportDownload(models.AbstractModel):
|
|
# This model is a a hack: it's sole purpose is to override _get_readable_fields
|
|
# of ir.actions.actions to add the 'data' field which, as explained below, contains the
|
|
# necessary parameters for report generation.
|
|
# The reason why we don't extend the ir.actions.actions is because it's not really meant to be
|
|
# extended outside of the base module, the risk being completely destroying the client's db.
|
|
# If you plan on modifying this model, think of reading odoo/enterprise#13820 and/or contact
|
|
# the metastorm team.
|
|
_name = 'ir_actions_account_report_download'
|
|
_description = 'Technical model for accounting report downloads'
|
|
|
|
def _get_readable_fields(self):
|
|
# data is not a stored field, but is used to give the parameters to generate the report
|
|
# We keep it this way to ensure compatibility with the way former version called this action.
|
|
return self.env['ir.actions.actions']._get_readable_fields() | {'data'}
|