Sunday 19 August 2012

How to convert rst2html?


                                                                                                    Pinakin Nayi
                                                                                                    OpenERP, Info-city,
                                                                                                    Gandhinagar.
                                                                                                    (nayi.pinakin@gmail.com)

How to convert rst2html??
 Here are code that may be useful to you.
 Before that install python-docutils

Step : 1 
     Import library
                 from docutils.core import publish_string
     
 Step : 2
     overides :  that is overide the default setting.
                 embed_stylesheet : that is true/false that make to use default stylesheet or not
                 doctitle_xform   : Enable or disable the promotion of a lone top-level section
                                    title to document title (and subsequent section title to
                                    document subtitle promotion;
                                    docutils.transforms.frontmatter.DocTitle).
                 stylesheet_path='./css/voidspace.css', you can set external style sheet

   Examples :
         overrides = dict(embed_stylesheet= False, doctitle_xform= False)
         output = publish_string(source= desc, writer_name= 'html', settings_overrides= overrides)

Html rst tags : 
      put Video in rst :
            
    .. raw:: html

    <div style="margin-top:10px;">
      <iframe src="http://www.slideshare.net/slideshow/embed_code/7804331" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/openobject/openerp-crm-marketing-screencast" title="OpenERP CRM &amp; Marketing Screencast" target="_blank">OpenERP CRM &amp; Marketing Screencast</a> </strong> from <strong><a href="http://www.slideshare.net/openobject" target="_blank">OpenERP.tv</a></strong> </div>
    </div>
      http://docutils.sourceforge.net/docs/user/rst/quickref.html

You can also refer documentation :

And you can also use Online Demo

How to look like : 
 before : 
      
    
  After : (apply rst2html)
   
     


..Enjoy...

Monday 30 July 2012

HTML in OpenERP

                                                                                                                           Pinakin Nayi
                                                                                                                           OpenERP Gandhinagar.
     
Hello Friends ,

   You all are going to search how to use <html> in OpenERP .xml file here is solution that may be useful to you.

In this example i am just changing description of module in html.. (account ,module)
account/data/account_data.xml

<record id="base.module_account" model="ir.module.module">
            <field name="description"><![CDATA[
                <h2><u>Accounting and Financial Management.</u></h2>
                    This applies to the modules containing modulename_process.xml.
                    <ul>
                        <li>General Accounting</ol>
                        <li>Cost/Analytic accounting</ol>
                        <li>Third party accounting</ol>
                        <li>Taxes management</ol>
                        <li>Budgets</ol>
                        <li>Customer and Supplier Invoices</ol>
                        <li>Bank statements</ol>
                        <li>Reconciliation process by partner</ol>
                    </ul>
                    Creates a dashboard for accountants that includes:
                    <ul>
                        <li>List of Customer Invoice to Approve</ol>
                        <li>Company Analysis</ol>
                        <li>Graph of Treasury</ol>
                    </ul>
                    <p>The processes like maintaining of general ledger is done through the defined financial Journals (entry move line orgrouping is maintained through journal) for a particular
financial year and for preparation of vouchers there is a module named account_voucher.</p>
         ]]></field>
         </record>

and server/trunk/openerp/addons/base/module/module_view.xml


<page string="Description">
                            <field name="description" widget="text_html"/>
                        </page>


...Enjoy...

Monday 23 July 2012

Deleted Records in OpenERP

                                                                                                                            Pinakin Nayi
                                                                                                                            OpenERP, Gandhinagar.
                                                                                                                            nayi.pinakin@gmail.com

Something you need to keep in mind is how OpenERP “deletes” its records. 

It does not physically remove them. 

It just marks them as deleted

And it does so with the active field in the table. 

This field, which happens to be a boolean field, if true indicates that the record is not deleted. 

Otherwise you should not take the record into account in your queries.

...Enjoy...

Friday 20 July 2012

Debugging your OpenERP module


                                                                                                                            Pinakin Nayi
                                                                                                                            OpenERP, Gandhinagar.
                                                                                                                            nayi.pinakin@gmail.com                

Debugging your OpenERP modules is quite straightforward, as long as you know basic Python programming. Just insert the following line in your
module:
import pdb;pdb.set_trace()
Then restart your openerp-server with the –debugoption
# openerp-server –debug
Then monitor your server console. You will see your server stop and show you a command line prompt where you will be able to debug your program.
You will find further information in the Python documentation website.

...Enjoy...

Tuesday 17 July 2012

Event Management Module

Hello Friends ,

         You all are going to search "Event Management Module" or "Event Management System" documentation or .ppt or Diagram for "EMM". I will provide you all this.

Mail me for getting documentation or .ppt. ( nayi.pinakin@gmail.com ).

Thanks,
Pinakin Nayi

...Enjoy...

Secure your ubuntu


                                                                                                                          Pinakin Nayi
                                                                                                                          OpenERP , Gandhinagar.
                                                                                                                          nayi.pinakin@gmail.com

Quick post of a script worth using. If your openerp-server is running on a Linux server, this server should be secured. Linux is a more secure server than Windows, but still is vulnerable to attacks. If you are new to the security field in Linux, there is a tool you should try, Bastille Unix. If you are using an
Ubuntu distribution, you can install this tool with the following command:
# sudo apt-get install bastille
After running the command bastille, you will see a wizard like window interface which will guide you through the different steps of hardening your system. These steps involve setting file permissions, disabling FTP,Firewall, Printing, disabling unnecesary services and accounts. Not only this is a very good tutorial on Linux security, but also a tool for hardening your system.
Be aware that your security obligations do not end here, this is just a very good first step.

Wednesday 11 July 2012

Graph Draw

                                                                                                        Pinakin Nayi
                                                                                                        OpenERP, Gandhinagar
                                                                                                        nayi.pinakin@gmail.com
                                                                                                        Mo. 08460643746

Hello Friends ,

You can use it, as per your requirement that will draw graph.

  You all are going to search a "How to draw Graph using java Script or Jquery".

I hope this will be helpful to you all.

Primarily just create with simple .html file.

Requirements :
                     sigma.min.js   you can download it from http://sigmajs.org/


<html>
<head>
            <script src="js/sigma.min.js"></script>
</head>
<body>
   <h1>Hello</h1>
   <div class="container">
        <div class="sigma-parent" id="sigma-example-parent">
                <p class="sigma-expand" id="sigma-example">
               </p>
       </div>
   </div>
    <script type="text/javascript">
var sigRoot = document.getElementById('sigma-example');
         var sigInst = sigma.init(sigRoot);
         node1 = {label: 'Hello', color: '#ff0000', size:5, x:1, y:3};
         node2 = {label: 'World', color: '#bb0000', size:10,x:2, y:2};
         sigInst.addNode('hello', node1);
        sigInst.addNode('world', node2);
        sigInst.addEdge('hello_world','hello','world', {size:2, label:"Hello World"});
        sigInst.draw();
        sigInst.drawingProperties({
                  defaultLabelColor: '#ccc',
                  font: 'Arial',
                  edgeColor: 'source',
                  defaultEdgeType: 'curve'
       })
       sigInst.graphProperties({
                  minNodeSize: 1,
                  maxNodeSize: 10
       });
   </script>

<style type="text/css">
  /* sigma.js context : */
  .sigma-parent {
    position: relative;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    height: 500px;
  }
  .sigma-expand {
    position: absolute;
    width: 30%;
    height: 100%;
    top: 0;
    left: 0;
  }
  .buttons-container{
    padding-bottom: 8px;
    padding-top: 12px;
  }
</style>

</body>
</html>

...Enjoy...