account_bank_statement_line.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request
  3. _MODEL= 'account.bank.statement.line'
  4. '''
  5. Create Statement line
  6. '''
  7. def create_statement_line(values):
  8. return request.env[_MODEL].sudo().create(values)
  9. # '''
  10. # Create Line statement.
  11. # '''
  12. # def _create_statement_line_transfer(self, statement, name, amount, ref):
  13. # statementLine = {
  14. # 'statement_id': statement.id,
  15. # 'name': name,
  16. # 'amount': amount ,
  17. # 'ref': ref,
  18. # 'account_id': statement.journal_id.internal_account_id.id,
  19. # 'journal_id': statement.journal_id.id,
  20. # 'is_deleted': True
  21. # }
  22. #
  23. # line = self.env['account.bank.statement.line'].create(statementLine)
  24. # return line
  25. #
  26. #
  27. # '''
  28. # Create cash box transfer
  29. # '''
  30. # def _create_cash_box_transfer(self, ref, amount, lineInput, lineOutput):
  31. # cash = {
  32. # 'name': "TRANSFERENCIA %s a %s" %((lineOutput.statement_id.name),(lineInput.statement_id.name)),
  33. # 'amount': amount,
  34. # 'ref': ref,
  35. # 'input_line': lineInput.id,
  36. # 'output_line': lineOutput.id,
  37. # 'input_statement': lineInput.statement_id.id,
  38. # 'output_statement': lineOutput.statement_id.id,
  39. # 'date': lineOutput.date
  40. # }
  41. # return self.env['cash.box.transfer'].create(cash)