Repository: saleor/saleor

Issue:
Show notification when no shipping method is available
### What I'm trying to achieve
Create an order in Dashboard 2.0 and add a shipping method.

### Steps to reproduce the problem
1. Create an empty order in Dashboard 2.0.
2. Add a product that requires shipping.
3. Leave empty shipping address.
4. Click "Add shipping carrier".
5. No shipping methods are available as I haven't set the shipping address. 

### What I expected to happen
I'd expect a message in the "Edit shipping method" modal informing that I have to first add a shipping address in order to select the shipping method.

### Screenshots
![image](https://user-images.githubusercontent.com/5421321/49860934-0f4b1e80-fdfb-11e8-829a-15a00d6471c3.png)



Discussion:

Resolving patch:
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -37,7 +37,8 @@ class Checkout(CountableDjangoObjectType):
         ShippingMethod, required=False,
         description='Shipping methods that can be used with this order.')
     is_shipping_required = graphene.Boolean(
-        description='Returns True, if checkout requires shipping.')
+        description='Returns True, if checkout requires shipping.',
+        required=True)
     lines = gql_optimizer.field(
         graphene.List(
             CheckoutLine, description=(
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -179,7 +179,7 @@ class Order(CountableDjangoObjectType):
     can_finalize = graphene.Boolean(
         description=(
             'Informs whether a draft order can be finalized',
-            '(turned into a regular order).'))
+            '(turned into a regular order).'), required=True)
     total_authorized = graphene.Field(
         Money, description='Amount authorized for the order.')
     total_captured = graphene.Field(
@@ -196,7 +196,8 @@ class Order(CountableDjangoObjectType):
     user_email = graphene.String(
         required=False, description='Email address of the customer.')
     is_shipping_required = graphene.Boolean(
-        description='Returns True, if order requires shipping.')
+        description='Returns True, if order requires shipping.',
+        required=True)
     lines = graphene.List(
         OrderLine, required=True,
         description='List of order lines for the order')


Test patch:
diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
@@ -5399,6 +5399,8 @@ exports[`Storyshots Orders / OrderDraftCancelDialog default 1`] = `<div />`;
 
 exports[`Storyshots Orders / OrderDraftFinalizeDialog default 1`] = `<div />`;
 
+exports[`Storyshots Orders / OrderDraftFinalizeDialog with warnings 1`] = `<div />`;
+
 exports[`Storyshots Orders / OrderFulfillmentCancelDialog default 1`] = `<div />`;
 
 exports[`Storyshots Orders / OrderFulfillmentDialog default 1`] = `<div />`;
@@ -34216,16 +34218,7 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
                 </tr>
                 <tr>
                   <td>
-                    <a
-                      class="MuiTypography-root-id MuiTypography-body1-id Link-root-id Link-primary-id"
-                    >
-                      Add Shipping Carrier
-                    </a>
-                  </td>
-                  <td
-                    class="OrderDraftDetailsSummary-textRight-id"
-                  >
-                    $0.00
+                    No applicable shipping carriers
                   </td>
                 </tr>
                 <tr>
@@ -34509,8 +34502,9 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
         </span>
       </button>
       <button
-        class="MuiButtonBase-root-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id undefined"
-        tabindex="0"
+        class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiButton-root-id MuiButton-contained-id MuiButton-containedSecondary-id MuiButton-raised-id MuiButton-raisedSecondary-id MuiButton-disabled-id undefined"
+        disabled=""
+        tabindex="-1"
         type="button"
       >
         <span