forked from elmau/empresa-libre
Get wharehouse in products
This commit is contained in:
parent
2c314a3891
commit
be75abeb54
|
@ -3402,6 +3402,17 @@ class Almacenes(BaseModel):
|
||||||
)
|
)
|
||||||
return tuple(rows)
|
return tuple(rows)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _get_for_select(cls, values={}):
|
||||||
|
rows = (Almacenes
|
||||||
|
.select(
|
||||||
|
Almacenes.id,
|
||||||
|
Almacenes.name.alias('value'),
|
||||||
|
)
|
||||||
|
.dicts()
|
||||||
|
)
|
||||||
|
return tuple(rows)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_all(cls, values):
|
def _get_all(cls, values):
|
||||||
rows = (Almacenes
|
rows = (Almacenes
|
||||||
|
|
|
@ -464,6 +464,7 @@ function cmd_add_inventory_click(id, e, node){
|
||||||
$$('txt_add_key').setValue(row.clave)
|
$$('txt_add_key').setValue(row.clave)
|
||||||
$$('txt_add_unit').setValue(row.unidad)
|
$$('txt_add_unit').setValue(row.unidad)
|
||||||
$$('txt_add_description').setValue(row.descripcion)
|
$$('txt_add_description').setValue(row.descripcion)
|
||||||
|
$$('lst_warehouses').getList().load('/warehouse?opt=for_select')
|
||||||
$$('win_add_inventory').show()
|
$$('win_add_inventory').show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -432,7 +432,7 @@ var body_add_inventory = {rows: [{minHeight: 10},
|
||||||
{view: 'counter', id: 'txt_new_cant', label: 'Cantidad a agregar',
|
{view: 'counter', id: 'txt_new_cant', label: 'Cantidad a agregar',
|
||||||
labelWidth: 'auto', step: 1, value: 0, min: 0.01},
|
labelWidth: 'auto', step: 1, value: 0, min: 0.01},
|
||||||
{view: 'richselect', id: 'lst_warehouses', label: 'Almacen: ',
|
{view: 'richselect', id: 'lst_warehouses', label: 'Almacen: ',
|
||||||
labelPosition: 'left', required: false, options: [], hidden: true},
|
labelPosition: 'left', required: false, options: [], hidden: false},
|
||||||
]},
|
]},
|
||||||
{minHeight: 20},
|
{minHeight: 20},
|
||||||
{cols: [{},
|
{cols: [{},
|
||||||
|
|
Loading…
Reference in New Issue