Browse Source

Merge pull request #177 from acsone/8.0-mis_builder-copy-sbi

[IMP] mis_builder: meaningful copy for MIS Report templates
pull/181/head
Pedro M. Baeza 9 years ago
parent
commit
55037468ac
  1. 12
      mis_builder/models/mis_builder.py

12
mis_builder/models/mis_builder.py

@ -278,9 +278,17 @@ class MisReport(models.Model):
description = fields.Char(required=False, description = fields.Char(required=False,
string='Description', translate=True) string='Description', translate=True)
query_ids = fields.One2many('mis.report.query', 'report_id', query_ids = fields.One2many('mis.report.query', 'report_id',
string='Queries')
string='Queries',
copy=True)
kpi_ids = fields.One2many('mis.report.kpi', 'report_id', kpi_ids = fields.One2many('mis.report.kpi', 'report_id',
string='KPI\'s')
string='KPI\'s',
copy=True)
@api.one
def copy(self, default=None):
default = dict(default or {})
default['name'] = _('%s (copy)') % self.name
return super(MisReport, self).copy(default)
# TODO: kpi name cannot be start with query name # TODO: kpi name cannot be start with query name

Loading…
Cancel
Save