website_search_products: Fix permissions

This commit is contained in:
Luis 2024-02-20 10:27:45 +01:00
parent fdf4e1c2a7
commit 846235f9ca
3 changed files with 71 additions and 58 deletions

View file

@ -9,57 +9,70 @@
<div class="container">
<div class="col-md-12">
<t t-if="products">
<div class="alert alert-success">
Displayed products
</div>
<div class="alert alert-success">
Displayed products
</div>
</t>
<t t-if="not_found">
<div class="alert alert-danger">
Products not found
</div>
<div class="alert alert-danger">
Products not found
</div>
</t>
<div class="col-md-12" style="text-align: center;"><h2>In this table you can consult all the products available in the store</h2></div>
<div class="col-md-12" style="text-align: center;">
<h2>In this table you can consult all the products available in the
store</h2>
</div>
<div class="col-md-12" style="margin-top: 50px;">
<table id="productTable" class="table stripe" >
<table id="productTable" class="table stripe">
<thead>
<tr>
<th>Name</th>
<th>Category</th>
<th>Category</th>
<th>Price</th>
<th>Quantity</th>
<th>UoM</th>
</tr>
</thead>
<tbody id="stockList" >
<tbody id="stockList">
<t t-foreach="products" t-as="product">
<tr>
<td><span t-esc="product.name"/></td>
<td><span t-esc="product.categ_id.name"/></td>
<td><span t-esc="product.list_price" t-options='{"widget": "monetary", "display_currency": res_company.currency_id}' /></td>
<td><span t-esc="product.sudo().qty_available" t-options='{"widget": "float", "precision": 2}' /></td>
<td><span t-esc="product.sudo().uom_id.name" /></td>
<td>
<span t-esc="product.name" />
</td>
<td>
<span t-esc="product.categ_id.name" />
</td>
<td>
<span t-esc="product.list_price"
t-options='{"widget": "monetary", "display_currency": res_company.currency_id}' />
</td>
<td>
<span t-esc="product.sudo().qty_available"
t-options='{"widget": "float", "precision": 2}' />
</td>
<td>
<span t-esc="product.sudo().uom_id.name" />
</td>
</tr>
</t>
</t>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js" />
<script src="https://cdn.datatables.net/plug-ins/1.13.2/filtering/type-based/accent-neutralise.js" />
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css" />
<script>
$('#productTable').DataTable({
"pageLength": 100,
"order": [[1, "asc"], [0, "asc"], [2, "desc"]],
"language": {
"url": "https://cdn.datatables.net/plug-ins/1.13.1/i18n/es-ES.json"
}
});
</script>
</t>
</div>
<link rel="stylesheet"
href="https://cdn.datatables.net/2.0.0/css/dataTables.dataTables.css" />
<script src="https://cdn.datatables.net/2.0.0/js/dataTables.js"></script>
<script>
$('#productTable').DataTable({
"pageLength": 100,
"order": [[1, "asc"], [0, "asc"], [2, "desc"]],
"language": {
"url": "https://cdn.datatables.net/plug-ins/1.13.1/i18n/es-ES.json"
}
});
</script>
</t>
</template>
</odoo>
</odoo>