The print_all field has been removed earlier

So when we print no lines, it throws an AttributeError instead
of a Warning.
This commit is contained in:
Guewen Baconnier
2015-01-21 09:54:00 +01:00
parent dd012a0159
commit 00bc73573e

View File

@@ -56,7 +56,7 @@ class CreditControlPrinter(models.TransientModel):
def print_lines(self):
self.ensure_one()
comm_obj = self.env['credit.control.communication']
if not self.line_ids and not self.print_all:
if not self.line_ids:
raise api.Warning(_('No credit control lines selected.'))
lines = self._get_lines(self.line_ids, self._credit_line_predicate)