[IMP] delivery: disable only delivery carriers from external providers

Only delivery carriers that can communicate with the outside should be deactivated.
Every time a database is neutralized, all delivery carriers are deactivated. In staging or test databases this should not be the case, only delivery carriers with an external connection, i.e. delivery carriers with an external provider should be deactivated.
Delivery carriers with fixed price or based on rules should not be deactivated with every neutralization. This way Odoo can continue to operate with shipping methods without prejudice to the users in neutralized databases.

@moduon MT-5612

closes odoo/odoo#161182

X-original-commit: bdaeae0230fe0da7743f8cc4ed9dcb210b994540
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
This commit is contained in:
Emilio Pascual
2024-04-11 08:12:56 +00:00
parent 3117ba3d4a
commit 7d7e2a1cf4
2 changed files with 9 additions and 3 deletions
+6 -3
View File
@@ -1,4 +1,7 @@
-- disable delivery carriers
-- disable prod environment in all delivery carriers
UPDATE delivery_carrier
SET prod_environment = false,
active = false;
SET prod_environment = false;
-- disable delivery carriers from external providers
UPDATE delivery_carrier
SET active = false
WHERE delivery_type NOT IN ('fixed', 'base_on_rule');
@@ -0,0 +1,3 @@
-- disable mondialrelay
UPDATE delivery_carrier
SET mondialrelay_brand = 'BDTEST ';