Set number credit invoice without products
Since #6253 (closed) [1], check each invoice lines has a product to know an invoice is credit.
In case an invoice lines without related a product or invoie line type is subtotal, etc... is incorret to know an invoice is credit or not [2]
Example invoice lines:
(Decimal('0.0'), u'comment')
(Decimal('-1980.00'), u'line')
(Decimal('-1980.00'), u'subtotal')
(Decimal('912.00'), u'line')
(Decimal('912.00'), u'subtotal')
Proposal:
if (all(l.amount < 0 for l in self.lines if l.product)
to
if (all(l.amount < 0 for l in self.lines if l.type == 'line')
[1] #6253 (closed)
[2] http://hg.tryton.org/modules/account_invoice/file/default/invoice.py#l1042