OdooWiki OCA HUB

Stock Customer Deposit Sale Margin

stock_customer_deposit_sale_margin folder_open OCA/stock-logistics-workflow open_in_new
Uncategorized License: LGPL-3

This module extends the functionality of the consignment stock to support customer deposits and set cost in sale order line to zero when making another sale order to deliver some previously consigned customer deposit.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

When you sell products that are already held as customer deposits, this module sets the cost price of those sale order lines to zero, so the margin on the sale is not reduced by a purchase cost.

This module works together with the consignment/customer deposit features and the sale margin feature. It changes how the cost used for margin calculation is determined on a sale order line.

  • On a sale order line, Odoo normally computes a purchase price (cost) used to calculate the margin.
  • This module checks how much of the product is available as a customer deposit (deposit_available_qty) compared with the quantity being sold (product_uom_qty).
  • If the deposit available quantity is greater than zero and is at least equal to the quantity being sold, the purchase price of that line is forced to zero.
  • If there is no deposit available, or the ordered quantity is zero, nothing changes and the normal cost is kept.

The result is that when you deliver goods that were previously consigned as a customer deposit, the sale line shows no purchase cost, so the margin reflects only the sale price. The change is automatic and applies on the sale order line screen; no new menu or button is added. It touches the sale.order.line model and relies on the deposit availability information provided by the customer deposit module.

Depends on

Models and fields (1)
  • sale.order.line · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/stock-logistics-workflow.

terminal Installation and usage

OCA documentation · Odoo 16.0

To use this module, you need to:

Create Customer deposits:

  • Go to Sales > Quotations.
  • Create new quotation to the desired customer.
  • Activate customer deposit in quotation.
  • Add storable product in order lines.
  • Add quantity you will keep as a deposit.
  • Confirm quotation.
  • Sale is now ready for invoicing.
  • A picking will be created. This picking is an operation Customer Deposit and it's internal operation.
  • Click on smart button with delivery.
  • Set quantity done in operations or click on Set Quantities.
  • Update location destination if it's necessary in operations detailed.
  • Click on Validate.

Deliver customer deposits:

  • Go to Sales > Quotation.
  • Create a new quotation.
  • Select a customer who has a deposit in your warehouse.
  • In page Other Info choose warehouse where deposit is located. (Only if multi-warehouse is activated)
  • Smart button Deposits with deposits is displayed if the customer has deposits in the chosen warehouse.
  • Add line with product in deposit.
  • Purchase price is set to zero.
  • As a product in deposit, a button Customer deposit will appear. If you do not have enough in deposit, button will be grey. If you click on the button Customer deposit, you can view the deposits for that product.
  • You will only be able to confirm the order if you use less quantity than you have in the deposit.
  • If you try to confirm the order with more quantity than you have in deposit, a validation error will show.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.