From b20faf759515e36734dfb62a902518ea3a89dcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 4 Sep 2015 11:22:42 +0200 Subject: [PATCH] Add date to Pay Lines wizard issue4921 review23381002 --- CHANGELOG | 2 ++ account.py | 8 ++++++++ view/move_line_pay_start_form.xml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 466bc7bff8..bf9ab3f8f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Add date to Pay Lines wizard + Version 3.6.0 - 2015-04-20 * Bug fixes (see mercurial logs for details) * Add support for PyPy diff --git a/account.py b/account.py index 480c27958e..b0d36d0ba2 100644 --- a/account.py +++ b/account.py @@ -126,6 +126,13 @@ class PayLineStart(ModelView): required=True, domain=[ ('company', '=', Eval('context', {}).get('company', -1)), ]) + date = fields.Date('Date', required=True) + + @staticmethod + def default_date(): + pool = Pool() + Payment = pool.get('account.payment') + return Payment.default_date() class PayLine(Wizard): @@ -152,6 +159,7 @@ class PayLine(Wizard): journal=self.start.journal, party=line.party, kind=kind, + date=self.start.date, amount=line.payment_amount, line=line, ) diff --git a/view/move_line_pay_start_form.xml b/view/move_line_pay_start_form.xml index 3d1ed88bcd..8bcc8d1306 100644 --- a/view/move_line_pay_start_form.xml +++ b/view/move_line_pay_start_form.xml @@ -4,4 +4,6 @@ this repository contains the full copyright notices and license terms. -->