[MERGE] Make <report> tag extensible for extra report engines, courtesy of Nicolas Bessi (Camptocamp)
The processing of <report> tags during XML file processing is not modular or extensible, which means that extra reporting engines cannot easily add custom behavior for <report> records of their type. By returning the newly created ID in the tag_report() method we at least allow them to hook up a monkey-patch without need to copy- paste the original code. This patch also allows an extra XML attribute for webkit headers, because the original @header attribute is reserved for a boolean value. bzr revid: odo@openerp.com-20120214135255-a7hyxsoif4jhg6ro
This commit is contained in:
@@ -111,6 +111,7 @@
|
||||
<rng:optional><rng:attribute name="xsl"/></rng:optional>
|
||||
<rng:optional> <rng:attribute name="auto" /> </rng:optional>
|
||||
<rng:optional> <rng:attribute name="header" /> </rng:optional>
|
||||
<rng:optional> <rng:attribute name="webkit_header" /> </rng:optional>
|
||||
<rng:optional> <rng:attribute name="attachment" /> </rng:optional>
|
||||
<rng:optional> <rng:attribute name="attachment_use" /> </rng:optional>
|
||||
<rng:optional> <rng:attribute name="groups"/> </rng:optional>
|
||||
|
||||
@@ -358,7 +358,7 @@ form: module.record_id""" % (xml_id,)
|
||||
# Special check for report having attribute menu=False on update
|
||||
value = 'ir.actions.report.xml,'+str(id)
|
||||
self._remove_ir_values(cr, res['name'], value, res['model'])
|
||||
return False
|
||||
return id
|
||||
|
||||
def _tag_function(self, cr, rec, data_node=None):
|
||||
if self.isnoupdate(data_node) and self.mode != 'init':
|
||||
|
||||
Reference in New Issue
Block a user