/[papo]/papo/forms/stockMaintenance.gfd
ViewVC logotype

Diff of /papo/forms/stockMaintenance.gfd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by styxman, Sat Feb 8 21:40:21 2003 UTC revision 1.1.2.1 by anthonyl, Fri Mar 14 22:45:25 2003 UTC
# Line 1  Line 1 
1  <?xml version="1.0" encoding="ISO-8859-1"?>  <?xml version="1.0" encoding="ISO-8859-1"?>
2    
3  <form title="Ajuste de Stock"  <!--  GNUe Forms 0.5.0 Migration Tool
4    height="18" width="84">        Saved on: 2003-02-11 17:42:19  -->
5    <datasource name="storehouseDataSource" database="papo"  
6      table="entity, _entity_data, own_entity, _own_entity_data, own_storehouse, _own_storehouse_data">  <form title="Ajuste de Stock">
7      <datasource name="searchDataSource"/>
8      <datasource name="storeProductLevelDataSource" connection="papo"
9                  historytable="_product_store_data"
10                  table="product_store, _product_store_data, product, _product_data, product_code, _product_code_data">
11      <condition>      <condition>
12        <and>        <and>
13          <!-- glue historics -->          <eq>
14          <eq> <cfield name="entity.id"/> <cfield name="_entity_data._table"/> </eq>            <cfield name="product_store.id"/>
15          <null> <cfield name="_entity_data._end_t"/> </null>            <cfield name="_product_store_data._table"/>
16            </eq>
17          <eq> <cfield name="own_entity.id"/> <cfield name="_own_entity_data._table"/> </eq>          <null>
18          <null> <cfield name="_own_entity_data._end_t"/> </null>            <cfield name="_product_store_data._end_t"/>
19            </null>
20          <eq> <cfield name="own_storehouse.id"/> <cfield name="_own_storehouse_data._table"/> </eq>          <eq>
21          <null> <cfield name="_own_storehouse_data._end_t"/> </null>            <cfield name="product.id"/>
22              <cfield name="_product_data._table"/>
23          <!-- join them -->          </eq>
24          <eq> <cfield name="_own_entity_data.entity"/> <cfield name="entity.id"/> </eq>          <null>
25          <eq> <cfield name="_own_storehouse_data.own_entity"/> <cfield name="own_entity.id"/> </eq>            <cfield name="_product_data._end_t"/>
26            </null>
27          <!-- no filters -->          <eq>
28              <cfield name="product_code.id"/>
29              <cfield name="_product_code_data._table"/>
30            </eq>
31            <null>
32              <cfield name="_product_code_data._end_t"/>
33            </null>
34            <eq>
35              <cfield name="_product_store_data.product"/>
36              <cfield name="product.id"/>
37            </eq>
38            <eq>
39              <cfield name="_product_code_data.product"/>
40              <cfield name="product.id"/>
41            </eq>
42            <eq>
43              <cfield name="_product_code_data.product_code_type"/>
44              <cconst value="1"/>
45            </eq>
46        </and>        </and>
47      </condition>      </condition>
48    </datasource>    </datasource>
49      <datasource name="storehouseDataSource" connection="papo"
50    <datasource name="storeProductLevelDataSource" database="papo"                table="entity, _entity_data, own_entity, _own_entity_data, own_storehouse, _own_storehouse_data">
     table="product_store, _product_store_data, product, _product_data, product_code, _product_code_data"  
     historytable="_product_store_data">  
     <!--  master="storehouseDataSource" masterlink="entity.id" detaillink="_product_store_data.storehouse" -->  
51      <condition>      <condition>
52        <and>        <and>
53          <!-- glue historics -->          <eq>
54          <eq> <cfield name="product_store.id"/> <cfield name="_product_store_data._table"/> </eq>            <cfield name="entity.id"/>
55          <null> <cfield name="_product_store_data._end_t"/> </null>            <cfield name="_entity_data._table"/>
56            </eq>
57          <eq> <cfield name="product.id"/> <cfield name="_product_data._table"/> </eq>          <null>
58          <null> <cfield name="_product_data._end_t"/> </null>            <cfield name="_entity_data._end_t"/>
59            </null>
60          <eq> <cfield name="product_code.id"/> <cfield name="_product_code_data._table"/> </eq>          <eq>
61          <null> <cfield name="_product_code_data._end_t"/> </null>            <cfield name="own_entity.id"/>
62              <cfield name="_own_entity_data._table"/>
63          <!-- join them -->          </eq>
64          <eq> <cfield name="_product_store_data.product"/> <cfield name="product.id"/> </eq>          <null>
65          <eq> <cfield name="_product_code_data.product"/> <cfield name="product.id"/> </eq>            <cfield name="_own_entity_data._end_t"/>
66            </null>
67          <!-- filter out -->          <eq>
68          <!-- only salable ones? -->            <cfield name="own_storehouse.id"/>
69          <!-- eq> <cfield name="_product_data.salable"/> <cconst value="1"/> </eq -->            <cfield name="_own_storehouse_data._table"/>
70            </eq>
71          <!-- only product code types 1 -->          <null>
72          <eq> <cfield name="_product_code_data.product_code_type"/> <cconst value="1"/> </eq>            <cfield name="_own_storehouse_data._end_t"/>
73            </null>
74            <eq>
75              <cfield name="_own_entity_data.entity"/>
76              <cfield name="entity.id"/>
77            </eq>
78            <eq>
79              <cfield name="_own_storehouse_data.own_entity"/>
80              <cfield name="own_entity.id"/>
81            </eq>
82        </and>        </and>
83      </condition>      </condition>
84    </datasource>    </datasource>
   
   <!-- this one will hold the resultSet -->  
   <datasource name="searchDataSource"/>  
   
   <!-- Triggers -->  
85    <trigger name="searchTrigger" type="NAMED"><![CDATA[    <trigger name="searchTrigger" type="NAMED"><![CDATA[
86      storeProductLevelBlock.processRollback ()      storeProductLevelBlock.rollback ()
87      storeProductLevelBlock.initQuery ()      storeProductLevelBlock.initQuery ()
88      storeProductLevelBlock.productCodeEntry= str(searchBlock.productCodeFilterEntry)+'%'      storeProductLevelBlock.productCodeEntry= str(searchBlock.productCodeFilterEntry)+'%'
89      storeProductLevelBlock.productNameEntry= str(searchBlock.productNameFilterEntry)+'%'      storeProductLevelBlock.productNameEntry= str(searchBlock.productNameFilterEntry)+'%'
90      storeProductLevelBlock.processQuery ()      storeProductLevelBlock.executeQuery ()
91    ]]></trigger>    ]]></trigger>
   
92    <trigger name="commitTrigger" type="NAMED"><![CDATA[    <trigger name="commitTrigger" type="NAMED"><![CDATA[
93      # ugly but works      # ugly but works
94      from __future__ import nested_scopes      from __future__ import nested_scopes
# Line 93  Line 115 
115          a2f(product._fields['_product_store_data.level'])          a2f(product._fields['_product_store_data.level'])
116        ))        ))
117    
118      searchBlock.processRollback ()      searchBlock.rollback ()
119      storeProductLevelBlock.processRollback ()      storeProductLevelBlock.rollback ()
120    ]]></trigger>    ]]></trigger>
121      <logic>
122    <page name="Ajuste de Stock">      <block name="searchBlock" datasource="searchDataSource" restrictInsert="">
123      <block name="searchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert="">        <field name="productCodeFilterEntry" field="productCode"/>
124        <label text="Código"        <field name="productNameFilterEntry" field="productName"/>
         x="1" y="1"/>  
       <entry name="productCodeFilterEntry" field="productCode"  
         x="1" y="2" width="14"/>  
       <label text="Nombre de producto"  
         x="15" y="1"/>  
       <entry name="productNameFilterEntry" field="productName"  
         x="15" y="2" width="35"/>  
       <button label="Buscar" trigger="searchTrigger"  
         x="50" y="2" width="10" height="1"/>  
125      </block>      </block>
126        <block name="storeProductLevelBlock"
127      <block name="storeProductLevelBlock" datasource="storeProductLevelDataSource" transparentBlock="" restrictInsert="">             datasource="storeProductLevelDataSource" restrictInsert="">
128        <!-- label text="Depósito"        <field name="producCodeEntry" field="_product_code_data.code"/>
129          x="1" y="1" />        <field name="producNameEntry" field="_product_data.canonical_name"/>
130        <entry name="storehouseEntry" field="_product_store_data.storehouse" style="dropdown"        <field name="levelEntry" displaymask="%.3f"
131          foreign_key="storehouseDataSource._entity_data.id" foreign_key_description="_entity_data.name"               field="_product_store_data.level"/>
         x="1" y="10" width="35"/ -->  
       <entry name="producCodeEntry" field="_product_code_data.code" style="label"  
         x="1" y="4" width="35" rows="10"/>  
       <entry name="producNameEntry" field="_product_data.canonical_name" style="label"  
         x="15" y="4" width="35" rows="10"/>  
       <label text="Cant. en stock"  
         x="50" y="3"/>  
       <entry name="levelEntry" field="_product_store_data.level"  
         x="50" y="4" width="5" rows="10"  
         displaymask="%.3f"/>  
       <button label="Aceptar" trigger="commitTrigger"  
         x="1" y="15" width="10" height="1"/>  
132      </block>      </block>
133    </page>    </logic>
134      <layout xmlns:c="GNUe:Layout:Char" c:height="21" c:width="84">
135        <page name="Ajuste de Stock">
136          <label text="Código" c:x="1" c:y="1"/>
137          <entry block="searchBlock" field="productCodeFilterEntry" c:width="14"
138                 c:x="1" c:y="2"/>
139          <label text="Nombre de producto" c:x="15" c:y="1"/>
140          <entry block="searchBlock" field="productNameFilterEntry" c:width="35"
141                 c:x="15" c:y="2"/>
142          <button c:height="1" label="Buscar" c:width="10" c:x="50" c:y="2">
143            <trigger src="searchTrigger" type="On-Action"/>
144          </button>
145          <entry block="storeProductLevelBlock" field="producCodeEntry" rows="10"
146                 style="label" c:width="35" c:x="1" c:y="4"/>
147          <entry block="storeProductLevelBlock" field="producNameEntry" rows="10"
148                 style="label" c:width="35" c:x="15" c:y="4"/>
149          <label text="Cant. en stock" c:x="50" c:y="3"/>
150          <entry block="storeProductLevelBlock" field="levelEntry" rows="10"
151                 c:width="5" c:x="50" c:y="4"/>
152          <button c:height="1" label="Aceptar" c:width="10" c:x="1" c:y="15">
153            <trigger src="commitTrigger" type="On-Action"/>
154          </button>
155        </page>
156      </layout>
157  </form>  </form>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26