This issue comes after I achieved this.
To sum it up, I created a new extra field for discount in Sale Order. It is calculated in subtotal. It is working as expected as the part of Sale Order.
After that, I confirmed it, sent products, and created invoice.
I found out that the subtotal in invoice created from that SO does not have the same value as in the SO because the subtotal in invoice does not calculate by including the extra discount.
I have looked into _create_invoices method in Sale model but I have no clues where the subtotal calculation takes place.
My goal is to just make the invoice subtotal calculation get the same value as in the current SO subtotal. Of course, other calculated fields after subtotal as well such as Untaxed Amount, Taxes, and Total must match the SO too.
https://stackoverflow.com/questions/66593611/so-subtotal-with-extra-discount-field-does-not-pass-over-to-invoice March 12, 2021 at 11:07AM
没有评论:
发表评论