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

Hai All,

I'm trying to calculate sales order line tax by using below code

taxes = line.tax_id.compute_all(price, line.order_id.currency_id, line.product_uom_qty, product=line.product_id, partner=line.order_id.partner_id)


I received below out put on debugging that code

{'base': 750.75, 'taxes': [{'account_id': False,            'amount': 16.67,            'analytic': False,            'base': 833.33,            'id': 3,            'name': u'NBT 2 %',            'refund_account_id': False,            'sequence': 1},           {'account_id': False,            'amount': 82.58,            'analytic': False,            'base': 750.75,            'id': 4,            'name': u'VAT 11%',            'refund_account_id': False,            'sequence': 1}], 'total_excluded': 750.75, 'total_included': 850.0}


Please explain me

  • where is the definition for compute_all () function?
  • Where is the location of this function is implemented?
  • In which type Model fields I can use that function.ex -: line.tax_id == manytomany data type


Ảnh đại diện
Huỷ bỏ

hello Ahamed,

Great job.Thanks a lot


Câu trả lời hay nhất

Hello,

This function defined here ... and you can read about the implementation in the doc string of the function ..


Hope this could helps ..

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

hello Ahamed,

Great job.Thanks a lot

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 25
1274
1
thg 11 24
2159
0
thg 9 24
1550
1
thg 8 24
1881
0
thg 3 20
3943