我想按组创建过滤器。 实际上,我的组已创建。但是,我有许多用户组,但我不希望每个组看到每个过滤器。
以下是我的过滤器:
<record model="ir.ui.view" id="student_view_search">
<field name="name">Student search</field>
<field name="model">ecole.partner.school</field>
<field name="arch" type="xml">
<search name="Student">
<field name="partner_id" />
<field name="school_year_id" />
<field name="school_name_id" />
<field name="school_level_id" />
<filter string="Current year"
name="anneescolaire"
domain="[('default_school_year','=',True),('period_school_year','=',False)]"/>
<filter string="Next year"
name="anneescolairesuivante"
domain="[('period_school_year','=',True),('default_school_year','=',False)]"/>
<filter string="Observations"
name="observations"
domain="[('half_pension_text','=',True)]"/>
<separator />
<filter string="allergy"
name="allergy"
domain="[('half_pension_allergy','=',True)]"/>
<filter string="Without pork"
name="withoutpork"
domain="[('half_pension_without_pork','=',True)]"/>
<!-- GROUPE -->
<filter string="School year"
name="anneescolaire2"
domain="[]"
context="{'group_by':'school_year_id'}"/>
<filter string="School catering"
name="demipension"
domain="[]"
context="{'group_by':'half_pension'}"/>
</search>
</field>
</record>
这是我的群组:
<record id="group_ecole_restauration_scolaire" model="res.groups">
<field name="name">School catering</field>
<field name="category_id" ref="ecole.ecole_category"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="comment">Standard group for the management of school meals.</field>
</record>
<record id="group_ecole_inscription_scolaire" model="res.groups">
<field name="name">School children management</field>
<field name="category_id" ref="ecole.ecole_category"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="comment">Standard Group for School Registration Management.</field>
</record>
你有我的榜样吗?
谢谢!