hi, i want to limit display to 15 items, but i don't know how to create pagination in order to show all the rest of the records.
controllers.py :
@http.route('/coopaname_helpdesk/liste_offres', type ='http', auth='public', website=True)
def liste_offres(self):
tickets = request.env['monmarchepublic'].sudo().search([] ,limit=15)
return http.request.render('coopaname_helpdesk.liste_offres', {'tickets': tickets })
my template.xml :
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="liste_offres" model="ir.ui.view">
<field name="name">coopaname_helpdesk.marchepublic</field>
<field name="inherit_id" ref="coopaname_helpdesk.marchepublic" />
<field name="mode">primary</field>
<field name="key">coopaname_helpdesk.liste_offres</field>
<field name="arch" type="xml">
<xpath expr="//div" position="after">
<div class="oe_structure" >
<div class="container" >
<t t-foreach="tickets" t-as="ticket">
<div class="col-md-4 col-xs-12 " style="text-align: center; ">
<div class="panel panel-primary">
<div class="panel-heading text-center" style="height:85px;" >
<h3 style="margin: 0" class="o_default_snippet_text"><span t-field="ticket.x_cat"/></h3>
<p style="margin: 0" class="o_default_snippet_text"><span t-field="ticket.x_date_order"/></p>
</div>
<div class="panel-body text-center text-muted" style="background-color: rgba(0,0,0,0.1); width: 350px; height:75px;">
<h3 style="margin: 0">
<b style="font-size: 25px; color: #8EA2C6" class="o_default_snippet_text"><span t-field="ticket.x_objet_consultation"/></b>
</h3>
</div>
<ul class="list-group" >
<li class="list-group-item o_default_snippet_text"><a t-attf-href="/coopaname_helpdesk/annonce/#{ticket.id}">#<t t-esc="ticket.id"/></a></li>
<li class="list-group-item o_default_snippet_text">Statut de l'offre : <span t-field="ticket.x_etape"/></li>
<li class="list-group-item o_default_snippet_text">Pouvoir Adjudicateur : <span t-field="ticket.x_admin"/></li>
<li class="list-group-item o_default_snippet_text">Ville du Pouvoir Adjudicateur: <span t-field="ticket.x_ville_adju"/></li>
<li class="list-group-item o_default_snippet_text">Date limite de dépot de candidature: <span t-field="ticket.x_date_limite"/></li>
</ul>
<div class="panel-footer text-center">
<p class="text-muted">
<i class="o_default_snippet_text"> Publié par : <span t-field="ticket.x_name"/></i>
</p>
<a t-attf-href="/coopaname_helpdesk/annonce/#{ticket.id}" class="btn btn-primary btn-lg o_default_snippet_text">Plus d'information</a>
</div>
</div>
</div>
</t>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>