mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] sql_export from V15.0
- split view in two files, according OCA guidelines; - add legalsylvain as maintainers - use abstract tree and form views - refactor : split demo data into two files, according OCA guidelines - replace obsolete base.menu_reporting_dashboard by spreadsheet_dashboard entries - update translation - prevent usage of export with parameters, that requires extra work - do not skip 'check execution' when confirming sql exports
This commit is contained in:
committed by
David Beal
parent
59851ba2fc
commit
3ee5abc137
@@ -7,7 +7,7 @@ from datetime import datetime
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
||||
|
||||
|
||||
@@ -19,6 +19,20 @@ class SqlFileWizard(models.TransientModel):
|
||||
file_name = fields.Char(readonly=True)
|
||||
sql_export_id = fields.Many2one(comodel_name="sql.export", required=True)
|
||||
|
||||
@api.model
|
||||
def get_view(self, view_id=None, view_type="form", **options):
|
||||
export_obj = self.env["sql.export"]
|
||||
sql_export = export_obj.browse(self.env.context.get("active_id"))
|
||||
|
||||
result = super().get_view(view_id=view_id, view_type=view_type, **options)
|
||||
|
||||
if sql_export.field_ids:
|
||||
etree.fromstring(result["arch"])
|
||||
raise NotImplementedError(
|
||||
_("The export with parameters is not implemented in V16")
|
||||
)
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def fields_view_get(
|
||||
self, view_id=None, view_type="form", toolbar=False, submenu=False
|
||||
|
||||
Reference in New Issue
Block a user