تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
5784 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 25
1159
0
مارس 15
3391
2
مارس 15
6717
1
يوليو 25
713
2
يوليو 25
813