- I create a product with no supplier define for it. - !record {model: product.product, id: product_with_no_seller}: name: 'product with no seller' list_price: 20.00 standard_price: 15.00 categ_id: product.product_category_1 - I create a sales order with this product with route dropship. - !record {model: sale.order, id: sale_order_route_dropship01}: partner_id: base.res_partner_2 partner_invoice_id: base.res_partner_address_3 partner_shipping_id: base.res_partner_address_3 note: crossdock route payment_term_id: account.account_payment_term order_line: - product_id: product_with_no_seller product_uom_qty: 1 route_id: route_drop_shipping - I confirm the sales order, but it will raise an error - !python {model: sale.order, id: sale_order_route_dropship01}: | b=False try: self.action_confirm() except: b=True assert b, 'SO confirmation should throw error' - I set the at least one supplier on the product. - !record {model: product.product, id: product_with_no_seller, view: False}: seller_ids: - delay: 1 name: base.res_partner_2 min_qty: 2.0 - I confirm the sales order, no error this time - !python {model: sale.order, id: sale_order_route_dropship01}: | self.action_confirm() - I check a purchase quotation was created. - !python {model: sale.order, id: sale_order_route_dropship01}: | purchase = self.env['purchase.order.line'].search([('sale_line_id', '=', self.order_line.ids[0])]).order_id assert purchase, 'No Purchase Quotation is created'