Reviewers: ,
Please review this at http://codereview.tryton.org/900003/
Affected files:
M invoice.py
Index: invoice.py
===================================================================
--- a/invoice.py
+++ b/invoice.py
@@ -140,7 +140,11 @@
lines_to_pay = fields.Function(fields.One2Many('account.move.line',
None,
'Lines to Pay'), 'get_lines_to_pay')
payment_lines = fields.Many2Many('account.invoice-account.move.line',
- 'invoice', 'line', readonly=True, string='Payment Lines')
+ 'invoice', 'line', readonly=True, string='Payment Lines',
+ states={
+ 'invisible': (Eval('state') == 'paid') |
~Eval('payment_lines'),
+ },
+ depends=['state'])
amount_to_pay_today = fields.Function(fields.Numeric('Amount to Pay
Today',
digits=(16, Eval('currency_digits', 2)),
depends=['currency_digits']), 'get_amount_to_pay')