mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_request_picking_type: Use Submitted state
This commit is contained in:
committed by
Reed Hayashikawa
parent
9d4a551eb7
commit
27beb973d3
@@ -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(
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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="['&', ('expected_date', '<', current_date), ('state', 'in', ('draft', 'open'))]"
|
||||
help="Stock Requests in Progress."/>
|
||||
<filter string="Late" domain="['&', ('expected_date', '<', 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...">
|
||||
|
||||
Reference in New Issue
Block a user