[FIX]: fix a process of the bank and cash journal confirmation process
bzr revid: mga@tinyerp.com-20100709093938-a4nvjkzzo46qoj5x
This commit is contained in:
parent
9ef8ae2cef
commit
ae59b69c36
|
@ -159,7 +159,7 @@ class account_bank_statement(osv.osv):
|
|||
'period_id': _get_period,
|
||||
}
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
def button_confirm_bank(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
|
|
|
@ -183,7 +183,7 @@ class account_cash_statement(osv.osv):
|
|||
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
|
||||
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"),
|
||||
'closing_date':fields.datetime("Closed On"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Opening Balance and Transactions"),
|
||||
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', 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'),
|
||||
|
@ -313,7 +313,7 @@ class account_cash_statement(osv.osv):
|
|||
self.write(cr, uid, ids, vals)
|
||||
return True
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
def button_confirm_cash(self, cr, uid, ids, context={}):
|
||||
|
||||
""" Check the starting and ending detail of statement
|
||||
@return: True
|
||||
|
@ -324,7 +324,7 @@ class account_cash_statement(osv.osv):
|
|||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
|
||||
|
||||
company_currency_id = res_users_obj.browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
|
|
|
@ -427,6 +427,9 @@
|
|||
<field name="balance_end_real"/>
|
||||
<field name="balance_end"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -505,7 +508,7 @@
|
|||
<field name="state"/>
|
||||
<field name="balance_end"/>
|
||||
<button name="button_dummy" states="draft" string="Compute" icon="terp-stock_format-scientific"/>
|
||||
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
|
||||
<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="terp-gtk-stop"/>
|
||||
</group>
|
||||
</form>
|
||||
|
@ -2279,7 +2282,7 @@
|
|||
<field name="user_id" select="1"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
|
||||
<button type="object" string="Confirm" name="button_confirm" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_cash" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -2372,7 +2375,7 @@
|
|||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Opening Balance" colspan="4"/>
|
||||
<field name="balance_start" readonly="1"/>
|
||||
<field name="balance_start" readonly="1" string="Opening Balance"/>
|
||||
<field name="total_entry_encoding"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
|
@ -2383,7 +2386,7 @@
|
|||
</group>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" colspan="4"/>
|
||||
<button name="button_confirm" states="open" string="Close CashBox" icon="terp-check" type="object"/>
|
||||
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-check" type="object"/>
|
||||
<button name="button_open" states="draft" string="Open CashBox" icon="terp-document-new" type="object"/>
|
||||
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue