[FIX] revert to v7 report API
bzr revid: ls@numerigraphe.com-20140404095202-wwegxz9qp00o8yuw
This commit is contained in:
parent
96beccc05a
commit
90ddb9f897
|
@ -7,50 +7,40 @@
|
|||
I print a stock overview report of location.
|
||||
-
|
||||
!python {model: stock.location}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('location_monitor')], 'lot.stock.overview', {}, {})
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('location_monitor')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data)
|
||||
-
|
||||
I print a Stock Overview report of location with child location.
|
||||
-
|
||||
!python {model: stock.location}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('location_monitor')], 'lot.stock.overview_all', {}, {})
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('location_monitor')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data)
|
||||
-
|
||||
I print a Stock Inventory report.
|
||||
-
|
||||
!python {model: stock.inventory}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('stock_inventory_0')], 'stock.inventory.move', {}, {})
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock_inventory_0')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data)
|
||||
-
|
||||
I print a outgoing shipment report.
|
||||
-
|
||||
!python {model: stock.picking}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('outgoing_shipment')], 'stock.picking.list', {}, {})
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('outgoing_shipment')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data)
|
||||
-
|
||||
I print stock Report.
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('product_product_6')], 'stock.product.history', {}, {})
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product_product_6')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue