Skip to Content

Contributors

Decrease invoiced quantities on Sale Order when credit note validated

Dear all,

I just discovered that when creating a credit note on an invoice generated from a sale order, the invoiced quantities would not decrease on sale order.

Therefore if I need to invoice these again, I need to artificially increase delivered or ordered quantities (depending on product invoicing policy configuration), causing side effects on sales analysis.


Has any of you find a way to workaround this issue ?


This problem seems to be present up to v12, not anymore on v13 and v14.

I have found https://github.com/odoo/odoo/issues/37549 on this topic but without much feedback.


Thank you,

Best Regards,

--

Le Filament
Rémi CAZENAVE
------
SCOP LE FILAMENT

by Rémi Cazenave - 03:06 - 25 Nov 2020

Follow-Ups

  • Re: Decrease invoiced quantities on Sale Order when credit note validated
    Hi,

    If the credit comes from the sale then in general the sale is affected. Otherwise if it is created from the invoice it isn't.

    It is too problematic to do any other way IMO. Especially if stock is involved. I mean generally, if you follow a basic guideline for Sales depending on policy that Invoiced means Ordered = Invoiced or Delivered > 0 and Delivered = Invoiced then the relevant Credits and Invoices can always be created from the Sale using Create Invoice button there is no need and in fact it is detrimental for the Invoice Refund button to affect the sale..

    From memory the Credit Note options are something like.

    Draft Refund - very often these should have no effect on invoiced qty as they can be simply price adjustments.
    Modify - well now you have 2 problems. Because also the newly created invoice also won't affect the sale. If it is just a price adjustment similar to above then it won't matter.
    Cancel - I just can't think of a reasonable use case to reduce the sale invoiced quantity without also having to affect stock. In any case Cancel is just shorthand for Create Draft Refund -> Validate.
      If I double invoiced something and need to issue a credit note, and the sale invoiced quantities are wrong then Create Invoice in sale is the correct method.
      If goods were returned, then create refund in the return picking wizard will decrement the delivered quantities and again Create Invoice.

    On Thu, Nov 26, 2020 at 11:17 PM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:
    I would say that it's decreased if you select option 2 or 3 of the credit note, but not on option 1 (draft refund).

    Regards.

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Graeme Gellatly - 01:26 - 30 Nov 2020
  • Re: Decrease invoiced quantities on Sale Order when credit note validated

    Thanks Pedro,

    that's also what I would have expected but none of the option lead to a decrease of invoiced quantities on sale order...

    I think this is probably because account_invoice_line(s) created on credit note from original invoice do not copy all related fields and in particular do not keep the link with sale_order_lines.
    But still I would need to workaround this behaviour !

    Has anyone solved this ? (on Odoo version 12.0 or previous ones)

    Le Filament
    Rémi CAZENAVE
    ------
    SCOP LE FILAMENT
    06.87.23.26.04
    remi@le-filament.com
    Le 26/11/2020 à 11:17, Pedro M. Baeza (Tecnativa) a écrit :
    I would say that it's decreased if you select option 2 or 3 of the credit note, but not on option 1 (draft refund).

    Regards.

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Rémi Cazenave - 12:31 - 26 Nov 2020
  • Re: Decrease invoiced quantities on Sale Order when credit note validated
    I would say that it's decreased if you select option 2 or 3 of the credit note, but not on option 1 (draft refund).

    Regards.

    by Pedro M. Baeza - 11:16 - 26 Nov 2020