[Fix]: traceback on sharing a sale order to the portal group (Maintenance Issue:612594)

[Fix]: traceback on sharing a sale order to the portal group (Maintenance Issue:612594)

This branch fixes the issue for sharing a sale order to the portal group. To reproduce the issue 
1. Create/Select a Sale Order and select Share from the side bar menu "more" 
2. Click on share and select sharing method "Existing group" and select "portal from the list. 
3. Click on the share button.

You will get the traceback.