Wednesday 2 May 2012

Indian Culture


Computer Science All Books



All Books for Computer Science Student .
I hope this will helpful to you....

TCP MultiChat Application


National Symbols of India

Monday 23 April 2012

OpenERP Barcode Generate

Use Barcode in OpenERP report.

paste the folowing code in .rml file instead of barcode
<barCode code="code128" quiet="9" fontName="Times-Roman" fontSize="50" alignment="CENTER"> [[ tracking_ids.serial or '' ]] </barCode>

Friday 20 April 2012

How to create Scheduler in OpenERP

How to create Scheduler in  OpenERP . ( ir.cron )
                                                                                                        Nayi Pinakin
                                                                                                        Trainee OpenERP ,
                                                                                                        Gandhinagar . (Jan 2012 )
                                                                                                        nayi_pinakin@yahoo.in
Here are Steps you have to follow :

Step 1 :
          In view file simply write as under
          <record model="ir.cron" id="resource_panelty_cron">
            <field name="name">Resource Panelty Count</field>
            <field name="interval_number">1</field>
            <field name="interval_type">minute</field>
            <field name="numbercall">-1</field>
            <field eval="False" name="doall"/>
            <field eval="'lib.register'" name="model"/>
            <field eval="'compute_penalty'" name="function"/>  # call the function in .py file
            <field eval="'()'" name="args"/>
        </record>

Step 2 :
        you can also directly create your Scheduler :
         like ,
         1.       First you simply go setting - > configuration -> scheduler -> scheduler_action



      2.  Now create new Scheduler  here interval number and interval unit important



   3.  Now , in object simply write your table name and in Method write your .py file method 
        which you want to call at every repeated time.


       

 Description : 


"scheduler_id" : is a unique xml record id
"scheduler_name" : any desirable name
"active" :  True or False determines whether the scheduler is active or not..
"user_id" : refers the user who owns the scheduler
"interval_number" : number of times the scheduler is to be called based on the "interval_type"

"interval_type" 
: it can be days, hours, minututes etc
"numbercall" : Number of time the function is called. negative number indicates no limit
"doall" : booelan field. A 'True' enables it to execute missed occurences as soon as the server is restarts

 "model" : Name of object whose function will be called when this scheduler will run. e.g. 'res.partener'
"function" : Name of the method to be called on the object when this scheduler is executed.
 "args" : Arguments to be passed to the method. e.g. (uid,)

 
        

Thursday 19 April 2012

How to Add custom Widget in your open ERP module

How to Add custom Widget in your open ERP module ..
 Here are steps : 
                                                        By : Pinakin Nayi
                                                               Trainee OpenERP,
                                                               Gandhinagar.
                                                               E-mail : nayi_pinakin@yahoo.in
Step 1 :
          create a folder
                   --> static
                            --> src
                                   -->js
                                        ->lib.js
                                  --> xml
                                        -> lib.xml
                                  --> css
                                        -> .css

Step 2 :
          Register your xml file in __openerp__.py
          Like this
                      'css': [ 'static/src/css/resource.css' ],
                      'js': [  'static/src/js/lib.js' ],
                       'qweb' : [ 'static/src/xml/lib.xml', ],

Step 3 : 
        In  "lib.xml"  create your template
           like ,
                    <templates id="template" xml:space="preserve">
                     <t t-name="link">
                      <div>manage your template  </div>
                    </t>
                  </templates>

Step 4 :
      In  "lib.js"  create your template
           like ,

                      openerp.lib = function(instance)
                     {
                       console.log('tTTT',instance)
                       instance.web.form.widgets.add('link', 'openerp.lib.Mywidget');
                       instance.lib.Mywidget = instance.web.form.Widget.extend( {
                              template : 'link',
                              init : function(arg)
                                             {
                              console.log('initi....my custome widget');
                              }
                      })
                  }

Step 5 : 
       In this test i have only write "manage your template" instread of that you can
      write your own template to implement ..

Step 6 : 
         Now , your Widget is ready ,
         you have to implement this in your tag.

        <field name="description" colspan="4" widget="link" />