From f793cd224078968e459e255b9fb897dde0785791 Mon Sep 17 00:00:00 2001 From: El Mau Date: Mon, 22 Nov 2021 09:16:28 -0600 Subject: [PATCH] Resuelto - Obtener id de almacen origen --- source/app/models/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/app/models/main.py b/source/app/models/main.py index 08dbff5..43c67ea 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -4052,7 +4052,7 @@ class WareHouseProduct(BaseModel): def _get_by_product(cls, args): id = int(args['id']) select = ( - WareHouseProduct.id, + Almacenes.id, Almacenes.name.alias('warehouse'), WareHouseProduct.exists, ) @@ -7626,7 +7626,7 @@ class Tickets(BaseModel): obj.total = totals['total'] obj.save() - cls._update_inventory(cls, obj.id, user=user) + cls._update_inventory(cls, obj.id, user=user) row = { 'id': obj.id, @@ -9915,6 +9915,8 @@ class InventoryEntries(BaseModel): result = {'ok': False, 'msg': msg} return result + print(0, args) + storage = args['target'] cant = Decimal(args['cant']) values = dict(