From 48564b52864ca5165376922e8549df40ff89d84d Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 12 May 2023 20:48:44 +0200 Subject: [PATCH] Fixed that `default_consume_location_id` wasn't copied on copying a product (fixes #2223) --- changelog/70_UNRELEASED_xxxx.xx.xx.md | 1 + public/viewjs/productform.js | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog/70_UNRELEASED_xxxx.xx.xx.md b/changelog/70_UNRELEASED_xxxx.xx.xx.md index 9f5ef94b..fe3965ac 100644 --- a/changelog/70_UNRELEASED_xxxx.xx.xx.md +++ b/changelog/70_UNRELEASED_xxxx.xx.xx.md @@ -37,6 +37,7 @@ - Fixed that sorting by the "Value" and "Min. stock amount" columns on the stock overview page didn't work - Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved - Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones +- Fixed that when copying a product, the field "Default consume location" was not copied along ### Shopping list diff --git a/public/viewjs/productform.js b/public/viewjs/productform.js index 554ab8cd..7f0dfa5a 100644 --- a/public/viewjs/productform.js +++ b/public/viewjs/productform.js @@ -430,6 +430,7 @@ if (Grocy.EditMode == "create" && GetUriParam("copy-of") != undefined) $("#default_best_before_days_after_thawing").val(sourceProduct.default_best_before_days_after_thawing); $("#quick_consume_amount").val(sourceProduct.quick_consume_amount); $("#quick_open_amount").val(sourceProduct.quick_open_amount); + $("#default_consume_location_id").val(sourceProduct.default_consume_location_id); Grocy.FrontendHelpers.ValidateForm('product-form'); },