Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Purchase
Entity: purchase.order.line
Compute Method: _compute_selected_seller_id
| Inputs | Method | Outputs |
|---|---|---|
|
for line in self:
if line.product_id:
- params = line._get_select_sellers_params()
- seller = line.product_id._select_seller(
- partner_id=line.partner_id,
- quantity=abs(line.product_qty),
- date=fields.Date.context_today(line, timestamp=line.order_id.date_order),
- uom_id=line.product_uom_id,
- params=params)
- line.selected_seller_id = seller.id if seller else False
+ line.selected_seller_id = line._get_seller_info().get('supplierinfo')
else:
line.selected_seller_id = False
|
|
