Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot remove Inventory Levels xxxx. , when select stock location in a inventory item page. #9154

Closed
Attachai77 opened this issue Sep 17, 2024 · 1 comment · Fixed by #9156

Comments

@Attachai77
Copy link

Bug report

Describe the bug

I'd like to manage & selected locations in inventory item page and submit , so I was getting an error below.

System information

Medusa version (including plugins): v2.0.9
Node.js version: v20.12.2
Database:
Operating system:
Browser (if relevant):

Steps to reproduce the behavior

  1. Go to 'Inventory Item page'
  2. Click on 'select a location and save'
  3. Scroll down to 'toast'
  4. See error

Expected behavior

It seem 3-4 days ago it worked.

Screenshots

Screenshot 2567-09-17 at 11 41 29

more error

error:   Cannot remove Inventory Levels for sloc_01J57Q89ZK9HWJQP07W9ERKNS5 because there are stocked or reserved items at the locations
{
  message: 'Cannot remove Inventory Levels for sloc_01J57Q89ZK9HWJQP07W9ERKNS5 because there are stocked or reserved items at the locations',
  name: 'Error',
  stack: 'Error: Cannot remove Inventory Levels for sloc_01J57Q89ZK9HWJQP07W9ERKNS5 because there are stocked or reserved items at the locations\n' +
    '    at Object.<anonymous> (/app/medusa/node_modules/@medusajs/core-flows/dist/inventory/workflows/delete-inventory-levels.js:15:15)\n' +
    '    at Object.invoke (/app/medusa/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/create-step-handler.ts:58:67)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
    '    at async DistributedTransaction.handler (/app/medusa/node_modules/@medusajs/orchestration/src/workflow/workflow-manager.ts:214:16)\n' +
    '    at async Promise.allSettled (index 0)\n' +
    '    at async promiseAll (/app/medusa/node_modules/@medusajs/utils/src/common/promise-all.ts:23:18)\n' +
    '    at async TransactionOrchestrator.executeNext (/app/medusa/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:856:7)\n' +
    '    at async TransactionOrchestrator.resume (/app/medusa/node_modules/@medusajs/orchestration/src/transaction/transaction-orchestrator.ts:901:5)\n' +
    '    at async LocalWorkflow.run (/app/medusa/node_modules/@medusajs/orchestration/src/workflow/local-workflow.ts:370:5)\n' +
    '    at async originalExecution (/app/medusa/node_modules/@medusajs/workflows-sdk/src/helper/workflow-export.ts:105:25)',
  __isMedusaError: true,
  type: 'not_allowed',
  code: undefined,
  date: 2024-09-17T04:27:13.585Z
}

Additional info

  • I can't add or delete any location in inventory item
@olivermrbl
Copy link
Contributor

@Attachai77, nice catch. We'll patch this asap :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants