Permalink
Browse files

[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
1e160df.

opw-1892990

closes #27850
  • Loading branch information...
nim-odoo committed Oct 16, 2018
1 parent 50b5069 commit 5f0be01323ffde2b6e659f540777e2dd31a2699a
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/purchase_stock/models/stock_rule.py
@@ -169,7 +169,7 @@ def _prepare_purchase_order(self, product_id, product_qty, product_uom, origin,
'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),

0 comments on commit 5f0be01

Please sign in to comment.