Skip to content
Snippets Groups Projects
Commit 4ffc517d authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] purchase: Impossible to duplicate a PO


Steps to reproduce the bug:
- Create a RFQ
- Add a line with a product
- Add a line with a note and save
- Duplicate the RFQ

Bug:

A traceback was raised because the function _select_seller was called on a line
with no product.

opw:2085977

closes odoo/odoo#38784

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent b6f7a472
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,7 @@ class PurchaseOrder(models.Model):
for line in new_po.order_line:
if new_po.date_planned:
line.date_planned = new_po.date_planned
else:
elif line.product_id:
seller = line.product_id._select_seller(
partner_id=line.partner_id, quantity=line.product_qty,
date=line.order_id.date_order and line.order_id.date_order.date(), uom_id=line.product_uom)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment