@@ -63,7 +63,7 @@
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id"/>
|
||||
<newline/>
|
||||
<field name="price_subtotal"/>
|
||||
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
|
||||
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<data>
|
||||
<report auto="False" id="account_general_ledger" menu="False" model="account.account" name="account.general.ledger" rml="account/report/general_ledger.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/third_party_ledger.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger_other" menu="False" model="res.partner" name="account.third_party_ledger_other" rml="account/report/third_party_ledger_other.rml" string="Partner Other Ledger"/>
|
||||
<report auto="False" id="account_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Account Balance"/>
|
||||
<report auto="False" id="account_3rdparty_account_balance" menu="False" model="account.account" name="account.partner.balance" rml="account/report/partner_balance.rml" string="Partner Balance"/>
|
||||
<report auto="False" id="account_central_journal" model="account.journal.period" name="account.central.journal" rml="account/report/central_journal.rml" string="Central Journal"/>
|
||||
|
||||
@@ -60,9 +60,7 @@
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,-1"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -91,14 +89,14 @@
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
|
||||
@@ -146,7 +144,7 @@
|
||||
<blockTable colWidths="527.00" style="Table4" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9a">[[ get_fiscalyear(data['form']) or removeParentNode('para') ]]:</para>
|
||||
<para style="P9a">[[ get_fiscalyear(data['form']) or removeParentNode('para') ]]:</para>
|
||||
<para style="P9b"><i> [[ get_periods(data['form']) or removeParentNode('para') ]]</i></para>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -155,45 +153,21 @@
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="46,278.0,73.0,72.0,82.0" style="Table2" repeatRows="1">
|
||||
<blockTable colWidths="67,264.0,70.0,70.0,80.0" style="Table2" repeatRows="1">
|
||||
<tr noRowsplits="1">
|
||||
<td>
|
||||
<para style="P12a">Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12b">Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Balance</para>
|
||||
</td>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">Account</para></td>
|
||||
<td><para style="P10">Debit</para></td>
|
||||
<td><para style="P10">Credit</para></td>
|
||||
<td><para style="P10">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td>
|
||||
<para style="P14">
|
||||
<font>[[ (a['level']<3 and setTag('tr','tr',{'style':'TrLevel'+str(a['level']), 'paraStyle':('Level'+str(a['level']))})) or removeParentNode('font') ]]</font>
|
||||
<font>[[ (a['level']>2 and setTag('tr','tr',{'style':'TrLevel', 'paraStyle':('Level')})) or removeParentNode('font') ]] </font>
|
||||
<font color="white">[[ '...'*(a['level']) ]]</font><font>[[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font>
|
||||
<font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font>
|
||||
<font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3"><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font>
|
||||
<font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para>
|
||||
</td>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -120,70 +120,31 @@
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10a">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Voucher No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">A/c No.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Third party</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Entry label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Credit</para>
|
||||
</td>
|
||||
<td><para style="P10a">Date</para></td>
|
||||
<td><para style="P10">Voucher No</para></td>
|
||||
<td><para style="P10">A/c No.</para></td>
|
||||
<td><para style="P10a">Third party</para></td>
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10b">Debit</para></td>
|
||||
<td><para style="P10b">Credit</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[o.period_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11a">[[ o.journal_id.code ]]</para></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
<td><para style="P11">[[o.period_id.name ]]</para></td>
|
||||
<td><para style="P11a">[[ o.journal_id.code ]]</para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para>
|
||||
<para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ line.ref ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ line.account_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ line.partner_id and line.partner_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ line.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ formatLang(line.debit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ formatLang(line.credit) ]]</para>
|
||||
</td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<tr>
|
||||
<td><para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para><para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ line.ref ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ line.account_id.code ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.partner_id and line.partner_id.name ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.name ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
@@ -28,12 +28,37 @@ import re
|
||||
|
||||
class account_tax_code_report(rml_parse.rml_parse):
|
||||
#_name = 'report.account.tax.code.entries'
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_tax_code_report, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_line':self.get_line,
|
||||
})
|
||||
|
||||
def get_line(self,obj):
|
||||
res = {}
|
||||
result = []
|
||||
line_ids = self.pool.get('account.move.line').search(self.cr,self.uid,[('tax_code_id','=',obj.id)])
|
||||
if line_ids:
|
||||
move_line_objs = self.pool.get('account.move.line').browse(self.cr,self.uid,line_ids)
|
||||
for line in move_line_objs:
|
||||
res['date'] = line.date
|
||||
res['ref'] = line.ref
|
||||
res['acode'] = line.account_id.code
|
||||
res['pname'] = ''
|
||||
res['country'] = ''
|
||||
|
||||
if line.partner_id:
|
||||
res['pname'] = line.partner_id.name
|
||||
if line.partner_id.address and line.partner_id.address[0].country_id:
|
||||
res['country'] = line.partner_id.address[0].country_id.code
|
||||
res['name'] = line.name
|
||||
res['debit'] = line.debit
|
||||
res['credit'] = line.credit
|
||||
result.append(res)
|
||||
|
||||
return result
|
||||
|
||||
report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
|
||||
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header=False)
|
||||
|
||||
@@ -41,7 +41,21 @@
|
||||
<blockTableStyle id="Table_Line_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,0" stop="6,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Line_Content_Detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -69,6 +83,7 @@
|
||||
<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="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="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.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"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -90,81 +105,44 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<!--blockTable colWidths="162.0,222.0,154.0" repeatRows="1" style="Table_Title_Table">
|
||||
<para style="P8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<blockTable colWidths="162.0,222.0,154.0" repeatRows="1" style="Table_Title_Table">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">[[ company.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font face="Times-Roman" size="11.0"/>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">Accounting Entries-[[ company.currency_id.name ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_header">[[ o.company_id.name ]]</para></td>
|
||||
<td><para style="terp_header"><font face="Times-Roman" size="11.0"/></para></td>
|
||||
<td><para style="terp_header">Accounting Entries-[[ o.company_id.currency_id.name ]]</para></td>
|
||||
</tr>
|
||||
</blockTable-->
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</blockTable>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="terp_tblheader_Details">[[ o.name ]]</para>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<section>
|
||||
<blockTable colWidths="55.0,43.0,57.0,125.0,127.0,65.0,67.0" repeatRows="1" style="Table_Line_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Voucher Nb</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Number</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Third party (Country)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="terp_default_8">[[ repeatIn(o.line_ids, 'line') ]]</para>
|
||||
<blockTable colWidths="48.0,43.0,58.0,128.0,127.0,64.0,65.0" style="Table_Line_Content_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(line.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.ref ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.account_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.partner_id and line.partner_id.name ]]<font>([[ line.partner_id and line.partner_id.address and line.partner_id.address[0].country_id.code or removeParentNode('font') ]] )</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.debit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.credit) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_Details_Centre">Date</para></td>
|
||||
<td><para style="terp_tblheader_Details">Voucher Nb</para></td>
|
||||
<td><para style="terp_tblheader_Details">Account Number</para></td>
|
||||
<td><para style="terp_tblheader_Details">Third party (Country)</para></td>
|
||||
<td><para style="terp_tblheader_Details">Entry label</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ repeatIn(get_line(o),'line') ]]<font>[[ not line and removeParentNode('tr') ]]</font>[[ formatLang(line['date'],date=True) ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['acode'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['pname'] ]]<font>([[ line['country'] ]] )</font></para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<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="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.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"/>
|
||||
@@ -103,79 +104,50 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Central Journal</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<td><para style="terp_header"><font color="white"> </font></para>
|
||||
</td>
|
||||
<td><para style="terp_header_Centre">Central Journal</para></td>
|
||||
<td><para style="terp_header"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Journal Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Journal Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Printing Date</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal Code</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal Name</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Subheader_Content_detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ o.journal_id.code or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ o.journal_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] </para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ o.journal_id.code or '' ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ o.journal_id.name ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="83.0,269.0,95.0,92.0" style="Table_Account_detail_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Num.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_Details">Account Num.</para></td>
|
||||
<td><para style="terp_tblheader_Details">Account Name</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
@@ -183,20 +155,10 @@
|
||||
</para>
|
||||
<blockTable colWidths="83.0,269.0,94.0,92.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
@@ -206,25 +168,17 @@
|
||||
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
|
||||
<blockTable colWidths="83.0,269.0,94.0,92.0" style="Table_Journal_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit'])]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit'])]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
@@ -84,13 +85,10 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,179.0" style="Table_Header_Title">
|
||||
@@ -110,10 +108,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="68.0,471.0" style="Table_Print_Current_datetime">
|
||||
<blockTable colWidths="88.0,451.0" style="Table_Print_Current_datetime">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Printing Date :</para>
|
||||
@@ -123,60 +121,27 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,218.0,89.0,83.0,77.0" style="Table_Journal_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Journal Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Period</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit Trans.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit Trans.</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_Details">Code</para></td>
|
||||
<td><para style="terp_tblheader_Details">Journal Name</para></td>
|
||||
<td><para style="terp_tblheader_Details">Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit Trans.</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit Trans.</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="71.0,219.0,89.0,83.0,77.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn( periods(objects), 'o') ]]</para>
|
||||
<blockTable colWidths="176.0,115.0,89.0,83.0,76.0" style="Table_Sub_Total">
|
||||
@@ -228,7 +193,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.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"/>
|
||||
@@ -235,11 +236,7 @@
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="P8"><font color="white"> </font></para></td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_8">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
@@ -248,9 +245,7 @@
|
||||
<para style="terp_default_8">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_8">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="terp_default_8">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P8"><font color="white"> </font></para>
|
||||
<para style="terp_default_8">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
@@ -264,131 +259,55 @@
|
||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P8"><font color="white"> </font></para>
|
||||
<blockTable colWidths="177.0,177.0,177.0" style="Table_Invoice_General_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Document</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner Ref.</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_General_Centre">Document</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Invoice Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Partner Ref.</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_9">[[ o.name ]]</para></td>
|
||||
<td><para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="211.0,62.0,63.0,63.0,80.0,69.0" style="Table_Header_Invoice_Line">
|
||||
<para style="P8"><font color="white"></font></para>
|
||||
<para style="P8"><font color="white"> </font></para>
|
||||
<blockTable colWidths="211.0,62.0,63.0,63.0,40.0,84.0" style="Table_Header_Invoice_Line">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_Details">Description</para></td>
|
||||
<td><para style="terp_tblheader_Details">Taxes</para></td>
|
||||
<td><para style="terp_tblheader_Details">Quantity</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">Unit Price</para></td>
|
||||
<td><para style="terp_tblheader_Details">Disc.(%)</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.invoice_line,'l') ]]</para>
|
||||
<blockTable colWidths="211.0,62.0,36.0,27.0,63.0,36.0,62.0,26.0" style="Table_Invoice_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ ', '.join([ lt.description or '' for lt in l.invoice_line_tax_id ]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.discount) ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_9">[[ l.name ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ ', '.join([ lt.description or '' for lt in l.invoice_line_tax_id ]) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(l.quantity)]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(l.discount) ]] </para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Note">[[ format(l.note or removeParentNode('tr')) ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Note">[[ format(l.note or removeParentNode('tr')) ]]</para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
@@ -397,63 +316,31 @@
|
||||
<td>
|
||||
<blockTable colWidths="176.0,258.0" style="Table_format_Table_Line_total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="62.0,59.0,25.0" style="Table_eclu_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Bold_9">Net Total:</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,58.0,26.0" style="Table_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Bold_9">Taxes:</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,58.0,26.0" style="Table_Total_Include_Taxes">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
@@ -462,25 +349,13 @@
|
||||
<blockTable colWidths="530.0" style="Table_Main_Table">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="54.0,80.0,67.0" style="Table_Tax_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_Details_Centre">Tax</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Base</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Amount</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -488,15 +363,9 @@
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="53.0,80.0,65.0" style="Table_Tax_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ t.tax_code_id.notprintable and removeParentNode('blockTable') or '' ]][[ formatLang(t.amount) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ t.name ]] </para></td>
|
||||
<td><para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para></td>
|
||||
<td><para style="terp_default_Right_8">[[ t.tax_code_id.notprintable and removeParentNode('blockTable') or '' ]][[ formatLang(t.amount) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
@@ -505,21 +374,9 @@
|
||||
<td>
|
||||
<blockTable colWidths="53.0,60.0,65.0" style="Table_Table_Border_White">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
@@ -527,23 +384,13 @@
|
||||
</blockTable>
|
||||
<blockTable colWidths="180.0,350.0" style="Table_Final_Border">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_2"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
@@ -551,9 +398,7 @@
|
||||
</para>
|
||||
<blockTable colWidths="530.0" style="Table_Payment_Terms">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
|
||||
@@ -57,11 +57,10 @@
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<!--<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/> -->
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,3" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
@@ -88,21 +87,16 @@
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.5" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="9.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica" fontSize="9.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
@@ -110,7 +104,7 @@
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
|
||||
<blockTableStyle id="TrLevel8">
|
||||
@@ -289,96 +283,42 @@
|
||||
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
|
||||
/>
|
||||
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P12a"></para>
|
||||
<blockTable colWidths="61.0,206.0,69.0,68.0,69.0,68.0" repeatRows="1" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12a">[[ setTag('tr','tr',{'style':'Line1'}) ]] Code </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12a">Partner name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12b">Débit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12b">Crédit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12b">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12b">In dispute</para>
|
||||
</td>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">(Account/Partner) Name</para></td>
|
||||
<td><para style="P12b">Debit</para></td>
|
||||
<td><para style="P12b">Credit</para></td>
|
||||
<td><para style="P12b">Balance</para></td>
|
||||
<td><para style="P12b">In dispute</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P7">[[ setTag('tr','tr',{'style':'Line2'}) ]] Grand total</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang(sum_debit(data)) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang(sum_credit(data)) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang((solde_debit(data)-solde_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang(sum_litige(data)) ]]</u></para>
|
||||
</td>
|
||||
<td><para style="P7">Grand total</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_debit(data)) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_credit(data)) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((solde_debit(data)-solde_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_litige(data)) ]]</u></para></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>
|
||||
<para style="P7">Balance</para>
|
||||
</td><td>
|
||||
</td> <td>
|
||||
</td><td>
|
||||
<para style="P8">[[ formatLang(solde_debit(data)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ formatLang(solde_credit(data)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ repeatIn(lines(data), 'a') ]]<font face="Helvetica">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ a['type']==3 and ( setTag('tr','tr',{'style':'TrLevel0'})) ]] [[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]] [[ a['type']==1 and ( setTag('blockTable','blockTable',{'style':'LineLevel1'})) ]] [[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font><u>[[ (a['type']==3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]] [[ formatLang(a['debit']) ]]</u></font>
|
||||
<font>[[ (a['type']!=3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica'}) ]] [[ formatLang(a['debit']) ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font><u>[[ (a['type']==3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]] [[ formatLang(a['credit']) ]]</u></font>
|
||||
<font>[[ (a['type']!=3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica'}) ]] [[ formatLang(a['credit']) ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font><u>[[ (a['type']==3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]] [[ formatLang(a['balance']) ]]</u></font>
|
||||
<font>[[ (a['type']!=3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica'}) ]] [[ formatLang(a['balance']) ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font><u>[[ (a['type']==3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]] [[ formatLang(a['enlitige'] or 0.00) ]]</u></font>
|
||||
<font>[[ (a['type']!=3 or removeParentNode('font')) and setTag('para','para',{'fontName':'Helvetica'}) ]] [[ formatLang(a['enlitige'] or 0.00) ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td><para style="P7">Balance</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_debit(data)) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_credit(data)) ]]</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(data), 'a') ]]<font>[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para></td>
|
||||
<td><para style="P3">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ a['name'] ]]</para></td>
|
||||
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['debit']) ]]</para></td>
|
||||
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['credit']) ]]</para></td>
|
||||
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['balance']) ]]</para></td>
|
||||
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['enlitige'] or 0.00) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -58,7 +58,7 @@ class tax_report(rml_parse.rml_parse):
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
def _get_lines(self, based_on,period_list,company_id=False, parent=False, level=0):
|
||||
res = self._get_codes(based_on,parent,level,period_list)
|
||||
res = self._get_codes(based_on,company_id,parent,level,period_list)
|
||||
|
||||
if period_list[0][2] :
|
||||
res = self._add_codes(based_on,res,period_list)
|
||||
@@ -157,15 +157,15 @@ class tax_report(rml_parse.rml_parse):
|
||||
i+=1
|
||||
return res
|
||||
|
||||
def _get_codes(self, based_on, parent=False, level=0,period_list=[]):
|
||||
def _get_codes(self,based_on, company_id, parent=False, level=0,period_list=[]):
|
||||
tc = self.pool.get('account.tax.code')
|
||||
ids = tc.search(self.cr, self.uid, [('parent_id','=',parent)])
|
||||
ids = tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)])
|
||||
|
||||
res = []
|
||||
for code in tc.browse(self.cr, self.uid, ids, {'based_on': based_on}):
|
||||
res.append(('.'*2*level,code))
|
||||
|
||||
res += self._get_codes(based_on, code.id, level+1)
|
||||
res += self._get_codes(based_on, company_id, code.id, level+1)
|
||||
return res
|
||||
|
||||
def _add_codes(self,based_on, account_list=[],period_list=[]):
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="0,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,1" stop="3,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,1" stop="3,-1"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.6" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -116,61 +116,20 @@
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="347.0,64.0,59.0,71.0" style="Table2" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12">Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12a">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12a">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12a">Tax Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<para style="Caption">[[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]</para>
|
||||
<td>
|
||||
<para style="P5"><font color="white">[[ '...'*len(o['level']) ]]</font>
|
||||
<font>[[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]]</font>
|
||||
|
||||
[[ o['code'] ]] [[ o['name'] ]]<font></font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
||||
<para style="P6"> <font><u><b>[[ len(o['level'])>3 and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</b></u></font>
|
||||
<font>[[ len(o['level'])<4 and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6"> <font><u><b>[[ len(o['level'])>3 and removeParentNode('font') ]][[ formatLang(o['credit'])]]</b></u></font>
|
||||
<font>[[ len(o['level'])<4 and removeParentNode('font') ]][[ formatLang(o['credit'])]]</font>
|
||||
</para>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6"> <font><u><b>[[ len(o['level'])>3 and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</b></u></font>
|
||||
<font>[[ len(o['level'])<4 and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</font>
|
||||
</para>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</blockTable>
|
||||
|
||||
<para style="P2"><font color="white"> </font></para>
|
||||
<blockTable colWidths="347.0,64.0,59.0,71.0" style="Table2" repeatRows="1">
|
||||
<tr>
|
||||
<td><para style="P12">Tax Name</para></td>
|
||||
<td><para style="P12a">Debit</para></td>
|
||||
<td><para style="P12a">Credit</para></td>
|
||||
<td><para style="P12a">Tax Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P5"><font>[[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]</font><font color="white">[[ '...'*len(o['level']) ]]</font> <font>[[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]]</font>[[ o['code'] ]] [[ o['name'] ]]</para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font>[[ formatLang(o['debit']) ]]</para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font>[[ formatLang(o['credit'])]]</para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font>[[ formatLang(o['tax_amount']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
@@ -447,4 +447,8 @@ report_sxw.report_sxw('report.account.third_party_ledger', 'res.partner',
|
||||
'addons/account/report/third_party_ledger.rml',parser=third_party_ledger,
|
||||
header=False)
|
||||
|
||||
report_sxw.report_sxw('report.account.third_party_ledger_other', 'res.partner',
|
||||
'addons/account/report/third_party_ledger_other.rml',parser=third_party_ledger,
|
||||
header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -124,117 +124,54 @@
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
|
||||
<para style="P2"><font color="white"></font></para>
|
||||
<para>
|
||||
<font color="white">[[ data['form']['page_split'] == True or removeParentNode('para') ]] </font>
|
||||
<font color="white">[[ repeatIn(objects, 'p') ]] [[ setLang(p.partner_id.lang) ]]</font>
|
||||
</para>
|
||||
|
||||
<para>[[ repeatIn(objects, 'p') ]] [[ setLang(p.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="50.0,30.0,42.0,220.0,69.0,72.0,63.0" repeatRows="1" style="tbl_heading">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<para style="date">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">Entry label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P16">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P16">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P16">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P12">JNRL</para></td>
|
||||
<td><para style="P12">Ref.</para></td>
|
||||
<td><para style="P12">Entry label</para></td>
|
||||
<td><para style="P16">Debit</para></td>
|
||||
<td><para style="P16">Credit</para></td>
|
||||
<td><para style="P16">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="337.0,69.0,72.0,63.0" style="Table3">
|
||||
<blockTable colWidths="337.0,69.0,72.0,63.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Balance">Balance brought forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang((sum_debit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang((sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td><para style="Balance">Balance brought forward</para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">
|
||||
<font color="white">[[ data['form']['page_split'] == False or removeParentNode('para') ]] </font>
|
||||
<font color="white">[[ repeatIn(objects, 'p') ]]</font>
|
||||
</para>
|
||||
<blockTable colWidths="300.0,37.0,69.0,72.0,63.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="total">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="total"></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9b"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td><para style="total">[[ p.ref ]] - [[ p.name ]]</para></td>
|
||||
<td><para style="total"></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="45.0,30.0,262.0,0.0,69.0,72.0,63.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P15"><font face="Helvetica">[[ repeatIn(lines(p,data), 'line') ]]</font>[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]] / [[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4"></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
<td><para style="P15"><font face="Helvetica">[[ repeatIn(lines(p,data), 'line') ]]</font>[[ formatLang(line['date'],date=True) ]]</para></td>
|
||||
<td><para style="P3">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] ]] / [[ line['name'] ]]</para></td>
|
||||
<td><para style="P4"></para></td>
|
||||
<td><para style="P5">[[ formatLang((line['debit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['credit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['progress'])) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
|
||||
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<!--logo-->
|
||||
<!--<fill color="darkblue"/>-->
|
||||
<!--<stroke color="darkblue"/>-->
|
||||
|
||||
<!--TITLE COMPANY-->
|
||||
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
|
||||
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Third Party Ledger [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="tbl_heading">
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,-1"/>
|
||||
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="2.0" leading="1" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="14.5" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="7.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="7.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Balance" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="total" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="date" fontName="Helvetica" fontSize="8.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica" fontSize="7.5" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="8.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P2"><font color="white"></font></para>
|
||||
<blockTable colWidths="50.0,30.0,42.0,220.0,69.0,72.0,63.0" repeatRows="1" style="tbl_heading">
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P12">JNRL</para></td>
|
||||
<td><para style="P12">Ref.</para></td>
|
||||
<td><para style="P12">Entry label</para></td>
|
||||
<td><para style="P16">Debit</para></td>
|
||||
<td><para style="P16">Credit</para></td>
|
||||
<td><para style="P16">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="337.0,69.0,72.0,63.0" style="Table3">
|
||||
<tr>
|
||||
<td><para style="Balance">Balance brought forward</para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">[[ repeatIn(objects, 'p') ]]</para>
|
||||
<blockTable colWidths="300.0,37.0,69.0,72.0,63.0" style="Table5">
|
||||
<tr>
|
||||
<td><para style="total">[[ p.ref ]] - [[ p.name ]]</para></td>
|
||||
<td><para style="total"></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="45.0,30.0,262.0,0.0,69.0,72.0,63.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P15"><font face="Helvetica">[[ repeatIn(lines(p,data), 'line') ]]</font>[[ formatLang(line['date'],date=True) ]]</para></td>
|
||||
<td><para style="P3">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] ]] / [[ line['name'] ]]</para></td>
|
||||
<td><para style="P4"></para></td>
|
||||
<td><para style="P5">[[ formatLang((line['debit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['credit'])) ]]</para></td>
|
||||
<td><para style="P5">[[ formatLang((line['progress'])) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
@@ -120,10 +120,10 @@ def _check_state(self, cr, uid, data, context):
|
||||
|
||||
if data['form']['state'] == 'bydate':
|
||||
_check_date(self, cr, uid, data, context)
|
||||
data['form']['fiscalyear'] = 0
|
||||
else :
|
||||
|
||||
data['form']['fiscalyear'] = 1
|
||||
# data['form']['fiscalyear'] = 0
|
||||
# else :
|
||||
#
|
||||
# data['form']['fiscalyear'] = 1
|
||||
return data['form']
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ class wizard_report(wizard.interface):
|
||||
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
|
||||
|
||||
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
|
||||
periods_obj=pooler.get_pool(cr.dbname).get('account.period')
|
||||
data['form']['periods'] =periods_obj.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
#periods_obj=pooler.get_pool(cr.dbname).get('account.period')
|
||||
#data['form']['periods'] =periods_obj.search(cr, uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
data['form']['sortbydate'] = 'sort_date'
|
||||
data['form']['display_account']='bal_all'
|
||||
data['form']['landscape']=True
|
||||
|
||||
@@ -105,6 +105,12 @@ class wizard_report(wizard.interface):
|
||||
data['form']['soldeinit'] = True
|
||||
return data['form']
|
||||
|
||||
def _check(self, cr, uid, data, context):
|
||||
if data['form']['page_split']:
|
||||
return 'report'
|
||||
else:
|
||||
return 'report_other'
|
||||
|
||||
def _check_date(self, cr, uid, data, context):
|
||||
|
||||
sql = """
|
||||
@@ -134,12 +140,21 @@ class wizard_report(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [_get_defaults],
|
||||
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
|
||||
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('checkreport','Print','gtk-print')]}
|
||||
},
|
||||
'checkreport': {
|
||||
'actions': [],
|
||||
'result': {'type':'choice','next_state':_check}
|
||||
},
|
||||
'report': {
|
||||
'actions': [_check_state],
|
||||
'result': {'type':'print', 'report':'account.third_party_ledger', 'state':'end'}
|
||||
},
|
||||
'report_other': {
|
||||
'actions': [_check_state],
|
||||
'result': {'type':'print', 'report':'account.third_party_ledger_other', 'state':'end'}
|
||||
}
|
||||
|
||||
}
|
||||
wizard_report('account.third_party_ledger.report')
|
||||
|
||||
|
||||
@@ -17,16 +17,20 @@
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,0"/>
|
||||
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -35,89 +39,88 @@
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="2,2"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P8a" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P8b" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P9" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="P10" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11a" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P18" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P19" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Times-Roman" fontSize="6.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Times-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" alignment="CENTER" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Times-Roman" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Helvetica" fontSize="12.0" leading="13" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="6.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" alignment="CENTER" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Helvetica" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="P1">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="295.0,232.0" style="Tableau2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8b"><font color="white"> </font></para></td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P14">
|
||||
<font color="white"> </font>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
@@ -125,190 +128,142 @@
|
||||
<para style="P23">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16">
|
||||
<font face="Times-Roman">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font>
|
||||
<font face="Times-Roman">[[ o.number ]]</font>
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P15">
|
||||
<font color="white"> </font>
|
||||
<para style="P17"><font>Document:</font><font>[[ o.name ]]</font></para>
|
||||
<para style="P8b"><font color="white"></font></para>
|
||||
<para style="P17"><font>Invoice Date: </font><font>[[ formatLang(o.date_invoice,date=True) ]]</font></para>
|
||||
<para style="P18"><font>Customer Ref:</font>[[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Document:</font><font face="Times-Roman">[[ o.name ]]</font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Invoice Date: </font><font face="Times-Roman">[[ formatLang(o.date_invoice,date=True) ]]</font>
|
||||
</para>
|
||||
<para style="P18">
|
||||
<font face="Times-Roman">Customer Ref:</font> [[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="206.0,62.0,62.0,62.0,61.0,74.0" style="Tableau6">
|
||||
<blockTable colWidths="212.0,62.0,62.0,70.0,61.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
<td><para style="P3">Description</para></td>
|
||||
<td><para style="P4">Taxes</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P4a">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,216.0,60.0,31.0,16.0,31.0,31.0,61.0,45.0,23.0" style="Tableau7">
|
||||
<blockTable colWidths="0.0,221.5,60.0,31.0,16.0,31.0,39.0,61.0,45.0,23.0" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para><font color="white"></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['currency'] ]]</para>
|
||||
</td>
|
||||
<td><para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]]</para></td>
|
||||
<td><para style="P8a">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['tax_types'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['uos'] ]]</para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para></td>
|
||||
<td><para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_subtotal'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['currency'] ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">[[ format(a['note'] or removeParentNode('tr')) ]]</para></td>
|
||||
<td><para style="P8a"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents1"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<blockTable colWidths="212.0,62.0,62.0,70.0,61.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
<td><para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P4">Taxes</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P4a">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
<blockTable colWidths="216.0,325.0" style="Tableau3">
|
||||
<blockTable colWidths="340.0,191.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="100.0,73.0,100.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="110.0,81.0" style="Tableau5">
|
||||
<tr>
|
||||
<td><para style="P13">Total (Excl. taxes):</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Taxes:</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Total <font>(Incl. taxes):</font></para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="251.0,290.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11a"><font face="Times-Roman" size="2.0">[[ repeatIn(o.tax_line,'t') ]]</font> [[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ '%.2f' % t.base ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ '%.2f' % t.amount]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P10">Tax</para></td>
|
||||
<td><para style="P8">Base</para></td>
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font>[[ repeatIn(o.tax_line,'t') ]]</font>[[ t.name ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="214.0,95.0" style="Tableau5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Total (excl. taxes):</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</para>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Total <font face="Times-Roman">(incl. taxes):</font>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
</story>
|
||||
|
||||
@@ -17,16 +17,20 @@
|
||||
<blockTableStyle id="Tableau6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,0" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,0"/>
|
||||
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -35,87 +39,89 @@
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="2,2"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="3.0" leading="8"/>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P8b" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P9" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="P10" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P18" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P11a" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8a" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" />
|
||||
<paraStyle name="P19" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Times-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Times-Roman" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Helvetica" fontSize="12.0" leading="13" alignment="CENTER"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P18" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Helvetica" fontSize="6.0" leading="4" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P22" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P23" fontName="Helvetica" fontSize="14.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" alignment="CENTER" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Contents1" fontName="Helvetica" alignment="RIGHT" spaceBefore="2.0" spaceAfter="3.0" leading="10"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="P1">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<blockTable colWidths="295.0,232.0" style="Tableau2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P2"><font color="white"> </font></para></td>
|
||||
<td>
|
||||
<para style="Standard">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P14">
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
@@ -124,189 +130,145 @@
|
||||
<para style="P23">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16">
|
||||
<font face="Times-Roman">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font>
|
||||
<font face="Times-Roman">[[ o.number ]]</font>
|
||||
</para>
|
||||
<para style="P15">
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Document:</font><font face="Times-Roman">[[o.name]]</font>
|
||||
</para>
|
||||
<para style="P17">
|
||||
<font face="Times-Roman">Invoice Date: </font><font face="Times-Roman">[[ formatLang(o.date_invoice,date=True) ]]</font>
|
||||
</para>
|
||||
<para style="P18">
|
||||
<font face="Times-Roman">Customer Ref:</font> [[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,61.0,64.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
<para style="P17"><font>Document:</font><font>[[o.name]]</font></para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<para style="P17"><font>Invoice Date: </font><font>[[ formatLang(o.date_invoice,date=True) ]]</font></para>
|
||||
<para style="P18"><font>Customer Ref:</font> [[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="P8b"><font color="white"> </font></para>
|
||||
<blockTable colWidths="212.0,62.0,62.0,70.0,61.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td><para style="P3">Description</para></td>
|
||||
<td><para style="P4">Taxes</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P4a">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P20">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="0.0,216.0,61.0,30.0,16.0,31.0,31.0,61.0,39.0,25.0" style="Tableau7">
|
||||
<blockTable colWidths="0.0,221.5,60.0,31.0,16.0,31.0,39.0,61.0,45.0,23.0" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para><font color="white"></font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['currency'] ]]</para>
|
||||
</td>
|
||||
<td><para style="P8">[[ a['type']=='text' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P8a">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]]</para></td>
|
||||
<td><para style="P8a">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['tax_types'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['uos'] ]]</para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para></td>
|
||||
<td><para style="Table Contents1">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_subtotal'] ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['currency'] ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">[[ format(a['note'] or '') ]]</para></td>
|
||||
<td><para style="P8a"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents1"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P21"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ note or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<blockTable colWidths="216.0,62.0,62.0,62.0,51.0,74.0" style="Tableau6">
|
||||
<blockTable colWidths="212.0,62.0,62.0,70.0,61.0,74.0" style="Tableau6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Price</para>
|
||||
</td>
|
||||
<td><para style="P3">Description [[ a['type']!='break' and removeParentNode('blockTable')]]</para></td>
|
||||
<td><para style="P4">Taxes</para></td>
|
||||
<td><para style="P4">Quantity</para></td>
|
||||
<td><para style="P4">Unit Price</para></td>
|
||||
<td><para style="P4">Disc. (%)</para></td>
|
||||
<td><para style="P4a">Price</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
<blockTable colWidths="215.0,313.0" style="Tableau3">
|
||||
<blockTable colWidths="340.0,191.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="81.0,73.0,60.0" style="Tableau4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10">Tax</para>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11a"><font face="Times-Roman" size="2.0">[[ repeatIn(o.tax_line,'t') ]]</font> [[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ '%.2f' % t.base ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ '%.2f' % t.amount]]</para>
|
||||
<blockTable colWidths="110.0,81.0" style="Tableau5">
|
||||
<tr>
|
||||
<td><para style="P13">Total (Excl. taxes):</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Taxes:</para></td>
|
||||
<td><para style="P12"><u>[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P13">Total <font>(Incl. taxes):</font></para></td>
|
||||
<td><para style="P22"><u>[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="214.0,95.0" style="Tableau5">
|
||||
<blockTable colWidths="251.0,290.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P7">Total (excl. taxes):</para>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau4">
|
||||
<tr>
|
||||
<td><para style="P10">Tax</para></td>
|
||||
<td><para style="P8">Base</para></td>
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font>[[ repeatIn(o.tax_line,'t') ]]</font>[[ t.name ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]]</para>
|
||||
<blockTable colWidths="81.0,73.0,65.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="P10"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P7">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Total <font face="Times-Roman">(incl. taxes):</font>
|
||||
</blockTable>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P22">[[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para>
|
||||
<para style="P19">[[ note or removeParentNode('para') ]]</para>
|
||||
|
||||
+43
-35
@@ -22,6 +22,7 @@
|
||||
|
||||
from mx import DateTime
|
||||
import time
|
||||
import math
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
@@ -34,50 +35,57 @@ class hr_timesheet_group(osv.osv):
|
||||
'timesheet_id' : fields.one2many('hr.timesheet', 'tgroup_id', 'Working Time'),
|
||||
'manager' : fields.many2one('res.users', 'Workgroup manager'),
|
||||
}
|
||||
#
|
||||
# TODO: improve; very slow !
|
||||
# bug if transition to another period
|
||||
#
|
||||
def interval_min_get(self, cr, uid, id, dt_from, hours):
|
||||
if not id:
|
||||
return [(dt_from-DateTime.RelativeDateTime(hours=int(hours)*3), dt_from)]
|
||||
todo = hours
|
||||
cycle = 0
|
||||
result = []
|
||||
maxrecur = 100
|
||||
current_hour = dt_from.hour
|
||||
while (todo>0) and maxrecur:
|
||||
cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%s order by hour_from desc", (dt_from.day_of_week,id))
|
||||
for (hour_from,hour_to) in cr.fetchall():
|
||||
if (hour_from<current_hour) and (todo>0):
|
||||
m = min(hour_to, current_hour)
|
||||
if (m-hour_from)>todo:
|
||||
hour_from = m-todo
|
||||
d1 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,int(math.floor(hour_from)),int((hour_from%1) * 60))
|
||||
d2 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,int(math.floor(m)),int((m%1) * 60))
|
||||
result.append((d1, d2))
|
||||
current_hour = hour_from
|
||||
todo -= (m-hour_from)
|
||||
dt_from -= DateTime.RelativeDateTime(days=1)
|
||||
current_hour = 24
|
||||
maxrecur -= 1
|
||||
result.reverse()
|
||||
return result
|
||||
|
||||
def interval_get(self, cr, uid, id, dt_from, hours, byday=True):
|
||||
if not id:
|
||||
return [(dt_from,dt_from+DateTime.RelativeDateTime(hours=int(hours)*3))]
|
||||
todo = hours
|
||||
cycle = 0
|
||||
result = []
|
||||
while todo>0:
|
||||
maxrecur = 100
|
||||
current_hour = dt_from.hour
|
||||
while (todo>0) and maxrecur:
|
||||
cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%s order by hour_from", (dt_from.day_of_week,id))
|
||||
for (hour_from,hour_to) in cr.fetchall():
|
||||
|
||||
import math
|
||||
|
||||
hour_from = '%02d:%02d' % (math.floor(abs(hour_from)),round(abs(hour_from)%1+0.01,2) * 60)
|
||||
hour_to = '%02d:%02d' % (math.floor(abs(hour_to)),round(abs(hour_to)%1+0.01,2) * 60)
|
||||
|
||||
h1,m1 = map(int,hour_from.split(':'))
|
||||
h2,m2 = map(int,hour_to.split(':'))
|
||||
d1 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,h1,m1)
|
||||
d2 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,h2,m2)
|
||||
if dt_from<d2:
|
||||
date1 = max(dt_from,d1)
|
||||
if date1+DateTime.RelativeDateTime(hours=todo)<=d2:
|
||||
result.append((date1, date1+DateTime.RelativeDateTime(hours=todo)))
|
||||
todo = 0
|
||||
else:
|
||||
todo -= (d2-date1).hours
|
||||
result.append((date1, d2))
|
||||
dt_from = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day)+DateTime.RelativeDateTime(days=1)
|
||||
cycle+=1
|
||||
if cycle>7 and todo==hours:
|
||||
return [(dt_from,dt_from+DateTime.RelativeDateTime(hours=hours*3))]
|
||||
if byday:
|
||||
i = 1
|
||||
while i<len(result):
|
||||
if (result[i][0]-result[i-1][1]).days<1:
|
||||
result[i-1]=(result[i-1][0],result[i][1])
|
||||
del result[i]
|
||||
else:
|
||||
i+=1
|
||||
if (hour_to>current_hour) and (todo>0):
|
||||
m = max(hour_from, current_hour)
|
||||
if (hour_to-m)>todo:
|
||||
hour_to = m+todo
|
||||
d1 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,int(math.floor(m)),int((m%1) * 60))
|
||||
d2 = DateTime.DateTime(dt_from.year,dt_from.month,dt_from.day,int(math.floor(hour_to)),int((hour_to%1) * 60))
|
||||
result.append((d1, d2))
|
||||
current_hour = hour_to
|
||||
todo -= (hour_to - m)
|
||||
dt_from += DateTime.RelativeDateTime(days=1)
|
||||
current_hour = 0
|
||||
maxrecur -= 1
|
||||
return result
|
||||
|
||||
hr_timesheet_group()
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<!-- Demo data for Accounts -->
|
||||
<record id="account_account_membershipparent" model="account.account">
|
||||
<field name="name">membership</field>
|
||||
<field name="code">0</field>
|
||||
<field name="code">Membership-0</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<!--<field eval="1" name="sign"/>-->
|
||||
<field eval="1" name="active"/>
|
||||
@@ -36,7 +36,7 @@
|
||||
</record>
|
||||
<record id="account_account_membershipaccount0" model="account.account">
|
||||
<field name="name">membership account</field>
|
||||
<field name="code">1254</field>
|
||||
<field name="code">Membership-1254</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<!--<field eval="1" name="sign"/>-->
|
||||
<field eval="1" name="active"/>
|
||||
|
||||
+13
-4
@@ -380,6 +380,12 @@ class mrp_production(osv.osv):
|
||||
result[prod.id]['cycle_total'] += wc.cycle
|
||||
return result
|
||||
|
||||
def _production_date_end(self, cr, uid, ids, prop, unknow_none, context={}):
|
||||
result = {}
|
||||
for prod in self.browse(cr, uid, ids, context=context):
|
||||
result[prod.id] = prod.date_planned
|
||||
return result
|
||||
|
||||
def _production_date(self, cr, uid, ids, prop, unknow_none, context={}):
|
||||
result = {}
|
||||
for prod in self.browse(cr, uid, ids, context=context):
|
||||
@@ -408,7 +414,8 @@ class mrp_production(osv.osv):
|
||||
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True,
|
||||
help="Location where the system will stock the finished products."),
|
||||
|
||||
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Planned Date'),
|
||||
'date_planned_end': fields.function(_production_date_end, method=True, type='date', string='Scheduled End'),
|
||||
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'),
|
||||
'date_planned': fields.datetime('Scheduled date', required=True, select=1),
|
||||
'date_start': fields.datetime('Start Date'),
|
||||
'date_finnished': fields.datetime('End Date'),
|
||||
@@ -456,7 +463,8 @@ class mrp_production(osv.osv):
|
||||
default.update({
|
||||
'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'),
|
||||
'move_lines' : [],
|
||||
'move_created_ids': []
|
||||
'move_created_ids': [],
|
||||
'state': 'draft'
|
||||
})
|
||||
return super(mrp_production, self).copy(cr, uid, id, default, context)
|
||||
|
||||
@@ -722,9 +730,10 @@ stock_move()
|
||||
|
||||
class mrp_production_workcenter_line(osv.osv):
|
||||
_name = 'mrp.production.workcenter.line'
|
||||
_description = 'Production workcenters used'
|
||||
_description = 'Work Orders'
|
||||
_order = 'sequence'
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
'name': fields.char('Work Order', size=64, required=True),
|
||||
'workcenter_id': fields.many2one('mrp.workcenter', 'Workcenter', required=True),
|
||||
'cycle': fields.float('Nbr of cycle', digits=(16,2)),
|
||||
'hour': fields.float('Nbr of hour', digits=(16,2)),
|
||||
|
||||
@@ -409,9 +409,9 @@
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="type">gantt</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt color="product_id" date_delay="hour_total" date_start="date_planned" string="Productions">
|
||||
<gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
|
||||
<level object="mrp.routing" link="routing_id" domain="[]">
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
</level>
|
||||
</gantt>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# dmr Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -39,22 +39,53 @@ from tools.translate import _
|
||||
# TODO: Work Center may be recursive ?
|
||||
#
|
||||
|
||||
class stock_move(osv.osv):
|
||||
_inherit = 'stock.move'
|
||||
_columns = {
|
||||
'move_dest_id_lines': fields.one2many('stock.move','move_dest_id', 'Children Moves')
|
||||
}
|
||||
stock_move()
|
||||
|
||||
class mrp_production_workcenter_line(osv.osv):
|
||||
def _get_date_date(self, cr, uid, ids, field_name, arg, context):
|
||||
res={}
|
||||
for op in self.browse(cr, uid, ids, context=context):
|
||||
if op.date_start:
|
||||
res[op.id] = op.date_start[:10]
|
||||
else:
|
||||
res[op.id]=False
|
||||
return res
|
||||
def _get_date_end(self, cr, uid, ids, field_name, arg, context):
|
||||
res={}
|
||||
for op in self.browse(cr, uid, ids, context=context):
|
||||
d = DateTime.strptime(op.date_planned,'%Y-%m-%d %H:%M:%S')
|
||||
i = self.pool.get('hr.timesheet.group').interval_get(cr, uid, op.workcenter_id.timesheet_id.id or False, d, op.hour or 0.0)
|
||||
if i:
|
||||
res[op.id] = i[-1][1].strftime('%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
res[op.id] = op.date_planned
|
||||
return res
|
||||
_inherit = 'mrp.production.workcenter.line'
|
||||
_columns = {
|
||||
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True),
|
||||
'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'),
|
||||
'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'),
|
||||
'date_planned': fields.datetime('Scheduled Date'),
|
||||
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
|
||||
'date_start': fields.datetime('Start Date'),
|
||||
'date_finnished': fields.datetime('End Date'),
|
||||
'delay': fields.char('Delay',size=128,help="This is delay between operation start and stop in this workcenter",readonly=True),
|
||||
'production_state':fields.related('production_id','state',type='char',string='Prod.State'),
|
||||
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product'),
|
||||
'qty':fields.related('production_id','product_qty',type='float',string='Qty'),
|
||||
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM'),
|
||||
'delay': fields.float('Working Hours',help="This is delay between operation start and stop in this workcenter",readonly=True),
|
||||
'production_state':fields.related('production_id','state',
|
||||
type='selection',
|
||||
selection=[('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
|
||||
string='Prod.State', readonly=True),
|
||||
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
|
||||
readonly=True),
|
||||
'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True),
|
||||
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM',readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'delay': lambda *a: '0 Days 0 hrs and 0 mins'
|
||||
'delay': lambda *a: 0.0
|
||||
}
|
||||
|
||||
def modify_production_order_state(self,cr,uid,ids,action):
|
||||
@@ -82,17 +113,28 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
wf_service.trg_validate(uid, 'mrp.production', oper_obj.production_id.id, 'button_produce_done', cr)
|
||||
return
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}, update=True):
|
||||
result = super(mrp_production_workcenter_line, self).write(cr, uid, ids, vals, context=context)
|
||||
if vals.get('date_planned', False) and update:
|
||||
pids = {}
|
||||
pids2 = {}
|
||||
for prod in self.browse(cr, uid, ids, context=context):
|
||||
if prod.production_id.workcenter_lines:
|
||||
dstart = min(vals['date_planned'], prod.production_id.workcenter_lines[0]['date_planned'])
|
||||
self.pool.get('mrp.production').write(cr, uid, [prod.production_id.id], {'date_start':dstart}, context=context, mini=False)
|
||||
return result
|
||||
|
||||
def action_draft(self, cr, uid, ids):
|
||||
self.write(cr, uid, ids, {'state':'draft'})
|
||||
return True
|
||||
|
||||
def action_start_working(self, cr, uid, ids):
|
||||
self.modify_production_order_state(cr,uid,ids,'start')
|
||||
self.write(cr, uid, ids, {'state':'startworking'})
|
||||
self.write(cr, uid, ids, {'state':'startworking', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return True
|
||||
|
||||
def action_done(self, cr, uid, ids):
|
||||
self.write(cr, uid, ids, {'state':'done'})
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_finnished': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
self.modify_production_order_state(cr,uid,ids,'done')
|
||||
return True
|
||||
|
||||
@@ -111,9 +153,18 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
mrp_production_workcenter_line()
|
||||
|
||||
class mrp_production(osv.osv):
|
||||
_name = 'mrp.production'
|
||||
_inherit = 'mrp.production'
|
||||
_description = 'Production'
|
||||
_columns = {
|
||||
'allow_reorder': fields.boolean('Free Serialisation', help="Check this to be able to move independently all production orders, without moving dependent ones."),
|
||||
}
|
||||
|
||||
def _production_date_end(self, cr, uid, ids, prop, unknow_none, context={}):
|
||||
result = {}
|
||||
for prod in self.browse(cr, uid, ids, context=context):
|
||||
result[prod.id] = prod.date_planned
|
||||
for line in prod.workcenter_lines:
|
||||
result[prod.id] = max(line.date_planned_end, result[prod.id])
|
||||
return result
|
||||
|
||||
def action_production_end(self, cr, uid, ids):
|
||||
obj=self.browse(cr,uid,ids)[0]
|
||||
@@ -127,6 +178,108 @@ class mrp_production(osv.osv):
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_cancel(cr,uid,[workcenter_line.id])
|
||||
return super(mrp_production,self).action_cancel(cr,uid,ids)
|
||||
|
||||
def _compute_planned_workcenter(self, cr, uid, ids, context={}, mini=False):
|
||||
dt_end = DateTime.now()
|
||||
for po in self.browse(cr, uid, ids, context=context):
|
||||
dt_end = DateTime.strptime(po.date_start or po.date_planned, '%Y-%m-%d %H:%M:%S')
|
||||
if not po.date_start:
|
||||
self.write(cr, uid, [po.id], {
|
||||
'date_start': po.date_planned
|
||||
}, context=context, update=False)
|
||||
old = None
|
||||
for wci in range(len(po.workcenter_lines)):
|
||||
wc = po.workcenter_lines[wci]
|
||||
if (old is None) or (wc.sequence>old):
|
||||
dt = dt_end
|
||||
if context.get('__last_update'):
|
||||
del context['__last_update']
|
||||
if (wc.date_planned<dt.strftime('%Y-%m-%d %H:%M:%S')) or mini:
|
||||
self.pool.get('mrp.production.workcenter.line').write(cr, uid, [wc.id], {
|
||||
'date_planned':dt.strftime('%Y-%m-%d %H:%M:%S')
|
||||
}, context=context, update=False)
|
||||
i = self.pool.get('hr.timesheet.group').interval_get(
|
||||
cr,
|
||||
uid,
|
||||
wc.workcenter_id.timesheet_id and wc.workcenter_id.timesheet_id.id or False,
|
||||
dt,
|
||||
wc.hour or 0.0
|
||||
)
|
||||
if i:
|
||||
dt_end = max(dt_end, i[-1][1])
|
||||
else:
|
||||
dt_end = DateTime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
|
||||
old = wc.sequence or 0
|
||||
super(mrp_production, self).write(cr, uid, [po.id], {
|
||||
'date_finnished': dt_end
|
||||
})
|
||||
return dt_end
|
||||
|
||||
def _move_pass(self, cr, uid, ids, context={}):
|
||||
for po in self.browse(cr, uid, ids, context):
|
||||
if po.allow_reorder:
|
||||
continue
|
||||
todo = po.move_lines
|
||||
dt = DateTime.strptime(po.date_start,'%Y-%m-%d %H:%M:%S')
|
||||
while todo:
|
||||
l = todo.pop(0)
|
||||
if l.state in ('done','cancel','draft'):
|
||||
continue
|
||||
todo += l.move_dest_id_lines
|
||||
if l.production_id and (l.production_id.date_finnished>dt):
|
||||
if l.production_id.state not in ('done','cancel'):
|
||||
for wc in l.production_id.workcenter_lines:
|
||||
i = self.pool.get('hr.timesheet.group').interval_min_get(
|
||||
cr,
|
||||
uid,
|
||||
wc.workcenter_id.timesheet_id.id or False,
|
||||
dt, wc.hour or 0.0
|
||||
)
|
||||
dt = i[0][0]
|
||||
if l.production_id.date_start>dt.strftime('%Y-%m-%d %H:%M:%S'):
|
||||
self.write(cr, uid, [l.production_id.id], {'date_start':dt.strftime('%Y-%m-%d %H:%M:%S')}, mini=True)
|
||||
return True
|
||||
|
||||
def _move_futur(self, cr, uid, ids, context={}):
|
||||
for po in self.browse(cr, uid, ids, context):
|
||||
if po.allow_reorder:
|
||||
continue
|
||||
for line in po.move_created_ids:
|
||||
l = line
|
||||
while l.move_dest_id:
|
||||
l = l.move_dest_id
|
||||
if l.state in ('done','cancel','draft'):
|
||||
break
|
||||
if l.production_id.state in ('done','cancel'):
|
||||
break
|
||||
if l.production_id and (l.production_id.date_start<po.date_finnished):
|
||||
self.write(cr, uid, [l.production_id.id], {'date_start':po.date_finnished})
|
||||
break
|
||||
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}, update=True, mini=True):
|
||||
direction = {}
|
||||
if vals.get('date_start', False):
|
||||
for po in self.browse(cr, uid, ids, context=context):
|
||||
direction[po.id] = cmp(po.date_start, vals.get('date_start', False))
|
||||
result = super(mrp_production, self).write(cr, uid, ids, vals, context=context)
|
||||
if (vals.get('workcenter_lines', False) or vals.get('date_start', False)) and update:
|
||||
self._compute_planned_workcenter(cr, uid, ids, context=context, mini=mini)
|
||||
for d in direction:
|
||||
if direction[d]==1:
|
||||
# the production order has been moved to the passed
|
||||
self._move_pass(cr, uid, [d], context=context)
|
||||
pass
|
||||
elif direction[d]==-1:
|
||||
self._move_futur(cr, uid, [d], context=context)
|
||||
# the production order has been moved to the future
|
||||
pass
|
||||
return result
|
||||
|
||||
def action_compute(self, cr, uid, ids, properties=[]):
|
||||
result = super(mrp_production, self).action_compute(cr, uid, ids, properties=properties)
|
||||
self._compute_planned_workcenter(cr, uid, ids, context={})
|
||||
return result
|
||||
|
||||
mrp_production()
|
||||
|
||||
class mrp_operations_operation_code(osv.osv):
|
||||
@@ -168,31 +321,17 @@ class mrp_operations_operation(osv.osv):
|
||||
|
||||
code_lst.append(code.start_stop)
|
||||
time_lst.append(vals['date_start'])
|
||||
h=m=s=days=0
|
||||
diff = 0
|
||||
for i in range(0,len(code_lst)):
|
||||
if code_lst[i]=='pause' or code_lst[i]=='done' or code_lst[i]=='cancel':
|
||||
if code_lst[i]=='cancel' and code_lst[i-1]=='pause':
|
||||
if not i: continue
|
||||
if code_lst[i-1] not in ('resume','start'):
|
||||
continue
|
||||
a=datetime.datetime(int(time_lst[i-1][0:4]),int(time_lst[i-1][5:7]),int(time_lst[i-1][8:10]),int(time_lst[i-1][11:13]),int(time_lst[i-1][14:16]),int(time_lst[i-1][17:19]))
|
||||
b=datetime.datetime(int(time_lst[i][0:4]),int(time_lst[i][5:7]),int(time_lst[i][8:10]),int(time_lst[i][11:13]),int(time_lst[i][14:16]),int(time_lst[i][17:19]))
|
||||
diff =b-a
|
||||
min, sec = divmod(diff.seconds, 60)
|
||||
hrs, min = divmod(min, 60)
|
||||
days+=diff.days
|
||||
h+=hrs
|
||||
m+=min
|
||||
s+=sec
|
||||
if s>=60:
|
||||
m+=1
|
||||
s=0
|
||||
if m>=60:
|
||||
h+=1
|
||||
m=0
|
||||
if h>=24:
|
||||
days+=1
|
||||
h=0
|
||||
delay=str(days) +" Days "+ str(h) + " hrs and " + str(m)+ " mins"
|
||||
return delay
|
||||
a = datetime.datetime.strptime(time_lst[i-1],'%Y:%m:%d %H:%M:%S')
|
||||
b = datetime.datetime.strptime(time_lst[i],'%Y:%m:%d %H:%M:%S')
|
||||
diff += (b-a).days * 24
|
||||
diff += (b-a).seconds / (60*60)
|
||||
return diff
|
||||
|
||||
def check_operation(self,cr,uid,vals):
|
||||
code_ids=self.pool.get('mrp_operations.operation.code').search(cr,uid,[('id','=',vals['code_id'])])
|
||||
@@ -300,8 +439,8 @@ class mrp_operations_operation(osv.osv):
|
||||
'order_date': fields.function(_get_order_date,method=True,string='Order Date',type='date',store={'mrp.production':(_order_date_search_production,['date_planned'], 10)}),
|
||||
}
|
||||
_defaults={
|
||||
'date_start': lambda *a:DateTime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
'date_start': lambda *a:DateTime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
|
||||
mrp_operations_operation()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Work Orders">
|
||||
<field name="production_id"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="product"/>
|
||||
<field name="qty"/>
|
||||
<field name="uom"/>
|
||||
@@ -31,22 +32,52 @@
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Work Orders">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field colspan="4" name="workcenter_id" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="cycle"/>
|
||||
<field name="hour"/>
|
||||
<field name="production_id"/>
|
||||
<field name="delay"/>
|
||||
<group colspan="8" col="8">
|
||||
<field name="state" select="2"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel"/>
|
||||
<button name="button_start_working" string="Start working" states="draft"/>
|
||||
<button name="button_resume" string="Resume" states="pause"/>
|
||||
<button name="button_done" string="Finished" states="startworking"/>
|
||||
<button name="button_pause" string="Pause" states="startworking"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking"/>
|
||||
<group col="6" colspan="4">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="workcenter_id" select="1"/>
|
||||
<field name="production_id"/>
|
||||
<field name="production_state"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Planned Date" colspan="2"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_planned_end"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Duration" colspan="2"/>
|
||||
<field name="cycle"/>
|
||||
<field name="hour" widget="float_time"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Real" colspan="2"/>
|
||||
<field name="date_start" readonly="1"/>
|
||||
<field name="date_finnished" readonly="1"/>
|
||||
<field name="delay" widget="float_time"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Product to Produce" colspan="2"/>
|
||||
<field name="product"/>
|
||||
<field name="qty"/>
|
||||
<field name="uom"/>
|
||||
</group>
|
||||
|
||||
<separator string="Status" colspan="4"/>
|
||||
<group colspan="8" col="8">
|
||||
<field name="state" select="2"/>
|
||||
<button name="button_draft" string="Set Draft" states="cancel"/>
|
||||
<button name="button_start_working" string="Start" states="draft"/>
|
||||
<button name="button_resume" string="Resume" states="pause"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,startworking"/>
|
||||
<button name="button_pause" string="Pause" states="startworking"/>
|
||||
<button name="button_done" string="Finished" states="startworking"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -69,8 +100,9 @@
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
<field name="type">gantt</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt color="workcenter_id" date_delay="hour" date_start="date_planned" string="Operations">
|
||||
<level object="product.product" link="product" domain="[]">
|
||||
<gantt color="production_id" date_stop="date_planned_end" date_start="date_planned" string="Operations">
|
||||
<level object="mrp.workcenter" link="workcenter_id" domain="[]">
|
||||
<field name="product"/>
|
||||
<field name="production_id"/>
|
||||
</level>
|
||||
</gantt>
|
||||
@@ -99,6 +131,17 @@
|
||||
<field name="view_mode">tree,form,graph,calendar,gantt</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="mrp_production_wc_action_planning">
|
||||
<field name="name">Work Orders Planning</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production.workcenter.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
|
||||
<field name="view_mode">gantt,tree,form,graph,calendar</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Action for Confirm Operations -->
|
||||
|
||||
<record model="ir.actions.act_window" id="mrp_production_wc_confirm_action">
|
||||
@@ -133,6 +176,7 @@
|
||||
<menuitem name="All Work Orders" parent="mrp.menu_mrp_root" id="menu_mrp_production_wc_action" action="mrp_production_wc_action"/>
|
||||
<menuitem name="Work Orders to Do" parent="menu_mrp_production_wc_action" action="mrp_production_wc_confirm_action" id="menu_mrp_production_wc_confirm_action"/>
|
||||
<menuitem name="Future Work Orders" parent="menu_mrp_production_wc_action" action="mrp_production_wc_draft_action" id="menu_mrp_production_wc_draft_action"/>
|
||||
<menuitem parent="menu_mrp_production_wc_action" action="mrp_production_wc_action_planning" id="menu_mrp_production_wc_draft_action_planning"/>
|
||||
|
||||
<!-- Operation codes -->
|
||||
|
||||
@@ -196,9 +240,10 @@
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Graph view in hours by workcenter" type="bar">
|
||||
<field name="workcenter_id"/>
|
||||
<graph string="Hours by Workcenter" type="bar">
|
||||
<field name="date_start_date"/>
|
||||
<field name="hour" operator="+"/>
|
||||
<field name="workcenter_id" group="True" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
@@ -233,6 +278,18 @@
|
||||
id="menu_mrp_production_operation_action"
|
||||
action="mrp_production_operation_action"/>
|
||||
|
||||
<record id="mrp_production_reorder_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.production.allow_reorder.form</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="priority" position="after">
|
||||
<field name="allow_reorder"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="operation_calendar_view">
|
||||
<field name="name">mrp.perations.calendar</field>
|
||||
<field name="model">mrp_operations.operation</field>
|
||||
|
||||
Reference in New Issue
Block a user