Skip to Content
Menú
This question has been flagged
1 Respondre
3601 Vistes

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
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 24
7256
1
de gen. 20
6804
2
de jul. 17
8195
1
de gen. 16
4275
0
de set. 15
4794