Skip to content

Commit

Permalink
Recreate pickings doesn't show View Delivery Orders button
Browse files Browse the repository at this point in the history
* Fix OCA#264
* Fix : Can't create delivery from shipping exception
  • Loading branch information
Kinner Vachhani authored and MiquelRForgeFlow committed Aug 30, 2018
1 parent d9ebe90 commit 644305b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sale_procurement_group_by_line/model/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ def action_ship_create(self, cr, uid, ids, context=None):
groups = {}

for line in order.order_line:
if order.state == 'shipping_except':
groups[line._get_procurement_group_key()] = \
line.procurement_group_id.id

group_id = groups.get(line._get_procurement_group_key())

if not group_id:
vals = self._prepare_procurement_group_by_line(
cr, uid, line, context=context)
Expand All @@ -70,6 +75,8 @@ def action_ship_create(self, cr, uid, ids, context=None):
# trigger another move
proc_ids += [x.id for x in line.procurement_ids
if x.state in ('exception', 'cancel')]
procurement_obj.reset_to_confirmed(cr, uid, proc_ids,
context=context)
elif sale_line_obj.need_procurement(cr, uid, [line.id],
context=context):
if (line.state == 'done') or not line.product_id:
Expand Down

0 comments on commit 644305b

Please sign in to comment.