Here are some explanations before the questions:
The Purchase_Request could have as origin a PurchaseRequisition_Line which is depending of a PurchaseRequisition. I'm adding some function fields on my PurchaseRequest: those fields are employee and number from PurchaseRequisition.
But then, i wish ordering those function fields...
I saw some examples to redefine order but never with 3 models, it's often one join between 2 models and also in my case field origin involved in the join condition is a tuple... here's my code (not working for ordering, i got 'TypeError: tuple indices must be integers, not NoneType' and also i don't know if the "join" is correct).
Thanks for help!
Client traceback: https://pastebin.com/XkDAZt2V
Did i proceed correctly to join tables?
Ok that solves the tuple error :-)
Now, my error is about the correct column for sorting : https://pastebin.com/q3MvMtEc
How to specify sort on the correct column "c.employee" instead of "b.employee"?
but in my case it should use
table, _ = tables['requisition'] to use the correct column for the order ???
Here's a working example:
Thanks for your help !