forked from elmau/empresa-libre
Fix - Issue 48
This commit is contained in:
parent
de675a0de1
commit
6644eef0ab
|
@ -1719,7 +1719,6 @@ class Productos(BaseModel):
|
|||
|
||||
@classmethod
|
||||
def get_by(cls, values):
|
||||
# ~ id = int(values.get('id', 0))
|
||||
clave = values.get('id', '')
|
||||
if clave:
|
||||
row = (Productos
|
||||
|
@ -1732,7 +1731,8 @@ class Productos(BaseModel):
|
|||
Productos.valor_unitario,
|
||||
Productos.descuento)
|
||||
.join(SATUnidades).switch(Productos)
|
||||
.where(Productos.clave==clave).dicts())
|
||||
.where((Productos.id==clave) | (Productos.clave==clave))
|
||||
.dicts())
|
||||
if len(row):
|
||||
id = row[0]['id']
|
||||
model_pt = Productos.impuestos.get_through_model()
|
||||
|
|
Loading…
Reference in New Issue