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

Hi,


in an invoice, when you change the discount on a line, amount of the line and of the invoice is automatically recalculated.


I would like to do the same by clicking on a button that i've added in the invoice form view. 

Probably by calling the same function than the automatic way.


Is anybody know how to do that?


Vincent

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

I don't know the version, but in your button click you can add some custom code like in V13,

for line in self.move_line_ids:

    line._onchange_price_subtotal()

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

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

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

in line automatic calculate but if only if customize in method calculate  to stop auto discount
after that using your method to calculate discount

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
1104
0
thg 3 15
3355
2
thg 3 15
6701
1
thg 7 25
633
2
thg 7 25
755