mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] connector_opencart: allow building name out of other fields
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# © 2019-2021 Hibou Corp.
|
||||
# © 2019-2022 Hibou Corp.
|
||||
|
||||
from copy import copy
|
||||
from html import unescape
|
||||
@@ -252,7 +252,7 @@ class SaleOrderImporter(Component):
|
||||
return False
|
||||
return True
|
||||
|
||||
def _make_partner_name(self, firstname, lastname):
|
||||
def _make_partner_name(self, firstname, lastname, other_values=None):
|
||||
name = (str(firstname or '').strip() + ' ' + str(lastname or '').strip()).strip()
|
||||
if not name:
|
||||
return 'Undefined'
|
||||
@@ -275,7 +275,7 @@ class SaleOrderImporter(Component):
|
||||
info[k[len(info_string):]] = v
|
||||
|
||||
|
||||
name = self._make_partner_name(info.get('firstname', ''), info.get('lastname', ''))
|
||||
name = self._make_partner_name(info.get('firstname', ''), info.get('lastname', ''), other_values=info)
|
||||
street = info.get('address_1', '')
|
||||
street2 = info.get('address_2', '')
|
||||
city = info.get('city', '')
|
||||
|
||||
Reference in New Issue
Block a user