Improve write-off

- Use account of write-off journal as default
- Add write-off journal type

issue3538
review2101002
This commit is contained in:
Cédric Krier committed 2013-12-20 14:00:28 +01:00
1 parent 79e3bb9235
commit a7ca4e89f9
3 files changed
+4 -11

No files matched your search

+2
View File
@@ -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
+2 -9
View File
@@ -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]
-2
View File
@@ -12,8 +12,6 @@ this repository contains the full copyright notices and license terms. -->
<field name="amount_writeoff"/>
<label name="currency_writeoff"/>
<field name="currency_writeoff"/>
<label name="account_writeoff"/>
<field name="account_writeoff"/>
<label name="journal_writeoff"/>
<field name="journal_writeoff"/>
<field name="lines" colspan="4"