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'
get_queryset()[source]
get_form(form_class=None)[source]
form_valid(form)[source]
get_form_kwargs()[source]
get_context_data(**kwargs)[source]

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'
get_toolbar()[source]
get_queryset()[source]
get_context_data(**kwargs)[source]
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

get_queryset()[source]
get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]

shuup.admin.modules.orders.views.edit module

shuup.admin.modules.orders.views.edit.create_order_from_state(state, **kwargs)[source]
shuup.admin.modules.orders.views.edit.update_order_from_state(state, order_to_update, **kwargs)[source]
shuup.admin.modules.orders.views.edit.create_source_from_state(state, **kwargs)[source]
shuup.admin.modules.orders.views.edit.encode_address(address, tax_number='')[source]
shuup.admin.modules.orders.views.edit.encode_shop(shop)[source]
shuup.admin.modules.orders.views.edit.encode_method(method)[source]
shuup.admin.modules.orders.views.edit.encode_line(line)[source]
shuup.admin.modules.orders.views.edit.get_line_data_for_edit(order, line)[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: 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 = []
get_context_data(**kwargs)[source]
get_toolbar()[source]
get_config()[source]
get_initial_order_data()[source]
get_customer_data(customer_id)[source]
dispatch(request, *args, **kwargs)[source]
dispatch_command(request)[source]
handle_product_data(request)[source]
handle_customer_data(request)[source]
handle_customer_exists(request)[source]
handle_customer_details(request)[source]
get_request_body(request)[source]
handle_source_data(request)[source]
handle_finalize(request)[source]
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.

post(request, *args, **kwargs)[source]

shuup.admin.modules.orders.views.list module

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]
related_objects = [('shop', 'shuup.core.models:Shop'), ('billing_address', 'shuup.core.models:ImmutableAddress'), ('shipping_address', 'shuup.core.models:ImmutableAddress')]
mass_actions = ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']
toolbar_buttons_provider_key = 'order_list_toolbar_provider'
mass_actions_provider_key = 'order_list_mass_actions_provider'
get_toolbar()[source]
get_queryset()[source]
format_customer_name(instance, *args, **kwargs)[source]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
label(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]

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.

post(request, *args, **kwargs)[source]

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_queryset()[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_form(form_class=None)[source]
form_invalid(form)[source]
form_valid(form)[source]
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

get_queryset()[source]
get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.payment.OrderDeletePaymentView(**kwargs)[source]

Bases: django.views.generic.edit.BaseDeleteView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

get_queryset()[source]
delete(request, *args, **kwargs)[source]

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: django.forms.forms.Form

clean_line_number()[source]
clean_quantity()[source]
clean_amount()[source]
base_fields = OrderedDict([('line_number', <django.forms.fields.ChoiceField object>), ('quantity', <django.forms.fields.DecimalField object>), ('text', <django.forms.fields.CharField object>), ('amount', <django.forms.fields.DecimalField object>), ('restock_products', <django.forms.fields.BooleanField object>)])
declared_fields = OrderedDict([('line_number', <django.forms.fields.ChoiceField object>), ('quantity', <django.forms.fields.DecimalField object>), ('text', <django.forms.fields.CharField object>), ('amount', <django.forms.fields.DecimalField object>), ('restock_products', <django.forms.fields.BooleanField object>)])
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_queryset()[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_form(form_class=None)[source]
form_valid(form)[source]
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: django.forms.forms.Form

base_fields = OrderedDict([('restock_products', <django.forms.fields.BooleanField object>)])
declared_fields = OrderedDict([('restock_products', <django.forms.fields.BooleanField object>)])
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

get_queryset()[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
form_valid(form)[source]

shuup.admin.modules.orders.views.shipment module

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.

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:
Returns:

Saved, complete Shipment object.

Return type:

shuup.core.models.Shipment

form_class

alias of ShipmentForm

form_invalid(form)[source]
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)[source]
get_form_kwargs()[source]
get_queryset()[source]
get_success_url()[source]
model

alias of Order

template_name = 'shuup/admin/orders/create_shipment.jinja'
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.

context_object_name = 'shipment'
get(request, *args, **kwargs)[source]
get_queryset()[source]
get_success_url()[source]
model

alias of Shipment

post(request, *args, **kwargs)[source]
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: shuup.admin.form_modifier.ModifiableFormMixin, django.forms.forms.Form

base_fields = OrderedDict([('description', <django.forms.fields.CharField object>), ('tracking_code', <django.forms.fields.CharField object>), ('tracking_url', <django.forms.fields.URLField object>)])
declared_fields = OrderedDict([('description', <django.forms.fields.CharField object>), ('tracking_code', <django.forms.fields.CharField object>), ('tracking_url', <django.forms.fields.URLField object>)])
form_modifier_provide_key = 'admin_extend_create_shipment_form'
media
class shuup.admin.modules.orders.views.shipment.ShipmentListView[source]

Bases: shuup.admin.utils.views.PicotableListView

create_action_buttons(instance)[source]
default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
get_content(instance)[source]
get_object_abstract(instance, item)[source]
get_order(instance)[source]
get_queryset()[source]
get_supplier(instance)[source]
model

alias of Shipment

template_name = 'shuup/admin/orders/shipment_picotable.jinja'
tracking_code_url(instance)[source]
class shuup.admin.modules.orders.views.shipment.ShipmentSetSentView(**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'
get(request, *args, **kwargs)[source]
get_queryset()[source]
get_success_url()[source]
model

alias of Shipment

post(request, *args, **kwargs)[source]

shuup.admin.modules.orders.views.status module

class shuup.admin.modules.orders.views.status.OrderStatusForm(**kwargs)[source]

Bases: shuup.utils.multilanguage_model_form.MultiLanguageModelForm

class Meta[source]

Bases: object

model

alias of OrderStatus

exclude = ['default']
clean()[source]
save(commit=True)[source]
base_fields = OrderedDict([('identifier', <django.forms.fields.CharField object>), ('ordering', <django.forms.fields.IntegerField object>), ('role', <enumfields.forms.EnumChoiceField object>), ('is_active', <django.forms.fields.BooleanField object>), ('name', <django.forms.fields.CharField object>), ('public_name', <django.forms.fields.CharField object>)])
declared_fields = OrderedDict([('name', <django.forms.fields.CharField object>), ('public_name', <django.forms.fields.CharField object>)])
media
class shuup.admin.modules.orders.views.status.OrderStatusEditView(**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 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: 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.

post(request, *args, **kwargs)[source]
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'
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)[source]
get_form_kwargs()[source]
get_queryset()[source]
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'
get_context_data(**kwargs)[source]
get_queryset()[source]
get_toolbar()[source]
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'
dispatch(request, *args, **kwargs)[source]
dispatch_command(request)[source]
fields = []
get_config()[source]
get_context_data(**kwargs)[source]
get_customer_data(customer_id)[source]
get_initial_order_data()[source]
get_request_body(request)[source]
get_toolbar()[source]
handle_customer_data(request)[source]
handle_customer_details(request)[source]
handle_customer_exists(request)[source]
handle_finalize(request)[source]
handle_product_data(request)[source]
handle_source_data(request)[source]
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]
format_customer_name(instance, *args, **kwargs)[source]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]
get_queryset()[source]
get_toolbar()[source]
label(instance, *args, **kwargs)[source]
mass_actions = ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']
mass_actions_provider_key = 'order_list_mass_actions_provider'
model

alias of Order

related_objects = [('shop', 'shuup.core.models:Shop'), ('billing_address', 'shuup.core.models:ImmutableAddress'), ('shipping_address', 'shuup.core.models:ImmutableAddress')]
toolbar_buttons_provider_key = 'order_list_toolbar_provider'
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

form_invalid(form)[source]
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)[source]
get_form_kwargs()[source]
get_queryset()[source]
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

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_queryset()[source]
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

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)[source]
get_form_kwargs()[source]
get_queryset()[source]
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:
Returns:

Saved, complete Shipment object.

Return type:

shuup.core.models.Shipment

form_class

alias of ShipmentForm

form_invalid(form)[source]
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)[source]
get_form_kwargs()[source]
get_queryset()[source]
get_success_url()[source]
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.

get(request, *args, **kwargs)[source]
get_queryset()[source]
model

alias of Order

post(request, *args, **kwargs)[source]
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.

get(request, *args, **kwargs)[source]
get_queryset()[source]
model

alias of Order

post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.OrderStatusEditView(**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 = '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: 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'
get(request, *args, **kwargs)[source]
get_queryset()[source]
get_success_url()[source]
model

alias of Shipment

post(request, *args, **kwargs)[source]
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.

post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.OrderDeletePaymentView(**kwargs)[source]

Bases: django.views.generic.edit.BaseDeleteView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

delete(request, *args, **kwargs)[source]
get_queryset()[source]
model

alias of Order

class shuup.admin.modules.orders.views.ShipmentSetSentView(**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'
get(request, *args, **kwargs)[source]
get_queryset()[source]
get_success_url()[source]
model

alias of Shipment

post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.ShipmentListView[source]

Bases: shuup.admin.utils.views.PicotableListView

create_action_buttons(instance)[source]
default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
get_content(instance)[source]
get_object_abstract(instance, item)[source]
get_order(instance)[source]
get_queryset()[source]
get_supplier(instance)[source]
model

alias of Shipment

template_name = 'shuup/admin/orders/shipment_picotable.jinja'
tracking_code_url(instance)[source]