diff options
| author | ced <> | 2007-06-07 12:00:30 +0000 |
|---|---|---|
| committer | ced <> | 2007-06-07 12:00:30 +0000 |
| commit | 6f524993c38e6021dfbf246ee075f1571c8a6a00 (patch) | |
| tree | b9386f43bd0c9cbecbe6cc8b92313466586c0ec7 /bin/report/interface.py | |
| parent | c10621cc83d603881d488ce27326ec7772627dff (diff) | |
KERNEL: add test for duplicate report and wizard
Remove/Fix all the duplicate report and wizard
Don't instanciate auto report when update as there are already
Instanciate auto report only if it don't exist in netsvc
bzr revid: ced-f59b375f6fc502b8a3e6009162502e2becfc82f7
Diffstat (limited to 'bin/report/interface.py')
| -rw-r--r-- | bin/report/interface.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/report/interface.py b/bin/report/interface.py index 88036afcdc4..4091c717650 100644 --- a/bin/report/interface.py +++ b/bin/report/interface.py @@ -54,6 +54,7 @@ def toxml(val): class report_int(netsvc.Service): def __init__(self, name, audience='*'): + assert not netsvc.service_exist(name), 'The report "%s" already exist!'%name super(report_int, self).__init__(name, audience) if name[0:7]<>'report.': raise 'ConceptionError, bad report name, should start with "report."' @@ -188,6 +189,8 @@ def register_all(db): result = cr.dictfetchall() cr.close() for r in result: + if netsvc.service_exist('report.'+r['report_name']): + continue if r['report_rml']: report_sxw('report.'+r['report_name'], r['model'], opj('addons',r['report_rml']), header=r['header']) if r['report_xsl']: |
