Browse Source

[IMP] mis_builder: new api

pull/86/head
Stéphane Bidoul 10 years ago
parent
commit
203891ddb5
  1. 788
      mis_builder/models/mis_builder.py
  2. 2
      mis_builder/report/report_mis_report_instance.py
  3. 10
      mis_builder/views/mis_builder.xml

788
mis_builder/models/mis_builder.py
File diff suppressed because it is too large
View File

2
mis_builder/report/report_mis_report_instance.py

@ -38,7 +38,7 @@ class ReportMisReportInstance(models.AbstractModel):
docs = self.env['mis.report.instance'].browse(self._ids) docs = self.env['mis.report.instance'].browse(self._ids)
docs_computed = {} docs_computed = {}
for doc in docs: for doc in docs:
docs_computed[doc.id] = doc.compute()[0]
docs_computed[doc.id] = doc.compute()
docargs = { docargs = {
'doc_ids': self._ids, 'doc_ids': self._ids,
'doc_model': 'mis.report.instance', 'doc_model': 'mis.report.instance',

10
mis_builder/views/mis_builder.xml

@ -33,8 +33,7 @@
<tree string="Queries" editable="bottom"> <tree string="Queries" editable="bottom">
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
<field name="field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"
on_change="onchange_field_ids(field_ids, context)"/>
<field name="field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"/>
<field name="field_names"/> <field name="field_names"/>
<field name="aggregate"/> <field name="aggregate"/>
<field name="date_field" domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"/> <field name="date_field" domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"/>
@ -44,10 +43,10 @@
<field name="kpi_ids"> <field name="kpi_ids">
<tree string="KPI's" editable="bottom"> <tree string="KPI's" editable="bottom">
<field name="sequence" widget="handle"/> <field name="sequence" widget="handle"/>
<field name="description" on_change="onchange_description(description, name, context)"/>
<field name="name" on_change="onchange_name(name, context)"/>
<field name="description"/>
<field name="name"/>
<field name="expression"/> <field name="expression"/>
<field name="type" on_change="onchange_type(type, context)"/>
<field name="type"/>
<field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/> <field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/>
<field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/> <field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/>
<field name="suffix"/> <field name="suffix"/>
@ -190,7 +189,6 @@
<field name="report_instance_id" invisible="1"/> <field name="report_instance_id" invisible="1"/>
<field name="id" invisible="1"/> <field name="id" invisible="1"/>
<field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/> <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree> </tree>
</field> </field>
</group> </group>

Loading…
Cancel
Save