problem is while importing invoice lines all are creating successfully but the problem is tax amounts are not adding even though there is tax lines. if i manually change the tax at that time only tax amounts are adding.
please have look into my code
vals = {
'type': "out_invoice",
'ref': values.get('ref'),
'invoice_date': date,
"journal_id": 1 if self.invoice_type in ('customer', 'credit') else 2,
'partner_id': partner_id.id if partner_id else False,
'state': 'draft',
'department_id': department.id if department else False,
'operating_unit_id': operating_unit.id if operating_unit else False,
}
res = invoice.create(vals)
move_lines = {
"name": dict.get('label'),
'account_id': account_id.id,
'price_unit': float(dict.get('price')),
'quantity': float(dict.get('quantity')),
'tax_ids': [(6, 0, tax_ids)],
'move_id': res.id,
'tax_exigible': True if self.invoice_type in ('customer', 'credit') else False,
# 'price_total': 0,
# 'exclude_from_invoice_tab': False
}
account_moves_lines = invoice_lines.with_context(check_move_validity=False).create(
move_lines)