bzr revid: fp@tinyerp.com-20081119151720-zt3qu6vvyqkc5dj5
This commit is contained in:
Fabien Pinckaers 2008-11-19 16:17:20 +01:00
commit e43f7c54bc
12 changed files with 255 additions and 106 deletions

View File

@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@ -20,7 +20,7 @@
#
##############################################################################
{
"name" : "Multiple-plans management in analytic accounting",
"name" : "Multiple-plans management in Analytic Accounting",
"version" : "1.0",
"depends" : ["account", "account_analytic_default"],
"author" : "Tiny",

View File

@ -135,12 +135,14 @@ class account_analytic_plan_instance(osv.osv):
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False):
wiz_id = self.pool.get('ir.actions.wizard').search(cr, uid, [("wiz_name","=","create.model")])
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar)
if (res['type']=='form'):
plan_id = False
if context.get('journal_id',False):
plan_id = self.pool.get('account.journal').browse(cr, uid, int(context['journal_id']), context).plan_id
elif context.get('plan_id',False):
plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context).plan_id
plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context)
if plan_id:
i=1
res['arch'] = """<form string="%s">
@ -325,8 +327,6 @@ class account_invoice(osv.osv):
_name = "account.invoice"
_inherit="account.invoice"
def line_get_convert(self, cr, uid, x, part, date, context={}):
res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context)
res['analytics_id']=x.get('analytics_id',False)

View File

@ -115,7 +115,7 @@
<act_window name="Distribution Models"
domain="[('plan_id', '=', active_id),('plan_id','&lt;&gt;',False)]"
context="{'plan_id': active_id}"
res_model="account.analytic.instance"
res_model="account.analytic.plan.instance"
src_model="account.analytic.plan"
id="account_analytic_instance_model_open"/>

View File

@ -74,7 +74,7 @@ class account_report(osv.osv):
del context['fiscalyear']
acc = self.pool.get('account.account')
acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.credit+y, acc.browse(cr, uid, acc_id, context),0)
return reduce(lambda y,x=0: x.credit+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_debit(code,year=0):
context['fiscalyear']=_calc_context(year,obj_fy)
@ -82,7 +82,7 @@ class account_report(osv.osv):
del context['fiscalyear']
acc = self.pool.get('account.account')
acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.debit+y, acc.browse(cr, uid, acc_id, context),0)
return reduce(lambda y,x=0: x.debit+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_balance(code,year=0):
context['fiscalyear']=_calc_context(year,obj_fy)
@ -90,12 +90,12 @@ class account_report(osv.osv):
del context['fiscalyear']
acc = self.pool.get('account.account')
acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.balance+y, acc.browse(cr, uid, acc_id, context),0)
return reduce(lambda y,x=0: x.balance+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_report(*code):
acc = self.pool.get('account.report.report')
acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.amount+y, acc.browse(cr, uid, acc_id, context),0)
return reduce(lambda y,x=0: x.amount+y, acc.browse(cr, uid, acc_id, context),0.0)
def _calc_tax_code(code,period=0):
context['period_id']=_calc_context(period,obj_period)
@ -104,7 +104,7 @@ class account_report(osv.osv):
context['period_id']=context['period_id'][0]
acc = self.pool.get('account.tax.code')
acc_id = acc.search(cr, uid, [('code','in',code)])
return reduce(lambda y,x=0: x.sum_period+y, acc.browse(cr, uid, acc_id, context),0)
return reduce(lambda y,x=0: x.sum_period+y, acc.browse(cr, uid, acc_id, context),0.0)
result = {}
for rep in self.browse(cr, uid, ids, context):
objdict = {

View File

@ -5,5 +5,12 @@
<report auto="False" id="report_print_indicators" model="account.report.history" name="print.indicators" rml="account_report/report/print_indicator.rml" string="Indicators"/>
<report
auto="False"
id="report_indicator_pdf"
menu="False"
model="account.report.report"
name="print.indicator.pdf"
string="Print Indicators in PDF"/>
</data>
</openerp>

View File

@ -3,5 +3,8 @@
<data>
<wizard id="wizard_print_indicators" name="print.indicators" string="Print Indicators"/>
<menuitem action="wizard_print_indicators" type="wizard" parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators"/>
<wizard id="wizard_indicators_with_pdf" model="account.report.report" name="print.indicators.pdf" string="Indicators in PDF" keyword="client_action_multi" />
<!--<menuitem action="wizard_indicators_with_pdf" type="wizard" parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators_with_pdf"/>-->
</data>
</openerp>

View File

@ -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,62 @@ 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_tree(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_tree(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="/hC"+str(obj_history.code)+":\n"+str(obj_history.amount))
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_tree(obj_history,0,900,0)
can.close()
os.system('cp '+'tree_image'+str(self.treecount)+'.png ' +path+str(self.treecount)+'.png')

View File

@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). 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:

View File

@ -0,0 +1,109 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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 = '''<?xml version="1.0"?>
<form string="Print Indicators with PDF">
<label string="Select the PDF file on which Indicators will be printed."/>
<newline/>
<field name="file" colspan="4"/>
</form>'''
fields = {
'file': {'string':'Select a PDF File', 'type':'binary','required':True,'filters':['*.pdf']},
}
class external_pdf(render):
def __init__(self, pdf):
render.__init__(self)
self.pdf = pdf
self.output_type='pdf'
def _render(self):
return self.pdf
class report_custom(report_int):
def create(self, cr, uid, ids, data, context={}):
pool = pooler.get_pool(cr.dbname)
obj_indicator = pool.get('account.report.report')
code_ids = obj_indicator.browse(cr,uid,data['id'])
self.list={}
def find_child(obj):
self.list[obj.code]=str(obj.amount)
if obj.child_ids:
for child in obj.child_ids:
find_child(child)
return True
find_child(code_ids)
file_contents=base64.decodestring(data['form']['file'])
fp = StringIO.StringIO(file_contents)
infile = open(tools.config['addons_path']+"/test.pdf", 'wb')
infile.write(fp.read())
infile.close()
obj_user=pool.get('res.users').browse(cr,uid,uid)
self.list['printing_user']=obj_user.name
self.list['company_name']=obj_user.company_id.name
self.list['company_vat']=obj_user.company_id.partner_id.vat
self.list['printing_time']=time.strftime('%H:%M:%S')
self.list['printing_date']=time.strftime('%D')
tools.pdf_utils.fill_pdf(tools.config['addons_path']+"/test.pdf",'/tmp/output.pdf',self.list)
self.obj = external_pdf(file('/tmp/output.pdf').read())
self.obj.render()
return (self.obj.pdf, 'pdf')
report_custom('report.print.indicator.pdf')
class wizard_print_indicators_with_pdf(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel'),('print','Print')]}
},
'print': {
'actions':[],
'result' :{'type':'print','report':'print.indicator.pdf', 'state':'end'}
}
}
wizard_print_indicators_with_pdf('print.indicators.pdf')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,7 +22,7 @@
{
"name" : "Auction module",
"version" : "1.0",
"category" : "Generic Modules/Others",
"category" : "Generic Modules/Auction",
"depends" : ["base","account","l10n_be","hr_attendance"],
"update_xml" : [
# FIXME: review security rules...

View File

@ -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

64
addons/purchase/report/order.rml Executable file → Normal file
View File

@ -114,7 +114,7 @@
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
@ -157,12 +157,12 @@
<tr>
<td>
<para style="P5">[[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]]</para>
<para style="terp_tblheader_General">Shipping address :</para>
<para style="P5">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
<para style="P5">[[ addr.title or '' ]] [[ addr.name ]]</para>
<para style="P4">Shipping address :</para>
<para style="P5">[[ o.partner_id.title or '' ]][[ o.partner_id.name ]]</para>
<para style="P5">[[ addr.title or '' ]][[ addr.name ]]</para>
<para style="P5">[[ addr.street ]]</para>
<para style="P5">[[ addr.street2 or '' ]]</para>
<para style="P5">[[ addr.zip or '' ]] [[ addr.city or '' ]]</para>
<para style="P5">[[ addr.zip or '' ]][[ addr.city or '' ]]</para>
<para style="P5">[[ addr.state_id and addr.state_id.name or '' ]]</para>
<para style="P5">[[ addr.country_id and addr.country_id.name or '' ]]</para>
</td>
@ -178,11 +178,11 @@
</para>
</td>
<td>
<para style="P5">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
<para style="P5">[[ o.partner_address_id.title or '' ]] [[ o.partner_address_id.name ]]</para>
<para style="P5">[[ o.partner_id.title or '' ]][[ o.partner_id.name ]]</para>
<para style="P5">[[ o.partner_address_id.title or '' ]][[ o.partner_address_id.name ]]</para>
<para style="P5">[[ o.partner_address_id.street ]]</para>
<para style="P5">[[ o.partner_address_id.street2 or '' ]]</para>
<para style="P5">[[ o.partner_address_id.zip or '' ]] [[ o.partner_address_id.city or '' ]]</para>
<para style="P5">[[ o.partner_address_id.zip or '' ]][[ o.partner_address_id.city or '' ]]</para>
<para style="P5">[[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]]</para>
<para style="P5">[[ o.partner_address_id.country_id and o.partner_address_id.country_id.name or '' ]]</para>
<para style="P5">
@ -203,15 +203,15 @@
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P6">[[ (o.state=='draft' or removeParentNode('font')) and 'Request for Quotation' ]] [[ (o.state&lt;&gt;'draft' or removeParentNode('font')) and 'Purchase Order Confirmation' ]] N° [[ o.name ]]</para>
<para style="P6">[[ (o.state=='draft' or removeParentNode('font')) and 'Request for Quotation' ]][[ (o.state&lt;&gt;'draft' or removeParentNode('font')) and 'Purchase Order Confirmation' ]] N° [[ o.name ]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,180.0,180.0" style="Header_Order_Reference_Tbl">
<blockTable colWidths="136.0,132.0,133.0,133.0" style="Header_Order_Reference_Tbl">
<tr>
<!--td>
<td>
<para style="terp_tblheader_General_Centre">Our Order Reference</para>
</td-->
</td>
<td>
<para style="terp_tblheader_General_Centre">Your Order Reference</para>
</td>
@ -223,26 +223,26 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="180.0,180.0,180.0" style="Content_Order_Reference_Table">
<blockTable colWidths="136.0,132.0,133.0,133.0" style="Content_Order_Reference_Table">
<tr>
<!--td>
<td>
<para style="terp_default_Centre_8">[[ o.name or '' ]]</para>
</td-->
<td>
<para style="terp_default_Centre_8">[[ o.partner_ref or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[o.date_order]]</para>
<para style="terp_default_Centre_8">[[ o.partner_ref or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ o.validator and o.validator.name or '' ]]</para>
<para style="terp_default_Centre_8">[[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ o.validator and o.validator.name or '' ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="251.0,53.0,62.0,47.0,59.0,62.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<blockTable colWidths="251.0,52.0,62.0,46.0,59.0,62.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr>
<td>
<para style="terp_tblheader_Details">Description</para>
@ -266,28 +266,28 @@
</blockTable>
<section>
<para style="terp_default_8">[[ repeatIn(o.order_line,'line') ]]</para>
<blockTable colWidths="252.0,52.0,61.0,29.0,20.0,59.0,63.0" style="Table_Order_Pur_line_Content">
<blockTable colWidths="252.0,52.0,61.0,28.0,20.0,59.0,63.0" style="Table_Order_Pur_line_Content">
<tr>
<td>
<para style="terp_default_9">[[ line.name ]]</para>
</td>
<td>
<para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para>
<para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ time.strftime('%m/%d/%Y', time.strptime( line.date_planned, '%Y-%m-%d %H:%M:%S')) ]]</para>
<para style="terp_default_9">[[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d %H:%M:%S')) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ line.product_qty ]] </para>
<para style="terp_default_Right_9">[[ line.product_qty or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ line.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ line.price_unit ]]</para>
<para style="terp_default_Right_9">[[ line.price_unit or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ line.price_subtotal ]]</para>
<para style="terp_default_Right_9">[[ line.price_subtotal or '0.00' ]]</para>
</td>
</tr>
<tr>
@ -338,10 +338,10 @@
<para style="terp_default_9">Net Total :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ o.amount_untaxed ]]</para>
<para style="terp_default_Right_9">[[ o.amount_untaxed or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
</td>
</tr>
<tr>
@ -354,10 +354,10 @@
<para style="P1">Taxes :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ o.amount_tax ]]</para>
<para style="terp_default_Right_9">[[ o.amount_tax or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
</td>
</tr>
<tr>
@ -370,7 +370,7 @@
<para style="P3">Total :</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ o.amount_total ]]</para>
<para style="terp_default_Bold_9_Right">[[ o.amount_total or '0.00' ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ o.pricelist_id.currency_id.name ]]</para>
@ -391,4 +391,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>