@@ -2361,7 +2361,7 @@ class account_chart_template(osv.osv):
|
||||
'property_account_income_categ': fields.many2one('account.account.template','Income Category Account'),
|
||||
'property_account_expense': fields.many2one('account.account.template','Expense Account on Product Template'),
|
||||
'property_account_income': fields.many2one('account.account.template','Income Account on Product Template'),
|
||||
'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Surplus Account', domain=[('type', '=', 'payable')] , help='This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profilt & Loss Report'),
|
||||
'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Profit/Loss Account', domain=[('type', '=', 'payable')] , help='This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profilt & Loss Report'),
|
||||
}
|
||||
|
||||
account_chart_template()
|
||||
|
||||
@@ -1202,7 +1202,7 @@ class account_move_line(osv.osv):
|
||||
tax_sign = 'tax_sign'
|
||||
|
||||
tmp_cnt = 0
|
||||
for tax in tax_obj.compute(cr, uid, [tax_id], total, 1.00):
|
||||
for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00).get('taxes'):
|
||||
#create the base movement
|
||||
if tmp_cnt == 0:
|
||||
if tax[base_code]:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Trial Balance"/>
|
||||
<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"/>
|
||||
|
||||
@@ -566,6 +566,42 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_periodic_form" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank Statement">
|
||||
<group col="7" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1"/>
|
||||
<newline/>
|
||||
<field name="period_id"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="currency" invisible="1"/>
|
||||
<button name="%(action_view_account_statement_from_invoice_lines)d"
|
||||
string="Import Invoices" type="action" icon="gtk-execute"
|
||||
attrs="{'invisible':[('state','=','confirm')]}"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Journal Entries">
|
||||
<field colspan="4" name="move_line_ids" nolabel="1" widget="many2many"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state"/>
|
||||
<field name="balance_end"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
|
||||
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
|
||||
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
@@ -586,8 +622,30 @@
|
||||
<field name="view_id" ref="view_bank_statement_form"/>
|
||||
<field name="act_window_id" ref="action_bank_statement_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_periodic_tree" model="ir.actions.act_window">
|
||||
<field name="name">Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
<field name="context">{'journal_type':'bank'}</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_bank_statement_periodic_tree_bank">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_bank_statement_periodic_form_bank">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_bank_statement_periodic_form"/>
|
||||
<field name="act_window_id" ref="action_bank_statement_periodic_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
|
||||
<menuitem name="Statements Reconciliation" action="action_bank_statement_tree" id="menu_menu_Bank_process" parent="menu_finance_periodical_processing_bank" sequence="7"/>
|
||||
<menuitem name="Statements Reconciliation" action="action_bank_statement_periodic_tree" id="menu_menu_Bank_process" parent="menu_finance_periodical_processing_bank" sequence="7"/>
|
||||
|
||||
|
||||
<record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
|
||||
|
||||
@@ -29,7 +29,7 @@ class res_company(osv.osv):
|
||||
'account.account',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Reserve and Surplus Account",
|
||||
string="Reserve and Profit/Loss Account",
|
||||
method=True,
|
||||
view_load=True,
|
||||
domain="[('type', '=', 'payable')]",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_company_inherit_1_form">
|
||||
<field name="name">res.company.form.inherit</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
@@ -24,7 +24,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<page string="Configuration" position="inside">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Reserve And Surplus Account" colspan="2"/>
|
||||
<separator string="Reserve And Profit/Loss Account" colspan="2"/>
|
||||
<field name="property_reserve_and_surplus_account" colspan="2"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="conf_account_type_view"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_fas" model="account.account.template">
|
||||
<field name="code">10</field>
|
||||
<field name="name">Fixed Assets</field>
|
||||
@@ -133,7 +133,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_xfa" model="account.account.template">
|
||||
<field name="code">100</field>
|
||||
<field name="name">Fixed Asset Account</field>
|
||||
@@ -141,7 +141,7 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_nca" model="account.account.template">
|
||||
<field name="code">11</field>
|
||||
<field name="name">Net Current Assets</field>
|
||||
@@ -149,7 +149,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_cas" model="account.account.template">
|
||||
<field name="code">110</field>
|
||||
<field name="name">Current Assets</field>
|
||||
@@ -157,7 +157,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_stk" model="account.account.template">
|
||||
<field name="code">1101</field>
|
||||
<field name="name">Purchased Stocks</field>
|
||||
@@ -165,7 +165,7 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_asset"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_a_recv" model="account.account.template">
|
||||
<field name="code">1102</field>
|
||||
<field name="name">Debtors</field>
|
||||
@@ -174,7 +174,7 @@
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="conf_account_type_asset"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_ova" model="account.account.template">
|
||||
<field name="code">1103</field>
|
||||
<field name="name">Tax Paid</field>
|
||||
@@ -182,15 +182,15 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_asset"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_bnk" model="account.account.template">
|
||||
<field name="code">1104</field>
|
||||
<field name="name">Bank Current Account</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_bnk"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_cli" model="account.account.template">
|
||||
<field name="code">111</field>
|
||||
<field name="name">Current Liabilities</field>
|
||||
@@ -198,7 +198,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_liability_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_a_pay" model="account.account.template">
|
||||
<field name="code">1111</field>
|
||||
<field name="name">Creditors</field>
|
||||
@@ -207,7 +207,7 @@
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="conf_account_type_liability"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_iva" model="account.account.template">
|
||||
<field name="code">1112</field>
|
||||
<field name="name">Tax Received</field>
|
||||
@@ -215,17 +215,17 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_liability"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_a_reserve_and_surplus" model="account.account.template">
|
||||
<field name="code">1113</field>
|
||||
<field name="name">Reserve and Surplus Account</field>
|
||||
<field name="name">Reserve and Profit/Loss Account</field>
|
||||
<field ref="conf_cli" name="parent_id"/>
|
||||
<field name="type">payable</field>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="conf_account_type_liability"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Profit and Loss -->
|
||||
|
||||
<record id="conf_gpf" model="account.account.template">
|
||||
@@ -243,7 +243,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_income_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_a_sale" model="account.account.template">
|
||||
<field name="code">200</field>
|
||||
<field name="name">Product Sales</field>
|
||||
@@ -251,7 +251,7 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_income"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_cos" model="account.account.template">
|
||||
<field name="code">21</field>
|
||||
<field name="name">Cost of Sales</field>
|
||||
@@ -259,7 +259,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_income_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_cog" model="account.account.template">
|
||||
<field name="code">210</field>
|
||||
<field name="name">Cost of Goods Sold</field>
|
||||
@@ -267,7 +267,7 @@
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="conf_account_type_expense"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_ovr" model="account.account.template">
|
||||
<field name="code">22</field>
|
||||
<field name="name">Overheads</field>
|
||||
@@ -275,7 +275,7 @@
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_expense_view1"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="conf_a_expense" model="account.account.template">
|
||||
<field name="code">220</field>
|
||||
<field name="name">Expenses</field>
|
||||
@@ -317,7 +317,7 @@
|
||||
<field name="name">Tax Received Rate S (15%)</field>
|
||||
<field name="parent_id" ref="tax_code_input"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_input_R" model="account.tax.code.template">
|
||||
<field name="name">Tax Received Rate R (5%)</field>
|
||||
<field name="parent_id" ref="tax_code_input"/>
|
||||
@@ -327,14 +327,14 @@
|
||||
<field name="name">Tax Received Rate X (Exempt)</field>
|
||||
<field name="parent_id" ref="tax_code_input"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_input_O" model="account.tax.code.template">
|
||||
<field name="name">Tax Received Rate O (Out of scope)</field>
|
||||
<field name="parent_id" ref="tax_code_input"/>
|
||||
</record>
|
||||
|
||||
<!-- Output TAX -->
|
||||
|
||||
|
||||
<record id="tax_code_output" model="account.tax.code.template">
|
||||
<field name="name">Tax Paid</field>
|
||||
<field name="parent_id" ref="tax_code_balance_net"/>
|
||||
@@ -344,7 +344,7 @@
|
||||
<field name="name">Tax Paid Rate S (15%)</field>
|
||||
<field name="parent_id" ref="tax_code_output"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_output_R" model="account.tax.code.template">
|
||||
<field name="name">Tax Paid Rate R (5%)</field>
|
||||
<field name="parent_id" ref="tax_code_output"/>
|
||||
@@ -354,7 +354,7 @@
|
||||
<field name="name">Tax Paid Rate X (Exempt)</field>
|
||||
<field name="parent_id" ref="tax_code_output"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_output_O" model="account.tax.code.template">
|
||||
<field name="name">Tax Paid Rate O (Out of scope)</field>
|
||||
<field name="parent_id" ref="tax_code_output"/>
|
||||
@@ -362,9 +362,9 @@
|
||||
|
||||
|
||||
<!-- Invoiced Base of TAX -->
|
||||
|
||||
|
||||
<!-- Purchases -->
|
||||
|
||||
|
||||
<record id="tax_code_base_net" model="account.tax.code.template">
|
||||
<field name="name">Tax Bases</field>
|
||||
<field name="parent_id" ref="tax_code_chart_root"/>
|
||||
@@ -379,7 +379,7 @@
|
||||
<field name="name">Taxable Purchases Rated S (15%)</field>
|
||||
<field name="parent_id" ref="tax_code_base_purchases"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_purch_R" model="account.tax.code.template">
|
||||
<field name="name">Taxable Purchases Rated R (5%)</field>
|
||||
<field name="parent_id" ref="tax_code_base_purchases"/>
|
||||
@@ -389,34 +389,34 @@
|
||||
<field name="name">Taxable Purchases Type X (Exempt)</field>
|
||||
<field name="parent_id" ref="tax_code_base_purchases"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_purch_O" model="account.tax.code.template">
|
||||
<field name="name">Taxable Purchases Type O (Out of scope)</field>
|
||||
<field name="parent_id" ref="tax_code_base_purchases"/>
|
||||
</record>
|
||||
|
||||
<!-- Sales -->
|
||||
|
||||
|
||||
<record id="tax_code_base_sales" model="account.tax.code.template">
|
||||
<field name="name">Base of Taxable Sales</field>
|
||||
<field name="parent_id" ref="tax_code_base_net"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_sales_S" model="account.tax.code.template">
|
||||
<field name="name">Taxable Sales Rated S (15%)</field>
|
||||
<field name="parent_id" ref="tax_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_sales_R" model="account.tax.code.template">
|
||||
<field name="name">Taxable Sales Rated R (5%)</field>
|
||||
<field name="parent_id" ref="tax_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_sales_X" model="account.tax.code.template">
|
||||
<field name="name">Taxable Sales Type X (Exempt)</field>
|
||||
<field name="parent_id" ref="tax_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="tax_code_sales_O" model="account.tax.code.template">
|
||||
<field name="name">Taxable Sales Type O (Out of scope)</field>
|
||||
<field name="parent_id" ref="tax_code_base_sales"/>
|
||||
@@ -550,19 +550,19 @@
|
||||
<field name="ref_tax_code_id" ref="tax_code_input_O"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
<!-- Fiscal Position Templates -->
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="fiscal_position_normal_taxes_template1" model="account.fiscal.position.template">
|
||||
<field name="name">Normal Taxes</field>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="fiscal_position_tax_exempt_template2" model="account.fiscal.position.template">
|
||||
<field name="name">Tax Exempt</field>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
@@ -587,7 +587,7 @@
|
||||
|
||||
|
||||
<!-- Assigned Default Taxes For Different Account -->
|
||||
|
||||
|
||||
<record id="conf_a_sale" model="account.account.template">
|
||||
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
|
||||
</record>
|
||||
@@ -595,7 +595,7 @@
|
||||
<record id="conf_a_expense" model="account.account.template">
|
||||
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
<record id="rsa" model="account.account">
|
||||
<field name="code">X1113</field>
|
||||
<field name="name">Reserve and Surplus - (test)</field>
|
||||
<field name="name">Reserve and Profit/Loss - (test)</field>
|
||||
<field ref="cli" name="parent_id"/>
|
||||
<field name="type">payable</field>
|
||||
<field name="user_type" ref="account_type_liability"/>
|
||||
|
||||
@@ -266,7 +266,7 @@ class account_installer(osv.osv_memory):
|
||||
vals_bnk = {'name': val.acc_name or '',
|
||||
'currency_id': val.currency_id.id or False,
|
||||
'code': str(110400 + code_cnt),
|
||||
'type': 'other',
|
||||
'type': 'liquidity',
|
||||
'user_type': type,
|
||||
'parent_id':new_account,
|
||||
'company_id': company_id.id }
|
||||
|
||||
@@ -49,6 +49,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
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.target_move = data['form'].get('target_move', 'all')
|
||||
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
|
||||
if (data['form']['result_selection'] == 'customer' ):
|
||||
self.ACCOUNT_TYPE = ['receivable']
|
||||
@@ -271,7 +272,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
for i in t:
|
||||
d['No Partner Defined'] = i[0]
|
||||
history.append(d)
|
||||
|
||||
|
||||
values = {}
|
||||
if self.direction_selection == 'future':
|
||||
before = False
|
||||
@@ -281,11 +282,11 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
values['direction'] = before and before[0] or 0.0
|
||||
elif self.direction_selection == 'past':
|
||||
after = False
|
||||
if future_past.has_key('No Partner Defined'):
|
||||
if future_past.has_key('No Partner Defined'):
|
||||
after = [ future_past['No Partner Defined'] ]
|
||||
self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
|
||||
values['direction'] = after and after[0] or ""
|
||||
|
||||
|
||||
for i in range(5):
|
||||
during = False
|
||||
if history[i].has_key('No Partner Defined'):
|
||||
|
||||
@@ -55,7 +55,6 @@ class account_balance(report_sxw.rml_parse, common_report_header):
|
||||
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)
|
||||
|
||||
#def _add_header(self, node, header=1):
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<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"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<blockTableStyle id="Table8">
|
||||
@@ -111,12 +111,12 @@
|
||||
<blockTableStyle id="Table5">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_Account_Balance_Content">
|
||||
<blockAlignment value="LEFT"/>
|
||||
@@ -199,7 +199,7 @@
|
||||
<blockTable colWidths="525.0" style="Table_Tilte_Table">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P15">Account Balance </para>
|
||||
<para style="P15">Trial Balance </para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -212,7 +212,7 @@
|
||||
<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>
|
||||
<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>
|
||||
@@ -292,11 +292,11 @@
|
||||
<td><para style="P10">Balance([[ company.currency_id.code]])</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14"><font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font> </para></td>
|
||||
<td><para style="P3"><font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]]</font></para></td>
|
||||
<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['credit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
|
||||
<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']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14"><font>[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font> </para></td>
|
||||
<td><para style="P3"><font>[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
|
||||
<td><para style="P3"><font>[[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="P11">
|
||||
|
||||
@@ -77,7 +77,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def _sum_currency_amount_account(self, account, form):
|
||||
def _sum_currency_amount_account(self, account):
|
||||
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))
|
||||
@@ -89,7 +89,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
sum_currency += self.cr.fetchone()[0] or 0.0
|
||||
return str(sum_currency)
|
||||
|
||||
def get_children_accounts(self, account, form):
|
||||
def get_children_accounts(self, account):
|
||||
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):
|
||||
@@ -100,7 +100,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
""" % (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)
|
||||
sold_account = self._sum_balance_account(child_account)
|
||||
self.sold_accounts[child_account.id] = sold_account
|
||||
if self.display_account == 'bal_movement':
|
||||
if child_account.type != 'view' and num_entry <> 0 :
|
||||
@@ -115,7 +115,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
return [account]
|
||||
return res
|
||||
|
||||
def lines(self, account, form):
|
||||
def lines(self, account):
|
||||
""" 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
|
||||
@@ -139,7 +139,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
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,
|
||||
c.symbol 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
|
||||
@@ -191,7 +191,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
self.tot_currency = self.tot_currency + l['amount_currency']
|
||||
return res
|
||||
|
||||
def _sum_debit_account(self, account, form):
|
||||
def _sum_debit_account(self, account):
|
||||
self.cr.execute("SELECT sum(debit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
@@ -204,7 +204,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
sum_debit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_debit
|
||||
|
||||
def _sum_credit_account(self, account, form):
|
||||
def _sum_credit_account(self, account):
|
||||
self.cr.execute("SELECT sum(credit) "\
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s "%(account.id, self.query))
|
||||
@@ -217,7 +217,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
sum_credit += self.cr.fetchone()[0] or 0.0
|
||||
return sum_credit
|
||||
|
||||
def _sum_balance_account(self, account, form):
|
||||
def _sum_balance_account(self, account):
|
||||
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))
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<template pageSize="(595.0,842.0)" title="General Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<pageGraphics>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -173,10 +173,10 @@
|
||||
<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"/>
|
||||
<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">
|
||||
<para style="P9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="539.0" style="Table_Company_Name">
|
||||
@@ -192,153 +192,153 @@
|
||||
<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">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">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>
|
||||
<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">[[', '.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">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</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')]]
|
||||
<blockTable colWidths="50.0,50.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<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">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</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,44.0,80.0,60.0,92.5,66.5,64.5,71.5" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == False or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td><para style="P3">Date</para></td>
|
||||
<td><para style="P3">Partner</para></td>
|
||||
<td><para style="P3">Ref</para></td>
|
||||
<td><para style="P3">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Crebit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P9">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P9">Crebit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P9">Balance([[ company.currency_id.code]])</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') ]]
|
||||
<para>[[ repeatIn(get_children_accounts(a), 'o') ]]</para>
|
||||
<blockTable colWidths="66.0,44.0,80.0,60.0,92.5,66.5,64.5,71.5" 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'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="245.0,92.5,66.5,64.5,71.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)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</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), '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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</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') ]]
|
||||
<blockTable colWidths="70.0,40.0,60.0,65.0,89.0,53.0,53.0,58.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="P3">Date</para></td>
|
||||
<td><para style="P3">Partner</para></td>
|
||||
<td><para style="P3">Ref</para></td>
|
||||
<td><para style="P3">Move</para></td>
|
||||
<td><para style="P3">Entry Label</para></td>
|
||||
<td><para style="P4">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P3">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P3">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Currency</para></td>
|
||||
</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') ]]
|
||||
<para>[[ repeatIn(get_children_accounts(a), 'o') ]]</para>
|
||||
<blockTable colWidths="70.0,40.0,60.0,55.0,89.0,58.0,58.0,58.0,58.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'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="230.00,74.0,55.5,60.5,60.5,65.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)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.symbol 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), '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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4">[[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '']]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<template pageSize="(1120.5,767.8)" title="General Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20" >
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="22.0" y1="31.0" width="1080" height="680"/>
|
||||
<pageGraphics>
|
||||
<pageGraphics>
|
||||
|
||||
</pageGraphics>
|
||||
</pageGraphics>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
@@ -176,7 +176,7 @@
|
||||
<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"/>
|
||||
<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">
|
||||
@@ -200,46 +200,46 @@
|
||||
<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>
|
||||
<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">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>
|
||||
<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">[[ (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">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</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>
|
||||
<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">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
|
||||
<td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</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>
|
||||
<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>
|
||||
@@ -247,7 +247,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
<blockTable colWidths="66.0,35.0,150.0, 90.0,60.0,330.0,50.0,69.0,72.0,64.0,58.0" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<blockTable colWidths="66.0,35.0,120.0,90.0,60.0,230.0,150.0,69.0,72.0,64.0,88.0" style="tbl_header" repeatRows="1">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td><para style="date">Date</para></td>
|
||||
<td><para style="P2">JNRL</para></td>
|
||||
@@ -264,49 +264,49 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a), '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'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable rowHeights="0.65cm" colWidths="66.0,35.0,120.0,90.0,60.0,230.0,150.0,73.0,73.0,73.0,85.00" style="tbl_content">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="404.0,335.0,75.0,75.0,75.0,79.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)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.symbol 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), '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">[[ line['line_corresp'] ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</section>
|
||||
</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>
|
||||
@@ -321,52 +321,52 @@
|
||||
<td><para style="P4">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P4">Balance([[ company.currency_id.code]])</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</blockTable>
|
||||
|
||||
<section>
|
||||
<section>
|
||||
|
||||
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
|
||||
<para>[[ repeatIn(get_children_accounts(a), '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'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o, data['form'])) ]] [[ company.currency_id.symbol ]]</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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<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)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</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), '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']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
</section>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
<td><para style="P10">Entry No</para></td>
|
||||
<td><para style="P10">A/c No.</para></td>
|
||||
<td><para style="P10a">Partner</para></td>
|
||||
<td><para style="P10a">Entry label</para></td>
|
||||
<td><para style="P10a">Move - Entry label</para></td>
|
||||
<td><para style="P10b">Debit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Credit([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P10b">Balance([[ company.currency_id.code]])</para></td>
|
||||
@@ -273,7 +273,7 @@
|
||||
<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="terp_default_8">[[ line.move_id.name ]] - [[ line.name ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(line.credit - line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
|
||||
@@ -211,7 +211,11 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
full_account = [r for r in res if r['sdebit'] > 0 or r['scredit'] > 0]
|
||||
else:
|
||||
full_account = [r for r in res]
|
||||
|
||||
|
||||
for rec in full_account:
|
||||
if not rec.get('name', False):
|
||||
rec.update({'name': 'No Partner Defined'})
|
||||
|
||||
## We will now compute Total
|
||||
subtotal_row = self._add_subtotal(full_account)
|
||||
# if not self.initial_balance:
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P12a"></para>
|
||||
<blockTable colWidths="61.0,206.0,69.0,68.0,69.0,68.0" repeatRows="1" style="Table2">
|
||||
<blockTable colWidths="61.0,190.0,69.0,68.0,69.0,84.0" repeatRows="1" style="Table2">
|
||||
<tr>
|
||||
<td><para style="P12a">Code</para></td>
|
||||
<td><para style="P12a">(Account/Partner) Name</para></td>
|
||||
@@ -250,14 +250,6 @@
|
||||
<td><para style="P8"><u>[[ formatLang((solde_debit()-solde_credit())) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P8"><u>[[ formatLang(sum_litige()) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P7">Balance([[ company.currency_id.code]])</para></td>
|
||||
<td><para style="P8"></para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_debit()) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P8">[[ formatLang(solde_credit()) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<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>
|
||||
|
||||
@@ -26,7 +26,7 @@ from osv import osv, fields
|
||||
class account_balance_report(osv.osv_memory):
|
||||
_inherit = "account.common.account.report"
|
||||
_name = 'account.balance.report'
|
||||
_description = 'Account Balance Report'
|
||||
_description = 'Trial Balance Report'
|
||||
|
||||
_columns = {
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
<data>
|
||||
|
||||
<record id="account_report_balance_view" model="ir.ui.view">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account_common_report_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="fiscalyear_id" position="after">
|
||||
<field name="display_account"/>
|
||||
<field name="target_move"/>
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
<field name="name">Trial Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account_common_report_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="fiscalyear_id" position="after">
|
||||
<field name="display_account"/>
|
||||
<field name="target_move"/>
|
||||
<newline/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_balance_menu" model="ir.actions.act_window">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="name">Trial Balance</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<menuitem
|
||||
icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
name="Trial Balance"
|
||||
parent="account.final_accounting_reports"
|
||||
action="action_account_balance_menu"
|
||||
id="menu_general_Balance_report"
|
||||
@@ -38,7 +38,7 @@
|
||||
<record model="ir.values" id="action_account_balance_report_values1">
|
||||
<field name="model_id" ref="account.model_account_account" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="name">Trial Balance</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_menu'))" />
|
||||
<field name="key">action</field>
|
||||
|
||||
@@ -37,11 +37,14 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
'direction_selection': fields.selection([('past','Past'),
|
||||
('future','Future')],
|
||||
'Analysis Direction', required=True),
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
('posted', 'All Posted Entries')], 'Target Moves', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'period_length': 30,
|
||||
'date_from' : time.strftime('%Y-%m-%d'),
|
||||
'direction_selection': 'past',
|
||||
'target_move': 'all',
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
@@ -61,7 +64,7 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
context = {}
|
||||
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['period_length', 'direction_selection'])[0])
|
||||
data['form'].update(self.read(cr, uid, ids, ['period_length', 'direction_selection', 'target_move'])[0])
|
||||
|
||||
period_length = data['form']['period_length']
|
||||
if period_length<=0:
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<newline/>
|
||||
<field name="result_selection"/>
|
||||
<field name="direction_selection"/>
|
||||
<field name="target_move"/>
|
||||
<field name="journal_ids"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
|
||||
@@ -34,7 +34,7 @@ class account_bs_report(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'display_type': fields.boolean("Landscape Mode"),
|
||||
'reserve_account_id': fields.many2one('account.account', 'Reserve & Surplus Account',required = True,
|
||||
'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account',required = True,
|
||||
help='This Account is used for trasfering Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be duducted.), Which is calculated from Profilt & Loss Report', domain = [('type','=','payable')]),
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class account_bs_report(osv.osv_memory):
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
account = self.pool.get('account.account').browse(cr, uid, data['form']['chart_account_id'])
|
||||
if not account.company_id.property_reserve_and_surplus_account:
|
||||
raise osv.except_osv(_('Warning'),_('Please define the Reserve and Surplus account for current user company !'))
|
||||
raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))
|
||||
data['form']['reserve_account_id'] = account.company_id.property_reserve_and_surplus_account.id
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_type'])[0])
|
||||
if data['form']['display_type']:
|
||||
|
||||
@@ -46,11 +46,12 @@
|
||||
"voucher_payment_receipt_view.xml",
|
||||
"voucher_sales_purchase_view.xml",
|
||||
"voucher_wizard.xml",
|
||||
"security/account_voucher_security.xml"
|
||||
],
|
||||
"test" : [
|
||||
# "test/account_voucher.yml",
|
||||
"test/sales_receipt.yml",
|
||||
"test/sales_payment.yml",
|
||||
# "test/sales_receipt.yml",
|
||||
# "test/sales_payment.yml",
|
||||
],
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
|
||||
@@ -59,16 +59,23 @@ class account_voucher(osv.osv):
|
||||
return context.get('journal_id')
|
||||
if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
|
||||
return context.get('search_default_journal_id')
|
||||
|
||||
|
||||
ttype = context.get('type', 'bank')
|
||||
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
|
||||
return res and res[0] or False
|
||||
|
||||
def _get_tax(self, cr, uid, context={}):
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
journal_id = context.get('journal_id', False)
|
||||
if not journal_id:
|
||||
ttype = context.get('type', 'bank')
|
||||
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
|
||||
if not res:
|
||||
return False
|
||||
journal_id = res[0]
|
||||
|
||||
if not journal_id:
|
||||
return False
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
journal = journal_pool.browse(cr, uid, journal_id)
|
||||
account_id = journal.default_credit_account_id or journal.default_debit_account_id
|
||||
if account_id and account_id.tax_ids:
|
||||
@@ -77,14 +84,30 @@ class account_voucher(osv.osv):
|
||||
return False
|
||||
|
||||
def _get_currency(self, cr, uid, context):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
if user.company_id:
|
||||
return user.company_id.currency_id.id
|
||||
return False
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
journal_id = context.get('journal_id', False)
|
||||
if not journal_id:
|
||||
ttype = context.get('type', 'bank')
|
||||
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
|
||||
if not res:
|
||||
return False
|
||||
journal_id = res[0]
|
||||
|
||||
journal = journal_pool.browse(cr, uid, journal_id)
|
||||
currency_id = journal.company_id.currency_id.id
|
||||
if journal.currency:
|
||||
currency_id = journal.currency.id
|
||||
return
|
||||
|
||||
def _get_partner(self, cr, uid, context={}):
|
||||
return context.get('partner_id', False)
|
||||
|
||||
def _get_reference(self, cr, uid, context={}):
|
||||
return context.get('reference', False)
|
||||
|
||||
def _get_narration(self, cr, uid, context={}):
|
||||
return context.get('narration', False)
|
||||
|
||||
_name = 'account.voucher'
|
||||
_description = 'Accounting Voucher'
|
||||
_order = "date desc, id desc"
|
||||
@@ -100,7 +123,6 @@ class account_voucher(osv.osv):
|
||||
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
|
||||
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
||||
'line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'line_cr_ids':fields.one2many('account.voucher.line','voucher_id','Credits',
|
||||
domain=[('type','=','cr')], context={'default_type':'cr'}, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
@@ -108,8 +130,9 @@ class account_voucher(osv.osv):
|
||||
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'currency_id':fields.many2one('res.currency', 'Currency', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
# 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'state':fields.selection(
|
||||
[('draft','Draft'),
|
||||
('proforma','Pro-forma'),
|
||||
@@ -141,6 +164,8 @@ class account_voucher(osv.osv):
|
||||
'partner_id': _get_partner,
|
||||
'journal_id':_get_journal,
|
||||
'currency_id': _get_currency,
|
||||
'reference': _get_reference,
|
||||
'narration':_get_narration,
|
||||
'type':_get_type,
|
||||
'state': lambda *a: 'draft',
|
||||
'pay_now':lambda *a: 'pay_later',
|
||||
@@ -254,7 +279,7 @@ class account_voucher(osv.osv):
|
||||
})
|
||||
return {'value':default}
|
||||
|
||||
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}):
|
||||
def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
|
||||
@@ -290,9 +315,13 @@ class account_voucher(osv.osv):
|
||||
|
||||
default['value']['account_id'] = account_id
|
||||
default['value']['type'] = tr_type
|
||||
|
||||
vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context)
|
||||
default['value'].update(vals.get('value'))
|
||||
|
||||
return default
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}):
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context={}):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
|
||||
@@ -311,8 +340,12 @@ class account_voucher(osv.osv):
|
||||
move_line_pool = self.pool.get('account.move.line')
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
|
||||
vals = vals.get('value')
|
||||
currency_id = vals.get('currency_id', currency_id)
|
||||
default = {
|
||||
'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False},
|
||||
'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id':currency_id},
|
||||
}
|
||||
|
||||
if not partner_id:
|
||||
@@ -352,7 +385,7 @@ class account_voucher(osv.osv):
|
||||
ids.reverse()
|
||||
moves = move_line_pool.browse(cr, uid, ids)
|
||||
|
||||
company_currency = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id
|
||||
company_currency = journal.company_id.currency_id.id
|
||||
if company_currency != currency_id and ttype == 'payment':
|
||||
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
|
||||
elif company_currency != currency_id and ttype == 'receipt':
|
||||
@@ -362,8 +395,7 @@ class account_voucher(osv.osv):
|
||||
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
|
||||
continue
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
|
||||
continue
|
||||
total_credit += line.credit or 0.0
|
||||
total_debit += line.debit or 0.0
|
||||
|
||||
@@ -373,15 +405,16 @@ class account_voucher(osv.osv):
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
|
||||
orignal_amount = line.credit or line.debit or 0.0
|
||||
rs = {
|
||||
'name':line.move_id.name,
|
||||
'type': line.credit and 'dr' or 'cr',
|
||||
'move_line_id':line.id,
|
||||
'account_id':line.account_id.id,
|
||||
'amount_original':line.credit or line.debit or 0.0,
|
||||
'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, orignal_amount),
|
||||
'date_original':line.date,
|
||||
'date_due':line.date_maturity,
|
||||
'amount_unreconciled': line.amount_unreconciled
|
||||
'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled)
|
||||
}
|
||||
if line.credit:
|
||||
amount = min(line.amount_unreconciled, total_debit)
|
||||
@@ -433,6 +466,10 @@ class account_voucher(osv.osv):
|
||||
|
||||
vals = self.onchange_price(cr, uid, ids, line_ids, tax_id, partner_id, context)
|
||||
vals['value'].update({'tax_id':tax_id})
|
||||
currency_id = journal.company_id.currency_id.id
|
||||
if journal.currency:
|
||||
currency_id = journal.currency.id
|
||||
vals['value'].update({'currency_id':currency_id})
|
||||
return vals
|
||||
|
||||
def proforma_voucher(self, cr, uid, ids):
|
||||
@@ -533,12 +570,13 @@ class account_voucher(osv.osv):
|
||||
'period_id': inv.period_id and inv.period_id.id or False
|
||||
}
|
||||
move_id = move_pool.create(cr, uid, move)
|
||||
company_currency = inv.account_id.company_id.currency_id.id
|
||||
|
||||
#create the first line manually
|
||||
company_currency = inv.journal_id.company_id.currency_id.id
|
||||
debit = 0.0
|
||||
credit = 0.0
|
||||
# TODO: is there any other alternative then the voucher type ??
|
||||
# TODO: is there any other alternative then the voucher type ??
|
||||
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
|
||||
if inv.type in ('purchase', 'payment'):
|
||||
credit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
|
||||
elif inv.type in ('sale', 'receipt'):
|
||||
@@ -560,6 +598,7 @@ class account_voucher(osv.osv):
|
||||
'period_id':inv.period_id.id,
|
||||
'partner_id':inv.partner_id.id,
|
||||
'currency_id':inv.currency_id.id,
|
||||
'amount_currency':inv.amount,
|
||||
'date':inv.date,
|
||||
'date_maturity':inv.date_due
|
||||
}
|
||||
@@ -569,11 +608,10 @@ class account_voucher(osv.osv):
|
||||
|
||||
rec_list_ids = []
|
||||
line_total = debit - credit
|
||||
|
||||
if inv.type == 'sale':
|
||||
line_total = line_total - inv.tax_amount
|
||||
line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount)
|
||||
elif inv.type == 'purchase':
|
||||
line_total = line_total + inv.tax_amount
|
||||
line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount)
|
||||
|
||||
for line in inv.line_ids:
|
||||
if not line.amount:
|
||||
@@ -617,7 +655,7 @@ class account_voucher(osv.osv):
|
||||
if line.move_line_id.id:
|
||||
rec_ids = [master_line, line.move_line_id.id]
|
||||
rec_list_ids.append(rec_ids)
|
||||
|
||||
|
||||
if not self.pool.get('res.currency').is_zero(cr, uid, inv.currency_id, line_total):
|
||||
diff = line_total
|
||||
move_line = {
|
||||
@@ -642,7 +680,7 @@ class account_voucher(osv.osv):
|
||||
'move_id': move_id,
|
||||
'state':'posted'
|
||||
})
|
||||
#move_pool.post(cr, uid, [move_id], context={})
|
||||
move_pool.post(cr, uid, [move_id], context={})
|
||||
for rec_ids in rec_list_ids:
|
||||
if len(rec_ids) >= 2:
|
||||
move_line_pool.reconcile_partial(cr, uid, rec_ids)
|
||||
@@ -669,16 +707,27 @@ class account_voucher_line(osv.osv):
|
||||
_order = "move_line_id"
|
||||
|
||||
def _compute_balance(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
rs_data = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
res = {}
|
||||
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
|
||||
voucher_currency = line.voucher_id.currency_id.id
|
||||
move_line = line.move_line_id or False
|
||||
|
||||
if not move_line:
|
||||
res[line.id] = 0.0
|
||||
res['amount_original'] = 0.0
|
||||
res['amount_unreconciled'] = 0.0
|
||||
|
||||
elif move_line and move_line.credit > 0:
|
||||
res[line.id] = move_line.credit
|
||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit)
|
||||
else:
|
||||
res[line.id] = move_line.debit
|
||||
return res
|
||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit)
|
||||
|
||||
if move_line:
|
||||
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.amount_unreconciled)
|
||||
rs_data[line.id] = res
|
||||
return rs_data
|
||||
|
||||
_columns = {
|
||||
'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'),
|
||||
@@ -686,14 +735,16 @@ class account_voucher_line(osv.osv):
|
||||
'account_id':fields.many2one('account.account','Account', required=True),
|
||||
'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
|
||||
'untax_amount':fields.float('Untax Amount'),
|
||||
'amount':fields.float('Amount'),
|
||||
'amount':fields.float('Amount', digits=(14,2)),
|
||||
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Cr/Dr'),
|
||||
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
|
||||
'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
|
||||
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
|
||||
'amount_original': fields.function(_compute_balance, method=True, type='float', string='Originial Amount', store=True),
|
||||
'amount_unreconciled': fields.related('move_line_id','amount_unreconciled', type='float', relation='account.move.line', string='Open Balance', store=True, readonly="1"),
|
||||
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True),
|
||||
'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True),
|
||||
|
||||
# 'amount_unreconciled': fields.related('move_line_id','amount_unreconciled', type='float', relation='account.move.line', string='Open Balance', store=True, readonly="1"),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda *a: ''
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" select="1" attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
|
||||
<field name="currency_id" invisible="True"/>
|
||||
<field name="number"/>
|
||||
</group>
|
||||
</page>
|
||||
@@ -244,7 +244,7 @@
|
||||
<group col="2" colspan="1">
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="date" select="1" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" select="1"/>
|
||||
<field name="currency_id" invisible="True"/>
|
||||
<field name="number"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_voucher_filter_sale" model="ir.ui.view">
|
||||
<field name="name">account.voucher.sale.select</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -80,7 +79,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="act_pay_voucher" model="ir.actions.act_window">
|
||||
<field name="name">Sales Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
@@ -98,7 +96,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Receipt">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id)" string="Customer"/>
|
||||
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)" string="Customer"/>
|
||||
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id)"/>
|
||||
<field name="number"/>
|
||||
<field name="name" colspan="4"/>
|
||||
@@ -135,7 +133,7 @@
|
||||
<group col="4" colspan="1">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
<label string="" colspan="1"/><field name="currency_id" invisible="True" nolabel="1"/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -154,7 +152,7 @@
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'title':'Sales Payment', 'type':'receipt', 'partner_id': partner_id}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now'),('state','!=','posted')]}"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Sales Payment', 'type':'receipt', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -206,7 +204,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Vendor Bills">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" string="Vendor" on_change="onchange_partner_id(partner_id, journal_id, amount)"/>
|
||||
<field name="partner_id" required="1" string="Vendor" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)"/>
|
||||
<field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id)"/>
|
||||
<field name="number"/>
|
||||
<field name="name" colspan="4"/>
|
||||
@@ -216,7 +214,7 @@
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Bill Information">
|
||||
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, False, parent.partner_id)" default_get="{'journal_id':journal_id,'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" default_get="{'journal_id':journal_id,'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Expense Lines" editable="bottom">
|
||||
<field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
|
||||
<field name="name"/>
|
||||
@@ -237,7 +235,7 @@
|
||||
<group col="4" colspan="1">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
<label string="" colspan="1"/><field name="currency_id" invisible="True" nolabel="1"/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -256,7 +254,7 @@
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
|
||||
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
|
||||
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id}" type="action" string="Pay Bill" attrs="{'invisible':[('state','!=','posted')]}"/>
|
||||
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','!=','pay_now'), ('state','!=','posted')]}"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Accounting Voucher">
|
||||
<group col="6" colspan="4">
|
||||
<field name="partner_id" required="1" on_change="onchange_journal_voucher(partner_id, journal_id)"/>
|
||||
<field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(partner_id, journal_id)"/>
|
||||
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
|
||||
<field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
|
||||
<field name="type" required="1"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="reference" select="1"/>
|
||||
@@ -37,7 +37,7 @@
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Voucher Entry">
|
||||
<field name="line_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
|
||||
<tree string="Voucher Items" editable="bottom">
|
||||
<field name="account_id"/>
|
||||
<field name="name"/>
|
||||
@@ -55,11 +55,11 @@
|
||||
<separator string="Other Information" colspan="2"/>
|
||||
<field name="number"/>
|
||||
<field name="date" on_change="onchange_date(date)"/>
|
||||
<field name="currency_id" attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
|
||||
<field name="currency_id" invisible="True"/>
|
||||
</group>
|
||||
<group col="4" colspan="1" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
|
||||
<separator string="Total" colspan="4"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<label colspan="1" string=""/><field name="amount" string="Total"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<record id="a_reserve_and_surplus" model="account.account.template">
|
||||
<field name="code">1113</field>
|
||||
<field name="name">Reserve and Surplus Account</field>
|
||||
<field name="name">Reserve and Profit/Loss Account</field>
|
||||
<field ref="cli" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_liability"/>
|
||||
@@ -173,7 +173,7 @@
|
||||
</record>
|
||||
|
||||
<record id="rev" model="account.account.template">
|
||||
<field name="code">200</field>
|
||||
<field name="code">200</field>
|
||||
<field name="name">Revenue</field>
|
||||
<field ref="income_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
</record>
|
||||
|
||||
<record model="account.account.template" id="IA_AC0232">
|
||||
<field name="name">Reserve and Surplus Account</field>
|
||||
<field name="name">Reserve and Profit/Loss Account</field>
|
||||
<field name="code">IA_AC0232</field>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_liability1"/>
|
||||
@@ -366,7 +366,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="IA_AC11"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="account.account.template" id="IA_AC114">
|
||||
<field name="name">Opening Stock</field>
|
||||
<field name="code">IA_AC114</field>
|
||||
@@ -494,6 +494,6 @@
|
||||
<field name="property_account_income_categ" ref="IA_AC122"/>
|
||||
<field name="property_reserve_and_surplus_account" ref="IA_AC0232"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user