adda-odoo e330f345ff [FIX] pos_sale: remove redundant try-catch block
Issue -->

In `_onClickSaleOrder`, we load in the partner on the sale order using
`load_new_partners()`. However, the search on the `res.partner` model made in
this method has the potential to return every single `res.partner` record
because of the domain that it uses --> https://github.com/odoo/odoo/blob/6c2dd5fbd9898f0efecdc35593af69bfd7d4eb50/addons/point_of_sale/static/src/js/models.js#L783-L785

After doing so, we check if the parter has been loaded and we grab the id using
`get_partner_by_id`. If the partner is not loaded, we use `_loadPartners` to
load them.

Since we are already checking and reloading the partner on the sale order
using `_loadPartners`, using `load_new_partners()` earlier is redundant.

Solution -->

Remove the try-catch block that loads multiple `res.partner` records during
the process of clicking a sale order via POS.

opw-3619941

closes odoo/odoo#157469

X-original-commit: b47e7bdd15e0738b479153fec495d009aeae9967
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Aditya Dasgupta (adda) <adda@odoo.com>
2024-03-12 21:35:08 +00:00
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%