Last active
November 19, 2019 12:46
-
-
Save foxcarlos/76a18784b224307d269ff9b3731e2224 to your computer and use it in GitHub Desktop.
Paginacion en plantilla odoo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# page es lo que viene del template, el numero que se presiono | |
model_ids = request.env[model_name].search([], offset=(page - 1) * 10, limit=10) | |
total = model_ids.search_count([]) | |
pager = request.website.pager( | |
url='url path', | |
total=total, | |
page=page, | |
step=10, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment