Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Product: delegate `track_inventory` to master variant

Damian Legawiec378f0d540725
diff --git a/core/app/models/spree/product.rb b/core/app/models/spree/product.rb
index c70445f57d..b970af6acf 100644
--- a/core/app/models/spree/product.rb
+++ b/core/app/models/spree/product.rb
@@ -166,7 +166,7 @@ module Spree
[
:sku, :barcode, :price, :currency, :weight, :height, :width, :depth, :is_master,
:cost_currency, :price_in, :amount_in, :cost_price, :compare_at_price, :compare_at_amount_in,
- :dimensions_unit, :weight_unit
+ :dimensions_unit, :weight_unit, :track_inventory
].each do |method_name|
delegate method_name, :"#{method_name}=", to: :find_or_build_master
end