[ADD] generic wizard for ledger
parent
7b224ee66d
commit
11ef6544e5
|
@ -2,7 +2,7 @@
|
||||||
# Author: Damien Crier
|
# Author: Damien Crier
|
||||||
# Copyright 2016 Camptocamp SA
|
# Copyright 2016 Camptocamp SA
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# 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):
|
class LedgerReportWizard(models.TransientModel):
|
||||||
|
@ -11,3 +11,24 @@ class LedgerReportWizard(models.TransientModel):
|
||||||
_description = "Ledger Report"
|
_description = "Ledger Report"
|
||||||
|
|
||||||
company_id = fields.Many2one(comodel_name='res.company')
|
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
|
||||||
|
|
|
@ -10,6 +10,24 @@
|
||||||
<group name="main_info">
|
<group name="main_info">
|
||||||
<field name="company_id"/>
|
<field name="company_id"/>
|
||||||
</group>
|
</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>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
Loading…
Reference in New Issue