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:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/admin/orders/detail.jinja'
- context_object_name = 'order'
- class shuup.admin.modules.orders.views.detail.OrderSetStatusView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
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, supplier, quantity)[source]
Get price info of given product for given context parameters.
- class shuup.admin.modules.orders.views.edit.OrderEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/admin/orders/create.jinja'
- context_object_name = 'order'
- title = 'Create Order'
- fields = []
shuup.admin.modules.orders.views.list module
- class shuup.admin.modules.orders.views.list.OrderListView[source]
Bases:
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, incl. tax> taxful_total_price_value, <Column: Total, excl. tax> taxless_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']
- get_queryset()[source]
Return the list of items for this view.
The return value must be an iterable and may be an instance of
QuerySet
in which caseQuerySet
specific behavior will be enabled.
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
shuup.admin.modules.orders.views.log module
shuup.admin.modules.orders.views.payment module
- class shuup.admin.modules.orders.views.payment.OrderCreatePaymentView(**kwargs)[source]
Bases:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/admin/orders/create_payment.jinja'
- context_object_name = 'order'
- form_class
alias of
Form
- class shuup.admin.modules.orders.views.payment.OrderSetPaidView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.admin.modules.orders.views.payment.OrderDeletePaymentView(**kwargs)[source]
Bases:
BaseDeleteView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
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, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
Form
- base_fields = {'amount': <django.forms.fields.DecimalField object>, 'line_number': <django.forms.fields.ChoiceField object>, 'quantity': <django.forms.fields.DecimalField object>, 'restock_products': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
- declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'line_number': <django.forms.fields.ChoiceField object>, 'quantity': <django.forms.fields.DecimalField object>, 'restock_products': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.orders.views.refund.OrderCreateRefundView(**kwargs)[source]
Bases:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/admin/orders/create_refund.jinja'
- context_object_name = 'order'
- form_class
alias of
RefundFormFormSet
- 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, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
Form
- base_fields = {'restock_products': <django.forms.fields.BooleanField object>}
- declared_fields = {'restock_products': <django.forms.fields.BooleanField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.orders.views.refund.OrderCreateFullRefundView(**kwargs)[source]
Bases:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
ModifiableFormMixin
,Form
- form_modifier_provide_key = 'admin_extend_create_shipment_form'
- base_fields = {'description': <django.forms.fields.CharField object>, 'tracking_code': <django.forms.fields.CharField object>, 'tracking_url': <django.forms.fields.URLField object>}
- declared_fields = {'description': <django.forms.fields.CharField object>, 'tracking_code': <django.forms.fields.CharField object>, 'tracking_url': <django.forms.fields.URLField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.orders.views.shipment.OrderCreateShipmentView(**kwargs)[source]
Bases:
ModifiableViewMixin
,UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/admin/orders/create_shipment.jinja'
- context_object_name = 'order'
- form_class
alias of
ShipmentForm
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- 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:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'shipment'
- class shuup.admin.modules.orders.views.shipment.ShipmentSetSentView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'shipment'
- class shuup.admin.modules.orders.views.shipment.ShipmentListView[source]
Bases:
PicotableListView
- template_name = 'shuup/admin/orders/shipment_picotable.jinja'
- default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
- get_queryset()[source]
Return the list of items for this view.
The return value must be an iterable and may be an instance of
QuerySet
in which caseQuerySet
specific behavior will be enabled.
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
shuup.admin.modules.orders.views.status module
- class shuup.admin.modules.orders.views.status.OrderStatusForm(**kwargs)[source]
Bases:
MultiLanguageModelForm
- clean()[source]
Avoid partially translated languages where the translated fields that are required are not set.
- save(commit=True)[source]
Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.
- base_fields = {'allowed_next_statuses': <django.forms.models.ModelMultipleChoiceField object>, 'identifier': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>, 'ordering': <django.forms.fields.IntegerField object>, 'public_name': <django.forms.fields.CharField object>, 'role': <enumfields.forms.EnumChoiceField object>, 'visible_for_customer': <django.forms.fields.BooleanField object>}
- declared_fields = {'name': <django.forms.fields.CharField object>, 'public_name': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.orders.views.status.OrderStatusEditView(**kwargs)[source]
Bases:
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'
- class shuup.admin.modules.orders.views.status.OrderStatusListView[source]
Bases:
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: Allowed Next Status> allowed_next_statuses, <Column: Visible For Customer> visible_for_customer, <Column: Active> is_active]
Module contents
- class shuup.admin.modules.orders.views.NewLogEntryView(**kwargs)[source]
Bases:
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:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'order'
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/_address_edit.jinja'
- class shuup.admin.modules.orders.views.OrderDetailView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'order'
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/detail.jinja'
- class shuup.admin.modules.orders.views.OrderEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'order'
- fields = []
- template_name = 'shuup/admin/orders/create.jinja'
- title = 'Create Order'
- class shuup.admin.modules.orders.views.OrderListView[source]
Bases:
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, incl. tax> taxful_total_price_value, <Column: Total, excl. tax> taxless_total_price_value]
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
- get_queryset()[source]
Return the list of items for this view.
The return value must be an iterable and may be an instance of
QuerySet
in which caseQuerySet
specific behavior will be enabled.
- mass_actions = ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']
- class shuup.admin.modules.orders.views.OrderCreatePaymentView(**kwargs)[source]
Bases:
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_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/create_payment.jinja'
- class shuup.admin.modules.orders.views.OrderCreateFullRefundView(**kwargs)[source]
Bases:
UpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'order'
- form_class
alias of
FullRefundConfirmationForm
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/create_full_refund.jinja'
- class shuup.admin.modules.orders.views.OrderCreateRefundView(**kwargs)[source]
Bases:
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_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/create_refund.jinja'
- class shuup.admin.modules.orders.views.OrderCreateShipmentView(**kwargs)[source]
Bases:
ModifiableViewMixin
,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
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'shuup/admin/orders/create_shipment.jinja'
- class shuup.admin.modules.orders.views.OrderSetPaidView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.admin.modules.orders.views.OrderSetStatusView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.admin.modules.orders.views.OrderStatusEditView(**kwargs)[source]
Bases:
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
- template_name = 'shuup/admin/orders/status.jinja'
- class shuup.admin.modules.orders.views.OrderStatusListView[source]
Bases:
PicotableListView
- default_columns = [<Column: Identifier> identifier, <Column: Name> name, <Column: Public Name> public_name, <Column: Role> role, <Column: Default> default, <Column: Allowed Next Status> allowed_next_statuses, <Column: Visible For Customer> visible_for_customer, <Column: Active> is_active]
- model
alias of
OrderStatus
- class shuup.admin.modules.orders.views.ShipmentDeleteView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'shipment'
- class shuup.admin.modules.orders.views.UpdateAdminCommentView(**kwargs)[source]
Bases:
View
Update order’s admin comment.
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.admin.modules.orders.views.OrderDeletePaymentView(**kwargs)[source]
Bases:
BaseDeleteView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- delete(request, *args, **kwargs)[source]
Call the delete() method on the fetched object and then redirect to the success URL.
- class shuup.admin.modules.orders.views.ShipmentSetSentView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'shipment'
- class shuup.admin.modules.orders.views.ShipmentListView[source]
Bases:
PicotableListView
- default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
- get_queryset()[source]
Return the list of items for this view.
The return value must be an iterable and may be an instance of
QuerySet
in which caseQuerySet
specific behavior will be enabled.
- template_name = 'shuup/admin/orders/shipment_picotable.jinja'