Skip to content

Commit

Permalink
Merge PR #796 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by hveficent
  • Loading branch information
OCA-git-bot committed Nov 26, 2019
2 parents 81b1199 + 6c576fe commit d14d073
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions purchase_request/migrations/12.0.1.0.0/post-migration.py
Expand Up @@ -83,7 +83,7 @@ def allocate_stockable(env):
# we allocated what is in the stock move
create_allocation(
env, purchase_order_line_id, purchase_request_line_id,
sm_id, pending_qty, alloc_uom)
sm_id, pending_qty)
# cannot call super, open_qty is zero
sm = env['stock.move'].browse(sm_id)
if sm.state == 'done':
Expand All @@ -94,7 +94,7 @@ def allocate_stockable(env):
req_qty = sm_uom._compute_quantity(req_qty, alloc_uom)
create_allocation(
env, purchase_order_line_id, purchase_request_line_id,
False, req_qty, alloc_uom)
False, req_qty)
purchase_request_line._compute_qty()


Expand All @@ -120,7 +120,8 @@ def allocate_service(env):
purchase_request_line = env['purchase.request.line'].browse(
purchase_request_line_id)
product_alloc_uom = \
purchase_request_line.product_uom_id or pol_product_uom
purchase_request_line.product_uom_id.id or pol_product_uom
pol_product_uom = env['uom.uom'].browse(pol_product_uom)
product_alloc_qty = pol_product_uom._compute_quantity(
product_qty, product_alloc_uom)
alloc = create_service_allocation(
Expand Down

0 comments on commit d14d073

Please sign in to comment.