Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

export data using python for delivery order

By
kim
on 2/10/14, 10:12 PM 897 views

Dear all,

i want to get the delivery order data and write into the file, it is my code is correct?

 from openerp import tools from
> openerp.osv import fields, osv
> 
> class export_data(osv.osv):   
> _name="export.data"   
 _inherit="stock.picking"    
_description="Export Data"   
 _columns={
>      'name' : fields.many2one('stock.picking.out.name','Name')
> }    
>     def name(self):
>    return fields.many2one('stock.picking.out.name','Name')
> 
> 
> export = export_data()
> 
> filedirectory =
> "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130418_232503-py2.7.egg/openerp/addons/new_export_data/export/test.txt"

> f = open(filedirectory ,"w+")

> f.write(export.name()) 

> f.close()

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/10/14, 10:12 PM
Seen: 897 times
Last updated: 3/16/15, 8:10 AM