From fdb77f7a7f3a6cc3c3d7a28351539dc499609bd3 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Wed, 19 Nov 2008 09:58:58 +0100 Subject: [PATCH 1/6] French translation bzr revid: olt@tinyerp.com-20081119085858-ujl99rw9p495icr3 --- addons/mrp/i18n/fr_FR.po | 67 +++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/addons/mrp/i18n/fr_FR.po b/addons/mrp/i18n/fr_FR.po index 257f3650b9a..85bf32b4663 100644 --- a/addons/mrp/i18n/fr_FR.po +++ b/addons/mrp/i18n/fr_FR.po @@ -48,7 +48,7 @@ msgstr "Auteur" #. module: mrp #: help:mrp.bom,product_rounding:0 msgid "Rounding applied on the product quantity. For integer only values, put 1.0" -msgstr "" +msgstr "Arrondi appliqué sur la quantité de produit. Pour les valeurs entières, mettre 1.0" #. module: mrp #: field:mrp.workcenter,costs_cycle:0 @@ -58,7 +58,7 @@ msgstr "Coût par cycle" #. module: mrp #: help:res.company,manufacturing_lead:0 msgid "Security days for each manufacturing operation." -msgstr "" +msgstr "Jours de sécurité pour chaque opération de production." #. module: mrp #: wizard_view:mrp.procurement.compute.all,init:0 @@ -79,7 +79,7 @@ msgstr "Nomenclature" #. module: mrp #: wizard_field:product.product.procurement,init,uom_id:0 msgid "Unit of Measure" -msgstr "" +msgstr "Unité de Mesure" #. module: mrp #: field:mrp.bom.revision,indice:0 @@ -90,6 +90,7 @@ msgstr "Révision" #: help:mrp.bom,type:0 msgid "Use a phantom bill of material in raw materials lines that have to be automatically computed in on eproduction order and not one per level.If you put \"Phantom/Set\" at the root level of a bill of material it is considered as a set or pack: the products are replaced by the components between the sale order to the picking without going through the production order.The normal BoM will generate one production order per BoM level." msgstr "" +"" #. module: mrp #: field:mrp.workcenter,costs_journal_id:0 @@ -116,7 +117,7 @@ msgstr "Indices Numériques" #: model:ir.actions.act_window,name:mrp.mrp_procurement_action5 #: model:ir.ui.menu,name:mrp.menu_mrp_procurement_action5 msgid "Exceptions Procurements" -msgstr "" +msgstr "Approvisionements en Exceptions" #. module: mrp #: field:mrp.procurement,product_uos_qty:0 @@ -141,7 +142,7 @@ msgstr "" #. module: mrp #: help:mrp.production,location_dest_id:0 msgid "Location where the system will stock the finnished products." -msgstr "" +msgstr "Emplacement où le système stockera les produits finis." #. module: mrp #: wizard_button:mrp.procurement.compute.all,init,compute:0 @@ -165,6 +166,8 @@ msgstr "" msgid "Reference of the document that created this procurement.\n" "This is automatically completed by Open ERP." msgstr "" +"Référence du document qui a créé cet approvisionnement.\n" +"Est automatiquement complété par Open ERP." #. module: mrp #: view:mrp.routing.workcenter:0 @@ -184,7 +187,7 @@ msgstr "Produits Finis" #. module: mrp #: wizard_view:product.product.procurement,done:0 msgid "Your procurement request has been sent !" -msgstr "" +msgstr "Votre demande d'approvisionement a été envoyée !" #. module: mrp #: rml:bom.structure:0 @@ -211,7 +214,7 @@ msgstr "" #. module: mrp #: help:mrp.property,composition:0 msgid "Not used in computations, for information purpose only." -msgstr "" +msgstr "Pas utilisé dans les calculs, pour information seulement." #. module: mrp #: field:mrp.workcenter,time_start:0 @@ -221,7 +224,7 @@ msgstr "Délai avant production" #. module: mrp #: model:process.node,name:mrp.process_node_productionorder0 msgid "Production order" -msgstr "" +msgstr "Ordre de Production" #. module: mrp #: model:process.transition,name:mrp.process_transition_stockableorderproduction0 @@ -327,7 +330,7 @@ msgstr "Référence" #. module: mrp #: field:mrp.bom,date_stop:0 msgid "Valid Until" -msgstr "" +msgstr "Valide jusqu'au" #. module: mrp #: model:ir.actions.act_window,name:mrp.mrp_procurement_action11 @@ -338,7 +341,7 @@ msgstr "Approvisionnement en Exception Temporaire" #. module: mrp #: field:mrp.bom,date_start:0 msgid "Valid From" -msgstr "" +msgstr "Valide du" #. module: mrp #: selection:mrp.bom,type:0 @@ -348,7 +351,7 @@ msgstr "UdM Standard" #. module: mrp #: rml:mrp.production.order:0 msgid "Analytic Check" -msgstr "" +msgstr "Vérification Analytique" #. module: mrp #: model:ir.model,name:mrp.model_mrp_property_group @@ -377,7 +380,7 @@ msgstr "" #. module: mrp #: model:process.node,name:mrp.process_node_minimumstockrule0 msgid "Minimum stock rule" -msgstr "" +msgstr "Règle de stock minimum" #. module: mrp #: view:mrp.routing:0 @@ -387,7 +390,7 @@ msgstr "Opérations par postes" #. module: mrp #: model:process.transition,note:mrp.process_transition_procurementservice0 msgid "In procurement order, if product type is service" -msgstr "" +msgstr "Dans l'ordre d'approvisionnement, si le produit est de type Service" #. module: mrp #: help:mrp.routing.workcenter,cycle_nbr:0 @@ -442,7 +445,7 @@ msgstr "" #. module: mrp #: field:mrp.production,sale_ref:0 msgid "Sale Ref" -msgstr "" +msgstr "Réf. Vente" #. module: mrp #: selection:mrp.production,state:0 @@ -457,7 +460,7 @@ msgstr "" #. module: mrp #: wizard_field:product.product.procurement,init,product_id:0 msgid "product" -msgstr "" +msgstr "produit" #. module: mrp #: model:ir.model,name:mrp.model_mrp_production_workcenter_line @@ -483,7 +486,7 @@ msgstr "Utilisation des postes de charge" #. module: mrp #: help:mrp.bom,product_efficiency:0 msgid "Efficiency on the production. A factor of 0.9 means a loss of 10% in the production." -msgstr "" +msgstr "Efficacité de la production. Un facteur de 0.9 veut dire une perte de 10% dans la production." #. module: mrp #: model:ir.model,name:mrp.model_mrp_routing @@ -532,7 +535,7 @@ msgstr "Nouvel Approvisionnement" #. module: mrp #: rml:mrp.production.order:0 msgid "Production Order N° :" -msgstr "" +msgstr "Ordre de Production N° :" #. module: mrp #: view:res.company:0 @@ -548,6 +551,8 @@ msgstr "Recréer le coli" #: help:mrp.workcenter,capacity_per_cycle:0 msgid "Number of operation this workcenter can do in parallel. If this workcenter represent a team of 5 workers, the capacity per cycle is 5." msgstr "" +"Nombre d'opération que ce centre de production peut effectuer en parallèle. Si " +"ce centre de production représente une équipe de 5 ouvriers, la capacité par cycle est de 5." #. module: mrp #: selection:mrp.workcenter,type:0 @@ -586,7 +591,7 @@ msgstr "Qté de Produit" #. module: mrp #: field:res.company,security_lead:0 msgid "Security Days" -msgstr "" +msgstr "Jours de Sécurité" #. module: mrp #: rml:bom.structure:0 @@ -623,7 +628,7 @@ msgstr "" #. module: mrp #: rml:mrp.production.order:0 msgid "Printing date" -msgstr "" +msgstr "Date d'Impression" #. module: mrp #: field:stock.warehouse.orderpoint,qty_multiple:0 @@ -658,7 +663,7 @@ msgstr "" #. module: mrp #: field:mrp.routing.workcenter,hour_nbr:0 msgid "Number of Hours" -msgstr "" +msgstr "Nombre d'Heures" #. module: mrp #: field:stock.warehouse.orderpoint,product_max_qty:0 @@ -668,7 +673,7 @@ msgstr "Quantité Max" #. module: mrp #: field:mrp.routing.workcenter,cycle_nbr:0 msgid "Number of Cycle" -msgstr "" +msgstr "Nombre de Cycle" #. module: mrp #: field:mrp.bom,revision_type:0 @@ -897,7 +902,7 @@ msgstr "" #. module: mrp #: rml:mrp.production.order:0 msgid "........." -msgstr "" +msgstr "........." #. module: mrp #: view:mrp.production:0 @@ -917,7 +922,7 @@ msgstr "" #. module: mrp #: field:mrp.bom,method:0 msgid "Method" -msgstr "" +msgstr "Méthode" #. module: mrp #: help:mrp.routing,location_id:0 @@ -1199,7 +1204,7 @@ msgstr "" #. module: mrp #: rml:mrp.production.order:0 msgid "Qty" -msgstr "" +msgstr "Qté" #. module: mrp #: selection:mrp.procurement,procure_method:0 @@ -1264,7 +1269,7 @@ msgstr "Annuler" #. module: mrp #: wizard_button:product.product.procurement,done,end:0 msgid "Close" -msgstr "" +msgstr "Terminé" #. module: mrp #: model:process.node,name:mrp.process_node_stockableproduct0 @@ -1568,7 +1573,7 @@ msgstr "Révisions" #. module: mrp #: model:ir.actions.wizard,name:mrp.product_procurement_wizard msgid "Create Procurement" -msgstr "" +msgstr "Créer un Approvisionement" #. module: mrp #: field:mrp.procurement,product_uos:0 @@ -1598,7 +1603,7 @@ msgstr "UdM du Produit" #. module: mrp #: model:process.node,note:mrp.process_node_serviceproduct0 msgid "If Product type is service" -msgstr "" +msgstr "Si Produit est de type Service" #. module: mrp #: model:ir.model,name:mrp.model_mrp_workcenter @@ -1684,12 +1689,12 @@ msgstr "min" #. module: mrp #: model:process.node,note:mrp.process_node_minimumstockrule0 msgid "Create minimum stock rules" -msgstr "" +msgstr "Créer les règles de stock minimum" #. module: mrp #: rml:mrp.production.order:0 msgid "1cm 27.7cm 20cm 27.7cm" -msgstr "" +msgstr "1cm 27.7cm 20cm 27.7cm" #. module: mrp #: model:ir.actions.act_window,name:mrp.mrp_bom_form_action2 @@ -1721,12 +1726,12 @@ msgstr "" #. module: mrp #: rml:mrp.production.order:0 msgid "Partner Ref" -msgstr "" +msgstr "Réf. Partenaire" #. module: mrp #: model:process.transition.action,name:mrp.process_transition_action_procurementpurchaseorder0 msgid "Purchase" -msgstr "" +msgstr "Achat" #. module: mrp #: model:process.transition,note:mrp.process_transition_stockableorderrequest0 From 25020a42c39c4697672e5874d2351ce7a47911d2 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Wed, 19 Nov 2008 14:48:36 +0530 Subject: [PATCH 2/6] Account_Report:PDF Insertion Utility Developed for Indicators. bzr revid: jvo@tinyerp.com-20081119091836-x9wnwxkfa8nzixls --- addons/account_report/account_report.xml | 7 ++ addons/account_report/account_wizard.xml | 3 + .../account_report/report/print_indicator.py | 83 ++++++++----- addons/account_report/wizard/__init__.py | 3 +- .../wizard_print_indicators_with_pdf.py | 109 ++++++++++++++++++ 5 files changed, 174 insertions(+), 31 deletions(-) create mode 100644 addons/account_report/wizard/wizard_print_indicators_with_pdf.py diff --git a/addons/account_report/account_report.xml b/addons/account_report/account_report.xml index b105fae4cf4..94bd6f5fc11 100755 --- a/addons/account_report/account_report.xml +++ b/addons/account_report/account_report.xml @@ -5,5 +5,12 @@ + diff --git a/addons/account_report/account_wizard.xml b/addons/account_report/account_wizard.xml index 63d4303f0c5..84404f461ab 100644 --- a/addons/account_report/account_wizard.xml +++ b/addons/account_report/account_wizard.xml @@ -3,5 +3,8 @@ + + + \ No newline at end of file diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py index 43960f1df6a..dcf8a601bf0 100644 --- a/addons/account_report/report/print_indicator.py +++ b/addons/account_report/report/print_indicator.py @@ -96,6 +96,7 @@ class accounting_report_indicator(report_sxw.rml_parse): self.treecount=0 self.list=[] self.header_name=self.header_val=[] + self.main_dict={} def repeatIn(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): self._node.data = '' @@ -202,39 +203,61 @@ class accounting_report_indicator(report_sxw.rml_parse): theme.default_font_size = 12 - tb = text_box.T(loc=(0,700),line_style=line_style.darkblue,text=str(obj_history.code)) - - base_x=100 - base_y=700 - - if obj_history.child_ids: - tb.add_arrow((100, 700)) - can.line(line_style.black,base_x-30,base_y,base_x-30,base_y-(50*(len(obj_history.child_ids)-1))) - tb.draw() self.child_dist=0 - def draw_tree(obj_his,base_x,base_y,level=0): - self.child_dist=0 - for i in range(len(obj_his.child_ids)): - can.line(line_style.black,base_x-30,base_y,base_x-30,base_y-(50*(i+len(obj_his.child_ids[i].child_ids)))) - if i<>0: - a = arrow.T(head_style = 1) - if self.child_dist: - diff=self.child_dist - else: - diff=self.child_dist+i - a.draw([(base_x-(30),base_y-(50*diff)), (base_x,base_y-(50*diff))]) - if obj_his.child_ids[i].child_ids: - tb12 = text_box.T(loc=(base_x,base_y-(50*(self.child_dist))), text=str(obj_his.child_ids[i].code)) - tb12.add_arrow((base_x+(100*(level+1)),base_y-(50*(self.child_dist)))) - tb12.draw() - draw_tree(obj_his.child_ids[i],base_x+(100*(level+1)),base_y-(50*(self.child_dist)),level+1) + level=0 + self.level=0 + self.child_dist=0 + def draw_tree2(obj_history,base_x,base_y,level=0,i=0): + self.line_y=base_y + if obj_history.child_ids: + if self.child_dist: + diff=i*self.child_dist + self.child_dist=0 else: - tb12 = text_box.T(loc=(base_x,base_y-(50*(i+self.child_dist))), text=str(obj_his.child_ids[i].code)) - tb12.draw() - self.child_dist=len(obj_his.child_ids[i].child_ids) -# - draw_tree(obj_history,base_x,base_y,0) + diff=i + if self.level>0 and (base_y-(50*diff)) >= self.level: + base_y=self.level-(50*i) + else: + base_y=base_y-(50*diff) + tb = text_box.T(loc=(base_x,base_y),line_style=line_style.darkblue,text="/hC"+str(obj_history.code)+":\n"+str(obj_history.amount)) + + tb.add_arrow((base_x+100,base_y)) + tb.draw() + + if level!=0: + a = arrow.T(head_style = 1) + a.draw([(base_x-30,base_y), (base_x,base_y)]) + level+=1 + + if i>0: + can.line(line_style.black,base_x-30,base_y,base_x-30,self.line_y) + + i=0 + for child in obj_history.child_ids: + draw_tree2(child,base_x+(100),base_y,level,i) + i+=1 + + child_dist=len(obj_history.child_ids) + self.child_dist=max(self.child_dist,child_dist) + + else: + + if self.level>0 and (base_y-(50*i)) >= self.level: + base_y=self.level-(50) + else: + base_y=base_y-(50*(i)) + + tb12 = text_box.T(loc=(base_x,base_y), text=str(obj_history.code)) + tb12.draw() + + if i>0: + can.line(line_style.black,base_x-30,base_y,base_x-30,self.line_y) + a = arrow.T(head_style = 1) + a.draw([(base_x-30,base_y), (base_x,base_y)]) + self.level=base_y + self.line_y=900 + draw_tree2(obj_history,0,900,0) can.close() os.system('cp '+'tree_image'+str(self.treecount)+'.png ' +path+str(self.treecount)+'.png') diff --git a/addons/account_report/wizard/__init__.py b/addons/account_report/wizard/__init__.py index 5689089dae4..042065595e9 100644 --- a/addons/account_report/wizard/__init__.py +++ b/addons/account_report/wizard/__init__.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -21,5 +21,6 @@ ############################################################################## import wizard_print_indicators +import wizard_print_indicators_with_pdf # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report/wizard/wizard_print_indicators_with_pdf.py b/addons/account_report/wizard/wizard_print_indicators_with_pdf.py new file mode 100644 index 00000000000..2371f912b62 --- /dev/null +++ b/addons/account_report/wizard/wizard_print_indicators_with_pdf.py @@ -0,0 +1,109 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import wizard +import pooler +import time +import datetime +import sys +from mx.DateTime import * +import tools +from report.render import render +from report.interface import report_int +import os +import base64 +import StringIO + +form = ''' +
+