Fix - Mostrar clave sat al agregar o actualizar producto

This commit is contained in:
Mauricio Baeza 2018-01-16 21:00:49 -06:00
parent af0b2b6c56
commit f856d432b2
1 changed files with 4 additions and 1 deletions

View File

@ -2202,7 +2202,8 @@ class Productos(BaseModel):
Productos.valor_unitario)
.join(SATUnidades)
.switch(Productos)
.where((Productos.descripcion.contains(name)) |
.where(
(Productos.descripcion.contains(name)) |
(Productos.clave.contains(name)))
.dicts()
)
@ -2281,6 +2282,7 @@ class Productos(BaseModel):
row = {
'id': obj.id,
'clave': obj.clave,
'clave_sat': obj.clave_sat,
'descripcion': obj.descripcion,
'unidad': obj.unidad.name,
'valor_unitario': obj.valor_unitario,
@ -2308,6 +2310,7 @@ class Productos(BaseModel):
row = {
'id': obj.id,
'clave': obj.clave,
'clave_sat': obj.clave_sat,
'descripcion': obj.descripcion,
'unidad': obj.unidad.name,
'valor_unitario': obj.valor_unitario,