Improve write-off
- Use account of write-off journal as default - Add write-off journal type issue3538 review2101002
This commit is contained in:
1 parent
79e3bb9235
commit
a7ca4e89f9
3 files changed
+4
-11
No files matched your search
@@ -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
@@ -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]
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user