def assertInvoiceValues(self, move, expected_lines_values, expected_move_values):

    def sort_lines(lines):
        return lines.sorted((lambda line: (line.exclude_from_invoice_tab, (not bool(line.tax_line_id)), (line.name or ''), line.balance)))
    self.assertRecordValues(sort_lines(move.line_ids.sorted()), expected_lines_values)
    self.assertRecordValues(sort_lines(move.invoice_line_ids.sorted()), expected_lines_values[:len(move.invoice_line_ids)])
    self.assertRecordValues(move, [expected_move_values])
def assertInvoiceValues(self, move, expected_lines_values, expected_move_values):

    def sort_lines(lines):
        return lines.sorted((lambda line: (line.exclude_from_invoice_tab, (not bool(line.tax_line_id)), (line.name or ), line.balance)))
    self.assertRecordValues(sort_lines(move.line_ids.sorted()), expected_lines_values)
    self.assertRecordValues(sort_lines(move.invoice_line_ids.sorted()), expected_lines_values[:len(move.invoice_line_ids)])
    self.assertRecordValues(move, [expected_move_values])