打印页面增加筛选

This commit is contained in:
guanhuan
2025-06-16 15:43:02 +08:00
parent 9123aeaee8
commit dbe8c95558
2 changed files with 18 additions and 0 deletions

View File

@@ -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',
}

View File

@@ -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>