[IMP] report: in convert.py, allows to use the tag 'paperformat' in a report definition using the paperformat id
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
<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>
|
||||
<rng:optional> <rng:attribute name="paperformat"/> </rng:optional>
|
||||
<!-- `Usage` may help identify the best report for a certain task,
|
||||
for example usage="default" for reports that are attached by
|
||||
default in EDI exports -->
|
||||
|
||||
@@ -342,6 +342,10 @@ form: module.record_id""" % (xml_id,)
|
||||
group_id = self.id_get(cr, group)
|
||||
groups_value.append((4, group_id))
|
||||
res['groups_id'] = groups_value
|
||||
if rec.get('paperformat'):
|
||||
pf_name = rec.get('paperformat')
|
||||
pf_id = self.id_get(cr,pf_name)
|
||||
res['paperformat_id'] = pf_id
|
||||
|
||||
id = self.pool['ir.model.data']._update(cr, self.uid, "ir.actions.report.xml", self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode)
|
||||
self.idref[xml_id] = int(id)
|
||||
|
||||
Reference in New Issue
Block a user