diff options
| author | Rémy Voet (ryv) <ryv@odoo.com> | 2021-03-11 14:59:38 +0000 |
|---|---|---|
| committer | Rémy Voet (ryv) <ryv@odoo.com> | 2021-03-12 06:48:22 +0000 |
| commit | a1a4f4548b395127cf7f816379a63f2d47688893 (patch) | |
| tree | 6ab972f98062bf98c4fbc5922f454d62b7421752 /addons/web/static/src | |
| parent | 1e2433bae433311a8ba1ff951580b4f9e8a2f696 (diff) | |
[FIX] mrp: avoid dynamic domain for product_id in MO form
Issue:
On DB with a lot of product (e.g. 50K) the MO form is very slow
open/modify. It is due to the `_compute_allowed_product_ids` which
will set the `allowed_product_ids` fields with all product ids possible
(32K), then the `convert_to_record` will take a bunch of time to filter
out no-active product.
Fix:
In your case, to avoid to send bunch of ids to the web framework and
bypass the costly `convert_to_record`, we decided to simply (static) the
domain of `product_id` (`mrp.production`). The flow will be slightly
different (doesn't filter depending of `bom_id`) but still good and
maybe better (we can now modify the product without removing the
BoM/product in the MO form).
The `_compute_allowed_product_ids` remains unchanged (for stability)
but we remove the `allowed_product_ids` from the form view
(then a upgrade is needed to be effective).
opw-2475151
closes odoo/odoo#67696
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions
