{{b_customRowContent_form = True}} {{b_customRowSearchResults_grid = False}} {{extend os.path.join(D_stvFwkCfg.s_dirFwkView, 'stv_tab_content.html')}} {{block blockCustomRowContent_form}} {{ if rowContent_form: }} {{=rowContent_form.custom.begin}} {{ _s_style_incosistencia_precio = "background-color: None;" _s_style_incosistencia_cantidad = "background-color: None;" _s_style_incosistencia_sincfdi = "background-color: None;" _s_style_incosistencia_producto_id = "background-color: None;" _s_style_incosistencia_noencfdi = "background-color: None;" _s_style_incosistencia_otra = "background-color: None;" #Si existe rowContent_form.record significa que se está editando un registro. if(rowContent_form.record): if (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.SIN_INCONSISTENCIA): #Si pongo pass aquí siempre entra y no hace los demás IF. _s_style_incosistencia = "background-color: None;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.PRECIO): _s_style_incosistencia_precio = "background-color: red;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.CANTIDAD): _s_style_incosistencia_cantidad = "background-color: red;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.SIN_CFDI): #Si no tiene CFDI se marcará un error en todas las casillas para dar a entender que hay un error grande. _s_style_incosistencia_precio = "background-color: red;" _s_style_incosistencia_cantidad = "background-color: red;" _s_style_incosistencia_sincfdi = "background-color: red;" _s_style_incosistencia_producto_id = "background-color: red;" _s_style_incosistencia_noencfdi = "background-color: red;" _s_style_incosistencia_otra = "background-color: red;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.PRODUCTO_ID): _s_style_incosistencia_producto_id = "background-color: red;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.NO_EN_CFDI): _s_style_incosistencia_noencfdi = "background-color: red;" elif (rowContent_form.record.tipo_inconsistencia == TEMPRESA_INVMOVTO_PRODUCTOS.E_TIPO_INCONSISTENCIA.OTRA): _s_style_incosistencia_otra = "background-color: red;" else: _s_style_incosistencia_otra = "background-color: red;" pass else: pass }}