minor fix

This commit is contained in:
Wilson Gomez 2022-11-16 17:44:13 -05:00
parent 8ec15c822f
commit c4ec4e89f3
1 changed files with 4 additions and 2 deletions

View File

@ -38,9 +38,11 @@ class Sale(metaclass=PoolMeta):
for v in args['lines']:
if v.get('id'):
del v['id']
if v.get('amount'):
elif v.get('amount'):
del v['amount']
if v.get('total_amount'):
elif v.get('unit_price_w_tax'):
del v['unit_price_w_tax']
elif v.get('total_amount'):
del v['total_amount']
v['type'] = 'line'
product = Product(v['product'])