31 |
|
|
32 |
<!-- use the configured code --> |
<!-- use the configured code --> |
33 |
<!-- modified database --> |
<!-- modified database --> |
34 |
|
|
35 |
<!-- <eq> --> |
<!-- <eq> --> |
36 |
<!-- <cfield name="_entity_data.entity_type"/> --> |
<!-- <cfield name="_entity_data.entity_type"/> --> |
37 |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
123 |
|
|
124 |
<!-- parte de multi entities --> |
<!-- parte de multi entities --> |
125 |
|
|
126 |
|
|
127 |
<datasource name="entityTypesDataSource" database="papo" |
<datasource name="entityTypesDataSource" database="papo" |
128 |
detaillink="_entity_types_data.entity" master="clientDataSource" |
detaillink="_entity_types_data.entity" master="clientDataSource" |
129 |
masterlink="entity.id" table="entity_types, _entity_types_data" historytable="_entity_types_data"> |
masterlink="entity.id" table="entity_types, _entity_types_data" historytable="_entity_types_data"> |
346 |
</eq> |
</eq> |
347 |
|
|
348 |
<!-- use the configured code --> |
<!-- use the configured code --> |
349 |
|
|
350 |
<!-- modified database --> |
<!-- modified database --> |
351 |
<!-- <eq> --> |
<!-- <eq> --> |
352 |
<!-- <cfield name="_entity_data.entity_type"/> --> |
<!-- <cfield name="_entity_data.entity_type"/> --> |
353 |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
<!-- <cfield name="entity_type_uid_conf.entity_type"/> --> |
354 |
<!-- </eq> --> |
<!-- </eq> --> |
355 |
|
|
356 |
<eq> |
<eq> |
357 |
<cconst value="7"/> |
<cconst value="7"/> |
358 |
<cfield name="entity_type_uid_conf.entity_type"/> |
<cfield name="entity_type_uid_conf.entity_type"/> |
428 |
</datasource> |
</datasource> |
429 |
|
|
430 |
<datasource database="papo" name="addressTypeResultDataSource" |
<datasource database="papo" name="addressTypeResultDataSource" |
431 |
table="address_type, _address_type_data" historytable="_address_type_data"> |
table="address_type, _address_type_data" historytable="_address_type_data"> |
432 |
<condition> |
<condition> |
433 |
<and> |
<and> |
434 |
<eq> |
<eq> |
460 |
</datasource> |
</datasource> |
461 |
|
|
462 |
<datasource database="papo" name="categoryTypeResultDataSource" |
<datasource database="papo" name="categoryTypeResultDataSource" |
463 |
table="category_type, _category_type_data, _category_entity_type_data" historytable="_category_type_data"> |
table="category_type, _category_type_data, _category_entity_type_data" historytable="_category_type_data"> |
464 |
<condition> |
<condition> |
465 |
<and> |
<and> |
466 |
<eq> |
<eq> |
485 |
</and> |
</and> |
486 |
</condition> |
</condition> |
487 |
</datasource> |
</datasource> |
488 |
|
|
489 |
<datasource database="papo" name="categoryAtributeResultDataSource" |
<datasource database="papo" name="categoryAtributeResultDataSource" |
490 |
table="category_attribute, _category_attribute_data" historytable="_category_attribute_data"> |
table="category_attribute, _category_attribute_data" historytable="_category_attribute_data"> |
491 |
<condition> |
<condition> |
492 |
<and> |
<and> |
493 |
<eq> |
<eq> |
556 |
addressBlock.addressTypeIdEntry = 4 |
addressBlock.addressTypeIdEntry = 4 |
557 |
entityTypesBlock.commit() |
entityTypesBlock.commit() |
558 |
# modified database |
# modified database |
559 |
|
|
560 |
else: |
else: |
561 |
clientBlock.commit() |
clientBlock.commit() |
562 |
else: |
else: |
626 |
]]></trigger> |
]]></trigger> |
627 |
|
|
628 |
<!-- impresión --> |
<!-- impresión --> |
629 |
|
|
630 |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
631 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
632 |
import gnue.common.GConditions as GConditions |
import gnue.common.GConditions as GConditions |
633 |
import string |
import string |
634 |
import hack |
import hack |
635 |
|
import printing |
|
def printField (field,size,justif='l'): |
|
|
if str(field).strip() == "None": |
|
|
field = "" |
|
|
if justif.lower() == 'l': |
|
|
return str(field).ljust(size) |
|
|
elif justif.lower() == 'r': |
|
|
return str(field).rjust(size) |
|
|
else: |
|
|
return str(field).center(size) |
|
|
|
|
|
def printTitle (field,size): |
|
|
return str(field).center(size) |
|
636 |
|
|
|
|
|
637 |
table = [] |
table = [] |
638 |
|
table.append (printing.printDate ()) |
639 |
line = "\n\nListado de Clientes\n\n\n" |
line = "\n\nListado de Clientes\n\n\n" |
640 |
table.append(line) |
table.append(line) |
641 |
|
|
642 |
line = "| " + printTitle("Codigo",14) + " | " |
line = "| " + printing.printTitle("Codigo",14) + " | " |
643 |
line += printTitle("Nombre",20) + " | " |
line += printing.printTitle("Nombre",20) + " | " |
644 |
line += printTitle("Direccion",20) + " | " |
line += printing.printTitle("Direccion",20) + " | " |
645 |
line += printTitle("Telefono",20) + " |" |
line += printing.printTitle("Telefono",20) + " |" |
646 |
lineLen = len(line) |
lineLen = len(line) |
647 |
table.append(line) |
table.append(line) |
648 |
|
|
670 |
|
|
671 |
while more: |
while more: |
672 |
#agregar condicion de busquedq de direccion |
#agregar condicion de busquedq de direccion |
673 |
|
|
674 |
addressCondition = GConditions.GCondition() |
addressCondition = GConditions.GCondition() |
675 |
tmpAnd = GConditions.GCand(addressCondition) |
tmpAnd = GConditions.GCand(addressCondition) |
676 |
eq1 = GConditions.GCeq(tmpAnd) |
eq1 = GConditions.GCeq(tmpAnd) |
683 |
addressResulSet = printAddressDataSource.createResultSet(addressCondition) |
addressResulSet = printAddressDataSource.createResultSet(addressCondition) |
684 |
anAddress = addressResulSet.firstRecord() |
anAddress = addressResulSet.firstRecord() |
685 |
addresses = [] |
addresses = [] |
686 |
|
|
687 |
while anAddress: |
while anAddress: |
688 |
addresses.append(addressResulSet.current.getField("address")) |
addresses.append(addressResulSet.current.getField("address")) |
689 |
anAddress = addressResulSet.nextRecord() |
anAddress = addressResulSet.nextRecord() |
690 |
|
|
691 |
#ver que pasa con el telef |
#ver que pasa con el telef |
692 |
|
|
693 |
#telephoneCondition = GConditions.GCondition() |
#telephoneCondition = GConditions.GCondition() |
694 |
#eq = GConditions.GCeq(telephoneCondition) |
#eq = GConditions.GCeq(telephoneCondition) |
695 |
#GConditions.GCField(eq,"_telephone_data.entity") |
#GConditions.GCField(eq,"_telephone_data.entity") |
720 |
telephones.append(telephoneResulSet.current.getField("address")) |
telephones.append(telephoneResulSet.current.getField("address")) |
721 |
anTelephone = telephoneResulSet.nextRecord() |
anTelephone = telephoneResulSet.nextRecord() |
722 |
|
|
723 |
line = "| " +printField(clientResulSet.current.getField("_entity_uid_data.uid"),14)+ " | " |
line = "| " +printing.printField(clientResulSet.current.getField("_entity_uid_data.uid"),14)+ " | " |
724 |
line += printField(clientResulSet.current.getField("_entity_data.name"),20) + " | " |
line += printing.printField(clientResulSet.current.getField("_entity_data.name"),20) + " | " |
725 |
|
|
726 |
if addresses: |
if addresses: |
727 |
line += printField(addresses.pop(),20) + " | " |
line += printing.printField(addresses.pop(),20) + " | " |
728 |
else: |
else: |
729 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
730 |
if telephones: |
if telephones: |
731 |
line += printField(telephones.pop(),20) + " |" |
line += printing.printField(telephones.pop(),20) + " |" |
732 |
else: |
else: |
733 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
734 |
table.append(line) |
table.append(line) |
735 |
|
|
736 |
while addresses or telephones: |
while addresses or telephones: |
737 |
line = "| " + printField(" ",14) + " | " |
line = "| " + printing.printField(" ",14) + " | " |
738 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
739 |
if addresses: |
if addresses: |
740 |
line += printField(addresses.pop(),20) + " | " |
line += printing.printField(addresses.pop(),20) + " | " |
741 |
else: |
else: |
742 |
line += printField(" ",20) + " | " |
line += printing.printField(" ",20) + " | " |
743 |
|
|
744 |
if telephones: |
if telephones: |
745 |
line += printField(telephones.pop(),20) + " | " |
line += printing.printField(telephones.pop(),20) + " | " |
746 |
else: |
else: |
747 |
line += printField(" ",20) + " |" |
line += printing.printField(" ",20) + " |" |
748 |
|
|
749 |
table.append(line) |
table.append(line) |
750 |
|
|
753 |
|
|
754 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
755 |
|
|
756 |
hack.previewPrint(table) |
printing.previewPrint(table) |
757 |
|
|
758 |
]]></trigger> |
]]></trigger> |
759 |
|
|
760 |
<!-- /impresion --> |
<!-- /impresion --> |
856 |
addressTypeResultBlock.processQuery() |
addressTypeResultBlock.processQuery() |
857 |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
addressBlock.addressTypeNameEntry= str(addressTypeResultBlock.addressTypeResultNameEntry) |
858 |
addressBlock.nextRecord() |
addressBlock.nextRecord() |
859 |
]]></trigger> |
]]></trigger> |
860 |
|
|
861 |
|
|
862 |
<!-- new_schema_begin --> |
<!-- new_schema_begin --> |
914 |
categoryAtributeResultBlock.processQuery() |
categoryAtributeResultBlock.processQuery() |
915 |
attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) |
attributeBlock.categoryAtributeNameEntry= str(categoryAtributeResultBlock.categoryAtributeResultNameEntry) |
916 |
categoryTypeResultBlock.categoryTypeResultIdEntry = str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
categoryTypeResultBlock.categoryTypeResultIdEntry = str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
917 |
attributeBlock.categoryTypeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
attributeBlock.categoryTypeIdEntry= str(categoryAtributeResultBlock.categoryAtributeResultTypeIdEntry) |
918 |
categoryTypeResultBlock.processQuery() |
categoryTypeResultBlock.processQuery() |
919 |
attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) |
attributeBlock.categoryTypeNameEntry= str(categoryTypeResultBlock.categoryTypeResultNameEntry) |
920 |
attributeBlock.nextRecord() |
attributeBlock.nextRecord() |
921 |
]]></trigger> |
]]></trigger> |
922 |
|
|
923 |
<!-- pantallites de busquede category--> |
<!-- pantallites de busquede category--> |
924 |
|
|
925 |
<trigger type="NAMED" name="callCategoryTypeTrigger"><![CDATA[ |
<trigger type="NAMED" name="callCategoryTypeTrigger"><![CDATA[ |
926 |
try: |
try: |
961 |
form._object.dispatchEvent(GFEvent('endWAIT')) |
form._object.dispatchEvent(GFEvent('endWAIT')) |
962 |
]]></trigger> |
]]></trigger> |
963 |
|
|
964 |
<!-- pantallites de busquede category_attribute--> |
<!-- pantallites de busquede category_attribute--> |
965 |
|
|
966 |
<trigger type="NAMED" name="callCategoryAtributeTrigger"><![CDATA[ |
<trigger type="NAMED" name="callCategoryAtributeTrigger"><![CDATA[ |
967 |
try: |
try: |
1186 |
</block> |
</block> |
1187 |
<!-- entity types --> |
<!-- entity types --> |
1188 |
<block name="entityTypesBlock" datasource="entityTypesDataSource" > |
<block name="entityTypesBlock" datasource="entityTypesDataSource" > |
1189 |
<entry name="clientEntityTypeEntry" field="_entity_types_data.entity_type" |
<entry name="clientEntityTypeEntry" field="_entity_types_data.entity_type" |
1190 |
x="40" y="4" width="4" hidden=""/> |
x="40" y="4" width="4" hidden=""/> |
1191 |
<entry name="clientEntityEntry" field="_entity_types_data.entity" |
<entry name="clientEntityEntry" field="_entity_types_data.entity" |
1192 |
x="40" y="4" width="4" hidden=""/> |
x="40" y="4" width="4" hidden=""/> |
1193 |
</block> |
</block> |
1194 |
|
|
1195 |
</box> |
</box> |
1196 |
</page> |
</page> |
1197 |
|
|
1361 |
<box label="Direcciones" |
<box label="Direcciones" |
1362 |
x="0" y="5" height="15" width="84"> |
x="0" y="5" height="15" width="84"> |
1363 |
<block name="addressBlock" datasource="addressDataSource"> |
<block name="addressBlock" datasource="addressDataSource"> |
1364 |
<label text="type" x="1" y="1"/> |
<label text="type" x="1" y="1"/> |
1365 |
<label text="valor" x="27" y="1"/> |
<label text="valor" x="27" y="1"/> |
1366 |
<label text="obsevacion" x="57" y="1"/> |
<label text="obsevacion" x="57" y="1"/> |
1367 |
<entry name="addressTypeIdEntry" field="_address_data.address_type" rows="8" |
<entry name="addressTypeIdEntry" field="_address_data.address_type" rows="8" |
1368 |
x="1" y="2" width="2" hidden="" /> |
x="1" y="2" width="2" hidden="" /> |
1369 |
<entry name="addressTypeNameEntry" rows="8" |
<entry name="addressTypeNameEntry" rows="8" |
1370 |
x="1" y="2" width="20"/> |
x="1" y="2" width="20"/> |
1371 |
<entry name="addressValueEntry" field="_address_data.address" rows="8" |
<entry name="addressValueEntry" field="_address_data.address" rows="8" |
1384 |
name="addressTypeBtn" height="8"/> |
name="addressTypeBtn" height="8"/> |
1385 |
</block> |
</block> |
1386 |
|
|
1387 |
<block name="addressTypeResultBlock" datasource="addressTypeResultDataSource"> |
<block name="addressTypeResultBlock" datasource="addressTypeResultDataSource"> |
1388 |
<entry name="addressTypeResultIdEntry" field="_address_type_data._table" |
<entry name="addressTypeResultIdEntry" field="_address_type_data._table" |
1389 |
x="75" y="4" width="2" hidden=""/> |
x="75" y="4" width="2" hidden=""/> |
1390 |
<entry name="addressTypeResultNameEntry" field="_address_type_data.name" |
<entry name="addressTypeResultNameEntry" field="_address_type_data.name" |
1391 |
x="78" y="4" width="20" hidden=""/> |
x="78" y="4" width="20" hidden=""/> |
1392 |
</block> |
</block> |
1393 |
</box> |
</box> |
1394 |
</page> |
</page> |
1395 |
<!-- categorias --> |
<!-- categorias --> |
1396 |
<page name="Categorias"> |
<page name="Categorias"> |
1397 |
<trigger type="Pre-Focusin" src="attributeNameSearchTrigger"/> |
<trigger type="Pre-Focusin" src="attributeNameSearchTrigger"/> |
1398 |
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
1399 |
<box label="Direcciones" |
<box label="Direcciones" |
1400 |
x="0" y="0" height="5" width="84"> |
x="0" y="0" height="5" width="84"> |
1409 |
<box label="Categorias" |
<box label="Categorias" |
1410 |
x="0" y="5" height="15" width="84"> |
x="0" y="5" height="15" width="84"> |
1411 |
<block name="attributeBlock" datasource="attributeDataSource"> |
<block name="attributeBlock" datasource="attributeDataSource"> |
1412 |
<label text="category" x="1" y="1"/> |
<label text="category" x="1" y="1"/> |
1413 |
<label text="attribute" x="30" y="1"/> |
<label text="attribute" x="30" y="1"/> |
1414 |
<entry name="categoryTypeIdEntry" rows="8" |
<entry name="categoryTypeIdEntry" rows="8" |
1415 |
x="1" y="2" hidden=""/> |
x="1" y="2" hidden=""/> |
1416 |
<entry name="categoryTypeNameEntry" rows="8" |
<entry name="categoryTypeNameEntry" rows="8" |
1417 |
x="1" y="2" width="20"/> |
x="1" y="2" width="20"/> |
1418 |
<entry name="categoryAtributeIdEntry" field="_entity_attribute_data.category_attribute" rows="8" |
<entry name="categoryAtributeIdEntry" field="_entity_attribute_data.category_attribute" rows="8" |
1423 |
x="60" y="2" width="1" height="8"/> |
x="60" y="2" width="1" height="8"/> |
1424 |
<button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" |
<button x="1" y="12" trigger="commitTrigger" width="9" label="Aceptar" |
1425 |
name="categoryCommitBtn" height="1"/> |
name="categoryCommitBtn" height="1"/> |
1426 |
<button x="11" y="12" trigger="categoryDeleteTrigger" width="9" label="Borrar" |
<button x="11" y="12" trigger="categoryDeleteTrigger" width="9" label="Borrar" |
1427 |
name="categoryDeleteBtn" height="1"/> |
name="categoryDeleteBtn" height="1"/> |
1428 |
<button x="21" y="12" trigger="categoryRollbackTrigger" width="9" label="Cancelar" |
<button x="21" y="12" trigger="categoryRollbackTrigger" width="9" label="Cancelar" |
1429 |
name="categoryRollbackBtn" height="1"/> |
name="categoryRollbackBtn" height="1"/> |
1430 |
<button x="22" y="2" trigger="callCategoryTypeTrigger" width="7" label="Buscar" |
<button x="22" y="2" trigger="callCategoryTypeTrigger" width="7" label="Buscar" |
1431 |
name="categoryTypeBtn" height="8"/> |
name="categoryTypeBtn" height="8"/> |
1432 |
<button x="51" y="2" trigger="callCategoryAtributeTrigger" width="7" label="Buscar" |
<button x="51" y="2" trigger="callCategoryAtributeTrigger" width="7" label="Buscar" |
1440 |
</block> |
</block> |
1441 |
<block name="categoryAtributeResultBlock" datasource="categoryAtributeResultDataSource"> |
<block name="categoryAtributeResultBlock" datasource="categoryAtributeResultDataSource"> |
1442 |
<entry name="categoryAtributeResultIdEntry" field="_category_attribute_data._table" |
<entry name="categoryAtributeResultIdEntry" field="_category_attribute_data._table" |
1443 |
x="55" y="8" width="2" hidden=""/> |
x="55" y="8" width="2" hidden=""/> |
1444 |
<entry name="categoryAtributeResultTypeIdEntry" field="_category_attribute_data.category_type" |
<entry name="categoryAtributeResultTypeIdEntry" field="_category_attribute_data.category_type" |
1445 |
x="58" y="8" width="2" hidden=""/> |
x="58" y="8" width="2" hidden=""/> |
1446 |
<entry name="categoryAtributeResultNameEntry" field="_category_attribute_data.name" |
<entry name="categoryAtributeResultNameEntry" field="_category_attribute_data.name" |
1447 |
x="61" y="8" width="20" hidden=""/> |
x="61" y="8" width="20" hidden=""/> |
1448 |
</block> |
</block> |
1449 |
|
|
1450 |
</box> |
</box> |
1451 |
</page> |
</page> |
1452 |
|
|