shuup.admin.modules.orders.views package¶
Submodules¶
shuup.admin.modules.orders.views.addresses module¶
-
class
shuup.admin.modules.orders.views.addresses.
OrderAddressEditView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
context_object_name
= 'order'¶
-
template_name
= 'shuup/admin/orders/_address_edit.jinja'¶
-
shuup.admin.modules.orders.views.detail module¶
-
class
shuup.admin.modules.orders.views.detail.
OrderDetailView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/detail.jinja'¶
-
context_object_name
= 'order'¶
-
-
class
shuup.admin.modules.orders.views.detail.
OrderSetStatusView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
shuup.admin.modules.orders.views.edit module¶
-
shuup.admin.modules.orders.views.edit.
update_order_from_state
(state, order_to_update, **kwargs)[source]¶
-
shuup.admin.modules.orders.views.edit.
get_price_info
(shop, customer, product, quantity)[source]¶ Get price info of given product for given context parameters.
-
class
shuup.admin.modules.orders.views.edit.
OrderEditView
(**kwargs)[source]¶ Bases:
shuup.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create.jinja'¶
-
context_object_name
= 'order'¶
-
title
= 'Create Order'¶
-
fields
= []¶
-
-
class
shuup.admin.modules.orders.views.edit.
UpdateAdminCommentView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
Update order’s admin comment
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
shuup.admin.modules.orders.views.list module¶
-
class
shuup.admin.modules.orders.views.list.
OrderStatusChoicesFilter
(choices=None, filter_field=None, default=None)[source]¶ Bases:
shuup.admin.utils.picotable.ChoicesFilter
Custom choices filter for order statuses
Sets filter default choice to initial order status if status exists. Default order status can not be passed for init since it would cause database queries and in all cases the order status table might not even be in the database when init is called.
-
default
¶
-
-
class
shuup.admin.modules.orders.views.list.
OrderListView
[source]¶ Bases:
shuup.admin.utils.views.PicotableListView
-
model
¶ alias of
Order
-
default_columns
= [<Column: Order> identifier, <Column: Order Date> order_date, <Column: Customer> customer, <Column: Status> status, <Column: Payment Status> payment_status, <Column: Shipping Status> shipping_status, <Column: Total> taxful_total_price_value]¶
-
mass_actions
= ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']¶
-
shuup.admin.modules.orders.views.log module¶
-
class
shuup.admin.modules.orders.views.log.
NewLogEntryView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
Create a log
note
item associated with a particular order.Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
shuup.admin.modules.orders.views.payment module¶
-
class
shuup.admin.modules.orders.views.payment.
OrderCreatePaymentView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_payment.jinja'¶
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
Form
-
get_form
(form_class=None)¶
-
-
class
shuup.admin.modules.orders.views.payment.
OrderSetPaidView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
shuup.admin.modules.orders.views.refund module¶
-
class
shuup.admin.modules.orders.views.refund.
RefundForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]¶ Bases:
django.forms.forms.Form
-
base_fields
= OrderedDict([('line_number', <django.forms.fields.ChoiceField object at 0x7fabcd629ac8>), ('quantity', <django.forms.fields.DecimalField object at 0x7fabcd62beb8>), ('text', <django.forms.fields.CharField object at 0x7fabcd62b0f0>), ('amount', <django.forms.fields.DecimalField object at 0x7fabcd62bd30>), ('restock_products', <django.forms.fields.BooleanField object at 0x7fabcd8ec160>)])¶
-
declared_fields
= OrderedDict([('line_number', <django.forms.fields.ChoiceField object at 0x7fabcd629ac8>), ('quantity', <django.forms.fields.DecimalField object at 0x7fabcd62beb8>), ('text', <django.forms.fields.CharField object at 0x7fabcd62b0f0>), ('amount', <django.forms.fields.DecimalField object at 0x7fabcd62bd30>), ('restock_products', <django.forms.fields.BooleanField object at 0x7fabcd8ec160>)])¶
-
media
¶
-
-
class
shuup.admin.modules.orders.views.refund.
OrderCreateRefundView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_refund.jinja'¶
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
RefundFormFormSet
-
get_form
(form_class=None)¶
-
-
class
shuup.admin.modules.orders.views.refund.
FullRefundConfirmationForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]¶ Bases:
django.forms.forms.Form
-
base_fields
= OrderedDict([('restock_products', <django.forms.fields.BooleanField object at 0x7fabcd2b4630>)])¶
-
declared_fields
= OrderedDict([('restock_products', <django.forms.fields.BooleanField object at 0x7fabcd2b4630>)])¶
-
media
¶
-
-
class
shuup.admin.modules.orders.views.refund.
OrderCreateFullRefundView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_full_refund.jinja'¶
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
FullRefundConfirmationForm
-
shuup.admin.modules.orders.views.shipment module¶
-
class
shuup.admin.modules.orders.views.shipment.
ShipmentForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]¶ Bases:
shuup.admin.form_modifier.ModifiableFormMixin
,django.forms.forms.Form
-
form_modifier_provide_key
= 'admin_extend_create_shipment_form'¶
-
base_fields
= OrderedDict([('description', <django.forms.fields.CharField object at 0x7fabcd8ec390>), ('tracking_code', <django.forms.fields.CharField object at 0x7fabcd8ec5f8>)])¶
-
declared_fields
= OrderedDict([('description', <django.forms.fields.CharField object at 0x7fabcd8ec390>), ('tracking_code', <django.forms.fields.CharField object at 0x7fabcd8ec5f8>)])¶
-
media
¶
-
-
class
shuup.admin.modules.orders.views.shipment.
OrderCreateShipmentView
(**kwargs)[source]¶ Bases:
shuup.admin.form_modifier.ModifiableViewMixin
,django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_shipment.jinja'¶
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
ShipmentForm
-
create_shipment
(order, product_quantities, shipment)[source]¶ This function exists so subclasses can implement custom logic without overriding the entire form_valid method
Parameters: - order (shuup.core.models.Order) – Order to create the shipment for
- product_quantities (dict[shuup.shop.models.Product, decimal.Decimal]) – a dict mapping Product instances to quantities to ship
- shipment (shuup.core.models.Shipment) – unsaved Shipment for ShipmentProduct’s.
Returns: Saved, complete Shipment object
Return type:
-
-
class
shuup.admin.modules.orders.views.shipment.
ShipmentDeleteView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Shipment
-
context_object_name
= 'shipment'¶
-
shuup.admin.modules.orders.views.status module¶
-
class
shuup.admin.modules.orders.views.status.
OrderStatusForm
(**kwargs)[source]¶ Bases:
shuup.utils.multilanguage_model_form.MultiLanguageModelForm
-
OrderStatusForm.
base_fields
= OrderedDict([('identifier', <django.forms.fields.CharField object at 0x7fabcd5ca3c8>), ('ordering', <django.forms.fields.IntegerField object at 0x7fabcd2d3f98>), ('role', <enumfields.forms.EnumChoiceField object at 0x7fabcd6260f0>), ('is_active', <django.forms.fields.BooleanField object at 0x7fabcd626630>), ('name', <django.forms.fields.CharField object at 0x7fabcd8ec278>), ('public_name', <django.forms.fields.CharField object at 0x7fabcd939160>)])¶
-
OrderStatusForm.
declared_fields
= OrderedDict([('name', <django.forms.fields.CharField object at 0x7fabcd8ec278>), ('public_name', <django.forms.fields.CharField object at 0x7fabcd939160>)])¶
-
OrderStatusForm.
media
¶
-
-
class
shuup.admin.modules.orders.views.status.
OrderStatusEditView
(**kwargs)[source]¶ Bases:
shuup.admin.breadcrumbs._views.BreadcrumbedView
,shuup.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
OrderStatus
-
form_class
¶ alias of
OrderStatusForm
-
template_name
= 'shuup/admin/orders/status.jinja'¶
-
context_object_name
= 'status'¶
-
parent_name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
parent_url
= 'shuup_admin:order_status.list'¶
-
-
class
shuup.admin.modules.orders.views.status.
OrderStatusListView
[source]¶ Bases:
shuup.admin.utils.views.PicotableListView
-
model
¶ alias of
OrderStatus
-
default_columns
= [<Column: Identifier> identifier, <Column: Name> name, <Column: Public Name> public_name, <Column: Role> role, <Column: Default> default, <Column: Active> is_active]¶
-
Module contents¶
-
class
shuup.admin.modules.orders.views.
NewLogEntryView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
Create a log
note
item associated with a particular order.Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
class
shuup.admin.modules.orders.views.
OrderAddressEditView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/_address_edit.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderDetailView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/detail.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderEditView
(**kwargs)[source]¶ Bases:
shuup.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
fields
= []¶
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create.jinja'¶
-
title
= 'Create Order'¶
-
-
class
shuup.admin.modules.orders.views.
OrderListView
[source]¶ Bases:
shuup.admin.utils.views.PicotableListView
-
default_columns
= [<Column: Order> identifier, <Column: Order Date> order_date, <Column: Customer> customer, <Column: Status> status, <Column: Payment Status> payment_status, <Column: Shipping Status> shipping_status, <Column: Total> taxful_total_price_value]¶
-
mass_actions
= ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']¶
-
model
¶ alias of
Order
-
-
class
shuup.admin.modules.orders.views.
OrderCreatePaymentView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
Form
-
get_form
(form_class=None)¶
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_payment.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderCreateFullRefundView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
FullRefundConfirmationForm
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_full_refund.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderCreateRefundView
(**kwargs)[source]¶ Bases:
django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
form_class
¶ alias of
RefundFormFormSet
-
get_form
(form_class=None)¶
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_refund.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderCreateShipmentView
(**kwargs)[source]¶ Bases:
shuup.admin.form_modifier.ModifiableViewMixin
,django.views.generic.edit.UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'order'¶
-
create_shipment
(order, product_quantities, shipment)[source]¶ This function exists so subclasses can implement custom logic without overriding the entire form_valid method
Parameters: - order (shuup.core.models.Order) – Order to create the shipment for
- product_quantities (dict[shuup.shop.models.Product, decimal.Decimal]) – a dict mapping Product instances to quantities to ship
- shipment (shuup.core.models.Shipment) – unsaved Shipment for ShipmentProduct’s.
Returns: Saved, complete Shipment object
Return type:
-
form_class
¶ alias of
ShipmentForm
-
model
¶ alias of
Order
-
template_name
= 'shuup/admin/orders/create_shipment.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderSetPaidView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
-
class
shuup.admin.modules.orders.views.
OrderSetStatusView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Order
-
-
class
shuup.admin.modules.orders.views.
OrderStatusEditView
(**kwargs)[source]¶ Bases:
shuup.admin.breadcrumbs._views.BreadcrumbedView
,shuup.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'status'¶
-
form_class
¶ alias of
OrderStatusForm
-
model
¶ alias of
OrderStatus
-
parent_name
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
parent_url
= 'shuup_admin:order_status.list'¶
-
template_name
= 'shuup/admin/orders/status.jinja'¶
-
-
class
shuup.admin.modules.orders.views.
OrderStatusListView
[source]¶ Bases:
shuup.admin.utils.views.PicotableListView
-
default_columns
= [<Column: Identifier> identifier, <Column: Name> name, <Column: Public Name> public_name, <Column: Role> role, <Column: Default> default, <Column: Active> is_active]¶
-
model
¶ alias of
OrderStatus
-
-
class
shuup.admin.modules.orders.views.
ShipmentDeleteView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'shipment'¶
-
model
¶ alias of
Shipment
-
-
class
shuup.admin.modules.orders.views.
UpdateAdminCommentView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
Update order’s admin comment
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.