Browse Source

IMP kpi_dshb: set ondelete on dash_id

12.0
David Beal 5 years ago
parent
commit
b0bd76b539
  1. 4
      kpi_dashboard/models/kpi_dashboard.py
  2. 2
      kpi_dashboard_altair/models/kpi_kpi.py

4
kpi_dashboard/models/kpi_dashboard.py

@ -92,7 +92,9 @@ class KpiDashboardItem(models.Model):
name = fields.Char(required=True)
kpi_id = fields.Many2one("kpi.kpi")
dashboard_id = fields.Many2one("kpi.dashboard", required=True,)
dashboard_id = fields.Many2one(
"kpi.dashboard", required=True, ondelete="cascade"
)
column = fields.Integer(required=True, default=1)
row = fields.Integer(required=True, default=1)
end_row = fields.Integer(store=True, compute='_compute_end_row')

2
kpi_dashboard_altair/models/kpi_kpi.py

@ -8,7 +8,7 @@ try:
import pandas
import altair
except ImportError:
logger.debug('Cannot import genshi.core')
logger.debug('Cannot import altair or pandas')
class KpiKpi(models.Model):

Loading…
Cancel
Save