Hide stock column at importing items after stock is disabled [SCI-6801] (#4093)

* Add stock column check at importing inventory items [SCI-6801]

* Fix hound message [SCI-6801]
This commit is contained in:
ajugo 2022-05-24 11:49:36 +02:00 committed by GitHub
parent 087213dbc7
commit a23eea7523
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,11 @@ class RepositoryColumn < ApplicationRecord
end
def importable?
Extends::REPOSITORY_IMPORTABLE_TYPES.include?(data_type.to_sym)
if data_type == 'RepositoryStockValue'
RepositoryBase.stock_management_enabled?
else
Extends::REPOSITORY_IMPORTABLE_TYPES.include?(data_type.to_sym)
end
end
def deep_dup