/[papo]/papo/forms/components/itemizable.nebc
ViewVC logotype

Diff of /papo/forms/components/itemizable.nebc

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

revision 1.2 by apronotti, Tue Sep 23 20:28:05 2003 UTC revision 1.3 by mhepp, Tue Oct 7 21:01:23 2003 UTC
# Line 2  Line 2 
2      $item => ''      $item => ''
3      $item_name => ''      $item_name => ''
4      $account_plan => ''      $account_plan => ''
5        $tax => ''
6     </neb:Vars>     </neb:Vars>
7    
8    
9    
10  <!--   <maintoolbar enabled=""/> -->  <!--   <maintoolbar enabled=""/> -->
11    <datasource name="focusDataSource" cache="1"/>    <datasource name="focusDataSource" cache="1"/>
12    <datasource name="searchDataSource" cache="1"/>    <datasource name="searchDataSource" cache="1"/>
13    <!--    <!--
14        datasource usado para la búsqueda (primer pantalla)        datasource usado para la búsqueda (primer pantalla no borrar
15      copiar a factura )
16    -->    -->
17    <datasource name="productResultDataSource" database="papo"  <!--   <datasource name="productResultDataSource" database="papo" -->
18      table="_product_data, _product_code_data"  <!--     table="_product_data, _product_code_data" -->
19      cache="15" order_by="_product_data.canonical_name">  <!--     order_by="_product_data.canonical_name"> -->
20      <condition>  <!--   <condition> -->
21        <and>  <!--     <and> -->
22          <!-- pega product con product_code -->  <!--       <eq> -->
23          <eq>  <!--         <cfield name="_product_data._table"/> -->
24            <cfield name="_product_data._table"/>  <!--         <cfield name="_product_code_data.product"/> -->
25            <cfield name="_product_code_data.product"/>  <!--       </eq> -->
26          </eq>  <!--       <eq> -->
27          <!-- solamente códigos internos (id 1) -->  <!--         <cfield name="_product_code_data.product_code_type"/> -->
28          <eq>  <!--         <cconst value="1"/> -->
29            <cfield name="_product_code_data.product_code_type"/>  <!--       </eq> -->
30            <cconst value="1"/>  
31          </eq>  
32          <!-- descarta productos muertos -->  
33          <null>  
34            <cfield name="_product_data._end_t"/>  <!--       <eq> -->
35          </null>  <!--         <cfield name="_product_data.account_plan"/> -->
36          <!-- descarta códigos de producto muertos -->  <!--         <cfield name="_account_plan_data._table"/> -->
37          <null>  <!--       </eq> -->
38            <cfield name="_product_code_data._end_t"/>  <!--       <like> -->
39          </null>  <!--         <cfield name="_account_plan_data.code"/> -->
40        </and>  <!--         <cfield name="_sys_account2account_plan_data.code"/> -->
41      </condition>  <!--       </like> -->
42    </datasource>  <!--       <eq> -->
43    <!--         <cfield name="_sys_account2account_plan_data.id"/> -->
44    <!--         <cconst value="neb:$account_plan"/> -->
45    <!--       </eq> -->
46    <!--       <null> -->
47    <!--         <cfield name="_sys_account2account_plan_data._end_t"/> -->
48    <!--       </null> -->
49    
50    
51    
52    
53    <!--       <null> -->
54    <!--         <cfield name="_product_data._end_t"/> -->
55    <!--       </null> -->
56    <!--       <null> -->
57    <!--         <cfield name="_product_code_data._end_t"/> -->
58    <!--       </null> -->
59    <!--     </and> -->
60    <!--   </condition> -->
61    <!--   </datasource> -->
62    
63  <!--datasource para dropdown de currency-->  <!--datasource para dropdown de currency-->
64    
65    
66     <datasource name="productResultDataSource" database="papo"
67       order_by="_product_data.canonical_name">
68      <joinconditions>
69        <join type="inner">
70          <join type="right">
71            <join type="inner">
72              <left_table name="_sys_account2account_plan_data"/>
73              <right_table name="_account_plan_data"/>
74              <condition>
75                <and>
76                  <like>
77                    <cfield name="_account_plan_data.code"/>
78                    <cfield name="_sys_account2account_plan_data.code"/>
79                  </like>
80                  <eq>
81                    <cfield name="_sys_account2account_plan_data.id"/>
82                    <cconst value="neb:$account_plan"/>
83                      </eq>
84                  <null>
85                    <cfield name="_sys_account2account_plan_data._end_t"/>
86                  </null>
87                </and>
88              </condition>
89            </join>
90            <right_table name="_product_data"/>
91            <condition>
92              <eq>
93                <cfield name="_product_data.account_plan"/>
94                <cfield name="_account_plan_data._table"/>
95              </eq>
96            </condition>
97          </join>
98          <right_table name="_product_code_data"/>
99          <condition>
100            <and>
101              <eq>
102                <cfield name="_product_data._table"/>
103                <cfield name="_product_code_data.product"/>
104              </eq>
105              <null>
106                <cfield name="_product_data._end_t"/>
107              </null>
108              <null>
109                <cfield name="_product_code_data._end_t"/>
110              </null>
111            </and>
112          </condition>
113        </join>
114      </joinconditions>
115      <!--  where conditions -->
116      <condition>
117        <or>
118          <!--  mostrar las que corresponden al plan de cuentas o las que
119          esten vacias -->
120          <eq>
121            <cfield name="_sys_account2account_plan_data.id"/>
122            <cconst value="neb:$account_plan"/>
123          </eq>
124          <null>
125            <cfield name="_product_data.account_plan"/>
126          </null>
127        </or>
128      </condition>
129      </datasource>
130    
131   <datasource name="currencyDataSource" database="papo" table="_currency_type_data">   <datasource name="currencyDataSource" database="papo" table="_currency_type_data">
132      <condition>      <condition>
133      <and>      <and>
# Line 121  Line 212 
212    </datasource>    </datasource>
213    
214    <!-- lo mismo que arriba, el anterior es para buscar, este para    <!-- lo mismo que arriba, el anterior es para buscar, este para
215         ABM de uno en particular (segunda pantaia) -->         ABM de uno en particular (segunda pantalla) -->
216    <datasource name="productDataSource" database="papo"    <datasource name="itemizableDataSource" database="papo"
217      table="product, _product_data, price, _price_data, product_code, _product_code_data, product_tax, _product_tax_data"      table="product, _product_data"
218      historytable="_product_data, _price_data, _product_code_data, _product_tax_data"      historytable="_product_data" >
219      order_by="_product_data.canonical_name,_product_code_data.code">    <condition>
220      <condition>      <and>
221        <and>        <!-- pega product con su _data -->
222          <!-- pega product con su _data -->        <eq>
223          <eq>          <cfield name="product.id"/>
224            <cfield name="product.id"/>          <cfield name="_product_data._table"/>
225            <cfield name="_product_data._table"/>        </eq>
226          </eq>        <!-- descarta productos muertos -->
227          <!-- descarta productos muertos -->        <null>
228          <null>          <cfield name="_product_data._end_t"/>
229            <cfield name="_product_data._end_t"/>        </null>
230          </null>      </and>
231          <!-- pega product con price -->    </condition>
232          <eq>    </datasource>
233            <cfield name="product.id"/>  
234            <cfield name="_price_data.product"/>    <!-- separados los que no son de la misma herencia -->
235          </eq>    <!-- code -->
236          <!-- pega price con su _data -->    <datasource name="itemizableCodeDataSource" database="papo"
237          <eq>      detaillink="_product_code_data.product"
238            <cfield name="price.id"/>      master="itemizableDataSource"
239            <cfield name="_price_data._table"/>      masterlink="product.id"
240          </eq>      table="product_code,_product_code_data"
241          <!-- solamente lista 1 -->      historytable="_product_code_data">
242          <eq>    <condition>
243            <cfield name="_price_data.price_type"/>      <and>
244            <cconst value="1"/>        <!-- pega product_code con su _data -->
245          </eq>        <eq>
246          <!-- descarta precios muertos -->          <cfield name="product_code.id"/>
247          <null>          <cfield name="_product_code_data._table"/>
248            <cfield name="_price_data._end_t"/>        </eq>
249          </null>        <!-- solamente códigos internos (id 1) -->
250          <!-- pega product con product_code -->        <eq>
251          <eq>          <cfield name="_product_code_data.product_code_type"/>
252            <cfield name="product.id"/>          <cconst value="1"/>
253            <cfield name="_product_code_data.product"/>        </eq>
254          </eq>        <!-- descarta códigos de producto muertos -->
255          <!-- pega product_code con su _data -->        <null>
256          <eq>          <cfield name="_product_code_data._end_t"/>
257            <cfield name="product_code.id"/>        </null>
258            <cfield name="_product_code_data._table"/>      </and>
259          </eq>    </condition>
260          <!-- solamente códigos internos (id 1) -->    </datasource>
261          <eq>  
262            <cfield name="_product_code_data.product_code_type"/>  <!-- cosas específicas de los productos -->
263            <cconst value="1"/>  
264          </eq>   <neb:Block> if ($item eq "product") {</neb:Block>
265          <!-- descarta códigos de producto muertos -->  <!-- price -->
266          <null>  
267            <cfield name="_product_code_data._end_t"/>   <datasource name="itemizablePriceDataSource" database="papo"
268          </null>     detaillink="_price_data.product"
269          <!-- pega product con product_tax -->     master="itemizableDataSource"
270          <eq>     masterlink="product.id"
271            <cfield name="product.id"/>     table="price, _price_data"
272            <cfield name="_product_tax_data.product"/>     historytable="_price_data">
273          </eq>    <condition>
274          <!-- pega product_tax con su _data -->      <and>
275          <eq>        <!-- pega price con su _data -->
           <cfield name="product_tax.id"/>  
           <cfield name="_product_tax_data._table"/>  
         </eq>  
         <!-- descarta product_taxes muertos -->  
         <null>  
           <cfield name="_product_tax_data._end_t"/>  
         </null>  
         <!-- solamente 'IVA' (id 1) -->  
276          <eq>          <eq>
277            <cfield name="_product_tax_data.tax"/>          <cfield name="price.id"/>
278            <cfield name="_price_data._table"/>
279          </eq>
280          <!-- solamente lista 1 -->
281          <eq>
282            <cfield name="_price_data.price_type"/>
283            <cconst value="1"/>            <cconst value="1"/>
284          </eq>
285          <!-- descarta precios muertos -->
286          <null>
287            <cfield name="_price_data._end_t"/>
288          </null>
289        </and>
290      </condition>
291      </datasource>
292     <neb:Block>}</neb:Block>
293     <neb:Block> if ($tax) {</neb:Block>
294    <!-- tax -->
295     <datasource name="itemizableTaxDataSource" database="papo"
296        detaillink="_product_tax_data.product"
297        master="itemizableDataSource"
298        masterlink="product.id"
299        table="product_tax,_product_tax_data"
300        historytable="_product_tax_data">
301        <condition>
302        <and>
303          <!-- pega product_tax con su _data -->
304          <eq>
305            <cfield name="product_tax.id"/>
306            <cfield name="_product_tax_data._table"/>
307          </eq>
308          <!-- descarta product_taxes muertos -->
309          <null>
310            <cfield name="_product_tax_data._end_t"/>
311          </null>
312          <!-- solamente 'IVA' (id 1) -->
313          <eq>
314            <cfield name="_product_tax_data.tax"/>
315            <cconst value="1"/>
316          </eq>          </eq>
317          <!-- FALTA: product_store.storehouse -->      </and>
318        </and>    </condition>
     </condition>  
319    </datasource>    </datasource>
320    
   <neb:Block> if ($item eq "product") {</neb:Block>  
321    <!-- datasources para dropdowns: con buscar los not null en _data estamos -->    <!-- datasources para dropdowns: con buscar los not null en _data estamos -->
     
322    
323    <datasource name="productClassificationDataSource" database="papo"    <datasource name="productClassificationDataSource" database="papo"
324      table="_product_classification_data" order_by="name">      table="_product_classification_data" order_by="name">
# Line 240  Line 357 
357      </condition>      </condition>
358    </datasource>    </datasource>
359   <neb:Block>}</neb:Block>   <neb:Block>}</neb:Block>
360    <!-- /cosas específicas de los productos -->
361    
362    <trigger name="startUp" type="On-Startup">    <trigger name="startUp" type="On-Startup">
363      #cargo el own-pos entity id      #cargo el own-pos entity id
# Line 307  Line 425 
425      printing.previewPrint(table)      printing.previewPrint(table)
426    </trigger>    </trigger>
427    
428    <trigger name="productCommitTrigger" type="NAMED"><![CDATA[    <trigger name="productCommitTrigger" type="NAMED">
429    from hack import a2f    from hack import a2f
430    bad=0    bad=0
431    if not str(productBlock.codeEntry):    if not str(itemizableCodeBlock.codeEntry):
432        self.genericBox('Por favor, ingrese un código para el producto.',['Aceptar'])        self.genericBox('Por favor, ingrese un código para el producto.',['Aceptar'])
433        bad = bad+1        bad = bad+1
434    if not a2f(productBlock.priceEntry):    <neb:Block> if ($item eq "product") {</neb:Block>    
435      if not a2f(itemizablePriceBlock.priceEntry):
436        self.genericBox('Por favor, ingrese un precio para el producto.',['Aceptar'])        self.genericBox('Por favor, ingrese un precio para el producto.',['Aceptar'])
437        bad = bad+1        bad = bad+1
438      <neb:Block>}</neb:Block>    
439    if not bad:    if not bad:
440        from gnue.common.GDataObjects import ConnectionError as DBError        from gnue.common.GDataObjects import ConnectionError as DBError
441        if productBlock.getCurrentRecord().isInserted():        if itemizableBlock.getCurrentRecord().isInserted():
442            productBlock.priceTypeEntry = 1            itemizableCodeBlock.productCodeTypeEntry = 1
443            productBlock.productCodeTypeEntry = 1            <neb:Block> if ($item eq "product") {</neb:Block>
444            productBlock.productTaxEntry = 1            itemizablePriceBlock.priceTypeEntry = 1
445            productBlock.levelEntry = 0            itemizableBlock.levelEntry = 0
446              <neb:Block>}</neb:Block>
447              <neb:Block> if ($tax) {</neb:Block>
448              itemizableTaxBlock.productTaxEntry = 1                    
449              <neb:Block>}</neb:Block>
450            try:            try:
451                productBlock.postChanges()                itemizableBlock.postChanges()
452                commitConnection()                commitConnection()
453            except DBError, err:            except DBError, err:
454                rollbackConnection()                rollbackConnection()
455                genericBox("Hay problemas para grabar los datos del producto\n"+str(err),['Aceptar'])                genericBox("Hay problemas para grabar los datos del producto\n"+str(err),['Aceptar'])
456        else:        else:
457            try:            try:
458                productBlock.postChanges()                itemizableBlock.postChanges()
459                commitConnection()                commitConnection()
460            except DBError, err:            except DBError, err:
461                rollbackConnection()                rollbackConnection()
462                genericBox("Hay problemas para actualizar los datos del producto\n"+str(err),['Aceptar'])                genericBox("Hay problemas para actualizar los datos del producto\n"+str(err),['Aceptar'])
463                        
464    ]]></trigger>    </trigger>
465    
466    <trigger name="productDeleteTrigger" type="NAMED"><![CDATA[    <trigger name="productDeleteTrigger" type="NAMED"><![CDATA[
467      import hack      import hack
468      hack.deleteCurrentRecord(productBlock)      hack.deleteCurrentRecord(itemizableBlock)
469    ]]></trigger>    ]]></trigger>
470    
471    <trigger name="productRollbackTrigger" type="NAMED"><![CDATA[    <trigger name="productRollbackTrigger" type="NAMED">
472      import hack      import hack
473      productBlock.reset()      reset()
474      callTrigger ('account_planForId')          callTrigger ('account_planForId')
475        <neb:Block> if ($item eq "product") {</neb:Block>
476      callTrigger ('product_classificationForId')      callTrigger ('product_classificationForId')
477      callTrigger ('countryForId')      callTrigger ('countryForId')
478    ]]></trigger>      <neb:Block>}</neb:Block>
479        reset()
480      </trigger>
481    
482    <trigger name="askForChangesTrigger" type="NAMED"><![CDATA[    <trigger name="askForChangesTrigger" type="NAMED"><![CDATA[
483      import hack      import hack
484    
485      hack.confirmPageChanges(self, 'productCommitTrigger', productBlock)      hack.confirmPageChanges(self, 'productCommitTrigger', itemizableBlock)
486    ]]></trigger>    ]]></trigger>
487    
488    <trigger name="productSearchTrigger" type="NAMED"><![CDATA[    <trigger name="productSearchTrigger" type="NAMED"><![CDATA[
# Line 387  Line 514 
514    
515    <page name="Búsqueda">    <page name="Búsqueda">
516      <trigger type="Pre-Focusout"><![CDATA[      <trigger type="Pre-Focusout"><![CDATA[
517          productBlock.clear()          itemizableBlock.clear()
518          if productResultBlock.getRecordCount() > 0 and not productResultBlock.getCurrentRecord().isEmpty():          if productResultBlock.getRecordCount() > 0 and not productResultBlock.getCurrentRecord().isEmpty():
519            productBlock.initQuery()            itemizableBlock.initQuery()
520            productBlock.productIdEntry = ("%s" % productResultBlock.productIdREntry)            itemizableBlock.productIdEntry = ("%s" % productResultBlock.productIdREntry)
521            productBlock.processQuery()            itemizableBlock.processQuery()
522          productResultBlock.reset()          productResultBlock.reset()
523      ]]></trigger>      ]]></trigger>
524      <lam:box height="1"/>      <lam:box height="1"/>
# Line 458  Line 585 
585          x="1" y="1" hidden="y"/>          x="1" y="1" hidden="y"/>
586      </block -->      </block -->
587            
588      <trigger type="Pre-Focusin"><![CDATA[      <trigger type="Pre-Focusin">
589        if str(productResultBlock.productIdREntry)!='':        if str(productResultBlock.productIdREntry)!='':
590            <neb:Block> if ($item eq "product") {</neb:Block>
591          callTrigger ('product_classificationForId')          callTrigger ('product_classificationForId')
592            callTrigger ('countryForId')
593            <neb:Block>}</neb:Block>
594          callTrigger ('account_planForId')              callTrigger ('account_planForId')    
595            
596          # if str(productBlock.physical_structureIdEntry)!='':          # if str(itemizableBlock.physical_structureIdEntry)!='':
597            # searchingPhysicalStructureBlock.clear()            # searchingPhysicalStructureBlock.clear()
598            # searchingPhysicalStructureBlock.initQuery ()            # searchingPhysicalStructureBlock.initQuery ()
599            # searchingPhysicalStructureBlock.idEntry= str(productBlock.physical_structureIdEntry)            # searchingPhysicalStructureBlock.idEntry= str(itemizableBlock.physical_structureIdEntry)
600            # searchingPhysicalStructureBlock.processQuery ()            # searchingPhysicalStructureBlock.processQuery ()
601            # productBlock.physical_structureNameEntry= str(searchingPhtsicalStructureBlock.nameEntry)            # itemizableBlock.physical_structureNameEntry= str(searchingPhtsicalStructureBlock.nameEntry)
602          # else:          # else:
603            # productBlock.physical_structureEntry= ''            # itemizableBlock.physical_structureEntry= ''
604        
605          # use of the component's trigger          # use of the component's trigger
606          callTrigger ('countryForId')          
607      ]]></trigger>      </trigger>
608      <!-- new_schema_end -->      <!-- new_schema_end -->
609    
610      <trigger type="pre-Focusout" src="askForChangesTrigger"/>    <trigger type="pre-Focusout" src="askForChangesTrigger"/>
611      <box label="Datos">    <box label="Datos">
612        <lam:box>      <lam:box>
613          <block name="productBlock" datasource="productDataSource" restrictInsert="y">        <block name="itemizableBlock" datasource="itemizableDataSource" restrictInsert="y">
614            <entry name="priceTypeEntry" field="_price_data.price_type" hidden="y"/>          <entry name="productIdEntry" field="product.id" hidden="y"/>
615            <entry name="productCodeTypeEntry" field="_product_code_data.product_code_type" hidden="y"/>          <lam:box lam:boxtype="h">
616            <entry name="productIdEntry" field="product.id" hidden="y"/>            <label text="Nombre Canónico:"/>
617                      </lam:box>
618            <lam:box lam:boxtype="h">          
619              <label text="Nombre Canónico:"/>          <lam:box lam:boxtype="h">
620            </lam:box>            <entry name="canonical_nameEntry" field="_product_data.canonical_name"/>
621                        <lam:box width="1"/>
622            <lam:box lam:boxtype="h">            <button label="Nuevo" trigger="newProductTrigger">
623              <entry name="canonical_nameEntry" field="_product_data.canonical_name"/>              <trigger type="NAMED" name="newProductTrigger"><![CDATA[
624              <lam:box width="1"/>              from hack import confirmRollback
625              <button label="Nuevo" trigger="newProductTrigger">              confirmRollback (self, itemizableBlock, 'productCommitTrigger', itemizableBlock.canonical_nameEntry)
626                <trigger type="NAMED" name="newProductTrigger"><![CDATA[              ]]></trigger>
627                  from hack import confirmRollback            </button>
628                  confirmRollback (self, productBlock, 'productCommitTrigger', productBlock.canonical_nameEntry)            <lam:box width="1"/>
629                ]]></trigger>          </lam:box>
630              </button>          <lam:box lam:boxtype="h">
631              <lam:box width="1"/>            <lam:box>
632            </lam:box>              <lam:box lam:boxtype="h">
633            <lam:box lam:boxtype="h">                <label text="Código interno"/>
             <lam:box>  
               <lam:box lam:boxtype="h">  
                 <label text="Código interno"/>  
               </lam:box>  
               <lam:box lam:boxtype="h">  
                 <entry name="codeEntry" field="_product_code_data.code"/>  
               </lam:box>  
634              </lam:box>              </lam:box>
635              <neb:Block> if ($item eq "product") {</neb:Block>              <block name="itemizableCodeBlock" datasource="itemizableCodeDataSource" restrictInsert="y">
             <lam:box>  
               <lam:box lam:boxtype="h">  
                 <label text="vendible"/>  
               </lam:box>  
636                <lam:box lam:boxtype="h">                <lam:box lam:boxtype="h">
637                  <entry name="exludedEntry" field="_price_data.excluded" hidden="y" default="0"/>                  <entry name="productCodeTypeEntry" field="_product_code_data.product_code_type" hidden="y"/>
638                  <entry name="salableValueEntry" field="_product_data.salable" default="1"/>                  <entry name="codeEntry" field="_product_code_data.code"/>
639                </lam:box>                </lam:box>
640                </block>
641              </lam:box>
642      
643              <!-- si es vendible -->
644              <neb:Block> if ($item eq "product") {</neb:Block>
645              
646              <lam:box>
647                <lam:box lam:boxtype="h">
648                  <label text="vendible"/>
649              </lam:box>              </lam:box>
             <neb:Block>} else {</neb:Block>  
650              <lam:box lam:boxtype="h">              <lam:box lam:boxtype="h">
651                <entry name="exludedEntry" field="_price_data.excluded" hidden="y" default="0"/>                
652                <entry name="salableValueEntry" field="_product_data.salable"  hidden="y" default="1"/>                <entry name="salableValueEntry" field="_product_data.salable" default="1"/>
653              </lam:box>              </lam:box>
             <neb:Block>}</neb:Block>  
654            </lam:box>            </lam:box>
655            <lam:box lam:boxtype="h">            <neb:Block>} else {</neb:Block>
656                          <entry name="salableValueEntry" field="_product_data.salable"  hidden="y" default="0"/>
657              <neb:Sub neb:src="accountPlanSearch.nebc" label="Cuenta contable"            <neb:Block>}</neb:Block>
658                target_field="product.account_plan" target_block="productBlock" account="neb:$account_plan"/>          </lam:box>
             <!-- Hay que mejorar la búsqueda de la cuenta contable  -->  
             <lam:box width="1"/>  
           </lam:box>  
             
           <neb:Block> if ($item eq "product") {</neb:Block>  
659    
660            <lam:box lam:boxtype="h">          <!-- plan de cuentas -->
             <neb:Sub neb:src="inlineSearch.nebc" label="Clasificación"  
               table="product_classification" target_field="product.product_classification" target_block="productBlock"  
               use_code="0" object_select_form="productClassificationSelect.gfd"/>  
             <lam:box width="1"/>  
           </lam:box>  
           
           <!--lam:box lam:boxtype="h"/>  
             <lam:box width="1"/>  
             <label text="Ubicación:"/>  
             <lam:box width="1"/>  
           </lam:box>  
           <lam:box lam:boxtype="h"/>  
             <lam:box width="1"/>  
             <entry name="physical_structureIdEntry" field="_product_data.location" hidden="y"/>  
             <lam:box width="1"/>  
             <entry name="physical_structureNameEntry"  
               x="2" y="6" width="40"/>  
             <button name="searchLocationButton" label="Buscar" trigger="searchLocationTrigger"  
               x="42" y="6" width="10" height="1">  
               <trigger name="searchLocationTrigger" type="NAMED">  
                 # aca deberia haber algo parecido a lo que hay en los otros trigger similares.  
                 self.genericBox('No implementado', ['Aceptar']);  
               </trigger>  
             </button>  
             <button x="53" y="6" name="physical_structureButton"  
               label="..." width="5" height="1" trigger="physical_structureTrigger">  
               <trigger type="NAMED" name="physical_structureTrigger">  
                 self.genericBox('No implementado', ['Aceptar']);  
               </trigger>  
             </button-->  
661    
662            <lam:box lam:boxtype="h">
663              <neb:Sub neb:src="accountPlanSearch.nebc" label="Cuenta contable"
664                target_field="product.account_plan" target_block="itemizableBlock" account="neb:$account_plan"/>
665              <lam:box width="1"/>
666            </lam:box>
667    
668            <neb:Block> if ($item eq "product") {</neb:Block>
669            <!-- pais de origen  -->
670            <lam:box lam:boxtype="h">
671              <neb:Sub neb:src="inlineSearch.nebc" label="País de Origen"
672                table="country" target_field="product.country" target_block="itemizableBlock"
673                code_field="iso3" code_width="4"/>
674              <lam:box width="1"/>
675            </lam:box>
676            <!-- clasificación -->
677            <lam:box lam:boxtype="h">
678              <neb:Sub neb:src="inlineSearch.nebc" label="Clasificación"
679                table="product_classification" target_field="product.product_classification" target_block="itemizableBlock"
680                use_code="0" object_select_form="productClassificationSelect.gfd"/>
681              <lam:box width="1"/>
682            </lam:box>
683            <neb:Block>}</neb:Block>
684          </block>  
685          <!--lam:box lam:boxtype="h"/>
686          <lam:box width="1"/>
687          <label text="Ubicación:"/>
688          <lam:box width="1"/>
689        </lam:box>
690          <lam:box lam:boxtype="h"/>
691          <lam:box width="1"/>
692          <entry name="physical_structureIdEntry" field="_product_data.location" hidden="y"/>
693          <lam:box width="1"/>
694          <entry name="physical_structureNameEntry"
695          x="2" y="6" width="40"/>
696          <button name="searchLocationButton" label="Buscar" trigger="searchLocationTrigger"
697          x="42" y="6" width="10" height="1">
698          <trigger name="searchLocationTrigger" type="NAMED">
699          # aca deberia haber algo parecido a lo que hay en los otros trigger similares.
700          self.genericBox('No implementado', ['Aceptar']);
701          </trigger>
702          </button>
703          <button x="53" y="6" name="physical_structureButton"
704          label="..." width="5" height="1" trigger="physical_structureTrigger">
705          <trigger type="NAMED" name="physical_structureTrigger">
706          self.genericBox('No implementado', ['Aceptar']);
707          </trigger>
708          </button-->
709          <neb:Block> if ($item eq "product") {</neb:Block>
710              
711            <!-- precio -->
712            <lam:box lam:boxtype="h">
713              <lam:box>
714            <lam:box lam:boxtype="h">            <lam:box lam:boxtype="h">
715              <neb:Sub neb:src="inlineSearch.nebc" label="País de Origen"              <label text="Precio unitario base"/>
               table="country" target_field="product.country" target_block="productBlock"  
               code_field="iso3" code_width="4"/>  
             <lam:box width="1"/>  
716            </lam:box>            </lam:box>
   
           <!-- precio -->  
717            <lam:box lam:boxtype="h">            <lam:box lam:boxtype="h">
718              <lam:box>              <block name="itemizablePriceBlock" datasource="itemizablePriceDataSource" restrictInsert="y">
719                <lam:box lam:boxtype="h">                <entry name="priceTypeEntry" field="_price_data.price_type" hidden="y"/>
720                  <label text="Precio unitario base"/>                <entry name="priceEntry" field="_price_data.unit_price"/>
721                </lam:box>                <lam:box width="1"/>
722                <lam:box lam:boxtype="h">                <label text="Moneda"/>
723                  <entry name="priceEntry" field="_price_data.unit_price"/>                <entry name="exludedEntry" field="_price_data.excluded" hidden="y" default="0"/>
724                  <lam:box width="1"/>                <entry name="currencyTypeIdEntry" field="_price_data.currency_type" style="dropdown"
725                  <label text="Moneda"/>                  foreign_key="currencyDataSource._table" foreign_key_description="name"
726                  <entry name="currencyTypeIdEntry" field="_price_data.currency_type" style="dropdown"                  default="1"/>
727                    foreign_key="currencyDataSource._table" foreign_key_description="name"              </block>
                   default="1"/>  
               </lam:box>  
             </lam:box>  
             <lam:box width="1"/>  
             <lam:box>  
               <lam:box lam:boxtype="h">  
                 <label text="% IVA"/>  
               </lam:box>  
               <lam:box lam:boxtype="h">  
                 <entry name="productVATEntry" field="_product_tax_data.amount" default="21"  
                   width="10"/>  
               </lam:box>  
               <lam:box lam:boxtype="h">  
                 <entry name="productTaxEntry" field="_product_tax_data.tax" hidden="y"/>  
               </lam:box>  
             </lam:box>  
728            </lam:box>            </lam:box>
729            <neb:Block>}</neb:Block>          </lam:box>
730            <neb:Block>}</neb:Block>
731  <!--         <label x="1" y="13" text="Nivel mínimo"/> -->          <!-- impuestos -->
732  <!--         <entry x="1" y="14" hidden="y" name="levelEntry" field="_product_store_data.level"/> -->          <neb:Block> if ($tax) {</neb:Block>
733  <!--         <entry x="1" y="14" name="lowaterEntry" -->          <lam:box width="1"/>
734  <!--         field="_product_store_data.lowater" width="12"/> -->          <lam:box>
 <!--         <label x="30" y="13" text="Nivel máximo"/> -->  
 <!--         <entry x="30" y="14" name="hiwaterEntry" -->  
 <!--         field="_product_store_data.hiwater" width="12" /> -->  
           <lam:box height="3"/>  
735            <lam:box lam:boxtype="h">            <lam:box lam:boxtype="h">
736              <button label="Aceptar" trigger="productCommitTrigger"/>              <label text="% IVA"/>
             <lam:box width="1"/>  
             <button label="Borrar" trigger="productDeleteTrigger"/>  
             <lam:box width="1"/>  
             <button label="Cancelar" trigger="productRollbackTrigger"/>  
737            </lam:box>            </lam:box>
738            <lam:box height="1"/>            <block name="itemizableTaxBlock" datasource="itemizableTaxDataSource" restrictInsert="y">
739          </block>              <lam:box lam:boxtype="h">
740                  <entry name="productVATEntry" field="_product_tax_data.amount" default="21"
741                    width="10"/>
742                </lam:box>
743                <lam:box lam:boxtype="h">
744                  <entry name="productTaxEntry" field="_product_tax_data.tax" hidden="y"/>
745                </lam:box>
746              </block>
747            </lam:box>
748            <neb:Block>}</neb:Block>
749            <neb:Block> if ($item eq "product") {</neb:Block>
750        </lam:box>        </lam:box>
751      </box>        <neb:Block>}</neb:Block>
752          
753          <!--         <label x="1" y="13" text="Nivel mínimo"/> -->
754          <!--         <entry x="1" y="14" hidden="y" name="levelEntry" field="_product_store_data.level"/> -->
755          <!--         <entry x="1" y="14" name="lowaterEntry" -->
756          <!--         field="_product_store_data.lowater" width="12"/> -->
757          <!--         <label x="30" y="13" text="Nivel máximo"/> -->
758          <!--         <entry x="30" y="14" name="hiwaterEntry" -->
759          <!--         field="_product_store_data.hiwater" width="12" /> -->
760          <lam:box height="3"/>
761          <lam:box lam:boxtype="h">
762            <button label="Aceptar" trigger="productCommitTrigger"/>
763            <lam:box width="1"/>
764            <button label="Borrar" trigger="productDeleteTrigger"/>
765            <lam:box width="1"/>
766            <button label="Cancelar" trigger="productRollbackTrigger"/>
767          </lam:box>
768          <lam:box height="1"/>
769        </lam:box>
770      </box>
771    </page>    </page>
772    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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