[FIX] base_report_designer: missing registry signaling, otherwise the report was...
authorOlivier Dony <odo@openerp.com>
Fri, 1 Mar 2013 15:26:17 +0000 (16:26 +0100)
committerOlivier Dony <odo@openerp.com>
Fri, 1 Mar 2013 15:26:17 +0000 (16:26 +0100)
bzr revid: odo@openerp.com-20130301152617-c8dem0ozgsnv8esc

addons/base_report_designer/base_report_designer.py

index 825d1d2..180a534 100644 (file)
 #
 ##############################################################################
 
+import base64
+import openerp.modules.registry
 from openerp.osv import osv
 from openerp_sxw2rml import sxw2rml
 from StringIO import StringIO
-import base64
 from openerp import pooler
 from openerp import addons
  
@@ -55,7 +56,12 @@ class report_xml(osv.osv):
             'report_sxw_content': base64.decodestring(file_sxw), 
             'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())), 
         })
+
+        # FIXME: this should be moved to an override of the ir.actions.report_xml.create() method
+        cr.commit()
         pool.get('ir.actions.report.xml').register_all(cr)
+        openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
+
         return True
 
     def report_get(self, cr, uid, report_id, context=None):