Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
1243 Tampilan

First of all, hello everyone. I am new to forums and Odoo software. I try to do my best to research the forums before asking a question. I also searched for the question I was going to ask but could not find an answer, if I missed it, please excuse me. 

If a discount is applied as a % on an order, there is no problem, but I think it is not possible to apply a discount as a line by line amount. 

When I apply a discount as a total price while applying a discount to an order, it causes confusion in the reports. It also reflects the discount amount in the reports as if it were a product. 

Is there an easy solution to this? For example, if there are 10 items in the order and I discount the total order by 5 USD, it is reflected in the reports as a total of 11 products.

Avatar
Buang
Penulis Jawaban Terbai

Hello All,

I have fixed this issue with this addon "Sales Fixed Discount" app. I wanted to share it for those who need help with the same issue.

Thanks..

Avatar
Buang
Jawaban Terbai

You're correct, by default you can not apply and display a Discount amount on a Sale Order Line directly.

However, what you can do is using a formula - similar to what you know from any spreadsheet tool such as MS Excel.

You can define the Discount On All Order Lines as "equals discount amount divided by untaxed amount times 100" for a 5 dollar discount split onto all order lines, e.g. =5/300.1*100:



Which will result into:


The preview for your customer will look like this:



While this does not display a 5 dollar discount directly (this will require certain modification depending on your needs, which may can be done using studio and certainly can be done via custom development) you will end up with the confirmed discount amount.

Now, I should mention in addition, that by default you will most likely NOT get the same result in your database. This is due to the fact that the rounding precision (aka Decimal Accuracy which can be found under Settings -> Technical) by default is set to two digits.
In above example this has been changed to six digits. 

To change the Decimal Accuracy you need to enable the Developer Mode (see https://www.odoo.com/documentation/master/applications/general/developer_mode.html)

Note: Please be aware about the fact that you SHOULD NOT set a number lower than what has been stored once in this field once a discount has been applied (i.e. if you choose to change the precision from 2 to let's say 3 for testing, make sure you do this in a test environment first to see whether the outcome is what you want!). In other words:



Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 25
1154
1
Sep 25
331
3
Mei 24
2495
0
Des 21
2635
1
Mei 20
10