I created a repository for shipping methods in django-oscar, so, i make the appropriate app and put this code in the admin:
from django.contrib import admin
from oscar.core.loading import get_model
OrderAndItemCharges = get_model('shipping', 'OrderAndItemCharges')
WeightBand = get_model('shipping', 'WeightBand')
WeightBased = get_model('shipping', 'WeightBased')
class OrderChargesAdmin(admin.ModelAdmin):
filter_horizontal = [
'countries',
]
list_display = [
'name',
'description',
'price_per_order',
'price_per_item',
'free_shipping_threshold'
]
class WeightBandInline(admin.TabularInline):
model = WeightBand
class WeightBasedAdmin(admin.ModelAdmin):
filter_horizontal = [
'countries',
]
list_display = [
'code',
'name',
'default_weight'
]
inlines = [WeightBandInline]
admin.site.register(OrderAndItemCharges, OrderChargesAdmin)
admin.site.register(WeightBased, WeightBasedAdmin)
So, i'll test the methods and i want add shipping countries for the existing methods.

You can see here that change the country field isn't saved by the admin module, and add other country replace the existing country. This problem isn't present with the other fields. In Partner models there aren't problem to add users to a partner.
Other case is this:

If a want delete one of theme, well, all are deleted, but, again, doesn't save the change.

But, when i do this changes in the dashboard module, i haven't problem for update the methods.
Can anyone help me to explain this?
I can't see errors in the browser console, so, i don't know which problem here.
Same problem, with Django default user group permission, None of them being saved, can't add user group permission, neither user or group permission, I think the exact problem indicated on m2m
@f1nality Big problem here.
I haven't tested with django-oscar yet, but I think the problem is that django-jet and django-oscar are using separate select2 instances. This conflict is causing this problem.
Which instance use django-jet?
I am having the same issue, but this is new. With previous versions, django-jet was stable and an awesome skin, now in the latest version has many bugs. I have created a project with only django and django-jet installed and it doesn't work.
I got the same issue without django-oscar.
In my case, any field which defined as filter_horizontal (such as user's permission), will cause admin won't save the changes correctly.
From django docs:
ModelAdmin.filter_horizontal
_By default, a ManyToManyField is displayed in the admin site with a
I think, it's not a bug, filter_horizontal and filter_vertical are useless when using django-jet, but it would be useful to mention about it in docs.
@timur-orudzhov the issue here is for built-in user admin, the filter_horizontal is the default settings...
Could you check 1.0.2 version? It fixed filter_horizontal for Django 1.10
I test with django 1.9.8. it works like charm
@f1nality 1.0.2 fixed issue for me. Django 1.9.6
Please come to the django-jet Discord server so we can organize if you like:
Welcome! 😄
I'm happy to say, yes! It works now.
Most helpful comment
Same problem, with Django default user group permission, None of them being saved, can't add user group permission, neither user or group permission, I think the exact problem indicated on m2m