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

Hi,

 

I successfully import a sale order with its lines, with XMLRPC API . 

I also can add taxes on the order with : 

order["tax_line_ids"] = [(0, 0, {'name': 'test', 'account_id': 424, 'amount': 123456})]

 

But, is there a way to automatically calculate taxes on the order  ?  🤐

 

Thank you !  🙂


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

You don't have to calculate taxes like this; if you configure your products with its default taxes, the sale order will be created with the taxes automatically.

I've done this before.

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Ali,

Thank you for your answer.

I have configured a default tax of 20% on the product, but order tax is not automatically calculated...

Exemple, I import sale order, with 1 line, taxes are not calculated :

[url=https://zupimages.net/viewer.php?id=21/38/p130.jpg][img]https://zupimages.net/up/21/38/p130.jpg[/img][/url]

When I edit order and add same product, taxes are automatically calculated for both lines :

[url=https://zupimages.net/viewer.php?id=21/38/va3i.jpg][img]https://zupimages.net/up/21/38/va3i.jpg[/img][/url]

Tác giả Câu trả lời hay nhất

I specify that I  have  to specify tax in the  order  line,  with  :    

line['taxes_ids'] = [(6, 0, [1])]
If not,  tax is not automatically captured from product... Is it normal ? 


Thanks. 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 18
5316
2
thg 2 24
5466
2
thg 9 22
3476
1
thg 8 24
1300
0
thg 11 23
4728