Skip to content

Commit

Permalink
Merge f4764d4 into 78fce04
Browse files Browse the repository at this point in the history
  • Loading branch information
gurneyalex committed Nov 7, 2014
2 parents 78fce04 + f4764d4 commit 7a87a36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logistic_requisition/model/logistic_requisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,8 @@ def _get_purchase_line_id(self):
bid_line = line.selected_bid_line_id
if not bid_line:
continue
po_lines = bid_line.po_line_from_bid_ids
if not po_lines:
po_line = bid_line.po_line_from_bid_ids
if not po_line:
continue
else:
domain = [
Expand All @@ -930,7 +930,7 @@ def _get_purchase_line_id(self):
if po_line:
po_line.ensure_one()
po_line_id = po_line.id
self.purchase_line_id = po_line_id
line.purchase_line_id = po_line_id

@api.model
def create(self, vals):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@
cost_estimate = cost_estimate_obj.browse(cr, uid, cost_estimate_id)
assert len(cost_estimate.order_line) == 2, (
"Cost Estimate should have 2 lines, 1 per logistic requisition line")
for line in cost_estimate.order_line:
po_line = line.sourced_by
assert(po_line, 'missing sourced by')
print po_line

-
I check if the information of the logistic requisition are propagated correctly
-
Expand Down
1 change: 1 addition & 0 deletions logistic_requisition/wizard/cost_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def _prepare_cost_estimate_line(self, sourcing):
'product_uom': sourcing.proposed_uom_id.id,
# line must be sourced
'manually_sourced': True,
'sourced_by': sourcing.purchase_line_id.id,
}
if sourcing.dispatch_location_id:
warehouse_id = self.env['stock.location'].get_warehouse(
Expand Down

0 comments on commit 7a87a36

Please sign in to comment.