You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.5 KiB

  1. # -*- coding: utf-8 -*-
  2. # Author: Damien Crier
  3. # Copyright 2016 Camptocamp SA
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from openerp import models, fields, api
  6. class LedgerReportWizard(models.TransientModel):
  7. _name = "ledger.report.wizard"
  8. _description = "Ledger Report"
  9. company_id = fields.Many2one(comodel_name='res.company')
  10. # date_range = ??
  11. date_from = fields.Date()
  12. date_to = fields.Date()
  13. target_move = fields.Selection([('posted', 'All Posted Entries'),
  14. ('all', 'All Entries')],
  15. string='Target Moves',
  16. required=True,
  17. default='posted')
  18. account_ids = fields.Many2many(
  19. comodel_name='account.account',
  20. string='Filter accounts',
  21. )
  22. amount_currency = fields.Boolean(string='With currency',
  23. default=False)
  24. centralize = fields.Boolean(string='Activate centralization',
  25. default=False)
  26. result_selection = fields.Selection(
  27. [('customer', 'Receivable Accounts'),
  28. ('supplier', 'Payable Accounts'),
  29. ('customer_supplier', 'Receivable and Payable Accounts')
  30. ],
  31. string="Partner's",
  32. default='customer')
  33. partner_ids = fields.Many2many(
  34. comodel_name='res.partner',
  35. string='Filter partners',
  36. )
  37. @api.multi
  38. def check_report(self):
  39. return True