Propuesta - Issue #129
This commit is contained in:
parent
4fc525246a
commit
3f835d4d5c
|
@ -2240,6 +2240,7 @@ class Productos(BaseModel):
|
||||||
rows = (Productos
|
rows = (Productos
|
||||||
.select(
|
.select(
|
||||||
Productos.id,
|
Productos.id,
|
||||||
|
Productos.es_activo,
|
||||||
Productos.clave_sat,
|
Productos.clave_sat,
|
||||||
Productos.clave,
|
Productos.clave,
|
||||||
Productos.descripcion,
|
Productos.descripcion,
|
||||||
|
@ -2283,6 +2284,7 @@ class Productos(BaseModel):
|
||||||
obj.impuestos = obj_taxes
|
obj.impuestos = obj_taxes
|
||||||
row = {
|
row = {
|
||||||
'id': obj.id,
|
'id': obj.id,
|
||||||
|
'es_activo': obj.es_activo,
|
||||||
'clave': obj.clave,
|
'clave': obj.clave,
|
||||||
'clave_sat': obj.clave_sat,
|
'clave_sat': obj.clave_sat,
|
||||||
'descripcion': obj.descripcion,
|
'descripcion': obj.descripcion,
|
||||||
|
@ -2311,6 +2313,7 @@ class Productos(BaseModel):
|
||||||
obj.impuestos = obj_taxes
|
obj.impuestos = obj_taxes
|
||||||
row = {
|
row = {
|
||||||
'id': obj.id,
|
'id': obj.id,
|
||||||
|
'es_activo': obj.es_activo,
|
||||||
'clave': obj.clave,
|
'clave': obj.clave,
|
||||||
'clave_sat': obj.clave_sat,
|
'clave_sat': obj.clave_sat,
|
||||||
'descripcion': obj.descripcion,
|
'descripcion': obj.descripcion,
|
||||||
|
|
|
@ -159,6 +159,7 @@ function update_grid_products(values){
|
||||||
msg = 'Producto actualizado correctamente'
|
msg = 'Producto actualizado correctamente'
|
||||||
$$("grid_products").updateItem(values.row['id'], values.row)
|
$$("grid_products").updateItem(values.row['id'], values.row)
|
||||||
}
|
}
|
||||||
|
$$('grid_products').refresh()
|
||||||
$$('multi_products').setValue('products_home')
|
$$('multi_products').setValue('products_home')
|
||||||
msg_ok(msg)
|
msg_ok(msg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ var toolbar_products = [
|
||||||
|
|
||||||
var grid_products_cols = [
|
var grid_products_cols = [
|
||||||
{ id: "id", header: "ID", width: 75, hidden: true},
|
{ id: "id", header: "ID", width: 75, hidden: true},
|
||||||
|
{ id: 'es_activo', header: 'Activo', hidden: true},
|
||||||
{ id: "clave_sat", header: ["Clave SAT"], width: 100,},
|
{ id: "clave_sat", header: ["Clave SAT"], width: 100,},
|
||||||
{ id: "clave", header: ["Clave", {content: "textFilter"}], width: 100,
|
{ id: "clave", header: ["Clave", {content: "textFilter"}], width: 100,
|
||||||
sort: 'string', footer: {content: 'countRows', css: 'right'}},
|
sort: 'string', footer: {content: 'countRows', css: 'right'}},
|
||||||
|
@ -25,14 +26,21 @@ var grid_products_cols = [
|
||||||
|
|
||||||
|
|
||||||
var grid_products = {
|
var grid_products = {
|
||||||
view: "datatable",
|
view: 'datatable',
|
||||||
id: "grid_products",
|
id: 'grid_products',
|
||||||
select: "row",
|
select: 'row',
|
||||||
adjust: true,
|
adjust: true,
|
||||||
footer: true,
|
footer: true,
|
||||||
resizeColumn: true,
|
resizeColumn: true,
|
||||||
headermenu: true,
|
headermenu: true,
|
||||||
columns: grid_products_cols,
|
columns: grid_products_cols,
|
||||||
|
scheme:{
|
||||||
|
$change:function(item){
|
||||||
|
if(!item.es_activo){
|
||||||
|
item.$css = 'cancel'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue