[IMP] Improved Inventory Moves kanban view
bzr revid: chiragdd7@gmail.com-20130806062314-mgzfhpbjrjdqng5g
This commit is contained in:
parent
ac5315ddbd
commit
f35cfac3fa
|
@ -2146,13 +2146,15 @@ class stock_picking_type(osv.osv):
|
|||
for id in ids:
|
||||
result[id] = {
|
||||
'latest_picking_late': [],
|
||||
'latest_picking_backorders': []
|
||||
'latest_picking_backorders': [],
|
||||
'latest_picking_waiting': []
|
||||
}
|
||||
for type_id in ids:
|
||||
pick_ids = obj.search(cr, uid, [('state', '=','done'), ('picking_type_id','=',type_id)], limit=12, order="date desc", context=context)
|
||||
for pick in obj.browse(cr, uid, pick_ids, context=context):
|
||||
result[type_id]['latest_picking_late'] = cmp(pick.date[:10], time.strftime('%Y-%m-%d'))
|
||||
result[type_id]['latest_picking_backorders'] = bool(pick.backorder_id)
|
||||
result[type_id]['latest_picking_waiting'] = cmp(pick.date[:10], time.strftime('%Y-%m-%d'))
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
|
@ -2188,6 +2190,8 @@ class stock_picking_type(osv.osv):
|
|||
type='string', multi='_get_picking_history'),
|
||||
'latest_picking_backorders': fields.function(_get_picking_history,
|
||||
type='string', multi='_get_picking_history'),
|
||||
'latest_picking_waiting': fields.function(_get_picking_history,
|
||||
type='string', multi='_get_picking_history'),
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1253,19 +1253,26 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="oe_items_list oe_kanban_ellipsis">
|
||||
<div>
|
||||
<div t-if="record.count_picking.raw_value > 0">
|
||||
<a name="%(action_picking_tree)d" type="action">
|
||||
<field name="count_picking"/>
|
||||
<t t-esc="record.name.raw_value"/>
|
||||
<field name="count_picking"/> Ready
|
||||
</a>
|
||||
<a name="%(action_picking_tree)d" type="action">
|
||||
<field name="weekly_picking" widget="stock_sparkline">Weekly Moves</field>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_picking.raw_value == 0">
|
||||
<a name="%(action_picking_tree)d" type="action">
|
||||
Weekly Moves
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_picking_waiting.raw_value > 0">
|
||||
<a name="%(action_picking_tree_waiting)d" type="action">
|
||||
<field name="count_picking_waiting"/> Waiting
|
||||
</a>
|
||||
<a name="%(action_picking_tree_waiting)d" type="action" class="oe_sparkline_bar_link">
|
||||
<field name="latest_picking_waiting" widget="stock_sparkline" options="{'type': 'tristate'}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div t-if="record.count_picking_late.raw_value > 0">
|
||||
<a name="%(action_picking_tree_late)d" type="action">
|
||||
|
|
Loading…
Reference in New Issue