|
@@ -492,7 +492,7 @@ class Sales(http.Controller):
|
|
|
'account_id': account_voucher.account_id.id,
|
|
|
'journal_entry_id': account_voucher.move_id.id,
|
|
|
'currency_id': account_voucher.currency_id.id,
|
|
|
- 'ref': 'POS/' + reference or ''
|
|
|
+ 'ref': 'POS/' + (reference or '')
|
|
|
}]]
|
|
|
|
|
|
|
|
@@ -501,11 +501,11 @@ class Sales(http.Controller):
|
|
|
'''
|
|
|
def create_bank_statement(self, account_voucher_id, account_bank_statement_lines, date_today):
|
|
|
account_voucher = request.env['account.voucher'].browse(account_voucher_id)
|
|
|
- account_bank_statement = self.env['account.bank.statement'].search([('journal_id', '=', account_voucher.journal_id.id), ('date', '=', date_today)])
|
|
|
+ account_bank_statement = request.env['account.bank.statement'].search([('journal_id', '=', account_voucher.journal_id.id), ('date', '=', date_today)])
|
|
|
|
|
|
account_bank_statement_values = {
|
|
|
'date': date_today,
|
|
|
- 'user': request.env.user.id,
|
|
|
+ 'user_id': request.env.user.id,
|
|
|
'journal_id': account_voucher.journal_id.id,
|
|
|
'period_id': account_voucher.period_id.id,
|
|
|
'line_ids': account_bank_statement_lines,
|
|
@@ -556,7 +556,7 @@ class Sales(http.Controller):
|
|
|
self.make_info_log('[OK] Creating invoice move lines')
|
|
|
|
|
|
# Create account move
|
|
|
- account_move = self.Creatingnt_move(invoice.id, invoice_move_lines)
|
|
|
+ account_move = self.create_account_move(invoice.id, invoice_move_lines)
|
|
|
self.make_info_log('[OK] Creating account move')
|
|
|
|
|
|
# Number invoice
|
|
@@ -576,7 +576,7 @@ class Sales(http.Controller):
|
|
|
self.make_info_log('[OK] Creating account bank statement lines')
|
|
|
|
|
|
# Create bank statement
|
|
|
- self.create_bank_statement(account_voucher.id, account_bank_statement_lines, date_today)
|
|
|
+ self.create_bank_statement(account_voucher.id, account_bank_statement_lines, date_now)
|
|
|
self.make_info_log('[OK] Creating account bank statement')
|
|
|
|
|
|
return {
|