[FIX] account: Change some labels

bzr revid: stw@openerp.com-20120418113249-ft56ys15ha2a10de
This commit is contained in:
Stephane Wirtel
2012-04-18 13:32:49 +02:00
parent 6cba88d946
commit a3c8319deb
2 changed files with 21 additions and 18 deletions
+5 -4
View File
@@ -56,9 +56,9 @@ class account_cashbox_line(osv.osv):
return {'value': {'subtotal': sub or 0.0}}
_columns = {
'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),
'number': fields.integer('Number'),
'subtotal': fields.function(_sub_total, string='Sub Total', type='float', digits_compute=dp.get_precision('Account')),
'pieces': fields.float('Unit of Currency', digits_compute=dp.get_precision('Account')),
'number': fields.integer('Number of Units'),
'subtotal': fields.function(_sub_total, string='Subtotal', type='float', digits_compute=dp.get_precision('Account')),
'starting_id': fields.many2one('account.bank.statement', ondelete='cascade'),
'ending_id': fields.many2one('account.bank.statement', ondelete='cascade'),
}
@@ -230,7 +230,7 @@ class account_cash_statement(osv.osv):
return True
_constraints = [
(check_opening_journal, "The selected journal has been opened !", ['journal_id']),
#(check_opening_journal, "The selected journal has been opened !", ['journal_id']),
]
def create(self, cr, uid, vals, context=None):
@@ -284,6 +284,7 @@ class account_cash_statement(osv.osv):
for line in journal.cashbox_line_ids:
values['starting_details_ids'].append({'pieces' : line.pieces})
values['ending_details_ids'].append({'pieces' : line.pieces})
return { 'value' : values }
else:
return {
+16 -14
View File
@@ -2660,28 +2660,30 @@ action = pool.get('res.config').next(cr, uid, [], context)
</field>
</page>
<page string="CashBox">
<group col="2" colspan="2" expand="1">
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
<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"/>
<group col="2" expand="1" attrs="{'invisible' : [('state', '=', 'open')]}">
<separator string="Opening Cashbox" colspan="2" />
<field name="starting_details_ids" nolabel="1">
<tree string="Opening Balance" editable="bottom">
<field name="pieces" readonly="1" />
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)" />
<field name="subtotal" sum="Sub Total" />
</tree>
<form string = "Opening Balance">
<field name="pieces"/>
<form string="Opening Balance">
<field name="pieces" readonly="1"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
</group>
<group col="2" colspan="2" expand="1">
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
<tree string = "Closing Balance" editable="bottom">
<field name="pieces"/>
<group col="2" expand="1" attrs="{'invisible' : [('state', '=', 'draft')]}">
<separator string="Closing Cashbox" colspan="2" />
<field name="ending_details_ids" nolabel="1">
<tree string="Closing Balance" editable="bottom">
<field name="pieces" />
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
<field name="subtotal" sum="Sub Total"/>
</tree>
<form string = "Closing Balance">
<form string="Closing Balance">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>