|
@@ -616,17 +616,17 @@ class AccountBankStatementUtility(models.Model):
|
|
|
} for open in self.env['account.bank.statement'].search([('journal_id.id', '=',statement.journal_id.id),('type_statement.id', '=', statement.type_statement.id),('user_id.id', '=', statement.user_id.id),('state', '=', 'open')])]
|
|
|
|
|
|
|
|
|
- ''' ___ ____ _ ____
|
|
|
- / _ \ _ __ ___ _ __ / ___|__ _ ___| |__ | __ ) _____ __
|
|
|
- | | | | '_ \ / _ \ '_ \ | | / _` / __| '_ \| _ \ / _ \ \/ /
|
|
|
- | |_| | |_) | __/ | | | | |__| (_| \__ \ | | | |_) | (_) > <
|
|
|
- \___/| .__/ \___|_| |_| \____\__,_|___/_| |_|____/ \___/_/\_\
|
|
|
- |_|
|
|
|
+ '''
|
|
|
+ Open cashBox
|
|
|
'''
|
|
|
@api.model
|
|
|
def account_bank_statement_open_cashbox(self, id):
|
|
|
statement = self._get_statement_transfer(id)
|
|
|
+ return statement.button_open()
|
|
|
|
|
|
+ @api.model
|
|
|
+ def account_bank_statement_open(self, id):
|
|
|
+ statement = self._get_statement_transfer(id)
|
|
|
cashBoxConfirm = self._get_cashbox_statement_confirm(statement)
|
|
|
for casBox in cashBoxConfirm:
|
|
|
name = "SALDO ANTERIOR /"+str(casBox.statement_id.name)
|
|
@@ -646,19 +646,13 @@ class AccountBankStatementUtility(models.Model):
|
|
|
|
|
|
confirmCasBox = self._writer_cashbox_statement_confirm(confirmCasBox,values)
|
|
|
|
|
|
-
|
|
|
- return statement.button_open()
|
|
|
+ return True
|
|
|
|
|
|
'''
|
|
|
get cashbox.statement.confirm
|
|
|
'''
|
|
|
def _get_cashbox_statement_confirm(self, statement):
|
|
|
- return self.env['cashbox.statement.confirm'].search([ ('statement_id.type_statement.id', '=', statement.type_statement.id),
|
|
|
- ('user_statement', '=', statement.user_id.id),
|
|
|
- ('journal_id', '=', statement.journal_id.id),
|
|
|
- ('state_avaliable', '=', True),
|
|
|
- ('statement_id.id', '!=', statement.id)
|
|
|
- ])
|
|
|
+ return self.env['cashbox.statement.confirm'].search([('statement_id.type_statement.id', '=', statement.type_statement.id), ('user_statement', '=', statement.user_id.id), ('journal_id', '=', statement.journal_id.id), ('state_avaliable', '=', True), ('statement_id.id', '!=', statement.id)])
|
|
|
|
|
|
'''
|
|
|
writer casbox statement confirm
|
|
@@ -671,6 +665,7 @@ class AccountBankStatementUtility(models.Model):
|
|
|
'''
|
|
|
@api.multi
|
|
|
def button_open(self):
|
|
|
+ self.account_bank_statement_open(self.id)
|
|
|
return super(AccountBankStatementUtility, self).button_open()
|
|
|
|
|
|
|