Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3632 Lượt xem

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)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
9190
0
thg 4 21
3677
1
thg 7 20
4076
4
thg 5 24
12796
1
thg 4 24
3422