Odoo Help


export data using python for delivery order

on 2/10/14, 10:12 PM 1,350 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"   
_description="Export Data"   
>      '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()

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


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