-
-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Description
Checklist
Put an x in the bracket when you have completed each task, like this: [x]
- This issue is not about installing previous versions of django-smart-selects older than 1.2.8. I understand that previous versions are insecure and will not receive any support whatsoever.
- I have verified that that issue exists against the
masterbranch of django-smart-selects. - I have debugged the issue to the
smart_selectsapp. - I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- I have reduced the issue to the simplest possible case.
- I have included all relevant sections of
models.py,forms.py, andviews.pywith problems. - I have used GitHub Flavored Markdown to style all of my posted code.
Steps to reproduce
- Create inline
- Add chainedmanytomany field with horizontal=True parameter
- Try to pick any of ProductGroup values
Actual behavior
Get chained values only for product and tariff
p.s. everything works OK ONLY when i'm press save and trying to change EXISTING object

Expected behavior
Get chained values for product, tariff and discounts
Model structure
product_group = models.ForeignKey(ProductGroup, on_delete=models.RESTRICT, default=None, null=True)
product = ChainedForeignKey(Product,
chained_field="product_group",
chained_model_field="product_group",
show_all=False,
auto_choose=True,
sort=True,
default=None
)
tariff = ChainedForeignKey("Tariff",
chained_field="product_group",
chained_model_field="product_group",
show_all=False,
auto_choose=True,
sort=True,
default=None
)
discounts = ChainedManyToManyField("Discount",
chained_field="product_group",
chained_model_field="product_groups",
default=None,
blank=True,
)
Console log after picking ProductGroup value
2023-06-15 16:38:11 | INFO/MainProcess | "GET /chaining/filter/crm/Tariff/product_group/crm/UserInvoiceItem/tariff/68/ HTTP/1.1" 200 286
2023-06-15 16:38:11 | INFO/MainProcess | "GET /chaining/filter/crm/Product/product_group/crm/UserInvoiceItem/product/68/ HTTP/1.1" 200 1071
Log should contains request for discounts field, but its not.
Metadata
Metadata
Assignees
Labels
No labels
