[FIX] account: fixed yml issue of account cash statement

bzr revid: hmo@tinyerp.com-20101027103208-xvtzje41n2rb5kl1
This commit is contained in:
Harry (OpenERP) 2010-10-27 16:02:08 +05:30
parent 8cebff4d9f
commit abc40474e0
2 changed files with 3 additions and 3 deletions

View File

@ -328,8 +328,8 @@ class account_cash_statement(osv.osv):
statement_pool = self.pool.get('account.bank.statement')
for statement in statement_pool.browse(cr, uid, ids, context=context):
vals = {}
if not self._user_allow(cr, uid, statement.id, context=context):
force_allow = context.get('force_allow',False)
if not force_allow and not self._user_allow(cr, uid, statement.id, context=context):
raise osv.except_osv(_('Error !'), _('User %s does not have rights to access %s journal !' % (statement.user_id.name, statement.journal_id.name)))
if statement.name and statement.name == '/':

View File

@ -26,7 +26,7 @@
I clicked on Open CashBox button to open the cashbox
-
!python {model: account.bank.statement}: |
self.button_open(cr, uid, [ref("account_bank_statement_1")], {"lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), })
self.button_open(cr, uid, [ref("account_bank_statement_1")], {"force_allow":True, "lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), })
-
I check that now bank statement is in the "Open" state