forked from elmau/empresa-libre
Options for show documents
This commit is contained in:
parent
bf3ed47fac
commit
3166723cdc
|
@ -1,4 +1,9 @@
|
||||||
|
|
||||||
|
v 1.36.0 [25-feb-2020]
|
||||||
|
----------------------
|
||||||
|
- Mejora: Permitir ver a usuarios todos los documentos
|
||||||
|
|
||||||
|
|
||||||
v 1.35.0 [24-feb-2020]
|
v 1.35.0 [24-feb-2020]
|
||||||
----------------------
|
----------------------
|
||||||
- Mejora: Filtrado de documentos por sucursal
|
- Mejora: Filtrado de documentos por sucursal
|
||||||
|
|
|
@ -549,12 +549,14 @@ class Configuracion(BaseModel):
|
||||||
'chk_config_add_same_product',
|
'chk_config_add_same_product',
|
||||||
'chk_config_tax_locales_truncate',
|
'chk_config_tax_locales_truncate',
|
||||||
'chk_config_decimales_precios',
|
'chk_config_decimales_precios',
|
||||||
|
'chk_config_user_show_doc',
|
||||||
'chk_config_anticipo',
|
'chk_config_anticipo',
|
||||||
'chk_usar_punto_de_venta',
|
'chk_usar_punto_de_venta',
|
||||||
'chk_ticket_pdf_show',
|
'chk_ticket_pdf_show',
|
||||||
'chk_ticket_direct_print',
|
'chk_ticket_direct_print',
|
||||||
'chk_ticket_edit_cant',
|
'chk_ticket_edit_cant',
|
||||||
'chk_ticket_total_up',
|
'chk_ticket_total_up',
|
||||||
|
'chk_ticket_user_show_doc',
|
||||||
)
|
)
|
||||||
data = (Configuracion
|
data = (Configuracion
|
||||||
.select()
|
.select()
|
||||||
|
@ -3790,8 +3792,11 @@ class Facturas(BaseModel):
|
||||||
|
|
||||||
def _get_invoices(self, filters, user):
|
def _get_invoices(self, filters, user):
|
||||||
filter_serie = False
|
filter_serie = False
|
||||||
if not user.sucursal is None and not user.sucursal.serie_facturas is None:
|
|
||||||
filter_serie = (Facturas.serie==user.sucursal.serie_facturas)
|
filter_by_user = Configuracion.get_bool('chk_config_user_show_doc')
|
||||||
|
if not filter_by_user:
|
||||||
|
if not user.sucursal is None and not user.sucursal.serie_facturas is None:
|
||||||
|
filter_serie = (Facturas.serie==user.sucursal.serie_facturas)
|
||||||
|
|
||||||
if filter_serie:
|
if filter_serie:
|
||||||
filters &= filter_serie
|
filters &= filter_serie
|
||||||
|
@ -7229,8 +7234,11 @@ class Tickets(BaseModel):
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_by(cls, values, user):
|
def get_by(cls, values, user):
|
||||||
filter_serie = False
|
filter_serie = False
|
||||||
if not user.sucursal is None and not user.sucursal.serie_tickets is None:
|
|
||||||
filter_serie = (Tickets.serie==user.sucursal.serie_tickets)
|
filter_by_user = Configuracion.get_bool('chk_ticket_user_show_doc')
|
||||||
|
if not filter_by_user:
|
||||||
|
if not user.sucursal is None and not user.sucursal.serie_tickets is None:
|
||||||
|
filter_serie = (Tickets.serie==user.sucursal.serie_tickets)
|
||||||
|
|
||||||
filters = cls._get_filters(cls, values)
|
filters = cls._get_filters(cls, values)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.35.0'
|
VERSION = '1.36.0'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ var controllers = {
|
||||||
$$('chk_config_add_same_product').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_add_same_product').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_tax_locales_truncate').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_tax_locales_truncate').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_decimales_precios').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_decimales_precios').attachEvent('onItemClick', chk_config_item_click)
|
||||||
|
$$('chk_config_user_show_doc').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_anticipo').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_anticipo').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_ine').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_ine').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_config_edu').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_config_edu').attachEvent('onItemClick', chk_config_item_click)
|
||||||
|
@ -114,6 +115,7 @@ var controllers = {
|
||||||
$$('chk_ticket_direct_print').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_ticket_direct_print').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_ticket_edit_cant').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_ticket_edit_cant').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('chk_ticket_total_up').attachEvent('onItemClick', chk_config_item_click)
|
$$('chk_ticket_total_up').attachEvent('onItemClick', chk_config_item_click)
|
||||||
|
$$('chk_ticket_user_show_doc').attachEvent('onItemClick', chk_config_item_click)
|
||||||
$$('txt_ticket_printer').attachEvent('onKeyPress', txt_ticket_printer_key_press)
|
$$('txt_ticket_printer').attachEvent('onKeyPress', txt_ticket_printer_key_press)
|
||||||
$$('txt_config_nomina_serie').attachEvent('onKeyPress', txt_config_nomina_serie_press)
|
$$('txt_config_nomina_serie').attachEvent('onKeyPress', txt_config_nomina_serie_press)
|
||||||
$$('txt_config_nomina_folio').attachEvent('onKeyPress', txt_config_nomina_folio_press)
|
$$('txt_config_nomina_folio').attachEvent('onKeyPress', txt_config_nomina_folio_press)
|
||||||
|
|
|
@ -678,7 +678,9 @@ var options_admin_otros = [
|
||||||
{view: 'checkbox', id: 'chk_config_tax_locales_truncate', labelWidth: 0,
|
{view: 'checkbox', id: 'chk_config_tax_locales_truncate', labelWidth: 0,
|
||||||
labelRight: 'Impuestos locales, truncar valores'},
|
labelRight: 'Impuestos locales, truncar valores'},
|
||||||
{view: 'checkbox', id: 'chk_config_decimales_precios', labelWidth: 0,
|
{view: 'checkbox', id: 'chk_config_decimales_precios', labelWidth: 0,
|
||||||
labelRight: 'Precios con 4 decimales'}, {},
|
labelRight: 'Precios con 4 decimales'},
|
||||||
|
{view: 'checkbox', id: 'chk_config_user_show_doc', labelWidth: 0,
|
||||||
|
labelRight: 'Usuarios pueden ver todos los documentos'},
|
||||||
]},
|
]},
|
||||||
{maxHeight: 15},
|
{maxHeight: 15},
|
||||||
{cols: [{maxWidth: 15},
|
{cols: [{maxWidth: 15},
|
||||||
|
@ -710,7 +712,9 @@ var options_admin_otros = [
|
||||||
labelRight: 'Solicitar cantidad al agregar'},
|
labelRight: 'Solicitar cantidad al agregar'},
|
||||||
{view: 'checkbox', id: 'chk_ticket_total_up', labelWidth: 0,
|
{view: 'checkbox', id: 'chk_ticket_total_up', labelWidth: 0,
|
||||||
labelRight: 'Mostrar total arriba'},
|
labelRight: 'Mostrar total arriba'},
|
||||||
{}]},
|
{view: 'checkbox', id: 'chk_ticket_user_show_doc', labelWidth: 0,
|
||||||
|
labelRight: 'Usuarios pueden ver todos los documentos'}
|
||||||
|
]},
|
||||||
{maxHeight: 20},
|
{maxHeight: 20},
|
||||||
{}]
|
{}]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue