Lines from Invoices generated by Sales are not in same order like SaleLines
On my Sales, shipping costs are always the last SaleLine. Since my update from 2.4 to 3.2 I have sometimes wrong order on invoices generated ba sales.
I do some changes on Sale with my module but I think this is not the problem:
import copy
from trytond.pool import PoolMeta
__all__ = ['Sale']
__metaclass__ = PoolMeta
class Sale:
__name__ = 'sale.sale'
@classmethod
def __setup__(cls):
super(Sale, cls).__setup__()
def _get_invoice_sale(self, invoice_type):
invoice = super(Sale, self)._get_invoice_sale(invoice_type)
invoice.description = self.description
invoice.reference = self.reference
return invoice