shuup.admin.modules.orders package¶
Subpackages¶
- shuup.admin.modules.orders.views package
- Submodules
- shuup.admin.modules.orders.views.addresses module
- shuup.admin.modules.orders.views.detail module
- shuup.admin.modules.orders.views.edit module
- shuup.admin.modules.orders.views.list module
- shuup.admin.modules.orders.views.log module
- shuup.admin.modules.orders.views.payment module
- shuup.admin.modules.orders.views.refund module
- shuup.admin.modules.orders.views.shipment module
- shuup.admin.modules.orders.views.status module
- Module contents
Submodules¶
shuup.admin.modules.orders.json_order_creator module¶
-
class
shuup.admin.modules.orders.json_order_creator.
AdminOrderCreator
(request=None)[source]¶ Bases:
shuup.core.order_creator.OrderCreator
Initialize order creator.
Parameters: request (django.http.HttpRequest|None) – Optional request object for backward compatibility. Passing non-None value is DEPRECATED.
-
class
shuup.admin.modules.orders.json_order_creator.
JsonOrderCreator
[source]¶ Bases:
object
-
static
is_empty_address
(address_data)[source]¶ An address will have at least a tax_number field. It will still be considered empty.
-
is_valid
¶
-
errors
¶
-
create_source_from_state
(state, creator=None, ip_address=None, save=False, order_to_update=None)[source]¶ Create an order source from a state dict unserialized from JSON.
Parameters: - state (dict) – State dictionary.
- creator (django.contrib.auth.models.User|None) – Creator user.
- save (boolean) – Flag whether order customer and addresses is saved to database.
- order_to_update (shuup.core.models.Order|None) – Order object to edit.
Returns: The created order source, or None if something failed along the way.
Return type: OrderSource|None
-
create_order_from_state
(state, creator=None, ip_address=None)[source]¶ Create an order from a state dict unserialized from JSON.
Parameters: Returns: The created order, or None if something failed along the way.
Return type: Order|None
-
update_order_from_state
(state, order_to_update, modified_by=None)[source]¶ Update an order from a state dict unserialized from JSON.
Parameters: - state (dict) – State dictionary.
- order_to_update (shuup.core.models.Order) – Order object to edit.
Returns: The created order, or None if something failed along the way.
Return type: Order|None
-
get_removed_product_ids
(state, order_to_update)[source]¶ Collect product ids for products which were removed from the order.
Parameters: - state (dict) – State dictionary.
- order_to_update (shuup.core.models.Order) – Order object to edit.
Returns: set
-
update_stock_for_removed_products
(removed_ids, shop)[source]¶ Update stocks for products which were completely removed from the updated order.
Parameters: - removed_ids (set) – Set of removed product ids.
- shop (shuup.core.models.Shop) – Shop instance where this order is made.
-
static
shuup.admin.modules.orders.mass_actions module¶
-
class
shuup.admin.modules.orders.mass_actions.
CancelOrderAction
[source]¶ Bases:
shuup.admin.utils.picotable.PicotableMassAction
-
label
= 'Cancel'¶
-
identifier
= 'mass_action_order_cancel'¶
-
-
class
shuup.admin.modules.orders.mass_actions.
OrderConfirmationPdfAction
[source]¶ Bases:
shuup.admin.utils.picotable.PicotableFileMassAction
-
label
= 'Print Confirmation PDF(s)'¶
-
identifier
= 'mass_action_order_confirmation_pdf'¶
-
shuup.admin.modules.orders.receivers module¶
shuup.admin.modules.orders.sections module¶
-
class
shuup.admin.modules.orders.sections.
BasicDetailsOrderSection
[source]¶ Bases:
shuup.admin.base.Section
-
identifier
= 'order_details'¶
-
name
= 'Details'¶
-
icon
= 'fa-info-circle'¶
-
template
= 'shuup/admin/orders/_detail_section.jinja'¶
-
order
= 0¶
-
-
class
shuup.admin.modules.orders.sections.
PaymentOrderSection
[source]¶ Bases:
shuup.admin.base.Section
-
identifier
= 'payments'¶
-
name
= 'Payments'¶
-
icon
= 'fa-dollar'¶
-
template
= 'shuup/admin/orders/_detail_payments.jinja'¶
-
extra_js
= 'shuup/admin/orders/_detail_payments_js.jinja'¶
-
order
= 1¶
-
-
class
shuup.admin.modules.orders.sections.
ShipmentSection
[source]¶ Bases:
shuup.admin.base.Section
-
identifier
= 'shipments_data'¶
-
name
= 'Shipments'¶
-
icon
= 'fa-truck'¶
-
template
= 'shuup/admin/orders/_order_shipments.jinja'¶
-
order
= 2¶
-
-
class
shuup.admin.modules.orders.sections.
LogEntriesOrderSection
[source]¶ Bases:
shuup.admin.base.Section
-
identifier
= 'log_entries'¶
-
name
= 'Log Entries'¶
-
icon
= 'fa-pencil'¶
-
template
= 'shuup/admin/orders/_order_log_entries.jinja'¶
-
extra_js
= 'shuup/admin/orders/_order_log_entries_extra_js.jinja'¶
-
order
= 3¶
-
-
class
shuup.admin.modules.orders.sections.
AdminCommentSection
[source]¶ Bases:
shuup.admin.base.Section
-
identifier
= 'admin_comment'¶
-
name
= 'Admin comment/notes'¶
-
icon
= 'fa-comment-o'¶
-
template
= 'shuup/admin/orders/_admin_comment.jinja'¶
-
extra_js
= 'shuup/admin/orders/_admin_comment_extra_js.jinja'¶
-
order
= 4¶
-
shuup.admin.modules.orders.toolbar module¶
-
class
shuup.admin.modules.orders.toolbar.
OrderDetailToolbar
(order)[source]¶ Bases:
shuup.admin.toolbar.Toolbar
shuup.admin.modules.orders.utils module¶
-
class
shuup.admin.modules.orders.utils.
OrderInformation
(order, **kwargs)[source]¶ Bases:
object
-
title
= 'default'¶
-
order
= 1¶
-
provides_info
()[source]¶ Override to add business logic if the order should show this information row.
-
information
¶ Override this property to return wanted information about the order.
-
Module contents¶
-
class
shuup.admin.modules.orders.
OrderEntry
(text, url, icon=None, category=None, ordering=99999, aliases=(), **kwargs)[source]¶ Bases:
shuup.admin.base.MenuEntry
-
name
= 'Orders'¶
-
-
class
shuup.admin.modules.orders.
OrderModule
[source]¶ Bases:
shuup.admin.base.AdminModule
-
name
= 'Orders'¶
-