Browse Source

[FIX] base_report_auto_create_qweb

Handle case in which the qweb view name contains a dot, see 'account.report_overdue_document' as reference
pull/389/head
Alex Comba 9 years ago
parent
commit
fc670a7712
  1. 5
      base_report_auto_create_qweb/models/report_xml.py

5
base_report_auto_create_qweb/models/report_xml.py

@ -79,7 +79,10 @@ class IrActionsReport(models.Model):
origin_name = report_name.replace(('_%s' % suffix), '') origin_name = report_name.replace(('_%s' % suffix), '')
origin_module = module.replace(('_%s' % suffix), '') origin_module = module.replace(('_%s' % suffix), '')
new_report_name = '%s_%s' % (origin_name, suffix) new_report_name = '%s_%s' % (origin_name, suffix)
qweb_name = report_view.name.replace(
report_view_name = report_view.name
if report_view.name.find('.') != -1:
report_view_name = report_view.name.split('.')[1]
qweb_name = report_view_name.replace(
origin_name, new_report_name) origin_name, new_report_name)
arch = report_view.arch.replace( arch = report_view.arch.replace(
origin_name, new_report_name).replace(origin_module + '.', origin_name, new_report_name).replace(origin_module + '.',

Loading…
Cancel
Save