[IMP] gamification: domain for type form
bzr revid: mat@openerp.com-20130218151607-22gv890c1adecpql
This commit is contained in:
parent
c4e48dbd02
commit
d80e4909e4
|
@ -89,13 +89,13 @@ class gamification_goal_type(osv.Model):
|
||||||
- 'Count' for the number of entries\n
|
- 'Count' for the number of entries\n
|
||||||
- 'Manually' for user defined values""",
|
- 'Manually' for user defined values""",
|
||||||
required=True),
|
required=True),
|
||||||
'object': fields.many2one('ir.model',
|
'model_id': fields.many2one('ir.model',
|
||||||
string='Object',
|
string='Modeel',
|
||||||
help='The object type for the field to evaluate' ),
|
help='The model object for the field to evaluate' ),
|
||||||
'field': fields.many2one('ir.model.fields',
|
'field_id': fields.many2one('ir.model.fields',
|
||||||
string='Evaluated Field',
|
string='Evaluated Field',
|
||||||
help='The field containing the value to evaluate' ),
|
help='The field containing the value to evaluate' ),
|
||||||
'field_date': fields.many2one('ir.model.fields',
|
'field_date_id': fields.many2one('ir.model.fields',
|
||||||
string='Evaluated Date Field',
|
string='Evaluated Date Field',
|
||||||
help='The date to use for the time period evaluated'),
|
help='The date to use for the time period evaluated'),
|
||||||
'domain': fields.char("Domain",
|
'domain': fields.char("Domain",
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
<field name="sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="computation_mode"/>
|
<field name="computation_mode"/>
|
||||||
<field name="field"/>
|
|
||||||
<field name="domain"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -42,10 +40,12 @@
|
||||||
</group>
|
</group>
|
||||||
<group string="Computation">
|
<group string="Computation">
|
||||||
<field name="computation_mode"/>
|
<field name="computation_mode"/>
|
||||||
<field name="object"/>
|
|
||||||
<field name="field"/>
|
<!-- Hide the fields beloz if manually -->
|
||||||
<field name="field_date"/>
|
<field name="model_id" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}"/>
|
||||||
<field name="domain"/>
|
<field name="field_id" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}" domain="[('model_id','=',model_id)]" />
|
||||||
|
<field name="field_date_id" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}" domain="[('ttype', 'in', ('date', 'datetime')), ('model_id','=',model_id)]"/>
|
||||||
|
<field name="domain" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Search Goal Types">
|
<search string="Search Goal Types">
|
||||||
<group expand="0" string="Group By...">
|
<group expand="0" string="Group By...">
|
||||||
<filter string="Object" domain="[]" context="{'group_by':'object'}"/>
|
<filter string="Model" domain="[]" context="{'group_by':'model_id'}"/>
|
||||||
<filter string="Computation Mode" domain="[]" context="{'group_by':'computation_mode'}"/>
|
<filter string="Computation Mode" domain="[]" context="{'group_by':'computation_mode'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
|
|
Loading…
Reference in New Issue