打印页面增加筛选
This commit is contained in:
@@ -323,6 +323,7 @@ class SfProductionDemandPlan(models.Model):
|
||||
'name': _("打印"),
|
||||
'domain': [('demand_plan_id', 'in', self.ids)],
|
||||
'views': [[self.env.ref('sf_demand_plan.action_plan_print_tree').id, 'list']],
|
||||
'search_view_id': self.env.ref('sf_demand_plan.action_plan_print_search').id,
|
||||
'target': 'new',
|
||||
}
|
||||
|
||||
|
||||
@@ -14,4 +14,21 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_plan_print_search" model="ir.ui.view">
|
||||
<field name="name">sf.demand.plan.print.wizard.search</field>
|
||||
<field name="model">sf.demand.plan.print.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="type"/>
|
||||
<filter string="图纸" name="filter_type_1" domain="[('type', '=', '1')]"/>
|
||||
<filter string="程序单" name="filter_type_2" domain="[('type', '=', '2')]"/>
|
||||
<filter string="图纸、程序单" name="filter_type_all" domain="[('type', 'in', ('1','2'))]"/>
|
||||
<separator/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_type" string="类型" domain="[]" context="{'group_by': 'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user