This commit is contained in:
oscar alvarez 2023-09-09 18:24:25 -05:00
parent e7b78bb847
commit e2a763995f
1 changed files with 7 additions and 5 deletions

View File

@ -32,12 +32,14 @@ class Sale(metaclass=PoolMeta):
@classmethod
def send_order(cls, args, ctx=None):
Product = Pool().get('product.product')
print(' ARGS => ', args)
if args['id'] <= 0:
res = cls.create_sale(args, ctx)
return res
else:
records = cls.browse([args['id']])
lines_tuple = args.get('lines')
if lines_tuple:
action, lines = lines_tuple
if action == 'create' and len(lines) > 0:
for line in lines: