[IMP] base_action_rule: don't show filters created from automated action

When creating an automated action the filters created for them showed up
in everyone's search box, which often times was confusing and not really
useful.
This commit is contained in:
Joren Van Onder
2015-07-29 19:59:57 +02:00
committed by Antony Lesuisse
parent 6ef158b63b
commit 60af9986ed
3 changed files with 7 additions and 4 deletions
@@ -34,7 +34,7 @@
class="oe_inline"/>
<div class="oe_edit_only oe_inline">Set selection based on a search filter:
<field name="filter_pre_id" domain="[('model_id', '=', model), '|', ('user_id', '=', uid), ('user_id', '=', False)]"
class="oe_inline" context="{'default_model_id': model}"
class="oe_inline" context="{'default_model_id': model, 'default_active': False, 'active_test': False}"
on_change="onchange_filter_pre_id(filter_pre_id, context)"/></div>
</div>
<label for="filter_id"/>
@@ -43,7 +43,7 @@
class="oe_inline"/>
<div class="oe_edit_only oe_inline">Set selection based on a search filter:
<field name="filter_id" domain="[('model_id', '=', model), '|', ('user_id', '=', uid), ('user_id', '=', False)]"
class="oe_inline" context="{'default_model_id': model}"
class="oe_inline" context="{'default_model_id': model, 'default_active': False, 'active_test': False}"
on_change="onchange_filter_id(filter_id, context)"/></div>
</div>
<field name="on_change_fields"
+4 -2
View File
@@ -145,13 +145,15 @@ class ir_filters(osv.osv):
'action_id': fields.many2one('ir.actions.actions', 'Action', ondelete='cascade',
help="The menu action this filter applies to. "
"When left empty the filter applies to all menus "
"for this model.")
"for this model."),
'active': fields.boolean('Active')
}
_defaults = {
'domain': '[]',
'context':'{}',
'sort': '[]',
'user_id': lambda self,cr,uid,context=None: uid,
'is_default': False
'is_default': False,
'active': True
}
_order = 'model_id, name, id desc'
+1
View File
@@ -21,6 +21,7 @@
<field name="model_id"/>
<field name="is_default"/>
<field name="action_id"/>
<field name="active"/>
</group>
<group>
<field name="domain"/>