[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-accounting-view-imp-atp-cash_registers-nco

bzr revid: atp@tinyerp.com-20120627175606-ewsbaw8gsl5rwvca
This commit is contained in:
Atul Patel (OpenERP) 2012-06-27 23:26:06 +05:30
commit 4157b4ee05
2 changed files with 45 additions and 32 deletions

View File

@ -197,7 +197,7 @@ class account_cash_statement(osv.osv):
'account.bank.statement.line': (_get_statement, ['amount'], 10),
}),
'closing_date': fields.datetime("Closed On"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Closing Balance', help="Closing balance based on cashBox"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Total', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'user_id': fields.many2one('res.users', 'Responsible', required=False),

View File

@ -2555,16 +2555,25 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Statement">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" class="oe_inline"/>-<field name="period_id" class="oe_inline"/></h1>
<label for="journal_id" class="oe_edit_only"/>
<h2>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
</h2>
<group col="4">
<field name="name"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="user_id" readonly="1"/>
<field name="period_id"/>
<field name="currency" invisible="1"/>
</group>
<notebook>
<group>
<field name="user_id" readonly="1"/>
<field name="total_entry_encoding"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
</group>
<group>
<field name="date" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date, company_id)"/>
<field name="closing_date" readonly="1"/>
<field name="currency" invisible="1"/>
</group>
</group>
<notebook>
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field name="line_ids" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
@ -2596,20 +2605,31 @@ action = pool.get('res.config').next(cr, uid, [], context)
</field>
</page>
<page string="CashBox">
<group>
<field name="starting_details_ids" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1">
<tree string = "Opening Balance" editable="bottom">
<group col="4">
<group>
<group string="Opening Operations">
<field name="starting_details_ids" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1">
<tree string = "Opening Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Opening Balance" version="7.0">
</tree>
<form string = "Opening Balance" version="7.0">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
<field name="ending_details_ids" attrs="{'readonly':[('state','!=','open')]}" nolabel="1">
</form>
</field>
</group>
<newline/>
<group class="oe_subtotal_footer oe_right">
<field name="balance_start" readonly="1" string="Total"/>
<field name="total_entry_encoding"/>
</group>
</group>
<group>
<group string="Closing Operations">
<field name="ending_details_ids" attrs="{'readonly':[('state','!=','open')]}" nolabel="1">
<tree string = "Closing Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
@ -2621,26 +2641,19 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="subtotal"/>
</form>
</field>
</group>
<newline/>
<group class="oe_subtotal_footer oe_right">
<field name="balance_end" />
<field name="balance_end_cash"/>
</group>
</group>
</group>
</page>
<page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="move_line_ids" string="Journal Entries"/>
</page>
</notebook>
<group col="3">
<group string="Dates">
<field name="date" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date, company_id)"/>
<field name="closing_date" readonly="1"/>
</group>
<group string="Opening Balance">
<field name="balance_start" readonly="1" string="Opening Balance"/>
<field name="total_entry_encoding"/>
</group>
<group string="Closing Balance">
<field name="balance_end"/>
<field name="balance_end_cash"/>
</group>
</group>
</sheet>
</form>
</field>