Monday, 15 April 2013

Example of xmlrpc and openerp


How to work with xmlrpc and OpenERP?

Here example of xmlrpc and openerp ....
save following file as xmlrpc.py

You can also create xmlrpc for the use of import or export data. Or you can also create a new records also.

Example : 
import xmlrpclib
username = 'admin'
password = 'a'
database = 'test_60A'
sock_comm = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/common')
uid = sock_comm.login(database,username,password)
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
print "connection success full"
ids = sock.execute(database,uid, password,'res.company', 'search', [])
print "list of ids",ids
#ids will contain ids of company A and B
sock.execute(database,uid, password, 'res.company', 'write', ids, {'rml_header1': 'hop'})


start server and run file $  python xmlrpc.py

With workflow(invoice validate) :
sock.exec_workflow (dbname, 1, pwd, 'account.invoice', 'invoice_open', inv_id)


Here a example of connect with server and fetch list of ids of company and just call write operation you can do
the operation which needed..


..Enjoy..

Wednesday, 10 April 2013

How to apply patch in OpenERP ?



How to apply patch in OpenERP ?


Hello All, I think most of all of you guys in search of "How to apply Patch? Or What is patch?", yes, if you are developer than you know but if you are not a developer than its creates problem about to patch.

Here i try to describe some of steps or trick to apply patch, how it will be helpful to you all.

What is patch ?

Simply, patch is piece of some bug(error) fixing or some improvements of existing system.In another way patch means you are using any software and there is any error or need to improve or something else you want to do with existing system than obisiously you are trying such a thing in temperory source and if its work fine than you have to change in main code

For Apply :

1. If you use Ubuntu (Mind blowing Open Source) than its easy to apply patch.
 From command prompt follow the command :

 Go to particular directory and just apply patch
    > patch -p1 < ~/Desktop/xxx.patch

Or if you are using the Eclipse

2. If you are using Eclipse than also its, became easy to apply patch.
For that right click on addons folder then click on "Team" and select apply patch you will get the wizard to apply the patch.

                          ..Enjoy..


View Larger Map

Wednesday, 13 March 2013

Full Configuration of Warehouse in OpenERP

                                                                                                 Pinakin Nayi
                                                                                                 OpenERP, Gandhinagar, India.

Full Configuration of Warehouse system in OpenERP

Hello All,


 I hope you all are about to search "Full Configuration of Warehouse in specific OpenERP" , I just try to explain the steps which will may be helpful to you all to configure your system or make it suitable for warehousing. Enjoy its.

Here I have tried to explain certain steps that all are may be useful to you.

1. Create two warehouse user. (off1,off2)

2. Create warehouses (A and b) within same company

3. Set the responsible :
      - Off1 is responsible for warehouse A
      - Off2 is responsible for warehouse B

4. Create separate shops for warehouse :
      Shops (under Sales > Configuration > Sales > Shop):
                - Shop WH A (warehouse: Warehouse A)
                - Shop WH B (warehouse: Warehouse B)

5. Create Location separate for warehouse :
     - WH A (view location)
              -- Output (internal location; chained to Customer: Stock Journal WH A Delivery Orders)
              -- Stock (internal location)
     - WH B (view location)
              -- Output (internal location; chained to Customer: Stock Journal WH B Delivery Orders)
              -- Stock (internal location)


Stock Journals:
- WH A Delivery Orders (responsible: off1)
- WH B Delivery Orders (responsible: off2)

Tips : When you create sale order than set particular shop for proper output.

Shortly i update Warehouse Configuration with full video...
..Thanks..

Sunday, 17 February 2013

Purchase Requisition with OpenERP 7

                                                                                                     Pinakin Nayi
                                                                                                     OpenERP, Gandhinagar, India.

"Purchase Requisition" Full flow in OpenERP.

Here are steps for "Purchase Requisition" in OpenERP 7.0.

1 ) Install Purchase Requisition

2 ) Create Product
           - Make sure product is Purchased
           - Tick on Purchase Requisition (Product > Procurement Tab)
           - Add Supplier for Product

3 ) Create Sale order (Go to Sales, select that product)

4 ) Confirm Sale order

5 ) Go To Warehouse > Schedulers > Procurement Exception See that procurement

6 ) Run Schedulers

7 ) Go To Procurement Exception see "Latest Requisition" is there.

8 ) go To purchase requisition  > Add quotation > Select any one from and confirm it

9 ) Go to Purchase order , you can see the purchase order

Here i have created video that may be useful to you all.

                                                 "Purchase Requisition"

Thursday, 3 January 2013

How to extend local storage ?


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

How to extend local storage ?

Hello Friends ,

  If you all are using OpenERP POS than there may be you face error like this ,



Ok this error came from local storage , because in OpenERP 7 POS module ,

we load all information related to POS in local storage for fast access and offline work.

Offline Work :

Why this needed ?
             Normally, if our server not responded or may be there are some problem to receiving any answer from server than we have need all info to store in local Database, So OpenERP Support for that and whenever server up(before closing) than it will automatically store or synchronized all orders.
           
  If your data more than 5MB in POS than it will creates problem to you because most of browsers support 5MB local storage. 

But if you are using Firefox than here a solution that will provide you facility to exceed local storage.


...Enjoy...

Monday, 24 December 2012

Use of lambda in OpenERP 7.0


                                                                                                                    Pinakin Nayi
                                                                                                                    OpenERP , Gandhinagar, India
                                                                                                                   
Different use of lambda in OpenERP 7.0
In OpenERP we are using a lambda function, here i described some of function that all are normally use, that may be useful to you also.
- Map your ids using lambda :
    ids = map(lambda x: x[0], self.cr.fetchall())

- Get date using lambda
    'date2': lambda *a: time.strftime('%Y-%m-%d')
   
- Get Company id using lambda
    'company_id': lambda self,cr,uid,c:    
    self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
   
- Get user id using lambda
    'user_id': lambda self, cr, uid, context=None: uid,
   
- Get start and end date using lambda
    'date_start': lambda *a: time.strftime('%Y-01-01'),
    'date_stop': lambda *a: time.strftime('%Y-12-31'),
   
- Get Currency id using lambda
    'currency_id': lambda self,cr,uid,c:self.pool.get('res.users').browse(cr, uid, uid,
c).company_id.currency_id.id,
   
- Get month and year using lambda
    'month': lambda *a: time.gmtime()[1],
    'year': lambda *a: time.gmtime()[0],
   
    'month': lambda *a: datetime.date.today().month,
    'year': lambda *a: datetime.date.today().year,

...Enjoy...

Wednesday, 12 December 2012

Celebrate 12/12/12 12:12:12

I just passed the moment in OpenERP, Gandhinagar. So, i am so excite to share with all of you.
Just about to celebrate 12/12/12 12:12:12

Celebrating 12/12/12 12:12:12 with OpenERP..