From 35c818700cc348e81f2dd29cf2f8e8fb7358a621 Mon Sep 17 00:00:00 2001 From: os-kng Date: Wed, 27 Apr 2016 12:24:30 +0200 Subject: [PATCH] [IMP] Adding fields on wizard --- .../report_menus.xml | 2 +- .../wizard/aged_partner_balance_wizard.py | 46 ++++++++++++++++--- .../aged_partner_balance_wizard_view.xml | 22 ++++++++- 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/account_financial_report_qweb/report_menus.xml b/account_financial_report_qweb/report_menus.xml index 9d6e1677..1de8d30b 100644 --- a/account_financial_report_qweb/report_menus.xml +++ b/account_financial_report_qweb/report_menus.xml @@ -3,7 +3,7 @@ diff --git a/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py b/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py index 0ea2620e..2243ed22 100644 --- a/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py +++ b/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- -# Author: Damien Crier -# Copyright 2016 Camptocamp SA +# Author: Damien Crier, Andrea Stirpe, Kevin Graveman, Dennis Sluijk +# Copyright 2016 Camptocamp SA, Onestein B.V. # 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): @@ -16,9 +17,40 @@ class AccountAgedTrialBalance(models.TransientModel): string='Company') date_from = fields.Date('Date from') 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( 'res.partner', - string='Filter on partner', - help='Only selected partners will be printed. ' - 'Leave empty to print all partners.') + string='Filter 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 \ No newline at end of file diff --git a/account_financial_report_qweb/wizard/aged_partner_balance_wizard_view.xml b/account_financial_report_qweb/wizard/aged_partner_balance_wizard_view.xml index 7d81c550..9b945a10 100644 --- a/account_financial_report_qweb/wizard/aged_partner_balance_wizard_view.xml +++ b/account_financial_report_qweb/wizard/aged_partner_balance_wizard_view.xml @@ -10,8 +10,28 @@ + + + + + + + + + + + + + + + + - +