From 44ff37b8ab87c5407cc1445e544999f17c4c9577 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Mon, 30 Sep 2019 16:32:30 +0200 Subject: [PATCH] add prefix to portal_delivery_id --- ext/custom-addons/dp_custom/models/sale.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 4f8d16e5..5da35830 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -254,6 +254,9 @@ class SaleOrder(models.Model): delivery_vals = {} # print('3') if vals.get('portal_delivery_id', False): + if portal_prefix: + vals['portal_delivery_id'] = portal_prefix + '.' + vals['portal_id'] + delivery_partner = self.env['res.partner'].search([('portal_id', '=', vals['portal_delivery_id'])]) delivery_vals['portal_id'] = vals['portal_delivery_id'] del vals['portal_delivery_id']