mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
Hide the function field when the binary field is filled
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
attrs="{'invisible': [('report_type', '!=', 'py3o')]}">
|
||||
|
||||
<field name="py3o_filename" invisible="1" />
|
||||
<field name="py3o_template" filename="py3o_filename" />
|
||||
<field name="py3o_template" filename="py3o_filename"
|
||||
attrs="{'invisible': [('py3o_template_data', '!=', False)]}" />
|
||||
<field name="py3o_template_data" filename="py3o_filename" />
|
||||
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user