magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Magento 2.1.4 RMA Doesnt create Shipping Label. Error: "No authorized items or allowed shipping methods" #8473

Closed sashas777 closed 7 years ago

sashas777 commented 7 years ago

Preconditions

  1. Magento EE 2.1.4 with sample data is installed.
  2. UPS configured at the admin with credentials and following: Enabled for Checkout: No, Enabled for RMA: Yes, Type: United Parcel Service XML

Steps to reproduce

  1. Place an order (with any other non free shipping method)
  2. Process it to the complete state
  3. Create RMA for the order and authorize item(s)
  4. Click Create Shipping label at the admin RMA screen.

Expected result

  1. Magento should show modal dialog with available shipping methods

Actual result

  1. Magento shows modal dialog with the error: "No authorized items or allowed shipping methods"

Issue Description

When the Magento gets avaiable methods for RMA it lookup shipping methods which has configuration field "active_rma" set to 1 (true) and collect rates for them:

vendor/magento/module-rma/Model/Rma.php Line: 1233 $result = $shipping->setCarrierAvailabilityConfigField('active_rma')->collectRates($request)->getResult();

Then Shipping Model collect rates and check if shipping method enabled:

vendor/magento/module-shipping/Model/Shipping.php Line:243 $carrier = $this->_carrierFactory->createIfActive($carrierCode, $request->getStoreId());

This calls to the Carrier Factory: vendor/magento/module-shipping/Model/CarrierFactory.php Line: 105

   /**
     * Create carrier by its code if it is active
     *
     * @param string $carrierCode
     * @param null|int $storeId
     * @return bool|Carrier\AbstractCarrier
     */
    public function createIfActive($carrierCode, $storeId = null)
    {
        return $this->_scopeConfig->isSetFlag(
            'carriers/' . $carrierCode . '/active',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        ) ? $this->create(
            $carrierCode,
            $storeId
        ) : false;
    }

This function checks for configuration "active" field instead of "active_rma" . It should be checking for "active_rma" during RMA creation.

korostii commented 7 years ago

Hi. You do know that there exists a priority queue for the EE bugs somewhere inside your Merchant(or Partner) Portal, right? Your chances of having this fixed might be higher when reporting it through there as well.

sashas777 commented 7 years ago

@korostii

Thank you. I will also add it at the merchant portal.

veloraven commented 7 years ago

@sashas777 thank you for your feedback. I'm closing this issue as RMA functionality is available in Enterprise edition only. Please report EE issues via the Support portal of your account or Partner portal if you are a partner reporting on behalf of a merchant. Github is intended for Community edition reports given no account management for CE users. This will allow for proper tracking of issues at the account level.