changeset 055fb7ad9b99 in modules/purchase_secondary_unit:5.4 details: https://hg.tryton.org/modules/purchase_secondary_unit?cmd=changeset;node=055fb7ad9b99 description: Skip invoice lines with non line type when setting its secondary unit
issue9774 review324391002 (grafted from 8e69bd759d4930bd23cc8430abe2400501284e81) diffstat: purchase.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (12 lines): diff -r 5b1c300c76e2 -r 055fb7ad9b99 purchase.py --- a/purchase.py Tue Oct 13 18:24:44 2020 +0200 +++ b/purchase.py Mon Nov 02 09:45:20 2020 +0100 @@ -175,6 +175,8 @@ lines = super().get_invoice_line() if hasattr(InvoiceLine, 'secondary_unit'): for line in lines: + if line.type != 'line': + continue if line.unit == self.unit: line.secondary_unit = self.secondary_unit return lines