minor fix

This commit is contained in:
wilsongomez 2022-02-14 11:41:39 -05:00
parent 26397a4007
commit 1e0e098988
1 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,6 @@ class MercadoLibre(SaleWebChannel):
Party = _pool.get('party.party')
PartyObligationTax = _pool.get('party.obligation_tax')
email = customer.get('email', '@')
print('customer', customer)
shipment_address, phone, city = '', '', None
if customer.get('receiver_address'):
receiver_address = customer['receiver_address']
@ -96,13 +95,14 @@ class MercadoLibre(SaleWebChannel):
])
if cities:
city = cities[0]
customer_name = customer['billing_info']['first_name'] + ' ' + customer['billing_info']['last_name']
type_document = '13'
type_person = 'persona_natural'
if customer['billing_info']['doc_type'] == 'NIT':
type_document = '31'
customer_name = customer['billing_info']['business_name']
type_person = 'persona_juridica'
else:
customer_name = customer['billing_info']['first_name'] + ' ' + customer['billing_info']['last_name']
type_document = '13'
type_person = 'persona_natural'
create_customer = {
'id_reference': str(customer['id']),