Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3621 Zobrazení

I am currently trying to create a custom product discount line.

I got all working but the problem is that I need to know how to update the invoice line values to make my project work.

I tried using "object.write" but it only creates another line of "Product Discount".

I don't want to use the "% discount" of the product because I have my own computations.

here is the sample below:

Any help would be greatly appreciated...


Avatar
Zrušit
Nejlepší odpověď

Perhaps it's a late answer, however I've recently done something similar and I inherited the model (\account.move.line, in your case) and overrun the create() and _compute_amount() methods, replaceing the native dicount parameter with the custom_discount one, or your own custom computations.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 24
7271
1
led 20
6833
2
čvc 17
8207
1
led 16
4289
0
zář 15
4827