mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[12.0][ENH] sql view - allow group operator
Replaces #345 Adds the possibility, for float and integer columns, to apply a group operator (average, min, max).
This commit is contained in:
14
bi_sql_editor_aggregate/models/ir_model.py
Normal file
14
bi_sql_editor_aggregate/models/ir_model.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class IrModelFields(models.Model):
|
||||
_inherit = 'ir.model.fields'
|
||||
|
||||
def _add_manual_fields(self, model):
|
||||
super()._add_manual_fields(model)
|
||||
if 'bi.sql.view' in self.env:
|
||||
Sql = self.env['bi.sql.view']
|
||||
if hasattr(Sql, 'check_manual_fields'):
|
||||
Sql.check_manual_fields(model)
|
||||
Reference in New Issue
Block a user