[IMP] Adding fields on wizard
parent
066526af8c
commit
1fad6ecdbb
|
@ -3,7 +3,7 @@
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id='account.menu_aged_partner_balance'
|
id='account.menu_aged_trial_balance'
|
||||||
parent='account.menu_finance_legal_statement'
|
parent='account.menu_finance_legal_statement'
|
||||||
action='action_account_aged_trial_balance_wizard' />
|
action='action_account_aged_trial_balance_wizard' />
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Author: Damien Crier
|
# Author: Damien Crier, Andrea Stirpe, Kevin Graveman, Dennis Sluijk
|
||||||
# Copyright 2016 Camptocamp SA
|
# Copyright 2016 Camptocamp SA, Onestein B.V.
|
||||||
# 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 datetime import datetime
|
||||||
|
from openerp import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class AccountAgedTrialBalance(models.TransientModel):
|
class AccountAgedTrialBalance(models.TransientModel):
|
||||||
|
@ -16,9 +17,40 @@ class AccountAgedTrialBalance(models.TransientModel):
|
||||||
string='Company')
|
string='Company')
|
||||||
date_from = fields.Date('Date from')
|
date_from = fields.Date('Date from')
|
||||||
date_to = fields.Date('Date to')
|
date_to = fields.Date('Date to')
|
||||||
|
target_move = fields.Selection([('posted', 'All Posted Entries'),
|
||||||
|
('all', 'All Entries')],
|
||||||
|
string='Target Moves',
|
||||||
|
required=True,
|
||||||
|
default='posted')
|
||||||
|
result_selection = fields.Selection(
|
||||||
|
[('customer', 'Receivable Accounts'),
|
||||||
|
('supplier', 'Payable Accounts'),
|
||||||
|
('customer_supplier', 'Receivable and Payable Accounts')
|
||||||
|
],
|
||||||
|
string="Partner's",
|
||||||
|
default='customer')
|
||||||
partner_ids = fields.Many2many(
|
partner_ids = fields.Many2many(
|
||||||
'res.partner',
|
'res.partner',
|
||||||
string='Filter on partner',
|
string='Filter partners',
|
||||||
help='Only selected partners will be printed. '
|
)
|
||||||
'Leave empty to print all partners.')
|
at_date = fields.Date(
|
||||||
|
required=True,
|
||||||
|
default=fields.Date.to_string(datetime.today()))
|
||||||
|
until_date = fields.Date(
|
||||||
|
"Clearance date", required=True,
|
||||||
|
help="""The clearance date is essentially a tool used for debtors
|
||||||
|
provisionning calculation.
|
||||||
|
By default, this date is equal to the the end date (
|
||||||
|
ie: 31/12/2011 if you select fy 2011).
|
||||||
|
By amending the clearance date, you will be, for instance,
|
||||||
|
able to answer the question : 'based on my last
|
||||||
|
year end debtors open invoices, which invoices are still
|
||||||
|
unpaid today (today is my clearance date)?'""")
|
||||||
|
|
||||||
|
@api.onchange('at_date')
|
||||||
|
def onchange_atdate(self):
|
||||||
|
self.until_date = self.at_date
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def check_report(self):
|
||||||
|
return True
|
|
@ -10,8 +10,28 @@
|
||||||
<group name="main_info">
|
<group name="main_info">
|
||||||
<field name="company_id"/>
|
<field name="company_id"/>
|
||||||
</group>
|
</group>
|
||||||
|
<group name="date_info">
|
||||||
|
<field name="at_date"/>
|
||||||
|
<field name="until_date"/>
|
||||||
|
</group>
|
||||||
|
<group name="other_filters">
|
||||||
|
<group name="moves">
|
||||||
|
<field name="target_move" widget="radio"/>
|
||||||
|
</group>
|
||||||
|
<group name="result_select">
|
||||||
|
<field name="result_selection" widget="radio"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group name="partner_info">
|
||||||
|
<field name="partner_ids"/>
|
||||||
|
</group>
|
||||||
|
<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>
|
||||||
|
|
||||||
<record id="action_account_aged_trial_balance_wizard"
|
<record id="action_account_aged_trial_balance_wizard"
|
||||||
|
|
Loading…
Reference in New Issue