Skip to content
Advertisement

Flask admin – complex sort on hybrid_property

I have a fairly complex hybrid_property. This is a vendor model, which has multiple skuchannels (products). What it does is: Based on the target_stock_duration (e.g. we want to keep items in stock for 4 months) calculate how many units have to be ordered and how much this would cost. This gives us the potential.

JavaScript

well this hybrid_property works just fine, but I would very much like to sort this property. with @po_potential.expression -> well I have no clue how to do this, because in my understanding it should return a select object. Is there any other way?

Advertisement

Answer

This should get you started:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement