İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
6014 Görünümler

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

Avatar
Vazgeç
En İyi Yanı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()

Avatar
Vazgeç
Üretici En İyi Yanıt

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

Avatar
Vazgeç
En İyi Yanı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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 25
1449
0
Mar 15
3546
2
Mar 15
6884
1
Tem 25
1143
2
Tem 25
1312