1

Is there a way to export the products to a csv file using a scheduler? I tried the csv python package discussed in this link: ( The best way to export openerp data to csv file using python ) but it seems I miss something.

I take advantage of the export_data as stated and I point my scheduler to that method but when I run it, nothing happen so I don't know if it runs or not but the scheduler keeps running.

Thanks for replies.

4

1 回答 1

0

我不是 OpenERP(或 Odoo)专家。以我目前对 Odoo 的了解,我将通过ERPpeek沿着以下路线开始

erppeek [YOUR OPENERP DETAILS]
>>> l = model('product.product').browse([])
>>> import csv
>>> with open('test.csv', 'w') as fp:
    a = csv.writer(fp, delimiter=',')
    for prod in l: a.writerow(prod.read().values())

我会进一步将其构建成脚本,然后将脚本放入 cron 中。

不过,可能有更好、更标准的 Odoo 方式。

于 2014-08-12T22:49:36.370 回答