rattail.custorders

Customer Orders Handler

Please note this is different from the Customer Order Batch Handler.

class rattail.custorders.CustomerOrderHandler(config, **kwargs)[source]

Base class and default implementation for customer order handlers.

add_note(item, note_text, user, apply_all=False, **kwargs)[source]

Add a note to the given order item.

Parameters:

apply_all – If set, the note should be added to all items on the order, instead of just the one item given.

get_default_item_discount(product=None, **kwargs)[source]

Returns default item discount available. If product is given, the default may be specific to its department etc.

mark_received(order_items, user, **kwargs)[source]

Mark the given set of customer order items as having been received (i.e. from the vendor).

resolve_person(pending, person, user, **kwargs)[source]

Resolve a pending person for all customer orders.

resolve_product(pending, product, user, **kwargs)[source]

Resolve a pending product for all customer orders.