Open bwrm opened 4 years ago
It seems as if you never materialize the Order
model. The easiest way to do this is to import the default Order model somewhere in your project.
...
from shop.models.defaults.order import Order
Yes, Order model doesn't materialized, but Order and OrderItem imported to
myshop.models.__init__.py.
from shop.models.defaults.order import Order
from shop.models.defaults.order_item import OrderItem
from myshop.models.address import ShippingAddress
...
This problem occur, when creating any custom workflow.
I'm sorry, without fully seeing your code, I can't reproduce that error.
Hi @bwrm, @jrief.
I've had this happen to me recently, it was due to the location of modifers/providers/workflows. If for a custom payment you put all the code in payment.py
this will happen. I believe modifiers must be specified in a separate file from workflows to avoid checks for materialized order. Hope this helps. =)
@bwrm could you please paste the full stack using a service such as https://dpaste.de
Problem I'm trying to create own SelfCollectionWorkflowMixin. I've created class:
While running it is showing the following error:
But BaseOrder implemented as Order in MyShop as described in https://django-shop.readthedocs.io/en/latest/reference/order.html