|
@@ -183,7 +183,7 @@ class eiru_account_statement_cancel(models.Model):
|
|
cashBoxConfirm = self._eiru_account_get_cashbox_confirm(statement.id)
|
|
cashBoxConfirm = self._eiru_account_get_cashbox_confirm(statement.id)
|
|
if (cashBoxConfirm):
|
|
if (cashBoxConfirm):
|
|
statementOpen = self._eiru_get_account_bank_statement(cashBoxConfirm.statement_open.id)
|
|
statementOpen = self._eiru_get_account_bank_statement(cashBoxConfirm.statement_open.id)
|
|
- if (statementOpen and statementOpen.state =='confirm'):
|
|
|
|
|
|
+ if (statementOpen and statementOpen.state =='confirm' and cashBoxConfirm.statement_open.id != cashBoxConfirm.statement_id.id ):
|
|
return {
|
|
return {
|
|
'state': False,
|
|
'state': False,
|
|
'messege': "No se puede reabrir esta caja porque tiene relación a una caja que ya esta cerrada."
|
|
'messege': "No se puede reabrir esta caja porque tiene relación a una caja que ya esta cerrada."
|