diff --git a/CHANGELOG b/CHANGELOG
index 53bcf2864f..674615c552 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+* Use account of write-off journal as default
+
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
* Use account move as cache
diff --git a/invoice.py b/invoice.py
index 68fb0d28d1..550e08e41b 100644
--- a/invoice.py
+++ b/invoice.py
@@ -2454,14 +2454,8 @@ class PayInvoiceAsk(ModelView):
('partial', 'Partial Payment'),
], 'Type', required=True)
journal_writeoff = fields.Many2One('account.journal', 'Write-Off Journal',
- states={
- 'invisible': Eval('type') != 'writeoff',
- 'required': Eval('type') == 'writeoff',
- }, depends=['type'])
- account_writeoff = fields.Many2One('account.account', 'Write-Off Account',
domain=[
- ('kind', '!=', 'view'),
- ('company', '=', Eval('context', {}).get('company', -1)),
+ ('type', '=', 'write-off'),
],
states={
'invisible': Eval('type') != 'writeoff',
@@ -2678,8 +2672,7 @@ class PayInvoice(Wizard):
if lines:
MoveLine.reconcile(lines,
journal=self.ask.journal_writeoff,
- date=self.start.date,
- account=self.ask.account_writeoff)
+ date=self.start.date)
else:
if line:
reconcile_lines += [line]
diff --git a/view/pay_ask_form.xml b/view/pay_ask_form.xml
index 9fb3b31af5..44d501dfda 100644
--- a/view/pay_ask_form.xml
+++ b/view/pay_ask_form.xml
@@ -12,8 +12,6 @@ this repository contains the full copyright notices and license terms. -->
-
-