allow to synchronize all articles of a shared supplier

This commit is contained in:
wvengen 2014-05-21 21:24:03 +02:00
parent 3918e22214
commit 647b7f0430
16 changed files with 194 additions and 77 deletions

View file

@ -14,5 +14,13 @@ class SharedSupplier < ActiveRecord::Base
whitelist = %w(name address phone fax email url delivery_days note)
attributes.select { |k,_v| whitelist.include?(k) }
end
# return list of synchronisation methods available for this supplier
def shared_sync_methods
methods = []
methods += %w(all_available all_unavailable) if shared_articles.count < 200
methods += %w(import) # perhaps, in the future: if shared_articles.count > 20
methods
end
end