From 4b569dba983110ffd1148a3ffb180878ac6e9ef6 Mon Sep 17 00:00:00 2001 From: Bruno-brsy Date: Wed, 12 Jan 2022 16:14:10 +0000 Subject: [PATCH] [FIX] product: help for field standard_price Step to reproduce: 1) create a product with, the "Product Type" as "Storable Product" + A "Product Category" with a "Costing Method" set in "FIFO" mode and the Inventory Valuation in "Automated". 2) create a Purchase Order for 1 unit of that product and set the unit price to 10.00. Confirm Order -> Receive Products -> Validate (the delivery) -> Apply 3) create a second Purchase Order for 1 unit of the same product but set the unit price to a different price, like 20.00. Confirm Order -> Receive Products -> Validate (the delivery) -> Apply 4) create a Sales Orders for 1 unit -> Confirm -> Smart button Delivery -> Validate -> Apply 5) check the cost on the product form of that product. On the V13 it will be $10, so its the last unit that left the stock On V14 and upper, it will be $20, so the next product that will leave the stock. The help popup for the field "standard_price" doesn't reflect the correct behavior. It's the standard price for the next unit instead of the last one. closes odoo/odoo#84289 X-original-commit: 9e0a529b603302653dac2a8fb692472fc500c147 Signed-off-by: William Henrotin (whe) Signed-off-by: Bruno-brsy --- addons/product/i18n/product.pot | 2 +- addons/product/models/product.py | 2 +- addons/product/models/product_template.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/product/i18n/product.pot b/addons/product/i18n/product.pot index 0be40286f15..d6fa82bb517 100644 --- a/addons/product/i18n/product.pot +++ b/addons/product/i18n/product.pot @@ -1288,7 +1288,7 @@ msgstr "" #: model:ir.model.fields,help:product.field_product_template__standard_price msgid "" "In Standard Price & AVCO: value of the product (automatically computed in AVCO).\n" -" In FIFO: value of the last unit that left the stock (automatically computed).\n" +" In FIFO: value of the next unit that will leave the stock (automatically computed).\n" " Used to value the product when the purchase cost is not known (e.g. inventory adjustment).\n" " Used to compute margins on sale orders." msgstr "" diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 55aee61e490..5055c1589a6 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -110,7 +110,7 @@ class ProductProduct(models.Model): digits='Product Price', groups="base.group_user", help="""In Standard Price & AVCO: value of the product (automatically computed in AVCO). - In FIFO: value of the last unit that left the stock (automatically computed). + In FIFO: value of the next unit that will leave the stock (automatically computed). Used to value the product when the purchase cost is not known (e.g. inventory adjustment). Used to compute margins on sale orders.""") volume = fields.Float('Volume', digits='Volume') diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 8b51d5b8025..06e26ba06c9 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -75,7 +75,7 @@ class ProductTemplate(models.Model): inverse='_set_standard_price', search='_search_standard_price', digits='Product Price', groups="base.group_user", help="""In Standard Price & AVCO: value of the product (automatically computed in AVCO). - In FIFO: value of the last unit that left the stock (automatically computed). + In FIFO: value of the next unit that will leave the stock (automatically computed). Used to value the product when the purchase cost is not known (e.g. inventory adjustment). Used to compute margins on sale orders.""")