Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
5764 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä Paras vastaus

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

Avatar
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
toukok. 25
1115
0
maalisk. 15
3375
2
maalisk. 15
6706
1
heinäk. 25
666
2
heinäk. 25
778