minor fix

This commit is contained in:
wilson gomez 2021-09-01 12:08:58 -05:00
parent 9e9801d14f
commit 7c65c44bc8
1 changed files with 2 additions and 2 deletions

View File

@ -190,8 +190,8 @@ class Shopify(SaleWebChannel):
'payment_term': 1,
'party': party.id,
'sale_date': sale_date,
'comment': 'GUIA DE ENVIO NO. ' + sale_['fulfillments'][0]['tracking_number']
if sale_['fulfillment_status'] == 'fulfilled' else '',
'comment': 'GUIA DE ENVIO NO. ' + sale_['fulfillments'][0].get('tracking_number', '')
if sale_['fulfillment_status'] == 'fulfilled' and sale_['fulfillments'] else '',
'state': 'draft',
'company': ctx['company'],
'currency': user_.company.currency.id,