diff --git a/addons/purchase_requisition/__init__.py b/addons/purchase_requisition/__init__.py index ea44f749bbf..0c1aab5b6e7 100644 --- a/addons/purchase_requisition/__init__.py +++ b/addons/purchase_requisition/__init__.py @@ -20,5 +20,6 @@ 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 e8811499a9f..75211b76423 100644 --- a/addons/purchase_requisition/__openerp__.py +++ b/addons/purchase_requisition/__openerp__.py @@ -33,6 +33,7 @@ "demo_xml" : [], "update_xml" : ["wizard/purchase_requisition_partner_view.xml", "purchase_requisition_view.xml", + "purchase_requisition_report.xml", "security/ir.model.access.csv","purchase_requisition_sequence.xml" ], "active": False, diff --git a/addons/purchase_requisition/purchase_requisition_report.xml b/addons/purchase_requisition/purchase_requisition_report.xml new file mode 100644 index 00000000000..97d510fe752 --- /dev/null +++ b/addons/purchase_requisition/purchase_requisition_report.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/addons/purchase_requisition/report/__init__.py b/addons/purchase_requisition/report/__init__.py new file mode 100644 index 00000000000..a2d5684cd1d --- /dev/null +++ b/addons/purchase_requisition/report/__init__.py @@ -0,0 +1,24 @@ +# -*- 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 new file mode 100644 index 00000000000..95f1dd47d31 --- /dev/null +++ b/addons/purchase_requisition/report/purchase_requisition.rml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[ repeatIn(objects,'requisition') ]] + Purchase for Requisitions [[ requisition.name ]] + + + + + + + Requisition Reference + + + Requisition Date + + + Type + + + Origin + + + + + [[ requisition.name ]] + + + [[ requisition.date_start ]] + + + [[ requisition.exclusive=='multiple' and 'Multiple Requisitions' or requisition.exclusive=='exclusive' and 'Purchase Requisitions (exclusive)' ]] + + + [[ requisition.origin ]] + + + + + + + + + +
+ Product Detail + [[ requisition.line_ids or removeParentNode('section') ]] + + + Description + + + Qty + + + Product UoM + + + [[ repeatIn(requisition.line_ids,'line_ids') ]] + + [[ line_ids.product_id.name ]] + + + [[ line_ids.product_qty ]] + + + [[ line_ids.product_uom_id.category_id.name ]] + + + +
+ + + + + + +
+ Quotation Detail + [[ requisition.purchase_ids or removeParentNode('section') ]] + + + Order Reference + + + Date Ordered + + + Supplier + + + [[ repeatIn(requisition.purchase_ids,'purchase_ids') ]] + + [[ purchase_ids.name ]] + + + [[ purchase_ids.date_order ]] + + + [[ purchase_ids.partner_address_id.partner_id.name ]] + + + +
+ + + + + + +
+
\ No newline at end of file diff --git a/addons/purchase_requisition/report/requisition.py b/addons/purchase_requisition/report/requisition.py new file mode 100644 index 00000000000..4e3f3dd93a3 --- /dev/null +++ b/addons/purchase_requisition/report/requisition.py @@ -0,0 +1,37 @@ +# -*- 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 report import report_sxw +from osv import osv +import pooler + +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: +