Browse Source

[ADD] generic wizard for ledger

pull/196/head
Damien Crier 9 years ago
committed by Leonardo Pistone
parent
commit
45bc08be71
  1. 23
      account_financial_report_qweb/wizard/ledger_report_wizard.py
  2. 18
      account_financial_report_qweb/wizard/ledger_report_wizard_view.xml

23
account_financial_report_qweb/wizard/ledger_report_wizard.py

@ -2,7 +2,7 @@
# Author: Damien Crier
# Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields
from openerp import models, fields, api
class LedgerReportWizard(models.TransientModel):
@ -11,3 +11,24 @@ class LedgerReportWizard(models.TransientModel):
_description = "Ledger Report"
company_id = fields.Many2one(comodel_name='res.company')
# date_range = ??
date_from = fields.Date()
date_to = fields.Date()
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries')],
string='Target Moves',
required=True,
default='posted')
account_ids = fields.Many2many(
comodel_name='account.account',
relation='account_account_ledger_rel',
string='Filter accounts',
)
amount_currency = fields.Boolean(string='With currency',
default=False)
centralize = fields.Boolean(string='Activate centralization',
default=False)
@api.multi
def check_report(self):
return True

18
account_financial_report_qweb/wizard/ledger_report_wizard_view.xml

@ -10,6 +10,24 @@
<group name="main_info">
<field name="company_id"/>
</group>
<group name="">
<group name="date_ranger">
<!-- <field name="date_range"/> -->
<field name="date_from"/>
<field name="date_to"/>
</group>
<group name="extra_info">
<field name="amount_currency"/>
<field name="centralize"/>
</group>
</group>
<label for="account_ids"/>
<field name="account_ids" nolabel="1"/>
<footer>
<button name="check_report" string="Print" type="object" default_focus="1" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>

Loading…
Cancel
Save