From 6df4a8469c8e51cde8e1f9f023fe1688cb5de206 Mon Sep 17 00:00:00 2001 From: Houzefa Abbasbhay Date: Mon, 28 Oct 2013 17:45:53 +0100 Subject: [PATCH] Hide the function field when the binary field is filled --- ir_report.py | 4 ++-- ir_report.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ir_report.py b/ir_report.py index aedfb01c..c4bd8595 100644 --- a/ir_report.py +++ b/ir_report.py @@ -24,8 +24,8 @@ class report_xml(osv.osv): empty; in that case, read the template file. ''' return { - br.id: (br.py3o_template_data if br.py3o_template_data - else b64encode(file(addons.get_module_resource( + br.id: (br.py3o_template_data or + b64encode(file(addons.get_module_resource( *br.report_file.split('/')), 'rb').read())) for br in self.browse(cr, uid, ids, context=context) if br.report_type == 'py3o' diff --git a/ir_report.xml b/ir_report.xml index fad7ceab..5810a745 100644 --- a/ir_report.xml +++ b/ir_report.xml @@ -14,7 +14,8 @@ attrs="{'invisible': [('report_type', '!=', 'py3o')]}"> - +