diff --git a/addons/purchase/views/report_purchasequotation.xml b/addons/purchase/views/report_purchasequotation.xml index 7a3ad9c9b3e..1a07da64dfc 100644 --- a/addons/purchase/views/report_purchasequotation.xml +++ b/addons/purchase/views/report_purchasequotation.xml @@ -8,7 +8,7 @@
-
+
Shipping address :
@@ -36,7 +36,7 @@ Description Expected Date - Qty + Qty @@ -67,4 +67,4 @@ - \ No newline at end of file + diff --git a/addons/purchase_requisition/__init__.py b/addons/purchase_requisition/__init__.py index 0c1aab5b6e7..587ce369afb 100644 --- a/addons/purchase_requisition/__init__.py +++ b/addons/purchase_requisition/__init__.py @@ -20,6 +20,4 @@ import purchase_requisition import wizard -import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/purchase_requisition/__openerp__.py b/addons/purchase_requisition/__openerp__.py index 3f5fce3e8cc..483ea4a0d56 100644 --- a/addons/purchase_requisition/__openerp__.py +++ b/addons/purchase_requisition/__openerp__.py @@ -39,7 +39,9 @@ keep track and order all your purchase orders. 'purchase_requisition_data.xml', 'purchase_requisition_view.xml', 'purchase_requisition_report.xml', - 'security/ir.model.access.csv','purchase_requisition_sequence.xml' + 'security/ir.model.access.csv','purchase_requisition_sequence.xml', + + 'views/report_purchaserequisition.xml', ], 'auto_install': False, 'test': [ diff --git a/addons/purchase_requisition/purchase_requisition_report.xml b/addons/purchase_requisition/purchase_requisition_report.xml index 97d510fe752..64cbc1e7ea1 100644 --- a/addons/purchase_requisition/purchase_requisition_report.xml +++ b/addons/purchase_requisition/purchase_requisition_report.xml @@ -1,6 +1,13 @@ - + diff --git a/addons/purchase_requisition/report/__init__.py b/addons/purchase_requisition/report/__init__.py deleted file mode 100644 index a2d5684cd1d..00000000000 --- a/addons/purchase_requisition/report/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -import requisition - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/purchase_requisition/report/purchase_requisition.rml b/addons/purchase_requisition/report/purchase_requisition.rml deleted file mode 100644 index 95c5d19ba31..00000000000 --- a/addons/purchase_requisition/report/purchase_requisition.rml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Description [[ requisition.line_ids==[] and removeParentNode('blockTable') ]] - - - Qty - - - Product UoM - - - - - [[ repeatIn(objects,'requisition') ]] - - - - Purchase for Requisitions [[ requisition.name ]] - - - - - - - Requisition Reference - - - Requisition Date - - - Type - - - Source - - - - - - - [[ requisition.name ]] - - - [[ formatLang(requisition.date_start,date_time='True') ]] - - - [[ requisition.exclusive=='multiple' and 'Multiple Requisitions' or requisition.exclusive=='exclusive' and 'Purchase Requisitions (exclusive)' ]] - - - [[ requisition.origin ]] - - - - - - - Product Detail [[ requisition.line_ids==[] and removeParentNode('para') ]] - - - - Description [[ requisition.line_ids==[] and removeParentNode('blockTable') ]] - - - Qty - - - Product UoM - - - -
- [[ requisition.line_ids==[] and removeParentNode('section') ]] [[ repeatIn(requisition.line_ids,'line_ids') ]] - - - - [ [[ (line_ids.product_id and line_ids.product_id.code) or '' ]] ] [[ (line_ids.product_id and line_ids.product_id.name) or '' ]] - - - [[ formatLang(line_ids.product_qty) ]] - - - [[ (line_ids.product_uom_id and line_ids.product_uom_id.category_id and line_ids.product_uom_id.category_id.name) or '' ]] - - - -
- - - - Quotation Detail [[ requisition.purchase_ids ==[] and removeParentNode('para') ]] - - - - Supplier [[ requisition.purchase_ids ==[] and removeParentNode('blockTable') ]] - - - Date Ordered - - - Order Reference - - - -
- [[ requisition.purchase_ids ==[] and removeParentNode('section') ]] [[ repeatIn(requisition.purchase_ids,'purchase_ids') ]] - - - - [[ (purchase_ids.partner_id and purchase_ids.partner_id.name) or '' ]] - - - [[ formatLang(purchase_ids.date_order,date='True') ]] - - - [[ purchase_ids.name ]] - - - -
-
-
-
\ No newline at end of file diff --git a/addons/purchase_requisition/report/requisition.py b/addons/purchase_requisition/report/requisition.py deleted file mode 100644 index d7d38f2114e..00000000000 --- a/addons/purchase_requisition/report/requisition.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import time -from openerp.report import report_sxw - -class requisition(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(requisition, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - 'time': time, - }) - -report_sxw.report_sxw('report.purchase.requisition','purchase.requisition','addons/purchase_requisition/report/purchase_requisition.rml',parser=requisition) - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml index ffea3c2a8ce..579febe64ea 100644 --- a/addons/purchase_requisition/test/purchase_requisition.yml +++ b/addons/purchase_requisition/test/purchase_requisition.yml @@ -84,13 +84,3 @@ !python {model: purchase.requisition}: | requisition = self.browse(cr, uid, ref('requisition1'), context=context) requisition.state == 'done', "Requisition should be closed." -- - I print a Requisition report -- - !python {model: purchase.requisition}: | - import os - import openerp.report - from openerp import tools - data, format = openerp.report.render_report(cr, uid, [ref('purchase_requisition.requisition1')], 'purchase.requisition', {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition-purchase_requisition_report.'+format), 'wb+').write(data) diff --git a/addons/purchase_requisition/views/report_purchaserequisition.xml b/addons/purchase_requisition/views/report_purchaserequisition.xml new file mode 100644 index 00000000000..077772c8543 --- /dev/null +++ b/addons/purchase_requisition/views/report_purchaserequisition.xml @@ -0,0 +1,97 @@ + + + + + +