From 5f0be01323ffde2b6e659f540777e2dd31a2699a Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 16 Oct 2018 12:57:05 +0000 Subject: [PATCH] [FIX] purchase_stock: no destination address - Create a product sold by Dropshipping - Create a SO, validate - Validate the corresponding PO - On the picking, print the 'Picking Operations' or the 'Delivery Slip' There is no delivery address printed. The root cause of the issue is that the field `dest_address_id` of the PO is empty. This is because `partner_dest_id` is not used anymore since 1e160dffd375ef5bb. opw-1892990 closes odoo/odoo#27850 --- addons/purchase_stock/models/stock_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase_stock/models/stock_rule.py b/addons/purchase_stock/models/stock_rule.py index c18408f6975..d24c0340325 100644 --- a/addons/purchase_stock/models/stock_rule.py +++ b/addons/purchase_stock/models/stock_rule.py @@ -169,7 +169,7 @@ class StockRule(models.Model): 'picking_type_id': self.picking_type_id.id, 'company_id': values['company_id'].id, 'currency_id': partner.with_context(force_company=values['company_id'].id).property_purchase_currency_id.id or self.env.user.company_id.currency_id.id, - 'dest_address_id': values.get('partner_dest_id', False) and values['partner_dest_id'].id, + 'dest_address_id': values.get('partner_id', False), 'origin': origin, 'payment_term_id': partner.with_context(force_company=values['company_id'].id).property_supplier_payment_term_id.id, 'date_order': purchase_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT),