[FIX][T4552] Invoice address is now branch; minor fix

Merged Hermes requested to merge T4552 into 12.0
Compare and
1 file
+ 4
4
Preferences
File browser
Compare changes
@@ -546,7 +546,7 @@ class CustomerPurchaseOrderImporter(models.Model):
order_data = {
'name': 'ORD' + order_number,
'partner': partner.id,
'partner_invoice_id': address['invoice'],
'partner_invoice_id': branch.id,
'partner_shipping_id': branch.id,
'price_type': 'gross',
'date_order': date_order,
@@ -748,12 +748,12 @@ class CustomerPurchaseOrderImporter(models.Model):
return config_lines
def _get_product(self, product, description=''):
def _get_product(self, data, description=''):
errors = []
code = list(product.keys())[0]
code = list(data.keys())[0]
product = product[code]['product']
product = data[code]['product']
if not product:
errors.append(_('~ Product %s with code %s not found.\n') % (description, code))
elif len(product) > 1: