Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
3612 Prikazi

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)

Avatar
Opusti
Best Answer

Hi,

I think this video can help you: https://www.youtube.com/watch?v=UOBxxnYDIsM&list=PLSKcWRTtEl5qzvRaI-VTGavfReiHS_EEb&index=1 (starting at minute 55 in this video)

Avatar
Opusti
Best Answer

The module named "VKS Import Excel" can help you solve this problem easily: https://apps.odoo.com/apps/modules/16.0/vks_import_excel.  Please contact me via email anhtuan.acoi@gmail.com  if you need further assistance.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
maj 25
9164
0
apr. 21
3676
1
jul. 20
4071
4
maj 24
12752
1
apr. 24
3361