Browse Source

add help in view, use NameError instead of ValueError

pull/90/head
Laetitia Gangloff 10 years ago
committed by Stéphane Bidoul
parent
commit
ff68d74a85
  1. 4
      mis_builder/models/mis_builder.py
  2. 27
      mis_builder/views/mis_builder.xml

4
mis_builder/models/mis_builder.py

@ -144,7 +144,7 @@ class mis_report_kpi(orm.Model):
res = {}
if name and not _is_valid_python_var(name):
res['warning'] = {
'title': 'Invalid name',
'title': 'Invalid name %s' % name,
'message': 'The name must be a valid python identifier'}
return res
@ -578,7 +578,7 @@ class mis_report_instance_period(orm.Model):
kpi_val = None
kpi_val_rendered = '#DIV/0'
kpi_val_comment += '\n\n%s' % (traceback.format_exc(),)
except ValueError:
except NameError:
recompute_queue.append(kpi)
kpi_val = None
kpi_val_rendered = '#ERR'

27
mis_builder/views/mis_builder.xml

@ -58,6 +58,33 @@
</tree>
</field>
</group>
<group col="2" string="Legend (for expression)">
<group>
<label colspan="2" string="Expressions are of the form &lt;field&gt;&lt;mode&gt;[accounts][optional move line domain]"/>
<label colspan="2" string="* Value for 'field' are :"/>
<group>
<label colspan="2" string="bal for balance of account"/>
<label colspan="2" string="crd for credit of account"/>
<label colspan="2" string="deb for debit of account"/>
</group>
<label colspan="2" string="* Value for 'mode' are :"/>
<group>
<label colspan="2" string="nothing or p for moves over period"/>
<label colspan="2" string="i for for initial balance"/>
<label colspan="2" string="e for ending balance"/>
</group>
<label colspan="2" string="* 'accounts' is a list of accounts, possibly containing %% wildcards"/>
<label colspan="2" string="* 'optional move line domain' is an optional filters on eg analytic accounts or journal"/>
</group>
<group>
<label colspan="2" string="Examples"/>
<group>
<label colspan="2" string="* bal[70]: balance of moves on account 70 over the period (it is the same as balp[70]);"/>
<label colspan="2" string="* bali[70,60]: initial balance of accounts 70 and 60;"/>
<label colspan="2" string="* bale[1%%]: balance of accounts starting with 1 at end of period."/>
</group>
</group>
</group>
</sheet>
</form>
</field>

Loading…
Cancel
Save