Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3614 Widoki

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...


Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 24
7268
1
sty 20
6822
2
lip 17
8202
1
sty 16
4284
0
wrz 15
4810