diff --git a/app/models/p_product_ref.rb b/app/models/p_product_ref.rb index ce4686a..31ae21e 100644 --- a/app/models/p_product_ref.rb +++ b/app/models/p_product_ref.rb @@ -41,7 +41,7 @@ class PProductRef < ApplicationRecord acts_as_sorting :fields => { :id => {:name => "Id", :reorder => true}, - :p_product_cat => {:name => "Catégorie", :reorder => true}, + :p_product_cat => {:name => "Catégorie", :reorder => true, :sort_name => "cc_p_product_cat_id",}, :ref => {:name => "Référence"}, :cc_name => {:name => "Produit"}, # :description => {:name => "Description"}, @@ -54,7 +54,7 @@ class PProductRef < ApplicationRecord :actions => {:name => "Actions", :reorder => false} } - acts_as_caching :fields => [:sorecop, :deee, :name, :code] + acts_as_caching :fields => [:sorecop, :deee, :name, :code, :p_product_cat_id] include PgSearch::Model pg_search_scope :global_search, against: [:ref, :cc_name],