{{ message }}
Repository navigation
[19.0][FIX] shopify_connector: allow delivery validation without Shopify access - #17
Merged
OCA-git-bot merged 1 commit intoSep 29, 2026
Conversation
…cess stock.picking._action_done read sale_id.shopify_binding_ids as the current user. shopify.order is only readable by Shopify managers, so any other user (e.g. Inventory / User) got an AccessError when validating a delivery of a sale order. Look the bindings up with sudo(); the push job already runs as superuser.
Contributor
Author
Contributor
|
This PR looks fantastic, let's merge it! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-up to #14 (same class of bug, different entry point).
Problem
StockPickingShopifyFulfillmentSync._action_donereadspicking.sale_id.shopify_binding_idsas the current user.shopify.orderis only readable bygroup_shopify_manager, so any other user (Inventory / User, …) gets anAccessErrorwhen validating a delivery of a sale order:Fix
Look the bindings up with
sudo(). Only the lookup is elevated: the validation still runs as the user, and_job_push_picking_fulfillmentalready switches tosudo()itself.Test
test_stock_user_can_validate_picking_of_shopify_order: an Inventory / User validates a delivery of a Shopify order. The test checks that the picking is done, that the fulfillment push job is enqueued, and that the user still cannot read the bindings. As in #14, the cache is invalidated before validation so a warm cache does not hide the bug.Verified with
ghcr.io/oca/oca-ci/py3.10-odoo19.0:AccessErrorabove.0 failed, 0 error(s) of 177 tests.18.0 has both this lookup and the one fixed in #14 unsudoed; a backport will follow.