Allow any non-view account on statement line

For example, donations are not payable nor receivable

review631005
This commit is contained in:
Cédric Krier committed 2013-01-26 15:41:28 +01:00
1 parent d452ed5c25
commit 541b1e3237
1 file changed
+2 -6
+2 -6
View File
@@ -344,12 +344,8 @@ class Line(ModelSQL, ModelView):
account = fields.Many2One('account.account', 'Account', required=True,
on_change=['account', 'invoice'], domain=[
('company', '=', Eval('_parent_statement', {}).get('company', 0)),
If(Bool(Eval('party')),
('kind', 'in', ['receivable', 'payable']),
('kind', 'in', ['payable', 'receivable', 'revenue', 'expense',
'other'])),
],
depends=['party', 'amount'])
('kind', '!=', 'view'),
])
description = fields.Char('Description')
move = fields.Many2One('account.move', 'Account Move', readonly=True)
invoice = fields.Many2One('account.invoice', 'Invoice',