Am Mittwoch, den 06.10.2010, 17:34 +0200 schrieb Cédric Krier: > Ok I did not understand that the tax line got also 0 value. > So I agree that can be improved. >
Please review this at http://codereview.appspot.com/2338044/ Affected files: M invoice.py Index: invoice.py =================================================================== --- a/invoice.py +++ b/invoice.py @@ -723,7 +723,8 @@ res = [] for tax in invoice.taxes: val = tax_obj.get_move_line(tax) - res.append(val) + if val: + res.append(val) return res def _get_move_line(self, invoice, date, amount): @@ -1866,6 +1867,8 @@ ''' currency_obj = self.pool.get('currency.currency') res = {} + if not tax.amount: + return res res['name'] = tax.description if tax.invoice.currency.id != tax.invoice.company.currency.id: amount = currency_obj.compute(tax.invoice.currency, tax.amount, -- Korbinian Preisler ____________________________________ virtual things Preisler & Spallek GbR Munich - Aix-la-Chapelle Windeckstr. 77 81375 Munich - Germany Tel: +49 (89) 710 481 55 Fax: +49 (89) 710 481 56 [email protected] http://www.virtual-things.biz -- [email protected] mailing list
