removed unused files
few changes in view bzr revid: mga@mga-laptop-20081023081334-f69i3llhr9vh9d9v
This commit is contained in:
parent
0f5036a1a0
commit
41b759756e
|
@ -1,35 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data>
|
||||
<report id="account_invoices_tax"
|
||||
string="Invoices"
|
||||
model="account.invoice"
|
||||
name="tax.retail.account.invoice"
|
||||
rml="account_voucher/report/invoice.rml"
|
||||
auto="False"
|
||||
/>
|
||||
|
||||
<report id="account_vat_declaration_india"
|
||||
string="Taxes report"
|
||||
model="account.invoice"
|
||||
name="indianvat.declaration"
|
||||
rml="account_voucher/report/tax_report.rml"
|
||||
auto="False"
|
||||
menu="True"/>
|
||||
|
||||
<wizard
|
||||
string="Wizard Indiataxes report"
|
||||
model="account.invoice"
|
||||
name="account.indianvat.declaration"
|
||||
menu="False"
|
||||
id="wizard_indianvat_declaration"/>
|
||||
|
||||
<menuitem
|
||||
name="Financial Management/Reporting/India Taxes Report"
|
||||
action="wizard_indianvat_declaration"
|
||||
type="wizard"
|
||||
id="wizard_indianvat_declaration_menu"/>
|
||||
|
||||
|
||||
<report id="report_account_voucher"
|
||||
string="Voucher Report (Cr/Dr)"
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
import invoice
|
||||
import tax_report
|
||||
import report_voucher
|
||||
import report_voucher_amount
|
|
@ -1,50 +0,0 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from report import report_sxw
|
||||
|
||||
class account_invoice_tax_retail(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_invoice_tax_retail, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'title': self.getTitle,
|
||||
})
|
||||
|
||||
def getTitle(self, invoice):
|
||||
title = '';
|
||||
if invoice.retail_tax:
|
||||
title = invoice.retail_tax[0].swapcase() + invoice.retail_tax[1:]
|
||||
return title;
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.tax.retail.account.invoice',
|
||||
'account.invoice',
|
||||
'addons/india/account/report/invoice.rml',
|
||||
parser=account_invoice_tax_retail,
|
||||
)
|
|
@ -1,268 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="28.0" width="527" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Times-Italic" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Times-Roman" fontSize="16.0" leading="20" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
|
||||
<paraStyle name="P13" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
|
||||
<paraStyle name="P14" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="P15" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
|
||||
<paraStyle name="P16" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P17" fontName="Times-Roman" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P18" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
|
||||
<paraStyle name="P19" fontName="Times-Roman" alignment="LEFT"/>
|
||||
<paraStyle name="P20" fontName="Times-Roman"/>
|
||||
<paraStyle name="P21" fontName="Times-Roman" fontSize="16.0" leading="20"/>
|
||||
<paraStyle name="P22" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P23" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P24" fontName="Times-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.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"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="P1">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<para style="P6">Subject to Ahmedabad jurisdiction</para>
|
||||
<blockTable colWidths="281.0,246.0" style="Tableau2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P20">M/S.</para>
|
||||
<para style="P21">[[ o.partner_id.title or '' ]][[ o.partner_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.street2 or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
|
||||
<para style="Standard">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
|
||||
<para style="Standard">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
|
||||
<para style="P19">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P12">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P15">[[ title(o)]] Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P15">[[ title(o)]] PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P15">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P15">[[ title(o)]] Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P15">[[ title(o)]] Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P15">[[ title(o)]] Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P14">
|
||||
<font face="Times-Roman">[[ title(o)]] Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font>
|
||||
<font face="Times-Roman">[[ o.number ]]</font>
|
||||
</para>
|
||||
<para style="P13">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P16">
|
||||
<font face="Times-Roman">Document</font>
|
||||
<font face="Times-Roman">:</font>
|
||||
<font face="Times-Roman">[[o.name]]</font>
|
||||
</para>
|
||||
<para style="P16">
|
||||
<font face="Times-Roman">Invoice Date: </font>
|
||||
<font face="Times-Roman">[[o.date_invoice]]</font>
|
||||
</para>
|
||||
<para style="P17"><font face="Times-Roman">Customer Ref:</font> [[ o.address_invoice_id.partner_id.ref or '/' ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="247.0,94.0,62.0,51.0,74.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">Unit Price</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">Disc. (%)</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P22">[[repeatIn(o.invoice_line,'l') ]]</para>
|
||||
<blockTable colWidths="247.0,93.0,62.0,51.0,74.0" style="Tableau7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ formatLang(l.quantity) ]] [[l.uos_id and l.uos_id.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ formatLang(l.price_unit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ l.discount and formatLang (l.discount) or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ formatLang(l.price_subtotal) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="28.0,499.0" style="Tableau8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P23">[[ repeatIn((l.note and l.note.splitlines()) or [], 'note') ]]</para>
|
||||
<para style="P23">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[ note or removeParentNode('table') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="275.0,244.0" style="Tableau3">
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="136.0,76.0,61.0" style="Tableau4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">Tax</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">Base</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10"><font face="Times-Roman">[[ repeatIn(o.tax_line,'t') ]]</font> [[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ formatLang(t.base) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">[[ formatLang(t.amount)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<blockTable colWidths="115.0,122.0" style="Tableau5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">Total (excl. taxes):</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ formatLang(o.amount_untaxed) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ formatLang(o.amount_tax) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">Total (incl. taxes):</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P24">[[ formatLang(o.amount_total) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Table Contents">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P18">[[ format(o.comment or '') ]]</para>
|
||||
<para style="P18">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P18">[[ format((o.payment_term and o.payment_term.note) or '') ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import pooler
|
||||
from report import report_sxw
|
||||
|
||||
class account_tax_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_tax_report, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'get_invoice': self.getInvoices,
|
||||
'add_invoice': self.addInvoice,
|
||||
'get_tax': self.getTax,
|
||||
'get_tax_detail' : self.getTaxDetail,
|
||||
'get_retail' : self.getRetailTax,
|
||||
'get_retail_detail' : self.getRetailTaxDetail,
|
||||
'get_local_sale' : self.getLocalSale,
|
||||
'get_retail_sale' : self.getRetailSale,
|
||||
'total_local_sale' : self.getTotalLocalSale,
|
||||
'total_local_tax' : self.getTotalLocalTax,
|
||||
'total_retail_sale' : self.getTotalRetailSale,
|
||||
'total_retail_tax' : self.getTotalRetailTax,
|
||||
'time': time,
|
||||
'get_period': self.getPeriod,
|
||||
'test' : self.testMethod,
|
||||
|
||||
})
|
||||
self.local = 0
|
||||
self. retail = 0
|
||||
|
||||
self.tax_tax = {}
|
||||
self.retail_tax = {}
|
||||
|
||||
self.sale_tax = {}
|
||||
self.sale_retail = {}
|
||||
|
||||
self.total_local_sale = 0
|
||||
self.total_local_tax = 0
|
||||
|
||||
self.total_retail_sale = 0
|
||||
self.total_retail_tax = 0
|
||||
|
||||
self.invoices = []
|
||||
self.flag = False
|
||||
#end def
|
||||
|
||||
def getPeriod(self, period_id):
|
||||
return self.pool.get('account.period').browse(self.cr, self.uid, period_id).name
|
||||
#end def
|
||||
|
||||
def testMethod(self, obj):
|
||||
print type(obj) == type({}), obj;
|
||||
if type(obj) == type({}) and not self.flag:
|
||||
if obj.has_key('form'):
|
||||
self.flag = True
|
||||
ids = self.pool.get('account.move.line').search(self.cr, self.uid, [('period_id','=',obj['form']['period_id'])])
|
||||
account = self.pool.get('account.move.line').read(self.cr, self.uid,ids,['invoice'])
|
||||
invoice_ids = []
|
||||
for i in account:
|
||||
if i['invoice'][0]:
|
||||
if not i['invoice'][0] in invoice_ids:
|
||||
inv = self.pool.get('account.invoice').browse(self.cr, self.uid,i['invoice'][0])
|
||||
if inv.type == 'out_invoice' and inv.state == 'open':
|
||||
if not i['invoice'][0] in self.invoices:
|
||||
print '*********************** : ',i['invoice'][0]
|
||||
self.invoices.append(i['invoice'][0])
|
||||
#end if
|
||||
#end if
|
||||
#end for
|
||||
#end if
|
||||
elif self.flag == False:
|
||||
self.invoices = self.ids
|
||||
#end if
|
||||
#end def
|
||||
|
||||
def getInvoices(self):
|
||||
print '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>',self.invoices;
|
||||
return self.pool.get('account.invoice').browse(self.cr, self.uid, self.invoices)
|
||||
#end def
|
||||
|
||||
def addInvoice(self, invoice):
|
||||
if invoice.retail_tax == 'tax':
|
||||
self.total_local_sale += invoice.amount_untaxed
|
||||
self.total_local_tax += invoice.amount_tax
|
||||
|
||||
for tax in invoice.tax_line:
|
||||
if self.tax_tax.has_key(tax.name):
|
||||
self.tax_tax[tax.name] += tax.tax_amount
|
||||
self.sale_tax[tax.name] += tax.base_amount
|
||||
else:
|
||||
self.tax_tax[tax.name] = tax.tax_amount
|
||||
self.sale_tax[tax.name] = tax.base_amount
|
||||
#end for
|
||||
elif invoice.retail_tax == 'retail':
|
||||
self.total_retail_sale += invoice.amount_untaxed
|
||||
self.total_retail_tax += invoice.amount_tax
|
||||
self. retail += invoice.amount_total
|
||||
for tax in invoice.tax_line:
|
||||
if self.retail_tax.has_key(tax.name):
|
||||
self.retail_tax[tax.name] += tax.tax_amount
|
||||
self.sale_retail[tax.name] += tax.base_amount
|
||||
else:
|
||||
self.retail_tax[tax.name] = tax.tax_amount
|
||||
self.sale_retail[tax.name] = tax.base_amount
|
||||
#end if
|
||||
#end for
|
||||
#endif
|
||||
#end def
|
||||
|
||||
def getTaxDetail(self, tax):
|
||||
return self.tax_tax[tax];
|
||||
|
||||
def getTax(self):
|
||||
tax = []
|
||||
for i in self.tax_tax:
|
||||
tax.append(i)
|
||||
return tax
|
||||
#end if
|
||||
|
||||
def getRetailTaxDetail(self, tax):
|
||||
return self.retail_tax[tax];
|
||||
|
||||
def getRetailTax(self):
|
||||
tax = []
|
||||
for i in self.retail_tax:
|
||||
tax.append(i)
|
||||
return tax
|
||||
#end if
|
||||
|
||||
def getLocalSale(self, tax):
|
||||
return self.sale_tax[tax]
|
||||
#end def
|
||||
|
||||
def getRetailSale(self, tax):
|
||||
return self.sale_retail[tax]
|
||||
#end def
|
||||
|
||||
def getTotalLocalSale(self):
|
||||
return self.total_local_sale
|
||||
#end def
|
||||
|
||||
def getTotalLocalTax(self):
|
||||
return self.total_local_tax
|
||||
#end def
|
||||
|
||||
def getTotalRetailSale(self):
|
||||
return self.total_retail_sale
|
||||
#end def
|
||||
|
||||
def getTotalRetailTax(self):
|
||||
return self.total_retail_tax
|
||||
#end def
|
||||
#end class
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.indianvat.declaration',
|
||||
'account.invoice',
|
||||
'addons/india/account/report/tax_report.rml',
|
||||
parser=account_tax_report,
|
||||
)
|
|
@ -1,255 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="44.0" y1="57.0" width="526" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
<blockBackground colorName="#e6e6ff" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6ff" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6ff" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6ff" start="3,0" stop="3,0"/>
|
||||
<blockBackground colorName="#e6e6ff" start="4,0" stop="4,0"/>
|
||||
<blockBackground colorName="#e6e6ff" start="5,0" stop="5,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman"/>
|
||||
<paraStyle name="P2" fontName="Times-Roman" fontSize="22.0" leading="27" alignment="CENTER"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" fontSize="14.0" leading="17" alignment="LEFT"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P7" fontName="Times-Roman" fontSize="13.0" leading="16"/>
|
||||
<paraStyle name="P8" fontName="Times-Roman"/>
|
||||
<paraStyle name="P9" fontName="Times-Bold" fontSize="13.0" leading="16" alignment="CENTER"/>
|
||||
<paraStyle name="P10" fontName="Times-Roman" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Times-Roman" alignment="RIGHT"/>
|
||||
<paraStyle name="P12" fontName="Times-Bold"/>
|
||||
<paraStyle name="P13" fontName="Times-Bold" alignment="RIGHT"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<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-Italic" 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"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P2">Sales Register for the Month of XXX-2007</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P6">Date : [[time.strftime('%Y-%m-%d')]] <font face="Times-Roman">at</font> [[ time.strftime('%H:%M:%S') ]]</para>
|
||||
<para style="P1">[[ test(data) ]] [[ test(objects) ]]</para>
|
||||
<blockTable colWidths="75.0,81.0,148.0,83.0,74.0,66.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Invoice </para>
|
||||
<para style="P9">No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Party Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">S.T.Req No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Invoice Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Tax. Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="74.0,82.0,148.0,83.0,74.0,66.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[repeatIn(get_invoice(),'o') ]]<font face="Times-Roman" size="2.0"/></para>
|
||||
<para style="P8">[[ o.date_invoice ]] [[ add_invoice(o) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ o.number ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ o.partner_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">[[ o.partner_id.vat]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ o.amount_total ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ o.amount_tax ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P5">Local Sale Report</para>
|
||||
<blockTable colWidths="106.0,132.0,121.0,168.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Invoice Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Tax Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ repeatIn(get_tax(),'t') ]]</para>
|
||||
<para style="P8">[[ t ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ get_local_sale(t) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ get_tax_detail(t) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="106.0,132.0,121.0,168.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12">TOTAL </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ total_local_sale() ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ total_local_tax() ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P5">Retail Sale Report</para>
|
||||
<blockTable colWidths="104.0,134.0,121.0,168.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Invoice Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Tax Amount</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">[[ repeatIn(get_retail(),'r') ]]</para>
|
||||
<para style="P8">[[ r ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ get_retail_sale(r) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ get_retail_detail(r) ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="106.0,132.0,121.0,168.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12">TOTAL </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ total_retail_sale() ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ total_retail_tax() ]] [[o.currency_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P7">For [[ company.name ]]</para>
|
||||
<para style="P7">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P7">[[ user.name ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
|
Loading…
Reference in New Issue