[MERGE]: Merge with lp:openobject-addons-trunk
bzr revid: ksa@tinyerp.co.in-20100810125554-rrrtssfyv9n96fbn
This commit is contained in:
@@ -39,11 +39,11 @@
|
||||
|
||||
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line or
|
||||
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
|
||||
module named account_vouchers
|
||||
module named account_voucher.
|
||||
""",
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
'update_xml': [
|
||||
#'test/test_parent_structure.yml',
|
||||
'security/account_security.xml',
|
||||
@@ -55,6 +55,7 @@ module named account_vouchers
|
||||
'wizard/account_use_model_view.xml',
|
||||
'account_view.xml',
|
||||
'account_report.xml',
|
||||
'wizard/account_report_common_view.xml',
|
||||
'wizard/account_invoice_refund_view.xml',
|
||||
'wizard/account_period_close_view.xml',
|
||||
'wizard/account_fiscalyear_close_state.xml',
|
||||
@@ -64,9 +65,9 @@ module named account_vouchers
|
||||
'wizard/account_open_closed_fiscalyear_view.xml',
|
||||
'wizard/account_move_line_unreconcile_select_view.xml',
|
||||
'wizard/account_vat_view.xml',
|
||||
'wizard/account_print_journal_view.xml',
|
||||
'wizard/account_general_journal_view.xml',
|
||||
'wizard/account_central_journal_view.xml',
|
||||
'wizard/account_report_print_journal_view.xml',
|
||||
'wizard/account_report_general_journal_view.xml',
|
||||
'wizard/account_report_central_journal_view.xml',
|
||||
'wizard/account_subscription_generate_view.xml',
|
||||
'wizard/account_fiscalyear_close_view.xml',
|
||||
'wizard/account_state_open_view.xml',
|
||||
@@ -75,14 +76,14 @@ module named account_vouchers
|
||||
'wizard/account_validate_move_view.xml',
|
||||
'wizard/account_pay_invoice_view.xml',
|
||||
'wizard/account_unreconcile_view.xml',
|
||||
'wizard/account_general_ledger_report_view.xml',
|
||||
'wizard/account_report_general_ledger_view.xml',
|
||||
'wizard/account_invoice_state_view.xml',
|
||||
'wizard/account_partner_balance_report_view.xml',
|
||||
'wizard/account_balance_report_view.xml',
|
||||
'wizard/account_report_partner_balance_view.xml',
|
||||
'wizard/account_report_account_balance_view.xml',
|
||||
# 'wizard/account_move_line_select_view.xml',
|
||||
'wizard/account_aged_trial_balance_view.xml',
|
||||
'wizard/account_report_aged_partner_balance_view.xml',
|
||||
'wizard/account_compare_account_balance_report_view.xml',
|
||||
'wizard/account_third_party_ledger.xml',
|
||||
'wizard/account_report_partner_ledger_view.xml',
|
||||
'wizard/account_reconcile_view.xml',
|
||||
'wizard/account_reconcile_partner_process_view.xml',
|
||||
'wizard/account_automatic_reconcile_view.xml',
|
||||
@@ -113,12 +114,15 @@ module named account_vouchers
|
||||
'report/account_invoice_report_view.xml',
|
||||
'report/account_entries_report_view.xml',
|
||||
'report/account_report_view.xml',
|
||||
'report/account_analytic_report_view.xml',
|
||||
'report/account_account_report_view.xml',
|
||||
'report/account_analytic_entries_report_view.xml',
|
||||
'board_account_view.xml',
|
||||
"wizard/account_pl_report_view.xml",
|
||||
"wizard/account_bs_report_view.xml"
|
||||
"wizard/account_report_profit_loss_view.xml",
|
||||
"wizard/account_report_balance_sheet_view.xml"
|
||||
],
|
||||
'demo_xml': [
|
||||
#'demo/price_accuracy00.yml',
|
||||
'account_demo.xml',
|
||||
'project/project_demo.xml',
|
||||
'project/analytic_account_demo.xml',
|
||||
|
||||
+26
-15
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from operator import itemgetter
|
||||
|
||||
@@ -79,9 +79,19 @@ class account_payment_term(osv.osv):
|
||||
elif line.value == 'balance':
|
||||
amt = round(amount, prec)
|
||||
if amt:
|
||||
next_date = datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days)
|
||||
next_date = (datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days))
|
||||
if line.days2 < 0:
|
||||
next_date += relativedelta(day=31)
|
||||
nyear = next_date.strftime("%Y")
|
||||
nmonth = str(int(next_date.strftime("%m"))% 12+1)
|
||||
nday = "1"
|
||||
|
||||
ndate = "%s-%s-%s" % (nyear, nmonth, nday)
|
||||
nseconds = time.mktime(time.strptime(ndate, '%Y-%m-%d'))
|
||||
next_month = datetime.fromtimestamp(nseconds)
|
||||
|
||||
delta = timedelta(seconds=1)
|
||||
next_date = next_month - delta
|
||||
next_date = next_date + relativedelta(days=line.days2)
|
||||
if line.days2 > 0:
|
||||
next_date += relativedelta(day=line.days2, months=1)
|
||||
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
|
||||
@@ -372,7 +382,7 @@ class account_account(osv.osv):
|
||||
('consolidation', 'Consolidation'),
|
||||
('closed', 'Closed'),
|
||||
], 'Internal Type', required=True, help="This type is used to differentiate types with "\
|
||||
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
|
||||
"special effects in OpenERP: view can not have entries, consolidation are accounts that "\
|
||||
"can have children accounts for multi-company consolidations, payable/receivable are for "\
|
||||
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
|
||||
'user_type': fields.many2one('account.account.type', 'Account Type', required=True,
|
||||
@@ -617,7 +627,7 @@ class account_journal(osv.osv):
|
||||
'refund_journal': fields.boolean('Refund Journal', help='Fill this if the journal is to be used for refunds of invoices.'),
|
||||
'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]),
|
||||
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
|
||||
'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells OpenERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"),
|
||||
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"),
|
||||
'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
|
||||
@@ -860,7 +870,7 @@ class account_period(osv.osv):
|
||||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
||||
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company'),
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
@@ -1292,11 +1302,10 @@ class account_move(osv.osv):
|
||||
#
|
||||
# Validate a balanced move. If it is a centralised journal, create a move.
|
||||
#
|
||||
|
||||
def validate(self, cr, uid, ids, context={}):
|
||||
if context and ('__last_update' in context):
|
||||
del context['__last_update']
|
||||
|
||||
|
||||
valid_moves = [] #Maintains a list of moves which can be responsible to create analytic entries
|
||||
|
||||
for move in self.browse(cr, uid, ids, context):
|
||||
@@ -1332,7 +1341,7 @@ class account_move(osv.osv):
|
||||
valid_moves.append(move)
|
||||
|
||||
# Check whether the move lines are confirmed
|
||||
|
||||
|
||||
if not len(line_draft_ids):
|
||||
continue
|
||||
# Update the move lines (set them as valid)
|
||||
@@ -1345,7 +1354,7 @@ class account_move(osv.osv):
|
||||
|
||||
account = {}
|
||||
account2 = {}
|
||||
|
||||
|
||||
if journal.type in ('purchase','sale'):
|
||||
for line in move.line_id:
|
||||
code = amount = 0
|
||||
@@ -1602,8 +1611,8 @@ class account_tax(osv.osv):
|
||||
#
|
||||
# Fields used for the VAT declaration
|
||||
#
|
||||
'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="Use this code for the VAT declaration."),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="Use this code for the VAT declaration."),
|
||||
'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the VAT declaration."),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the VAT declaration."),
|
||||
'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
|
||||
'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
|
||||
|
||||
@@ -2146,7 +2155,7 @@ class account_account_template(osv.osv):
|
||||
('other','Others'),
|
||||
('closed','Closed'),
|
||||
], 'Internal Type', required=True,help="This type is used to differentiate types with "\
|
||||
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
|
||||
"special effects in OpenERP: view can not have entries, consolidation are accounts that "\
|
||||
"can have children accounts for multi-company consolidations, payable/receivable are for "\
|
||||
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
|
||||
'user_type': fields.many2one('account.account.type', 'Account Type', required=True,
|
||||
@@ -2196,6 +2205,7 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
||||
def _get_def_cparent(self, cr, uid, context):
|
||||
acc_obj=self.pool.get('account.account')
|
||||
tmpl_obj=self.pool.get('account.account.template')
|
||||
#print "Searching for ",context
|
||||
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
|
||||
if not tids or not tids[0]['parent_id']:
|
||||
return False
|
||||
@@ -2237,6 +2247,7 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
||||
# 'tax_ids': [(6,0,tax_ids)], todo!!
|
||||
'company_id': company_id,
|
||||
}
|
||||
# print "Creating:", vals
|
||||
new_account = acc_obj.create(cr, uid, vals)
|
||||
return {'type':'state', 'state': 'end' }
|
||||
|
||||
@@ -2257,7 +2268,7 @@ class account_tax_code_template(osv.osv):
|
||||
'info': fields.text('Description'),
|
||||
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
|
||||
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
|
||||
'sign': fields.float('Sign for parent', required=True, help="Choose 1.00 to add the total to the parent account or -1.00 to subtract it"),
|
||||
'sign': fields.float('Sign for parent', required=True),
|
||||
'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
|
||||
}
|
||||
|
||||
@@ -2289,7 +2300,7 @@ class account_chart_template(osv.osv):
|
||||
|
||||
_columns={
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)], help=""),
|
||||
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)]),
|
||||
'tax_code_root_id': fields.many2one('account.tax.code.template','Root Tax Code',required=True,domain=[('parent_id','=',False)]),
|
||||
'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),
|
||||
'bank_account_view_id': fields.many2one('account.account.template','Bank Account',required=True),
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import decimal_precision as dp
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
@@ -94,11 +93,12 @@ class account_analytic_line(osv.osv):
|
||||
# Compute based on pricetype
|
||||
pricetype=self.pool.get('product.price.type').browse(cr, uid, company_obj.browse(cr,uid,company_id).property_valuation_price_type.id)
|
||||
# Take the company currency as the reference one
|
||||
context['currency_id']=company_obj.browse(cr, uid, company_id).currency_id.id
|
||||
amount_unit=prod.price_get(pricetype.field, context)[prod.id]
|
||||
amount=amount_unit*unit_amount or 1.0
|
||||
amount_unit = prod.price_get(pricetype.field, context)[prod.id]
|
||||
amount = amount_unit*unit_amount or 1.0
|
||||
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
|
||||
amount = amount_unit*unit_amount or 1.0
|
||||
return {'value': {
|
||||
'amount': - round(amount, 2),
|
||||
'amount': - round(amount, prec),
|
||||
'general_account_id': a,
|
||||
}}
|
||||
return {}
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
@@ -35,7 +35,7 @@
|
||||
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
|
||||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user"/>
|
||||
groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
|
||||
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
|
||||
@@ -43,15 +43,15 @@
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300" groups="account.group_account_manager"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="menu_journals_report"
|
||||
name="Journals"/>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
##############################################################################
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
@@ -35,8 +36,10 @@ class account_move_line(osv.osv):
|
||||
fiscalperiod_obj = self.pool.get('account.period')
|
||||
fiscalyear_ids = []
|
||||
fiscalperiod_ids = []
|
||||
if not context.get('fiscalyear', False):
|
||||
if not context.get('fiscalyear', False) and not context.get('empty_fy_allow', False):
|
||||
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
|
||||
elif context.get('empty_fy_allow', False):
|
||||
fiscalyear_ids = context['fiscalyear']
|
||||
else:
|
||||
fiscalyear_ids = [context['fiscalyear']]
|
||||
|
||||
@@ -53,13 +56,19 @@ class account_move_line(osv.osv):
|
||||
if state.lower() not in ['all']:
|
||||
where_move_state= " AND "+obj+".move_id in (select id from account_move where account_move.state = '"+state+"')"
|
||||
|
||||
|
||||
if context.get('periods', False):
|
||||
ids = ','.join([str(x) for x in context['periods']])
|
||||
query = obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) AND id in (%s)) %s %s" % (fiscalyear_clause, ids,where_move_state,where_move_lines_by_date)
|
||||
query = obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) AND id in (%s)) %s %s" % (fiscalyear_clause, ids, where_move_state, where_move_lines_by_date)
|
||||
else:
|
||||
query = obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) %s %s)" % (fiscalyear_clause,where_move_state,where_move_lines_by_date)
|
||||
|
||||
if context.get('journal_ids', False):
|
||||
query += ' AND '+obj+'.journal_id in (%s)' % ','.join(map(str, context['journal_ids']))
|
||||
|
||||
if context.get('chart_account_id', False):
|
||||
child_ids = self.pool.get('account.account')._get_children_and_consol(cr, uid, [context['chart_account_id']], context=context)
|
||||
query += ' AND '+obj+'.account_id in (%s)' % ','.join(map(str, child_ids))
|
||||
|
||||
if context.get('period_manner','') == 'created':
|
||||
#the query have to be build with no reference to periods but thanks to the creation date
|
||||
if context.get('periods',False):
|
||||
@@ -452,7 +461,7 @@ class account_move_line(osv.osv):
|
||||
context=context)
|
||||
dt = period.date_start
|
||||
return dt
|
||||
|
||||
|
||||
def _get_currency(self, cr, uid, context={}):
|
||||
if not context.get('journal_id', False):
|
||||
return False
|
||||
@@ -506,7 +515,7 @@ class account_move_line(osv.osv):
|
||||
_constraints = [
|
||||
(_check_no_view, 'You can not create move line on view account.', ['account_id']),
|
||||
(_check_no_closed, 'You can not create move line on closed account.', ['account_id']),
|
||||
(_check_company_id, 'Company must be same for its related account and period.', ['company_id']),
|
||||
(_check_company_id,'Company must be same for its related account and period.',['company_id'] ),
|
||||
]
|
||||
|
||||
#TODO: ONCHANGE_ACCOUNT_ID: set account_tax_id
|
||||
@@ -677,7 +686,7 @@ class account_move_line(osv.osv):
|
||||
account_id = line['account_id']['id']
|
||||
partner_id = (line['partner_id'] and line['partner_id']['id']) or False
|
||||
writeoff = debit - credit
|
||||
|
||||
|
||||
# Ifdate_p in context => take this date
|
||||
if context.has_key('date_p') and context['date_p']:
|
||||
date=context['date_p']
|
||||
@@ -815,7 +824,7 @@ class account_move_line(osv.osv):
|
||||
# }
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
|
||||
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu)
|
||||
result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
if view_type != 'tree':
|
||||
return result
|
||||
|
||||
@@ -1111,7 +1120,7 @@ class account_move_line(osv.osv):
|
||||
|
||||
#if not 'currency_id' in vals:
|
||||
# vals['currency_id'] = account.company_id.currency_id.id
|
||||
|
||||
|
||||
result = super(osv.osv, self).create(cr, uid, vals, context)
|
||||
# CREATE Taxes
|
||||
if vals.get('account_tax_id', False):
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<report auto="False" id="account_general_ledger" menu="False" model="account.account" name="account.general.ledger" rml="account/report/general_ledger.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/third_party_ledger.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger_other" menu="False" model="res.partner" name="account.third_party_ledger_other" rml="account/report/third_party_ledger_other.rml" string="Partner Other Ledger"/>
|
||||
<report auto="False" id="account_general_ledger" menu="False" model="account.account" name="account.general.ledger" rml="account/report/account_general_ledger.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/account_partner_ledger.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger_other" menu="False" model="res.partner" name="account.third_party_ledger_other" rml="account/report/account_partner_ledger_other.rml" string="Partner Other Ledger"/>
|
||||
<report auto="False" id="account_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Account Balance"/>
|
||||
<report auto="False" id="account_3rdparty_account_balance" menu="False" model="account.account" name="account.partner.balance" rml="account/report/partner_balance.rml" string="Partner Balance"/>
|
||||
<report auto="False" id="account_central_journal" model="account.journal.period" name="account.central.journal" rml="account/report/central_journal.rml" string="Central Journal"/>
|
||||
<report auto="False" id="account_general_journal" model="account.journal.period" name="account.general.journal" rml="account/report/general_journal.rml" string="General Journal"/>
|
||||
<report auto="False" id="account_journal" model="account.journal.period" name="account.journal.period.print" rml="account/report/account_journal.rml" string="Journal"/>
|
||||
<report auto="False" id="account_3rdparty_account_balance" menu="False" model="account.account" name="account.partner.balance" rml="account/report/account_partner_balance.rml" string="Partner Balance"/>
|
||||
<report auto="False" id="account_central_journal" model="account.journal.period" name="account.central.journal" rml="account/report/account_central_journal.rml" string="Central Journals" header="False"/>
|
||||
<report auto="False" id="account_general_journal" model="account.journal.period" name="account.general.journal" rml="account/report/account_general_journal.rml" string="General Journals" header="False"/>
|
||||
<report auto="False" id="account_journal" model="account.journal.period" name="account.journal.period.print" rml="account/report/account_journal.rml" string="Journals" header="False"/>
|
||||
<report auto="False" id="account_overdue" model="res.partner" name="account.overdue" rml="account/report/overdue.rml" string="Overdue Payments"/>
|
||||
<report
|
||||
auto="False"
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
<field name="balance_end"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_cash" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -665,7 +665,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended" id="menu_action_account_type_form" parent="menu_low_level"/>
|
||||
<menuitem action="action_account_type_form" groups="base.group_extended,base.group_system" id="menu_action_account_type_form" parent="menu_low_level"/>
|
||||
<!--
|
||||
Entries
|
||||
-->
|
||||
|
||||
@@ -76,12 +76,7 @@
|
||||
<!-- <wizard id="wizard_partner_balance_report" menu="False" model="res.partner" name="account.partner.balance.report" string="Partner Balance"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_partner_balance_report" id="menu_partner_balance" parent="account.next_id_22" type="wizard"/> -->
|
||||
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
|
||||
<!--<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/> -->
|
||||
|
||||
<!-- <wizard id="wizard_general_ledger_report" keyword="client_print_multi" model="account.account" name="account.general.ledger.report" string="General Ledger"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_balance_report" keyword="client_print_multi" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
|
||||
|
||||
<!-- <wizard id="wizard_invoice_state_confirm" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.confirm" string="Confirm draft invoices" groups="base.group_user"/>-->
|
||||
@@ -103,21 +98,6 @@
|
||||
<!-- account.invoice -->
|
||||
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
|
||||
|
||||
<!-- generic report wizard -->
|
||||
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
<!-- <menuitem icon="STOCK_PRINT" action="wizard_account_balance_report" id="menu_account_balance_report" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_central_journal" menu="False" model="account.journal.period" name="account.central.journal.report" string="Print Central Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_general_journal" menu="False" model="account.journal.period" name="account.general.journal.report" string="Print General Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
|
||||
|
||||
<!-- <wizard id="wizard_invoice_currency_change" model="account.invoice" name="account.invoice.currency_change" string="Change Currency" groups="base.group_user"/>-->
|
||||
</data>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<!--
|
||||
Account Type
|
||||
-->
|
||||
@@ -50,6 +48,7 @@
|
||||
<record id="account_type_cash_equity" model="account.account.type">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_type_cash_moves" model="account.account.type">
|
||||
@@ -62,7 +61,7 @@
|
||||
<!--
|
||||
Chart of Account
|
||||
-->
|
||||
|
||||
|
||||
<record id="chart0" model="account.account">
|
||||
<field name="code">X0</field>
|
||||
<field name="name">Chart For Automated Tests</field>
|
||||
@@ -80,7 +79,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_root"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="assets_view">
|
||||
<field name="name">Assets - (test)</field>
|
||||
<field name="code">X10</field>
|
||||
@@ -89,7 +88,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="bal"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="liabilities_view">
|
||||
<field name="name">Liabilities - (test)</field>
|
||||
<field name="code">X11</field>
|
||||
@@ -98,7 +97,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="bal"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="fas" model="account.account">
|
||||
<field name="code">X100</field>
|
||||
<field name="name">Fixed Assets - (test)</field>
|
||||
@@ -206,7 +205,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_root"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="income_view">
|
||||
<field name="name">Income - (test)</field>
|
||||
<field name="code">X20</field>
|
||||
@@ -215,7 +214,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="gpf"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="income_fx_income">
|
||||
<field name="name">Foreign Exchange Gain - (test)</field>
|
||||
<field name="code">X201</field>
|
||||
@@ -224,7 +223,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="income_view"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="expense_view">
|
||||
<field name="name">Expense - (test)</field>
|
||||
<field name="code">X21</field>
|
||||
@@ -233,9 +232,9 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="gpf"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="rev" model="account.account">
|
||||
<field name="code">X200</field>
|
||||
<field name="code">X200</field>
|
||||
<field name="name">Revenue - (test)</field>
|
||||
<field ref="income_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -281,7 +280,7 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account" id="income_fx_expense">
|
||||
<field name="name">Foreign Exchange Loss - (test)</field>
|
||||
<field name="code">X2111</field>
|
||||
@@ -290,7 +289,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="ovr"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Properties -->
|
||||
<record forcecreate="True" id="property_account_receivable" model="ir.property">
|
||||
<field name="name">property_account_receivable</field>
|
||||
@@ -363,7 +362,7 @@
|
||||
<record id="bank_journal" model="account.journal">
|
||||
<field name="name">Bank Journal - (test)</field>
|
||||
<field name="code">BNK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
@@ -373,6 +372,16 @@
|
||||
<record id="check_journal" model="account.journal">
|
||||
<field name="name">Checks Journal - (test)</field>
|
||||
<field name="code">CHK</field>
|
||||
<field name="type">bank</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_journal"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
<record id="cash_journal" model="account.journal">
|
||||
<field name="name">Cash Journal - (test)</field>
|
||||
<field name="code">CHK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="sequence_id" ref="sequence_journal"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01:51+0000\n"
|
||||
"PO-Revision-Date: 2009-08-28 16:01:51+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 15:02+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:03+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:01+0000\n"
|
||||
"Last-Translator: Bojan Markovic <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-03 11:13+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:39+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:40+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:10+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 11:28+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:40+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:12+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-03 11:36+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:40+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:14+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-08 06:45+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Danish <da@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:17+0000\n"
|
||||
"Last-Translator: Ferdinand-chricar <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-08 07:28+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:23+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-11-18 03:34+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 18:24+0000\n"
|
||||
"PO-Revision-Date: 2010-08-08 05:46+0000\n"
|
||||
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -170,6 +170,9 @@ msgid ""
|
||||
"positive, it gives the day of the next month. Set 0 for net days (otherwise "
|
||||
"it's based on the beginning of the month)."
|
||||
msgstr ""
|
||||
"Kuupäev, pange -1 praeguse kuu viimase päeva näitamiseks. Kui see on "
|
||||
"positiivne, see annab järmise kuu päeva. Pange 0 netto päevade näitamiseks "
|
||||
"(muidu see on baseeritud kuu algusel)"
|
||||
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.1\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 19:46+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 19:49+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 14:43+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-08 07:11+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 19:52+0000\n"
|
||||
"PO-Revision-Date: 2010-08-08 06:35+0000\n"
|
||||
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 19:59+0000\n"
|
||||
"PO-Revision-Date: 2010-08-08 06:02+0000\n"
|
||||
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
+807
-431
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:04+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-07-22 16:28+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:08+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-08 05:53+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -1577,7 +1577,7 @@ msgstr "Zestawienia dla urzędu"
|
||||
#: field:account.tax.code,parent_id:0
|
||||
#: field:account.tax.code.template,parent_id:0
|
||||
msgid "Parent Code"
|
||||
msgstr "Kod nadrzędny"
|
||||
msgstr "Rejestr nadrzędny"
|
||||
|
||||
#. module: account
|
||||
#: wizard_button:account.move.line.reconcile.select,init,open:0
|
||||
@@ -4458,6 +4458,9 @@ msgid ""
|
||||
"to the higher ones. The order is important if you have a tax with several "
|
||||
"tax children. In this case, the evaluation order is important."
|
||||
msgstr ""
|
||||
"Pole numeracji jest stosowane do ustalania kolejności pozycji podatkowych "
|
||||
"od najniższej do najwyższej. Kolejność jest istotna, jeśli masz podatki z "
|
||||
"podatkami podrzędnymi."
|
||||
|
||||
#. module: account
|
||||
#: view:account.tax:0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:09+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:11+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:11+0000\n"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:12+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:17+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-03 11:07+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:40+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: ASTRIT BOKSHI <astritbokshi@gmail.com>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:17+0000\n"
|
||||
"PO-Revision-Date: 2010-08-08 05:46+0000\n"
|
||||
"Last-Translator: bokshas <astritbokshi@gmail.com>\n"
|
||||
"Language-Team: Albanian <sq@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:39+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:19+0000\n"
|
||||
"Last-Translator: Dragan Životić <dragan_zivotic@yahoo.com>\n"
|
||||
"PO-Revision-Date: 2010-08-04 13:59+0000\n"
|
||||
"Last-Translator: Данило Шеган <Unknown>\n"
|
||||
"Language-Team: Serbian <sr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:21+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-08-08 07:10+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: <> <>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-02-03 06:22+0000\n"
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 21:50+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-08-08 04:58+0000\n"
|
||||
"Last-Translator: Omer Barlas <omer@barlas.com.tr>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-09 03:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -168,11 +168,14 @@ msgid ""
|
||||
"positive, it gives the day of the next month. Set 0 for net days (otherwise "
|
||||
"it's based on the beginning of the month)."
|
||||
msgstr ""
|
||||
"Ayın günü, bulunduğumuz ayın son günü için -1 girin. Eğer pozitif bir değer "
|
||||
"girilir ise bir sonraki ayın gününü verir. Net günler için 0 girin (aksi "
|
||||
"takdirde ayın başına göre hesaplanır)."
|
||||
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
msgid "Total Credit"
|
||||
msgstr "Toplam alacak"
|
||||
msgstr "Toplam Alacak"
|
||||
|
||||
#. module: account
|
||||
#: field:account.config.wizard,charts:0
|
||||
@@ -252,7 +255,7 @@ msgstr "Tedarikçi vergileri"
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
msgid "Total Debit"
|
||||
msgstr "Toplam borç"
|
||||
msgstr "Toplam Borç"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.tax.code.entries:0
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 21:53+0000\n"
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
+164
-164
File diff suppressed because it is too large
Load Diff
@@ -4,16 +4,16 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:27+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 12:03+0000\n"
|
||||
"Last-Translator: BlueT - Matthew Lien - 練喆明 <bluet@ubuntu-tw.org>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-03 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-04 03:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -462,7 +462,7 @@ class account_invoice(osv.osv):
|
||||
date_invoice = time.strftime('%Y-%m-%d')
|
||||
|
||||
pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
|
||||
|
||||
|
||||
if pterm_list:
|
||||
pterm_list = [line[0] for line in pterm_list]
|
||||
pterm_list.sort()
|
||||
@@ -942,6 +942,9 @@ class account_invoice(osv.osv):
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
|
||||
else:
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
|
||||
|
||||
if not number:
|
||||
raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
|
||||
|
||||
if invtype in ('in_invoice', 'in_refund'):
|
||||
ref = reference
|
||||
|
||||
@@ -31,7 +31,7 @@ class account_analytic_journal(osv.osv):
|
||||
'name' : fields.char('Journal name', size=64, required=True),
|
||||
'code' : fields.char('Journal code', size=8),
|
||||
'active' : fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the analytic journal without removing it."),
|
||||
'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, Open ERP will look for a matching journal of the same type."),
|
||||
'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
|
||||
'line_ids' : fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
}
|
||||
|
||||
@@ -307,7 +307,13 @@
|
||||
<field name="model">account.analytic.journal</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="analytic Journals">
|
||||
<search string="Analytic Journals">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="type"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
@@ -334,6 +340,7 @@
|
||||
<field name="res_model">account.analytic.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="search_view_id" ref="view_analytic_journal_search" />
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting"/>
|
||||
|
||||
|
||||
@@ -19,28 +19,28 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import central_journal
|
||||
import general_journal
|
||||
import account_central_journal
|
||||
import account_general_journal
|
||||
import account_journal
|
||||
import account_balance
|
||||
import partner_balance
|
||||
import general_ledger
|
||||
import third_party_ledger
|
||||
import account_partner_balance
|
||||
import account_general_ledger
|
||||
import account_partner_ledger
|
||||
import invoice
|
||||
import overdue
|
||||
import aged_trial_balance
|
||||
import account_aged_partner_balance
|
||||
import tax_report
|
||||
#import account_tax_code
|
||||
import account_tax_code
|
||||
import account_balance_landscape
|
||||
import compare_account_balance
|
||||
import account_invoice_report
|
||||
import account_report
|
||||
#import account_analytic_report
|
||||
import account_analytic_report
|
||||
import account_account_report
|
||||
import account_entries_report
|
||||
import account_analytic_entries_report
|
||||
import voucher_print
|
||||
import report_bs
|
||||
import report_pl
|
||||
import account_balance_sheet
|
||||
import account_profit_loss
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_account_report_tree" model="ir.ui.view">
|
||||
<field name="name">account.account.report.tree</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Accounts Analysis">
|
||||
<field name="name" invisible="1" string="Account"/>
|
||||
<field name="code" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" group="base.multi_company"/>
|
||||
<field name="currency_mode" invisible="1"/>
|
||||
<field name="nbr" sum="#Accounts"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="parent_account_id" invisible="1"/>
|
||||
<field name="quantity" sum="Quantity"/>
|
||||
<field name="amount_total" sum="Total Amount"/>
|
||||
<field name="credit" sum="Credit"/>
|
||||
<field name="debit" sum="Debit"/>
|
||||
<field name="balance" sum="Balance"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_graph" model="ir.ui.view">
|
||||
<field name="name">account.account.report.graph</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Accounts Analysis" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_search" model="ir.ui.view">
|
||||
<field name="name">account.account.report.search</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-today"
|
||||
string="At Date"
|
||||
domain="[('currency_mode','=', 'current')]"/>
|
||||
<filter icon="terp-stock_format-default"
|
||||
string="Average Rate"
|
||||
domain="[('currency_mode','=','average')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Account"/>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Account" name="Account" icon="terp-folder-orange" context="{'group_by':'name'}"/>
|
||||
<filter string="Code" icon="terp-stock_format-scientific" context="{'group_by':'code'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Currencies Rate" icon="terp-dolar" context="{'group_by':'currency_mode'}"/>
|
||||
<filter string="Internal Type" icon="terp-go-home" context="{'group_by':'type'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Parent Account" icon="terp-folder-orange" context="{'group_by':'parent_account_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="parent_account_id" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type" />
|
||||
<field name="user_type" widget="selection"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Accounts Analysis</field>
|
||||
<field name="res_model">account.account.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_account_account_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_account_report" id="menu_action_account_account_report" parent="account.menu_finance_statistic_report_statement" sequence="6"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
+83
-82
@@ -18,20 +18,20 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
import pooler
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class aged_trial_report(rml_parse.rml_parse):
|
||||
class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context=context)
|
||||
self.line_query = ''
|
||||
self.query_line = ''
|
||||
self.total_account = []
|
||||
|
||||
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_lines': self._get_lines,
|
||||
@@ -40,106 +40,107 @@ class aged_trial_report(rml_parse.rml_parse):
|
||||
'get_for_period': self._get_for_period,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
|
||||
'get_partners':self._get_partners,
|
||||
'get_account': self._get_account,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
})
|
||||
|
||||
|
||||
def _get_lines(self, form):
|
||||
if (form['result_selection'] == 'customer' ):
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.direction_selection = data['form'].get('direction_selection', 'past')
|
||||
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
|
||||
if (data['form']['result_selection'] == 'customer' ):
|
||||
self.ACCOUNT_TYPE = ['receivable']
|
||||
elif (form['result_selection'] == 'supplier'):
|
||||
elif (data['form']['result_selection'] == 'supplier'):
|
||||
self.ACCOUNT_TYPE = ['payable']
|
||||
else:
|
||||
self.ACCOUNT_TYPE = ['payable','receivable']
|
||||
return super(aged_trial_report, self).set_context(objects, data, ids, report_type=report_type)
|
||||
|
||||
|
||||
def _get_lines(self, form):
|
||||
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
|
||||
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']))
|
||||
self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
|
||||
res_partner.name AS name \
|
||||
FROM res_partner,account_move_line AS l, account_account\
|
||||
WHERE (l.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 (l.partner_id=res_partner.id)\
|
||||
AND ' + self.query + ' \
|
||||
ORDER BY res_partner.name' , (self.date_from,))
|
||||
partners = self.cr.dictfetchall()
|
||||
## mise a 0 du total
|
||||
for i in range(7):
|
||||
self.total_account.append(0)
|
||||
#
|
||||
|
||||
# Build a string like (1,2,3) for easy use in SQL query
|
||||
partner_ids = [x['id'] for x in partners]
|
||||
|
||||
# This dictionary will store the debit-credit for all partners, using partner_id as key.
|
||||
totals = {}
|
||||
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
|
||||
FROM account_move_line AS line, account_account
|
||||
WHERE (line.account_id = account_account.id)
|
||||
AND (account_account.type IN %s)
|
||||
AND (partner_id IN %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
|
||||
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), tuple(partner_ids),form['date1'],form['company_id'],))
|
||||
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
|
||||
FROM account_move_line AS l, account_account\
|
||||
WHERE (l.account_id = account_account.id)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (partner_id IN %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\
|
||||
GROUP BY partner_id ' , (tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
totals[i[0]] = i[1]
|
||||
|
||||
# This dictionary will store the future or past of all partners
|
||||
future_past = {}
|
||||
if form['direction_selection'] == 'future':
|
||||
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
|
||||
FROM account_move_line AS line, account_account
|
||||
WHERE (line.account_id=account_account.id)
|
||||
AND (account_account.type IN %s)
|
||||
AND (COALESCE(date_maturity,date) < %s)
|
||||
AND (partner_id IN %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
|
||||
GROUP BY partner_id""", (tuple(self.ACCOUNT_TYPE), form['date1'], tuple(partner_ids),form['date1'], form['company_id'],))
|
||||
if self.direction_selection == 'future':
|
||||
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
|
||||
FROM account_move_line AS l, account_account\
|
||||
WHERE (l.account_id=account_account.id)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (COALESCE(date_maturity, date) < %s)\
|
||||
AND (partner_id IN %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\
|
||||
GROUP BY partner_id', (tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
future_past[i[0]] = i[1]
|
||||
elif form['direction_selection'] == 'past': # Using elif so people could extend without this breaking
|
||||
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
|
||||
FROM account_move_line AS line, account_account
|
||||
WHERE (line.account_id=account_account.id)
|
||||
AND (account_account.type IN %s)
|
||||
AND (COALESCE(date_maturity,date) > %s)
|
||||
AND (partner_id IN %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
|
||||
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), form['date1'], tuple(partner_ids), form['date1'], form['company_id'],))
|
||||
elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
|
||||
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
|
||||
FROM account_move_line AS l, account_account\
|
||||
WHERE (l.account_id=account_account.id)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (COALESCE(date_maturity,date) > %s)\
|
||||
AND (partner_id IN %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\
|
||||
GROUP BY partner_id' , (tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
for i in t:
|
||||
future_past[i[0]] = i[1]
|
||||
|
||||
# Use one query per period and store results in history (a list variable)
|
||||
# Each history will contain : history[1] = {'<partner_id>': <partner_debit-credit>}
|
||||
history = []
|
||||
for i in range(5):
|
||||
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
|
||||
FROM account_move_line AS line, account_account
|
||||
WHERE (line.account_id=account_account.id)
|
||||
AND (account_account.type IN %s)
|
||||
AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)
|
||||
AND (partner_id IN %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
|
||||
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], tuple(partner_ids) ,form['date1'] ,form['company_id'],))
|
||||
|
||||
history = []
|
||||
for i in range(5):
|
||||
self.cr.execute('SELECT partner_id, SUM(debit-credit)\
|
||||
FROM account_move_line AS l, account_account\
|
||||
WHERE (l.account_id = account_account.id)\
|
||||
AND (account_account.type IN %s)\
|
||||
AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)\
|
||||
AND (partner_id IN %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\
|
||||
GROUP BY partner_id' , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], tuple(partner_ids) ,self.date_from,))
|
||||
t = self.cr.fetchall()
|
||||
d = {}
|
||||
for i in t:
|
||||
@@ -149,16 +150,14 @@ class aged_trial_report(rml_parse.rml_parse):
|
||||
for partner in partners:
|
||||
values = {}
|
||||
## If choise selection is in the future
|
||||
if form['direction_selection'] == 'future':
|
||||
if self.direction_selection == 'future':
|
||||
# Query here is replaced by one query which gets the all the partners their 'before' value
|
||||
before = False
|
||||
if future_past.has_key(partner['id']):
|
||||
before = [ future_past[partner['id']] ]
|
||||
|
||||
self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
|
||||
|
||||
values['direction'] = before and before[0] or 0.0
|
||||
elif form['direction_selection'] == 'past': # Changed this so people could in the future create new direction_selections
|
||||
elif self.direction_selection == 'past': # Changed this so people could in the future create new direction_selections
|
||||
# Query here is replaced by one query which gets the all the partners their 'after' value
|
||||
after = False
|
||||
if future_past.has_key(partner['id']): # Making sure this partner actually was found by the query
|
||||
@@ -211,15 +210,17 @@ class aged_trial_report(rml_parse.rml_parse):
|
||||
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_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_partners(self,data):
|
||||
if data['form']['result_selection'] == 'customer':
|
||||
return 'Receivable Accounts'
|
||||
elif data['form']['result_selection'] == 'supplier':
|
||||
return 'Payable Accounts'
|
||||
elif data['form']['result_selection'] == 'customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return ''
|
||||
|
||||
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/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+92
-27
@@ -3,33 +3,6 @@
|
||||
<template pageSize="(1120.0,770.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="20.0" y1="35.0" width="1080" height="650"/>
|
||||
<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.5cm" y="25.00cm">[[ company.name ]]</drawString>
|
||||
<drawString x="33.90cm" y="25.00cm">Age Partner Balance - [[ get_currency(data['form']) ]]</drawString>
|
||||
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
|
||||
<drawString x="1.5cm" y="0.90cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="36.90cm" y="0.90cm">Page <pageNumber/></drawString>
|
||||
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1.5cm 24.70cm 38.00cm 24.70cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -47,6 +20,10 @@
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -60,6 +37,38 @@
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="LEFT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<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="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<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="LINEBEFORE" colorName="#cccccc" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,1" stop="0,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,1" stop="3,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,1" stop="4,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -95,8 +104,64 @@
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<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_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"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
|
||||
<tr>
|
||||
<td><para style="terp_header"><font color="white"> </font></para>
|
||||
</td>
|
||||
<td><para style="terp_header_Centre">Aged Trial balance</para></td>
|
||||
<td><para style="terp_header"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="200.0,200.0,200.0,219.0,200.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Chart of Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Start Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner's</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Printing Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ data['form']['date_from'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_partners(data) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para> <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>
|
||||
@@ -35,24 +35,24 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Entries Analysis">
|
||||
<group col="10" colspan="12">
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id" />
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-gtk-jump-to-ltr" domain="[('user_id','=',uid)]" help="My Entries"/>
|
||||
</field>
|
||||
</group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Entries during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id" />
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-gtk-jump-to-ltr" domain="[('user_id','=',uid)]" help="My Entries"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
@@ -72,15 +72,15 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="currency_id" widget="selection"/>
|
||||
<field name="general_account_id" widget="selection"/>
|
||||
<field name="product_uom_id" widget="selection"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="currency_id" widget="selection"/>
|
||||
<field name="general_account_id" widget="selection"/>
|
||||
<field name="product_uom_id" widget="selection"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<field name="account_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -90,7 +90,7 @@
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Analytic Entries Analysis" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="amount" operator="+"/>
|
||||
<field name="unit_amount" operator="+"/>
|
||||
<field name="amount_currency" operator="+"/>
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# -*- 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 tools
|
||||
from osv import fields,osv
|
||||
|
||||
class analytic_report(osv.osv):
|
||||
_name = "analytic.report"
|
||||
_description = "Analytic Accounts Statistics"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'date_start': fields.date('Date Start', readonly=True),
|
||||
'date_end': fields.date('Date End', readonly=True),
|
||||
'name' : fields.char('Analytic Account', size=128, readonly=True),
|
||||
'partner_id' : fields.many2one('res.partner', 'Associated Partner', readonly=True),
|
||||
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', readonly=True),
|
||||
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
|
||||
'user_id' : fields.many2one('res.users', 'Account Manager', readonly=True),
|
||||
'product_id' : fields.many2one('product.product', 'Product', readonly=True),
|
||||
'total_quantity': fields.float('# Total Quantity', readonly=True),
|
||||
'debit' : fields.float('Debit', readonly=True),
|
||||
'credit' : fields.float('Credit', readonly=True),
|
||||
'balance' : fields.float('Balance', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'nbr':fields.integer('# of Lines', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type'),
|
||||
|
||||
'state': fields.selection([('draft','Draft'),
|
||||
('open','Open'),
|
||||
('pending','Pending'),
|
||||
('cancelled', 'Cancelled'),
|
||||
('close','Close'),
|
||||
('template', 'Template')],
|
||||
'State', readonly=True),
|
||||
|
||||
}
|
||||
_order = 'date_start desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'analytic_report')
|
||||
cr.execute("""
|
||||
create or replace view analytic_report as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
to_char(s.create_date, 'YYYY') as year,
|
||||
to_char(s.create_date, 'MM') as month,
|
||||
to_char(s.create_date, 'YYYY-MM-DD') as day,
|
||||
l.journal_id,
|
||||
l.product_id,
|
||||
s.parent_id,
|
||||
s.date_start,
|
||||
s.date as date_end,
|
||||
s.user_id,
|
||||
s.company_id,
|
||||
s.type,
|
||||
s.name,
|
||||
s.partner_id,
|
||||
sum(s.quantity) as total_quantity,
|
||||
s.debit,
|
||||
s.credit,
|
||||
s.balance,
|
||||
count(*) as nbr,
|
||||
s.state
|
||||
from account_analytic_account s
|
||||
left join account_analytic_line l on (s.id=l.account_id)
|
||||
GROUP BY s.create_date,s.state,l.journal_id,s.name,
|
||||
s.partner_id,s.date_start,s.date,s.user_id,
|
||||
s.company_id,s.type,
|
||||
s.debit,s.credit,s.balance,s.parent_id,l.product_id
|
||||
)
|
||||
""")
|
||||
analytic_report()
|
||||
@@ -1,6 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_analytic_report_tree" model="ir.ui.view">
|
||||
<field name="name">analytic.report.tree</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Accounts Analysis">
|
||||
<field name="parent_id" invisible="1" string="Analytic Account"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="journal_id" string="Analytic Journal" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="date_start" invisible="1"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
<field name="total_quantity" sum=" # Total Quantity"/>
|
||||
<field name="nbr" sum ="# of Lines"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="debit" sum ="Debit"/>
|
||||
<field name="credit" sum ="Credit"/>
|
||||
<field name="balance" sum ="Balance"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">analytic.report.search</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="This Month"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="product_id" />
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-folder-orange"
|
||||
string="My Accounts"
|
||||
help="My Account"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Associated Partner" icon="terp-personal+" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Analytic Journal" icon="terp-folder-green" context="{'group_by':'journal_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.report.graph</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Analytic Accounts Analysis" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_analytic_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Accounts Analysis</field>
|
||||
<field name="res_model">analytic.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_analytic_report_search"/>
|
||||
</record>
|
||||
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_statistic_report_statement" sequence="8"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -19,169 +19,137 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xml
|
||||
import copy
|
||||
from operator import itemgetter
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from report import report_sxw
|
||||
import xml.dom.minidom
|
||||
import os, time
|
||||
import osv
|
||||
import re
|
||||
import tools
|
||||
import pooler
|
||||
import sys
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class account_balance(report_sxw.rml_parse):
|
||||
_name = 'report.account.account.balance'
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(account_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_debit = 0.00
|
||||
self.sum_credit = 0.00
|
||||
self.date_lst = []
|
||||
self.date_lst_string = ''
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_fiscalyear':self.get_fiscalyear,
|
||||
'get_periods':self.get_periods,
|
||||
})
|
||||
self.context = context
|
||||
class account_balance(report_sxw.rml_parse, common_report_header):
|
||||
_name = 'report.account.account.balance'
|
||||
|
||||
def _add_header(self, node, header=1):
|
||||
if header==0:
|
||||
self.rml_header = ""
|
||||
return True
|
||||
def get_fiscalyear(self, form):
|
||||
res=[]
|
||||
if form.has_key('fiscalyear'):
|
||||
fisc_id = form['fiscalyear']
|
||||
if not (fisc_id):
|
||||
return ''
|
||||
self.cr.execute("select name from account_fiscalyear where id = %s" , (int(fisc_id),))
|
||||
res=self.cr.fetchone()
|
||||
return res and res[0] or ''
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
super(account_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_debit = 0.00
|
||||
self.sum_credit = 0.00
|
||||
self.date_lst = []
|
||||
self.date_lst_string = ''
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_fiscalyear':self._get_fiscalyear,
|
||||
'get_filter': self._get_filter,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period ,
|
||||
'get_account': self._get_account,
|
||||
'get_journal': self._get_journal,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def get_periods(self, form):
|
||||
result=''
|
||||
if form.has_key('periods') and form['periods']:
|
||||
period_ids = form['periods']
|
||||
per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods'])
|
||||
for r in per_ids:
|
||||
if r == per_ids[len(per_ids)-1]:
|
||||
result+=r.name+". "
|
||||
else:
|
||||
result+=r.name+", "
|
||||
else:
|
||||
fy_obj = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear'])
|
||||
res = fy_obj.period_ids
|
||||
len_res = len(res)
|
||||
for r in res:
|
||||
if r == res[len_res-1]:
|
||||
result+=r.name+". "
|
||||
else:
|
||||
result+=r.name+", "
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = 'chart_account_id' in data['form'] and [data['form']['chart_account_id']] or []
|
||||
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
|
||||
self.query_get_clause = data['form'].get('query_line', False) or ''
|
||||
return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type)
|
||||
|
||||
return str(result and result[:-1]) or ''
|
||||
def _add_header(self, node, header=1):
|
||||
if header == 0:
|
||||
self.rml_header = ""
|
||||
return True
|
||||
|
||||
def _get_account(self, data):
|
||||
if data['model']=='account.account':
|
||||
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
|
||||
return super(account_balance ,self)._get_account(data)
|
||||
|
||||
def lines(self, form, ids={}, done=None, level=1):
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not ids:
|
||||
return []
|
||||
if not done:
|
||||
done={}
|
||||
if form.has_key('Account_list') and form['Account_list']:
|
||||
ids = [form['Account_list']]
|
||||
del form['Account_list']
|
||||
res={}
|
||||
result_acc=[]
|
||||
ctx = self.context.copy()
|
||||
ctx['state'] = form['context'].get('state','all')
|
||||
ctx['fiscalyear'] = form['fiscalyear']
|
||||
if form['state']=='byperiod' :
|
||||
ctx['periods'] = form['periods']
|
||||
elif form['state']== 'bydate':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
elif form['state'] == 'all' :
|
||||
ctx['periods'] = form['periods']
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
# accounts = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx)
|
||||
# def cmp_code(x, y):
|
||||
# return cmp(x.code, y.code)
|
||||
# accounts.sort(cmp_code)
|
||||
child_ids = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, ids, ctx)
|
||||
if child_ids:
|
||||
ids = child_ids
|
||||
accounts = self.pool.get('account.account').read(self.cr, self.uid, ids, ['type','code','name','debit','credit','balance','parent_id'], ctx)
|
||||
for account in accounts:
|
||||
if account['id'] in done:
|
||||
continue
|
||||
done[account['id']] = 1
|
||||
res = {
|
||||
'id' : account['id'],
|
||||
'type' : account['type'],
|
||||
'code': account['code'],
|
||||
'name': account['name'],
|
||||
'level': level,
|
||||
'debit': account['debit'],
|
||||
'credit': account['credit'],
|
||||
'balance': account['balance'],
|
||||
# 'leef': not bool(account['child_id']),
|
||||
'parent_id':account['parent_id'],
|
||||
'bal_type':'',
|
||||
}
|
||||
self.sum_debit += account['debit']
|
||||
self.sum_credit += account['credit']
|
||||
# if account.child_id:
|
||||
# def _check_rec(account):
|
||||
# if not account.child_id:
|
||||
# return bool(account.credit or account.debit)
|
||||
# for c in account.child_id:
|
||||
# if not _check_rec(c) or _check_rec(c):
|
||||
# return True
|
||||
# return False
|
||||
# if not _check_rec(account) :
|
||||
# continue
|
||||
if account['parent_id']:
|
||||
# acc = self.pool.get('account.account').read(self.cr, self.uid, [ account['parent_id'][0] ] ,['name'], ctx)
|
||||
for r in result_acc:
|
||||
if r['id'] == account['parent_id'][0]:
|
||||
res['level'] = r['level'] + 1
|
||||
break
|
||||
if form['display_account'] == 'bal_mouvement':
|
||||
if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0 :
|
||||
result_acc.append(res)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
if res['balance'] != 0:
|
||||
result_acc.append(res)
|
||||
else:
|
||||
def lines(self, form, ids=[], done=None):#, level=1):
|
||||
obj_account = self.pool.get('account.account')
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not ids:
|
||||
return []
|
||||
if not done:
|
||||
done={}
|
||||
|
||||
res = {}
|
||||
result_acc = []
|
||||
ctx = self.context.copy()
|
||||
|
||||
ctx['fiscalyear'] = form['fiscalyear_id']
|
||||
if form['filter'] == 'filter_period':
|
||||
ctx['periods'] = form['periods']
|
||||
elif form['filter'] == 'filter_date':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
# accounts = obj_account.browse(self.cr, self.uid, ids, ctx)
|
||||
# def cmp_code(x, y):
|
||||
# return cmp(x.code, y.code)
|
||||
# accounts.sort(cmp_code)
|
||||
|
||||
child_ids = obj_account._get_children_and_consol(self.cr, self.uid, ids, ctx)
|
||||
if child_ids:
|
||||
ids = child_ids
|
||||
accounts = obj_account.read(self.cr, self.uid, ids, ['type','code','name','debit','credit','balance','parent_id','level'], ctx)
|
||||
for account in accounts:
|
||||
if account['id'] in done:
|
||||
continue
|
||||
done[account['id']] = 1
|
||||
res = {
|
||||
'id': account['id'],
|
||||
'type': account['type'],
|
||||
'code': account['code'],
|
||||
'name': account['name'],
|
||||
'level': account['level'],
|
||||
'debit': account['debit'],
|
||||
'credit': account['credit'],
|
||||
'balance': account['balance'],
|
||||
# 'leef': not bool(account['child_id']),
|
||||
'parent_id':account['parent_id'],
|
||||
'bal_type':'',
|
||||
}
|
||||
self.sum_debit += account['debit']
|
||||
self.sum_credit += account['credit']
|
||||
# if account.child_id:
|
||||
# def _check_rec(account):
|
||||
# if not account.child_id:
|
||||
# return bool(account.credit or account.debit)
|
||||
# for c in account.child_id:
|
||||
# if not _check_rec(c) or _check_rec(c):
|
||||
# return True
|
||||
# return False
|
||||
# if not _check_rec(account) :
|
||||
# continue
|
||||
# if account['parent_id']:
|
||||
# acc = obj_account.read(self.cr, self.uid, [ account['parent_id'][0] ] ,['name'], ctx)
|
||||
# for r in result_acc:
|
||||
# if r['id'] == account['parent_id'][0]:
|
||||
# res['level'] = r['level'] + 1
|
||||
# break
|
||||
if form['display_account'] == 'bal_movement':
|
||||
if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0 :
|
||||
result_acc.append(res)
|
||||
# if account.child_id:
|
||||
# acc_id = [acc.id for acc in account.child_id]
|
||||
# lst_string = ''
|
||||
# lst_string = '\'' + '\',\''.join(map(str,acc_id)) + '\''
|
||||
# self.cr.execute("select code,id from account_account where id IN (%s)"%(lst_string))
|
||||
# a_id = self.cr.fetchall()
|
||||
# a_id.sort()
|
||||
# ids2 = [x[1] for x in a_id]
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
if res['balance'] != 0:
|
||||
result_acc.append(res)
|
||||
else:
|
||||
result_acc.append(res)
|
||||
# if account.child_id:
|
||||
# acc_id = [acc.id for acc in account.child_id]
|
||||
# lst_string = ''
|
||||
# lst_string = '\'' + '\',\''.join(map(str,acc_id)) + '\''
|
||||
# self.cr.execute("select code,id from account_account where id IN (%s)"%(lst_string))
|
||||
# a_id = self.cr.fetchall()
|
||||
# a_id.sort()
|
||||
# ids2 = [x[1] for x in a_id]
|
||||
#
|
||||
# result_acc += self.lines(form, ids2, done, level+1)
|
||||
return result_acc
|
||||
# result_acc += self.lines(form, ids2, done, level+1)
|
||||
return result_acc
|
||||
|
||||
def _sum_credit(self):
|
||||
return self.sum_credit
|
||||
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
|
||||
|
||||
def _sum_debit(self):
|
||||
return self.sum_debit
|
||||
|
||||
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=0)
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -2,26 +2,7 @@
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawString x="16.2cm" y="28.1cm">Account Balance - [[ company.currency_id.name ]]</drawString>
|
||||
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -29,186 +10,280 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockTableStyle id="Table_Tilte_Table">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<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="Table2">
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table8">
|
||||
<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="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,1" stop="0,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,1" stop="3,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,1" stop="4,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="5,1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="5,1" stop="5,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="6,1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#c0c0c0" start="6,1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="6,1" stop="6,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="7,1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="8,1" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#c0c0c0" start="8,1" stop="8,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="8,-1" stop="8,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="9,1" stop="9,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="9,1" stop="9,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="10,1" stop="10,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="10,1" stop="10,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="11,1" stop="11,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="12,1" stop="12,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="12,1" stop="12,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="13,1" stop="13,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="13,1" stop="13,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="14,1" stop="14,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="14,1" stop="14,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="14,1" stop="14,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="14,-1" stop="14,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="0,2" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="0,2" stop="0,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="1,2" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#c0c0c0" start="1,2" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#c0c0c0" start="1,2" stop="1,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="0,3" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#c0c0c0" start="1,3" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#c0c0c0" start="1,3" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#c0c0c0" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,4" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,4" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,5" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,5" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,5" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Account_Balance_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#000000" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockTableStyle id="Table_account_Detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3a">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table4">
|
||||
<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="LINEBEFORE" 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="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
|
||||
<paraStyle name="P9a" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica" fontSize="8" leftIndent="-5.0" alignment="LEFT"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" 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="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
||||
|
||||
<blockTableStyle id="TrLevel">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel2">
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
|
||||
<blockTopPadding length="13" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="2" start="0,0" stop="-1,0"/>
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="TrLevel1">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockLeftPadding length="0" start="1,0" stop="1,0"/>
|
||||
<blockTopPadding length="26" start="0,0" stop="-1,0"/>
|
||||
<blockBottomPadding length="2" start="0,0" stop="-1,0"/>
|
||||
<blockFont name="Times-Bold" start="0,0" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<paraStyle
|
||||
name="Level"
|
||||
fontName="Helvetica"
|
||||
fontSize="8.0" />
|
||||
<paraStyle
|
||||
name="Level2"
|
||||
fontName="Helvetica-Bold"
|
||||
fontSize="8.0" />
|
||||
<paraStyle name="Level1"
|
||||
fontSize="8.0"
|
||||
fontName="Helvetica-Bold"
|
||||
/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="2.0" leading="3" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0" textColor="#ffffff"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="78.0,108.0,108.0,108.0,138" style="Table3a">
|
||||
<para style="P8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="525.0" style="Table_Tilte_Table">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P15">Account Balance </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="130.0,80.0,100.0,140.0,90.0" style="Table8">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">End Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Start Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Display Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Periods</para>
|
||||
<para style="terp_tblheader_General_Centre">Filter By <font>[[ get_filter(data)!='No Filter' and get_filter(data) ]]</font> </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Printing Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="78.0,108.0,108.0,108.0,138" style="Table3a">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_fiscalyear(data['form']) ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ data['form']['date_from'] ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td> <para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Start Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">End Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Start Period</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">End Period</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ data['form']['date_to'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_mouvement' and 'With movements') or 'With balance is not equal to 0']]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8"> [[data['form']['periods'] and get_periods(data['form']) or '']]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True)]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="67,264.0,70.0,70.0,80.0" style="Table2" repeatRows="1">
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="67,264.0,70.0,70.0,80.0" style="Table2" repeatRows="1">
|
||||
<tr noRowsplits="1">
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">Account</para></td>
|
||||
@@ -224,5 +299,8 @@
|
||||
<td><para style="P3"><font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P11">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
@@ -125,7 +125,7 @@
|
||||
<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_header_Centre" fontName="Helvetica-Bold" fontSize="15.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_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"/>
|
||||
|
||||
+68
-65
@@ -1,6 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,65 +15,76 @@
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import time
|
||||
import mx.DateTime
|
||||
|
||||
import pooler
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from account.report import report_pl
|
||||
from account.report import account_profit_loss
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context)
|
||||
self.obj_pl=report_pl.report_pl_account_horizontal(cr, uid, name, context)
|
||||
self.result_sum_dr=0.0
|
||||
self.result_sum_cr=0.0
|
||||
class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context=context)
|
||||
self.obj_pl = account_profit_loss.report_pl_account_horizontal(cr, uid, name, context=context)
|
||||
self.result_sum_dr = 0.0
|
||||
self.result_sum_cr = 0.0
|
||||
self.result = {}
|
||||
self.res_pl={}
|
||||
self.result_temp=[]
|
||||
self.res_bl = {}
|
||||
self.result_temp = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_company': self.get_company,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
'sum_dr' : self.sum_dr,
|
||||
'sum_cr' : self.sum_cr,
|
||||
'get_data':self.get_data,
|
||||
'get_pl_balance':self.get_pl_balance,
|
||||
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_account': self._get_account,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_sortby': self._get_sortby,
|
||||
'get_filter': self._get_filter,
|
||||
'get_journal': self._get_journal,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'get_company':self._get_company,
|
||||
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
|
||||
def sum_dr(self):
|
||||
if self.res_pl['type'] == 'Net Profit':
|
||||
self.result_sum_dr += self.res_pl['balance']
|
||||
if self.res_bl['type'] == 'Net Profit':
|
||||
self.result_sum_dr += self.res_bl['balance']
|
||||
return self.result_sum_dr or 0.0
|
||||
|
||||
|
||||
def sum_cr(self):
|
||||
if self.res_pl['type'] == 'Net Loss':
|
||||
self.result_sum_cr += self.res_pl['balance']
|
||||
if self.res_bl['type'] == 'Net Loss':
|
||||
self.result_sum_cr += self.res_bl['balance']
|
||||
return self.result_sum_cr or 0.0
|
||||
|
||||
def get_pl_balance(self):
|
||||
return self.res_pl or 0.0
|
||||
|
||||
def get_data(self,form):
|
||||
return self.res_bl or 0.0
|
||||
|
||||
def get_data(self,data):
|
||||
cr, uid = self.cr, self.uid
|
||||
db_pool = pooler.get_pool(self.cr.dbname)
|
||||
|
||||
|
||||
#Getting Profit or Loss Balance from profit and Loss report
|
||||
result_pl=self.obj_pl.get_data(form)
|
||||
self.res_pl=self.obj_pl.final_result()
|
||||
|
||||
result_pl=self.obj_pl.get_data(data)
|
||||
self.res_bl = self.obj_pl.final_result()
|
||||
|
||||
type_pool = db_pool.get('account.account.type')
|
||||
account_pool = db_pool.get('account.account')
|
||||
year_pool = db_pool.get('account.fiscalyear')
|
||||
@@ -84,34 +95,31 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
]
|
||||
|
||||
ctx = self.context.copy()
|
||||
ctx['state'] = form['context'].get('state','all')
|
||||
ctx['fiscalyear'] = form['fiscalyear']
|
||||
if form['state']=='byperiod' :
|
||||
ctx['periods'] = form['periods']
|
||||
elif form['state']== 'bydate':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
elif form['state'] == 'all' :
|
||||
ctx['periods'] = form['periods']
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
# ctx['state'] = form['context'].get('state','filter_no')
|
||||
ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
|
||||
|
||||
cal_list={}
|
||||
if data['form']['filter'] == 'filter_period' :
|
||||
ctx['periods'] = data['form'].get('periods', False)
|
||||
elif data['form']['filter'] == 'filter_date':
|
||||
ctx['date_from'] = data['form'].get('date_from', False)
|
||||
ctx['date_to'] = data['form'].get('date_to', False)
|
||||
|
||||
cal_list = {}
|
||||
pl_dict = {}
|
||||
account_dict = {}
|
||||
account_id = [form['Account_list']]
|
||||
account_id = data['form'].get('chart_account_id', False)
|
||||
account_ids = account_pool._get_children_and_consol(cr, uid, account_id, context=ctx)
|
||||
accounts = account_pool.browse(cr, uid, account_ids, context=ctx)
|
||||
|
||||
if self.res_pl['type'] == 'Net Profit C.F.B.L.':
|
||||
self.res_pl['type'] = 'Net Profit'
|
||||
if self.res_bl['type'] == 'Net Profit C.F.B.L.':
|
||||
self.res_bl['type'] = 'Net Profit'
|
||||
else:
|
||||
self.res_pl['type'] = 'Net Loss'
|
||||
self.res_bl['type'] = 'Net Loss'
|
||||
pl_dict = {
|
||||
'code' : False,
|
||||
'name' : self.res_pl['type'],
|
||||
'name' : self.res_bl['type'],
|
||||
'level': False,
|
||||
'balance':self.res_pl['balance'],
|
||||
'balance':self.res_bl['balance'],
|
||||
}
|
||||
for typ in types:
|
||||
accounts_temp = []
|
||||
@@ -128,23 +136,23 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
self.result_sum_dr += abs(account.debit - account.credit)
|
||||
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
|
||||
self.result_sum_cr += abs(account.debit - account.credit)
|
||||
if form['display_account'] == 'bal_mouvement':
|
||||
if data['form']['display_account'] == 'bal_movement':
|
||||
if account.credit > 0 or account.debit > 0 or account.balance > 0 :
|
||||
accounts_temp.append(account_dict)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
if account.balance != 0:
|
||||
elif data['form']['display_account'] == 'bal_solde':
|
||||
if account.balance != 0:
|
||||
accounts_temp.append(account_dict)
|
||||
else:
|
||||
accounts_temp.append(account_dict)
|
||||
if account.id == form['reserve_account_id']:
|
||||
if account.id == data['form']['reserve_account_id']:
|
||||
pl_dict['level'] = account['level'] + 1
|
||||
accounts_temp.append(pl_dict)
|
||||
|
||||
|
||||
self.result[typ] = accounts_temp
|
||||
cal_list[typ]=self.result[typ]
|
||||
|
||||
if cal_list:
|
||||
temp={}
|
||||
temp = {}
|
||||
for i in range(0,max(len(cal_list['liability']),len(cal_list['asset']))):
|
||||
if i < len(cal_list['liability']) and i < len(cal_list['asset']):
|
||||
temp={
|
||||
@@ -171,7 +179,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
'balance1':cal_list['asset'][i]['balance'],
|
||||
}
|
||||
self.result_temp.append(temp)
|
||||
if i < len(cal_list['liability']):
|
||||
if i < len(cal_list['liability']):
|
||||
temp={
|
||||
'code' : cal_list['liability'][i]['code'],
|
||||
'name' : cal_list['liability'][i]['name'],
|
||||
@@ -184,24 +192,19 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
}
|
||||
self.result_temp.append(temp)
|
||||
return None
|
||||
|
||||
|
||||
def get_lines(self):
|
||||
return self.result_temp
|
||||
|
||||
def get_lines_another(self, group):
|
||||
return self.result.get(group, [])
|
||||
|
||||
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.code
|
||||
|
||||
def get_company(self,form):
|
||||
comp_obj=pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr,self.uid,form['company_id'])
|
||||
return comp_obj.name
|
||||
|
||||
report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
|
||||
'addons/account/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
|
||||
header=False)
|
||||
'addons/account/report/account_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
|
||||
header='internal')
|
||||
|
||||
report_sxw.report_sxw('report.account.balancesheet', 'account.account',
|
||||
'addons/account/report/report_balance_sheet.rml',parser=report_balancesheet_horizontal,
|
||||
header=False)
|
||||
'addons/account/report/account_balance_sheet.rml',parser=report_balancesheet_horizontal,
|
||||
header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+88
-29
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Balance sheet" author="Openerp" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -77,13 +77,10 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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"/>
|
||||
@@ -91,12 +88,36 @@
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
@@ -143,7 +164,7 @@
|
||||
<blockTable colWidths="539.0" style="Table_Heading">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ get_company(data['form']) ]]</para>
|
||||
<para style="terp_header_Centre">[[ get_company(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -154,18 +175,56 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="539.0" style="Table_Date_from_To">
|
||||
<para style="terp_default_8">[[ get_data(data) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="120.0,100.0,140.0,90.0,90.0" style="Table2_header" >
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">From : [[ formatLang(data['form']['date_from'],date=True) ]] To: [[ formatLang(data['form']['date_to'], date=True) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By <font>[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font></para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ get_data(data['form']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data)]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="65.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,326.0,113.0" style="Table_Account_Line_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -175,28 +234,28 @@
|
||||
<para style="terp_default_Bold_9">Liabilities</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font></para>
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), '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"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ 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(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(sum_dr()) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -213,28 +272,28 @@
|
||||
<para style="terp_default_Bold_9">Assets</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<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'})) ]]</font></para>
|
||||
<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"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(a['balance']) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="426.0,113.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(sum_cr()) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
+111
-36
@@ -1,21 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(1120.0,770.0)" title="Test" author="Martin Simon" allowSplitting="20" >
|
||||
<template pageSize="(1120.0,770.0)" title="Balance sheet" author="Openerp" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="15.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
<!--COL 1-->
|
||||
<drawString x="1.3cm" y="25.50cm">[[ get_company(data['form']) ]]</drawString>
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.3cm" y="0.50cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="37.20cm" y="0.50cm">Page <pageNumber/></drawString>
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1.3cm 24.9cm 38.3cm 24.9cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -105,6 +93,44 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
@@ -128,7 +154,7 @@
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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_Centre" fontName="Helvetica-Bold" fontSize="9.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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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"/>
|
||||
@@ -149,25 +175,73 @@
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="1049.0" style="Table_Company_Name">
|
||||
<blockTable colWidths="539.0" style="Table_Heading">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Balance Sheet </para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="1049.0" style="Table_Date_from_To">
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">From : [[ formatLang(data['form']['date_from'],date=True) ]] To: [[ formatLang(data['form']['date_to'], date=True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ get_data(data['form']) ]]</para>
|
||||
<para style="terp_header_Centre">Balance Sheet</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">[[ get_data(data) or removeParentNode('para') ]]</para>
|
||||
|
||||
<blockTable colWidths="210.0,210.0,200.0,200.0,200.0" style="Table2_header" >
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="85.0,85.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data)]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="85.0,85.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,308.16,116.32,100.0,308.16,116.32" style="Table_Account_Line_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -177,7 +251,7 @@
|
||||
<para style="terp_default_Bold_9">Liabilities</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Code</para>
|
||||
@@ -186,24 +260,25 @@
|
||||
<para style="terp_default_Bold_9">Assets</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font><font>[[ a['code'] ]]</font></para>
|
||||
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<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'})) ]][[ 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(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font><font>[[ a['code1'] ]]</font></para>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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'})) ]][[ a['name1'] ]]</font></para>
|
||||
<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(get_abs(a['balance1'])) or 0.0 ]]</para>
|
||||
@@ -213,18 +288,18 @@
|
||||
<blockTable colWidths="408.16,116.32,408.16,116.32" style="Table_Net_Profit_Loss">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_Right_9">
|
||||
<font color="white"> </font>
|
||||
@@ -0,0 +1,98 @@
|
||||
# -*- 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
|
||||
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
#
|
||||
# Use period and Journal for selection or resources
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.period_ids = []
|
||||
self.journal_ids = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_filter': self._get_filter,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_account': self._get_account,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_sortby': self._get_sortby,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'display_currency':self._display_currency,
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form']['query_line'] or ''
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
|
||||
res = self.cr.fetchall()
|
||||
self.period_ids, self.journal_ids = zip(*res)
|
||||
return super(journal_print, self).set_context(objects, data, ids, report_type=report_type)
|
||||
|
||||
def lines(self, period_id, journal_id):
|
||||
self.cr.execute('SELECT a.currency_id ,a.code, a.name, c.code AS currency_code,l.currency_id ,l.amount_currency ,SUM(debit) AS debit, SUM(credit) AS credit from account_move_line l LEFT JOIN account_account a ON (l.account_id=a.id) LEFT JOIN res_currency c on (l.currency_id=c.id)WHERE l.period_id=%s AND l.journal_id=%s '+self.query_get_clause+' GROUP BY a.id, a.code, a.name,l.amount_currency,c.code , a.currency_id,l.currency_id', (period_id, journal_id))
|
||||
return self.cr.dictfetchall()
|
||||
|
||||
def _set_get_account_currency_code(self, account_id):
|
||||
self.cr.execute("SELECT c.code as code "\
|
||||
"FROM res_currency c,account_account as ac "\
|
||||
"WHERE ac.id = %s AND ac.currency_id = c.id"%(account_id))
|
||||
result = self.cr.fetchone()
|
||||
if result:
|
||||
self.account_currency = result[0]
|
||||
else:
|
||||
self.account_currency = False
|
||||
|
||||
def _get_account(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
|
||||
return super(journal_print ,self)._get_account(data)
|
||||
|
||||
def _get_fiscalyear(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name
|
||||
return super(journal_print ,self)._get_fiscalyear(data)
|
||||
|
||||
def _display_currency(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return True
|
||||
return data['form']['amount_currency']
|
||||
|
||||
report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,353 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="central_journal.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Central Journal" author="OpenERP" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="539" height="758"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table_Account_detail_Title">
|
||||
<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="Table_Account_detail_Title_Currency">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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="Table_Final_Total_currency">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Line_Content">
|
||||
<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"/>
|
||||
<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>
|
||||
<blockTableStyle id="Table_Journal_Line_Content_currency">
|
||||
<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"/>
|
||||
<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>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,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="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="Heading" fontName="Helvetica" fontSize="12.0" leading="15" 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="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="8.0" leading="11" alignment="CENTER" 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_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_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"/>
|
||||
</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>
|
||||
<td><para style="terp_header"><font color="white"> </font></para>
|
||||
</td>
|
||||
<td><para style="terp_header_Centre">Central Journal</para></td>
|
||||
<td><para style="terp_header"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="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>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[o.journal_id.name ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="65.0,65.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<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') ]]
|
||||
<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>
|
||||
</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') ]]
|
||||
<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">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') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]]</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') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit'])]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit']) ]]</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') ]]
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit'])]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit']) ]]</para></td>
|
||||
<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>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -36,6 +36,7 @@ class account_entries_report(osv.osv):
|
||||
'debit':fields.float('Debit', readonly=True),
|
||||
'credit':fields.float('Credit', readonly=True),
|
||||
'balance': fields.float('Balance', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'date': fields.date('Date', size=128, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
@@ -62,7 +63,7 @@ class account_entries_report(osv.osv):
|
||||
('other', 'Others'),
|
||||
('closed', 'Closed'),
|
||||
], 'Internal Type', readonly=True, help="This type is used to differentiate types with "\
|
||||
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
|
||||
"special effects in OpenERP: view can not have entries, consolidation are accounts that "\
|
||||
"can have children accounts for multi-company consolidations, payable/receivable are for "\
|
||||
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
@@ -82,6 +83,7 @@ class account_entries_report(osv.osv):
|
||||
l.state as state_2,
|
||||
to_char(am.date, 'YYYY') as year,
|
||||
to_char(am.date, 'MM') as month,
|
||||
to_char(am.date, 'YYYY-MM-DD') as day,
|
||||
l.partner_id as partner_id,
|
||||
l.product_id as product_id,
|
||||
am.company_id as company_id,
|
||||
|
||||
@@ -11,24 +11,26 @@
|
||||
<field name="date_created" invisible="1"/>
|
||||
<field name="date_maturity" invisible="1"/>
|
||||
<field name="ref" invisible="1"/>
|
||||
<field name="nbr" sum="# of Entries "/>
|
||||
<field name="quantity" sum="# of Products Qty "/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="state_2" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="account_id" invisible="1"/>
|
||||
<field name="analytic_account_id" invisible="1"/>
|
||||
<field name="fiscalyear_id" invisible="1"/>
|
||||
<field name="period_id" invisible="1"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="nbr" sum="# of Items"/>
|
||||
<field name="quantity" sum="# of Products Qty "/>
|
||||
<field name="debit" sum="# of Lines "/>
|
||||
<field name="credit" sum="# of Amount "/>
|
||||
<field name="balance" sum="# of Amount "/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -38,8 +40,10 @@
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Entries Analysis" type="bar">
|
||||
<field name="account_id"/>
|
||||
<field name="balance"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
@@ -79,8 +83,6 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Analytic" name="analytic_account" icon="terp-folder-orange" context="{'group_by':'analytic_account_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
|
||||
@@ -88,15 +90,18 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'date'}"/>
|
||||
<filter string="Analytic Account" name="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}"/>
|
||||
<filter string="State of Move Line" icon="terp-stock_effects-object-colorize" context="{'group_by':'state_2'}"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="journal_id"/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="period_id"/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
@@ -105,15 +110,15 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="date_created"/>
|
||||
<field name="date"/>
|
||||
<field name="date_maturity"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_entries_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Accounting Analysis</field>
|
||||
<field name="name">Entries Analysis</field>
|
||||
<field name="res_model">account.entries.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# -*- 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
|
||||
|
||||
from common_report_header import common_report_header
|
||||
from report import report_sxw
|
||||
|
||||
class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.period_ids = []
|
||||
self.journal_ids = []
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'periods': self.periods,
|
||||
'sum_debit_period': self._sum_debit_period,
|
||||
'sum_credit_period': self._sum_credit_period,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_account': self._get_account,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_sortby': self._get_sortby,
|
||||
'get_filter': self._get_filter,
|
||||
'get_journal': self._get_journal,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'display_currency':self._display_currency
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form']['query_line'] or ''
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
|
||||
res = self.cr.fetchall()
|
||||
self.period_ids, self.journal_ids = zip(*res)
|
||||
return super(journal_print, self).set_context(objects, data, ids, report_type=report_type)
|
||||
|
||||
# returns a list of period objs
|
||||
def periods(self, journal_period_objs):
|
||||
dic = {}
|
||||
def filter_unique(o):
|
||||
key = o.period_id.id
|
||||
res = key in dic
|
||||
if not res:
|
||||
dic[key] = True
|
||||
return not res
|
||||
filtered_objs = filter(filter_unique, journal_period_objs)
|
||||
return map(lambda x: x.period_id, filtered_objs)
|
||||
|
||||
def lines(self, period_id):
|
||||
if not self.journal_ids:
|
||||
return []
|
||||
self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.code AS currency_code,l.currency_id , '
|
||||
'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
|
||||
'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)'
|
||||
'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ''
|
||||
'GROUP BY j.id, j.code, j.name, l.amount_currency,c.code, l.currency_id ',
|
||||
(period_id, tuple(self.journal_ids)))
|
||||
return self.cr.dictfetchall()
|
||||
|
||||
def _set_get_account_currency_code(self, account_id):
|
||||
self.cr.execute("SELECT c.code AS code "\
|
||||
"FROM res_currency c, account_account AS ac "\
|
||||
"WHERE ac.id = %s AND ac.currency_id = c.id" % (account_id))
|
||||
result = self.cr.fetchone()
|
||||
if result:
|
||||
self.account_currency = result[0]
|
||||
else:
|
||||
self.account_currency = False
|
||||
|
||||
def _get_account(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
|
||||
return super(journal_print ,self)._get_account(data)
|
||||
|
||||
def _get_fiscalyear(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name
|
||||
return super(journal_print, self)._get_fiscalyear(data)
|
||||
|
||||
def _display_currency(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return True
|
||||
return data['form']['amount_currency']
|
||||
|
||||
def _sum_debit_period(self, period_id, journal_id=False):
|
||||
if journal_id:
|
||||
journals = [journal_id]
|
||||
else:
|
||||
journals = self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(debit) FROM account_move_line l '
|
||||
'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' ' \
|
||||
'AND state<>\'draft\'',
|
||||
(period_id, tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit_period(self, period_id, journal_id=None):
|
||||
if journal_id:
|
||||
journals = [journal_id]
|
||||
else:
|
||||
journals = self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(credit) FROM account_move_line l '
|
||||
'WHERE period_id=%s AND journal_id IN %s '+ self.query_get_clause + ' ' \
|
||||
'AND state<>\'draft\'',
|
||||
(period_id, tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,391 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="general_journal.pdf">
|
||||
<template pageSize="(596.0,842.0)" title="General Journal" author="OpenERP" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="540" height="758"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Header_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Print_Current_datetime">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Total">
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</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="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="8.0" leading="11" alignment="CENTER" 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_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_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn( periods(objects), 'o') ]]</para>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,179.0" style="Table_Header_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Centre">General Journal</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="80.0,100,80.0,150.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td> <para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]] </para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data)]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Title" repeatRows="1"><para>[[ display_currency(data)==False or removeParentNode('blockTable') ]]</para>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit()- sum_credit()) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Title" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<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">Currency</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()- sum_debit()) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
<blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Title">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o.name ]] :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]]</para>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Title">[[ display_currency(data)==False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o.name ]] :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="Standard"><font color="white">[[lines(o.id) and removeParentNode('para') or removeParentNode('section') ]]</font></para>
|
||||
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Detail">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['debit'] )]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'] ) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<section>
|
||||
<blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Detail">[[ display_currency(data) or removeParentNode('blockTable') ]]
|
||||
<para style="Standard"><font color="white">[[lines(o.id) and removeParentNode('para') or removeParentNode('section') ]]</font></para>
|
||||
<tr>
|
||||
<td><para style="terp_default_9"><font>[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit'] )]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']-line['debit'] ) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ line['currency_id'] and formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,245 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 CamptoCamp
|
||||
# Copyright (c) 2006-2010 OpenERP S.A
|
||||
#
|
||||
# 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
|
||||
from common_report_header import common_report_header
|
||||
import rml_parse
|
||||
|
||||
class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
_name = 'report.account.general.ledger'
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
self.sortby = data['form'].get('sortby', 'sort_date')
|
||||
self.query = data['form'].get('query_line', '')
|
||||
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)
|
||||
return super(general_ledger, self).set_context(objects, data, new_ids, report_type=report_type)
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
super(general_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.query = ""
|
||||
self.tot_currency = 0.0
|
||||
self.period_sql = ""
|
||||
self.sold_accounts = {}
|
||||
self.sortby = 'sort_date'
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit_account': self._sum_debit_account,
|
||||
'sum_credit_account': self._sum_credit_account,
|
||||
'sum_balance_account': self._sum_balance_account,
|
||||
'sum_currency_amount_account': self._sum_currency_amount_account,
|
||||
'get_children_accounts': self.get_children_accounts,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_journal': self._get_journal,
|
||||
'get_account': self._get_account,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_filter': self._get_filter,
|
||||
'get_sortby': self._get_sortby,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
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, self.query))
|
||||
sum_currency = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
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']))
|
||||
sum_currency += self.cr.fetchone()[0] or 0.0
|
||||
return str(sum_currency)
|
||||
|
||||
def get_children_accounts(self, account, form):
|
||||
res = []
|
||||
ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id)
|
||||
for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc):
|
||||
sql = """
|
||||
SELECT count(id)
|
||||
FROM account_move_line AS l
|
||||
WHERE %s AND l.account_id = %%s
|
||||
""" % (self.query)
|
||||
self.cr.execute(sql, (child_account.id,))
|
||||
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 child_account.type != 'view' and num_entry <> 0 :
|
||||
res.append(child_account)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
if child_account.type != 'view' and num_entry <> 0 :
|
||||
if ( sold_account <> 0.0):
|
||||
res.append(child_account)
|
||||
else:
|
||||
res.append(child_account)
|
||||
if not len(res):
|
||||
return [account]
|
||||
return res
|
||||
|
||||
def lines(self, account, form):
|
||||
""" Return all the account_move_line of account with their account code counterparts """
|
||||
# First compute all counterpart strings for every move_id where this account appear.
|
||||
# Currently, the counterpart info is used only in landscape mode
|
||||
sql = """
|
||||
SELECT m1.move_id,
|
||||
array_to_string(ARRAY(SELECT DISTINCT a.code FROM account_move_line m2 LEFT JOIN account_account a ON (m2.account_id=a.id) WHERE m2.move_id = m1.move_id AND m2.account_id<>%%s), ', ') AS counterpart
|
||||
FROM (SELECT move_id FROM account_move_line l WHERE %s AND l.account_id = %%s GROUP BY move_id) m1
|
||||
""" % self.query
|
||||
self.cr.execute(sql, (account.id, account.id))
|
||||
counterpart_res = self.cr.dictfetchall()
|
||||
counterpart_accounts = {}
|
||||
for i in counterpart_res:
|
||||
counterpart_accounts[i['move_id']]=i['counterpart']
|
||||
del counterpart_res
|
||||
|
||||
# Then select all account_move_line of this account
|
||||
if self.sortby == 'sort_journal_partner':
|
||||
sql_sort='j.code, p.name'
|
||||
else:
|
||||
sql_sort='l.date'
|
||||
sql = """
|
||||
SELECT l.id AS lid, l.date AS ldate, j.code AS lcode, l.amount_currency,l.ref AS lref, l.name AS lname, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit, l.period_id AS lperiod_id, l.partner_id AS lpartner_id,
|
||||
m.name AS move_name, m.id AS mmove_id,
|
||||
c.code AS currency_code,
|
||||
i.id AS invoice_id, i.type AS invoice_type, i.number AS invoice_number,
|
||||
p.name AS partner_name
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_move m on (l.move_id=m.id)
|
||||
LEFT JOIN res_currency c on (l.currency_id=c.id)
|
||||
LEFT JOIN res_partner p on (l.partner_id=p.id)
|
||||
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 ORDER by %s
|
||||
""" % (self.query, sql_sort)
|
||||
self.cr.execute(sql, (account.id,))
|
||||
res_lines = self.cr.dictfetchall()
|
||||
res_init = []
|
||||
if res_lines and form['initial_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,
|
||||
'' AS move_name, '' AS mmove_id,
|
||||
'' AS currency_code,
|
||||
'' AS invoice_id, '' AS invoice_type, '' AS invoice_number,
|
||||
'' AS partner_name
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_move m on (l.move_id=m.id)
|
||||
LEFT JOIN res_currency c on (l.currency_id=c.id)
|
||||
LEFT JOIN res_partner p on (l.partner_id=p.id)
|
||||
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.cr.execute(sql, (account.id,))
|
||||
res_init = self.cr.dictfetchall()
|
||||
res = res_init + res_lines
|
||||
account_sum = 0.0
|
||||
inv_types = { 'out_invoice': 'CI', 'in_invoice': 'SI', 'out_refund': 'OR', 'in_refund': 'SR', }
|
||||
for l in res:
|
||||
l['move'] = l['move_name']
|
||||
if l['invoice_id']:
|
||||
l['lref'] = '%s: %s'%(inv_types[l['invoice_type']], l['invoice_number'])
|
||||
l['partner'] = l['partner_name'] or ''
|
||||
account_sum += l['debit'] - l['credit']
|
||||
l['progress'] = account_sum
|
||||
l['line_corresp'] = l['mmove_id'] == '' and ' ' or counterpart_accounts[l['mmove_id']]
|
||||
# Modification of amount Currency
|
||||
if l['credit'] > 0:
|
||||
if l['amount_currency'] != None:
|
||||
l['amount_currency'] = abs(l['amount_currency']) * -1
|
||||
if l['amount_currency'] != None:
|
||||
self.tot_currency = self.tot_currency + l['amount_currency']
|
||||
return res
|
||||
|
||||
def _sum_debit_account(self, account, form):
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"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):
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
# Add initial balance to the result
|
||||
sum_debit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_debit
|
||||
|
||||
def _sum_credit_account(self, account, form):
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"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):
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, form['initial_bal_query']))
|
||||
# Add initial balance to the result
|
||||
sum_credit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_credit
|
||||
|
||||
def _sum_balance_account(self, account, form):
|
||||
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, self.query))
|
||||
sum_balance = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('initial_balance', False):
|
||||
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']))
|
||||
# Add initial balance to the result
|
||||
sum_balance += self.cr.fetchone()[0] or 0.0
|
||||
return sum_balance
|
||||
|
||||
def _get_account(self, data):
|
||||
if data['model'] == 'account.account':
|
||||
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
|
||||
return super(general_ledger ,self)._get_account(data)
|
||||
|
||||
def _get_sortby(self, data):
|
||||
if self.sortby == 'sort_date':
|
||||
return 'Date'
|
||||
elif self.sortby == 'sort_journal_partner':
|
||||
return 'Journal & Partner'
|
||||
return 'Date'
|
||||
|
||||
report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal')
|
||||
report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,344 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="General Ledger" author="OpenERP" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<initialize>
|
||||
<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" 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="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="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="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"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="14.0" leading="17"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="10.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" alignment="LEFT" fontSize="12.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica-Bold" fontSize="8.5"/>
|
||||
<paraStyle name="Account" 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="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="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<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>
|
||||
<para style="terp_header_Centre">General Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<blockTable colWidths="80.0,70.0,70.0,80.0,100.0,70.0,80.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Entries Sorted By</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td> <para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]] </para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="50.0,50.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="50.0,50.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_sortby(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para>
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para>
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<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</para></td>
|
||||
<td><para style="P4">Crebit</para></td>
|
||||
<td><para style="P9">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<blockTable colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="280.0,100.0,52.5,52.5,52.5" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code or '']] [[ o.name or '']]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(o, data['form']), 'line') ]] <font>[[ formatLang(line['ldate'],date=True) ]]</font></para></td>
|
||||
<td><para style="P3">[[ line['partner'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['lref'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['move'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['lname'] or '' ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<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') ]]
|
||||
<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</para></td>
|
||||
<td><para style="P4">Crebit</para></td>
|
||||
<td><para style="P4">Balance</para></td>
|
||||
<td><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<blockTable colWidths="72.0,93.0,65.0,40.0,89.0,49.0,49.0,49.0,50.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="260.00,93.0,49.0,49.0,48.0,40.00" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code or '' ]] [[ o.name or '' ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and sum_currency_amount_account(o, data['form']) +o.currency_id.code or '' ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(o, data['form']), 'line') ]] <font>[[ formatLang(line['ldate'],date=True) ]]</font></para></td>
|
||||
<td><para style="P3">[[ line['partner'] or '' ]]</para></td>
|
||||
<td><para style="P3">[[ line['lref'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['move'] or '' ]]</para></td>
|
||||
<td><para style="P3">[[ line['lname'] or '' ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,376 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(1120.5,767.8)" title="General Ledger" author="Openerp" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="31.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<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" 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="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="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="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"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8a" fontName="Helvetica" 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="P11" fontName="Helvetica" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="14.0" leading="17"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="10.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" alignment="LEFT" fontSize="12.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica-Bold" fontSize="8.5"/>
|
||||
<paraStyle name="Account" 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="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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>
|
||||
<para style="terp_header_Centre">General Ledger </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="200.0,130.0,200.0,150.0,150.0,100.0,110.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Entries Sorted By</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td> <para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]] </para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_sortby(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></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="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')]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P12"></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"></para><para style="P2">Ref</para></td>
|
||||
<td><para style="P12"></para><para style="P2">Move</para></td>
|
||||
<td><para style="P12"></para><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P12"></para><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P12"></para><para style="P4">Debit</para></td>
|
||||
<td><para style="P12"></para><para style="P4">Credit</para></td>
|
||||
<td><para style="P12"></para><para style="P4">Balance</para></td>
|
||||
<td><para style="P12"></para><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
|
||||
<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')]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="404.0,375.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>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and sum_currency_amount_account(o, data['form']) +o.currency_id.code or '' ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr><para style="P2_content">[[ repeatIn(lines(o, data['form']), 'line') ]]</para>
|
||||
<td><para style="P2_content"> [[ formatLang(line['ldate'],date=True) ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['lcode'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner_name'] ]]</para></td>
|
||||
<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="P4_content">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Ref</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Move</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Debit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Credit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
|
||||
<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')]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="405.0,435.0,69.0,72.0,64.0" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P2_content">[[ repeatIn(lines(o, data['form']), 'line') ]]<font>[[ line['ldate'] and formatLang(line['ldate'],date=True) or removeParentNode('tr') ]]</font></para></td>
|
||||
<para>[[ line or removeParentNode('tr')</para>
|
||||
<td><para style="P2_content">[[ line['lcode'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<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="P4_content">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
@@ -21,54 +21,95 @@
|
||||
|
||||
import time
|
||||
|
||||
from common_report_header import common_report_header
|
||||
from report import report_sxw
|
||||
|
||||
#
|
||||
# Use period and Journal for selection or resources
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context={}):
|
||||
class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
self.period_ids = []
|
||||
self.journal_ids = []
|
||||
self.sort_selection = 'date'
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit
|
||||
})
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_account': self._get_account,
|
||||
'get_filter': self._get_filter,
|
||||
'get_start_date': self._get_start_date,
|
||||
'get_end_date': self._get_end_date,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'display_currency':self._display_currency,
|
||||
'get_sortby': self._get_sortby,
|
||||
})
|
||||
|
||||
def lines(self, period_id, journal_id, sort_selection='date', *args):
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = data['form'].get('active_ids', [])
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form'].get('query_line', '')
|
||||
self.sort_selection = data['form'].get('sort_selection', 'date')
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
|
||||
res = self.cr.fetchall()
|
||||
self.period_ids, self.journal_ids = zip(*res)
|
||||
return super(journal_print, self).set_context(objects, data, ids, report_type=report_type)
|
||||
|
||||
def lines(self, period_id, journal_id=False):
|
||||
if not journal_id:
|
||||
journal_id = self.journal_ids
|
||||
else:
|
||||
journal_id = [journal_id]
|
||||
obj_mline = self.pool.get('account.move.line')
|
||||
if type(period_id) == type([]):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
for period in period_id:
|
||||
ids_journal_period = obj_jperiod.search(self.cr, self.uid, [('journal_id','=',journal), ('period_id','=',period)])
|
||||
if ids_journal_period:
|
||||
self.cr.execute('update account_journal_period set state=%s where journal_id=%s and period_id=%s and state=%s', ('printed',journal,period,'draft'))
|
||||
self.cr.execute('select id from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\' order by ('+ sort_selection +'),id', (period, journal))
|
||||
ids = map(lambda x: x[0], self.cr.fetchall())
|
||||
ids_final.append(ids)
|
||||
line_ids = []
|
||||
for line_id in ids_final:
|
||||
a = obj_mline.browse(self.cr, self.uid, line_id)
|
||||
line_ids.append(a)
|
||||
return line_ids
|
||||
self.cr.execute('update account_journal_period set state=%s where journal_id=%s and period_id=%s and state=%s', ('printed',journal_id,period_id,'draft'))
|
||||
self.cr.execute('select id from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\' order by date,id', (period_id, journal_id))
|
||||
self.cr.execute('update account_journal_period set state=%s where journal_id IN %s and period_id=%s and state=%s', ('printed', self.journal_ids, period_id, 'draft'))
|
||||
self.cr.commit()
|
||||
self.cr.execute('SELECT id FROM account_move_line l WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' ORDER BY '+ self.sort_selection + '' ,(period_id, tuple(journal_id) ))
|
||||
ids = map(lambda x: x[0], self.cr.fetchall())
|
||||
return obj_mline.browse(self.cr, self.uid, ids)
|
||||
|
||||
def _sum_debit(self, period_id, journal_id):
|
||||
self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
def _set_get_account_currency_code(self, account_id):
|
||||
self.cr.execute("SELECT c.code AS code "\
|
||||
"FROM res_currency c,account_account AS ac "\
|
||||
"WHERE ac.id = %s AND ac.currency_id = c.id" % (account_id))
|
||||
result = self.cr.fetchone()
|
||||
if result:
|
||||
self.account_currency = result[0]
|
||||
else:
|
||||
self.account_currency = False
|
||||
|
||||
def _sum_credit(self, period_id, journal_id):
|
||||
self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
def _get_fiscalyear(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name
|
||||
return super(journal_print ,self)._get_fiscalyear(data)
|
||||
|
||||
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header=False)
|
||||
report_sxw.report_sxw('report.account.journal.period.print.wiz', 'account.journal.period', 'addons/account/report/wizard_account_journal.rml', parser=journal_print, header=False)
|
||||
def _get_account(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
|
||||
return super(journal_print ,self)._get_account(data)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
def _display_currency(self, data):
|
||||
if data['model'] == 'account.journal.period':
|
||||
return True
|
||||
return data['form']['amount_currency']
|
||||
|
||||
def _get_sortby(self, data):
|
||||
if self.sort_selection == 'date':
|
||||
return 'Date'
|
||||
elif self.sort_selection == 'ref':
|
||||
return 'Reference Number'
|
||||
return 'Date'
|
||||
|
||||
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,42 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<document filename="print_journal.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Print Journal" author="OpenERP" 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">Print Journal - [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Table_Print_Current_datetime">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -53,15 +26,104 @@
|
||||
<blockTableStyle id="Table2">
|
||||
<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="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
@@ -75,9 +137,9 @@
|
||||
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10a" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10b" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10b" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
@@ -103,7 +165,7 @@
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_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="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" 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_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
@@ -114,11 +176,77 @@
|
||||
<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="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_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_left" fontName="Helvetica-Bold" fontSize="8.0" leading="8" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Print Journal</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="85.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre"> [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]]</para>
|
||||
<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filters By </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Entries Sorted By</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[o.journal_id.name ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_sortby(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="40.0,65.0,50.0,62.0,174.0,57.0,61.0,40.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="P10a">Date</para></td>
|
||||
<td><para style="P10">Voucher No</para></td>
|
||||
@@ -127,6 +255,7 @@
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10b">Debit</para></td>
|
||||
<td><para style="P10b">Credit</para></td>
|
||||
<td><para style="P10b">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11">[[o.period_id.name ]]</para></td>
|
||||
@@ -136,7 +265,9 @@
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td> <para style="P12"><u>[[ formatLang((sum_credit(o.period_id.id, o.journal_id.id) - sum_debit(o.period_id.id, o.journal_id.id))) ]]</u></para></td>
|
||||
</tr>
|
||||
<para style="Standard"><font color="white">[[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]]</font></para>
|
||||
<tr>
|
||||
<td><para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para><para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ line.ref ]]</para></td>
|
||||
@@ -145,7 +276,46 @@
|
||||
<td><para style="terp_default_8">[[ line.name ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit - line.debit) ]]</para></td>
|
||||
</tr>
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td><para style="P10a">Date</para></td>
|
||||
<td><para style="P10">Voucher No</para></td>
|
||||
<td><para style="P10">A/c No.</para></td>
|
||||
<td><para style="P10a">Third party</para></td>
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10b">Debit</para></td>
|
||||
<td><para style="P10b">Credit</para></td>
|
||||
<td><para style="P10b">Balance</para></td>
|
||||
<td><para style="P10b">Currency</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11">[[o.period_id.name ]]</para></td>
|
||||
<td><para style="P11a">[[ o.journal_id.code ]]</para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P11"><font color="white"></font></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td><para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para></td>
|
||||
<td> <para style="P12"><u>[[ formatLang((sum_debit(o.period_id.id, o.journal_id.id) - sum_credit(o.period_id.id, o.journal_id.id))) ]]</u></para></td>
|
||||
</tr>
|
||||
<para style="Standard"><font color="white">[[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]]</font></para>
|
||||
<tr>
|
||||
<td><para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para><para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ line.ref ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ line.account_id.code ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.partner_id and line.partner_id.name ]]</para></td>
|
||||
<td><para style="terp_default_8">[[ line.name ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit - line.debit) ]]</para></td>
|
||||
<td><para style="P8">[[ line.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.currency_id.code or '']]</para></td>
|
||||
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -0,0 +1,471 @@
|
||||
# -*- 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 re
|
||||
import copy
|
||||
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
super(partner_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.account_ids = []
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'sum_litige': self._sum_litige,
|
||||
'sum_sdebit': self._sum_sdebit,
|
||||
'sum_scredit': self._sum_scredit,
|
||||
'solde_debit': self._solde_balance_debit,
|
||||
'solde_credit': self._solde_balance_credit,
|
||||
'get_currency': self._get_currency,
|
||||
'comma_me' : self.comma_me,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_periods':self.get_periods,
|
||||
'get_journal': self._get_journal,
|
||||
'get_filter': self._get_filter,
|
||||
'get_account': self._get_account,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_partners':self._get_partners,
|
||||
})
|
||||
## Compute account list one time
|
||||
#
|
||||
# Date Management
|
||||
#
|
||||
|
||||
def get_periods(self, form):
|
||||
result = ''
|
||||
if form.has_key('periods') and form['periods']:
|
||||
period_ids = form['periods']
|
||||
per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods'])
|
||||
for r in per_ids:
|
||||
if r == per_ids[len(per_ids)-1]:
|
||||
result += r.name + ". "
|
||||
else:
|
||||
result += r.name + ", "
|
||||
else:
|
||||
fy_obj = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear'])
|
||||
res = fy_obj.period_ids
|
||||
len_res = len(res)
|
||||
for r in res:
|
||||
if r == res[len_res-1]:
|
||||
result += r.name + ". "
|
||||
else:
|
||||
result += r.name + ", "
|
||||
return str(result and result[:-1]) or 'ALL'
|
||||
|
||||
def comma_me(self, amount):
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
else :
|
||||
amount = str(amount)
|
||||
if (amount == '0'):
|
||||
return ' '
|
||||
orig = amount
|
||||
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
|
||||
if orig == new:
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
## Compute Code
|
||||
#
|
||||
self.initial_balance = data['form'].get('initial_balance', True)
|
||||
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'):
|
||||
self.ACCOUNT_TYPE = ('payable',)
|
||||
else:
|
||||
self.ACCOUNT_TYPE = ('payable', 'receivable')
|
||||
|
||||
self.cr.execute("SELECT a.id " \
|
||||
"FROM account_account a " \
|
||||
"LEFT JOIN account_account_type t " \
|
||||
"ON (a.type = t.code) " \
|
||||
"WHERE a.type IN %s " \
|
||||
"AND a.active", (self.ACCOUNT_TYPE,))
|
||||
self.account_ids = [a for (a,) in self.cr.fetchall()]
|
||||
return super(partner_balance, self).set_context(objects, data, ids, report_type=report_type)
|
||||
|
||||
def lines(self):
|
||||
full_account = []
|
||||
result_tmp = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT p.ref,l.account_id,ac.name AS account_name,ac.code AS code ,p.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.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.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,))
|
||||
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
|
||||
for r in res:
|
||||
full_account.append(r)
|
||||
|
||||
## 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
|
||||
|
||||
def _add_subtotal(self, cleanarray):
|
||||
i = 0
|
||||
completearray = []
|
||||
tot_debit = 0.0
|
||||
tot_credit = 0.0
|
||||
tot_scredit = 0.0
|
||||
tot_sdebit = 0.0
|
||||
tot_enlitige = 0.0
|
||||
for r in cleanarray:
|
||||
# For the first element we always add the line
|
||||
# type = 1 is the line is the first of the account
|
||||
# type = 2 is an other line of the account
|
||||
if i==0:
|
||||
# We add the first as the header
|
||||
#
|
||||
##
|
||||
new_header = {}
|
||||
new_header['ref'] = ''
|
||||
new_header['name'] = r['account_name']
|
||||
new_header['code'] = r['code']
|
||||
new_header['debit'] = r['credit'] #tot_credit
|
||||
new_header['credit'] = r['debit'] #tot_debit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
##
|
||||
completearray.append(new_header)
|
||||
#
|
||||
r['type'] = 1
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
completearray.append(r)
|
||||
#
|
||||
tot_debit = r['debit']
|
||||
tot_credit = r['credit']
|
||||
tot_scredit = r['scredit']
|
||||
tot_sdebit = r['sdebit']
|
||||
tot_enlitige = (r['enlitige'] or 0.0)
|
||||
#
|
||||
else:
|
||||
if cleanarray[i]['account_id'] <> cleanarray[i-1]['account_id']:
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
# we reset the counter
|
||||
tot_debit = r['debit']
|
||||
tot_credit = r['credit']
|
||||
tot_scredit = r['scredit']
|
||||
tot_sdebit = r['sdebit']
|
||||
tot_enlitige = (r['enlitige'] or 0.0)
|
||||
#
|
||||
##
|
||||
new_header = {}
|
||||
new_header['ref'] = ''
|
||||
new_header['name'] = r['account_name']
|
||||
new_header['code'] = r['code']
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
##get_fiscalyear
|
||||
##
|
||||
|
||||
completearray.append(new_header)
|
||||
##
|
||||
#
|
||||
r['type'] = 1
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
if cleanarray[i]['account_id'] == cleanarray[i-1]['account_id']:
|
||||
# we reset the counter
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
|
||||
tot_debit = tot_debit + r['debit']
|
||||
tot_credit = tot_credit + r['credit']
|
||||
tot_scredit = tot_scredit + r['scredit']
|
||||
tot_sdebit = tot_sdebit + r['sdebit']
|
||||
tot_enlitige = tot_enlitige + (r['enlitige'] or 0.0)
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
|
||||
#
|
||||
r['type'] = 2
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
#
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
i = i + 1
|
||||
return completearray
|
||||
|
||||
def _sum_debit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
temp_res = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"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)
|
||||
return temp_res
|
||||
|
||||
def _sum_credit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
temp_res = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"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)
|
||||
return temp_res
|
||||
|
||||
def _sum_litige(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
temp_res = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit-credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND " + self.query + " " \
|
||||
"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)
|
||||
return temp_res
|
||||
|
||||
def _sum_sdebit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
result_tmp = 0.0
|
||||
a = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT CASE WHEN sum(debit) > sum(credit) " \
|
||||
"THEN sum(debit) - sum(credit) " \
|
||||
"ELSE 0 " \
|
||||
"END " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND " + self.query + " " \
|
||||
"GROUP BY l.partner_id",
|
||||
(tuple(self.account_ids),))
|
||||
a = self.cr.fetchone()[0]
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
return result_tmp
|
||||
|
||||
def _sum_scredit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
result_tmp = 0.0
|
||||
a = 0.0
|
||||
self.cr.execute(
|
||||
"SELECT CASE WHEN sum(debit) < sum(credit) " \
|
||||
"THEN sum(credit) - sum(debit) " \
|
||||
"ELSE 0 " \
|
||||
"END " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND " + self.query + " " \
|
||||
"GROUP BY l.partner_id",
|
||||
(tuple(self.account_ids), ))
|
||||
a = self.cr.fetchone()[0] or 0.0
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
return result_tmp
|
||||
|
||||
def _solde_balance_debit(self):
|
||||
debit, credit = self._sum_debit(), self._sum_credit()
|
||||
return debit > credit and debit - credit
|
||||
|
||||
def _solde_balance_credit(self):
|
||||
debit, credit = self._sum_debit(), self._sum_credit()
|
||||
return credit > debit and credit - debit
|
||||
|
||||
def _get_partners(self):
|
||||
if self.result_selection == 'customer':
|
||||
return 'Receivable Accounts'
|
||||
elif self.result_selection == 'supplier':
|
||||
return 'Payable Accounts'
|
||||
elif self.result_selection == 'customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return ''
|
||||
|
||||
report_sxw.report_sxw('report.account.partner.balance', 'res.partner', 'account/report/account_partner_balance.rml',parser=partner_balance, header="internal")
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,272 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="HipHop.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Company_Name">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,3" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" />
|
||||
<lineStyle kind="OUTLINE" colorName="#e6e6e6" />
|
||||
<blockBackground colorName="white" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="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="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="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="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.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="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="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" 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_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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="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>
|
||||
<para style="terp_header_Centre">Partner Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="90.0,80.0,80.0,130.0,80.0,80.0" style="Table2_header">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Partner's</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td> <para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]] </para></td>
|
||||
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td> <para style="terp_default_Centre_9">[[ get_partners() ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para style="terp_default_8">
|
||||
<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">
|
||||
<tr>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">(Account/Partner) Name</para></td>
|
||||
<td><para style="P12b">Debit</para></td>
|
||||
<td><para style="P12b">Credit</para></td>
|
||||
<td><para style="P12b">Balance</para></td>
|
||||
<td><para style="P12b">In dispute</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Grand total</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_debit()) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_credit()) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((solde_debit()-solde_credit())) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_litige()) ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Balance</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_debit()) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_credit()) ]]</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
</tr>
|
||||
<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>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,316 @@
|
||||
# -*- 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 re
|
||||
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
super(third_party_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit_partner': self._sum_debit_partner,
|
||||
'sum_credit_partner': self._sum_credit_partner,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_currency': self._get_currency,
|
||||
'comma_me' : self.comma_me,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_account': self._get_account,
|
||||
'get_filter': self._get_filter,
|
||||
'get_start_date': self._get_start_date,
|
||||
'get_end_date': self._get_end_date,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date': self._get_end_date,
|
||||
'get_journal': self._get_journal,
|
||||
'get_partners':self._get_partners,
|
||||
'get_intial_balance':self._get_intial_balance,
|
||||
'display_initial_balance':self._display_initial_balance,
|
||||
'display_currency':self._display_currency,
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form'].get('initial_bal_query', '')
|
||||
self.reconcil = data['form'].get('reconcil', True)
|
||||
self.initial_balance = data['form'].get('initial_balance', True)
|
||||
self.result_selection = data['form'].get('result_selection', 'customer')
|
||||
self.amount_currency = data['form'].get('amount_currency', False)
|
||||
PARTNER_REQUEST = ''
|
||||
if (data['model'] == 'res.partner'):
|
||||
## Si on imprime depuis les partenaires
|
||||
if ids:
|
||||
PARTNER_REQUEST = "AND line.partner_id IN %s",(tuple(ids),)
|
||||
if self.result_selection == 'supplier':
|
||||
self.ACCOUNT_TYPE = ['payable']
|
||||
elif self.result_selection == 'customer':
|
||||
self.ACCOUNT_TYPE = ['receivable']
|
||||
else:
|
||||
self.ACCOUNT_TYPE = ['payable','receivable']
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT a.id " \
|
||||
"FROM account_account a " \
|
||||
"LEFT JOIN account_account_type t " \
|
||||
"ON (a.type=t.code) " \
|
||||
'WHERE a.type IN %s' \
|
||||
"AND a.active", (tuple(self.ACCOUNT_TYPE), ))
|
||||
self.account_ids = [a for (a,) in self.cr.fetchall()]
|
||||
partner_to_use = []
|
||||
self.cr.execute(
|
||||
"SELECT DISTINCT l.partner_id " \
|
||||
"FROM account_move_line AS l, account_account AS account " \
|
||||
"WHERE l.partner_id IS NOT NULL " \
|
||||
"AND l.account_id = account.id " \
|
||||
"AND " + self.query +" " \
|
||||
"AND l.account_id IN %s " \
|
||||
" " + PARTNER_REQUEST + " " \
|
||||
"AND account.active " ,
|
||||
(tuple(self.account_ids),))
|
||||
|
||||
res = self.cr.dictfetchall()
|
||||
for res_line in res:
|
||||
partner_to_use.append(res_line['partner_id'])
|
||||
new_ids = partner_to_use
|
||||
self.partner_ids = new_ids
|
||||
objects = self.pool.get('res.partner').browse(self.cr, self.uid, new_ids)
|
||||
return super(third_party_ledger, self).set_context(objects, data, new_ids, report_type)
|
||||
|
||||
def comma_me(self, amount):
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
else :
|
||||
amount = str(amount)
|
||||
if (amount == '0'):
|
||||
return ' '
|
||||
orig = amount
|
||||
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
|
||||
if orig == new:
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
|
||||
def lines(self, partner):
|
||||
full_account = []
|
||||
if self.reconcil:
|
||||
RECONCILE_TAG = " "
|
||||
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 " \
|
||||
"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)" \
|
||||
"WHERE l.partner_id = %s " \
|
||||
"AND l.account_id IN %s AND " + self.query +" " \
|
||||
" " + RECONCILE_TAG + " "\
|
||||
"ORDER BY l.id",
|
||||
(partner.id, tuple(self.account_ids)))
|
||||
res = self.cr.dictfetchall()
|
||||
sum = 0.0
|
||||
for r in res:
|
||||
sum = r['debit'] - r['credit']
|
||||
r['progress'] = sum
|
||||
full_account.append(r)
|
||||
return full_account
|
||||
|
||||
def _get_intial_balance(self, partner):
|
||||
self.cr.execute(
|
||||
"SELECT COALESCE(SUM(l.debit),0.0), COALESCE(SUM(l.credit),0.0), COALESCE(sum(debit-credit), 0.0) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id = %s " \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND " + self.init_query + " ",
|
||||
(partner.id, tuple(self.account_ids)))
|
||||
return self.cr.fetchall()
|
||||
|
||||
def _sum_debit_partner(self, partner):
|
||||
result_tmp = 0.0
|
||||
if self.reconcil :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id = %s " \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND " + self.query + " " ,
|
||||
(partner.id,tuple(self.account_ids),))
|
||||
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
return result_tmp
|
||||
|
||||
def _sum_credit_partner(self, partner):
|
||||
result_tmp = 0.0
|
||||
if self.reconcil :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id=%s " \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND " + self.query + " " ,
|
||||
(partner.id, tuple(self.account_ids),))
|
||||
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
return result_tmp
|
||||
|
||||
def _sum_debit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
result_tmp = 0.0
|
||||
result_init = 0.0
|
||||
if self.reconcil :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND " + self.init_query + " ",
|
||||
(tuple(self.partner_ids), tuple(self.account_ids)))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_init = contemp[0] or 0.0
|
||||
else:
|
||||
result_init = result_tmp + 0.0
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND " + self.query + " " ,
|
||||
(tuple(self.partner_ids), tuple(self.account_ids),))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
return result_tmp + result_init
|
||||
|
||||
def _sum_credit(self):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
result_tmp = 0.0
|
||||
result_init = 0.0
|
||||
if self.reconcil :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.initial_balance:
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND " + self.init_query + " ",
|
||||
(tuple(self.partner_ids), tuple(self.account_ids)))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_init = contemp[0] or 0.0
|
||||
else:
|
||||
result_init = result_tmp + 0.0
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND " + self.query + " " ,
|
||||
(tuple(self.partner_ids), tuple(self.account_ids),))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
return result_tmp + result_init
|
||||
#
|
||||
def _get_partners(self):
|
||||
if self.result_selection == 'customer':
|
||||
return 'Receivable Accounts'
|
||||
elif self.result_selection == 'supplier':
|
||||
return 'Payable Accounts'
|
||||
elif self.result_selection == 'customer_supplier':
|
||||
return 'Receivable and Payable Accounts'
|
||||
return ''
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
self._set_get_account_currency_code(account.id)
|
||||
self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
|
||||
total = self.cr.fetchone()
|
||||
if self.account_currency:
|
||||
return_field = str(total[0]) + self.account_currency
|
||||
return return_field
|
||||
else:
|
||||
currency_total = self.tot_currency = 0.0
|
||||
return currency_total
|
||||
|
||||
def _display_initial_balance(self, data):
|
||||
if self.initial_balance:
|
||||
return True
|
||||
return False
|
||||
|
||||
def _display_currency(self, data):
|
||||
if self.amount_currency :
|
||||
return True
|
||||
return False
|
||||
|
||||
report_sxw.report_sxw('report.account.third_party_ledger', 'res.partner',
|
||||
'addons/account/report/account_partner_ledger.rml',parser=third_party_ledger,
|
||||
header='internal')
|
||||
|
||||
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:
|
||||
@@ -0,0 +1,518 @@
|
||||
<?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="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<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" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<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="Heading" fontName="Helvetica" fontSize="12.0" leading="15" 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="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-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" 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_Right_balance" fontName="Helvetica" fontSize="8.0" leading="0" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="80.0,80.0,80.0,130.0,70.0,80.0" style="Table2_header">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Partner's</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3_header">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="65.0,65.0" style="Table3_header">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_partners() ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P4">
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[ data['form']['initial_balance'] or removeParentNode('tr') ]]
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="276.0,67.0,66.0,65.0,65.0" style="Table5">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit())) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit())) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit() - sum_credit())) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="276.0,67.0,66.0,65.0,65.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[display_initial_balance(data) or removeParentNode('tr') ]]
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,665 @@
|
||||
<?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="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,0" stop="8,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="9,0" stop="9,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="10,0" stop="10,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="11,0" stop="11,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="11,0" stop="11,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="12,0" stop="12,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="12,0" stop="12,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="12,0" stop="12,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="13,0" stop="13,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="14,0" stop="14,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="14,0" stop="14,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="14,-1" stop="14,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="15,0" stop="15,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="15,0" stop="15,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="15,-1" stop="15,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="16,0" stop="16,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="16,0" stop="16,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="16,0" stop="16,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="16,-1" stop="16,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="17,0" stop="17,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="17,-1" stop="17,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="18,0" stop="18,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="18,0" stop="18,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="18,-1" stop="18,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="19,0" stop="19,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="19,-1" stop="19,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="20,0" stop="20,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="20,0" stop="20,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="20,-1" stop="20,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,1" stop="0,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,1" stop="1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,1" stop="2,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,1" stop="3,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,1" stop="4,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,1" stop="5,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,2" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,2" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,2" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,2" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,2" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,2" stop="4,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,2" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,2" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,2" stop="5,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,2" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,2" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,2" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="8,2" stop="8,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,2" stop="8,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="9,2" stop="9,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="9,2" stop="9,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="9,2" stop="9,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="10,2" stop="10,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="11,2" stop="11,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="11,2" stop="11,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="12,2" stop="12,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="13,2" stop="13,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="13,2" stop="13,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,3" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,3" stop="0,3"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,3" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,3" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,3" stop="1,3"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,4" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,4" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,4" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,5" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,5" stop="0,5"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,5" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,5" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,5" stop="1,5"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,6" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,6" stop="1,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,6" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table9">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table10">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
|
||||
</blockTableStyle>
|
||||
<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" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" 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"/>
|
||||
<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="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-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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="10.0" leading="13" alignment="LEFT" spaceBefore="0.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_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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" 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="Table index 1" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica"/>
|
||||
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table index heading" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="16.0" leading="20" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="85.0,79.0,90.0,130.0,65.0,90.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">Chart of Account</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Fiscal Year</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Journal</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Partner's</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P9">Printing Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[ get_account(data) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11">[[ get_fiscalyear(data) or '' ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="65.0,60.0" style="Table9">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">Start Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">End Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_start_date(data) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_end_date(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="65.0,60.0" style="Table10">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P12">Start Period</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12">End Period</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ get_partners() ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[ display_initial_balance(data) or removeParentNode('tr') ]]
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Currency</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4"/>
|
||||
<blockTable colWidths="276.0,67.0,66.0,65.0,65.0" style="Table5">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit())) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit())) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit() - sum_credit())) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="276.0,67.0,66.0,65.0,65.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[ data['form']['initial_balance'] or removeParentNode('tr') ]]
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][1] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ get_intial_balance(p)[0][2] or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"></para>
|
||||
</td>
|
||||
</tr>
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3"> [[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
+98
-30
@@ -1,21 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(1120.0,770.0)" title="Test" author="Martin Simon" allowSplitting="20" >
|
||||
<template pageSize="(1120.0,770.0)" title="Profit and Loss" author="Openerp" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="15.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
<!--COL 1-->
|
||||
<drawString x="1.3cm" y="25.50cm">[[ get_company(data['form']) ]]</drawString>
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.3cm" y="0.50cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="37.20cm" y="0.50cm">Page <pageNumber/></drawString>
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1.3cm 24.9cm 38.3cm 24.9cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -80,6 +68,10 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Net_Profit_Loss">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -120,6 +112,39 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
@@ -162,25 +187,67 @@
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="1049.0" style="Table_Company_Name">
|
||||
<blockTable colWidths="539.0" style="Table_Heading">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Profit And Loss Account </para>
|
||||
<para style="terp_header_Centre">[[ get_company(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="1049.0" style="Table_Date_from_To">
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">From : [[ formatLang(data['form']['date_from'],date=True) ]] To: [[ formatLang(data['form']['date_to'], date=True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ get_data(data['form']) ]]</para>
|
||||
<para style="terp_header_Centre">Profit And Loss Account</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P2">[[ get_data(data) or removeParentNode('para')]]</para>
|
||||
<blockTable colWidths="250.0,200.0,200.0,200.0,200.0" style="Table2_header">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data)]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,308.16,116.32,100.0,308.16,116.32" style="Table_Account_Line_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -190,7 +257,7 @@
|
||||
<para style="terp_default_Bold_9">Perticular</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form'])]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Code</para>
|
||||
@@ -199,18 +266,19 @@
|
||||
<para style="terp_default_Bold_9">Perticular</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">Total Amount([[ get_currency(data['form'])]])</para>
|
||||
<para style="P1">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines(),'a' ) ]] </font>[[ a['code'] ]]<font>[[ a['level']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font>
|
||||
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines(),'a' ) ]] </font>[[ a['code'] ]]<font>[[ a['level']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font>
|
||||
<font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
@@ -218,16 +286,16 @@
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
[[ a['code1'] ]]<font>[[ a['level1']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font>
|
||||
[[ a['code1'] ]]<font>[[ a['level1']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name1'] ]]</font>
|
||||
<font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<3 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(get_abs(a['balance1'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(get_abs(a['balance1'])) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,58 +14,69 @@
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import time
|
||||
import mx.DateTime
|
||||
|
||||
import pooler
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
|
||||
class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(report_pl_account_horizontal, self).__init__(cr, uid, name, context)
|
||||
self.result_sum_dr=0.0
|
||||
self.result_sum_cr=0.0
|
||||
self.res_pl ={}
|
||||
class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
super(report_pl_account_horizontal, self).__init__(cr, uid, name, context=context)
|
||||
self.result_sum_dr = 0.0
|
||||
self.result_sum_cr = 0.0
|
||||
self.res_pl = {}
|
||||
self.result = {}
|
||||
self.result_temp=[]
|
||||
self.result_temp = []
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_company': self.get_company,
|
||||
'get_currency': self._get_currency,
|
||||
'get_data': self.get_data,
|
||||
'sum_dr' : self.sum_dr,
|
||||
'sum_cr' : self.sum_cr,
|
||||
'final_result' : self.final_result,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_account': self._get_account,
|
||||
'get_start_period': self.get_start_period,
|
||||
'get_end_period': self.get_end_period,
|
||||
'get_sortby': self._get_sortby,
|
||||
'get_filter': self._get_filter,
|
||||
'get_journal': self._get_journal,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
'get_company':self._get_company,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
|
||||
def final_result(self):
|
||||
return self.res_pl
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
def get_data(self,form):
|
||||
def get_data(self, data):
|
||||
cr, uid = self.cr, self.uid
|
||||
db_pool = pooler.get_pool(self.cr.dbname)
|
||||
|
||||
|
||||
type_pool = db_pool.get('account.account.type')
|
||||
account_pool = db_pool.get('account.account')
|
||||
year_pool = db_pool.get('account.fiscalyear')
|
||||
@@ -74,26 +84,22 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
types = [
|
||||
'expense',
|
||||
'income'
|
||||
]
|
||||
]
|
||||
|
||||
ctx = self.context.copy()
|
||||
ctx['state'] = form['context'].get('state','all')
|
||||
ctx['fiscalyear'] = form['fiscalyear']
|
||||
if form['state']=='byperiod' :
|
||||
ctx['periods'] = form['periods']
|
||||
elif form['state']== 'bydate':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
elif form['state'] == 'all' :
|
||||
ctx['periods'] = form['periods']
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
|
||||
|
||||
cal_list={}
|
||||
account_id = [form['Account_list']]
|
||||
if data['form']['filter'] == 'filter_period' :
|
||||
ctx['periods'] = data['form'].get('periods', False)
|
||||
elif data['form']['filter'] == 'filter_date':
|
||||
ctx['date_from'] = data['form'].get('date_from', False)
|
||||
ctx['date_to'] = data['form'].get('date_to', False)
|
||||
|
||||
cal_list = {}
|
||||
account_id = data['form'].get('chart_account_id', False)
|
||||
account_ids = account_pool._get_children_and_consol(cr, uid, account_id, context=ctx)
|
||||
accounts = account_pool.browse(cr, uid, account_ids, context=ctx)
|
||||
|
||||
|
||||
for typ in types:
|
||||
accounts_temp = []
|
||||
for account in accounts:
|
||||
@@ -102,10 +108,10 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
self.result_sum_dr += abs(account.debit - account.credit)
|
||||
if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit):
|
||||
self.result_sum_cr += abs(account.debit - account.credit)
|
||||
if form['display_account'] == 'bal_mouvement':
|
||||
if data['form']['display_account'] == 'bal_movement':
|
||||
if account.credit > 0 or account.debit > 0 or account.balance > 0 :
|
||||
accounts_temp.append(account)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
elif data['form']['display_account'] == 'bal_solde':
|
||||
if account.balance != 0:
|
||||
accounts_temp.append(account)
|
||||
else:
|
||||
@@ -117,9 +123,9 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
self.res_pl['type'] = 'Net Profit C.F.B.L.'
|
||||
self.res_pl['balance'] = (self.result_sum_cr - self.result_sum_dr)
|
||||
self.result[typ] = accounts_temp
|
||||
cal_list[typ]=self.result[typ]
|
||||
if cal_list:
|
||||
temp={}
|
||||
cal_list[typ] = self.result[typ]
|
||||
if cal_list:
|
||||
temp = {}
|
||||
for i in range(0,max(len(cal_list['expense']),len(cal_list['income']))):
|
||||
if i < len(cal_list['expense']) and i < len(cal_list['income']):
|
||||
temp={
|
||||
@@ -146,7 +152,7 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
'balance1':cal_list['income'][i].balance,
|
||||
}
|
||||
self.result_temp.append(temp)
|
||||
if i < len(cal_list['expense']):
|
||||
if i < len(cal_list['expense']):
|
||||
temp={
|
||||
'code' : cal_list['expense'][i].code,
|
||||
'name' : cal_list['expense'][i].name,
|
||||
@@ -165,17 +171,11 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
|
||||
def get_lines_another(self, group):
|
||||
return self.result.get(group, [])
|
||||
|
||||
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.code
|
||||
|
||||
def get_company(self,form):
|
||||
comp_obj=pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr,self.uid,form['company_id'])
|
||||
return comp_obj.name
|
||||
|
||||
report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
|
||||
'addons/account/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False)
|
||||
'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal')
|
||||
|
||||
report_sxw.report_sxw('report.pl.account', 'account.account',
|
||||
'addons/account/report/report_pl_account.rml',parser=report_pl_account_horizontal, header=False)
|
||||
'addons/account/report/account_profit_loss.rml',parser=report_pl_account_horizontal, header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+93
-20
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Profit and Loss" author="Openerp" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
@@ -39,6 +39,10 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,0" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
@@ -80,6 +84,7 @@
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -109,6 +114,38 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
|
||||
<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="LINEAFTER" 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="LINEAFTER" 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="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
@@ -154,7 +191,7 @@
|
||||
<blockTable colWidths="539.0" style="Table_Heading">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ get_company(data['form']) ]]</para>
|
||||
<para style="terp_header_Centre">[[ get_company(data) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -165,18 +202,54 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="539.0" style="Table_Date_from_To">
|
||||
|
||||
<para style="P2">[[ get_data(data) or removeParentNode('para')]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="125.0,100.0,140.0,80.0,90.0" style="Table2_header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">From : [[ formatLang(data['form']['date_from'],date=True) ]] To: [[ formatLang(data['form']['date_to'], date=True) ]]</para>
|
||||
</td>
|
||||
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ get_data(data['form']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
|
||||
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_date(data)]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="65.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="100.0,326.0,113.0" style="Table_Account_Line_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -186,18 +259,18 @@
|
||||
<para style="terp_default_Bold_9">Expenses</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="terp_tblheader_Details_Right">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines_another('expense'),'a' ) ]] </font>[[ a.code ]]<font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font>
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines_another('expense'),'a' ) ]] </font>[[ a.code ]]<font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a.name ]]</font>
|
||||
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a.name ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
@@ -221,7 +294,7 @@
|
||||
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
<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(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
@@ -241,18 +314,18 @@
|
||||
<para style="terp_default_Bold_9">Incomes</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">Total Amount([[ get_currency(data['form']) ]])</para>
|
||||
<para style="P1">Total Amount([[ get_currency(data) ]])</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines_another('income'),'a') ]] </font>[[ a.code ]]<font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font>
|
||||
<font face="Times-Roman">[[ repeatIn(get_lines_another('income'),'a') ]] </font>[[ a.code ]]<font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a.name ]]</font>
|
||||
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level<3 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a.name ]]</font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
@@ -276,7 +349,7 @@
|
||||
<blockTable colWidths="426.0,113.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
<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(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
@@ -1,66 +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
|
||||
from report import report_sxw
|
||||
|
||||
#
|
||||
# Use period and Journal for selection or resources
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit
|
||||
})
|
||||
|
||||
def lines(self, period_id, journal_id, *args):
|
||||
if type(period_id)==type([]):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
for period in period_id:
|
||||
ids_journal_period = self.pool.get('account.journal.period').search(self.cr, self.uid, [('journal_id','=',journal),('period_id','=',period)])
|
||||
if ids_journal_period:
|
||||
self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name, l.journal_id, l.period_id', (period, journal))
|
||||
res = self.cr.dictfetchall()
|
||||
a = {'journal':self.pool.get('account.journal').browse(self.cr, self.uid, journal),'period':self.pool.get('account.period').browse(self.cr, self.uid, period)}
|
||||
res[0].update(a)
|
||||
ids_final.append(res)
|
||||
return ids_final
|
||||
self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name', (period_id, journal_id))
|
||||
res = self.cr.dictfetchall()
|
||||
return res
|
||||
|
||||
def _sum_debit(self, period_id, journal_id):
|
||||
self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit(self, period_id, journal_id):
|
||||
self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml', parser=journal_print, header=False)
|
||||
report_sxw.report_sxw('report.account.central.journal.wiz', 'account.journal.period', 'addons/account/report/wizard_central_journal.rml', parser=journal_print, header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -1,185 +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="28.0" y1="42.0" width="539" height="758"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Account_detail_Title">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Line_Content">
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-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="Heading" fontName="Helvetica" fontSize="12.0" leading="15" 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="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
|
||||
<tr>
|
||||
<td><para style="terp_header"><font color="white"> </font></para>
|
||||
</td>
|
||||
<td><para style="terp_header_Centre">Central Journal</para></td>
|
||||
<td><para style="terp_header"><font color="white"> </font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal Code</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Journal Name</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Subheader_Content_detail">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ o.journal_id.code or '' ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ o.journal_id.name ]]</para></td>
|
||||
<td><para style="terp_tblheader_General_Centre">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="83.0,269.0,95.0,92.0" style="Table_Account_detail_Title">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details">Account Num.</para></td>
|
||||
<td><para style="terp_tblheader_Details">Account Name</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="83.0,269.0,94.0,92.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
|
||||
<blockTable colWidths="83.0,269.0,94.0,92.0" style="Table_Journal_Line_Content">
|
||||
<tr>
|
||||
<td><para style="terp_default_9">[[ line['code'] ]]</para></td>
|
||||
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="terp_default_Right_9">[[ formatLang(line['credit'])]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -0,0 +1,135 @@
|
||||
# -*- 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 pooler
|
||||
|
||||
class common_report_header(object):
|
||||
|
||||
def _sum_debit(self, period_id=False, journal_id=False):
|
||||
if journal_id and isinstance(journal_id, int):
|
||||
journal_id = [journal_id]
|
||||
if period_id and isinstance(period_id, int):
|
||||
period_id = [period_id]
|
||||
if not journal_id:
|
||||
journal_id = self.journal_ids
|
||||
if not period_id:
|
||||
period_id = self.period_ids
|
||||
if not (period_id and journal_id):
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(debit) FROM account_move_line l '
|
||||
'WHERE period_id IN %s AND journal_id IN %s ' + self.query_get_clause + ' ',
|
||||
(tuple(period_id), tuple(journal_id)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit(self, period_id=False, journal_id=False):
|
||||
if journal_id and isinstance(journal_id, int):
|
||||
journal_id = [journal_id]
|
||||
if period_id and isinstance(period_id, int):
|
||||
period_id = [period_id]
|
||||
if not journal_id:
|
||||
journal_id = self.journal_ids
|
||||
if not period_id:
|
||||
period_id = self.period_ids
|
||||
if not (period_id and journal_id):
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(credit) FROM account_move_line l '
|
||||
'WHERE period_id IN %s AND journal_id IN %s '+ self.query_get_clause+'',
|
||||
(tuple(period_id), tuple(journal_id)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _get_start_date(self, data):
|
||||
if data.get('form', False) and data['form'].get('date_from', False):
|
||||
return data['form']['date_from']
|
||||
return ''
|
||||
|
||||
def _get_end_date(self, data):
|
||||
if data.get('form', False) and data['form'].get('date_to', False):
|
||||
return data['form']['date_to']
|
||||
return ''
|
||||
|
||||
def get_start_period(self, data):
|
||||
if data.get('form', False) and data['form'].get('period_from', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
|
||||
return ''
|
||||
|
||||
def get_end_period(self, data):
|
||||
if data.get('form', False) and data['form'].get('period_to', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr, self.uid, data['form']['period_to']).name
|
||||
return ''
|
||||
|
||||
def _get_account(self, data):
|
||||
if data.get('form', False) and data['form'].get('chart_account_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name
|
||||
return ''
|
||||
|
||||
def _get_sortby(self, data):
|
||||
raise (_('Error'), _('Not implemented'))
|
||||
|
||||
def _get_filter(self, data):
|
||||
if data.get('form', False) and data['form'].get('filter', False):
|
||||
if data['form']['filter'] == 'filter_date':
|
||||
return 'Date'
|
||||
elif data['form']['filter'] == 'filter_period':
|
||||
return 'Periods'
|
||||
return 'No Filter'
|
||||
|
||||
def _sum_debit_period(self, period_id, journal_id=None):
|
||||
journals = journal_id or self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(debit) FROM account_move_line l '
|
||||
'WHERE period_id=%s AND journal_id IN %s '+ self.query_get_clause +'',
|
||||
(period_id, tuple(journals)))
|
||||
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit_period(self, period_id, journal_id=None):
|
||||
journals = journal_id or self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(credit) FROM account_move_line l '
|
||||
'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause +' ',
|
||||
(period_id, tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _get_fiscalyear(self, data):
|
||||
if data.get('form', False) and data['form'].get('fiscalyear_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr, self.uid, data['form']['fiscalyear_id']).name
|
||||
return ''
|
||||
|
||||
def _get_company(self, data):
|
||||
if data.get('form', False) and data['form'].get('chart_account_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name
|
||||
return ''
|
||||
|
||||
def _get_journal(self, data):
|
||||
codes = []
|
||||
if data.get('form', False) and data['form'].get('journal_ids', False):
|
||||
self.cr.execute('select code from account_journal where id IN %s',(tuple(data['form']['journal_ids']),))
|
||||
codes = [x for x, in self.cr.fetchall()]
|
||||
return codes
|
||||
|
||||
def _get_currency(self, data):
|
||||
if data.get('form', False) and data['form'].get('chart_account_id', False):
|
||||
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code
|
||||
return ''
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,153 +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 operator import itemgetter
|
||||
import pooler
|
||||
import time
|
||||
from report import report_sxw
|
||||
|
||||
#
|
||||
# Use period and Journal for selection or resources
|
||||
#
|
||||
class journal_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(journal_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'periods': self.periods,
|
||||
'sum_debit_period': self._sum_debit_period,
|
||||
'sum_credit_period': self._sum_credit_period,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type = None):
|
||||
super(journal_print, self).set_context(objects, data, ids, report_type)
|
||||
self.cr.execute('SELECT period_id, journal_id '
|
||||
'FROM account_journal_period '
|
||||
'WHERE id IN %s',
|
||||
(tuple(ids),))
|
||||
res = self.cr.fetchall()
|
||||
self.period_ids, self.journal_ids = zip(*res)
|
||||
|
||||
# returns a list of period objs
|
||||
def periods(self, journal_period_objs):
|
||||
dic = {}
|
||||
def filter_unique(o):
|
||||
key = o.period_id.id
|
||||
res = key in dic
|
||||
if not res:
|
||||
dic[key] = True
|
||||
return not res
|
||||
filtered_objs = filter(filter_unique, journal_period_objs)
|
||||
return map(lambda x: x.period_id, filtered_objs)
|
||||
|
||||
def lines(self, period_id, journal_id=[]):
|
||||
if type(period_id)==type([]):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
for period in period_id:
|
||||
ids_journal_period = self.pool.get('account.journal.period').search(self.cr, self.uid, [('journal_id','=',journal),('period_id','=',period)])
|
||||
if ids_journal_period:
|
||||
ids_final.append(ids_journal_period[0])
|
||||
data_jour_period = self.pool.get('account.journal.period').browse(self.cr, self.uid, ids_final)
|
||||
lines_data = []
|
||||
periods = []
|
||||
for data in data_jour_period:
|
||||
if not data.period_id.id in periods:
|
||||
periods.append(data.period_id.id)
|
||||
for period in periods:
|
||||
period_data = self.pool.get('account.period').browse(self.cr, self.uid, period)
|
||||
self.cr.execute(
|
||||
'SELECT j.code, j.name, '
|
||||
'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
|
||||
'FROM account_move_line l '
|
||||
'LEFT JOIN account_journal j ON (l.journal_id=j.id) '
|
||||
'WHERE period_id=%s AND journal_id IN %s '
|
||||
'AND l.state<>\'draft\' '
|
||||
'GROUP BY j.id, j.code, j.name', (period, tuple(journal_id)))
|
||||
res = self.cr.dictfetchall()
|
||||
res[0].update({'period_name':period_data.name})
|
||||
res[0].update({'pid':period})
|
||||
lines_data.append(res)
|
||||
return lines_data
|
||||
if not self.journal_ids:
|
||||
return []
|
||||
|
||||
self.cr.execute('SELECT j.code, j.name, '
|
||||
'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
|
||||
'FROM account_move_line l '
|
||||
'LEFT JOIN account_journal j ON (l.journal_id=j.id) '
|
||||
'WHERE period_id=%s AND journal_id IN %s '
|
||||
'AND l.state<>\'draft\' '
|
||||
'GROUP BY j.id, j.code, j.name',
|
||||
(period_id, tuple(self.journal_ids)))
|
||||
res = self.cr.dictfetchall()
|
||||
return res
|
||||
|
||||
def _sum_debit_period(self, period_id, journal_id=None):
|
||||
journals = journal_id or self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(debit) FROM account_move_line '
|
||||
'WHERE period_id=%s AND journal_id IN %s '
|
||||
'AND state<>\'draft\'',
|
||||
(period_id, tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit_period(self, period_id, journal_id=None):
|
||||
journals = journal_id or self.journal_ids
|
||||
if not journals:
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(credit) FROM account_move_line '
|
||||
'WHERE period_id=%s AND journal_id IN %s '
|
||||
'AND state<>\'draft\'',
|
||||
(period_id, tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_debit(self, period_id=None, journal_id=None):
|
||||
journals = journal_id or self.journal_ids
|
||||
periods = period_id or self.period_ids
|
||||
if not (journals and periods):
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(debit) FROM account_move_line '
|
||||
'WHERE period_id IN %s '
|
||||
'AND journal_id IN %s '
|
||||
'AND state<>\'draft\'',
|
||||
(tuple(periods), tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit(self, period_id=None, journal_id=None):
|
||||
periods = period_id or self.period_ids
|
||||
journals = journal_id or self.journal_ids
|
||||
if not (periods and journals):
|
||||
return 0.0
|
||||
self.cr.execute('SELECT SUM(credit) FROM account_move_line '
|
||||
'WHERE period_id IN %s '
|
||||
'AND journal_id IN %s '
|
||||
'AND state<>\'draft\'',
|
||||
(tuple(periods), tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print)
|
||||
report_sxw.report_sxw('report.account.general.journal.wiz', 'account.journal.period', 'addons/account/report/wizard_general_journal.rml', parser=journal_print, header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -1,200 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(596.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="540" height="758"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Header_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Print_Current_datetime">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Title">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Total">
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</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="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="180.0,180.0,179.0" style="Table_Header_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Centre">General Journal</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="88.0,451.0" style="Table_Print_Current_datetime">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Printing Date :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time=True) ]] </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="72.0,218.0,89.0,83.0,77.0" style="Table_Journal_Title">
|
||||
<tr>
|
||||
<td><para style="terp_tblheader_Details">Code</para></td>
|
||||
<td><para style="terp_tblheader_Details">Journal Name</para></td>
|
||||
<td><para style="terp_tblheader_Details">Period</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Debit Trans.</para></td>
|
||||
<td><para style="terp_tblheader_Details_Right">Credit Trans.</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="71.0,219.0,89.0,83.0,77.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td><para style="terp_default_Bold_9">Total:</para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
|
||||
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn( periods(objects), 'o') ]]</para>
|
||||
<blockTable colWidths="176.0,115.0,89.0,83.0,76.0" style="Table_Sub_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ o.name ]] :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_period(o.id)) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="71.0,219.0,91.0,83.0,76.0" style="Table_Journal_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['debit'] )]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,389 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 CamptoCamp
|
||||
#
|
||||
# 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
|
||||
import xml
|
||||
import rml_parse
|
||||
import pooler
|
||||
|
||||
class general_ledger(rml_parse.rml_parse):
|
||||
_name = 'report.account.general.ledger'
|
||||
|
||||
def set_context(self, objects, data, ids, report_type = None):
|
||||
##
|
||||
self.borne_date = self.get_min_date(data['form'])
|
||||
##
|
||||
new_ids = []
|
||||
if (data['model'] == 'account.account'):
|
||||
new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or []
|
||||
#new_ids = ids
|
||||
else:
|
||||
new_ids.append(data['form']['Account_list'])
|
||||
|
||||
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
|
||||
|
||||
super(general_ledger, self).set_context(objects, data, new_ids, report_type)
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(general_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.date_borne = {}
|
||||
self.query = ""
|
||||
self.child_ids = ""
|
||||
self.tot_currency = 0.0
|
||||
self.period_sql = ""
|
||||
self.sold_accounts = {}
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit_account': self._sum_debit_account,
|
||||
'sum_credit_account': self._sum_credit_account,
|
||||
'sum_solde_account': self._sum_solde_account,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'sum_solde': self._sum_solde,
|
||||
'get_children_accounts': self.get_children_accounts,
|
||||
'sum_currency_amount_account': self._sum_currency_amount_account
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def get_min_date(self, form):
|
||||
|
||||
## Get max born from account_fiscal year
|
||||
#
|
||||
sql = """ select min(fy.date_start) as start_date,max(fy.date_stop) as stop_date from account_fiscalyear
|
||||
As fy where fy.state <> 'close'
|
||||
"""
|
||||
self.cr.execute(sql)
|
||||
res = self.cr.dictfetchall()
|
||||
borne_min = res[0]['start_date']
|
||||
borne_max = res[0]['stop_date']
|
||||
if form['state'] == 'byperiod':
|
||||
## This function will return the most aged date
|
||||
periods = form['periods']
|
||||
#periods = form['periods'][0][2]
|
||||
if not periods:
|
||||
sql = """
|
||||
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = %s
|
||||
"""
|
||||
sqlargs = (form['fiscalyear'],)
|
||||
else:
|
||||
sql = """
|
||||
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id in %s
|
||||
"""
|
||||
sqlargs = (tuple(periods),)
|
||||
self.cr.execute(sql, sqlargs)
|
||||
res = self.cr.dictfetchall()
|
||||
borne_min = res[0]['start_date']
|
||||
borne_max = res[0]['stop_date']
|
||||
elif form['state'] == 'bydate':
|
||||
borne_min = form['date_from']
|
||||
borne_max = form['date_to']
|
||||
elif form['state'] == 'all':
|
||||
periods = form['periods']
|
||||
#periods = form['periods'][0][2]
|
||||
if not periods:
|
||||
sql = """
|
||||
SELECT MIN(p.date_start) AS start_date,
|
||||
MAX(p.date_stop) AS stop_date
|
||||
FROM account_period AS p
|
||||
WHERE p.fiscalyear_id = %s
|
||||
"""
|
||||
sqlargs = (form['fiscalyear'],)
|
||||
else:
|
||||
sql = """
|
||||
SELECT MIN(p.date_start) AS start_date,
|
||||
MAX(p.date_stop) AS stop_date
|
||||
FROM account_period AS p
|
||||
WHERE p.id IN %s
|
||||
"""
|
||||
sqlargs = (tuple(periods),)
|
||||
self.cr.execute(sql, sqlargs)
|
||||
res = self.cr.dictfetchall()
|
||||
period_min = res[0]['start_date']
|
||||
period_max = res[0]['stop_date']
|
||||
date_min = form['date_from']
|
||||
date_max = form['date_to']
|
||||
if period_min<date_min:
|
||||
borne_min = period_min
|
||||
else :
|
||||
borne_min = date_min
|
||||
if date_max<period_max:
|
||||
borne_max = period_max
|
||||
else :
|
||||
borne_max = date_max
|
||||
elif form['state'] == 'none':
|
||||
sql = """
|
||||
SELECT min(date) as start_date,max(date) as stop_date FROM account_move_line """
|
||||
self.cr.execute(sql)
|
||||
res = self.cr.dictfetchall()
|
||||
borne_min = res[0]['start_date']
|
||||
borne_max = res[0]['stop_date']
|
||||
self.date_borne = {
|
||||
'min_date': borne_min,
|
||||
'max_date': borne_max,
|
||||
}
|
||||
return self.date_borne
|
||||
|
||||
def get_children_accounts(self, account, form):
|
||||
|
||||
self.child_ids = self.pool.get('account.account').search(self.cr, self.uid,
|
||||
[('parent_id', 'child_of', self.ids)])
|
||||
#
|
||||
res = []
|
||||
ctx = self.context.copy()
|
||||
## We will make the test for period or date
|
||||
## We will now make the test
|
||||
#
|
||||
ctx['state'] = form['context'].get('state', 'all')
|
||||
if form.has_key('fiscalyear'):
|
||||
ctx['fiscalyear'] = form['fiscalyear']
|
||||
ctx['periods'] = form['periods']
|
||||
#ctx['periods'] = form['periods'][0][2]
|
||||
|
||||
else:
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
##
|
||||
#
|
||||
self.query = self.pool.get('account.move.line')._query_get(self.cr, self.uid, context=ctx)
|
||||
if account and account.child_consol_ids: # add ids of consolidated childs also of selected account
|
||||
ctx['consolidate_childs'] = True
|
||||
ctx['account_id'] = account.id
|
||||
ids_acc = self.pool.get('account.account').search(self.cr, self.uid, [('parent_id', 'child_of', [account.id])], context=ctx)
|
||||
for child_id in ids_acc:
|
||||
child_account = self.pool.get('account.account').browse(self.cr, self.uid, child_id)
|
||||
sold_account = self._sum_solde_account(child_account, form)
|
||||
self.sold_accounts[child_account.id] = sold_account
|
||||
if form['display_account'] == 'bal_mouvement':
|
||||
if child_account.type != 'view' \
|
||||
and len(self.pool.get('account.move.line').search(self.cr, self.uid,
|
||||
[('account_id','=',child_account.id)],
|
||||
context=ctx)) <> 0 :
|
||||
res.append(child_account)
|
||||
elif form['display_account'] == 'bal_solde':
|
||||
if child_account.type != 'view' \
|
||||
and len(self.pool.get('account.move.line').search(self.cr, self.uid,
|
||||
[('account_id','=',child_account.id)],
|
||||
context=ctx)) <> 0 :
|
||||
if ( sold_account <> 0.0):
|
||||
res.append(child_account)
|
||||
else:
|
||||
if child_account.type != 'view' \
|
||||
and len(self.pool.get('account.move.line').search(self.cr, self.uid,
|
||||
[('account_id','>=',child_account.id)],
|
||||
context=ctx)) <> 0 :
|
||||
res.append(child_account)
|
||||
##
|
||||
if not len(res):
|
||||
|
||||
return [account]
|
||||
else:
|
||||
## We will now compute solde initiaux
|
||||
for move in res:
|
||||
SOLDEINIT = "SELECT SUM(l.debit) AS sum_debit,"\
|
||||
" SUM(l.credit) AS sum_credit "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s "\
|
||||
"AND l.date < %s AND l.date > %s"
|
||||
self.cr.execute(SOLDEINIT, (move.id, self.borne_date['max_date'], self.borne_date['min_date']))
|
||||
resultat = self.cr.dictfetchall()
|
||||
if resultat[0] :
|
||||
if resultat[0]['sum_debit'] == None:
|
||||
sum_debit = 0
|
||||
else:
|
||||
sum_debit = resultat[0]['sum_debit']
|
||||
if resultat[0]['sum_credit'] == None:
|
||||
sum_credit = 0
|
||||
else:
|
||||
sum_credit = resultat[0]['sum_credit']
|
||||
|
||||
move.init_credit = sum_credit
|
||||
move.init_debit = sum_debit
|
||||
|
||||
else:
|
||||
move.init_credit = 0
|
||||
move.init_debit = 0
|
||||
|
||||
|
||||
return res
|
||||
|
||||
def lines(self, account, form):
|
||||
""" Return all the account_move_line of account with their account code counterparts """
|
||||
|
||||
# First compute all counterpart strings for every move_id where this account appear
|
||||
sql = """
|
||||
SELECT m1.move_id,
|
||||
array_to_string(ARRAY(SELECT DISTINCT a.code FROM account_move_line m2 LEFT JOIN account_account a ON (m2.account_id=a.id) WHERE m2.move_id = m1.move_id AND m2.account_id<>%%s), ', ') AS counterpart
|
||||
FROM (SELECT move_id FROM account_move_line l WHERE %s AND l.account_id = %%s AND l.date<=%%s AND l.date>=%%s GROUP BY move_id) m1
|
||||
""" % self.query
|
||||
self.cr.execute(sql, (account.id, account.id, self.date_borne['max_date'], self.date_borne['min_date']))
|
||||
counterpart_res = self.cr.dictfetchall()
|
||||
counterpart_accounts = {}
|
||||
for i in counterpart_res:
|
||||
counterpart_accounts[i['move_id']]=i['counterpart']
|
||||
del counterpart_res
|
||||
|
||||
# Then select all account_move_line of this account
|
||||
if form['sortbydate'] == 'sort_date':
|
||||
sql_sort='l.date'
|
||||
else:
|
||||
sql_sort='j.code'
|
||||
sql = """
|
||||
SELECT l.id, l.date, j.code, l.amount_currency,l.ref, l.name, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit, l.period_id, l.partner_id,
|
||||
m.name AS move_name, m.id AS move_id,
|
||||
c.code AS currency_code,
|
||||
i.id AS invoice_id, i.type AS invoice_type, i.number AS invoice_number,
|
||||
p.name AS partner_name
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_move m on (l.move_id=m.id)
|
||||
LEFT JOIN res_currency c on (l.currency_id=c.id)
|
||||
LEFT JOIN res_partner p on (l.partner_id=p.id)
|
||||
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 AND l.date<=%%s AND l.date>=%%s ORDER by %s
|
||||
""" % (self.query, sql_sort)
|
||||
self.cr.execute(sql, (account.id, self.date_borne['max_date'], self.date_borne['min_date']))
|
||||
res = self.cr.dictfetchall()
|
||||
account_sum = 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
inv_types = { 'out_invoice': 'CI', 'in_invoice': 'SI', 'out_refund': 'OR', 'in_refund': 'SR', }
|
||||
|
||||
for l in res:
|
||||
l['move']=l['move_name']
|
||||
if l['invoice_id']:
|
||||
l['ref'] = '%s: %s'%(inv_types[l['invoice_type']], l['invoice_number'])
|
||||
l['partner'] = l['partner_name'] or ''
|
||||
account_sum = l['debit'] - l ['credit']
|
||||
#c = time.strptime(l['date'],"%Y-%m-%d")
|
||||
#l['date'] = time.strftime("%d-%m-%Y",c)
|
||||
l['progress'] = account_sum
|
||||
l['line_corresp'] = counterpart_accounts[l['move_id']]
|
||||
# Modification du amount Currency
|
||||
if l['credit'] > 0:
|
||||
if l['amount_currency'] != None:
|
||||
l['amount_currency'] = abs(l['amount_currency']) * -1
|
||||
if l['amount_currency'] != None:
|
||||
self.tot_currency = self.tot_currency + l['amount_currency']
|
||||
return res
|
||||
|
||||
def _sum_debit_account(self, account, form):
|
||||
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
## Add solde init to the result
|
||||
#
|
||||
sum_debit = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('soldeinit', False):
|
||||
sum_debit += account.init_debit
|
||||
#
|
||||
##
|
||||
return sum_debit
|
||||
|
||||
def _sum_credit_account(self, account, form):
|
||||
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
## Add solde init to the result
|
||||
#
|
||||
sum_credit = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('soldeinit', False):
|
||||
sum_credit += account.init_credit
|
||||
#
|
||||
##
|
||||
|
||||
return sum_credit
|
||||
|
||||
def _sum_solde_account(self, account, form):
|
||||
self.cr.execute("SELECT (sum(debit) - sum(credit)) as tot_solde "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s"%(account.id, self.query))
|
||||
sum_solde = self.cr.fetchone()[0] or 0.0
|
||||
if form.get('soldeinit', False):
|
||||
sum_solde += account.init_debit - account.init_credit
|
||||
|
||||
return sum_solde
|
||||
|
||||
def _sum_debit(self, form):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id IN %s AND "+self.query,
|
||||
(tuple(self.child_ids),))
|
||||
sum_debit = self.cr.fetchone()[0] or 0.0
|
||||
return sum_debit
|
||||
|
||||
def _sum_credit(self, form):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id IN %s AND "+self.query,
|
||||
(tuple(self.child_ids),))
|
||||
## Add solde init to the result
|
||||
#
|
||||
sum_credit = self.cr.fetchone()[0] or 0.0
|
||||
return sum_credit
|
||||
|
||||
def _sum_solde(self, form):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
self.cr.execute("SELECT (sum(debit) - sum(credit)) as tot_solde "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id IN %s AND "+self.query,
|
||||
(tuple(self.child_ids),))
|
||||
sum_solde = self.cr.fetchone()[0] or 0.0
|
||||
return sum_solde
|
||||
|
||||
def _set_get_account_currency_code(self, account_id):
|
||||
self.cr.execute("SELECT c.code as code "\
|
||||
"FROM res_currency c,account_account as ac "\
|
||||
"WHERE ac.id = %s AND ac.currency_id = c.id"%(account_id))
|
||||
result = self.cr.fetchone()
|
||||
if result:
|
||||
self.account_currency = result[0]
|
||||
else:
|
||||
self.account_currency = False
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
self._set_get_account_currency_code(account.id)
|
||||
self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
|
||||
total = self.cr.fetchone()
|
||||
|
||||
if self.account_currency:
|
||||
return_field = str(total[0]) + self.account_currency
|
||||
return return_field
|
||||
else:
|
||||
currency_total = self.tot_currency = 0.0
|
||||
return currency_total
|
||||
|
||||
report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/general_ledger.rml', parser=general_ledger, header=False)
|
||||
report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/general_ledger_landscape.rml', parser=general_ledger, header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,199 +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="57.0" y1="57.0" width="481" height="728"/>
|
||||
<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>
|
||||
<drawString x="16.7cm" y="28.1cm">General Ledger - [[ company.currency_id.name ]]</drawString>
|
||||
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>0.88cm 27.7cm 20.12cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="tbl_content">
|
||||
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<initialize>
|
||||
<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" 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="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="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="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"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="14.0" leading="17"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="10.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" alignment="LEFT" fontSize="12.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica-Bold" fontSize="8.5"/>
|
||||
<paraStyle name="Account" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
<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">Mvt</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit</para></td>
|
||||
<td><para style="P4">Crebit</para></td>
|
||||
<td><para style="P9">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<blockTable colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="280.0,100.0,52.5,52.5,52.5" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code or '']] [[ o.name or '']]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_solde_account(o, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(o, data['form']), 'line') ]] <font>[[ formatLang(line['date'],date=True) ]]</font></para></td>
|
||||
<td><para style="P3">[[ line['partner'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['move'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['name'] or '' ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<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') ]]
|
||||
<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">Mvt</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit</para></td>
|
||||
<td><para style="P4">Crebit</para></td>
|
||||
<td><para style="P4">Balance</para></td>
|
||||
<td><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<blockTable colWidths="72.0,93.0,65.0,40.0,89.0,49.0,49.0,49.0,40.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="260.00,93.0,49.0,49.0,48.0,40.00" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code or '' ]] [[ o.name or '' ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_solde_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u> [[ formatLang(sum_currency_amount_account(a, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(o, data['form']), 'line') ]] <font>[[ formatLang(line['date'],date=True) ]]</font></para></td>
|
||||
<td><para style="P3">[[ line['partner'] or '' ]]</para></td>
|
||||
<td><para style="P3">[[ line['ref'] or '']]</para></td>
|
||||
<td><para style="P3">[[ line['move'] or '' ]]</para></td>
|
||||
<td><para style="P3">[[ line['name'] or '' ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['amount_currency'] or 0.00) ]] [[ line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
</story>
|
||||
|
||||
|
||||
|
||||
</document>
|
||||
@@ -1,207 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(1120.5,767.8)" title="Test" author="Martin Simon" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="31.0" width="1080" height="680"/>
|
||||
<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.3cm" y="25.50cm">[[ company.name ]]</drawString>
|
||||
<drawString x="35.00cm" y="25.50cm">General Ledger - [[ company.currency_id.name ]]</drawString>
|
||||
|
||||
<!--COL 2-->
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.3cm" y="0.90cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="37.20cm" y="0.90cm">Page <pageNumber/></drawString>
|
||||
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1.3cm 24.9cm 38.3cm 24.9cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="tbl_header">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="tbl_content">
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,0" stop="0,0"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<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" 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="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="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="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"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="11.0" leading="14"/>
|
||||
<paraStyle name="P12" fontName="Helvetica" fontSize="14.0" leading="17"/>
|
||||
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="10.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P15" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P16" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P17" fontName="Helvetica" alignment="LEFT" fontSize="12.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica-Bold" fontSize="8.5"/>
|
||||
<paraStyle name="Account" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para>[[ repeatIn(objects, 'a') ]]</para>
|
||||
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,335.0,50.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="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Ref</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Mvt</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Debit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Credit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Currency</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
|
||||
<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,335.0,50.0,69.0,72.0,64.0,58.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">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang(sum_solde_account(o, data['form'])) ]]</u></para></td>
|
||||
<td><para style="P9b"><u> [[ formatLang(sum_currency_amount_account(o, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P2_content">[[ repeatIn(lines(o, data['form']), 'line') ]]<font> [[ formatLang(line['date'],date=True) ]]</font></para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or 0.00)]] [[ line['currency_code'] ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</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') ]]
|
||||
<tr>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="date">Date</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">JNRL</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Partner</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Ref</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P2">Mvt</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P3">Counterpart</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Debit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Credit</para></td>
|
||||
<td><para style="P12"><font color="white"> </font></para><para style="P4">Balance</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
|
||||
<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') ]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="405.0,435.0,69.0,72.0,64.0" style="Table5">
|
||||
<tr>
|
||||
<td><para style="Standard">[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o, data['form']))]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form']))]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_solde_account(o, data['form'])) ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P2_content">[[ repeatIn(lines(o, data['form']), 'line') ]]<font>[[ formatLang(line['date'],date=True) ]]</font></para></td>
|
||||
<td><para style="P2_content">[[ line['code'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['partner'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['ref'] ]]</para></td>
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['name'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,475 +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 pooler
|
||||
import time
|
||||
import re
|
||||
import datetime
|
||||
from report import report_sxw
|
||||
|
||||
class partner_balance(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(partner_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.date_lst = []
|
||||
self.account_ids = ''
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'sum_litige': self._sum_litige,
|
||||
'sum_sdebit': self._sum_sdebit,
|
||||
'sum_scredit': self._sum_scredit,
|
||||
'solde_debit': self._solde_balance_debit,
|
||||
'solde_credit': self._solde_balance_credit,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
'comma_me' : self.comma_me,
|
||||
})
|
||||
## Compute account list one time
|
||||
#
|
||||
# Date Management
|
||||
#
|
||||
def date_range(self, start, end):
|
||||
if not start or not end:
|
||||
return []
|
||||
start = datetime.date.fromtimestamp(time.mktime(time.strptime(start,"%Y-%m-%d")))
|
||||
end = datetime.date.fromtimestamp(time.mktime(time.strptime(end,"%Y-%m-%d")))
|
||||
full_str_date = []
|
||||
#
|
||||
r = (end+datetime.timedelta(days=1)-start).days
|
||||
#
|
||||
date_array = [start+datetime.timedelta(days=i) for i in range(r)]
|
||||
for date in date_array:
|
||||
full_str_date.append(str(date))
|
||||
return full_str_date
|
||||
|
||||
def transform_period_into_date_array(self, data):
|
||||
## Get All Period Date
|
||||
#
|
||||
# If we have no period we will take all perdio in the FiscalYear.
|
||||
if not data['form']['periods']:
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods']
|
||||
date_array = []
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start, period_obj.date_stop)
|
||||
self.date_lst = date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
def transform_date_into_date_array(self, data):
|
||||
return_array = self.date_range(data['form']['date1'], data['form']['date2'])
|
||||
self.date_lst = return_array
|
||||
self.date_lst.sort()
|
||||
|
||||
def transform_both_into_date_array(self, data):
|
||||
final_date_array = []
|
||||
date_start_date = data['form']['date1']
|
||||
date_stop_date = data['form']['date2']
|
||||
if not data['form']['periods']:
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods']
|
||||
date_array = []
|
||||
if periods_id:
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start, period_obj.date_stop)
|
||||
period_start_date = date_array[0]
|
||||
period_stop_date = date_array[-1]
|
||||
|
||||
if period_start_date<date_start_date:
|
||||
start_date = period_start_date
|
||||
else :
|
||||
start_date = date_start_date
|
||||
|
||||
if date_stop_date<period_stop_date:
|
||||
stop_date = period_stop_date
|
||||
else :
|
||||
stop_date = date_stop_date
|
||||
|
||||
final_date_array = final_date_array + self.date_range(start_date, stop_date)
|
||||
self.date_lst = final_date_array
|
||||
self.date_lst.sort()
|
||||
else :
|
||||
final_date_array = final_date_array + self.date_range(date_start_date, date_stop_date)
|
||||
self.date_lst = final_date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
def transform_none_into_date_array(self, data):
|
||||
|
||||
sql = "SELECT min(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
start_date = self.cr.fetchone()[0]
|
||||
|
||||
sql = "SELECT max(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
stop_date = self.cr.fetchone()[0]
|
||||
|
||||
|
||||
array = []
|
||||
array = array + self.date_range(start_date, stop_date)
|
||||
self.date_lst = array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
def comma_me(self, amount):
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
else :
|
||||
amount = str(amount)
|
||||
if (amount == '0'):
|
||||
return ' '
|
||||
orig = amount
|
||||
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
|
||||
if orig == new:
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
|
||||
def set_context(self, objects, data, ids, report_type = None):
|
||||
# Transformation des date
|
||||
#
|
||||
#
|
||||
if data['form']['state'] == 'none':
|
||||
|
||||
self.transform_none_into_date_array(data)
|
||||
elif data['form']['state'] == 'bydate':
|
||||
|
||||
self.transform_date_into_date_array(data)
|
||||
elif data['form']['state'] == 'byperiod':
|
||||
|
||||
self.transform_period_into_date_array(data)
|
||||
elif data['form']['state'] == 'all':
|
||||
|
||||
self.transform_both_into_date_array(data)
|
||||
|
||||
|
||||
## Compute Code
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
#
|
||||
if (data['form']['result_selection'] == 'customer' ):
|
||||
self.ACCOUNT_TYPE = ('receivable',)
|
||||
elif (data['form']['result_selection'] == 'supplier'):
|
||||
self.ACCOUNT_TYPE = ('payable',)
|
||||
else:
|
||||
self.ACCOUNT_TYPE = ('payable','receivable')
|
||||
#
|
||||
self.cr.execute("SELECT a.id " \
|
||||
"FROM account_account a " \
|
||||
"LEFT JOIN account_account_type t " \
|
||||
"ON (a.type = t.code) " \
|
||||
"WHERE a.company_id = %s " \
|
||||
"AND a.type IN %s " \
|
||||
"AND a.active", (data['form']['company_id'], self.ACCOUNT_TYPE))
|
||||
self.account_ids = [a for (a,) in self.cr.fetchall()]
|
||||
|
||||
super(partner_balance, self).set_context(objects, data, ids, report_type)
|
||||
|
||||
def lines(self,data):
|
||||
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
full_account = []
|
||||
result_tmp = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT p.ref,l.account_id,ac.name as account_name,ac.code as code ,p.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 l.date IN %s " \
|
||||
"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 l.date IN %s " \
|
||||
"AND ac.company_id = %s " \
|
||||
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
|
||||
"ORDER BY l.account_id,p.name",
|
||||
(tuple(self.date_lst), self.ACCOUNT_TYPE, tuple(self.date_lst), data['form']['company_id']))
|
||||
res = self.cr.dictfetchall()
|
||||
for r in res:
|
||||
full_account.append(r)
|
||||
|
||||
## We will now compute Total
|
||||
return self._add_subtotal(full_account)
|
||||
|
||||
def _add_subtotal(self, cleanarray):
|
||||
i=0
|
||||
completearray = []
|
||||
tot_debit = 0.0
|
||||
tot_credit = 0.0
|
||||
tot_scredit = 0.0
|
||||
tot_sdebit = 0.0
|
||||
tot_enlitige = 0.0
|
||||
for r in cleanarray:
|
||||
# For the first element we always add the line
|
||||
# type = 1 is the line is the first of the account
|
||||
# type = 2 is an other line of the account
|
||||
if i==0:
|
||||
# We add the first as the header
|
||||
#
|
||||
##
|
||||
new_header = {}
|
||||
new_header['ref'] = ''
|
||||
new_header['name'] = r['account_name']
|
||||
new_header['code'] = r['code']
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
##
|
||||
completearray.append(new_header)
|
||||
#
|
||||
r['type'] = 1
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
completearray.append(r)
|
||||
#
|
||||
tot_debit = r['debit']
|
||||
tot_credit = r['credit']
|
||||
tot_scredit = r['scredit']
|
||||
tot_sdebit = r['sdebit']
|
||||
tot_enlitige = (r['enlitige'] or 0.0)
|
||||
#
|
||||
else:
|
||||
if cleanarray[i]['account_id'] <> cleanarray[i-1]['account_id']:
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
# we reset the counter
|
||||
tot_debit = r['debit']
|
||||
tot_credit = r['credit']
|
||||
tot_scredit = r['scredit']
|
||||
tot_sdebit = r['sdebit']
|
||||
tot_enlitige = (r['enlitige'] or 0.0)
|
||||
#
|
||||
##
|
||||
new_header = {}
|
||||
new_header['ref'] = ''
|
||||
new_header['name'] = r['account_name']
|
||||
new_header['code'] = r['code']
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
##
|
||||
##
|
||||
|
||||
completearray.append(new_header)
|
||||
##
|
||||
#
|
||||
r['type'] = 1
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
if cleanarray[i]['account_id'] == cleanarray[i-1]['account_id']:
|
||||
# we reset the counter
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
new_header['type'] = 3
|
||||
|
||||
tot_debit = tot_debit + r['debit']
|
||||
tot_credit = tot_credit + r['credit']
|
||||
tot_scredit = tot_scredit + r['scredit']
|
||||
tot_sdebit = tot_sdebit + r['sdebit']
|
||||
tot_enlitige = tot_enlitige + (r['enlitige'] or 0.0)
|
||||
|
||||
new_header['debit'] = tot_debit
|
||||
new_header['credit'] = tot_credit
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
new_header['balance'] = float(tot_sdebit) - float(tot_scredit)
|
||||
|
||||
#
|
||||
r['type'] = 2
|
||||
#
|
||||
r['balance'] = float(r['sdebit']) - float(r['scredit'])
|
||||
#
|
||||
|
||||
completearray.append(r)
|
||||
|
||||
i = i + 1
|
||||
|
||||
return completearray
|
||||
|
||||
|
||||
def _sum_debit(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
temp_res = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND l.date IN %s",
|
||||
(tuple(self.account_ids), tuple(self.date_lst)))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
result_tmp = result_tmp + temp_res
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_credit(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
|
||||
result_tmp = 0.0
|
||||
temp_res = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND l.date IN %s",
|
||||
(tuple(self.account_ids), tuple(self.date_lst),))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
result_tmp = result_tmp + temp_res
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_litige(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
temp_res = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit-credit) " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND l.date IN %s " \
|
||||
"AND l.blocked=TRUE ",
|
||||
(tuple(self.account_ids), tuple(self.date_lst),))
|
||||
temp_res = float(self.cr.fetchone()[0] or 0.0)
|
||||
result_tmp = result_tmp + temp_res
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_sdebit(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
a = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT CASE WHEN sum(debit) > sum(credit) " \
|
||||
"THEN sum(debit) - sum(credit) " \
|
||||
"ELSE 0 " \
|
||||
"END " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND l.date IN %s " \
|
||||
"GROUP BY l.partner_id",
|
||||
(tuple(self.account_ids), tuple(self.date_lst),))
|
||||
a = self.cr.fetchone()[0]
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _sum_scredit(self, data):
|
||||
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
|
||||
result_tmp = 0.0
|
||||
a = 0.0
|
||||
if self.date_lst:
|
||||
self.cr.execute(
|
||||
"SELECT CASE WHEN sum(debit) < sum(credit) " \
|
||||
"THEN sum(credit) - sum(debit) " \
|
||||
"ELSE 0 " \
|
||||
"END " \
|
||||
"FROM account_move_line AS l " \
|
||||
"WHERE l.account_id IN %s" \
|
||||
"AND l.date IN %s " \
|
||||
"GROUP BY l.partner_id",
|
||||
(tuple(self.account_ids), tuple(self.date_lst),))
|
||||
a = self.cr.fetchone()[0] or 0.0
|
||||
|
||||
if self.cr.fetchone() != None:
|
||||
result_tmp = result_tmp + (a or 0.0)
|
||||
|
||||
else:
|
||||
result_tmp = 0.0
|
||||
|
||||
return result_tmp
|
||||
|
||||
def _solde_balance_debit(self, data):
|
||||
debit, credit = self._sum_debit(data), self._sum_credit(data)
|
||||
return debit > credit and debit - credit
|
||||
|
||||
def _solde_balance_credit(self, data):
|
||||
debit, credit = self._sum_debit(data), self._sum_credit(data)
|
||||
return credit > debit and credit - debit
|
||||
|
||||
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
|
||||
|
||||
report_sxw.report_sxw('report.account.partner.balance', 'res.partner',
|
||||
'account/report/partner_balance.rml',parser=partner_balance,
|
||||
header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,148 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="HipHop.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<!--logo-->
|
||||
<!--<fill color="darkblue"/>-->
|
||||
<!--<stroke color="darkblue"/>-->
|
||||
|
||||
<!--TITLE COMPANY-->
|
||||
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
|
||||
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Partner Balance [[ data['form']['result_selection'] == 'customer' and '/ Débiteur' ]] [[ data['form']['result_selection'] == 'supplier' and '/ Créancier' ]] [[ data['form']['result_selection'] == 'all' and '/ Créancier et Débiteur' ]] [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
|
||||
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,3" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="GRID" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Tableau3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" />
|
||||
<lineStyle kind="OUTLINE" colorName="#e6e6e6" />
|
||||
<blockBackground colorName="white" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<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="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P12a"></para>
|
||||
<blockTable colWidths="61.0,206.0,69.0,68.0,69.0,68.0" repeatRows="1" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">(Account/Partner) Name</para></td>
|
||||
<td><para style="P12b">Debit</para></td>
|
||||
<td><para style="P12b">Credit</para></td>
|
||||
<td><para style="P12b">Balance</para></td>
|
||||
<td><para style="P12b">In dispute</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Grand total</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_debit(data)) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_credit(data)) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang((solde_debit(data)-solde_credit(data))) ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_litige(data)) ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Balance</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_debit(data)) ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_credit(data)) ]]</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P3">[[ repeatIn(lines(data), 'a') ]]<font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) 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>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
@@ -41,6 +41,7 @@ class rml_parse(report_sxw.rml_parse):
|
||||
})
|
||||
|
||||
def comma_me(self,amount):
|
||||
#print "#" + str(amount) + "#"
|
||||
if not amount:
|
||||
amount = 0.0
|
||||
if type(amount) is float :
|
||||
@@ -97,6 +98,7 @@ class rml_parse(report_sxw.rml_parse):
|
||||
try:
|
||||
Stringer = str.encode("utf-16")
|
||||
except UnicodeDecodeError:
|
||||
print "UTF_16 Error"
|
||||
Stringer = str
|
||||
else:
|
||||
return Stringer
|
||||
@@ -118,12 +120,14 @@ class rml_parse(report_sxw.rml_parse):
|
||||
UnicodeAst = []
|
||||
_previouslyfound = False
|
||||
i = 0
|
||||
#print str(ast)
|
||||
while i < len(ast):
|
||||
elem = ast[i]
|
||||
try:
|
||||
Stringer = elem.encode("utf-8")
|
||||
except UnicodeDecodeError:
|
||||
to_reencode = elem + ast[i+1]
|
||||
print str(to_reencode)
|
||||
Good_char = to_reencode.decode('utf-8')
|
||||
UnicodeAst.append(Good_char)
|
||||
i += i +2
|
||||
@@ -135,11 +139,14 @@ class rml_parse(report_sxw.rml_parse):
|
||||
return "".join(UnicodeAst)
|
||||
|
||||
def ReencodeAscii(self,str):
|
||||
print sys.stdin.encoding
|
||||
try:
|
||||
Stringer = str.decode("ascii")
|
||||
except UnicodeEncodeError:
|
||||
print "REENCODING ERROR"
|
||||
return str.encode("ascii")
|
||||
except UnicodeDecodeError:
|
||||
print "DECODING ERROR"
|
||||
return str.encode("ascii")
|
||||
|
||||
else:
|
||||
|
||||
@@ -1,452 +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 pooler
|
||||
import time
|
||||
import re
|
||||
import rml_parse
|
||||
import datetime
|
||||
from report import report_sxw
|
||||
|
||||
class third_party_ledger(rml_parse.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
self.date_lst = []
|
||||
self.date_lst_string = ''
|
||||
super(third_party_ledger, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'lines': self.lines,
|
||||
'sum_debit_partner': self._sum_debit_partner,
|
||||
'sum_credit_partner': self._sum_credit_partner,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit,
|
||||
'get_company': self._get_company,
|
||||
'get_currency': self._get_currency,
|
||||
'comma_me' : self.comma_me,
|
||||
})
|
||||
def date_range(self, start, end):
|
||||
if not start or not end:
|
||||
return []
|
||||
start = datetime.date.fromtimestamp(time.mktime(time.strptime(start,"%Y-%m-%d")))
|
||||
end = datetime.date.fromtimestamp(time.mktime(time.strptime(end,"%Y-%m-%d")))
|
||||
full_str_date = []
|
||||
#
|
||||
r = (end+datetime.timedelta(days=1)-start).days
|
||||
#
|
||||
date_array = [start+datetime.timedelta(days=i) for i in range(r)]
|
||||
for date in date_array:
|
||||
full_str_date.append(str(date))
|
||||
return full_str_date
|
||||
|
||||
#
|
||||
def transform_period_into_date_array(self, data):
|
||||
## Get All Period Date
|
||||
if not data['form']['periods']:
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods']
|
||||
date_array = []
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start, period_obj.date_stop)
|
||||
self.date_lst = date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
def transform_date_into_date_array(self,data):
|
||||
return_array = self.date_range(data['form']['date1'], data['form']['date2'])
|
||||
self.date_lst = return_array
|
||||
self.date_lst.sort()
|
||||
|
||||
def transform_both_into_date_array(self,data):
|
||||
|
||||
if not data['form']['periods']:
|
||||
periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])])
|
||||
else:
|
||||
periods_id = data['form']['periods']
|
||||
date_array = []
|
||||
for period_id in periods_id:
|
||||
period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id)
|
||||
date_array = date_array + self.date_range(period_obj.date_start, period_obj.date_stop)
|
||||
|
||||
period_start_date = date_array[0]
|
||||
date_start_date = data['form']['date1']
|
||||
period_stop_date = date_array[-1]
|
||||
date_stop_date = data['form']['date2']
|
||||
|
||||
if period_start_date<date_start_date:
|
||||
start_date = period_start_date
|
||||
else :
|
||||
start_date = date_start_date
|
||||
|
||||
if date_stop_date<period_stop_date:
|
||||
stop_date = period_stop_date
|
||||
else :
|
||||
stop_date = date_stop_date
|
||||
final_date_array = []
|
||||
final_date_array = final_date_array + self.date_range(start_date, stop_date)
|
||||
self.date_lst = final_date_array
|
||||
self.date_lst.sort()
|
||||
|
||||
def transform_none_into_date_array(self, data):
|
||||
sql = "SELECT min(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
start_date = self.cr.fetchone()[0]
|
||||
sql = "SELECT max(date) as start_date from account_move_line"
|
||||
self.cr.execute(sql)
|
||||
stop_date = self.cr.fetchone()[0]
|
||||
array= []
|
||||
array = array + self.date_range(start_date, stop_date)
|
||||
self.date_lst = array
|
||||
self.date_lst.sort()
|
||||
|
||||
|
||||
def comma_me(self, amount):
|
||||
if type(amount) is float :
|
||||
amount = str('%.2f'%amount)
|
||||
else :
|
||||
amount = str(amount)
|
||||
if (amount == '0'):
|
||||
return ' '
|
||||
orig = amount
|
||||
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
|
||||
if orig == new:
|
||||
return new
|
||||
else:
|
||||
return self.comma_me(new)
|
||||
def special_map(self):
|
||||
string_map = ''
|
||||
for date_string in self.date_lst:
|
||||
string_map = date_string + ','
|
||||
return string_map
|
||||
|
||||
def set_context(self, objects, data, ids, report_type = None):
|
||||
PARTNER_REQUEST = ''
|
||||
if (data['model'] == 'res.partner'):
|
||||
## Si on imprime depuis les partenaires
|
||||
if ids:
|
||||
#PARTNER_REQUEST = "AND line.partner_id IN (" + ','.join(map(str, ids)) + ")"
|
||||
PARTNER_REQUEST = "AND line.partner_id IN %s",(tuple(ids),)
|
||||
# Transformation des date
|
||||
#
|
||||
#
|
||||
# if data['form']['fiscalyear']:
|
||||
# self.transform_period_into_date_array(data)
|
||||
# else:
|
||||
# self.transform_date_into_date_array(data)
|
||||
##
|
||||
if data['form']['state'] == 'none':
|
||||
self.transform_none_into_date_array(data)
|
||||
elif data['form']['state'] == 'bydate':
|
||||
self.transform_date_into_date_array(data)
|
||||
elif data['form']['state'] == 'byperiod':
|
||||
self.transform_period_into_date_array(data)
|
||||
elif data['form']['state'] == 'all':
|
||||
self.transform_both_into_date_array(data)
|
||||
|
||||
self.date_lst_string = ''
|
||||
if self.date_lst:
|
||||
self.date_lst_string = '\'' + '\',\''.join(map(str, self.date_lst)) + '\''
|
||||
#
|
||||
#new_ids = [id for (id,) in self.cr.fetchall()]
|
||||
if data['form']['result_selection'] == 'supplier':
|
||||
self.ACCOUNT_TYPE = ['payable']
|
||||
elif data['form']['result_selection'] == 'customer':
|
||||
self.ACCOUNT_TYPE = ['receivable']
|
||||
elif data['form']['result_selection'] == 'all':
|
||||
self.ACCOUNT_TYPE = ['payable','receivable']
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT a.id " \
|
||||
"FROM account_account a " \
|
||||
"LEFT JOIN account_account_type t " \
|
||||
"ON (a.type=t.code) " \
|
||||
"WHERE a.company_id = %s " \
|
||||
'AND a.type IN %s' \
|
||||
"AND a.active", (data['form']['company_id'],tuple(self.ACCOUNT_TYPE)))
|
||||
self.account_ids = [a for (a,) in self.cr.fetchall()]
|
||||
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
partner_to_use = []
|
||||
|
||||
if self.date_lst and data['form']['soldeinit'] :
|
||||
|
||||
self.cr.execute(
|
||||
"SELECT DISTINCT line.partner_id " \
|
||||
"FROM account_move_line AS line, account_account AS account " \
|
||||
"WHERE line.partner_id IS NOT NULL " \
|
||||
"AND line.account_id = account.id " \
|
||||
"AND line.date >= %s " \
|
||||
"AND line.date <= %s " \
|
||||
"AND line.reconcile_id IS NULL " \
|
||||
"AND line.account_id IN %s" \
|
||||
" " + PARTNER_REQUEST + " " \
|
||||
"AND account.company_id = %s " \
|
||||
"AND account.active " ,
|
||||
(self.date_lst[0],self.date_lst[len(self.date_lst)-1],tuple(self.account_ids),data['form']['company_id'],))
|
||||
# else:
|
||||
#
|
||||
# self.cr.execute(
|
||||
# "SELECT DISTINCT line.partner_id " \
|
||||
# "FROM account_move_line AS line, account_account AS account " \
|
||||
# "WHERE line.partner_id IS NOT NULL " \
|
||||
# "AND line.account_id = account.id " \
|
||||
# "AND line.date IN (" + self.date_lst_string + ") " \
|
||||
# "AND line.account_id IN (" + self.account_ids + ") " \
|
||||
# " " + PARTNER_REQUEST + " " \
|
||||
# "AND account.company_id = %s " \
|
||||
# "AND account.active " ,
|
||||
# (data['form']['company_id']))
|
||||
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
for res_line in res:
|
||||
partner_to_use.append(res_line['partner_id'])
|
||||
new_ids = partner_to_use
|
||||
|
||||
#self.partner_ids = ','.join(map(str, new_ids))
|
||||
self.partner_ids = new_ids
|
||||
objects = self.pool.get('res.partner').browse(self.cr, self.uid, new_ids)
|
||||
super(third_party_ledger, self).set_context(objects, data, new_ids, report_type)
|
||||
|
||||
def lines(self, partner,data):
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
full_account = []
|
||||
if data['form']['reconcil'] :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND l.reconcile_id IS NULL"
|
||||
|
||||
# if data['form']['soldeinit'] :
|
||||
#
|
||||
# self.cr.execute(
|
||||
# "SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \
|
||||
# "FROM account_move_line l " \
|
||||
# "LEFT JOIN account_journal j " \
|
||||
# "ON (l.journal_id = j.id) " \
|
||||
# "WHERE l.partner_id = %s " \
|
||||
# "AND l.account_id IN (" + self.account_ids + ") " \
|
||||
# "AND l.date <= %s " \
|
||||
# "AND l.reconcile_id IS NULL "
|
||||
# "ORDER BY l.id",
|
||||
# (partner.id, self.date_lst[0]))
|
||||
# res = self.cr.dictfetchall()
|
||||
# print"----res----",res
|
||||
# sum = 0.0
|
||||
# for r in res:
|
||||
# sum = r['debit'] - r['credit']
|
||||
# r['progress'] = sum
|
||||
# full_account.append(r)
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \
|
||||
"FROM account_move_line l " \
|
||||
"LEFT JOIN account_journal j " \
|
||||
"ON (l.journal_id = j.id) " \
|
||||
"WHERE l.partner_id = %s " \
|
||||
"AND l.account_id IN %s"\
|
||||
"AND l.date IN (" + self.date_lst_string + ")"
|
||||
" " + RECONCILE_TAG + " "\
|
||||
"ORDER BY l.id",
|
||||
(partner.id, tuple(self.account_ids),))
|
||||
res = self.cr.dictfetchall()
|
||||
sum = 0.0
|
||||
for r in res:
|
||||
sum = r['debit'] - r['credit']
|
||||
r['progress'] = sum
|
||||
full_account.append(r)
|
||||
|
||||
return full_account
|
||||
|
||||
def _sum_debit_partner(self, partner, data):
|
||||
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
if data['form']['reconcil'] :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.date_lst and data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id = %s " \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND date < %s " ,
|
||||
(partner.id, tuple(self.account_ids), self.date_lst[0],))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id = %s " \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND date IN (" + self.date_lst_string + ")" ,
|
||||
(partner.id,tuple(self.account_ids),))
|
||||
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
return result_tmp
|
||||
|
||||
def _sum_credit_partner(self, partner, data):
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
if data['form']['reconcil'] :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.date_lst and data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id=%s " \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND date < %s " ,
|
||||
(partner.id, tuple(self.account_ids), self.date_lst[0],))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id=%s " \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND date IN (" + self.date_lst_string + ")",
|
||||
(partner.id, tuple(self.account_ids),))
|
||||
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
return result_tmp
|
||||
|
||||
def _sum_debit(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
if data['form']['reconcil'] :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.date_lst and data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND date < %s " ,
|
||||
(tuple(self.partner_ids), tuple(self.account_ids), self.date_lst[0],))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT sum(debit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND date IN (" + self.date_lst_string + ")",(tuple(self.partner_ids), tuple(self.account_ids),))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
return result_tmp
|
||||
|
||||
|
||||
def _sum_credit(self, data):
|
||||
if not self.ids:
|
||||
return 0.0
|
||||
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
|
||||
result_tmp = 0.0
|
||||
if data['form']['reconcil'] :
|
||||
RECONCILE_TAG = " "
|
||||
else:
|
||||
RECONCILE_TAG = "AND reconcile_id IS NULL"
|
||||
if self.date_lst and data['form']['soldeinit'] :
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND date < %s " ,
|
||||
(tuple(self.partner_ids), tuple(self.account_ids), self.date_lst[0],))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
if self.date_lst_string:
|
||||
self.cr.execute(
|
||||
"SELECT sum(credit) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE partner_id IN %s" \
|
||||
"AND account_id IN %s" \
|
||||
" " + RECONCILE_TAG + " " \
|
||||
"AND date IN (" + self.date_lst_string + ")",(tuple(self.partner_ids), tuple(self.account_ids),))
|
||||
contemp = self.cr.fetchone()
|
||||
if contemp != None:
|
||||
result_tmp = contemp[0] or 0.0
|
||||
else:
|
||||
result_tmp = result_tmp + 0.0
|
||||
|
||||
return result_tmp
|
||||
|
||||
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
|
||||
|
||||
report_sxw.report_sxw('report.account.third_party_ledger', 'res.partner',
|
||||
'addons/account/report/third_party_ledger.rml',parser=third_party_ledger,
|
||||
header=False)
|
||||
|
||||
report_sxw.report_sxw('report.account.third_party_ledger_other', 'res.partner',
|
||||
'addons/account/report/third_party_ledger_other.rml',parser=third_party_ledger,
|
||||
header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,204 +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="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<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" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<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="Heading" fontName="Helvetica" fontSize="12.0" leading="15" 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="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-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_Bold_Right_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" 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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<blockTable colWidths="539.0" style="Table_header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table_header_1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="314.0,77.0,75.0,74.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,212 +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="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_1">
|
||||
<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="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
|
||||
</blockTableStyle>
|
||||
<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" textColor="#000000"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<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="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="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-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_Bold_9_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<blockTable colWidths="482.0" style="Table_title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">Third Party Ledger</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table_header_1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">JNRL</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Ref.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Entry Label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance Brought Forward</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">[[ formatLang((sum_debit(data) - sum_credit(data))) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P4">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
|
||||
<blockTable colWidths="280.0,68.0,67.0,66.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><u>[[ formatLang((sum_debit_partner(p,data) - sum_credit_partner(p,data))) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P1">[[ repeatIn(lines(p,data), 'line') ]]</para>
|
||||
<blockTable colWidths="58.0,26.0,40.0,156.0,68.0,67.0,66.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ formatLang(line['date'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['ref'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">[[ line['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]]</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>
|
||||
</story>
|
||||
</document>
|
||||
@@ -170,7 +170,7 @@
|
||||
<para style="P12">Dated :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P13">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
|
||||
<para style="P13">[[ formatLang(voucher.date, date=True) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,191 +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="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">Print Journal - [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<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="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="CENTER" 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" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10a" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10b" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P13" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER"/>
|
||||
<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="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" 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"/>
|
||||
<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_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" 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_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_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="6.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="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="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_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_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="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<para style="terp_default_8">[[repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2],data['form']['sort_selection']), 'line') ]]</para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10a">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Voucher No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">A/c No.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Third party</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Entry label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Credit</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[ line[0].period_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11a">[[line[0].journal_id.code ]]</para></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ formatLang(sum_debit(line[0].period_id.id, line[0].journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ formatLang(sum_credit(line[0].period_id.id, line[0].journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
</tr >
|
||||
<tr>
|
||||
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ formatLang(l.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ l.ref ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ l.account_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ l.partner_id and l.partner_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ formatLang(l.debit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ formatLang(l.credit) ]]</para>
|
||||
</td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,247 +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="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Central Journal-[[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_header_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Header_Content">
|
||||
<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="LINEAFTER" 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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Subheader_Content_detail">
|
||||
<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="LINEAFTER" 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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Account_detail_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Line_Content">
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-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="Heading" fontName="Helvetica" fontSize="12.0" leading="15" 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="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<!--blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">[[ company.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">Central Journal-[[ company.currency_id.name ]]</para>
|
||||
</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">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2]), 'line') ]]</para>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Journal Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Journal Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Printing Date</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Subheader_Content_detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ line[0]['journal'].code or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ line[0]['journal'].name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="83.0,272.0,95.0,89.0" style="Table_Account_detail_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Account Num.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Account Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit(line[0]['period'].id, line[0]['journal'].id)) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit(line[0]['period'].id, line[0]['journal'].id)) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Journal_Line_Content">
|
||||
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l['debit']) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l['credit']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -1,250 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(596.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">General Journal - [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Header_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Print_Current_datetime">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Title">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Final_Total">
|
||||
<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"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Sub_Total">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,0" stop="2,2"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="white" start="0,1" stop="-1,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Journal_Detail">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</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="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<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-Bold" fontSize="9.0" leading="11" alignment="CENTER" 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_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="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_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"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<!--blockTable colWidths="180.0,180.0,180.0" style="Table_Header_Title">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">[[ company.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header">General Journal - [[ company.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable-->
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="75.0,465.0" style="Table_Print_Current_datetime">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Printing Date :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
|
||||
<blockTable colWidths="61.0,228.0,95.0,80.0,73.0" style="Table_Journal_Title" repeatRows="1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Jrl Code</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Journal Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Period</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Debit Trans.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Credit Trans.</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="64.0,226.0,82.0,82.0,76.0" style="Table_Final_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<para style="terp_default_9"><font>[[ repeatIn( lines( data['form']['period_id'][0][2], data['form']['journal_id'][0][2] ),'line')]]</font></para>
|
||||
<blockTable colWidths="175.0,115.0,82.0,82.0,75.0" style="Table_Sub_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ line[0]['period_name'] ]] :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit_period( line[0]['pid'],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit_period(line[0]['pid'],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="60.0,219.0,88.0,80.0,76.0" style="Table_Journal_Detail">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ repeatIn(line,'l') ]]</para>
|
||||
<para style="terp_default_9">[[ l['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line[0]['period_name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l['debit'])]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(l['credit']) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -2,20 +2,20 @@
|
||||
<openerp><data>
|
||||
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="name">Finance / Invoice</field>
|
||||
<field name="name">Accounting / Invoice</field>
|
||||
</record>
|
||||
|
||||
<record id="group_account_user" model="res.groups">
|
||||
<field name="name">Finance / Accountant</field>
|
||||
<field name="name">Accounting / Accountant</field>
|
||||
</record>
|
||||
|
||||
<record id="group_account_manager" model="res.groups">
|
||||
<field name="name">Finance / Manager</field>
|
||||
<field name="name">Accounting / Manager</field>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_configuration" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
<!-- <record id="menu_finance_configuration" model="ir.ui.menu">-->
|
||||
<!-- <field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="menu_finance_reporting" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
"access_account_subscription_line","account.subscription.line","model_account_subscription_line","account.group_account_user",1,1,1,1
|
||||
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_account_template","account.account.template","model_account_account_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,0,0,0
|
||||
"access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,1,1,1
|
||||
"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,0,0,0
|
||||
"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_account_user",1,1,1,1
|
||||
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_account_user",1,1,1,1
|
||||
"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,1,1,1
|
||||
"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,0,0,0
|
||||
"access_account_analytic_line","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1
|
||||
"access_report_hr_timesheet_invoice_journal","report.hr.timesheet.invoice.journal","model_report_hr_timesheet_invoice_journal","account.group_account_manager",1,0,0,0
|
||||
"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","base.group_user",1,0,0,0
|
||||
@@ -38,8 +38,8 @@
|
||||
"access_account_invoice_uinvoice","account.invoice","model_account_invoice","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_line_uinvoice","account.invoice.line","model_account_invoice_line","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_invoice",1,1,1,1
|
||||
"access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1
|
||||
"access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,1,1,1
|
||||
"access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_manager",1,0,0,0
|
||||
"access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,0,0,0
|
||||
"access_account_move_line_uinvoice","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1
|
||||
"access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_invoice",1,1,1,1
|
||||
"access_account_journal_period_uinvoice","account.journal.period","model_account_journal_period","account.group_account_invoice",1,1,1,1
|
||||
@@ -52,9 +52,9 @@
|
||||
"access_account_journal_column_manager","account.journal.column","model_account_journal_column","account.group_account_manager",1,1,1,1
|
||||
"access_account_journal_manager","account.journal","model_account_journal","account.group_account_manager",1,1,1,1
|
||||
"access_account_journal_invoice","account.journal invoice","model_account_journal","account.group_account_invoice",1,0,0,0
|
||||
"access_account_period_manager","account.period","model_account_period","account.group_account_manager",1,1,1,1
|
||||
"access_account_period_manager","account.period","model_account_period","account.group_account_manager",1,0,0,0
|
||||
"access_account_period_invoice","account.period invoice","model_account_period","account.group_account_invoice",1,0,0,0
|
||||
"access_account_tax_code_manager","account.tax.code","model_account_tax_code","account.group_account_manager",1,1,1,1
|
||||
"access_account_tax_code_manager","account.tax.code","model_account_tax_code","account.group_account_manager",1,0,0,0
|
||||
"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1
|
||||
"access_account_invoice_group_invoice","account.invoice group invoice","model_account_invoice","account.group_account_invoice",1,1,1,1
|
||||
"access_account_analytic_account_manager","account.analytic.account","analytic.model_account_analytic_account","account.group_account_manager",1,1,1,1
|
||||
@@ -82,15 +82,76 @@
|
||||
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
|
||||
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0
|
||||
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,1,1,1
|
||||
"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0
|
||||
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0
|
||||
"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,0,0,0
|
||||
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0
|
||||
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,0,0,0
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,1,1,1
|
||||
"access_account_account_report_manager","account.account.report","model_account_account_report","account.group_account_manager",1,0,0,0
|
||||
"access_account_entries_report_manager","account.entries.report","model_account_entries_report","account.group_account_manager",1,0,0,0
|
||||
"access_res_partner_group_account_manager","res_partner group_account_manager","model_res_partner","account.group_account_manager",1,1,1,1
|
||||
"access_account_invoice_accountant","account.invoice accountant","model_account_invoice","account.group_account_user",1,0,0,0
|
||||
"access_account_tax_code_accountant","account.tax.code accountant","model_account_tax_code","account.group_account_user",1,1,1,1
|
||||
"access_account_analytic_chart","account.analytic.chart","model_account_analytic_chart","account.group_account_user",1,1,1,1
|
||||
"access_account_move_line_manager","account.move.line manager","model_account_move_line","account.group_account_manager",1,1,1,1
|
||||
"access_account_move_manager","account.move manager","model_account_move","account.group_account_manager",1,0,0,0
|
||||
"access_account_invoice_manager","account.invoice manager","model_account_invoice","account.group_account_manager",1,0,0,0
|
||||
"access_account_bank_statement_manager","account.bank.statement manager","model_account_bank_statement","account.group_account_manager",1,0,0,0
|
||||
"access_account_analytic_chart_manager","account.analytic.chart manager","model_account_analytic_chart","account.group_account_manager",1,0,0,0
|
||||
"access_account_entries_report_manager","account.entries.report","model_account_entries_report","account.group_account_manager",1,1,1,1
|
||||
"access_analytic_entries_report_manager","analytic.entries.report","model_analytic_entries_report","account.group_account_manager",1,0,0,0
|
||||
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,1,1,1
|
||||
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_user",1,0,0,0
|
||||
"access_account_move_line_system","account.move.line system","model_account_move_line","base.group_system",1,0,0,0
|
||||
"access_account_invoice_system","account.invoice system","model_account_invoice","base.group_system",1,0,0,0
|
||||
"access_account_bank_statement_system","account.bank.statement system","model_account_bank_statement","base.group_system",1,0,0,0
|
||||
"access_account_move_system","account.move system","model_account_move","base.group_system",1,0,0,0
|
||||
"access_account_analytic_line_system","account.analytic.line system","model_account_analytic_line","base.group_system",1,0,0,0
|
||||
"access_account_analytic_system","account.analytic.chart system","model_account_analytic_chart","base.group_system",1,0,0,0
|
||||
"access_account_tax_code_system","account.tax.code system","model_account_tax_code","base.group_system",1,1,1,1
|
||||
"access_account_journal_system","account.journal system","model_account_journal","base.group_system",1,1,1,1
|
||||
"access_account_chart_system","account.chart system","model_account_chart","base.group_system",1,0,0,0
|
||||
"access_account_period_system","account.period system","model_account_period","base.group_system",1,1,1,1
|
||||
"access_account_chart_accountant","account.chart accountant","model_account_chart","group_account_user",1,0,0,0
|
||||
"access_account_journal_view_system","account.journal.view system","model_account_journal_view","base.group_system",1,1,1,1
|
||||
"access_account_account_type_system","account.account.type system","model_account_account_type","base.group_system",1,1,1,1
|
||||
"access_account_analytic_journal_system","account.analytic.journal system","model_account_analytic_journal","base.group_system",1,1,1,1
|
||||
"access_account_fiscalyear_system","account.fiscalyear system","model_account_fiscalyear","base.group_system",1,1,1,1
|
||||
"access_account_tax_system","account.tax system","model_account_tax","base.group_system",1,1,1,1
|
||||
"access_account_model_system","account.model system","model_account_model","base.group_system",1,1,1,1
|
||||
"access_account_subscription_system","account.subscription system","model_account_subscription","base.group_system",1,1,1,1
|
||||
"access_account_journal_column_system","account.journal.column system","model_account_journal_column","base.group_system",1,1,1,1
|
||||
"access_account_invoice_report_system","account.invoice.report system","model_account_invoice_report","base.group_system",1,0,0,0
|
||||
"access_account_entries_report_system","account.entries.report system","model_account_entries_report","base.group_system",1,0,0,0
|
||||
"access_analytic_entries_report_system","analytic.entries.report system","model_analytic_entries_report","base.group_system",1,0,0,0
|
||||
"access_account_journal_period_system","account.journal.period system","model_account_journal_period","base.group_system",1,0,0,0
|
||||
"access_account_invoice_tax_system","account.invoice.tax system","model_account_invoice_tax","base.group_system",1,0,0,0
|
||||
"access_account_tax_code_template_system","account.tax.code.template system","model_account_tax_code_template","base.group_system",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_system","account.sequence.fiscalyear system","model_account_sequence_fiscalyear","base.group_system",1,1,1,1
|
||||
"access_account_fiscal_position_system","account.fiscal.position system","model_account_fiscal_position","base.group_system",1,1,1,1
|
||||
"access_account_move_reconcile_system","account.move.reconcile system","model_account_move_reconcile","base.group_system",1,0,0,0
|
||||
"access_account_account_system","account.account system","model_account_account","base.group_system",1,1,1,1
|
||||
"access_account_analytic_system","account.analytic.account system","analytic.model_account_analytic_account","base.group_system",1,1,1,1
|
||||
"access_account_model_line_system","account.model.line system","model_account_model_line","base.group_system",1,1,1,1
|
||||
"access_account_subscription_line_system","account.subscription.line system","model_account_subscription_line","base.group_system",1,1,1,1
|
||||
"access_account_payment_term_system","account.payment.term system","model_account_payment_term","base.group_system",1,1,1,1
|
||||
"access_account_payment_term_line_system","account.payment.term.line system","model_account_payment_term_line","base.group_system",1,1,1,1
|
||||
"access_report_account_receivable_system","report.account.receivable system","model_report_account_receivable","base.group_system",1,1,1,1
|
||||
"access_account_fiscal_position_tax_system","account.fiscal.position.tax system","model_account_fiscal_position_tax","base.group_system",1,1,1,1
|
||||
"access_account_fiscal_position_account_template_system","account.fiscal.position.account.template system","model_account_fiscal_position_account_template","base.group_system",1,1,1,1
|
||||
"access_account_journal_view_invoice","account.journal.view invoice","model_account_journal_view","account.group_account_invoice",1,1,1,1
|
||||
"access_account_fiscal_position_account_system","account.fiscal.position.account system","model_account_fiscal_position_account","base.group_system",1,1,1,1
|
||||
"access_account_journal_column_invoice","account.journal.column invoice","model_account_journal_column","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_tax_manager","account.invoice.tax manager","model_account_invoice_tax","account.group_account_manager",1,0,0,0
|
||||
"access_account_invoice_tax_accountant","account.invoice.tax accountant","model_account_invoice_tax","account.group_account_user",1,0,0,0
|
||||
"access_account_move_reconcile_manager","account.move.reconcile manager","model_account_move_reconcile","account.group_account_manager",1,0,0,0
|
||||
"access_account_analytic_line_invoice","account.analytic.line invoice","model_account_analytic_line","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_line_accountant","account.invoice.line accountant","model_account_invoice_line","account.group_account_user",1,0,0,0
|
||||
"access_res_partner_address_accountant","res.partner.address accountant","base.model_res_partner_address","account.group_account_user",1,0,0,0
|
||||
"access_account_invoice_line_manager","account.invoice.line manager","model_account_invoice_line","account.group_account_manager",1,0,0,0
|
||||
"access_analytic_report_manager","analytic.report manager","model_analytic_report","account.group_account_manager",1,1,1,1
|
||||
"access_account_account_invoice","account.account invoice","model_account_account","account.group_account_invoice",1,1,1,1
|
||||
"access_res_partner_address_invoice","res.partner.address invoice","base.model_res_partner_address","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_line_system","account.invoice.line system","model_account_invoice_line","base.group_system",1,0,0,0
|
||||
"access_account_analytic_accountant","account.analytic.account accountant","analytic.model_account_analytic_account","account.group_account_user",1,1,1,1
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user