Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
5759 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur Beste antwoord

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 25
1106
0
mrt. 15
3357
2
mrt. 15
6704
1
jul. 25
638
2
jul. 25
757