コード例 #1
0
ファイル: bag.py プロジェクト: francisco-betancourt/ctrlpyme4
def select_bag():
    """ Set the specified bag as the current bag. The current bag will be available as session.current_bag

        args: [bag_id]
    """
    bag = None
    try:
        bag = bag_utils.is_modifiable_bag(request.args(0))
    except:
        bag = bag_utils.auto_bag_selection()
    if not bag:
        raise HTTP(404)
    session.current_bag = bag.id
    return bag_utils.bag_selection_return_format(bag)
コード例 #2
0
def select_bag():
    """ Set the specified bag as the current bag. The current bag will be available as session.current_bag

        args: [bag_id]
    """
    bag = None
    try:
        bag = bag_utils.is_modifiable_bag(request.args(0))
    except:
        bag = bag_utils.auto_bag_selection()
    if not bag:
        raise HTTP(404)
    session.current_bag = bag.id
    return bag_utils.bag_selection_return_format(bag)
コード例 #3
0
def select_bag():
    """ args: [id_bag] """

    bag = check_bag_owner(request.args(0))
    return bag_selection_return_format(bag)
コード例 #4
0
ファイル: sale_order.py プロジェクト: tazjel/ctrlpyme4
def select_bag():
    """ args: [id_bag] """

    bag = check_bag_owner(request.args(0))
    return bag_selection_return_format(bag)