462 |
message+= 'El cliente es Responsable Inscripto. Debe ingresar su CUIT.\n' |
message+= 'El cliente es Responsable Inscripto. Debe ingresar su CUIT.\n' |
463 |
isOk= 0 |
isOk= 0 |
464 |
|
|
465 |
|
from gnue.common.GDataObjects import ConnectionError as DBError |
466 |
|
|
467 |
if isOk: |
if isOk: |
468 |
if clientBlock.getCurrentRecord().isInserted(): |
if clientBlock.getCurrentRecord().isInserted(): |
469 |
print "Poniendo Nuevo" |
print "Poniendo Nuevo" |
486 |
# 3 es Codigo |
# 3 es Codigo |
487 |
clientCodeBlock.clientCodeType = 3 |
clientCodeBlock.clientCodeType = 3 |
488 |
# clientTaxProfileBlock.newRecord() |
# clientTaxProfileBlock.newRecord() |
|
clientBlock.commit() |
|
|
# porque esto? |
|
|
# para que los labels de la ultima pagina se actualizen apropiadamente |
|
|
tmpId = str(clientBlock.clientIdEntry) |
|
|
clientBlock.processRollback() |
|
|
clientBlock.initQuery() |
|
|
clientBlock.clientIdEntry = tmpId |
|
|
clientBlock.processQuery() |
|
|
callTrigger("showClientPriceTypeTrigger") |
|
|
# modified database |
|
|
entityTypesBlock.clientEntityEntry = str(clientBlock.clientIdEntry) |
|
|
entityTypesBlock.clientEntityTypeEntry = 7 |
|
|
# le doy de alta a las 4 direcciones basicas |
|
|
addressBlock.addressTypeIdEntry = 1 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 2 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 3 |
|
|
addressBlock.nextRecord() |
|
|
addressBlock.addressTypeIdEntry = 4 |
|
|
entityTypesBlock.commit() |
|
|
# modified database |
|
489 |
|
|
490 |
|
try: |
491 |
|
postChangeAdvance = 0 |
492 |
|
clientBlock.postChanges() |
493 |
|
# porque esto? |
494 |
|
# para que los labels de la ultima pagina se actualizen apropiadamente |
495 |
|
tmpId = str(clientBlock.clientIdEntry) |
496 |
|
clientBlock.clear() |
497 |
|
clientBlock.initQuery() |
498 |
|
clientBlock.clientIdEntry = tmpId |
499 |
|
clientBlock.processQuery() |
500 |
|
callTrigger("showClientPriceTypeTrigger") |
501 |
|
# modified database |
502 |
|
entityTypesBlock.clientEntityEntry = str(clientBlock.clientIdEntry) |
503 |
|
entityTypesBlock.clientEntityTypeEntry = 7 |
504 |
|
# le doy de alta a las 4 direcciones basicas |
505 |
|
addressBlock.addressTypeIdEntry = 1 |
506 |
|
addressBlock.nextRecord() |
507 |
|
addressBlock.addressTypeIdEntry = 2 |
508 |
|
addressBlock.nextRecord() |
509 |
|
addressBlock.addressTypeIdEntry = 3 |
510 |
|
addressBlock.nextRecord() |
511 |
|
addressBlock.addressTypeIdEntry = 4 |
512 |
|
postChangeAdvance = 1 |
513 |
|
clientBlock.postChanges() |
514 |
|
# modified database |
515 |
|
commitConnection() |
516 |
|
except DBError, err: |
517 |
|
rollbackConnection() |
518 |
|
message = "Hay problemas para grabar " |
519 |
|
if postChangeAdvance == 0: |
520 |
|
message += "los datos del cliente" |
521 |
|
elif postChangeAdvance == 1: |
522 |
|
message += "las direcciones" |
523 |
|
genericBox(mesagge+"\n"+str(err),['Aceptar']) |
524 |
else: |
else: |
525 |
clientBlock.commit() |
try: |
526 |
|
clientBlock.postChanges() |
527 |
|
commitConnection() |
528 |
|
except DBError, err: |
529 |
|
rollbackConnection() |
530 |
|
genericBox("Hay problemas para grabar los datos del cliente\n"+str(err),['Aceptar']) |
531 |
else: |
else: |
532 |
form.genericBox (message+'Los datos no han sido grabados', ['Aceptar']) |
form.genericBox (message+'Los datos no han sido grabados', ['Aceptar']) |
533 |
]]></trigger> |
]]></trigger> |
534 |
|
|
535 |
<trigger name="clientDeleteTrigger" type="NAMED"><![CDATA[ |
<trigger name="clientDeleteTrigger" type="NAMED"><![CDATA[ |
536 |
print "here" |
|
537 |
clientBlock.deleteRecord() |
clientBlock.deleteRecord() |
538 |
clientBlock.commit() |
clientBlock.commit() |
539 |
|
|
540 |
for block in [ clientBlock, clientCodeBlock, clientTaxProfileBlock, creditLimit1Block ]: |
for block in [ clientBlock, clientCodeBlock, clientTaxProfileBlock, creditLimit1Block ]: |
541 |
block.processRollback () |
block.clear() |
542 |
]]></trigger> |
]]></trigger> |
543 |
|
|
544 |
<trigger name="clientRollbackTrigger" type="NAMED"><![CDATA[ |
<trigger name="clientRollbackTrigger" type="NAMED"><![CDATA[ |
545 |
import hack |
#import hack |
546 |
hack.rollback(clientTaxProfileBlock) |
#clientTaxProfileBlock.reset() |
547 |
hack.rollback(creditLimit1Block) |
#creditLimit1Block.reset() |
548 |
hack.rollback(clientCodeBlock) |
#clientCodeBlock.reset() |
549 |
hack.rollback(clientUID_IB_Block) |
#clientUID_IB_Block.reset() |
550 |
hack.rollback(clientUID_CUIT_Block) |
#clientUID_CUIT_Block.reset() |
551 |
hack.rollback(clientBlock) |
#clientBlock.reset() |
552 |
|
reset() |
553 |
callTrigger('clientPageFocusInTrigger') |
callTrigger('clientPageFocusInTrigger') |
554 |
]]></trigger> |
]]></trigger> |
555 |
|
|
568 |
]]></trigger> |
]]></trigger> |
569 |
|
|
570 |
<trigger name="addressRollbackTrigger" type="NAMED"><![CDATA[ |
<trigger name="addressRollbackTrigger" type="NAMED"><![CDATA[ |
571 |
import hack |
addressBlock.reset() |
|
hack.rollback(addressBlock) |
|
572 |
callTrigger('addressTypeNameSearchTrigger') |
callTrigger('addressTypeNameSearchTrigger') |
573 |
]]></trigger> |
]]></trigger> |
574 |
|
|
730 |
|
|
731 |
self._object.dispatchEvent(GFEvent('beginWAIT')) |
self._object.dispatchEvent(GFEvent('beginWAIT')) |
732 |
|
|
733 |
clientResultBlock.processRollback() |
clientResultBlock.clear() |
734 |
clientResultBlock.initQuery() |
clientResultBlock.initQuery() |
735 |
if str(clientSearchBlock.searchCodeEntry): |
if str(clientSearchBlock.searchCodeEntry): |
736 |
clientResultBlock.codeListEntry = str(clientSearchBlock.searchCodeEntry)+'%' |
clientResultBlock.codeListEntry = str(clientSearchBlock.searchCodeEntry)+'%' |
755 |
# this is needed for updating some fields, like price_type there below |
# this is needed for updating some fields, like price_type there below |
756 |
if str(clientBlock.priceTypeEntry)!='': |
if str(clientBlock.priceTypeEntry)!='': |
757 |
# look for the name... |
# look for the name... |
758 |
searchingPriceTypeBlock.processRollback () |
searchingPriceTypeBlock.clear() |
759 |
searchingPriceTypeBlock.initQuery () |
searchingPriceTypeBlock.initQuery () |
760 |
searchingPriceTypeBlock.idEntry= str(clientBlock.priceTypeEntry) |
searchingPriceTypeBlock.idEntry= str(clientBlock.priceTypeEntry) |
761 |
searchingPriceTypeBlock.processQuery () |
searchingPriceTypeBlock.processQuery () |
770 |
# this is needed for updating some fields, like price_type there below |
# this is needed for updating some fields, like price_type there below |
771 |
if str(clientBlock.priceTypeEntry)!='': |
if str(clientBlock.priceTypeEntry)!='': |
772 |
# look for the name... |
# look for the name... |
773 |
searchingPriceTypeBlock.processRollback () |
searchingPriceTypeBlock.clear() |
774 |
searchingPriceTypeBlock.initQuery () |
searchingPriceTypeBlock.initQuery () |
775 |
searchingPriceTypeBlock.idEntry= str(clientBlock.priceTypeEntry) |
searchingPriceTypeBlock.idEntry= str(clientBlock.priceTypeEntry) |
776 |
searchingPriceTypeBlock.processQuery () |
searchingPriceTypeBlock.processQuery () |
811 |
addressBlock.firstRecord() |
addressBlock.firstRecord() |
812 |
for index in range(addressBlock.getRecordCount()): |
for index in range(addressBlock.getRecordCount()): |
813 |
if str(addressBlock.addressTypeIdEntry) != "": |
if str(addressBlock.addressTypeIdEntry) != "": |
814 |
addressTypeResultBlock.processRollback() |
addressTypeResultBlock.clear() |
815 |
addressTypeResultBlock.initQuery() |
addressTypeResultBlock.initQuery() |
816 |
addressTypeResultBlock.addressTypeResultIdEntry= str(addressBlock.addressTypeIdEntry) |
addressTypeResultBlock.addressTypeResultIdEntry= str(addressBlock.addressTypeIdEntry) |
817 |
addressTypeResultBlock.processQuery() |
addressTypeResultBlock.processQuery() |
840 |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
841 |
|
|
842 |
# look for the name... |
# look for the name... |
843 |
addressTypeResultBlock.processRollback () |
addressTypeResultBlock.clear() |
844 |
addressTypeResultBlock.initQuery () |
addressTypeResultBlock.initQuery () |
845 |
addressTypeResultBlock.addressTypeResultNameEntry= str(addressBlock.addressTypeNameEntry)+'%' |
addressTypeResultBlock.addressTypeResultNameEntry= str(addressBlock.addressTypeNameEntry)+'%' |
846 |
addressTypeResultBlock.processQuery () |
addressTypeResultBlock.processQuery () |
869 |
<!-- attributeBlock.firstRecord() --> |
<!-- attributeBlock.firstRecord() --> |
870 |
<!-- for index in range(attributeBlock.getRecordCount()): --> |
<!-- for index in range(attributeBlock.getRecordCount()): --> |
871 |
<!-- if str(attributeBlock.categoryAtributeIdEntry) != "": --> |
<!-- if str(attributeBlock.categoryAtributeIdEntry) != "": --> |
872 |
<!-- categoryAtributeResultBlock.processRollback() --> |
<!-- categoryAtributeResultBlock.clear() --> |
873 |
<!-- categoryAtributeResultBlock.initQuery() --> |
<!-- categoryAtributeResultBlock.initQuery() --> |
874 |
<!-- categoryTypeResultBlock.processRollback() --> |
<!-- categoryTypeResultBlock.clear() --> |
875 |
<!-- categoryTypeResultBlock.initQuery() --> |
<!-- categoryTypeResultBlock.initQuery() --> |
876 |
<!-- categoryAtributeResultBlock.categoryAtributeResultIdEntry= str(attributeBlock.categoryAtributeIdEntry) --> |
<!-- categoryAtributeResultBlock.categoryAtributeResultIdEntry= str(attributeBlock.categoryAtributeIdEntry) --> |
877 |
<!-- categoryAtributeResultBlock.processQuery() --> |
<!-- categoryAtributeResultBlock.processQuery() --> |
904 |
<!-- attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) --> |
<!-- attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) --> |
905 |
|
|
906 |
<!-- # look for the name... --> |
<!-- # look for the name... --> |
907 |
<!-- categoryTypeResultBlock.processRollback () --> |
<!-- categoryTypeResultBlock.clear() --> |
908 |
<!-- categoryTypeResultBlock.initQuery () --> |
<!-- categoryTypeResultBlock.initQuery () --> |
909 |
<!-- categoryTypeResultBlock.categoryTypeResultNameEntry= str(attributeBlock.categoryTypeNameEntry)+'%' --> |
<!-- categoryTypeResultBlock.categoryTypeResultNameEntry= str(attributeBlock.categoryTypeNameEntry)+'%' --> |
910 |
<!-- categoryTypeResultBlock.processQuery () --> |
<!-- categoryTypeResultBlock.processQuery () --> |
945 |
<!-- attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) --> |
<!-- attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) --> |
946 |
|
|
947 |
<!-- # look for the name... --> |
<!-- # look for the name... --> |
948 |
<!-- categoryAtributeResultBlock.processRollback () --> |
<!-- categoryAtributeResultBlock.clear() --> |
949 |
<!-- categoryAtributeResultBlock.initQuery () --> |
<!-- categoryAtributeResultBlock.initQuery () --> |
950 |
<!-- categoryAtributeResultBlock.categoryAtributeResultNameEntry= str(attributeBlock.categoryAtributeNameEntry)+'%' --> |
<!-- categoryAtributeResultBlock.categoryAtributeResultNameEntry= str(attributeBlock.categoryAtributeNameEntry)+'%' --> |
951 |
<!-- categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry= str(attributeBlock.categoryTypeIdEntry) --> |
<!-- categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry= str(attributeBlock.categoryTypeIdEntry) --> |
973 |
|
|
974 |
<!-- <trigger name="categoryRollbackTrigger" type="NAMED"><![CDATA[ --> |
<!-- <trigger name="categoryRollbackTrigger" type="NAMED"><![CDATA[ --> |
975 |
<!-- import hack --> |
<!-- import hack --> |
976 |
<!-- hack.rollback(attributeBlock) --> |
<!-- attributeBlock.reset() --> |
977 |
<!-- ]]></trigger> --> |
<!-- ]]></trigger> --> |
978 |
|
|
979 |
<!-- /attribute --> |
<!-- /attribute --> |
986 |
|
|
987 |
<page name="Búsqueda"> |
<page name="Búsqueda"> |
988 |
<trigger type="Pre-Focusout"><![CDATA[ |
<trigger type="Pre-Focusout"><![CDATA[ |
989 |
clientBlock.processRollback() |
clientBlock.clear() |
990 |
if clientResultBlock.getRecordCount() > 0 and not clientResultBlock.getCurrentRecord().isEmpty(): |
if clientResultBlock.getRecordCount() > 0 and not clientResultBlock.getCurrentRecord().isEmpty(): |
991 |
clientBlock.initQuery() |
clientBlock.initQuery() |
992 |
clientBlock.clientIdEntry = ("%s" % clientResultBlock.clientIdREntry) |
clientBlock.clientIdEntry = ("%s" % clientResultBlock.clientIdREntry) |
1092 |
setStatusText('buscando...') |
setStatusText('buscando...') |
1093 |
|
|
1094 |
# look for the name... |
# look for the name... |
1095 |
searchingPriceTypeBlock.processRollback () |
searchingPriceTypeBlock.clear() |
1096 |
searchingPriceTypeBlock.initQuery () |
searchingPriceTypeBlock.initQuery () |
1097 |
searchingPriceTypeBlock.nameEntry= str(clientBlock.priceTypeNameEntry)+'%' |
searchingPriceTypeBlock.nameEntry= str(clientBlock.priceTypeNameEntry)+'%' |
1098 |
searchingPriceTypeBlock.processQuery () |
searchingPriceTypeBlock.processQuery () |