[IMP] stock_request_picking_type: Use Submitted state

This commit is contained in:
Maxime Chambreuil
2019-05-28 08:59:38 -05:00
committed by Reed Hayashikawa
parent c80162279c
commit 4f79df4bb2
3 changed files with 7 additions and 7 deletions

View File

@@ -21,10 +21,10 @@ class StockPickingType(models.Model):
if not types:
return
domains = {
'count_sr_todo': [('state', '=', 'draft')],
'count_sr_todo': [('state', '=', 'submitted')],
'count_sr_open': [('state', '=', 'open')],
'count_sr_late': [('expected_date', '<', fields.Date.today()),
('state', 'in', ('draft', 'open'))],
('state', 'in', ('submitted', 'open'))],
}
for field in domains:
data = self.env['stock.request'].read_group(

View File

@@ -66,7 +66,7 @@
<a name="%(action_picking_dashboard)d" type="action">All</a>
</div>
<div role="menuitem">
<a name="%(action_picking_dashboard)d" type="action" context="{'search_default_todo': 1}">Draft</a>
<a name="%(action_picking_dashboard)d" type="action" context="{'search_default_todo': 1}">To Do</a>
</div>
<div role="menuitem">
<a name="%(action_picking_dashboard)d" type="action" context="{'search_default_open': 1}">In Progress</a>

View File

@@ -8,11 +8,11 @@
<search string="Search Stock Request">
<field name="name"/>
<field name="product_id"/>
<filter string="To Do" name="todo" domain="[('state','=', 'draft')]"
help="Stock Requests in draft."/>
<filter string="To Do" name="todo" domain="[('state','=', 'submitted')]"
help="Stock Requests To Do."/>
<filter string="In Progress" name="inprogress" domain="[('state', '=', 'open')]"
help="Stock Requesta in Progress."/>
<filter string="Late" domain="['&amp;', ('expected_date', '&lt;', current_date), ('state', 'in', ('draft', 'open'))]"
help="Stock Requests in Progress."/>
<filter string="Late" domain="['&amp;', ('expected_date', '&lt;', current_date), ('state', 'in', ('submitted', 'open'))]"
name="late" help="Late Stock Requests"/>
<filter string="Done" name="done" domain="[('state', '=', 'done')]"/>
<group expand="0" string="Group By...">