Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
692 Переглядів

Hi,


In a crm.lead model I have 2 more attributes (columns) let's call col1 and col2.


How do I obtain 2 recordsets for each user like "select * from crm_records col1 desc limit 5" and the second "select * from crm_records col1 desc limit 5" in the same.

For the beginning I was trying to modify _where_calc​in a an abstract where I put:

query.order = f"{self._table}.{top_field} DESC"
query.limit = top_limit

to append to the original query that comes with

query = super()._where_calc(*args, **kwargs)

but:
1. I receive all queries I put in the domain not limited
2. It is not ordered like the way I want (only if i put sort in the filter)

Thank you in advance
Claudiui

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
вер. 24
3271
0
лип. 24
1203
1
лип. 24
2023
2
груд. 17
3178
2
лип. 25
1285