Diana Rodríguez Martínez has proposed merging lp:~dr.clearcorp/openerp-ccorp-addons/6.1-purchase_order_report into lp:openerp-ccorp-addons.
Requested reviews: CLEARCORP drivers (clearcorp-drivers) For more details, see: https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-purchase_order_report/+merge/134754 [ADD] New report for purchase report -- https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-purchase_order_report/+merge/134754 Your team CLEARCORP development team is subscribed to branch lp:openerp-ccorp-addons.
=== added directory 'purchase_order_ccorp_report' === added file 'purchase_order_ccorp_report/__init__.py' --- purchase_order_ccorp_report/__init__.py 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/__init__.py 2012-11-16 22:50:25 +0000 @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + +import report \ No newline at end of file === added file 'purchase_order_ccorp_report/__openerp__.py' --- purchase_order_ccorp_report/__openerp__.py 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/__openerp__.py 2012-11-16 22:50:25 +0000 @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## +{ + 'name': 'Purchase Order Report', + 'version': '1.0', + 'url': 'http://launchpad.net/openerp-ccorp-addons', + 'author': 'ClearCorp S.A.', + 'website': 'http://clearcorp.co.cr', + 'category': 'Purchase Management', + 'complexity': 'normal', + 'description': """This module modifies the purchase order Request for Quotation report """, + 'depends': [ + 'purchase', + ], + 'init_xml': [], + 'demo_xml': [], + 'update_xml': ['purchase_order_ccorp_report.xml',], + 'license': 'AGPL-3', + 'installable': True, + 'active': False, +} === added directory 'purchase_order_ccorp_report/i18n' === added file 'purchase_order_ccorp_report/i18n/es_CR.po' --- purchase_order_ccorp_report/i18n/es_CR.po 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/i18n/es_CR.po 2012-11-16 22:50:25 +0000 @@ -0,0 +1,124 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * purchase_order_ccorp_report +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-11-16 22:03+0000\n" +"PO-Revision-Date: 2012-11-16 22:03+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:67 +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:69 +msgid "[Code] Description / (Taxes)" +msgstr "[Código] Descripción / (Impuestos)" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:94 +msgid "Sub Total" +msgstr "Subtotal" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:27 +msgid "Validated by: " +msgstr "Validado por: " + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:96 +msgid "Total" +msgstr "Total" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:67 +msgid "Date Order" +msgstr "Fecha de la orden" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:39 +msgid "Delivery and Invoincing" +msgstr "Entrega y facturación" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:103 +msgid "Authorized by" +msgstr "Autorizado por" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:95 +msgid "Taxes" +msgstr "Impuestos" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:103 +msgid "Validated by" +msgstr "Validado por" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:24 +msgid "Order date: " +msgstr "Fecha de la orden: " + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:38 +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:16 +msgid "Quotation N°" +msgstr "Cotización N°" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:43 +msgid "Expected date: " +msgstr "Fecha esperada " + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:30 +msgid "Ref." +msgstr "Ref." + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:19 +msgid "Order N°" +msgstr "Orden N°" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:69 +msgid "Date planned" +msgstr "Date planned" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:67 +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:69 +msgid "Qty" +msgstr "Cant" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:47 +msgid "Date approved: " +msgstr "Fecha de aprobación: " + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:33 +msgid "Email" +msgstr "Correo electrónico" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:69 +msgid "Total Price" +msgstr "Precio total" + +#. module: purchase_order_ccorp_report +#: report:addons/purchase_order_ccorp_report/report/purchase_order_report.mako:69 +msgid "Unit Price" +msgstr "Precio Unitario" + === added file 'purchase_order_ccorp_report/purchase_order_ccorp_report.xml' --- purchase_order_ccorp_report/purchase_order_ccorp_report.xml 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/purchase_order_ccorp_report.xml 2012-11-16 22:50:25 +0000 @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<openerp> + <data> + + <report auto="False" + id="purchase.report_purchase_order" + model="purchase.order" + name="purchase_order_report_inherit" + file="purchase_order_ccorp_report/report/purchase_order_report.mako" + string="Purchase Order" + report_type="webkit" /> + + </data> +</openerp> + === added directory 'purchase_order_ccorp_report/report' === added file 'purchase_order_ccorp_report/report/__init__.py' --- purchase_order_ccorp_report/report/__init__.py 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/report/__init__.py 2012-11-16 22:50:25 +0000 @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + +import purchase_order_report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'purchase_order_ccorp_report/report/purchase_order_report.mako' --- purchase_order_ccorp_report/report/purchase_order_report.mako 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/report/purchase_order_report.mako 2012-11-16 22:50:25 +0000 @@ -0,0 +1,110 @@ +<html> +<head> + <style type="text/css"> + ${css} + </style> +</head> +<body class = "data"> + %for purchase_order in objects : + <% setLang(purchase_order.partner_id.lang) %> + <br></br> + <div id="wrapper"> + <table width = "100%" class = "document_data"> + <tr class = "title"> + <td class = "document_data"> + %if purchase_order.state =='draft' : + <span class="title">${_("Quotation N°")} ${purchase_order.name or ''|entity}</span><br/> + %endif + %if purchase_order.state != 'draft' : + <span class="title">${_("Order N°")} ${purchase_order.name or ''|entity}</span><br/> + %endif + </td> + </tr> + <tr> + <td>${_("Order date: ")}${(purchase_order.date_order and formatLang(purchase_order.date_order,date=True)) or '-'|entity} </td> + </tr> + <tr> + <td>${_("Validated by: ")}:${purchase_order.validator.name or ''|entity}</td> + </tr> + <tr> + <td>${_("Ref.")}: ${purchase_order.partner_ref != "" and purchase_order.partner_ref or '-'|entity}</td> + </tr> + <tr> + <td>${_("Email")}: ${purchase_order.partner_id.email or '-'|entity}</td> + <td> </td><td> </td> + </tr> + <tr class = "zone_break"><td> </td><td> </td></tr> + <tr class = "title"> + <td>${_("Purchase Order")}</td> + <td>${_("Delivery and Invoincing")}</td> + </tr> + <tr> + <td>${purchase_order.partner_id.name or ''}</td> + <td>${_("Expected date: ")}${(purchase_order.minimum_planned_date and formatLang(purchase_order.minimum_planned_date,date=True)) or ''}</td> + </tr> + <tr> + <td>${purchase_order.partner_address_id.street or ''}</td> + <td>${_("Date approved: ")}${(purchase_order.date_approve and formatLang(purchase_order.date_approve,date=True)) or ''}</td> + </tr> + + <tr> + %if purchase_order.partner_address_id.street2 != '': + <td>${purchase_order.partner_address_id.street2 or ''}</td> + %endif + <td>${purchase_order.dest_address_id.street or ''}</td> + </tr> + <tr> + <td>${(purchase_order.partner_address_id.zip and format(purchase_order.partner_address_id.zip) + ((purchase_order.partner_address_id.city or purchase_order.dest_address_id.state_id or purchase_order.dest_address_id.country_id) and ' ' or '') or '') + (purchase_order.partner_address_id.city and format(purchase_order.partner_address_id.city) or '')}</td> + <td>${purchase_order.dest_address_id.street2 or ''}</td> + </tr> + <tr> + <td>${(purchase_order.partner_address_id.state_id and format(purchase_order.partner_address_id.state_id.name) + (purchase_order.partner_address_id.country_id and ', ' or '') or '') + (purchase_order.partner_address_id.country_id and format(purchase_order.partner_address_id.country_id.name) or '')}</td> + <td>${(purchase_order.dest_address_id.state_id and format(purchase_order.dest_address_id.state_id.name) + (purchase_order.dest_address_id.country_id and ', ' or '') or '') + (purchase_order.dest_address_id.country_id and format(purchase_order.dest_address_id.country_id.name) or '')}</td> + </tr> + </table> + <table id="data-table" cellspacing="3"> + %if purchase_order.state =='draft': + <thead><th>${_("Qty")}</th><th>${_("[Code] Description / (Taxes)")}</th><th>${_("Date Order")}</th></thead> + %else: + <thead><th>${_("Qty")}</th><th>${_("[Code] Description / (Taxes)")}</th><th>${_("Date planned")}</th><th>${_("Unit Price")}</th><th>${_("Total Price")}</th></thead> + %endif + <tbody> + <%i = 0%> + %for line in purchase_order.order_line : + %if i% 2 == 0: + <tr class = "even"> + %else: + <tr class = "odd"> + %endif + <td valign = "top">${formatLang(line.product_qty)} ${format(line.product_uom.name)}</td> + <td valign = "top" id="desc_col">${line.name} ${line.taxes_id != [] and (' / (' + (', '.join([ lt.description for lt in line.taxes_id ])) + ')') or ''|entity}</td> + %if purchase_order.state =='draft': + <td valign = "top">${line.date_order}</td> + %else: + <td valign = "top">${line.date_planned}</td> + %endif + %if purchase_order.state !='draft': + <td valign = "top" style="text-align:right;">${purchase_order.pricelist_id.currency_id.symbol_prefix or ''|entity } ${formatLang(line.price_unit)} ${purchase_order.pricelist_id.currency_id.symbol_suffix or ''|entity }</td> + <td valign = "top" style="text-align:right;">${purchase_order.pricelist_id.currency_id.symbol_prefix or ''|entity } ${formatLang(line.price_subtotal)} ${purchase_order.pricelist_id.currency_id.symbol_suffix or ''|entity }</td> + %endif + </tr> + <%i +=1%> + %endfor + %if purchase_order.state != 'draft' : + <tr><td style="border-style:none"/><td style="border-style:none"/><td style="border-style:none"/><td style="border-top:2px solid"><b>${_("Sub Total")}:</b></td><td style="border-top:2px solid;text-align:right">${purchase_order.pricelist_id.currency_id.symbol_prefix or ''|entity} ${formatLang(purchase_order.amount_untaxed)} ${purchase_order.pricelist_id.currency_id.symbol_suffix or ''|entity}</td></tr> + <tr><td style="border-style:none"/><td style="border-style:none"/><td style="border-style:none"/><td style="border-style:none"><b>${_("Taxes")}:</b></td><td style="text-align:right">${purchase_order.pricelist_id.currency_id.symbol_prefix or ''|entity} ${formatLang(purchase_order.amount_tax)} ${purchase_order.pricelist_id.currency_id.symbol_suffix or ''|entity}</td></tr> + <tr><td style="border-style:none"/><td style="border-style:none"/><td style="border-style:none"/><td style="border-style:none"><b>${_("Total")}:</b></td><td style="text-align:right">${purchase_order.pricelist_id.currency_id.symbol_prefix or ''|entity} ${formatLang(purchase_order.amount_total)} ${purchase_order.pricelist_id.currency_id.symbol_suffix or ''|entity}</td></tr> + %endif + </tbody> + </table> + <br> + <br> + <table id="responsibles_table"> + <tr><td style="border-top:1px solid"><b>${_("Validated by")}:</b> ${purchase_order.validator.name}</td><td style="border-style:none"/><td style="border-top:1px solid"><b>${_("Authorized by")}:_________________</b></td></tr> + <!--<tr><td style="border-style:none"> ${company.sale_order_footer}</td><td style="border-style:none"/></tr>--> + </table> + </div> + <p style="page-break-after:always"></p> +%endfor +</body> +</html> === added file 'purchase_order_ccorp_report/report/purchase_order_report.py' --- purchase_order_ccorp_report/report/purchase_order_report.py 1970-01-01 00:00:00 +0000 +++ purchase_order_ccorp_report/report/purchase_order_report.py 2012-11-16 22:50:25 +0000 @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Addons modules by CLEARCORP S.A. +# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). +# +# 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + +import time +import pooler +from report import report_sxw +import locale + +class purchase_order_report(report_sxw.rml_parse): + def __init__(self, cr, uid, name, context): + super(purchase_order_report, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + 'time': time, + }) + +#the parameters are the report name and module name +report_sxw.report_sxw('report.purchase_order_report_inherit', + 'purchase.order', + 'addons/purchase_order_ccorp_report/report/purchase_order_report.mako', + parser=purchase_order_report) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_______________________________________________ Mailing list: https://launchpad.net/~clearcorp Post to : [email protected] Unsubscribe : https://launchpad.net/~clearcorp More help : https://help.launchpad.net/ListHelp

