tax in invoice rml modification
modification tax_code for add notprintable field bzr revid: eric@vernichon.fr-20090120184531-s8y14if9vuck6jao
This commit is contained in:
parent
d3ab3d0553
commit
3b9dca694d
|
@ -21,6 +21,7 @@
|
|||
##############################################################################
|
||||
import time
|
||||
import netsvc
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
from tools.misc import currency
|
||||
|
@ -1175,8 +1176,10 @@ class account_tax_code(osv.osv):
|
|||
'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'sign': fields.float('Sign for parent', required=True),
|
||||
'notprintable':fields.boolean("Not printable in invoice"),
|
||||
}
|
||||
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
|
@ -1194,6 +1197,7 @@ class account_tax_code(osv.osv):
|
|||
_defaults = {
|
||||
'company_id': _default_company,
|
||||
'sign': lambda *args: 1.0,
|
||||
'notprintable': lambda *a: False,
|
||||
}
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
level = 100
|
||||
|
@ -1802,10 +1806,12 @@ class account_tax_code_template(osv.osv):
|
|||
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
|
||||
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Childs Codes'),
|
||||
'sign': fields.float('Sign for parent', required=True),
|
||||
'notprintable':fields.boolean("Not printable in invoice"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'sign': lambda *args: 1.0,
|
||||
'notprintable': lambda *a: False,
|
||||
}
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
|
@ -1990,6 +1996,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
'chart_template_id': fields.many2one('account.chart.template','Chart Template',required=True),
|
||||
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True),
|
||||
'code_digits':fields.integer('# of Digits',required=True,help="No. of Digits to use for account code"),
|
||||
'seq_journal':fields.boolean('Separate sequence for journal',help="Separate sequence for journal"),
|
||||
}
|
||||
|
||||
def _get_chart(self, cr, uid, context={}):
|
||||
|
@ -2008,6 +2015,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
obj_acc = self.pool.get('account.account')
|
||||
obj_acc_tax = self.pool.get('account.tax')
|
||||
obj_journal = self.pool.get('account.journal')
|
||||
obj_sequence = self.pool.get('ir.sequence')
|
||||
obj_acc_template = self.pool.get('account.account.template')
|
||||
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
|
||||
obj_fiscal_position = self.pool.get('account.fiscal.position')
|
||||
|
@ -2120,16 +2128,24 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
# Creating Journals
|
||||
vals_journal={}
|
||||
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
|
||||
seq_id = self.pool.get('ir.sequence').search(cr,uid,[('code','=','account.journal')])[0]
|
||||
seq_id = self.pool.get('ir.sequence').search(cr,uid,[('name','=','Account Journal')])[0]
|
||||
|
||||
if obj_multi.seq_journal:
|
||||
seq_id_sale = self.pool.get('ir.sequence').search(cr,uid,[('name','=','Sale Journal')])[0]
|
||||
seq_id_purchase = self.pool.get('ir.sequence').search(cr,uid,[('name','=','Purchase Journal')])[0]
|
||||
else:
|
||||
seq_id_sale=seq_id
|
||||
seq_id_purchase=seq_id
|
||||
|
||||
seq_code = self.pool.get('ir.sequence').get(cr, uid, 'account.journal')
|
||||
|
||||
vals_journal['view_id']=view_id
|
||||
vals_journal['sequence_id']=seq_id
|
||||
|
||||
#Sales Journal
|
||||
vals_journal['name'] = _('Sales Journal')
|
||||
vals_journal['type'] = 'sale'
|
||||
vals_journal['code'] = _('SAJ')
|
||||
vals_journal['sequence_id']=seq_id_sale
|
||||
|
||||
if obj_multi.chart_template_id.property_account_receivable:
|
||||
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_income_categ.id]
|
||||
|
@ -2141,6 +2157,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
vals_journal['name']=_('Purchase Journal')
|
||||
vals_journal['type']='purchase'
|
||||
vals_journal['code']=_('EXJ')
|
||||
vals_journal['sequence_id']=seq_id_purchase
|
||||
|
||||
if obj_multi.chart_template_id.property_account_payable:
|
||||
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_expense_categ.id]
|
||||
|
@ -2170,6 +2187,13 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
}
|
||||
acc_cash_id = obj_acc.create(cr,uid,vals)
|
||||
|
||||
if obj_multi.seq_journal:
|
||||
vals_seq={
|
||||
'name':'Bank Journal '+vals['name'],
|
||||
'code':'account.journal',
|
||||
}
|
||||
seq_id = obj_sequence.create(cr,uid,vals_seq)
|
||||
|
||||
#create the bank journal
|
||||
vals_journal['name']= vals['name']
|
||||
vals_journal['code']= _('BNK') + str(current_num)
|
||||
|
|
|
@ -461,6 +461,7 @@
|
|||
<field name="code" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="sign"/>
|
||||
|
||||
<field name="close_method"/>
|
||||
<field name="partner_account"/>
|
||||
</form>
|
||||
|
@ -543,6 +544,7 @@
|
|||
<field name="code" select="1"/>
|
||||
<field name="parent_id" select="1"/>
|
||||
<field name="sign"/>
|
||||
<field name="notprintable"/>
|
||||
<newline/>
|
||||
<field name="sum"/>
|
||||
<field name="sum_period"/>
|
||||
|
@ -1659,6 +1661,7 @@
|
|||
<label align="0.0" string="This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template" colspan="4"/>
|
||||
<field name="company_id" />
|
||||
<field name ="code_digits" />
|
||||
<field name ="seq_journal" />
|
||||
<field name="chart_template_id" colspan="4"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="Bank Information">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
|
@ -27,154 +27,155 @@ from report import report_sxw
|
|||
|
||||
class aged_trial_report(rml_parse.rml_parse):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context)
|
||||
self.line_query = ''
|
||||
self.total_account = []
|
||||
def __init__(self, cr, uid, name, context):
|
||||
print "init"
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context)
|
||||
self.line_query = ''
|
||||
self.total_account = []
|
||||
|
||||
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_lines': self._get_lines,
|
||||
'get_total': self._get_total,
|
||||
'get_direction': self._get_direction,
|
||||
'get_for_period': self._get_for_period,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_lines': self._get_lines,
|
||||
'get_total': self._get_total,
|
||||
'get_direction': self._get_direction,
|
||||
'get_for_period': self._get_for_period,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
def _get_lines(self, form):
|
||||
def _get_lines(self, form):
|
||||
|
||||
if (form['result_selection'] == 'customer' ):
|
||||
self.ACCOUNT_TYPE = "('receivable')"
|
||||
elif (form['result_selection'] == 'supplier'):
|
||||
self.ACCOUNT_TYPE = "('payable')"
|
||||
else:
|
||||
self.ACCOUNT_TYPE = "('payable','receivable')"
|
||||
if (form['result_selection'] == 'customer' ):
|
||||
self.ACCOUNT_TYPE = "('receivable')"
|
||||
elif (form['result_selection'] == 'supplier'):
|
||||
self.ACCOUNT_TYPE = "('payable')"
|
||||
else:
|
||||
self.ACCOUNT_TYPE = "('payable','receivable')"
|
||||
|
||||
|
||||
res = []
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
self.line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='line',
|
||||
context={'fiscalyear': form['fiscalyear']})
|
||||
self.cr.execute("SELECT DISTINCT res_partner.id AS id, " \
|
||||
"res_partner.name AS name " \
|
||||
"FROM res_partner,account_move_line AS line, account_account,account_move_reconcile AS recon " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND ((reconcile_id IS NULL) " \
|
||||
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
|
||||
"AND (line.partner_id=res_partner.id) " \
|
||||
"AND (account_account.company_id = %s) " \
|
||||
"ORDER BY res_partner.name", (form['date1'],form['company_id']))
|
||||
partners = self.cr.dictfetchall()
|
||||
## mise a 0 du total
|
||||
for i in range(7):
|
||||
self.total_account.append(0)
|
||||
#
|
||||
res = []
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
self.line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='line',
|
||||
context={'fiscalyear': form['fiscalyear']})
|
||||
self.cr.execute("SELECT DISTINCT res_partner.id AS id, " \
|
||||
"res_partner.name AS name " \
|
||||
"FROM res_partner,account_move_line AS line, account_account,account_move_reconcile AS recon " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND ((reconcile_id IS NULL) " \
|
||||
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
|
||||
"AND (line.partner_id=res_partner.id) " \
|
||||
"AND (account_account.company_id = %s) " \
|
||||
"ORDER BY res_partner.name", (form['date1'],form['company_id']))
|
||||
partners = self.cr.dictfetchall()
|
||||
## mise a 0 du total
|
||||
for i in range(7):
|
||||
self.total_account.append(0)
|
||||
#
|
||||
for partner in partners:
|
||||
print partner
|
||||
values = {}
|
||||
## If choise selection is in the future
|
||||
if form['direction_selection'] == 'future':
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) < %s) AND (partner_id=%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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form['date1'], partner['id'],form['date1'], form['company_id']))
|
||||
before = self.cr.fetchone()
|
||||
|
||||
for partner in partners:
|
||||
values = {}
|
||||
## If choise selection is in the future
|
||||
if form['direction_selection'] == 'future':
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) < %s) AND (partner_id=%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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form['date1'], partner['id'],form['date1'], form['company_id']))
|
||||
before = self.cr.fetchone()
|
||||
self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
|
||||
|
||||
self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
|
||||
values['direction'] = before and before[0] or 0.0
|
||||
else:
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) > %s) AND (partner_id=%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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form['date1'], partner['id'],form['date1'], form['company_id']))
|
||||
after = self.cr.fetchone()
|
||||
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):
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) BETWEEN %s AND %s) " \
|
||||
"AND (partner_id = %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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form[str(i)]['start'], form[str(i)]['stop'],partner['id'],form['date1'] ,form['company_id']))
|
||||
during = self.cr.fetchone()
|
||||
# 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 ""
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id = account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (partner_id = %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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(partner['id'],form['date1'],form['company_id']))
|
||||
total = self.cr.fetchone()
|
||||
values['total'] = total and total[0] or 0.0
|
||||
## Add for total
|
||||
self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
|
||||
values['name'] = partner['name']
|
||||
#t = 0.0
|
||||
#for i in range(5)+['direction']:
|
||||
# t+= float(values.get(str(i), 0.0) or 0.0)
|
||||
#values['total'] = t
|
||||
|
||||
values['direction'] = before and before[0] or 0.0
|
||||
else:
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) > %s) AND (partner_id=%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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form['date1'], partner['id'],form['date1'], form['company_id']))
|
||||
after = self.cr.fetchone()
|
||||
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):
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id=account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (COALESCE(date_maturity,date) BETWEEN %s AND %s) " \
|
||||
"AND (partner_id = %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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(form[str(i)]['start'], form[str(i)]['stop'],partner['id'],form['date1'] ,form['company_id']))
|
||||
during = self.cr.fetchone()
|
||||
# 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 ""
|
||||
self.cr.execute("SELECT SUM(debit-credit) " \
|
||||
"FROM account_move_line AS line, account_account " \
|
||||
"WHERE (line.account_id = account_account.id) " \
|
||||
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
|
||||
"AND (partner_id = %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 (account_account.company_id = %s) " \
|
||||
"AND account_account.active",
|
||||
(partner['id'],form['date1'],form['company_id']))
|
||||
total = self.cr.fetchone()
|
||||
values['total'] = total and total[0] or 0.0
|
||||
## Add for total
|
||||
self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
|
||||
values['name'] = partner['name']
|
||||
#t = 0.0
|
||||
#for i in range(5)+['direction']:
|
||||
# t+= float(values.get(str(i), 0.0) or 0.0)
|
||||
#values['total'] = t
|
||||
if values['total']:
|
||||
res.append(values)
|
||||
|
||||
if values['total']:
|
||||
res.append(values)
|
||||
total = 0.0
|
||||
totals = {}
|
||||
for r in res:
|
||||
total += float(r['total'] or 0.0)
|
||||
for i in range(5)+['direction']:
|
||||
totals.setdefault(str(i), 0.0)
|
||||
totals[str(i)] += float(r[str(i)] or 0.0)
|
||||
return res
|
||||
|
||||
total = 0.0
|
||||
totals = {}
|
||||
for r in res:
|
||||
total += float(r['total'] or 0.0)
|
||||
for i in range(5)+['direction']:
|
||||
totals.setdefault(str(i), 0.0)
|
||||
totals[str(i)] += float(r[str(i)] or 0.0)
|
||||
return res
|
||||
def _get_total(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
|
||||
def _get_total(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
def _get_direction(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
|
||||
def _get_direction(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
def _get_for_period(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
|
||||
def _get_for_period(self,pos):
|
||||
period = self.total_account[int(pos)]
|
||||
return period
|
||||
def _get_company(self, form):
|
||||
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name
|
||||
|
||||
def _get_company(self, form):
|
||||
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name
|
||||
|
||||
def _get_currency(self, form):
|
||||
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name
|
||||
def _get_currency(self, form):
|
||||
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
|
||||
'addons/account/report/aged_trial_balance.rml',parser=aged_trial_report,header=False)
|
||||
'addons/account/report/aged_trial_balance.rml',parser=aged_trial_report,header=False)
|
||||
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<paraStyle name="all" alignment="justify"/>
|
||||
</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" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="12.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Total" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Total_right" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
|
|
@ -327,22 +327,22 @@
|
|||
<para style="terp_default_9">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) or '' ]]</para>
|
||||
</td>
|
||||
<para style="terp_default_9">[[ ', '.join([ lt.description for lt in l.invoice_line_tax_id ]) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.quantity) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ l.quantity or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.price_unit) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ l.price_unit or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ l.discount and formatLang (l.discount) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ l.discount and l.discount or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ l.price_subtotal or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
|
@ -350,7 +350,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Note">[[ format(l.note or removeParentNode('tr')) ]]</para>
|
||||
<para style="terp_default_Note">[[ l.note or removeParentNode('tr') ]]</para>
|
||||
<para style="terp_default_Note">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
@ -418,7 +418,7 @@
|
|||
<para style="P1">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ o.amount_untaxed or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
|
@ -434,7 +434,7 @@
|
|||
<para style="P1">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) or '0.00']]</para>
|
||||
<para style="terp_default_Right_9">[[ o.amount_tax or 0.00 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
|
@ -450,7 +450,7 @@
|
|||
<para style="P1">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_9">[[ o.amount_total or 0.00]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.currency_id.code ]]</para>
|
||||
|
@ -464,8 +464,8 @@
|
|||
<tr>
|
||||
<td>
|
||||
<!-- <para style="terp_default_8">[[ format(o.amount_tax) or removeParentNode('blockTable') ]]</para> -->
|
||||
<blockTable colWidths="54.0,58.0,67.0" style="Table_Tax_Header">
|
||||
<tr>
|
||||
<blockTable colWidths="85.0,58.0,67.0" style="Table_Tax_Header">
|
||||
<tr >
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Tax</para>
|
||||
</td>
|
||||
|
@ -476,33 +476,39 @@
|
|||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<blockTable colWidths="53.0,60.0,65.0" style="Table_Tax_Content">
|
||||
<tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="85.0,60.0,65.0" style="Table_Tax_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ t.name ]]</para>
|
||||
<para style="terp_default_Centre_8"> </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_8"></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.amount) or '0.00' ]]</para>
|
||||
<para style="terp_default_Right_8"></para>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ lt.description + '/' + t.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ t.base or 0.00 ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ t.amount or 0.00 ]] [[ t.tax_code_id.notprintable and removeParentNode('tr') or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="53.0,60.0,65.0" style="Table_Table_Border_White">
|
||||
<blockTable colWidths="85.0,60.0,65.0" style="Table_Table_Border_White">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">
|
||||
|
|
Loading…
Reference in New Issue