[MERGE] Merge with lp:openobject-addons
bzr revid: sbh@tinyerp.com-20100916091916-jxpuz325aov5dbm1
This commit is contained in:
@@ -29,6 +29,25 @@ import decimal_precision as dp
|
||||
|
||||
class account_bank_statement(osv.osv):
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
seq = 0
|
||||
if 'line_ids' in vals:
|
||||
for line in vals['line_ids']:
|
||||
seq += 1
|
||||
line[2]['sequence'] = seq
|
||||
vals[seq - 1] = line
|
||||
return super(account_bank_statement, self).create(cr, uid, vals, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
res = super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
|
||||
for statement in self.browse(cr, uid, ids, context):
|
||||
seq = 0
|
||||
for line in statement.line_ids:
|
||||
seq += 1
|
||||
if not line.sequence:
|
||||
self.pool.get('account.bank.statement.line').write(cr, uid, [line.id], {'sequence': seq}, context=context)
|
||||
return res
|
||||
|
||||
def button_import_invoice(self, cr, uid, ids, context=None):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
@@ -141,7 +160,7 @@ class account_bank_statement(osv.osv):
|
||||
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
|
||||
states={'confirm':[('readonly', True)]}),
|
||||
'balance_end': fields.function(_end_balance, method=True, string='Balance'),
|
||||
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, required=True),
|
||||
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
'line_ids': fields.one2many('account.bank.statement.line',
|
||||
'statement_id', 'Statement lines',
|
||||
states={'confirm':[('readonly', True)]}),
|
||||
@@ -711,13 +730,12 @@ class account_bank_statement_line(osv.osv):
|
||||
'reconcile_amount': fields.function(_reconcile_amount,
|
||||
string='Amount reconciled', method=True, type='float'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement lines."),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, required=True),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'type': lambda *a: 'general',
|
||||
'sequence': lambda *a: 10,
|
||||
}
|
||||
|
||||
account_bank_statement_line()
|
||||
|
||||
@@ -204,7 +204,6 @@ class account_cash_statement(osv.osv):
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'company_id':fields.many2one('res.company', 'Company', required=True, states={'draft': [('readonly', False)]}, readonly=True,),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, domain=[('type', '=', 'cash')]),
|
||||
'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
|
||||
'state': fields.selection(
|
||||
@@ -224,22 +223,18 @@ class account_cash_statement(osv.osv):
|
||||
'state': lambda *a: 'draft',
|
||||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'user_id': lambda self, cr, uid, context=None: uid,
|
||||
'company_id': _get_company,
|
||||
'starting_details_ids':_get_cash_open_box_lines,
|
||||
'ending_details_ids':_get_default_cash_close_box_lines
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
company_id = vals and vals.get('company_id',False)
|
||||
if company_id:
|
||||
sql = [
|
||||
('company_id', '=', vals['company_id']),
|
||||
sql = [
|
||||
('journal_id', '=', vals['journal_id']),
|
||||
('state', '=', 'open')
|
||||
]
|
||||
open_jrnl = self.search(cr, uid, sql)
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
|
||||
]
|
||||
open_jrnl = self.search(cr, uid, sql)
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
|
||||
|
||||
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash':
|
||||
lines = end_lines = self._get_cash_close_box_lines(cr, uid, [], context)
|
||||
|
||||
@@ -1117,7 +1117,6 @@ class account_move_line(osv.osv):
|
||||
context['period_id'] = m.period_id.id
|
||||
|
||||
self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
|
||||
company_currency = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
move_id = vals.get('move_id', False)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])
|
||||
is_new_move = False
|
||||
@@ -1156,7 +1155,10 @@ class account_move_line(osv.osv):
|
||||
if a.id == vals['account_id']:
|
||||
ok = True
|
||||
break
|
||||
if (account.currency_id) and 'amount_currency' not in vals and account.currency_id.id <> company_currency:
|
||||
|
||||
# Automatically convert in the account's secondary currency if there is one and
|
||||
# the provided values were not already multi-currency
|
||||
if account.currency_id and 'amount_currency' not in vals and account.currency_id.id != account.company_id.currency_id.id:
|
||||
vals['currency_id'] = account.currency_id.id
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
ctx = {}
|
||||
|
||||
@@ -524,15 +524,15 @@
|
||||
<page string="Transaction">
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="sequence"/>
|
||||
<field name="sequence" readonly="1"/>
|
||||
<field name="date"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, {'amount': amount})"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="amount"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'currency_id': parent.currency, 'journal_id': parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field invisible="1" name="reconcile_amount"/>
|
||||
</tree>
|
||||
@@ -546,7 +546,7 @@
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="sequence"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -24,7 +24,6 @@ import analytic_balance
|
||||
import inverted_analytic_balance
|
||||
import cost_ledger
|
||||
import quantity_cost_ledger
|
||||
import analytic_check
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity \
|
||||
FROM account_analytic_line AS aal, account_account AS aa \
|
||||
WHERE (aal.general_account_id=aa.id) \
|
||||
AND (aal.account_id IN aal.account_id IN %s)\
|
||||
AND (aal.account_id IN %s)\
|
||||
AND (date>=%s) AND (date<=%s) AND aa.active \
|
||||
GROUP BY aal.general_account_id, aa.name, aa.code, aal.code \
|
||||
ORDER BY aal.code", (tuple(ids), date1, date2))
|
||||
@@ -101,7 +101,7 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
self.acc_data_dict[account_id] = ids
|
||||
else:
|
||||
ids = self.acc_data_dict[account_id]
|
||||
|
||||
|
||||
query_params = (tuple(ids), date1, date2)
|
||||
if option == "credit" :
|
||||
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \
|
||||
|
||||
@@ -3,37 +3,6 @@
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Balance" author="OpenERP S.A. (sales@openerp.com)" 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">Analytic Balance - [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</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>
|
||||
@@ -41,156 +10,216 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockTableStyle id="Table_Header_analytic">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="#b3b3b3" start="0,2" stop="1,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,3" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Header_Tile">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_data">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.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="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="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="0.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_right_bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
|
||||
<blockTable colWidths="57.0,280.0,50.0,50.0,50.0,50.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Code</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_Right">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Total</para>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right"><u>[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'debit')) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right"><u>[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right"><u>[[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right"><u>[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(get_objects(data['form']['empty_acc']),'o') ]]</para>
|
||||
<blockTable colWidths="57.0,280.0,50.0,50.0,50.0,50.0" style="tbl_data">
|
||||
<tr>
|
||||
<blockTable colWidths="482.0" style="Table_Header_analytic">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8_bold">[[ o['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8_bold">[[ o['complete_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8_right_bold"><u>[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'], 'debit')) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8_right_bold"><u>[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'], 'credit')) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8_right_bold"><u>[[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8_right_bold"><u>[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'], 'quantity')) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ repeatIn(lines_g(o['id'],data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
|
||||
<para style="terp_default_8">[[ move_g['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ move_g['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(move_g['debit'])]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(move_g['credit']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(move_g['balance'])]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(move_g['quantity']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<para style="terp_header_Centre">Analytic Balance - [[ company.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="55.0,221.0,55.0,52.0,60.0,39.0" style="Table_Header_Tile">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit<font face="Helvetica" size="8.0">([[ company.currency_id.name]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit(<font face="Helvetica" size="8.0">[[ company.currency_id.name]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance<font face="Helvetica" size="8.0">([[ company.currency_id.name]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="54.0,222.0,56.0,51.0,62.0,38.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'debit')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(get_objects(data['form']['empty_acc']),'o') ]]</para>
|
||||
<blockTable colWidths="55.0,221.0,56.0,50.0,62.0,38.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o['complete_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines_g(o['id'],data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
|
||||
<blockTable colWidths="55.0,222.0,56.0,49.0,63.0,37.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ move_g['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ move_g['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_g['credit']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_g['quantity']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,100 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
import pooler
|
||||
from report import report_sxw
|
||||
|
||||
class account_analytic_analytic_check(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_analytic_analytic_check, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_gen_deb = 0.0
|
||||
self.sum_gen_cred = 0.0
|
||||
self.sum_ana_deb = 0.0
|
||||
self.sum_ana_cred = 0.0
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines_p': self._lines_p,
|
||||
'general_debit': self._gen_deb,
|
||||
'general_credit': self._gen_cred,
|
||||
'analytic_debit': self._ana_deb,
|
||||
'analytic_credit': self._ana_cred,
|
||||
'delta_debit': self._delta_deb,
|
||||
'delta_credit': self._delta_cred,
|
||||
})
|
||||
def _lines_p(self, date1, date2):
|
||||
res = []
|
||||
acc_obj = self.pool.get('account.account')
|
||||
|
||||
for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code']):
|
||||
self.cr.execute("SELECT sum(debit), sum(credit) \
|
||||
FROM account_move_line \
|
||||
WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %s", (date1, date2, a['id']))
|
||||
(gd, gc) = self.cr.fetchone()
|
||||
gd = gd or 0.0
|
||||
gc = gc or 0.0
|
||||
|
||||
self.cr.execute("SELECT abs(sum(amount)) AS balance \
|
||||
FROM account_analytic_line \
|
||||
WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %s", (date1, date2, a['id']))
|
||||
(ad,) = self.cr.fetchone()
|
||||
ad = ad or 0.0
|
||||
self.cr.execute("SELECT abs(sum(amount)) AS balance \
|
||||
FROM account_analytic_line \
|
||||
WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %s", (date1, date2, a['id']))
|
||||
(ac,) = self.cr.fetchone()
|
||||
ac = ac or 0.0
|
||||
|
||||
res.append({'code': a['code'], 'name': a['name'],
|
||||
'gen_debit': gd,
|
||||
'gen_credit': gc,
|
||||
'ana_debit': ad,
|
||||
'ana_credit': ac,
|
||||
'delta_debit': gd - ad,
|
||||
'delta_credit': gc - ac,})
|
||||
self.sum_gen_deb += gd
|
||||
self.sum_gen_cred += gc
|
||||
self.sum_ana_deb += ad
|
||||
self.sum_ana_cred += ac
|
||||
|
||||
return res
|
||||
|
||||
def _gen_deb(self, date1, date2):
|
||||
return self.sum_gen_deb
|
||||
|
||||
def _gen_cred(self, date1, date2):
|
||||
return self.sum_gen_cred
|
||||
|
||||
def _ana_deb(self, date1, date2):
|
||||
return self.sum_ana_deb
|
||||
|
||||
def _ana_cred(self, date1, date2):
|
||||
return self.sum_ana_cred
|
||||
|
||||
def _delta_deb(self, date1, date2):
|
||||
return (self._gen_deb(date1,date2)-self._ana_deb(date1,date2))
|
||||
|
||||
def _delta_cred(self, date1, date2):
|
||||
return (self._gen_cred(date1,date2)-self._ana_cred(date1,date2))
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account.analytic.account', 'addons/account/project/report/analytic_check.rml',parser=account_analytic_analytic_check, header="internal")
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -169,19 +169,19 @@
|
||||
<blockTable colWidths="63.0,249.0,57.0,57.0,57.0" style="Table_Header_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date or Code</para>
|
||||
<para style="terp_tblheader_Details">Date/Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">J.C. or Move name</para>
|
||||
<para style="terp_tblheader_Details">J.C. /Move name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit </para>
|
||||
<para style="terp_tblheader_Details_Right">Debit([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
<para style="terp_tblheader_Details_Right">Credit([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
<para style="terp_tblheader_Details_Centre">Balance([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -199,13 +199,13 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -223,13 +223,13 @@
|
||||
<para style="terp_default_Bold_9">[[ o.complete_name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -247,13 +247,13 @@
|
||||
<para style="terp_default_Bold_9">[[ move_g['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['debit']) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['debit']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['credit']) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['credit']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['balance']) ]]</para>
|
||||
<para style="terp_Default_Bold_Right_9_U">[[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -274,13 +274,13 @@
|
||||
<para style="terp_default_9_Italic">[[ move_a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['debit'] )]]</para>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['debit'] )]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['credit']) ]]</para>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['credit']) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['balance']) ]]</para>
|
||||
<para style="terp_default_9_italic_Rignt">[[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<blockTable colWidths="539.0" style="Table_Title">
|
||||
<tr>
|
||||
@@ -94,10 +94,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_space">
|
||||
<para style="Text body">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="58.0,238.0,62.0,62.0,60.0,59.0" style="Table_Header_table">
|
||||
@@ -109,13 +106,13 @@
|
||||
<para style="terp_tblheader_Details">Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
<para style="terp_tblheader_Details_Right">Debit<font face="Helvetica" size="8.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
<para style="terp_tblheader_Details_Right">Credit<font face="Helvetica" size="8.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance </para>
|
||||
<para style="terp_tblheader_Details_Right">Balance<font face="Helvetica" size="8.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
@@ -136,22 +133,19 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines_g(objects,data['form']['date1'],data['form']['date2']),'move_g') ]]</para>
|
||||
<blockTable colWidths="58.0,238.0,62.0,62.0,60.0,59.0" style="Table3">
|
||||
@@ -163,22 +157,19 @@
|
||||
<para style="terp_default_Bold_9">[[ move_g['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(move_g['debit'])]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[formatLang(move_g['credit'])]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[formatLang(move_g['credit'])]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(move_g['balance'])]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[formatLang(move_g['quantity']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines_a(objects,move_g['id'],data['form']['date1'],data['form']['date2']),'move_a') ]]</para>
|
||||
<blockTable colWidths="58.0,238.0,62.0,62.0,60.0,59.0" style="Table4">
|
||||
@@ -190,16 +181,16 @@
|
||||
<para style="terp_default_9">[[ move_a['complete_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['debit']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['debit']) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['credit']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['credit']) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['balance']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['quantity'] or 0.00) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_a['quantity']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -207,12 +198,6 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Quantity Cost Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Cost Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
@@ -79,16 +79,16 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.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="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="0.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
@@ -110,12 +110,12 @@
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_Italic" fontName="Times-Italic" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_Italic_Right" fontName="Times-Italic" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_Italic" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_Italic_Right" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Rignt_9_U" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9_Right_U" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<blockTable colWidths="161.0,161.0,161.0" repeatRows="1" style="Table_Header_Detail">
|
||||
<tr>
|
||||
@@ -134,15 +134,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="161.0,161.0,161.0" style="Table_Date_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -159,13 +150,13 @@
|
||||
<blockTable colWidths="161.0,161.0,161.0" style="Table_Date_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ formatLang(data['form']['date1'],date = True) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(data['form']['date1'],date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ formatLang(data['form']['date2'],date = True) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(data['form']['date2'],date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -175,7 +166,7 @@
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="82.0,247.0,92.0,60.0" style="Table_Header_Move_Line">
|
||||
<blockTable colWidths="57.0,288.0,77.0,60.0" style="Table_Header_Move_Line">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Code/Date</para>
|
||||
@@ -191,10 +182,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="81.0,249.0,92.0,60.0" style="Table_Final_Total">
|
||||
<blockTable colWidths="57.0,288.0,77.0,60.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
@@ -214,21 +202,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="81.0,249.0,92.0,59.0" style="Table_Account_Detail">
|
||||
<blockTable colWidths="58.0,287.0,78.0,59.0" style="Table_Account_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o.code ]]<font face="Times-Roman" size="10.0"/></para>
|
||||
<para style="terp_default_Bold_9">[[ o.code ]]<font face="Helvetica" size="10.0"/></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o.complete_name ]]<font face="Times-Roman" size="10.0"/></para>
|
||||
<para style="terp_default_Bold_9">[[ o.complete_name ]]<font face="Helvetica" size="10.0"/></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Max Qty: [[ formatLang (o.quantity_max )]]</para>
|
||||
@@ -238,15 +220,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2'],data['form']['journal']),'move_g') ]]</para>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="81.0,342.0,59.0" style="Table_Analytical_Detail">
|
||||
<blockTable colWidths="58.0,365.0,59.0" style="Table_Analytical_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ move_g['code'] ]] </para>
|
||||
@@ -259,7 +235,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="81.0,51.0,290.0,59.0" style="Table_Move_Line_Content">
|
||||
<blockTable colWidths="59.0,32.0,332.0,59.0" style="Table_Move_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_Italic">[[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2'],data['form']['journal']),'move_a') ]]</para>
|
||||
@@ -280,15 +256,6 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -132,7 +132,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
history = []
|
||||
for i in range(5):
|
||||
args_list = (tuple(self.ACCOUNT_TYPE), tuple(partner_ids) ,self.date_from,)
|
||||
dates_query = '(COALESCE(date_maturity,date)'
|
||||
dates_query = "(COALESCE(date_maturity,date)"
|
||||
if form[str(i)]['start'] and form[str(i)]['stop']:
|
||||
dates_query += ' BETWEEN %s AND %s)'
|
||||
args_list += (form[str(i)]['start'], form[str(i)]['stop'])
|
||||
@@ -176,7 +176,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
after = [ future_past[partner['id']] ]
|
||||
|
||||
self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
|
||||
values['direction'] = after and after[0] or ""
|
||||
values['direction'] = after and after[0] or 0.0
|
||||
|
||||
for i in range(5):
|
||||
during = False
|
||||
@@ -184,8 +184,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
during = [ history[i][partner['id']] ]
|
||||
# Ajout du compteur
|
||||
self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0)
|
||||
values[str(i)] = during and during[0] or ""
|
||||
|
||||
values[str(i)] = during and during[0] or 0.0
|
||||
total = False
|
||||
if totals.has_key( partner['id'] ):
|
||||
total = [ totals[partner['id']] ]
|
||||
@@ -255,23 +254,36 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
for i in t:
|
||||
future_past['No Partner Defined'] = i[0]
|
||||
history = []
|
||||
|
||||
for i in range(5):
|
||||
args_list = (tuple(self.ACCOUNT_TYPE), self.date_from)
|
||||
dates_query = "(COALESCE(date_maturity,date)"
|
||||
if form[str(i)]['start'] and form[str(i)]['stop']:
|
||||
dates_query += ' BETWEEN %s AND %s)'
|
||||
args_list += (form[str(i)]['start'], form[str(i)]['stop'])
|
||||
elif form[str(i)]['start']:
|
||||
dates_query += ' > %s)'
|
||||
args_list += (form[str(i)]['start'],)
|
||||
else:
|
||||
dates_query += ' < %s)'
|
||||
args_list += (form[str(i)]['stop'],)
|
||||
|
||||
self.cr.execute('SELECT SUM(debit-credit)\
|
||||
FROM account_move_line AS l, account_account\
|
||||
WHERE (l.account_id = account_account.id)\
|
||||
AND (l.partner_id IS NULL)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)\
|
||||
AND ((reconcile_id IS NULL)\
|
||||
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
|
||||
AND '+ self.query + '\
|
||||
AND account_account.active ' , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], self.date_from,))
|
||||
AND '+ dates_query + '\
|
||||
AND account_account.active ' , args_list)
|
||||
t = self.cr.fetchall()
|
||||
d = {}
|
||||
for i in t:
|
||||
d['No Partner Defined'] = i[0]
|
||||
history.append(d)
|
||||
|
||||
|
||||
values = {}
|
||||
if self.direction_selection == 'future':
|
||||
before = False
|
||||
@@ -281,11 +293,11 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
values['direction'] = before and before[0] or 0.0
|
||||
elif self.direction_selection == 'past':
|
||||
after = False
|
||||
if future_past.has_key('No Partner Defined'):
|
||||
if future_past.has_key('No Partner Defined'):
|
||||
after = [ future_past['No Partner Defined'] ]
|
||||
self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
|
||||
values['direction'] = after and after[0] or ""
|
||||
|
||||
|
||||
for i in range(5):
|
||||
during = False
|
||||
if history[i].has_key('No Partner Defined'):
|
||||
@@ -315,15 +327,15 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def _get_total(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
return period or 0.0
|
||||
|
||||
def _get_direction(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
return period or 0.0
|
||||
|
||||
def _get_for_period(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
return period or 0.0
|
||||
|
||||
def _get_partners(self,data):
|
||||
if data['form']['result_selection'] == 'customer':
|
||||
|
||||
@@ -82,9 +82,22 @@
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="8.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" 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_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P9">
|
||||
@@ -146,36 +159,34 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para> <para style="P9">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="300.0,100.0,100.0,100.0,100.0,105.0,105.0,125.0" style="Table2" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">Partners</para>
|
||||
<para style="terp_tblheader_Details">Partners</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['4']['name'] ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['4']['name'] ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['3']['name'] ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['3']['name'] ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['2']['name'] ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['2']['name'] ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['1']['name'] ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['1']['name'] ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['0']['name'] ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ data['form']['0']['name'] ]]<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Total</para>
|
||||
<para style="terp_tblheader_Details_Right">Total<font size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -184,36 +195,28 @@
|
||||
<td>
|
||||
<para style="P3"> <font color="white">[[ (get_lines(data['form']), 'partner') == False or removeParentNode('para') ]]</font></para>
|
||||
<para style="P3"> <font color="white">[[ (get_lines_with_out_partner(data['form']), 'not_partner') == False or removeParentNode('para') ]]</font></para>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total">Account Total</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_direction('6') or 0.00) ]] </para>
|
||||
<para style="Total_right">[[ formatLang(get_direction('6')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('4') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('4')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('3') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('3')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('2') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('2')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('1') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('1')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('0') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_for_period('0')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9"><font color="white"> </font></para>
|
||||
<para style="Total_right">[[ formatLang(get_total('5') or 0.00) ]]</para>
|
||||
<para style="Total_right">[[ formatLang(get_total('5')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -223,25 +226,25 @@
|
||||
<para style="P2_content">[[ partner['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['direction'] or 0.00) ]] </para>
|
||||
<para style="content">[[ formatLang(partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['4'] or 0.00)]]</para>
|
||||
<para style="content">[[ formatLang(partner['4'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['3'] or 0.00)]]</para>
|
||||
<para style="content">[[ formatLang(partner['3'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['2'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(partner['2']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['1'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(partner['1']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['0'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(partner['0']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(partner['total'] or 0.00 ) ]]</para>
|
||||
<para style="content">[[ formatLang(partner['total']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -250,25 +253,25 @@
|
||||
<para style="P2_content">[[ not_partner['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['direction'] or 0.00) ]] </para>
|
||||
<para style="content">[[ formatLang(not_partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['4'] or 0.00)]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['4'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['3'] or 0.00)]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['3'])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['2'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['2']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['1'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['1']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['0'] or 0.00) ]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['0']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="content">[[ formatLang(not_partner['total'] or 0.00 ) ]]</para>
|
||||
<para style="content">[[ formatLang(not_partner['total']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -69,19 +69,19 @@ class account_balance(report_sxw.rml_parse, common_report_header):
|
||||
return super(account_balance ,self)._get_account(data)
|
||||
|
||||
def lines(self, form, ids=[], done=None):#, level=1):
|
||||
def _process_child(accounts,disp_acc,parent):
|
||||
def _process_child(accounts, disp_acc, parent):
|
||||
account_rec = [acct for acct in accounts if acct['id']==parent][0]
|
||||
res = {
|
||||
'id': account_rec['id'],
|
||||
'type': account_rec['type'],
|
||||
'type': account_rec['type'],
|
||||
'code': account_rec['code'],
|
||||
'name': account_rec['name'],
|
||||
'level': account_rec['level'],
|
||||
'debit': account_rec['debit'],
|
||||
'credit': account_rec['credit'],
|
||||
'balance': account_rec['balance'],
|
||||
'parent_id':account_rec['parent_id'],
|
||||
'bal_type':'',
|
||||
'parent_id': account_rec['parent_id'],
|
||||
'bal_type': '',
|
||||
}
|
||||
self.sum_debit += account_rec['debit']
|
||||
self.sum_credit += account_rec['credit']
|
||||
@@ -96,7 +96,7 @@ class account_balance(report_sxw.rml_parse, common_report_header):
|
||||
if account_rec['child_id']:
|
||||
for child in account_rec['child_id']:
|
||||
_process_child(accounts,disp_acc,child)
|
||||
|
||||
|
||||
obj_account = self.pool.get('account.account')
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
@@ -113,6 +113,7 @@ class account_balance(report_sxw.rml_parse, common_report_header):
|
||||
elif form['filter'] == 'filter_date':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
ctx['state'] = form['target_move']
|
||||
parents = ids
|
||||
child_ids = obj_account._get_children_and_consol(self.cr, self.uid, ids, ctx)
|
||||
if child_ids:
|
||||
|
||||
@@ -63,15 +63,15 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
|
||||
def sum_dr(self):
|
||||
if self.res_bl['type'] == 'Net Profit':
|
||||
self.result_sum_dr += self.res_bl['balance']
|
||||
return self.result_sum_dr or 0.0
|
||||
return self.result_sum_dr
|
||||
|
||||
def sum_cr(self):
|
||||
if self.res_bl['type'] == 'Net Loss':
|
||||
self.result_sum_cr += self.res_bl['balance']
|
||||
return self.result_sum_cr or 0.0
|
||||
return self.result_sum_cr
|
||||
|
||||
def get_pl_balance(self):
|
||||
return self.res_bl or 0.0
|
||||
return self.res_bl
|
||||
|
||||
def get_data(self,data):
|
||||
cr, uid = self.cr, self.uid
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
@@ -117,7 +117,10 @@
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
@@ -161,13 +164,6 @@
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Heading">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ get_company(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -245,7 +241,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -255,7 +251,7 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -280,10 +276,10 @@
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('asset'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -293,7 +289,7 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code1'] ]]</font></para>
|
||||
@@ -281,7 +281,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -291,13 +291,13 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]]) </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
<template pageSize="(595.0,842.0)" title="Centralized Journal" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="539" height="758"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -227,9 +224,6 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<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>
|
||||
@@ -239,9 +233,6 @@
|
||||
<td><para style="terp_header"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="90.0,80.0,100.0,130.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
|
||||
@@ -283,35 +274,35 @@
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="50.0,200.0,95.0,92.0,69.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details">A/C No.</para></td>
|
||||
<td><para style="terp_tblheader_Details">Account Name</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="50.0,150.0,95.0,92.0,69.0,80.0" style="Table_Account_detail_Title_Currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,250.0,70.0,70.0,70.0,50.0" style="Table_Account_detail_Title_Currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details">A/C No.</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_Right">Balance</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="50.0,200.0,94.0,92.0,69.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_default_Bold_9">Total<font size="8.0">([[ company.currency_id.code]])</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(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="50.0,150.0,95.0,92.0,69.0,80.0" style="Table_Final_Total_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,250.0,70.0,70.0,70.0,50.0" style="Table_Final_Total_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
@@ -323,7 +314,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
|
||||
<blockTable colWidths="50.0,200.0,94.0,92.0,69.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
@@ -332,7 +323,7 @@
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="50.0,150.0,95.0,92.0,69.0,80.0" style="Table_Journal_Line_Content_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,250.0,70.0,70.0,70.0,50.0" style="Table_Journal_Line_Content_currency">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
@@ -342,9 +333,6 @@
|
||||
<td><para style="terp_default_Right_9">[[ line['currency_id'] and formatLang(line['amount_currency'] or '') ]] [[ line['currency_id'] and line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
<template pageSize="(596.0,842.0)" title="General Journal" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="540" height="758"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -268,9 +265,9 @@
|
||||
<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_Right">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:([[ company.currency_id.code]])</para></td>
|
||||
@@ -284,9 +281,9 @@
|
||||
<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_Right">Debit</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Currency</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -40,6 +40,9 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
new_ids = ids
|
||||
self.sortby = data['form'].get('sortby', 'sort_date')
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form']['initial_bal_query']
|
||||
self.init_balance = data['form']['initial_balance']
|
||||
self.display_account = data['form']['display_account']
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = [data['form']['chart_account_id']]
|
||||
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
|
||||
@@ -79,10 +82,10 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s" %(account.id, self.query))
|
||||
sum_currency = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
if self.init_balance:
|
||||
self.cr.execute("SELECT sum(l.amount_currency) AS tot_currency "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.init_query))
|
||||
sum_currency += self.cr.fetchone()[0] or 0.0
|
||||
return str(sum_currency)
|
||||
|
||||
@@ -99,10 +102,10 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
num_entry = self.cr.fetchone()[0] or 0
|
||||
sold_account = self._sum_balance_account(child_account,form)
|
||||
self.sold_accounts[child_account.id] = sold_account
|
||||
if form['display_account'] == 'bal_movement':
|
||||
if self.display_account == 'bal_movement':
|
||||
if child_account.type != 'view' and num_entry <> 0 :
|
||||
res.append(child_account)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
elif self.display_account == 'bal_solde':
|
||||
if child_account.type != 'view' and num_entry <> 0 :
|
||||
if ( sold_account <> 0.0):
|
||||
res.append(child_account)
|
||||
@@ -150,7 +153,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
self.cr.execute(sql, (account.id,))
|
||||
res_lines = self.cr.dictfetchall()
|
||||
res_init = []
|
||||
if res_lines and form['initial_balance']:
|
||||
if res_lines and self.init_balance:
|
||||
#FIXME: replace the label of lname with a string translatable
|
||||
sql = """
|
||||
SELECT 0 AS lid, '' AS ldate, '' AS lcode, COALESCE(SUM(l.amount_currency),0.0) AS amount_currency, '' AS lref, 'Initial Balance' AS lname, COALESCE(SUM(l.debit),0.0) AS debit, COALESCE(SUM(l.credit),0.0) AS credit, '' AS lperiod_id, '' AS lpartner_id,
|
||||
@@ -165,7 +168,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
LEFT JOIN account_invoice i on (m.id =i.move_id)
|
||||
JOIN account_journal j on (l.journal_id=j.id)
|
||||
WHERE %s AND l.account_id = %%s
|
||||
""" %(form['initial_bal_query'])
|
||||
""" %(self.init_query)
|
||||
|
||||
self.cr.execute(sql, (account.id,))
|
||||
res_init = self.cr.dictfetchall()
|
||||
@@ -193,10 +196,10 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
sum_debit = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
if self.init_balance:
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.init_query))
|
||||
# Add initial balance to the result
|
||||
sum_debit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_debit
|
||||
@@ -206,10 +209,10 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
sum_credit = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
if self.init_balance:
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.init_query))
|
||||
# Add initial balance to the result
|
||||
sum_credit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_credit
|
||||
@@ -219,10 +222,10 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s"%(account.id, self.query))
|
||||
sum_balance = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
if self.init_balance:
|
||||
self.cr.execute("SELECT (sum(debit) - sum(credit)) as tot_balance "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.init_query))
|
||||
# Add initial balance to the result
|
||||
sum_balance += self.cr.fetchone()[0] or 0.0
|
||||
return sum_balance
|
||||
|
||||
@@ -141,9 +141,10 @@
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.3" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="date" fontName="Helvetica" fontSize="8.3" leading="10" spaceBefore="0.0" spaceAfter="6.0" alignment="CENTER"/>
|
||||
<paraStyle name="date" fontName="Helvetica-Bold" fontSize="8.3" leading="10" spaceBefore="0.0" spaceAfter="6.0" alignment="LEFT"/>
|
||||
<paraStyle name="P2_content" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.3" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3b" fontName="Helvetica-Bold" fontSize="8.3" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3_centre" fontName="Helvetica" fontSize="8.3" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.3" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -176,9 +177,6 @@
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -186,7 +184,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<para>
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
@@ -242,13 +240,13 @@
|
||||
<blockTable colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == False or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P3">Partner</para></td>
|
||||
<td><para style="P3">Ref</para></td>
|
||||
<td><para style="P3">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Crebit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P9">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P3b">Partner</para></td>
|
||||
<td><para style="P3b">Ref</para></td>
|
||||
<td><para style="P3b">Move</para></td>
|
||||
<td><para style="P3b">Entry Label</para></td>
|
||||
<td><para style="P9b">Debit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P9b">Crebit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P9b">Balance<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
@@ -289,17 +287,17 @@
|
||||
|
||||
|
||||
|
||||
<blockTable colWidths="72.0,93.0,65.0,40.0,89.0,49.0,49.0,49.0,40.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="72.0,93.0,65.0,38.0,85.0,49.0,49.0,49.0,40.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P3">Partner</para></td>
|
||||
<td><para style="P3">Ref</para></td>
|
||||
<td><para style="P3">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Currency</para></td>
|
||||
<td><para style="P3b">Partner</para></td>
|
||||
<td><para style="P3b">Ref</para></td>
|
||||
<td><para style="P3b">Move</para></td>
|
||||
<td><para style="P3b">Entry Label</para></td>
|
||||
<td><para style="P9b">Debit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P9b">Credit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P9b">Balance<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P9b">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
<template pageSize="(1120.5,767.8)" title="General Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="31.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -146,7 +143,9 @@
|
||||
<paraStyle name="date" fontName="Helvetica-Bold" fontSize="9.0" leading="10" spaceBefore="0.0" spaceAfter="6.0" alignment="CENTER"/>
|
||||
<paraStyle name="P2_content" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3_center" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3_content_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -179,9 +178,6 @@
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -189,9 +185,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
|
||||
<para style="terp_default_8">
|
||||
@@ -247,7 +240,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,330.0,50.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,300.0,80.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P2">JNRL</para></td>
|
||||
@@ -255,7 +248,7 @@
|
||||
<td><para style="P2">Ref</para></td>
|
||||
<td><para style="P2">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P3_center">Counterpart</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Balance([[ company.currency_id.code]])</para></td>
|
||||
@@ -266,10 +259,10 @@
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,35.0,150.0, 90.0,60.0,330.0,50.0,69.0,72.0,64.0,62.0" style="tbl_content">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,300.0,80.0,69.0,72.0,64.0,62.0" style="tbl_content">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="404.0,375.0,69.0,72.0,64.0,59.00" style="Table5">
|
||||
<blockTable colWidths="404.0,372.0,69.0,72.0,64.0,59.00" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
@@ -298,7 +291,7 @@
|
||||
<td><para style="P2_content">[[ line['lref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['lname'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P3_content_center">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
@@ -308,7 +301,7 @@
|
||||
|
||||
</section>
|
||||
|
||||
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,348.0,80.0,69.0,72.0,64.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P2">Date</para></td>
|
||||
<td><para style="date">JNRL</para></td>
|
||||
@@ -316,7 +309,7 @@
|
||||
<td><para style="P2">Ref</para></td>
|
||||
<td><para style="P2">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P3_center">Counterpart</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Balance([[ company.currency_id.code]])</para></td>
|
||||
@@ -327,7 +320,7 @@
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,35.0,166.0,90.0,60.0,378.0,50.0,69.0,72.0,64.0" style="tbl_content">[[data['form']['amount_currency'] == False or removeParentNode('blockTable')]]
|
||||
<blockTable colWidths="66.0,35.0,166.0,90.0,60.0,348.0,80.0,69.0,72.0,64.0" style="tbl_content">[[data['form']['amount_currency'] == False or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="405.0,435.0,69.0,72.0,64.0" style="Table5">
|
||||
@@ -358,7 +351,7 @@
|
||||
<td><para style="P2_content">[[ line['lref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['lname'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P3_content_center">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
|
||||
@@ -246,16 +246,16 @@
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="40.0,65.0,50.0,62.0,154.0,58.0,60.0,60.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="40.0,65.0,50.0,62.0,152.0,60.0,60.0,60.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P10a">Date</para></td>
|
||||
<td><para style="P10">Entry No</para></td>
|
||||
<td><para style="P10">A/c No.</para></td>
|
||||
<td><para style="P10a">Partner</para></td>
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10b">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P10b">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P10b">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11">[[o.period_id.name ]]</para></td>
|
||||
@@ -281,16 +281,16 @@
|
||||
</blockTable>
|
||||
|
||||
|
||||
<blockTable colWidths="50.0,65.0,50.0,60.0,89.0,40.0,60.0,50.0,60.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="50.0,65.0,50.0,60.0,69.0,60.0,60.0,60.0,50.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P10a">Date</para></td>
|
||||
<td><para style="P10">Entry No</para></td>
|
||||
<td><para style="P10">A/c No.</para></td>
|
||||
<td><para style="P10a">Partner</para></td>
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10b">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P10b">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P10b">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P10b">Currency</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -99,12 +99,12 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
## Compute Code
|
||||
#
|
||||
self.initial_balance = data['form'].get('initial_balance', True)
|
||||
self.display_partner = data['form'].get('display_partner', 'non-zero_balance')
|
||||
# self.initial_balance = data['form'].get('initial_balance', True)
|
||||
self.display_partner = data['form'].get('display_partner', 'non-zero_balance')
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form'].get('initial_bal_query', '')
|
||||
self.result_selection = data['form'].get('result_selection')
|
||||
|
||||
|
||||
if (self.result_selection == 'customer' ):
|
||||
self.ACCOUNT_TYPE = ('receivable',)
|
||||
elif (self.result_selection == 'supplier'):
|
||||
@@ -150,81 +150,81 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
#For include intial balance..
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT '1' AS type, '' AS ref, l.account_id AS account_id, '' AS account_name, '' AS code, '' AS name, sum(debit) AS debit, sum(credit) AS credit, " \
|
||||
"CASE WHEN sum(debit) > sum(credit) " \
|
||||
"THEN sum(debit) - sum(credit) " \
|
||||
"ELSE 0 " \
|
||||
"END AS sdebit, " \
|
||||
"CASE WHEN sum(debit) < sum(credit) " \
|
||||
"THEN sum(credit) - sum(debit) " \
|
||||
"ELSE 0 " \
|
||||
"END AS scredit, " \
|
||||
"(SELECT sum(debit-credit) " \
|
||||
"FROM account_move_line l " \
|
||||
"WHERE partner_id = p.id " \
|
||||
" AND " + self.init_query + " " \
|
||||
"AND blocked = TRUE " \
|
||||
") AS enlitige " \
|
||||
"FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
|
||||
"JOIN account_account ac ON (l.account_id = ac.id) " \
|
||||
"WHERE ac.type IN %s " \
|
||||
"AND " + self.init_query + "" \
|
||||
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
"ORDER BY l.account_id, p.name",
|
||||
(self.ACCOUNT_TYPE, ))
|
||||
res1 = self.cr.dictfetchall()
|
||||
final_init = {}
|
||||
res_init = {}
|
||||
debit = credit = 0
|
||||
for r in res1:
|
||||
if final_init.get(r['account_id'], False):
|
||||
res_init = final_init[r['account_id']]
|
||||
debit += final_init[r['account_id']]['debit']
|
||||
credit += final_init[r['account_id']]['credit']
|
||||
res_init['credit'] = credit
|
||||
res_init['debit'] = debit
|
||||
res_init['type'] = 3
|
||||
res_init['ref'] = ''
|
||||
res_init['code'] = ''
|
||||
res_init['name'] = 'Initial Balance'
|
||||
res_init['balance'] = debit - credit
|
||||
res_init['enlitige'] = 0.0 # fix me
|
||||
res_init['account_id'] = final_init[r['account_id']]['account_id']
|
||||
else:
|
||||
res_init = {}
|
||||
debit = r['debit']
|
||||
credit = r['credit']
|
||||
res_init['credit'] = credit
|
||||
res_init['debit'] = debit
|
||||
res_init['type'] = 3
|
||||
res_init['ref'] = ''
|
||||
res_init['code'] = ''
|
||||
res_init['name'] = 'Initial Balance'
|
||||
res_init['balance'] = debit - credit
|
||||
res_init['enlitige'] = 0.0 # fix me
|
||||
res_init['account_id'] = r['account_id']
|
||||
final_init[r['account_id']] = res_init
|
||||
|
||||
# if self.initial_balance:
|
||||
# self.cr.execute(
|
||||
# "SELECT '1' AS type, '' AS ref, l.account_id AS account_id, '' AS account_name, '' AS code, '' AS name, sum(debit) AS debit, sum(credit) AS credit, " \
|
||||
# "CASE WHEN sum(debit) > sum(credit) " \
|
||||
# "THEN sum(debit) - sum(credit) " \
|
||||
# "ELSE 0 " \
|
||||
# "END AS sdebit, " \
|
||||
# "CASE WHEN sum(debit) < sum(credit) " \
|
||||
# "THEN sum(credit) - sum(debit) " \
|
||||
# "ELSE 0 " \
|
||||
# "END AS scredit, " \
|
||||
# "(SELECT sum(debit-credit) " \
|
||||
# "FROM account_move_line l " \
|
||||
# "WHERE partner_id = p.id " \
|
||||
# " AND " + self.init_query + " " \
|
||||
# "AND blocked = TRUE " \
|
||||
# ") AS enlitige " \
|
||||
# "FROM account_move_line l LEFT JOIN res_partner p ON (l.partner_id=p.id) " \
|
||||
# "JOIN account_account ac ON (l.account_id = ac.id) " \
|
||||
# "WHERE ac.type IN %s " \
|
||||
# "AND " + self.init_query + "" \
|
||||
# "GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
# "ORDER BY l.account_id, p.name",
|
||||
# (self.ACCOUNT_TYPE, ))
|
||||
# res1 = self.cr.dictfetchall()
|
||||
# final_init = {}
|
||||
# res_init = {}
|
||||
# debit = credit = 0
|
||||
# for r in res1:
|
||||
# if final_init.get(r['account_id'], False):
|
||||
# res_init = final_init[r['account_id']]
|
||||
# debit += final_init[r['account_id']]['debit']
|
||||
# credit += final_init[r['account_id']]['credit']
|
||||
# res_init['credit'] = credit
|
||||
# res_init['debit'] = debit
|
||||
# res_init['type'] = 3
|
||||
# res_init['ref'] = ''
|
||||
# res_init['code'] = ''
|
||||
# res_init['name'] = 'Initial Balance'
|
||||
# res_init['balance'] = debit - credit
|
||||
# res_init['enlitige'] = 0.0 # fix me
|
||||
# res_init['account_id'] = final_init[r['account_id']]['account_id']
|
||||
# else:
|
||||
# res_init = {}
|
||||
# debit = r['debit']
|
||||
# credit = r['credit']
|
||||
# res_init['credit'] = credit
|
||||
# res_init['debit'] = debit
|
||||
# res_init['type'] = 3
|
||||
# res_init['ref'] = ''
|
||||
# res_init['code'] = ''
|
||||
# res_init['name'] = 'Initial Balance'
|
||||
# res_init['balance'] = debit - credit
|
||||
# res_init['enlitige'] = 0.0 # fix me
|
||||
# res_init['account_id'] = r['account_id']
|
||||
# final_init[r['account_id']] = res_init
|
||||
|
||||
if self.display_partner == 'non-zero_balance':
|
||||
full_account = [r for r in res if r['sdebit'] > 0 or r['scredit'] > 0]
|
||||
else:
|
||||
full_account = [r for r in res]
|
||||
|
||||
|
||||
## We will now compute Total
|
||||
subtotal_row = self._add_subtotal(full_account)
|
||||
if not self.initial_balance:
|
||||
return subtotal_row
|
||||
|
||||
#If include initial balance is selected..
|
||||
subtotal = copy.deepcopy(subtotal_row)
|
||||
init_acnt = []
|
||||
for row in subtotal_row:
|
||||
if final_init and row.get('account_id', False) and not row['account_id'] in init_acnt and final_init.get(row['account_id'], False):
|
||||
subtotal.insert(subtotal.index(row), final_init[row['account_id']])
|
||||
init_acnt.append(row['account_id'])
|
||||
return subtotal
|
||||
# if not self.initial_balance:
|
||||
# return subtotal_row
|
||||
#
|
||||
# #If include initial balance is selected..
|
||||
# subtotal = copy.deepcopy(subtotal_row)
|
||||
# init_acnt = []
|
||||
# for row in subtotal_row:
|
||||
# if final_init and row.get('account_id', False) and not row['account_id'] in init_acnt and final_init.get(row['account_id'], False):
|
||||
# subtotal.insert(subtotal.index(row), final_init[row['account_id']])
|
||||
# init_acnt.append(row['account_id'])
|
||||
return subtotal_row
|
||||
|
||||
def _add_subtotal(self, cleanarray):
|
||||
i = 0
|
||||
@@ -354,14 +354,14 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
"AND " + self.query + "" ,
|
||||
(tuple(self.account_ids), ))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s " \
|
||||
"AND " + self.init_query + "" ,
|
||||
(tuple(self.account_ids), ))
|
||||
temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
# if self.initial_balance:
|
||||
# self.cr.execute(
|
||||
# "SELECT sum(debit) " \
|
||||
# "FROM account_move_line AS l " \
|
||||
# "WHERE l.account_id IN %s " \
|
||||
# "AND " + self.init_query + "" ,
|
||||
# (tuple(self.account_ids), ))
|
||||
# temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
return temp_res
|
||||
|
||||
def _sum_credit(self):
|
||||
@@ -375,14 +375,14 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
"AND " + self.query + "" ,
|
||||
(tuple(self.account_ids),))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s " \
|
||||
"AND " + self.init_query + "" ,
|
||||
(tuple(self.account_ids),))
|
||||
temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
# if self.initial_balance:
|
||||
# self.cr.execute(
|
||||
# "SELECT sum(credit) " \
|
||||
# "FROM account_move_line AS l " \
|
||||
# "WHERE l.account_id IN %s " \
|
||||
# "AND " + self.init_query + "" ,
|
||||
# (tuple(self.account_ids),))
|
||||
# temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
return temp_res
|
||||
|
||||
def _sum_litige(self):
|
||||
@@ -397,15 +397,15 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
"AND l.blocked=TRUE ",
|
||||
(tuple(self.account_ids), ))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit-credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s " \
|
||||
"AND l.blocked=TRUE "\
|
||||
"AND " + self.init_query + "" ,
|
||||
(tuple(self.account_ids), ))
|
||||
temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
# if self.initial_balance:
|
||||
# self.cr.execute(
|
||||
# "SELECT sum(debit-credit) " \
|
||||
# "FROM account_move_line AS l " \
|
||||
# "WHERE l.account_id IN %s " \
|
||||
# "AND l.blocked=TRUE "\
|
||||
# "AND " + self.init_query + "" ,
|
||||
# (tuple(self.account_ids), ))
|
||||
# temp_res += float(self.cr.fetchone()[0] or 0.0)
|
||||
return temp_res
|
||||
|
||||
def _sum_sdebit(self):
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<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="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.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"/>
|
||||
@@ -172,12 +172,6 @@
|
||||
|
||||
<story>
|
||||
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -233,17 +227,17 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P12a"></para>
|
||||
<blockTable colWidths="61.0,206.0,69.0,68.0,69.0,68.0" repeatRows="1" style="Table2">
|
||||
<blockTable colWidths="80.0,170.0,70.0,70.0,70.0,80.0" repeatRows="1" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">(Account/Partner) Name</para></td>
|
||||
<td><para style="P12b">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12b">Credi([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12b">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12b">In dispute([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12b">Debit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P12b">Credit<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P12b">Balance<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P12a">In dispute<font size="8.0">([[ company.currency_id.code]])</font></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Grand total([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P7">Total<font size="8.0">([[ company.currency_id.code]]) :</font></para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_debit()) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_credit()) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
@@ -251,7 +245,7 @@
|
||||
<td><para style="P8"><u>[[ formatLang(sum_litige()) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P7">Balance<font size="8.0">([[ company.currency_id.code]]) :</font></para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_debit()) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_credit()) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
@@ -261,10 +255,10 @@
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(), 'a') ]]<font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font><font>[[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ a['name'] ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['debit']) ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['credit']) ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['balance']) ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['enlitige'] or 0.00) ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['enlitige'] or 0.0) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
@@ -123,11 +123,12 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
||||
else:
|
||||
RECONCILE_TAG = "AND l.reconcile_id IS NULL"
|
||||
self.cr.execute(
|
||||
"SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit,l.amount_currency,c.code AS currency_code " \
|
||||
"SELECT l.id,l.date,j.code, l.ref, m.name as move_name, l.name, l.debit, l.credit,l.amount_currency,c.code AS currency_code " \
|
||||
"FROM account_move_line l " \
|
||||
"LEFT JOIN account_journal j " \
|
||||
"ON (l.journal_id = j.id) " \
|
||||
"LEFT JOIN res_currency c on (l.currency_id=c.id)" \
|
||||
"LEFT JOIN account_move m on (m.id=l.move_id)" \
|
||||
"WHERE l.partner_id = %s " \
|
||||
"AND l.account_id IN %s AND " + self.query +" " \
|
||||
" " + RECONCILE_TAG + " "\
|
||||
@@ -313,4 +314,4 @@ report_sxw.report_sxw('report.account.third_party_ledger_other', 'res.partner',
|
||||
'addons/account/report/account_partner_ledger_other.rml',parser=third_party_ledger,
|
||||
header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -304,13 +304,13 @@
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -324,13 +324,13 @@
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -338,13 +338,13 @@
|
||||
<para style="terp_default_Centre_9" leftIndent="35.0">Initial Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][0] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -362,19 +362,19 @@
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
<para style="P3">[[ line['move_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
<para style="P3"><b>b</b>[[ (line['ref'] or '') + ' ' + line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -382,10 +382,10 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<blockTable colWidths="57.0,25.0,40.0,154.0,67.0,66.0,65.0,65.0" style="Table4">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="57.0,25.0,40.0,154.0,66.0,68.0,68.0,60.0" style="Table4">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
<para style="terp_tblheader_Details">Datefff</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
@@ -403,10 +403,10 @@
|
||||
<para style="terp_tblheader_Details_Right">Credit([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance ([[ get_currency(data) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Balance([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Currency ([[ get_currency(data) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -419,13 +419,13 @@
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]]</u></para>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
@@ -441,13 +441,13 @@
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
@@ -460,13 +460,13 @@
|
||||
<para style="terp_default_Centre_9" leftIndent="35.0">Initial Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][0] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"></para>
|
||||
@@ -487,19 +487,19 @@
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
<para style="P3">[[ line['move_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
<para style="P3"><b>a</b>[[ (line['ref'] or '') + ' ' + line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]]</para>
|
||||
|
||||
@@ -324,12 +324,6 @@
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_header">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -431,7 +425,7 @@
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table_header_1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="65.0,28.0,65.0,155.0,77.0,75.0,74.0" style="Table_header_1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
@@ -462,13 +456,13 @@
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -482,13 +476,13 @@
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -496,19 +490,19 @@
|
||||
<para style="terp_default_Centre_9" leftIndent="35.0">Initial Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][0] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="65.0,28.0,65.0,155.0,77.0,75.0,74.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
@@ -517,19 +511,19 @@
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
<para style="P3">[[ line['move_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
<para style="P3">[[ (line['ref'] or '')+ ' ' + line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -559,7 +553,7 @@
|
||||
<para style="terp_tblheader_Details_Right">Balance([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Currency ([[ get_currency(data) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -570,13 +564,13 @@
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
@@ -594,13 +588,13 @@
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
@@ -613,13 +607,13 @@
|
||||
<para style="terp_default_Centre_9" leftIndent="35.0">Initial Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][0] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"></para>
|
||||
@@ -628,7 +622,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
|
||||
<blockTable colWidths="57.0,25.0,40.0,154.0,67.0,66.0,65.0,65.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<blockTable colWidths="57.0,25.0,60.0,134.0,67.0,66.0,65.0,65.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3"> [[ formatLang(line['date'],date=True) ]]</para>
|
||||
@@ -637,19 +631,19 @@
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
<para style="P3">[[ line['move_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
<para style="P3">[[ (line['ref'] or '') + ' ' + line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]]</para>
|
||||
@@ -662,4 +656,4 @@
|
||||
</para>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -287,7 +287,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -300,7 +300,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9"></para>
|
||||
@@ -309,7 +309,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -320,13 +320,13 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]] [[ company.currency_id.code]] )</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]] [[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -63,12 +63,12 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
|
||||
def sum_dr(self):
|
||||
if self.res_pl['type'] == 'Net Profit C.F.B.L.':
|
||||
self.result_sum_dr += self.res_pl['balance']
|
||||
return self.result_sum_dr or 0.0
|
||||
return self.result_sum_dr
|
||||
|
||||
def sum_cr(self):
|
||||
if self.res_pl['type'] == 'Net Loss C.F.B.L.':
|
||||
self.result_sum_cr += self.res_pl['balance']
|
||||
return self.result_sum_cr or 0.0
|
||||
return self.result_sum_cr
|
||||
|
||||
def get_data(self, data):
|
||||
cr, uid = self.cr, self.uid
|
||||
|
||||
@@ -185,9 +185,6 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_header_Centre">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -267,7 +264,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a.level<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a.balance)) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -280,7 +277,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -290,7 +287,7 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -322,7 +319,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a.level<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a.balance)) ]] [[ company.currency_id.symbol ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -335,7 +332,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -345,7 +342,7 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Account Balance" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<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"/>
|
||||
</pageTemplate>
|
||||
@@ -23,12 +23,12 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="4,0" stop="4,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="5,0" stop="5,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="4,0" stop="4,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="5,0" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -37,10 +37,10 @@
|
||||
<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"/>
|
||||
<blockBackground colorName="#b3b3b3" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#b3b3b3" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="3,0" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -93,48 +93,35 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<blockBackground colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="2,0" stop="2,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="3,0" stop="3,-1"/>
|
||||
<blockBackground colorName="#ffffff" start="4,0" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(get_years(data['form']), 'y') ]]</para>
|
||||
<blockTable colWidths="482.0" style="Table_Tiltle">
|
||||
@@ -144,11 +131,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_header">Year : [[ y['year'] ]]</para>
|
||||
<blockTable colWidths="57.0,134.0,51.0,62.0,67.0,111.0" style="Table_header_account">
|
||||
<blockTable colWidths="57.0,214.0,54.0,46.0,57.0,52.0" style="Table_header_account">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">[[ data['form']['show_columns'] and 'Code' or removeParentNode('blockTable') ]]</para>
|
||||
@@ -157,7 +141,7 @@
|
||||
<para style="terp_tblheader_Details">Account Name </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details"><font>[[ data['form']['compare_pattern']!='none' and "C.S.Y.T.(C./P)" or removeParentNode('font') ]]</font></para>
|
||||
<para style="terp_tblheader_Details">[[ data['form']['compare_pattern']!='none' and 'C.S.Y.T.(C./P)' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
@@ -166,123 +150,107 @@
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Balance</para>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="56.0,134.0,50.0,240.0" style="Table1">
|
||||
<blockTable colWidths="56.0,315.0,56.0,53.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">[[ data['form']['show_columns'] and removeParentNode('blockTable') or 'Code' ]]</para>
|
||||
<para style="terp_tblheader_Details">[[ (data['form']['show_columns'] and removeParentNode('blockTable')) or 'Code' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details"><font>[[ data['form']['compare_pattern']!='none' and "C.S.Y.T.(C./P)" or removeParentNode('font') ]]</font></para>
|
||||
<para style="terp_tblheader_Details">[[ data['form']['compare_pattern']!='none' and 'C.S.Y.T.(C./P)' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Balance</para>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(get_lines(y,data['form']), 'a') ]]</para>
|
||||
<blockTable colWidths="56.0,134.0,51.0,61.0,69.0,110.0" style="Table4">
|
||||
<blockTable colWidths="56.0,208.0,58.0,49.0,55.0,54.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]]</para>
|
||||
<para style="terp_default_9">[[ (data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font color="white">[['.....'*(a['level']-1) ]]</font> <font>[[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font face="Helvetica" color="white">[['...'*(a['level']-1) ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['pattern'] ]]</para>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['pattern'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['debit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['debit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['credit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['credit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="56.0,134.0,52.0,61.0,69.0,74.0,36.0" style="Table2">
|
||||
<blockTable colWidths="56.0,153.0,55.0,54.0,54.0,56.0,54.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (not data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]]</para>
|
||||
<para style="terp_default_9">[[ (not data['form']['format_perc'] or not data['form']['show_columns']) and removeParentNode('blockTable') ]] <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font color="white">[['.....'*(a['level']-1) ]]</font> <font>[[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font face="Helvetica" color="white">[['...'*(a['level']-1) ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['pattern'] ]]</para>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['pattern'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['debit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['debit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['credit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['credit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance_perc'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance_perc'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2"/>
|
||||
<blockTable colWidths="55.0,135.0,113.0,178.0" style="Table6">
|
||||
<blockTable colWidths="55.0,154.0,218.0,54.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]]</para>
|
||||
<para style="terp_default_9">[[ (data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]] <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font color="white">[['.....'*(a['level']-1) ]]</font> <font>[[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font face="Helvetica" color="white">[['...'*(a['level']-1) ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['pattern'] ]]</para>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['pattern'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="54.0,135.0,113.0,130.0,49.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (not data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]] [[ a['code'] ]]</para>
|
||||
<para style="terp_default_9">[[ (not data['form']['format_perc'] or data['form']['show_columns']) and removeParentNode('blockTable') ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font> [[ a['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font color="white">[['.....'*(a['level']-1) ]]</font> <font>[[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font face="Helvetica" color="white">[['...'*(a['level']-1) ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['pattern'] ]]</para>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font')]]</font>[[ a['pattern'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['balance_perc'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font')]]</font>[[ a['balance_perc'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -290,10 +258,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="52.0,189.0,61.0,69.0,110.0" style="Table3">
|
||||
<blockTable colWidths="54.0,135.0,113.0,130.0,49.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ not data['form']['show_columns'] and removeParentNode('blockTable') ]] </para>
|
||||
@@ -319,4 +284,4 @@
|
||||
</para>
|
||||
<para style="terp_tblheader_Details">[[ data['form']['compare_pattern']!='none' and "C.S.Y.T.(C./P) : Compare Selected Years In Terms of Cash/Perc" or removeParentNode('font') ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
+102
-183
@@ -42,7 +42,7 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Header_Invoice_Line">
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
@@ -52,7 +52,7 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Invoice_Line_Content">
|
||||
<blockTableStyle id="Table8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
@@ -62,89 +62,28 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Format_2">
|
||||
<blockTableStyle id="Table10">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#ffffff" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#ffffff" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="0,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="0,2"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,4" stop="0,4"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,4" stop="1,4"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_format_Table_Line_total">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_eclu_Taxes_Total">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Taxes_Total">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Total_Include_Taxes">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockTableStyle id="Table9">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -178,14 +117,15 @@
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
<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"/>
|
||||
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
@@ -240,7 +180,7 @@
|
||||
<blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name or ' ' ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ o.name or ' ' ]]<font color="white"> </font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
@@ -253,13 +193,13 @@
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="211.0,74.0,62.0,59.0,51.0,68.0" style="Table_Header_Invoice_Line">
|
||||
<blockTable colWidths="219.0,87.0,56.0,56.0,51.0,62.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Taxes</para>
|
||||
<para style="terp_tblheader_Details_Centre">Taxes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
@@ -271,19 +211,19 @@
|
||||
<para style="terp_tblheader_Details_Right">Disc.(%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Centre">Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.invoice_line,'l') ]]</para>
|
||||
<blockTable colWidths="211.0,70.0,60.0,58.0,49.0,74.0" style="Table_Invoice_Line_Content">
|
||||
<para style="terp_default_2">[[ repeatIn(o.invoice_line,'l') ]]</para>
|
||||
<blockTable colWidths="218.0,88.0,56.0,56.0,51.0,62.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ ', '.join([ lt.name or '' for lt in l.invoice_line_tax_id ]) ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ ', '.join([ lt.name or '' for lt in l.invoice_line_tax_id ]) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]]</para>
|
||||
@@ -301,157 +241,136 @@
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Note">[[ format(l.note or '') or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="370.0,153.0" style="Table_Format_2">
|
||||
<blockTable colWidths="407.0,54.0,69.0" style="Table10">
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="62.0,84.0" style="Table_eclu_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,84.0" style="Table_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,84.0" style="Table_Total_Include_Taxes">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="530.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="149.0,55.0,52.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">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_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="149.0,55.0,52.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_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 and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="530.0" style="Table3">
|
||||
<para style="Text body"/>
|
||||
<blockTable colWidths="167.0,59.0,56.0,247.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format(o.comment or '') or removeParentNode('blockTable') ]]</para>
|
||||
<para style="terp_tblheader_Details">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_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="530.0" style="Table2">
|
||||
<section>
|
||||
<para style="terp_default_2">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="167.0,60.0,55.0,248.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_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 and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_9">[[ (o.comment and format(o.comment )) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">[[ (o.payment_term.note and format(o.payment_term and o.payment_term.note)) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="120.0,410.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or '') or removeParentNode('blockTable') ]]</para>
|
||||
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (o.fiscal_position.note and format(o.fiscal_position and o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="128.0,402.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Fiscal Position Remark :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.fiscal_position and o.fiscal_position.note) or '') or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -46,15 +46,18 @@ class Overdue(report_sxw.rml_parse):
|
||||
result = {
|
||||
'name': False,
|
||||
'street': False,
|
||||
'street2': False,
|
||||
'city' : False,
|
||||
'zip' : False,
|
||||
'state_id':False,
|
||||
'country_id' : False,
|
||||
}
|
||||
if adr_id:
|
||||
result = res_partner_address.read(self.cr, self.uid, [adr_id], context=self.context.copy())
|
||||
result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False
|
||||
return result
|
||||
|
||||
result[0]['state_id'] = result[0]['state_id'] and result[0]['state_id'][1] or False
|
||||
return result
|
||||
|
||||
res.append(result)
|
||||
return res
|
||||
|
||||
@@ -80,12 +83,12 @@ class Overdue(report_sxw.rml_parse):
|
||||
('state', '<>', 'draft'), ('reconcile_id', '=', False)])
|
||||
movelines = moveline_obj.browse(self.cr, self.uid, movelines)
|
||||
return movelines
|
||||
|
||||
|
||||
def _message(self, obj, company):
|
||||
company_pool = pooler.get_pool(self.cr.dbname).get('res.company')
|
||||
message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg
|
||||
message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg
|
||||
return message
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.account.overdue', 'res.partner',
|
||||
'addons/account/report/overdue.rml', parser=Overdue)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Overdue" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Overdue Payment" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="42.0" y1="28.0" width="511" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -55,16 +55,16 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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="0.0" spaceAfter="6.0"/>
|
||||
<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="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"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
@@ -96,9 +96,10 @@
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.name ]]</para>
|
||||
<para style="terp_default_9">[[ addr['name'] ]]</para>
|
||||
<para style="terp_default_9">[[ addr['street'] ]]</para>
|
||||
<para style="terp_default_9">[[ addr['street2'] or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">[[ addr['zip'] ]] [[ addr['city'] ]]</para>
|
||||
<para style="terp_default_9">[[ addr['state_id'] or removeParentNode('para')]]</para>
|
||||
<para style="terp_default_9">[[ addr['country_id'] ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
@@ -115,7 +116,7 @@
|
||||
</para>
|
||||
<para style="terp_default_9">Document: Customer account statement</para>
|
||||
<para style="terp_default_9">Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para>
|
||||
<para style="terp_default_9">Customer Ref: [[ o.ref ]]</para>
|
||||
<para style="terp_default_9">Customer Ref: [[ o.ref or '' ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -135,7 +136,7 @@
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="56.0,137.0,52.0,72.0,60.0,57.0,56.0,18.0" style="Table1">
|
||||
<blockTable colWidths="56.0,136.0,51.0,72.0,54.0,56.0,66.0,18.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
@@ -147,16 +148,16 @@
|
||||
<para style="terp_tblheader_Details_Centre">Ref</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Due date</para>
|
||||
<para style="terp_tblheader_Details_Centre">Maturity date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Due</para>
|
||||
<para style="terp_tblheader_Details_Right">Due<font face="Helvetica" size="8.0">([[ company.currency_id.name ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Paid</para>
|
||||
<para style="terp_tblheader_Details_Right">Paid<font face="Helvetica" size="8.0">([[ company.currency_id.name ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Maturity</para>
|
||||
<para style="terp_tblheader_Details_Right">Maturity<font face="Helvetica" size="8.0">([[ company.currency_id.name ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Li.</para>
|
||||
@@ -165,7 +166,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para>
|
||||
<blockTable colWidths="56.0,138.0,52.0,73.0,60.0,57.0,56.0,17.0" style="Table3">
|
||||
<blockTable colWidths="56.0,136.0,52.0,71.0,55.0,56.0,66.0,17.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
@@ -180,13 +181,13 @@
|
||||
<para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]]</para>
|
||||
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and (line['debit'] - line['credit']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and (line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
|
||||
@@ -194,7 +195,7 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="247.0,72.0,60.0,57.0,56.0,17.0" style="Table2">
|
||||
<blockTable colWidths="247.0,65.0,59.0,56.0,66.0,17.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
@@ -205,13 +206,13 @@
|
||||
<para style="terp_default_Bold_9">Sub-Total : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -229,7 +230,7 @@
|
||||
<para style="terp_default_Bold_9">Balance : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -248,7 +249,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.name ]].</para>
|
||||
<para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]].</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -75,7 +74,7 @@
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-bold" fontSize="15.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -88,8 +87,8 @@
|
||||
<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.6" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.6" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.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="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -103,32 +102,21 @@
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
|
||||
|
||||
|
||||
<blockTableStyle id="TrLevel">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<paraStyle name="Level"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold"
|
||||
/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P2"><font color="white"> </font></para>
|
||||
<blockTable colWidths="347.0,64.0,59.0,71.0" style="Table2" repeatRows="1">
|
||||
<para style="P2">Taxes</para>
|
||||
<blockTable colWidths="340.0,55.0,55.0,90.0" style="Table2" repeatRows="1">
|
||||
<tr>
|
||||
<td><para style="P12">Tax Name</para></td>
|
||||
<td><para style="P12a">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12a">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12a">Tax Amount([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P12a">Debit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P12a">Credit<font size="7.0">([[ company.currency_id.code]])</font></para></td>
|
||||
<td><para style="P12a">Tax Amount<font size="7.0">([[ company.currency_id.code]])</font></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">[[ (o['level']) ]]</font> <font>[[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]]</font><font>[[ o['code'] ]] [[ o['name'] ]]</font></para></td>
|
||||
<td><para style="P6"><font>[[ (o['level'])>2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font></para></td>
|
||||
<td><para style="P6"><font>[[ (o['level'])>2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]]</font></para></td>
|
||||
<td><para style="P6"><font>[[ (o['level'])>2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</font></para></td>
|
||||
<td><para style="P5"><font>[[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]</font><font color="white">[[ (o['level']) ]]</font> <font>[[ (len(o['level'])<5 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font><font>[[ o['code'] ]] [[ o['name'] ]] </font></para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] [[ company.currency_id.symbol ]]</font></para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]] [[ company.currency_id.symbol ]]</font></para></td>
|
||||
<td><para style="P6"><font>[[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]]</font><font>[[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
@@ -198,3 +198,8 @@
|
||||
"access_account_analytic_line_accounting_accountant","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_journal_accounting_accountant","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement_reconcile_accounting_accountant","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_analytic_journal_analytic_accounting","account.analytic.journal","model_account_analytic_journal","analytic.group_analytic_accounting",1,1,1,1
|
||||
"access_account_account_analytic_accounting","account.account","model_account_account","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_product_analytic_accounting","product.product","product.model_product_product","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_category_analytic_accounting","product.category","product.model_product_category","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_template_analytic_accounting","product.template","product.model_product_template","analytic.group_analytic_accounting",1,0,0,0
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
@@ -29,16 +29,55 @@ class account_chart(osv.osv_memory):
|
||||
_name = "account.chart"
|
||||
_description = "Account chart"
|
||||
_columns = {
|
||||
'fiscalyear': fields.many2one('account.fiscalyear', \
|
||||
'fiscalyear': fields.many2one('account.fiscalyear', \
|
||||
'Fiscal year', \
|
||||
help = 'Keep empty for all open fiscal years'),
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
'period_from': fields.many2one('account.period', 'Start period'),
|
||||
'period_to': fields.many2one('account.period', 'End period'),
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
('posted', 'All Posted Entries')], 'Target Moves', required = True),
|
||||
}
|
||||
|
||||
def _get_fiscalyear(self, cr, uid, context=None):
|
||||
"""Return default Fiscalyear value"""
|
||||
return self.pool.get('account.fiscalyear').find(cr, uid)
|
||||
now = time.strftime('%Y-%m-%d')
|
||||
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now)], limit=1 )
|
||||
return fiscalyears and fiscalyears[0] or False
|
||||
|
||||
def _build_periods(self, cr, uid, period_from, period_to):
|
||||
period_obj = self.pool.get('account.period')
|
||||
period_date_start = period_obj.read(cr, uid, period_from, ['date_start'])['date_start']
|
||||
period_date_stop = period_obj.read(cr, uid, period_to, ['date_stop'])['date_stop']
|
||||
if period_date_start > period_date_stop:
|
||||
raise osv.except_osv(_('Error'),_('Start period should be smaller then End period'))
|
||||
return period_obj.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
|
||||
|
||||
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None):
|
||||
res = {}
|
||||
res['value'] = {'period_from': False, 'period_to': False}
|
||||
if fiscalyear_id:
|
||||
start_period = end_period = False
|
||||
cr.execute('''
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
ORDER BY p.date_start ASC
|
||||
LIMIT 1) AS period_start
|
||||
UNION
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
AND p.date_start < NOW()
|
||||
ORDER BY p.date_stop DESC
|
||||
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
|
||||
periods = [i[0] for i in cr.fetchall()]
|
||||
if periods and len(periods) > 1:
|
||||
start_period = periods[0]
|
||||
end_period = periods[1]
|
||||
res['value'] = {'period_from': start_period, 'period_to': end_period}
|
||||
return res
|
||||
|
||||
def account_chart_open_window(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
@@ -56,7 +95,10 @@ class account_chart(osv.osv_memory):
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'action_account_tree')
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id']
|
||||
result = act_obj.read(cr, uid, [id], context=context)[0]
|
||||
result['context'] = str({'fiscalyear': data['fiscalyear'], \
|
||||
result['periods'] = []
|
||||
if data['period_from'] and data['period_to']:
|
||||
result['periods'] = self._build_periods(cr, uid, data['period_from'], data['period_to'])
|
||||
result['context'] = str({'fiscalyear': data['fiscalyear'], 'periods': result['periods'], \
|
||||
'state': data['target_move']})
|
||||
if data['fiscalyear']:
|
||||
result['name'] += ':' + self.pool.get('account.fiscalyear').read(cr, uid, [data['fiscalyear']], context=context)[0]['code']
|
||||
|
||||
@@ -7,16 +7,18 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account charts">
|
||||
<group colspan="4" >
|
||||
<field name="fiscalyear"/>
|
||||
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<group colspan="4">
|
||||
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/>
|
||||
<label align="0.7" colspan="4" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear)]"/>
|
||||
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear)]"/>
|
||||
<field name="target_move"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Charts" name="account_chart_open_window" type="object" />
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Charts" name="account_chart_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -21,15 +21,21 @@
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from osv import osv
|
||||
from osv import osv, fields
|
||||
|
||||
class account_balance_report(osv.osv_memory):
|
||||
_inherit = "account.common.account.report"
|
||||
_name = 'account.balance.report'
|
||||
_description = 'Account Balance Report'
|
||||
|
||||
_columns = {
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
('posted', 'All Posted Entries')], 'Target Moves', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'journal_ids': [],
|
||||
'target_move': 'all'
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
@@ -45,6 +51,7 @@ class account_balance_report(osv.osv_memory):
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['target_move'])[0])
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}
|
||||
|
||||
account_balance_report()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="fiscalyear_id" position="after">
|
||||
<field name="display_account"/>
|
||||
<field name="target_move"/>
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
@@ -77,7 +77,7 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
res[str(i)] = {
|
||||
'name': (i!=0 and (str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length)) or ('+'+str(4 * period_length))),
|
||||
'stop': start.strftime('%Y-%m-%d'),
|
||||
'start': (i!=0 and stop.strftime('%Y-%m-%d') or None),
|
||||
'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
|
||||
}
|
||||
start = stop - RelativeDateTime(days=1)
|
||||
else:
|
||||
@@ -86,7 +86,7 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
res[str(5-(i+1))] = {
|
||||
'name' : (i!=4 and str((i) * period_length)+'-' + str((i+1) * period_length) or ('+'+str(4 * period_length))),
|
||||
'start': start.strftime('%Y-%m-%d'),
|
||||
'stop': (i!=4 and stop.strftime('%Y-%m-%d') or None),
|
||||
'stop': (i!=4 and stop.strftime('%Y-%m-%d') or False),
|
||||
}
|
||||
start = stop + RelativeDateTime(days=1)
|
||||
data['form'].update(res)
|
||||
|
||||
@@ -47,10 +47,9 @@ class account_bs_report(osv.osv_memory):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
res = super(account_bs_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
|
||||
doc = etree.XML(res['arch'])
|
||||
nodes = doc.xpath("//field[@name='journal_ids']")
|
||||
nodes = doc.xpath("//page[@name='journal_ids']")
|
||||
for node in nodes:
|
||||
node.set('readonly', '1')
|
||||
node.set('required', '0')
|
||||
node.set('invisible', '1')
|
||||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
@@ -78,4 +77,4 @@ class account_bs_report(osv.osv_memory):
|
||||
|
||||
account_bs_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -8,35 +8,27 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Report Options">
|
||||
<group colspan="4" expand="1">
|
||||
<field name="chart_account_id" widget='selection'/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<group colspan="2" name='Journals'>
|
||||
<notebook tabpos="up">
|
||||
<page string="Journals" >
|
||||
<notebook tabpos="up" colspan="4">
|
||||
<page string="Filters" name="filters">
|
||||
<field name="filter" on_change="onchange_filter(filter, fiscalyear_id)" colspan="4"/>
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_from" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
|
||||
<field name="date_to" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
|
||||
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
|
||||
</page>
|
||||
<page string="Journals" name="journal_ids">
|
||||
<field name="journal_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<group colspan="2" name='Filters'>
|
||||
<notebook tabpos="up">
|
||||
<page string="Filters">
|
||||
<field name="filter" on_change="onchange_filter(filter, fiscalyear_id)" />
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_from" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
|
||||
<field name="date_to" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
|
||||
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" colspan="2"/>
|
||||
<button icon="gtk-print" name="check_report" string="Print" type="object" colspan="2" default_focus="1" />
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -37,7 +37,7 @@ class account_report_general_ledger(osv.osv_memory):
|
||||
'landscape': True,
|
||||
'amount_currency': True,
|
||||
'sortby': 'sort_date',
|
||||
'initial_balance': True,
|
||||
'initial_balance': False,
|
||||
}
|
||||
|
||||
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False, context=None):
|
||||
|
||||
@@ -29,13 +29,13 @@ class account_partner_balance(osv.osv_memory):
|
||||
_name = 'account.partner.balance'
|
||||
_description = 'Print Account Partner Balance'
|
||||
_columns = {
|
||||
'initial_balance': fields.boolean('Include Initial Balances'
|
||||
,help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
|
||||
# 'initial_balance': fields.boolean('Include Initial Balances'
|
||||
# ,help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
|
||||
'display_partner': fields.selection([('non-zero_balance', 'With balance is not equal to 0'), ('all', 'All Partners')]
|
||||
,'Display Partners')
|
||||
}
|
||||
_defaults = {
|
||||
'initial_balance': True,
|
||||
# 'initial_balance': True,
|
||||
'display_partner': 'non-zero_balance'
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class account_partner_balance(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'display_partner'])[0])
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0])
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.partner.balance',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="fiscalyear_id" position="after">
|
||||
<field name="result_selection"/>
|
||||
<field name="initial_balance"/>
|
||||
<!-- <field name="initial_balance"/> -->
|
||||
<field name="display_partner"/>
|
||||
<newline/>
|
||||
</field>
|
||||
|
||||
@@ -99,8 +99,6 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" rightIndent="0.0" leftIndent="-8.0" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" rightIndent="0.0" leftIndent="-7.0" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.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"/>
|
||||
@@ -183,11 +181,11 @@
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P1">Analytic Account Reference:</para>
|
||||
<para style="terp_header">Analytic Account Reference:</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="227.0,103.0,75.0,73.0,61.0" style="Table5">
|
||||
<blockTable colWidths="292.0,63.0,57.0,71.0,57.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name</para>
|
||||
@@ -199,7 +197,7 @@
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
<para style="terp_tblheader_Details_Right">Amount([[ company.currency_id.code]]) </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Percentage</para>
|
||||
@@ -208,7 +206,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(ref_lines(data['form']),'a') ]]</para>
|
||||
<blockTable colWidths="226.0,103.0,75.0,73.0,61.0" style="Table6">
|
||||
<blockTable colWidths="292.0,63.0,57.0,71.0,57.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['ref_name'] ]]</para>
|
||||
@@ -220,7 +218,7 @@
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['ref_qty']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['ref_amt']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['ref_amt']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">100.00%</para>
|
||||
@@ -231,11 +229,11 @@
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P2">Analytic Account :</para>
|
||||
<para style="terp_header">Analytic Account :</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="226.0,103.0,77.0,72.0,61.0" repeatRows="1" style="Table3">
|
||||
<blockTable colWidths="292.0,63.0,57.0,71.0,57.0" repeatRows="1" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name</para>
|
||||
@@ -247,7 +245,7 @@
|
||||
<para style="terp_tblheader_Details_Right">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
<para style="terp_tblheader_Details_Right">Amount([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Percentage</para>
|
||||
@@ -256,7 +254,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(data['form']),'a') ]]</para>
|
||||
<blockTable colWidths="227.0,103.0,77.0,72.0,60.0" style="Table4">
|
||||
<blockTable colWidths="292.0,63.0,57.0,71.0,57.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['acc_name'] ]]</para>
|
||||
@@ -268,7 +266,7 @@
|
||||
<para style="terp_default_Right_9">[[formatLang(a['qty']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['amt']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['amt']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a['perc']) ]]%</para>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page/field[@name='property_account_expense']" position="after">
|
||||
<xpath expr="/form/notebook/page/group/field[@name='property_account_expense']" position="after">
|
||||
<field name="property_account_creditor_price_difference" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
|
||||
<newline/>
|
||||
</xpath>
|
||||
|
||||
@@ -180,6 +180,6 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
|
||||
return result
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header=False)
|
||||
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal')
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Account Budget" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<document filename="Analytic Budget.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Budget" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
@@ -17,8 +17,11 @@
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,1" stop="1,1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -35,51 +38,36 @@
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" 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="Heading" fontName="Helvetica" fontSize="15.0" leading="19" 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="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<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="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<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"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -94,114 +82,107 @@
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P5">[[ repeatIn(objects,'o') ]]</para>
|
||||
<blockTable colWidths="499.0" style="Table2">
|
||||
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
|
||||
<blockTable colWidths="482.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ company.name ]]</para>
|
||||
<para style="terp_header_Centre">Analytic Budget</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="249.0,249.0" style="Table1">
|
||||
<blockTable colWidths="241.0,241.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">Currency: [[ company.currency_id.name ]]</para>
|
||||
<para style="terp_default_8"><font face="Helvetica-Bold">Currency:</font> [[ company.currency_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Printed at: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S')]]</para>
|
||||
<para style="terp_default_Right_8"><font face="Helvetica">Printed at: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</font> at [[ time.strftime('%H:%M:%S')]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_address">
|
||||
Analysis from [[ data['form']['date_from'] ]] to [[ data['form']['date_to'] ]]
|
||||
</para>
|
||||
<para style="terp_default_8"><font face="Helvetica-Bold">Analysis from</font> [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">Analytic Account : <font color="blue">[[ o.name ]]</font></para>
|
||||
<para style="terp_default_Bold_right_9">Analytic Account : <font color="blue">[[ o.name ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P5">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P5">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="191.0,82.0,81.0,83.0,62.0" style="Table3">
|
||||
<blockTable colWidths="209.0,77.0,78.0,80.0,54.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">Description</para>
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Theoretical Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Theoretical Amount ([[ company.currency_id.code ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Planned Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Planned Amount([[ company.currency_id.code ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Practical Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Practical Amount([[ company.currency_id.code ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">Perc(%)</para>
|
||||
<para style="terp_tblheader_Details_Centre">Perc(%)</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P5">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
|
||||
<blockTable colWidths="191.0,82.0,80.0,84.0,61.0" style="Table4">
|
||||
<para style="terp_default_8">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
|
||||
<blockTable colWidths="201.0,75.0,76.0,77.0,52.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1"><font>[['.....' *(a['status']-1) ]] [[ setTag('font','font',{'color':'white'}) ]]</font><font>[[ a['status']==1 and (setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica"> [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['theo'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['pln'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln']) ]]</font> [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['prac'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac']) ]]</font> [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['perc'] ]]%</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc']) ]]</font>%</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="191.0,83.0,80.0,84.0,61.0" style="Table5">
|
||||
<blockTable colWidths="202.0,75.0,75.0,78.0,52.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3"><font face="Times-Roman">[[ repeatIn(funct_total(data['form']),'b') ]]</font> <b>Total :</b></para>
|
||||
<para style="terp_default_Bold_9">[[ repeatIn(funct_total(data['form']),'b') ]] Total([[ company.currency_id.code ]]) :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ '%.2f' % b['tot_theo'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ '%.2f' % b['tot_pln'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ '%.2f' % b['tot_prac'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ '%.2f' % b['tot_perc'] ]]%</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc']) ]]%</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P5">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<document filename="Budgets.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Budgets" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
@@ -90,17 +90,17 @@
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<blockTable colWidths="499.0" style="Table2">
|
||||
<blockTable colWidths="482.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Budgets</para>
|
||||
<para style="terp_header_Centre">Budget</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="249.0,249.0" style="Table1">
|
||||
<blockTable colWidths="241.0,241.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Currency: [[ company.currency_id.name ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica-Bold">Currency: </font>[[ company.currency_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">Printed at: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S')]]</para>
|
||||
@@ -108,10 +108,10 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Analysis from [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica-Bold">Analysis from</font> [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">Budget : <font face="Helvetica" color="blue">[[ o.name ]]</font></para>
|
||||
<para style="terp_default_Bold_right_9">Budget : <font color="Blue">[[ o.name ]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -127,13 +127,13 @@
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Theoretical Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Theoretical Amount([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Planned Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Planned Amount([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Practical Amount</para>
|
||||
<para style="terp_tblheader_Details_Centre">Practical Amount([[ company.currency_id.code]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Perc(%)</para>
|
||||
@@ -142,19 +142,19 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(funct(o,data['form']),'a') ]]</para>
|
||||
<blockTable colWidths="191.0,82.0,81.0,84.0,61.0" style="Table4">
|
||||
<blockTable colWidths="185.0,79.0,78.0,81.0,59.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ '%.2f' % a['theo'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ '%.2f' % a['theo'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['pln'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['pln'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['prac'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['prac'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['perc'] ]]%</para>
|
||||
@@ -162,19 +162,19 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="191.0,85.0,83.0,84.0,62.0" style="Table5">
|
||||
<blockTable colWidths="185.0,82.0,80.0,81.0,60.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font><font face="Helvetica">Total </font>:</para>
|
||||
<para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font><font face="Helvetica">Total ([[ company.currency_id.code]]) </font>:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ '%.2f' % b['tot_theo'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ '%.2f' % b['tot_pln'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ '%.2f' % b['tot_prac'] ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ '%.2f' % b['tot_perc'] ]]%</para>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Follow Up" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Follow UP" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="42.0" y1="28.0" width="511" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -43,30 +43,30 @@
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,1" stop="3,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,1" stop="4,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,1" stop="5,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="6,1" stop="6,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="7,1" stop="7,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="8,1" stop="8,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="9,1" stop="9,1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<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="0.0" spaceAfter="6.0"/>
|
||||
<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="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"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
@@ -87,8 +87,8 @@
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_followup_id" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(ids_to_objects(data['form']['partner_ids']),'o') ]] </para>
|
||||
<para style="terp_default_8">[[ setLang(o.lang) ]]</para>
|
||||
@@ -99,10 +99,10 @@
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.name ]]</para>
|
||||
<para style="terp_default_9">[[ a['name'] ]]</para>
|
||||
<para style="terp_default_9">[[ a['street'] ]]</para>
|
||||
<para style="terp_default_9">[[ a['zip'] ]] </para>
|
||||
<para style="terp_default_9">[[ a['city'] ]]</para>
|
||||
<para style="terp_default_9">[[ a['street2'] or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">[[ a['zip'] ]] [[ a['city'] ]]</para>
|
||||
<para style="terp_default_9">[[( a['state_id'] and a['state_id'][1]) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">[[( a['country_id'] and a['country_id'][1]) or '']]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
@@ -116,7 +116,7 @@
|
||||
</para>
|
||||
<para style="terp_default_9">Document : Customer account statement</para>
|
||||
<para style="terp_default_9">Date : [[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para>
|
||||
<para style="terp_default_9">Customer Ref : [[ o.id ]]</para>
|
||||
<para style="terp_default_9">Customer Ref : [[ o.ref or '' ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -124,10 +124,10 @@
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="49.0,81.0,50.0,50.0,55.0,69.0,62.0,67.0,27.0" style="Table1">
|
||||
<blockTable colWidths="68.0,78.0,45.0,70.0,51.0,58.0,62.0,61.0,27.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Invoice Date</para>
|
||||
<para style="terp_tblheader_Details_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Description</para>
|
||||
@@ -136,19 +136,19 @@
|
||||
<para style="terp_tblheader_Details_Centre">Ref</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Due Date</para>
|
||||
<para style="terp_tblheader_Details_Centre">Maturity Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount In Currency</para>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Due</para>
|
||||
<para style="terp_tblheader_Details_Right">Due<font face="Helvetica" size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Paid</para>
|
||||
<para style="terp_tblheader_Details_Right">Paid<font face="Helvetica" size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Maturity</para>
|
||||
<para style="terp_tblheader_Details_Right">Maturity<font face="Helvetica" size="8.0">([[ company.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Li.</para>
|
||||
@@ -157,7 +157,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para>
|
||||
<blockTable colWidths="50.0,80.0,50.0,50.0,55.0,68.0,62.0,67.0,27.0" style="Table5">
|
||||
<blockTable colWidths="68.0,79.0,44.0,69.0,49.0,62.0,61.0,60.0,26.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(line['date'],date = True) ]]</para>
|
||||
@@ -172,16 +172,16 @@
|
||||
<para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'], date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] )]] [[ line['currency_id'] and line['currency_id'][1] or '' ]] </para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] )]] [[ line['amount_currency'] and line['currency_id'][1] or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['debit']) ]] [[ company.currency_id.name]] </para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]] [[ company.currency_id.name]] </para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ (line['date_maturity'] < time.strftime('%Y-%m-%d')) and formatLang(line['debit'] -line['credit']) ]] [[ company.currency_id.name]]</para>
|
||||
<para style="terp_default_Right_9">[[ (line['date_maturity'] < time.strftime('%Y-%m-%d')) and formatLang(line['debit'] -line['credit']) or formatLang(0.0) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
|
||||
@@ -189,7 +189,7 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="50.0,76.0,27.0,27.0,50.0,55.0,68.0,62.0,67.0,27.0" style="Table2">
|
||||
<blockTable colWidths="191.0,108.0,73.0,61.0,60.0,26.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
@@ -197,36 +197,16 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_tblheader_Details">Sub-Total<font face="Helvetica" size="8.0">([[ company.currency_id.code ]])</font>: </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['debit'], getLines(o), 0.00)) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['credit'], getLines(o), 0.00)) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Sub-Total: </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['debit'], getLines(o), 0.00)) ]] [[ company.currency_id.name]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[formatLang(reduce(lambda x,y: x+y['credit'], getLines(o), 0.00)) ]] [[ company.currency_id.name]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)) ]] [[ company.currency_id.name]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
@@ -241,19 +221,10 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_tblheader_Details">Balance<font face="Helvetica" size="8.0">([[ company.currency_id.code ]])</font>: </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x,y: x+(y['debit'] - y['credit']), getLines(o), 0.00))) ]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
@@ -261,23 +232,12 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Balance: </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((reduce(lambda x,y: x+(y['debit'] - y['credit']), getLines(o), 0.00))) ]] [[ company.currency_id.name]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -287,4 +247,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -74,7 +74,7 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
sub_total[i]=entry.price_subtotal
|
||||
i=i+1
|
||||
res['note']=entry.note
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
res['type']=entry.state
|
||||
|
||||
if entry.uos_id.id==False:
|
||||
@@ -107,7 +107,7 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
|
||||
j=j+1
|
||||
res['price_subtotal']="%.2f"%(sum)
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
res['quantity']=''
|
||||
res['price_unit']=''
|
||||
res['discount']=''
|
||||
@@ -138,7 +138,7 @@ class account_invoice_1(report_sxw.rml_parse):
|
||||
else:
|
||||
res['name']=entry.name
|
||||
res['price_subtotal']=''
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoices" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Invoice" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -61,7 +61,6 @@
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -81,7 +80,6 @@
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -92,7 +90,6 @@
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -119,16 +116,13 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<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="0.0" spaceAfter="6.0"/>
|
||||
<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="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"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -139,8 +133,8 @@
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" 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_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -154,11 +148,11 @@
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman"/>
|
||||
<paraStyle name="Drawing" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Helvetica"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
@@ -167,19 +161,19 @@
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Detail_another" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
@@ -191,12 +185,11 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.partner_id.name ]] [[ o.partner_id.title or '' ]] </para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]][[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ (o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para')]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
@@ -216,11 +209,11 @@
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<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="P2">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_default_space">
|
||||
<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="P3">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
|
||||
@@ -239,13 +232,13 @@
|
||||
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.name ]]<font color="white"> </font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.address_invoice_id.partner_id.ref or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -267,37 +260,34 @@
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,51.0,19.0" style="Table_Invoice_Line_Content">
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,71.0" style="Table_Invoice_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] + ')' ) ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica">[[ ((a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] + ')' ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para>
|
||||
<para style="terp_default_Centre_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]] [[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['currency'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['price_subtotal'] ]] [[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -307,12 +297,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ format(a['note']) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -344,9 +329,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="4.0,278.0,257.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -362,7 +344,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<para style="terp_default_1">[[ a['type']!='break' and removeParentNode('pageBreak')]]</para>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -378,16 +360,12 @@
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1"/>
|
||||
</section>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Tableau3">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -395,20 +373,14 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
<para style="terp_default_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>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table4">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -416,20 +388,14 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
<para style="terp_default_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>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table6">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -440,23 +406,20 @@
|
||||
<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>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="57.0,61.0,60.0,360.0" style="Table7">
|
||||
<blockTable colWidths="105.0,52.0,62.0,320.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
<para style="terp_tblheader_Details">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base</para>
|
||||
@@ -476,10 +439,10 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="54.0,61.0,67.0,357.0" style="Table8">
|
||||
<blockTable colWidths="105.0,51.0,63.0,320.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]]</para>
|
||||
<para style="terp_default_8">[[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
@@ -522,4 +485,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -84,7 +84,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
sub_total[i]=entry.price_subtotal
|
||||
i=i+1
|
||||
res['note']=entry.note
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
res['type']=entry.state
|
||||
|
||||
if entry.uos_id.id==False:
|
||||
@@ -117,7 +117,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
|
||||
j=j+1
|
||||
res['price_subtotal']="%.2f"%(sum)
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
res['quantity']=''
|
||||
res['price_unit']=''
|
||||
res['discount']=''
|
||||
@@ -148,7 +148,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
||||
else:
|
||||
res['name']=entry.name
|
||||
res['price_subtotal']=''
|
||||
res['currency']=invoice.currency_id.code
|
||||
res['currency']=invoice.currency_id.symbol
|
||||
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoices" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Invoice" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -61,7 +61,6 @@
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -81,7 +80,6 @@
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -92,7 +90,6 @@
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -123,16 +120,13 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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="0.0" spaceAfter="6.0"/>
|
||||
<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="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"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -143,8 +137,8 @@
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" 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_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -158,11 +152,11 @@
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Drawing" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Times-Roman"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Times-Roman"/>
|
||||
<paraStyle name="Drawing" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Header" fontName="Helvetica"/>
|
||||
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
|
||||
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
|
||||
<paraStyle name="Signature" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
@@ -171,19 +165,19 @@
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Salutation" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="3.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Detail_another" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
@@ -195,12 +189,11 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.partner_id.name ]] [[ o.partner_id.title or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.street2 or removeParentNode('para')]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.zip or '' ]][[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="terp_default_9">[[ (o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
@@ -220,11 +213,11 @@
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<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="P3">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_default_space">
|
||||
<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="P2">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header">
|
||||
@@ -243,7 +236,7 @@
|
||||
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ o.name ]]<font color="white"> </font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
|
||||
@@ -271,37 +264,34 @@
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(invoice_lines(o), 'a') ]]</para>
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,51.0,19.0" style="Table_Invoice_Line_Content">
|
||||
<blockTable colWidths="4.0,280.0,44.0,21.0,66.0,53.0,71.0" style="Table_Invoice_Line_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['type']=='text' and removeParentNode('blockTable')]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] +')' ) ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica">[[ ((a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['name'] ]] [[ a['type']=='article' and ('/ (' + a['tax_types'] +' )' ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['quantity'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['quantity'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['uos'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['price_unit'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['price_unit'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ a['discount'] ]]</para>
|
||||
<para style="terp_default_Centre_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font>[[ a['discount'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]] [[ a['price_subtotal'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ a['currency'] ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['price_subtotal'] ]] [[ a['currency'] ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -311,12 +301,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ format(a['note']) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Note">Note: [[ (a['note'] and format(a['note'])) or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -348,9 +333,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="4.0,278.0,257.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -366,7 +348,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
<para style="terp_default_1">[[ a['type']!='break' and removeParentNode('pageBreak')]]</para>
|
||||
<blockTable colWidths="284.0,64.0,64.0,52.0,75.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -382,16 +364,12 @@
|
||||
<para style="terp_tblheader_Details_Right">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1"/>
|
||||
</section>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Tableau3">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -399,20 +377,14 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
<para style="terp_default_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>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table4">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -420,20 +392,14 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
<para style="terp_default_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>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="405.0,59.0,54.0,20.0" style="Table6">
|
||||
<blockTable colWidths="405.0,59.0,74.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -444,23 +410,20 @@
|
||||
<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>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="57.0,61.0,60.0,360.0" style="Table7">
|
||||
<blockTable colWidths="119.0,50.0,59.0,310.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
<para style="terp_tblheader_Details">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base</para>
|
||||
@@ -480,10 +443,10 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="54.0,61.0,67.0,357.0" style="Table8">
|
||||
<blockTable colWidths="120.0,49.0,60.0,310.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]]</para>
|
||||
<para style="terp_default_8">[[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
@@ -502,7 +465,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Coment_Payment_Term">
|
||||
@@ -537,4 +500,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payment" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Payment Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="34.0" width="527" height="774"/>
|
||||
</pageTemplate>
|
||||
@@ -10,15 +10,51 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
@@ -41,28 +77,25 @@
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="#000000" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<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="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
@@ -92,7 +125,7 @@
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="264.0,264.0" style="Table3">
|
||||
<blockTable colWidths="318.0,210.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -102,113 +135,82 @@
|
||||
<td>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or '']]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or '' ]]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_Space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_header">Payment Order / Payment</para>
|
||||
<para style="terp_default_9">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="94.0,434.0" style="Table1">
|
||||
<blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Payment Type</para>
|
||||
<para style="terp_tblheader_General_Centre">Payment Type</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ o.mode and o.mode.name or '-' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Reference</para>
|
||||
<para style="terp_tblheader_General_Centre">Reference</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ o.reference or '-' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Used Account </para>
|
||||
<para style="terp_tblheader_General_Centre">Used Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ get_account_name(o.mode.bank_id.id) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Execution Type</para>
|
||||
<para style="terp_tblheader_General_Centre">Execution Type</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ o.date_prefered == 'now' and 'Now' or removeParentNode('para') ]]</para>
|
||||
<para style="P1">[[ o.date_prefered == 'due' and 'Due date' or removeParentNode('para') ]]</para>
|
||||
<para style="P1">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">Company Currency</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ get_company_currency() ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_tblheader_General_Centre">Company Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.mode and o.mode.name or '-' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.reference or '-' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[get_account_name(o.mode.bank_id.id)]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.date_prefered == 'now' and 'Now' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.date_prefered == 'due' and 'Due date' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_company_currency() ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_space_0.2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_space_0.2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,85.0,111.0,83.0,62.0,115.0" style="Table2">
|
||||
<blockTable colWidths="112.0,86.0,106.0,63.0,85.0,75.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Partner</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Bank account</para>
|
||||
<para style="terp_tblheader_Details_Centre">Bank Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Invoice reference</para>
|
||||
<para style="terp_tblheader_Details_Centre">Invoice Ref</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Value date</para>
|
||||
<para style="terp_tblheader_Details_Centre">Value Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
<para style="terp_tblheader_Details_Right">Amount([[ get_company_currency() ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount in currency</para>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -217,63 +219,49 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_9">[[repeatIn(o.line_ids, 'line') ]]</para>
|
||||
<blockTable colWidths="72.0,85.0,111.0,84.0,62.0,114.0" style="Table4">
|
||||
<blockTable colWidths="112.0,86.0,106.0,64.0,85.0,75.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[line.partner_id and line.partner_id.name or '-' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ get_account_name(line.bank_id.id) or '-']]</para>
|
||||
<para style="terp_default_Centre_9">[[get_account_name(line.bank_id.id) or '-']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[line.date=='False' and '-' or line.date ]]</para>
|
||||
<para style="terp_default_Centre_9">[[line.date=='False' and '-' or formatLang(line.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[formatLang(line.amount) or '-' ]]</para>
|
||||
<para style="terp_default_Right_9">[[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.amount_currency) ]] [[ line.currency.name ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.amount_currency) ]] [[ line.currency.name ]] </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,85.0,111.0,84.0,62.0,114.0" style="Table5">
|
||||
<blockTable colWidths="304.0,64.0,85.0,75.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"/>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_company_currency() ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">Total:</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_amount_total(o)) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[ get_amount_total_in_currency(o) and line.currency.name ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[ line.currency.name ]] </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -32,6 +32,7 @@ class payment_order(report_sxw.rml_parse):
|
||||
'time': time,
|
||||
'get_invoice_name': self._get_invoice_name,
|
||||
'get_company_currency' : self._get_company_currency,
|
||||
'get_company_currency_symbol': self._get_company_currency_symbol,
|
||||
'get_amount_total_in_currency' : self._get_amount_total_in_currency,
|
||||
'get_amount_total' : self._get_amount_total,
|
||||
'get_account_name' : self._get_account_name,
|
||||
@@ -69,8 +70,13 @@ class payment_order(report_sxw.rml_parse):
|
||||
def _get_company_currency(self):
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
|
||||
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.name or False
|
||||
|
||||
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.code or False
|
||||
|
||||
def _get_company_currency_symbol(self):
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
|
||||
return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
|
||||
|
||||
def _get_account_name(self,bank_id):
|
||||
if bank_id:
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
@@ -79,6 +85,6 @@ class payment_order(report_sxw.rml_parse):
|
||||
return value_name[0][1]
|
||||
return False
|
||||
|
||||
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="internal")
|
||||
report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="external")
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"voucher_sequence.xml",
|
||||
"voucher_workflow.xml",
|
||||
"voucher_report.xml",
|
||||
"wizard/account_voucher_open_view.xml",
|
||||
"wizard/account_voucher_unreconcile_view.xml",
|
||||
"voucher_view.xml",
|
||||
"voucher_payment_receipt_view.xml",
|
||||
@@ -53,7 +52,6 @@
|
||||
"test/sales_receipt.yml",
|
||||
"test/sales_payment.yml",
|
||||
],
|
||||
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
"installable": True,
|
||||
|
||||
@@ -54,7 +54,7 @@ class report_voucher(report_sxw.rml_parse):
|
||||
voucher_line = self.pool.get('account.voucher.line').search(self.cr, self.uid, [('partner_id','=',move_ids.partner_id.id), ('voucher_id','=',voucher_id)])
|
||||
if voucher_line:
|
||||
voucher = self.pool.get('account.voucher.line').browse(self.cr, self.uid, voucher_line)[0]
|
||||
return voucher.ref
|
||||
return voucher.name
|
||||
else:
|
||||
return
|
||||
report_sxw.report_sxw(
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P8">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P8">[[ repeatIn(objects,'voucher') ]]</para>ref
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -167,7 +167,7 @@
|
||||
<para style="terp_tblheader_Details">Journal:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.type ]]</para>
|
||||
<para style="terp_default_9">[[ voucher.journal_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Number:</para>
|
||||
@@ -252,7 +252,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8_Italic">[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]</para>
|
||||
<para style="terp_default_8_Italic">[[ move_ids.name ]] - [[ voucher.reference or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
||||
@@ -122,7 +122,7 @@ class account_voucher(osv.osv):
|
||||
\n* The \'Cancelled\' state is used when user cancel voucher.'),
|
||||
'amount': fields.float('Total', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'tax_amount':fields.float('Tax Amount', digits=(14,2), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction referance number."),
|
||||
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
|
||||
'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'),
|
||||
'move_id':fields.many2one('account.move', 'Account Entry'),
|
||||
'move_ids': fields.related('move_id','line_id', type='many2many', relation='account.move.line', string='Journal Items', readonly=True),
|
||||
@@ -134,8 +134,7 @@ class account_voucher(osv.osv):
|
||||
],'Payment', select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'tax_id':fields.many2one('account.tax', 'Tax', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'pre_line':fields.boolean('Previous Payments ?', required=False),
|
||||
'date_due': fields.date('Due Date'),
|
||||
# 'term_id':fields.many2one('account.payment.term', 'Term', required=False),
|
||||
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
}
|
||||
_defaults = {
|
||||
'period_id': _get_period,
|
||||
@@ -166,6 +165,7 @@ class account_voucher(osv.osv):
|
||||
voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
|
||||
|
||||
if not voucher.tax_id:
|
||||
self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0})
|
||||
continue
|
||||
|
||||
tax = [tax_pool.browse(cr, uid, voucher.tax_id.id)]
|
||||
@@ -177,7 +177,7 @@ class account_voucher(osv.osv):
|
||||
total_tax = 0.0
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes'):
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes',[]):
|
||||
total_tax += tax_line.get('amount')
|
||||
total += total_tax
|
||||
else:
|
||||
@@ -186,7 +186,7 @@ class account_voucher(osv.osv):
|
||||
line_total = 0.0
|
||||
line_tax = 0.0
|
||||
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes'):
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes',[]):
|
||||
line_tax += tax_line.get('amount')
|
||||
line_total += tax_line.get('price_unit')
|
||||
total_tax += line_tax
|
||||
@@ -196,7 +196,6 @@ class account_voucher(osv.osv):
|
||||
self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
|
||||
return True
|
||||
|
||||
# TODO: review this code.
|
||||
def onchange_price(self, cr, uid, ids, line_ids, tax_id, partner_id=False, context={}):
|
||||
tax_pool = self.pool.get('account.tax')
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
@@ -215,17 +214,26 @@ class account_voucher(osv.osv):
|
||||
|
||||
for line in line_ids:
|
||||
line_amount = 0.0
|
||||
if line[1]:
|
||||
line_amount = voucher_line_pool.browse(cr, uid, line[1]).untax_amount
|
||||
else:
|
||||
line_amount = line[2].get('amount')
|
||||
line_amount = line[2].get('amount')
|
||||
voucher_line_ids += [line[1]]
|
||||
voucher_total += line_amount
|
||||
|
||||
total = voucher_total
|
||||
total_tax = 0.0
|
||||
if tax_id:
|
||||
tax = [tax_pool.browse(cr, uid, tax_id)]
|
||||
if partner_id:
|
||||
partner = partner_pool.browse(cr, uid, partner_id) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
tax = tax_pool.browse(cr, uid, taxes)
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes',[]):
|
||||
total_tax += tax_line.get('amount')
|
||||
total += total_tax
|
||||
|
||||
res.update({
|
||||
'amount':total,
|
||||
'amount':total or voucher_total,
|
||||
'tax_amount':total_tax
|
||||
})
|
||||
return {
|
||||
@@ -246,6 +254,44 @@ class account_voucher(osv.osv):
|
||||
})
|
||||
return {'value':default}
|
||||
|
||||
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
|
||||
@param partner_id: latest value from user input for field partner_id
|
||||
@param args: other arguments
|
||||
@param context: context arguments, like lang, time zone
|
||||
|
||||
@return: Returns a dict which contains new values, and context
|
||||
"""
|
||||
default = {
|
||||
'value':{},
|
||||
}
|
||||
|
||||
if not partner_id or not journal_id:
|
||||
return default
|
||||
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
journal = journal_pool.browse(cr, uid, journal_id)
|
||||
partner = partner_pool.browse(cr, uid, partner_id)
|
||||
account_id = False
|
||||
tr_type = False
|
||||
if journal.type in ('sale','sale_refund'):
|
||||
account_id = partner.property_account_receivable.id
|
||||
tr_type = 'sale'
|
||||
elif journal.type in ('purchase', 'purchase_refund','expense'):
|
||||
account_id = partner.property_account_payable.id
|
||||
tr_type = 'purchase'
|
||||
else:
|
||||
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
|
||||
tr_type = 'receipt'
|
||||
|
||||
default['value']['account_id'] = account_id
|
||||
default['value']['type'] = tr_type
|
||||
return default
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
@@ -281,17 +327,14 @@ class account_voucher(osv.osv):
|
||||
journal = journal_pool.browse(cr, uid, journal_id)
|
||||
partner = partner_pool.browse(cr, uid, partner_id)
|
||||
account_id = False
|
||||
term_id = False
|
||||
if journal.type in ('sale','sale_refund'):
|
||||
account_id = partner.property_account_receivable.id
|
||||
elif journal.type in ('purchase', 'purchase_refund','expense'):
|
||||
account_id = partner.property_account_payable.id
|
||||
else:
|
||||
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
|
||||
default['value'].update({
|
||||
'account_id':account_id,
|
||||
'term_id':term_id
|
||||
})
|
||||
|
||||
default['value']['account_id'] = account_id
|
||||
if journal.type not in ('cash', 'bank'):
|
||||
return default
|
||||
|
||||
@@ -314,17 +357,22 @@ class account_voucher(osv.osv):
|
||||
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
|
||||
elif company_currency != currency_id and ttype == 'receipt':
|
||||
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit)
|
||||
|
||||
|
||||
for line in moves:
|
||||
if line.credit and line.reconcile_partial_id:
|
||||
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
|
||||
continue
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
|
||||
total_credit += line.credit or 0.0
|
||||
total_debit += line.debit or 0.0
|
||||
|
||||
for line in moves:
|
||||
if line.credit and line.reconcile_partial_id:
|
||||
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
|
||||
continue
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
|
||||
rs = {
|
||||
'name':line.move_id.name,
|
||||
'type': line.credit and 'dr' or 'cr',
|
||||
@@ -354,7 +402,6 @@ class account_voucher(osv.osv):
|
||||
default['value']['pre_line'] = 1
|
||||
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
|
||||
return default
|
||||
|
||||
def onchange_date(self, cr, user, ids, date, context={}):
|
||||
@@ -374,7 +421,7 @@ class account_voucher(osv.osv):
|
||||
}
|
||||
}
|
||||
|
||||
def onchange_journal(self, cr, uid, ids, journal_id):
|
||||
def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context={}):
|
||||
if not journal_id:
|
||||
return False
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
@@ -383,8 +430,10 @@ class account_voucher(osv.osv):
|
||||
tax_id = False
|
||||
if account_id and account_id.tax_ids:
|
||||
tax_id = account_id.tax_ids[0].id
|
||||
|
||||
return {'value':{'tax_id':tax_id}}
|
||||
|
||||
vals = self.onchange_price(cr, uid, ids, line_ids, tax_id, partner_id, context)
|
||||
vals['value'].update({'tax_id':tax_id})
|
||||
return vals
|
||||
|
||||
def proforma_voucher(self, cr, uid, ids):
|
||||
self.action_move_line_create(cr, uid, ids)
|
||||
@@ -428,7 +477,7 @@ class account_voucher(osv.osv):
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid !'))
|
||||
return super(account_voucher, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
# TODO
|
||||
# TODO: may be we can remove this method if not used anyware
|
||||
def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'):
|
||||
res = {}
|
||||
if not partner_id:
|
||||
@@ -500,7 +549,7 @@ class account_voucher(osv.osv):
|
||||
if credit < 0:
|
||||
debit = -credit
|
||||
credit = 0.0
|
||||
|
||||
|
||||
move_line = {
|
||||
'name':inv.name or '/',
|
||||
'debit':debit,
|
||||
@@ -514,7 +563,9 @@ class account_voucher(osv.osv):
|
||||
'date':inv.date,
|
||||
'date_maturity':inv.date_due
|
||||
}
|
||||
master_line = move_line_pool.create(cr, uid, move_line)
|
||||
|
||||
if (debit == 0.0 or credit == 0.0 or debit+credit > 0) and (debit > 0.0 or credit > 0.0):
|
||||
master_line = move_line_pool.create(cr, uid, move_line)
|
||||
|
||||
rec_list_ids = []
|
||||
line_total = debit - credit
|
||||
@@ -528,6 +579,7 @@ class account_voucher(osv.osv):
|
||||
if not line.amount:
|
||||
continue
|
||||
amount = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
|
||||
|
||||
move_line = {
|
||||
'journal_id':inv.journal_id.id,
|
||||
'period_id':inv.period_id.id,
|
||||
@@ -536,6 +588,7 @@ class account_voucher(osv.osv):
|
||||
'move_id':move_id,
|
||||
'partner_id':inv.partner_id.id,
|
||||
'currency_id':inv.currency_id.id,
|
||||
'amount_currency':line.amount,
|
||||
'analytic_account_id':line.account_analytic_id and line.account_analytic_id.id or False,
|
||||
'quantity':1,
|
||||
'credit':0.0,
|
||||
@@ -556,11 +609,10 @@ class account_voucher(osv.osv):
|
||||
line_total -= amount
|
||||
move_line['credit'] = amount
|
||||
|
||||
if inv.tax_id:
|
||||
if inv.tax_id and inv.type in ('sale', 'purchase'):
|
||||
move_line.update({
|
||||
'account_tax_id':inv.tax_id.id,
|
||||
})
|
||||
|
||||
master_line = move_line_pool.create(cr, uid, move_line)
|
||||
if line.move_line_id.id:
|
||||
rec_ids = [master_line, line.move_line_id.id]
|
||||
@@ -578,7 +630,8 @@ class account_voucher(osv.osv):
|
||||
'debit':diff<0 and -diff or 0.0,
|
||||
}
|
||||
account_id = False
|
||||
if inv.journal_id.type in ('sale','sale_refund', 'cash','bank'):
|
||||
if inv.type in ('sale', 'receipt'):
|
||||
# if inv.journal_id.type in ('sale','sale_refund', 'cash', 'bank'):
|
||||
account_id = inv.partner_id.property_account_receivable.id
|
||||
else:
|
||||
account_id = inv.partner_id.property_account_payable.id
|
||||
@@ -589,7 +642,7 @@ class account_voucher(osv.osv):
|
||||
'move_id': move_id,
|
||||
'state':'posted'
|
||||
})
|
||||
move_pool.post(cr, uid, [move_id], context={})
|
||||
#move_pool.post(cr, uid, [move_id], context={})
|
||||
for rec_ids in rec_list_ids:
|
||||
if len(rec_ids) >= 2:
|
||||
move_line_pool.reconcile_partial(cr, uid, rec_ids)
|
||||
@@ -608,49 +661,6 @@ class account_voucher(osv.osv):
|
||||
default['date'] = time.strftime('%Y-%m-%d')
|
||||
return super(account_voucher, self).copy(cr, uid, id, default, context)
|
||||
|
||||
# TODO
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
"""
|
||||
Returns views and fields for current model where view will depend on {view_type}.
|
||||
@param view_id: list of fields, which required to read signatures
|
||||
@param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx)
|
||||
@param context: context arguments, like lang, time zone
|
||||
@param toolbar: contains a list of reports, wizards, and links related to current model
|
||||
|
||||
@return: Returns a dict that contains definition for fields, views, and toolbars
|
||||
"""
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
voucher_type = {
|
||||
'sale':'view_sale_receipt_form',
|
||||
'purchase':'view_purchase_receipt_form',
|
||||
'payment':'view_vendor_payment_form',
|
||||
'receipt':'view_vendor_receipt_form'
|
||||
}
|
||||
if view_type == 'form':
|
||||
tview = voucher_type.get(context.get('type'))
|
||||
tview = tview or 'view_voucher_form'
|
||||
result = data_pool._get_id(cr, uid, 'account_voucher', tview)
|
||||
view_id = data_pool.browse(cr, uid, result, context=context).res_id
|
||||
|
||||
res = super(account_voucher, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
|
||||
|
||||
#Restrict the list of journal view in search view
|
||||
if view_type == 'search':
|
||||
type_search = {
|
||||
'bank':[('type','in',['bank','cash'])],
|
||||
'cash':[('type','in',['bank','cash'])],
|
||||
'sale':[('type','in',['sale','purchase_refund'])],
|
||||
'purchase':[('type','in',['purchase','sale_refund'])],
|
||||
'expense':[('type','in',['purchase'])],
|
||||
'sale_refund':[('type','in',['sale','purchase_refund'])],
|
||||
'purchase_refund':[('type','in',['purchase','sale_refund'])]
|
||||
}
|
||||
domain = type_search.get(context.get('journal_type'))
|
||||
journal_list = journal_pool.name_search(cr, uid, '', domain)
|
||||
res['fields']['journal_id']['selection'] = journal_list
|
||||
return res
|
||||
|
||||
account_voucher()
|
||||
|
||||
class account_voucher_line(osv.osv):
|
||||
@@ -737,9 +747,10 @@ class account_voucher_line(osv.osv):
|
||||
journal = journal_pool.browse(cr, user, journal_id)
|
||||
account_id = False
|
||||
ttype = 'cr'
|
||||
if journal.type in ('sale', 'purchase_refund'):
|
||||
if journal.type in ('sale', 'sale_refund'):
|
||||
account_id = journal.default_credit_account_id and journal.default_credit_account_id.id or False
|
||||
elif journal.type in ('purchase', 'expense', 'sale_refund'):
|
||||
ttype = 'cr'
|
||||
elif journal.type in ('purchase', 'expense', 'purchase_refund'):
|
||||
account_id = journal.default_debit_account_id and journal.default_debit_account_id.id or False
|
||||
ttype = 'dr'
|
||||
elif partner_id:
|
||||
|
||||
@@ -1,6 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_voucher_filter_customer_pay" model="ir.ui.view">
|
||||
<field name="name">account.voucher.customer.pay.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
|
||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" string="Customer"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
|
||||
<field name="period_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
<field name="narration"/>
|
||||
<field name="amount"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Customer" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_voucher_filter_vendor_pay" model="ir.ui.view">
|
||||
<field name="name">account.voucher.purchase.pay.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
|
||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" string="Supplier"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
|
||||
<field name="period_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
<field name="narration"/>
|
||||
<field name="amount"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_vendor_payment_form">
|
||||
<field name="name">account.voucher.payment.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -18,9 +98,7 @@
|
||||
<field name="reference" select="1" string="Payment Ref"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="account_id"
|
||||
domain="[('type','=','other')]"
|
||||
widget="selection"
|
||||
on_change="onchange_account(account_id)"
|
||||
invisible="True"/>
|
||||
<field name="pre_line" invisible="1"/>
|
||||
<field name="type" invisible="True"/>
|
||||
@@ -28,7 +106,7 @@
|
||||
<notebook colspan="4">
|
||||
<page string="Payment Information">
|
||||
<field name="line_dr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140">
|
||||
<tree string="Payment Lines" editable="bottom">
|
||||
<tree string="Vendor Invoices and Outstanding transactions" editable="bottom">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
|
||||
@@ -87,13 +165,27 @@
|
||||
|
||||
<record id="action_vendor_payment" model="ir.actions.act_window">
|
||||
<field name="name">Vendor Payment</field>
|
||||
<field name="res_model">account.voucher.open</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')]</field>
|
||||
<field name="context">{'journal_type':'bank', 'type':'payment'}</field>
|
||||
<field name="view_id" ref="account_open_vouchers_view"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'type':'payment'}</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_voucher_filter_vendor_pay"/>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
<record id="action_vendor_payment_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_vendor_payment"/>
|
||||
</record>
|
||||
<record id="action_vendor_payment_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_vendor_payment_form"/>
|
||||
<field name="act_window_id" ref="action_vendor_payment"/>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
|
||||
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
|
||||
|
||||
@@ -115,9 +207,7 @@
|
||||
<field name="reference" select="1" string="Payment Ref"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="account_id"
|
||||
domain="[('type','=','other')]"
|
||||
widget="selection"
|
||||
on_change="onchange_account(account_id)"
|
||||
invisible="True"/>
|
||||
<field name="pre_line" invisible="1"/>
|
||||
<field name="type" invisible="True"/>
|
||||
@@ -181,13 +271,26 @@
|
||||
|
||||
<record id="action_vendor_receipt" model="ir.actions.act_window">
|
||||
<field name="name">Sales Payment</field>
|
||||
<field name="res_model">account.voucher.open</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field>
|
||||
<field name="context">{'journal_type':'bank', 'type':'receipt'}</field>
|
||||
<field name="view_id" ref="account_open_vouchers_view"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'type':'receipt'}</field>
|
||||
<field name="search_view_id" ref="view_voucher_filter_customer_pay"/>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
<record id="action_vendor_receipt_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_vendor_receipt"/>
|
||||
</record>
|
||||
<record id="action_vendor_receipt_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_vendor_receipt_form"/>
|
||||
<field name="act_window_id" ref="action_vendor_receipt"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_vendor_receipt" icon="STOCK_JUSTIFY_FILL" sequence="12"
|
||||
id="menu_action_vendor_receipt" parent="account.menu_finance_receivables"/>
|
||||
</data>
|
||||
|
||||
@@ -1,16 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_voucher_filter_vendor" model="ir.ui.view">
|
||||
<field name="name">account.voucher.purchase.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
|
||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" string="Supplier"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
|
||||
<field name="period_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
<field name="narration"/>
|
||||
<field name="amount"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_voucher_filter_sale" model="ir.ui.view">
|
||||
<field name="name">account.voucher.sale.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
|
||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" string="Customer"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
|
||||
<field name="period_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
<field name="narration"/>
|
||||
<field name="amount"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Customer" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="act_pay_voucher" model="ir.actions.act_window">
|
||||
<field name="name">Sales Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
|
||||
<field name="context">{'journal_type':'bank', 'type':'receipt', 'partner_id': partner_id}</field>
|
||||
<field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
|
||||
<field name="view_id" ref="view_vendor_receipt_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_sale_receipt_form">
|
||||
<field name="name">account.voucher.sale.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -19,7 +99,7 @@
|
||||
<form string="Sales Receipt">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id)" string="Customer"/>
|
||||
<field name="journal_id" domain="[('type','in',['sale','purchase_refund'])]" widget="selection" on_change="onchange_journal(journal_id)"/>
|
||||
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id)"/>
|
||||
<field name="number"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date" on_change="onchange_date(date)"/>
|
||||
@@ -50,10 +130,11 @@
|
||||
<field name="reference"
|
||||
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
|
||||
/>
|
||||
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
|
||||
</group>
|
||||
<group col="4" colspan="1">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" on_change="onchange_price(line_ids, tax_id, partner_id)" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -73,7 +154,7 @@
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'title':'Sales Payment', 'journal_type':'bank', 'type':'receipt', 'partner_id': partner_id}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now'),('state','!=','posted')]}"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'title':'Sales Payment', 'type':'receipt', 'partner_id': partner_id}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now'),('state','!=','posted')]}"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -83,23 +164,38 @@
|
||||
<!-- Sales Voucher -->
|
||||
<record id="action_sale_receipt" model="ir.actions.act_window">
|
||||
<field name="name">Sales Receipt</field>
|
||||
<field name="res_model">account.voucher.open</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type','in',['sale','purchase_refund']), ('type','=','sale')]</field>
|
||||
<field name="context">{'journal_type':'sale', 'type':'sale'}</field>
|
||||
<field name="view_id" ref="account_open_vouchers_view"/>
|
||||
<field name="target">new</field>
|
||||
<field name="domain">[('journal_id.type','in',['sale','sale_refund']), ('type','=','sale')]</field>
|
||||
<field name="context">{'type':'sale'}</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_voucher_filter_sale"/>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
<record id="action_sale_receipt_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_sale_receipt"/>
|
||||
</record>
|
||||
<record id="action_sale_receipt_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_sale_receipt_form"/>
|
||||
<field name="act_window_id" ref="action_sale_receipt"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
|
||||
action="action_sale_receipt" parent="account.menu_finance_receivables" sequence="10"/>
|
||||
|
||||
action="action_sale_receipt"
|
||||
parent="account.menu_finance_receivables"
|
||||
sequence="10"/>
|
||||
|
||||
<!-- Purchase Vouchers -->
|
||||
<record id="act_pay_bills" model="ir.actions.act_window">
|
||||
<field name="name">Bill Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
|
||||
<field name="context">{'journal_type':'bank', 'type':'payment', 'partner_id': partner_id}</field>
|
||||
<field name="context">{'type':'payment', 'partner_id': partner_id, 'default_reference':reference}</field>
|
||||
<field name="view_id" ref="view_vendor_payment_form"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
@@ -111,10 +207,10 @@
|
||||
<form string="Vendor Bills">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" string="Vendor" on_change="onchange_partner_id(partner_id, journal_id, amount)"/>
|
||||
<field name="journal_id" domain="[('type','in',['purchase','sale_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id)"/>
|
||||
<field name="reference" select="1"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id)"/>
|
||||
<field name="number"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="reference" select="1"/>
|
||||
<field name="account_id" domain="[('type','=','other')]" invisible="True"/>
|
||||
<field name="type" invisible="True"/>
|
||||
</group>
|
||||
@@ -137,11 +233,10 @@
|
||||
<separator string="Payment Terms" colspan="2"/>
|
||||
<field name="date" string="Bill Date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="date_due"/>
|
||||
<field name="amount" required="0" string="Amount Due"/>
|
||||
</group>
|
||||
<group col="4" colspan="1">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all'))]"/><field name="tax_amount" on_change="onchange_price(line_ids, tax_id, partner_id)" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -161,7 +256,7 @@
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'title':'Bill Payment', 'journal_type':'bank', 'type':'payment', 'partner_id': partner_id}" type="action" string="Pay Bill" attrs="{'invisible':[('state','!=','posted')]}"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id}" type="action" string="Pay Bill" attrs="{'invisible':[('state','!=','posted')]}"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -169,13 +264,26 @@
|
||||
</record>
|
||||
<record id="action_purchase_receipt" model="ir.actions.act_window">
|
||||
<field name="name">Vendor Bills</field>
|
||||
<field name="res_model">account.voucher.open</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('journal_id.type','in',['purchase','sale_refund']), ('type','=','purchase')]</field>
|
||||
<field name="context">{'journal_type':'purchase', 'type':'purchase'}</field>
|
||||
<field name="view_id" ref="account_open_vouchers_view"/>
|
||||
<field name="target">new</field>
|
||||
<field name="domain">[('journal_id.type','in',['purchase','purchase_refund']), ('type','=','purchase')]</field>
|
||||
<field name="context">{'type':'purchase'}</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" eval="view_voucher_filter_vendor"/>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
<record id="action_purchase_receipt_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_purchase_receipt"/>
|
||||
</record>
|
||||
<record id="action_purchase_receipt_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_purchase_receipt_form"/>
|
||||
<field name="act_window_id" ref="action_purchase_receipt"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
|
||||
action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_voucher_form">
|
||||
<field name="name">account.voucher.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -28,22 +28,22 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Accounting Voucher">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" on_change="onchange_journal_voucher(partner_id, journal_id)"/>
|
||||
<field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(partner_id, journal_id)"/>
|
||||
<field name="type" required="1"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="reference" select="1"/>
|
||||
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id)"/>
|
||||
<field name="type" on_change="onchange_partner_id(partner_id, journal_id)"/>
|
||||
<field name="journal_id" widget="selection" select="1" on_change="onchange_partner_id(partner_id, journal_id)"/>
|
||||
<field name="account_id" widget="selection" invisible="True"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Voucher Entry">
|
||||
<field name="line_ids" on_change="onchange_price(line_ids, False, partner_id)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Voucher Lines" editable="top">
|
||||
<field name="line_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Voucher Items" editable="bottom">
|
||||
<field name="account_id"/>
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="amount" sum="Total Amount"/>
|
||||
<field name="type"/>
|
||||
<field name="account_analytic_id" domain="[('parent_id','!=',False)]"/>
|
||||
<field name="account_analytic_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="2" colspan="3">
|
||||
@@ -51,16 +51,22 @@
|
||||
<field name="narration" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="amount" string="Total"/>
|
||||
<field name="number"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" select="1" attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
|
||||
<group col="2" colspan="1" >
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="number"/>
|
||||
<field name="date" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
|
||||
</group>
|
||||
<group col="4" colspan="1" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}">
|
||||
<group col="6" colspan="4">
|
||||
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="period_id"/>
|
||||
<field name="audit"/>
|
||||
</group>
|
||||
@@ -73,7 +79,7 @@
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_view_account_voucher_unreconcile)d" string="Cancel" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -83,48 +89,7 @@
|
||||
<field name="name">account.voucher.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
|
||||
<filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
|
||||
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<filter icon="gtk-cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers" groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="number" select='1'/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="partner_id" select='1'/>
|
||||
<field name="date" select='1'/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" />
|
||||
<field name="period_id" context="{'period_id': self}" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." col='8' colspan='4'>
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
|
||||
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference" select="1"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="narration" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_voucher_filter_new" model="ir.ui.view">
|
||||
<field name="name">account.voucher.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">search</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Vouchers">
|
||||
<group col='8' colspan='4'>
|
||||
@@ -133,9 +98,9 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="number" select='1'/>
|
||||
<field name="partner_id" select='1'/>
|
||||
<field name="date"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
@@ -143,18 +108,19 @@
|
||||
<field name="period_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="12" col="10">
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference"/>
|
||||
<field name="name"/>
|
||||
<field name="narration"/>
|
||||
<field name="amount"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/>
|
||||
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." col='8' colspan='4'>
|
||||
<field name="reference" select="1"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="narration" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -199,7 +165,7 @@
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('state','=','posted')]</field>
|
||||
<field name="context">{'state':'posted'}</field>
|
||||
<field name="search_view_id" ref="view_voucher_filter_new"/>
|
||||
<field name="search_view_id" ref="view_voucher_filter"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -19,5 +19,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import account_voucher_open
|
||||
import account_voucher_unreconcile
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
class account_voucher_open(osv.osv_memory):
|
||||
_name = "account.voucher.open"
|
||||
_description = "Account Voucher"
|
||||
|
||||
def _get_period(self, cr, uid, context={}):
|
||||
"""
|
||||
Return default account period value
|
||||
"""
|
||||
ids = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
period_id = False
|
||||
if len(ids):
|
||||
period_id = ids[0]
|
||||
return period_id
|
||||
|
||||
def _get_journal(self, cr, uid, context={}):
|
||||
"""
|
||||
Return journal based on the journal type
|
||||
"""
|
||||
journal_id = False
|
||||
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
if context.get('journal_type', False):
|
||||
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
|
||||
journal_id = jids[0]
|
||||
return journal_id
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
"""
|
||||
Returns views and fields for current model where view will depend on {view_type}.
|
||||
@param cr: A database cursor
|
||||
@param user: ID of the user currently logged in
|
||||
@param view_id: list of fields, which required to read signatures
|
||||
@param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx)
|
||||
@param context: context arguments, like lang, time zone
|
||||
@param toolbar: contains a list of reports, wizards, and links related to current model
|
||||
|
||||
@return: Returns a dict that contains definition for fields, views, and toolbars
|
||||
"""
|
||||
res = super(account_voucher_open, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
|
||||
|
||||
if not view_id:
|
||||
return res
|
||||
|
||||
period_pool = self.pool.get('account.period')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
journal_id = self._get_journal(cr, uid, context)
|
||||
period_id = self._get_period(cr, uid, context)
|
||||
|
||||
journal = False
|
||||
if journal_id:
|
||||
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
|
||||
else:
|
||||
journal = "All"
|
||||
|
||||
period = False
|
||||
if period_id:
|
||||
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
|
||||
|
||||
menu = self.pool.get('ir.ui.menu').browse(cr, uid, context.get('active_id'))
|
||||
name = menu.name
|
||||
|
||||
view = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<form string="Standard entries">
|
||||
<separator string="Open %s !" colspan="4"/>
|
||||
<group colspan="4" >
|
||||
<label width="300" string="Journal : %s"/>
|
||||
<newline/>
|
||||
<label width="300" string="Period : %s"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Ok" name="action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>""" % (str(name), str(journal), str(period))
|
||||
|
||||
res.update({
|
||||
'arch':view
|
||||
})
|
||||
return res
|
||||
|
||||
def action_open_window(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This function Open action move line window on given period and Journal/Payment Mode
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: account move journal’s ID or list of IDs
|
||||
@return: dictionary of Open action move line window on given period and Journal/Payment Mode
|
||||
"""
|
||||
|
||||
period_pool = self.pool.get('account.journal.period')
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
journal_id = self._get_journal(cr, uid, context)
|
||||
period_id = self._get_period(cr, uid, context)
|
||||
|
||||
menu = self.pool.get('ir.ui.menu').browse(cr, uid, context.get('active_id'))
|
||||
name = context.get('title', menu.name)
|
||||
|
||||
result = data_pool._get_id(cr, uid, 'account_voucher', 'view_voucher_filter_new')
|
||||
res_id = data_pool.browse(cr, uid, result, context=context).res_id
|
||||
|
||||
res = {
|
||||
'domain':menu.action.domain,
|
||||
'name': name,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,graph,form',
|
||||
'res_model': 'account.voucher',
|
||||
'view_id': False,
|
||||
'context': "{'search_default_journal_id':%d, 'search_default_period_id':%d, 'partner_id':%s}" % (journal_id, period_id, context.get('partner_id',False)),
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': res_id
|
||||
}
|
||||
return res
|
||||
|
||||
account_voucher_open()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_open_vouchers_view" model="ir.ui.view">
|
||||
<field name="name">Open Vouchers</field>
|
||||
<field name="model">account.voucher.open</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Open Vouchers">
|
||||
<separator string="Open Vouchers !" colspan="4"/>
|
||||
<group colspan="4" >
|
||||
<label width="300" string="Journal :"/>
|
||||
<newline/>
|
||||
<label width="300" string="Period :"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Ok" name="action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -70,7 +70,7 @@ class account_analytic_account(osv.osv):
|
||||
where_date += " AND l.date >= '" + context['from_date'] + "'"
|
||||
if context.get('to_date', False):
|
||||
where_date += " AND l.date <= '" + context['to_date'] + "'"
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency<0 and a.id IN %s GROUP BY a.id",(tuple(parent_ids),))
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount<0 and a.id IN %s GROUP BY a.id",(tuple(parent_ids),))
|
||||
r = dict(cr.fetchall())
|
||||
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, r, context)
|
||||
|
||||
@@ -90,7 +90,7 @@ class account_analytic_account(osv.osv):
|
||||
where_date += " AND l.date >= '" + context['from_date'] + "'"
|
||||
if context.get('to_date',False):
|
||||
where_date += " AND l.date <= '" + context['to_date'] + "'"
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency>0 and a.id IN %s GROUP BY a.id" ,(tuple(parent_ids),))
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount>0 and a.id IN %s GROUP BY a.id" ,(tuple(parent_ids),))
|
||||
r = dict(cr.fetchall())
|
||||
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, r, context=context)
|
||||
|
||||
@@ -111,11 +111,10 @@ class account_analytic_account(osv.osv):
|
||||
where_date += " AND l.date >= '" + context['from_date'] + "'"
|
||||
if context.get('to_date',False):
|
||||
where_date += " AND l.date <= '" + context['to_date'] + "'"
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE a.id IN %s GROUP BY a.id",(tuple(parent_ids),))
|
||||
cr.execute("SELECT a.id, COALESCE(SUM(l.amount),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE a.id IN %s GROUP BY a.id",(tuple(parent_ids),))
|
||||
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id] = sum
|
||||
|
||||
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context=context)
|
||||
|
||||
def _quantity_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
@@ -182,10 +181,10 @@ class account_analytic_account(osv.osv):
|
||||
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
|
||||
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
|
||||
'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
|
||||
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance',store=True),
|
||||
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit',store=True),
|
||||
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit',store=True),
|
||||
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity',store=True),
|
||||
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance'),
|
||||
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit'),
|
||||
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit'),
|
||||
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity'),
|
||||
'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
|
||||
'partner_id' : fields.many2one('res.partner', 'Associated Partner'),
|
||||
'contact_id' : fields.many2one('res.partner.address', 'Contact'),
|
||||
@@ -216,7 +215,7 @@ class account_analytic_account(osv.osv):
|
||||
'user_id' : lambda self, cr, uid, ctx : uid,
|
||||
'partner_id': lambda self, cr, uid, ctx: ctx.get('partner_id', False),
|
||||
'contact_id': lambda self, cr, uid, ctx: ctx.get('contact_id', False),
|
||||
'date_start': time.strftime('%Y-%m-%d')
|
||||
'date_start': time.strftime('%Y-%m-%d')
|
||||
}
|
||||
|
||||
def check_recursion(self, cr, uid, ids, parent=None):
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_account_analytic_line_analytic_accounting","account.analytic.line","analytic.model_account_analytic_line","analytic.group_analytic_accounting",1,1,1,1
|
||||
"access_account_analytic_account_analytic_accounting","account.analytic.account","analytic.model_account_analytic_account","analytic.group_analytic_accounting",1,1,1,1
|
||||
"access_account_analytic_journal_analytic_accounting","account.analytic.journal","account.model_account_analytic_journal","analytic.group_analytic_accounting",1,1,1,1
|
||||
"access_account_account_analytic_accounting","account.account","account.model_account_account","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_template_analytic_accounting","product.template","product.model_product_template","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_product_analytic_accounting","product.product","product.model_product_product","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_category_analytic_accounting","product.category","product.model_product_category","analytic.group_analytic_accounting",1,0,0,0
|
||||
|
||||
|
||||
|
@@ -208,7 +208,7 @@ class audittrail_objects_proxy(osv_pool):
|
||||
else:
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', '=', model.id)])
|
||||
field_id = field_ids and field_ids[0] or False
|
||||
assert field_id, _("'%s' field is not exits in '%s' model" %(field_name, model.model))
|
||||
assert field_id, _("'%s' field does not exist in '%s' model" %(field_name, model.model))
|
||||
|
||||
field = field_pool.read(cr, uid, field_id)
|
||||
relation_model = field['relation']
|
||||
@@ -254,7 +254,7 @@ class audittrail_objects_proxy(osv_pool):
|
||||
else:
|
||||
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', '=', model.id)])
|
||||
field_id = field_ids and field_ids[0] or False
|
||||
assert field_id, _("'%s' field is not exits in '%s' model" %(line['name'], model.model))
|
||||
assert field_id, _("'%s' field does not exist in '%s' model" %(line['name'], model.model))
|
||||
|
||||
field = field_pool.read(cr, uid, field_id)
|
||||
old_value = 'old_value' in line and line['old_value'] or ''
|
||||
@@ -303,7 +303,7 @@ class audittrail_objects_proxy(osv_pool):
|
||||
|
||||
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
|
||||
model_id = model_ids and model_ids[0] or False
|
||||
assert model_id, _("'%s' Model is not exits..." %(model))
|
||||
assert model_id, _("'%s' Model does not exist..." %(model))
|
||||
model = model_pool.browse(cr, uid, model_id)
|
||||
|
||||
if method in ('create'):
|
||||
|
||||
@@ -85,7 +85,6 @@ Create dashboard for CRM that includes:
|
||||
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_custom_create_menu_view.xml',
|
||||
'wizard/crm_merge_opportunities_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
||||
+1
-1
@@ -499,7 +499,7 @@ class crm_case_section(osv.osv):
|
||||
|
||||
_name = "crm.case.section"
|
||||
_description = "Sales Teams"
|
||||
_order = "name"
|
||||
_order = "parent_id, name"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Sales Team', size=64, required=True, translate=True),
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
string="Convert to Opportunity"
|
||||
help="Convert to Opportunity"
|
||||
icon="gtk-index"
|
||||
colspan="2"
|
||||
type="object"/>
|
||||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
|
||||
@@ -30,7 +30,6 @@ import crm_phonecall_to_partner
|
||||
import crm_phonecall_to_opportunity
|
||||
import crm_partner_to_opportunity
|
||||
|
||||
import crm_custom_create_menu
|
||||
import crm_merge_opportunities
|
||||
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
|
||||
|
||||
class crm_case_custom_create_menu(osv.osv_memory):
|
||||
'''
|
||||
Create menu for custom Cases
|
||||
'''
|
||||
_name = 'crm.custom.create.menu'
|
||||
_description = 'Create menu for custom Cases'
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Menu Name', size=64, required=True),
|
||||
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
|
||||
'section_id': fields.many2one('crm.case.section.custom', 'Section', required=True),
|
||||
'view_form': fields.many2one('ir.ui.view', 'Form View', domain=[('type','=','form'),('model','=','crm.case.custom')]),
|
||||
'view_tree': fields.many2one('ir.ui.view', 'Tree View', domain=[('type','=','tree'),('model','=','crm.case.custom')]),
|
||||
'view_calendar': fields.many2one('ir.ui.view', 'Calendar View', domain=[('type','=','calendar'),('model','=','crm.case.custom')]),
|
||||
'view_search': fields.many2one('ir.ui.view', 'Search View', domain=[('type','=','search'),('model','=','crm.case.custom')]),
|
||||
}
|
||||
|
||||
def menu_create(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Creates Menus for selected custom section
|
||||
"""
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
for this in self.browse(cr, uid, ids, context=context):
|
||||
domain = [('section_id', '=', this.section_id.id)]
|
||||
view_mode = [this.view_tree and 'tree', this.view_form and 'form', this.view_calendar and 'calendar']
|
||||
view_mode = filter(None , view_mode)
|
||||
action_id = self.pool.get('ir.actions.act_window').create(cr,uid, {
|
||||
'name': this.name,
|
||||
'res_model': 'crm.case.custom',
|
||||
'domain': domain,
|
||||
'view_type': 'form',
|
||||
'view_mode': ','.join(view_mode),
|
||||
'search_view_id': this.view_search.id or False,
|
||||
'context': {'default_section_id': this.section_id.id, 'default_user_id': uid}
|
||||
})
|
||||
menu_id=self.pool.get('ir.ui.menu').create(cr, uid, {
|
||||
'name': this.name,
|
||||
'parent_id': this.menu_parent_id.id,
|
||||
'icon': 'STOCK_JUSTIFY_FILL'
|
||||
})
|
||||
self.pool.get('ir.values').create(cr, uid, {
|
||||
'name': 'Custom Cases',
|
||||
'key2': 'tree_but_open',
|
||||
'model': 'ir.ui.menu',
|
||||
'res_id': menu_id,
|
||||
'value': 'ir.actions.act_window,%d'%action_id,
|
||||
'object': True
|
||||
})
|
||||
return {}
|
||||
|
||||
crm_case_custom_create_menu()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="crm_custom_create_menu_form">
|
||||
<field name="name">crm.custom.create.menu.form</field>
|
||||
<field name="model">crm.custom.create.menu</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Menu for Custom Cases">
|
||||
<separator string="Menu Information" colspan="4"/>
|
||||
<field name="name"/>
|
||||
<field name="menu_parent_id"/>
|
||||
<field name="section_id"/>
|
||||
<separator string="Select Views (Empty for Default)" colspan="4"/>
|
||||
<field name="view_form"/>
|
||||
<field name="view_tree"/>
|
||||
<field name="view_calendar"/>
|
||||
<field name="view_search"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
|
||||
<button name="menu_create" string="Create _Menu" type="object" icon='gtk-ok'/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_custom_create_menu_action">
|
||||
<field name="name">Create Menu</field>
|
||||
<field name="res_model">crm.custom.create.menu</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -286,7 +286,7 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after">
|
||||
<xpath expr="/form/notebook/page[@string='Sales Order']/group[1]/button[@name='button_dummy']" position="after">
|
||||
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009 Sharoon Thomas
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2010-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009 Sharoon Thomas
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2010-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009 Sharoon Thomas
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2010-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
Executable → Regular
+1
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009 Sharoon Thomas
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2010-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
Executable → Regular
+1
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009 Sharoon Thomas
|
||||
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2010-2010 OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
Executable → Regular
@@ -22,21 +22,35 @@
|
||||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
import time
|
||||
|
||||
import datetime
|
||||
import netsvc
|
||||
import pooler
|
||||
|
||||
from report.interface import report_rml
|
||||
from report.interface import toxml
|
||||
|
||||
from report import report_sxw
|
||||
|
||||
one_day = DateTime.RelativeDateTime(days=1)
|
||||
month2name = [0, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
month2name = [0, 'January', 'February', 'March', 'April', 'May', 'Jun', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
|
||||
#def hour2str(h):
|
||||
# hours = int(h)
|
||||
# minutes = int(round((h - hours) * 60, 0))
|
||||
# return '%02dh%02d' % (hours, minutes)
|
||||
|
||||
def lengthmonth(year, month):
|
||||
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
|
||||
return 29
|
||||
return [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
|
||||
|
||||
def strToDate(dt):
|
||||
if dt:
|
||||
dt_date=datetime.date(int(dt[0:4]),int(dt[5:7]),int(dt[8:10]))
|
||||
return dt_date
|
||||
else:
|
||||
return
|
||||
|
||||
class report_custom(report_rml):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
@@ -82,14 +96,95 @@ class report_custom(report_rml):
|
||||
# Week xml representation
|
||||
# wh = hour2str(wh)
|
||||
today_xml = '<day num="%s"><wh>%s</wh></day>' % ((today - month).days+1, round(wh,2))
|
||||
dy=(today - month).days+1
|
||||
days_xml.append(today_xml)
|
||||
today, tomor = tomor, tomor + one_day
|
||||
user_xml.append(user_repr % '\n'.join(days_xml))
|
||||
|
||||
rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
|
||||
rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
|
||||
header_xml = '''
|
||||
<header>
|
||||
<date>%s</date>
|
||||
<company>%s</company>
|
||||
</header>
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
|
||||
|
||||
first_date = str(month)
|
||||
som = strToDate(first_date)
|
||||
eom = som+datetime.timedelta(int(dy)-1)
|
||||
day_diff=eom-som
|
||||
date_xml=[]
|
||||
cell=1
|
||||
date_xml.append('<days>')
|
||||
if day_diff.days>=30:
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som.replace(day=x).strftime('%a'),x-som.day+1) for x in range(som.day, lengthmonth(som.year, som.month)+1)]
|
||||
else:
|
||||
if day_diff.days>=(lengthmonth(som.year, som.month)-som.day):
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som.replace(day=x).strftime('%a'),x-som.day+1) for x in range(som.day, lengthmonth(som.year, som.month)+1)]
|
||||
else:
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som.replace(day=x).strftime('%a'),x-som.day+1) for x in range(som.day, eom.day+1)]
|
||||
cell=x-som.day+1
|
||||
day_diff1=day_diff.days-cell+1
|
||||
width_dict={}
|
||||
month_dict={}
|
||||
i=1
|
||||
j=1
|
||||
year=som.year
|
||||
month=som.month
|
||||
month_dict[j]=som.strftime('%B')
|
||||
width_dict[j]=cell
|
||||
|
||||
while day_diff1>0:
|
||||
if month+i<=12:
|
||||
if day_diff1 > lengthmonth(year,i+month): # Not on 30 else you have problems when entering 01-01-2009 for example
|
||||
som1=datetime.date(year,month+i,1)
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, lengthmonth(year,i+month)+1)]
|
||||
i=i+1
|
||||
j=j+1
|
||||
month_dict[j]=som1.strftime('%B')
|
||||
cell=cell+x
|
||||
width_dict[j]=x
|
||||
else:
|
||||
som1=datetime.date(year,month+i,1)
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, eom.day+1)]
|
||||
i=i+1
|
||||
j=j+1
|
||||
month_dict[j]=som1.strftime('%B')
|
||||
cell=cell+x
|
||||
width_dict[j]=x
|
||||
day_diff1=day_diff1-x
|
||||
else:
|
||||
years=year+1
|
||||
year=years
|
||||
month=0
|
||||
i=1
|
||||
if day_diff1>=30:
|
||||
som1=datetime.date(years,i,1)
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, lengthmonth(years,i)+1)]
|
||||
i=i+1
|
||||
j=j+1
|
||||
month_dict[j]=som1.strftime('%B')
|
||||
cell=cell+x
|
||||
width_dict[j]=x
|
||||
else:
|
||||
som1=datetime.date(years,i,1)
|
||||
i=i+1
|
||||
j=j+1
|
||||
month_dict[j]=som1.strftime('%B')
|
||||
date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, eom.day+1)]
|
||||
cell=cell+x
|
||||
width_dict[j]=x
|
||||
day_diff1=day_diff1-x
|
||||
date_xml.append('</days>')
|
||||
date_xml.append('<cols>3.5cm%s</cols>\n' % (',0.74cm' * (int(dy))))
|
||||
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report>
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
</report>
|
||||
''' % '\n'.join(user_xml)
|
||||
''' % (header_xml,'\n'.join(user_xml),date_xml)
|
||||
return xml
|
||||
|
||||
report_custom('report.hr.attendance.bymonth', 'hr.employee', '', 'addons/hr_attendance/report/bymonth.xsl')
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<blockTable colWidths="78.0,118.0,151.0,98.0,75.0" style="Table_employee_detail_header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Operation</para>
|
||||
<para style="terp_tblheader_Details">Operation</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Date Signed</para>
|
||||
@@ -118,7 +118,7 @@
|
||||
<blockTable colWidths="62.0,123.0,154.0,100.0,75.0" style="Table_employee_detail_content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ att['action'] ]]</para>
|
||||
<para style="terp_default_9">[[ att['action'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ formatLang(att['date'],date_time=True) ]]</para>
|
||||
|
||||
@@ -3,82 +3,52 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="hr_custom_default.xsl"/>
|
||||
<xsl:import href="hr_custom_rml.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml" />
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="rml">
|
||||
<document filename="example.pdf">
|
||||
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Attendance By Month" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<pageGraphics>
|
||||
<drawRightString x="19.0cm" y="26.0cm"><xsl:value-of select="date"/></drawRightString>
|
||||
</pageGraphics>
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="22.7cm" height="18cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<xsl:template name="stylesheet">
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="name" fontName="Helvetica" textColor="green" fontSize="7"/>
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="6"/>
|
||||
<blockTableStyle id="week">
|
||||
<blockFont name="Helvetica-BoldOblique" size="8" start="0,0" stop="-1,0"/>
|
||||
<blockFont name="Helvetica" size="5" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="grey" start="0,0" stop="-1,0" />
|
||||
<lineStyle kind="LINEBEFORE" colorName="grey" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="grey" start="-1,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="grey" start="0,0" stop="-1,-1"/>
|
||||
<blockFont name="Helvetica-BoldOblique" size="6" alignment="center" start="0,0" stop="-1,1"/>
|
||||
<blockFont name="Helvetica" size="5" alignment="center" start="0,1" stop="-1,-1"/>
|
||||
<blockBackground colorName="#AAAAAA" start="1,0" stop="-1,1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,0" />
|
||||
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<xsl:call-template name="story"/>
|
||||
</story>
|
||||
</document>
|
||||
</xsl:template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="story">
|
||||
<spacer length="1cm" />
|
||||
<para style="terp_header_Centre" t="1">Attendance By Month</para>
|
||||
<spacer length="1cm" />
|
||||
<blockTable
|
||||
colWidths="3cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm,0.69cm" style="week">
|
||||
<blockTable>
|
||||
<xsl:attribute name="style">week</xsl:attribute>
|
||||
<xsl:attribute name="colWidths"><xsl:value-of select="report/cols" /></xsl:attribute>
|
||||
<tr>
|
||||
<td><xsl:value-of select="/report/month" /><xsl:text> </xsl:text><xsl:value-of select="/report/year" /></td>
|
||||
<td>1</td>
|
||||
<td>2</td>
|
||||
<td>3</td>
|
||||
<td>4</td>
|
||||
<td>5</td>
|
||||
<td>6</td>
|
||||
<td>7</td>
|
||||
<td>8</td>
|
||||
<td>9</td>
|
||||
<td>10</td>
|
||||
<td>11</td>
|
||||
<td>12</td>
|
||||
<td>13</td>
|
||||
<td>14</td>
|
||||
<td>15</td>
|
||||
<td>16</td>
|
||||
<td>17</td>
|
||||
<td>18</td>
|
||||
<td>19</td>
|
||||
<td>20</td>
|
||||
<td>21</td>
|
||||
<td>22</td>
|
||||
<td>23</td>
|
||||
<td>24</td>
|
||||
<td>25</td>
|
||||
<td>26</td>
|
||||
<td>27</td>
|
||||
<td>28</td>
|
||||
<td>29</td>
|
||||
<td>30</td>
|
||||
<td>31</td>
|
||||
<td><xsl:value-of select="/report/year" /></td>
|
||||
<xsl:for-each select="report/days/dayy">
|
||||
<td>
|
||||
<xsl:value-of select="attribute::name" />
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><xsl:value-of select="/report/month" /></td>
|
||||
<xsl:for-each select="report/days/dayy">
|
||||
<td>
|
||||
<xsl:value-of select="attribute::number" />
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
</tr>
|
||||
<xsl:apply-templates select="report/user"/>
|
||||
</blockTable>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version = '1.0' encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:template name="first_page_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="first_page_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version = '1.0' encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:template name="first_page_graphics_report"/>
|
||||
<xsl:template name="other_pages_graphics_report"/>
|
||||
|
||||
<xsl:template name="rml">
|
||||
<document filename="example.pdf">
|
||||
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
|
||||
<pageTemplate id="first_page">
|
||||
<pageGraphics>
|
||||
<xsl:call-template name="first_page_graphics_corporation"/>
|
||||
</pageGraphics>
|
||||
|
||||
<xsl:call-template name="first_page_frames"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="other_pages">
|
||||
<pageGraphics>
|
||||
<xsl:call-template name="other_pages_graphics_corporation"/>
|
||||
</pageGraphics>
|
||||
|
||||
<xsl:call-template name="other_pages_frames"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<xsl:call-template name="stylesheet"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<xsl:call-template name="story"/>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -57,16 +57,12 @@
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-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"/>
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_total">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -76,21 +72,20 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" 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="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" 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="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
@@ -113,8 +108,8 @@
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_bold_right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_italic_8" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">
|
||||
@@ -146,7 +141,7 @@
|
||||
<para style="terp_default_Centre_8">[[ o.employee_id.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ time.strftime('%d/%m/%Y', time.strptime(o.date, '%Y-%m-%d')) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.ref ]]</para>
|
||||
@@ -165,7 +160,7 @@
|
||||
<para style="terp_tblheader_Details">Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
<para style="terp_tblheader_Details_Centre">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Unit Price</para>
|
||||
@@ -174,7 +169,7 @@
|
||||
<para style="terp_tblheader_Details_Centre">Qty</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Price</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Price([[ o.currency_id.code ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -183,10 +178,10 @@
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.line_ids,'line') ]]</para>
|
||||
<blockTable colWidths="49.0,204.0,46.0,58.0,23.0,52.0,71.0,21.0" style="Table_expense_line">
|
||||
<blockTable colWidths="49.0,204.0,46.0,79.0,53.0,92.0" style="Table_expense_line">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ time.strftime('%d/%m/%Y', time.strptime(line.date_value, '%Y-%m-%d')) or '' ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(line.date_value,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.name or '' ]] [[ line.description or '' ]]</para>
|
||||
@@ -195,24 +190,19 @@
|
||||
<para style="terp_default_9">[[ line.ref or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ '%.2f' % line.unit_amount or '' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.unit_amount) ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.name ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.unit_quantity) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ '%.2f' % line.unit_quantity or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ '%.2f' % line.total_amount or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.name ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.total_amount) ]] [[ o.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
@@ -220,32 +210,28 @@
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="57.0,171.0,171.0,32.0,71.0,21.0" style="Table_Final_total">
|
||||
<blockTable colWidths="57.0,171.0,171.0,32.0,92.0" style="Table_Final_total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
@@ -266,10 +252,7 @@
|
||||
<para style="terp_tblheader_Details_Right">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ '%.2f' % o.amount ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ o.currency_id.name ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -3,19 +3,14 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="hr_custom_default.xsl"/>
|
||||
<xsl:import href="hr_custom_rml.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="rml">
|
||||
<document filename="example.pdf">
|
||||
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="col1" x1="0.8cm" y1="2.0cm" width="28.0cm" height="17cm"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<xsl:template name="stylesheet">
|
||||
<paraStyle name="normal" fontName="Helvetica" fontSize="6" alignment="left" />
|
||||
<paraStyle name="normal-title" fontName="Helvetica" fontSize="10" alignment="center"/>
|
||||
<paraStyle name="digits" fontName="Helvetica" fontSize="6" alignment="left"/>
|
||||
@@ -131,13 +126,6 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<xsl:call-template name="story"/>
|
||||
</story>
|
||||
</document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="story">
|
||||
@@ -151,24 +139,20 @@
|
||||
<xsl:for-each select="report/res">
|
||||
<td>
|
||||
<para>
|
||||
<xsl:attribute name="style">company</xsl:attribute>
|
||||
Company Name: <xsl:value-of select="attribute::name" />
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
<xsl:attribute name="style">print-date</xsl:attribute>
|
||||
Printing time: <xsl:value-of select="attribute::today" />
|
||||
</para>
|
||||
</td>
|
||||
</xsl:for-each>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<spacer length="0.8cm" />
|
||||
<spacer length="1.0cm" />
|
||||
<para style="title" t="1">Off-Days' Summary</para>
|
||||
<spacer length="0.5cm" />
|
||||
<para style="normal-title" t="1">Analyze from <u><xsl:value-of select="report/from" /></u> to <u> <xsl:value-of select="report/to" /> </u> of the <u><xsl:value-of select="report/type" /></u> holidays. </para>
|
||||
<spacer length="0.8cm" />
|
||||
<spacer length="1.0cm" />
|
||||
<xsl:variable name="cols_legend">
|
||||
<xsl:text>0.7cm,5.0cm</xsl:text>
|
||||
</xsl:variable>
|
||||
|
||||
@@ -27,7 +27,8 @@ from report.interface import report_rml
|
||||
from report.interface import toxml
|
||||
|
||||
import pooler
|
||||
|
||||
import time
|
||||
from report import report_sxw
|
||||
|
||||
def lengthmonth(year, month):
|
||||
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
|
||||
@@ -68,21 +69,14 @@ def emp_create_xml(self, cr, uid, dept, holiday_type, row_id, empid, name, som,
|
||||
display[index]=' '
|
||||
count=''
|
||||
|
||||
xml = '''
|
||||
<time-element index="%d">
|
||||
<value>%s</value>
|
||||
</time-element>
|
||||
'''
|
||||
time_xml = ([xml % (index, value) for index,value in display.iteritems()])
|
||||
data_xml=['<info id="%d" number="%d" val="%s" />' % (row_id,x,display[x]) for x in range(1,len(display)+1) ]
|
||||
|
||||
# Computing the xml
|
||||
xml = '''
|
||||
%s
|
||||
<employee row="%d" id="%d" name="%s" sum="%s">
|
||||
%s
|
||||
</employee>
|
||||
''' % (data_xml,row_id,dept, toxml(name),count, '\n'.join(time_xml))
|
||||
''' % (data_xml,row_id,dept, toxml(name),count)
|
||||
|
||||
return xml
|
||||
|
||||
@@ -234,14 +228,25 @@ class report_custom(report_rml):
|
||||
dept_done=1
|
||||
emp_xml += emp_create_xml(self, cr, uid, 0, holiday_type, row_id, item['id'], item['name'], som, eom)
|
||||
row_id = row_id +1
|
||||
|
||||
rpt_obj = pooler.get_pool(cr.dbname).get('hr.holidays')
|
||||
rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
|
||||
header_xml = '''
|
||||
<header>
|
||||
<date>%s</date>
|
||||
<company>%s</company>
|
||||
</header>
|
||||
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
|
||||
|
||||
# Computing the xml
|
||||
xml='''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report>
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
</report>
|
||||
''' % (months_xml,date_xml, emp_xml)
|
||||
''' % (header_xml,months_xml,date_xml, emp_xml)
|
||||
|
||||
return xml
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version = '1.0' encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:template name="first_page_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="first_page_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version = '1.0' encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:template name="first_page_graphics_report"/>
|
||||
<xsl:template name="other_pages_graphics_report"/>
|
||||
|
||||
<xsl:template name="rml">
|
||||
<document filename="example.pdf">
|
||||
<template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
|
||||
<pageTemplate id="first_page">
|
||||
<pageGraphics>
|
||||
<xsl:call-template name="first_page_graphics_corporation"/>
|
||||
</pageGraphics>
|
||||
|
||||
<xsl:call-template name="first_page_frames"/>
|
||||
</pageTemplate>
|
||||
<pageTemplate id="other_pages">
|
||||
<pageGraphics>
|
||||
<xsl:call-template name="other_pages_graphics_corporation"/>
|
||||
</pageGraphics>
|
||||
|
||||
<xsl:call-template name="other_pages_frames"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
|
||||
<stylesheet>
|
||||
<xsl:call-template name="stylesheet"/>
|
||||
</stylesheet>
|
||||
|
||||
<story>
|
||||
<xsl:call-template name="story"/>
|
||||
</story>
|
||||
|
||||
</document>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payroll Register" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Salary Payment Register" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="480" height="728"/>
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -65,197 +65,193 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
|
||||
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P15" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P16" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
|
||||
<paraStyle name="P18" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="P19" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<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="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<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="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="terp_header_center" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="terp_default_9_bold_center" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER"/>
|
||||
<paraStyle name="terp_default_9_center" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/>
|
||||
<paraStyle name="terp_tblheader_general" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<paraStyle name="terp_tblheader_details_center" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tbleheader_details_right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_right" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/>
|
||||
<paraStyle name="terp_default_9_bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="P4">Salary Payment Register</para>
|
||||
<para style="P5">[[o.name]]</para>
|
||||
<para style="P2">For the month of [[get_month(o.date)]]</para>
|
||||
<para style="P3">
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="terp_header_center">Salary Payment Register</para>
|
||||
<para style="terp_default_9_bold_center">[[o.name]]</para>
|
||||
<para style="terp_default_8_center">For the month of [[get_month(o.date)]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,294.0,46.0,68.0" style="Table3">
|
||||
<blockTable colWidths="72.0,295.0,47.0,68.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">Expanse To</para>
|
||||
<para style="terp_tblheader_general">Expanse To</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[o.journal_id.name]]</para>
|
||||
<para style="terp_default_8">[[o.journal_id.name]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">Number</para>
|
||||
<para style="terp_tblheader_general">Number</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[o.number]]</para>
|
||||
<para style="terp_default_8">[[o.number]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P13">Payment From</para>
|
||||
<para style="terp_tblheader_general">Payment From</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[o.bank_journal_id.name]]</para>
|
||||
<para style="terp_default_8">[[o.bank_journal_id.name]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6">Date</para>
|
||||
<para style="terp_tblheader_general">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">[[formatLang(time.strftime('%Y-%m-%d'), date = True)]]</para>
|
||||
<para style="terp_default_8">[[formatLang(time.strftime('%Y-%m-%d'), date = True)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">#</para>
|
||||
<para style="terp_tblheader_details_center">#</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6">Employee Name</para>
|
||||
<para style="terp_tblheader_details">Employee Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Basic SAL</para>
|
||||
<para style="terp_tbleheader_details_right">Basic SAL <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Others</para>
|
||||
<para style="terp_tbleheader_details_right">Others <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Allowances</para>
|
||||
<para style="terp_tbleheader_details_right">Allowances <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Gross SAL</para>
|
||||
<para style="terp_tbleheader_details_right">Gross SAL <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Deduction</para>
|
||||
<para style="terp_tbleheader_details_right">Deduction <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">Net SAL</para>
|
||||
<para style="terp_tbleheader_details_right">Net SAL <font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">[[ get_no() ]]</para>
|
||||
<para style="terp_default_8">[[ get_no() ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ repeatIn(o.line_ids, 'l') ]]</para>
|
||||
<para style="P8">[[add_line(l)]]</para>
|
||||
<para style="P8">[[ l.employee_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ repeatIn(o.line_ids, 'l') ]]</para>
|
||||
<para style="terp_default_8">[[add_line(l)]]</para>
|
||||
<para style="terp_default_8">[[ l.employee_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.basic)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.basic) ]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.other_pay)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.other_pay)]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.allounce)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.allounce)]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.grows)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.grows)]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.deduction)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.deduction)]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[formatLang(l.net)]]</para>
|
||||
<para style="terp_default_9_right">[[ formatLang(l.net)]] [[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="24.0,96.0,60.0,60.0,60.0,60.0,60.0,60.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6">Total SAL</para>
|
||||
<para style="terp_tblheader_details">Total SAL<font face="Helvetica" size="7.0">([[ company.currency_id.code]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_basic()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_basic())]][[ company.currency_id.symbol]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_other()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_other())]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_allow()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_allow())]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_grows()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_grows())]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_deduct()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_deduct())]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[get_net()]]</para>
|
||||
<para style="terp_tbleheader_details_right">[[formatLang(get_net())]] [[ company.currency_id.symbol]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<blockTable colWidths="240.0,240.0" style="Table5">
|
||||
<blockTable colWidths="241.0,241.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">For [[company.name]],</para>
|
||||
<para style="P6">
|
||||
<para style="terp_default_9_bold">For [[company.name]],</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P6">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P6">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P6">HR Manager</para>
|
||||
<para style="P19">Authorised Signature</para>
|
||||
<para style="terp_default_9_bold">HR Manager</para>
|
||||
<para style="terp_default_8">Authorised Signature</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
</document>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Pay Slip" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Pay slip" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -227,7 +227,6 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -270,16 +269,13 @@
|
||||
<blockTable colWidths="539.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Pay Slip</para>
|
||||
<para style="terp_header_Centre">Pay Slip </para>
|
||||
<para style="terp_default_Centre_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -295,7 +291,7 @@
|
||||
<para style="terp_default_Bold_9">Name </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[o.employee_id.name]]</para>
|
||||
<para style="terp_default_Bold_9">[[o.employee_id.name]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -325,7 +321,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table17">
|
||||
<blockTable colWidths="42.0,208.0,93.0,197.0" style="Table17">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Slip ID</para>
|
||||
@@ -334,14 +330,14 @@
|
||||
<para style="terp_default_9">[[ o.number or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">PAN No</para>
|
||||
<para style="terp_default_Bold_9">Identification No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.employee_id.pan_no or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="42.0,207.0,93.0,197.0" style="Table18">
|
||||
<blockTable colWidths="42.0,208.0,93.0,197.0" style="Table18">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Register</para>
|
||||
@@ -396,7 +392,7 @@
|
||||
<para style="terp_default_Bold_9">Basic Salary</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.basic_before_leaves or '' ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(o.basic_before_leaves) ]] [[ o.company_id.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Leaved Deduction</para>
|
||||
@@ -408,13 +404,10 @@
|
||||
<para style="terp_default_Bold_9">Basic Salary – Leaves</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(o.basic) ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(o.basic) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table12">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -422,9 +415,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="292.0,247.0" style="Table14">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -435,9 +425,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_9">[[repeatIn(get_leave(o.line_ids),'ld') ]]</para>
|
||||
<blockTable colWidths="293.0,246.0" style="Table13">
|
||||
@@ -446,17 +433,11 @@
|
||||
<para style="terp_default_9">[[ ld.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(ld.total) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(ld.total) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="158.0,112.0,160.0,109.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -473,9 +454,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="269.0,269.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -485,7 +463,7 @@
|
||||
<para style="terp_default_9">Basic Salary</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.basic) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.basic) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -493,7 +471,7 @@
|
||||
<para style="terp_default_9">[[repeatIn(get_earnings(o.line_ids),'a') ]] [[ a.code or removeParentNode('tr') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a.total) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(a.total) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -510,7 +488,7 @@
|
||||
<para style="terp_default_9">[[ b.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(b.total) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(b.total) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -524,22 +502,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="181.0,88.0,177.0,93.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total Earnings </para>
|
||||
<para style="terp_tblheader_Details">Total Earnings<font face="Helvetica" size="7.0">([[ o.company_id.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.allounce + o.basic) ]] </para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.allounce + o.basic) ]] [[ o.company_id.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total Deductions </para>
|
||||
<para style="terp_tblheader_Details">Total Deductions<font face="Helvetica" size="7.0">([[ o.company_id.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.deduction) ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.deduction) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -559,9 +534,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_9">[[repeatIn(get_others(o.line_ids),'ol') ]]</para>
|
||||
<blockTable colWidths="269.0,134.0,135.0" style="Table22">
|
||||
@@ -570,20 +542,14 @@
|
||||
<para style="terp_default_9">[[ ol.type in ['advance','loan','otherpay','otherdeduct','installment'] and ol.code or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id.currency_id.symbol or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id.currency_id.symbol or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="269.0,177.0,93.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -592,10 +558,10 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Net Amount </para>
|
||||
<para style="terp_tblheader_Details">Net Amount<font face="Helvetica" size="7.0">([[ o.company_id.currency_id.code ]])</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.net) ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(o.net) ]] [[ o.company_id.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -630,7 +596,7 @@
|
||||
<blockTable colWidths="269.0,269.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -643,5 +609,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
</document>
|
||||
@@ -184,7 +184,6 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -210,7 +209,7 @@
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -246,6 +245,9 @@
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Salary Structure</para>
|
||||
<para style="terp_header_Centre">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -329,7 +331,7 @@
|
||||
<blockTable colWidths="539.0" style="Table13">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">Contract Detail:</para>
|
||||
<para style="terp_default_Bold_9">Contract Detail:</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -367,7 +369,7 @@
|
||||
<para style="terp_tblheader_Details">Salary</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(cont.wage) or '' ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(cont.wage) or '' ]] [[ employee.company_id.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Notes:</para>
|
||||
@@ -383,7 +385,7 @@
|
||||
<blockTable colWidths="539.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">Salary Structure:</para>
|
||||
<para style="terp_default_Bold_9">Salary Structure:</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -439,7 +441,7 @@
|
||||
<para style="terp_default_9">[[ get_line_amount_type(line.amount_type) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.amount) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line.amount) or '']][[ employee.company_id.currency_id.symbol]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ get_line_type(line.type) ]]</para>
|
||||
@@ -470,7 +472,7 @@
|
||||
<blockTable colWidths="539.0" style="Table10">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1">Special Allowances and Deductions For Employee:</para>
|
||||
<para style="terp_default_Bold_9">Special Allowances and Deductions For Employee:</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -548,5 +550,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
</document>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payment Advice" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Payroll Advice" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -63,7 +63,7 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P1" fontName="Helvetica"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
@@ -120,7 +120,7 @@
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
|
||||
<para style="terp_tblheader_Details_Centre">Payment Advice</para>
|
||||
<para style="terp_header_Centre">Payment Advice</para>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
@@ -149,7 +149,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[o.bank or 'Bank']]</para>
|
||||
<para style="terp_default_Bold_9">[[ o.bank or 'Bank' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
@@ -197,10 +197,10 @@
|
||||
<para style="terp_tblheader_Details">Name of the Employee</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
<para style="terp_tblheader_Details_Right">Amount([[ company.currency_id.code ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">By Sal</para>
|
||||
<para style="terp_tblheader_Details_Right">By Sal([[ company.currency_id.code ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Bank Account</para>
|
||||
@@ -219,7 +219,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P1" leftIndent="15" bulletIndent="0">
|
||||
<bullet size="8.0"><seq id="L1"/>.</bullet>
|
||||
<bullet><seq id="L1"/>.</bullet>
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -227,10 +227,10 @@
|
||||
<para style="terp_default_9">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount' ]) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount' ]) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['bysal']) ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['bysal']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line['acc_no'] ]]</para>
|
||||
@@ -255,13 +255,13 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total</para>
|
||||
<para style="terp_tblheader_Details">Total([[ company.currency_id.code ]]):</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(get_total()) ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(get_total()) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(get_bysal_total()) ]]</para>
|
||||
<para style="terp_tblheader_Details_Right">[[ formatLang(get_bysal_total()) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">
|
||||
@@ -336,5 +336,4 @@
|
||||
<seqReset id="L1"/>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
</document>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version = '1.0' encoding="utf-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<xsl:template name="first_page_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="13.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_graphics_corporation">
|
||||
<!--logo-->
|
||||
<fill color="black"/>
|
||||
<stroke color="black"/>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawString x="1.3cm" y="19.5cm"><xsl:value-of select="//report/header/date"/></drawString>
|
||||
<setFont name="DejaVu Sans Bold" size="10"/>
|
||||
<drawString x="27.8cm" y="19.5cm"><xsl:value-of select="//report/header/company"/></drawString>
|
||||
<setFont name="DejaVu Sans" size="8"/>
|
||||
<drawRightString x="28.4cm" y="19.5cm"><pageNumber/> / </drawRightString>
|
||||
<stroke color="#000000"/>
|
||||
<lines>1.3cm 19.3cm 28.5cm 19.3cm</lines>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="first_page_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="other_pages_frames">
|
||||
<frame id="col1" x1="2.0cm" y1="2.5cm" width="24.7cm" height="17cm"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user