Skip to content

When creating a credit sale invoice from a sales order, the price of the pricelist is used #2096

@jabelchi

Description

@jabelchi

Module

account_invoice_pricelist

Describe the bug

When creating a credit invoice (a sale invoice with negative amount) from a sale order, the price of the pricelist is used, rather than respecting the price of the sale order.

To Reproduce

Affected versions:
Tested in 17.0

Steps to reproduce the behavior:

  1. Create a storable product, invoicing policy: delivered quantities. Set some quantity on hand.
  2. Create a pricelist with a price for the product above.
  3. Create a sale order that uses the pricelist with a line with several units of that product. The unit price is taken from the pricelist.
  4. Change the unit price of the line. Confirm the sale order.
  5. Validate the delivery order.
  6. Create an invoice from the sale order. The price of the sale order is used for the invoice.
  7. From the delivery order return some of the units delivered. In the sale order the invoiced quantity is higher than the delivered one.
  8. Create another invoice. As it is negative, it is converted to a credit note. THE PRICE IS TAKEN FROM PRICELIST, INSTEAD OF RESPECTING THE PRICE OF THE ORDER.

Expected behavior
The price used in the credit note must be taken from the sale order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions