Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
5790 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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()

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ค. 25
1164
0
มี.ค. 15
3394
2
มี.ค. 15
6718
change between 2 Invoice formats แก้ไขแล้ว
1
ก.ค. 25
750
2
ก.ค. 25
851