Skip to Content
Menu
This question has been flagged
1 Reply
2556 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
Related Posts Replies Views Activity
2
May 24
4955
1
Jan 20
4841
2
Jul 17
6149
1
Jan 16
2628
0
Sep 15
2962