This question has been flagged
1 Reply
2200 Views

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