To solve this optimization problem, we need to define the decision variables, the objective function, and the constraints.

Let's denote:
- $x$ as the number of sofas to buy and sell,
- $y$ as the number of beds to buy and sell.

The objective is to maximize profit. The profit from selling a sofa is $100, and the profit from selling a bed is $200. So, the total profit can be represented by the function: $100x + 200y$.

There are two main constraints:
1. Space constraint: Each sofa takes 8 sq ft of space, and each bed takes 12 sq ft of space. The outlet has 500 sq ft available. This can be represented as: $8x + 12y \leq 500$.
2. Budget constraint: Buying a sofa costs $200, and buying a bed costs $300. The outlet has a budget of $12500. This can be represented as: $200x + 300y \leq 12500$.
3. Additionally, there's a constraint that at least 30% of the items in stock must be sofas. If we denote the total number of items by $x + y$, then this constraint can be written as: $x \geq 0.3(x + y)$.

Now, let's express these constraints and the objective function in Gurobi code:

```python
from gurobipy import *

# Create a new model
m = Model("Outlet Optimization")

# Define the decision variables
x = m.addVar(name="sofas", vtype=GRB.INTEGER, lb=0)
y = m.addVar(name="beds", vtype=GRB.INTEGER, lb=0)

# Define the objective function: Maximize profit
m.setObjective(100*x + 200*y, GRB.MAXIMIZE)

# Add constraints
m.addConstr(8*x + 12*y <= 500, name="space_constraint")
m.addConstr(200*x + 300*y <= 12500, name="budget_constraint")
m.addConstr(x >= 0.3*(x + y), name="sofa_percentage_constraint")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of sofas: {x.x}")
    print(f"Number of beds: {y.x}")
    print(f"Maximum profit: {m.objVal}")
else:
    print("No optimal solution found. The model is infeasible.")

```