Skip to content
Snippets Groups Projects
Commit 3bcfac7d authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] sale_mrp, sale_stock: _get_anglo_saxon_price_unit with a kit

When a kit is set with a valuation = "real_time" and invoice_policy = "delivery",
the price unit of the kit computed for the Expense Account in the the journal of
entries must be the sum of the average price of each component of this kit.

Used case:

Create a kit001 with:
*General information:
   -Product Type=Stockable Product
   -Invoicing Policy=Delivered Quantities
   -Sale Price=100$
   -Cost Price=80$
*Inventory:
   -Route=Manufacture
   -Internal Category=All/Sealable
*its product category set with
   -Expense Account=210000 Cost of Goods Sold
   -Costing Method=Standard Price
   -Inventory Valuation=Perpetual(automated)
*a bom of two components child001 and child002

Create child001 with:
*General information:
   -Product Type=Stockable Product
   -Invoicing Policy=Delivered Quantities
   -Sale Price=100$
   -Cost Price=70$
*Inventory:
   -Route=Buy
   -Internal Category=All
*its product category set with
   -Expense Account=210000 Cost of Goods Sold
   -Costing Method=Real Price
   -Inventory Valuation=Perpetual(automated)

Create child002 with:
*General information:
   -Product Type=Stockable Product
   -Invoicing Policy=Delivered Quantities
   -Sale Price=100$
   -Cost Price=10$
*Inventory:
   -Route=Buy
   -Internal Category=All
*its product category set with
   -Expense Account=210000 Cost of Goods Sold
   -Costing Method=Real Price
   -Inventory Valuation=Perpetual(automated)

Create a SO with:
   -one line with the kit001

Confirm the SO

Validate the Delivery

Create and view the invoices
   -per invoicable lines(deduct down payments)

Validate the invoice

Result:

Before the fix: in the entry created for this invoice, the debit for the kit001 in Cost of Goods Sold
was equal to 70 instead of 80.

After the fix: the debit for the kit001 in Cost of Goods Sold
was equal to 80(the sum of the average price of each component of the kit001).

opw:674608
parent 02371e88
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment