diff --git a/addons/sale_project/models/project.py b/addons/sale_project/models/project.py index 6ec8142f33d..1d5f4d694fb 100644 --- a/addons/sale_project/models/project.py +++ b/addons/sale_project/models/project.py @@ -285,7 +285,7 @@ class Project(models.Model): domain = self.sudo()._get_sale_items_domain() return { 'total': self.env['sale.order.line'].sudo().search_count(domain), - 'data': self.get_sale_items_data(domain, limit=10, with_action=with_action), + 'data': self.get_sale_items_data(domain, limit=5, with_action=with_action), } def _show_profitability(self): diff --git a/addons/sale_project/static/src/right_panel/project_right_panel.js b/addons/sale_project/static/src/right_panel/project_right_panel.js index d186ce196f7..dc2ceafccd4 100644 --- a/addons/sale_project/static/src/right_panel/project_right_panel.js +++ b/addons/sale_project/static/src/right_panel/project_right_panel.js @@ -7,7 +7,7 @@ patch(ProjectRightPanel.prototype, '@sale_project/right_panel/project_right_pane async _loadAdditionalSalesOrderItems() { const offset = this.state.data.sale_items.data.length; const totalRecords = this.state.data.sale_items.total; - const limit = totalRecords - offset <= 10 ? totalRecords - offset : 10; + const limit = totalRecords - offset <= 5 ? totalRecords - offset : 5; const saleOrderItems = await this.rpc({ model: 'project.project', method: 'get_sale_items_data',