Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
5770 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor Mejor respuesta

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
may 25
1123
0
mar 15
3387
2
mar 15
6708
1
jul 25
692
2
jul 25
791