Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to copy an order #348

Merged
merged 1 commit into from
Feb 18, 2015
Merged

Conversation

paroga
Copy link
Member

@paroga paroga commented Feb 18, 2015

If a supplier has a long list of articles, which are all available, but
the order should contain only a subset of them, selecting them for every
order can take a long time. Starting with a copy of an existing order
can safe a lot of time.

if params[:order_id]
@base_order = Order.find(params[:order_id])
@checkall_articels = false
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also just set it with something like:

if params[:order_id]
  base_order = Order.find(params[:order_id])
  @order.article_ids = base_order.article_ids
end

@wvengen
Copy link
Member

wvengen commented Feb 18, 2015

Nice idea :)

If a supplier has a long list of articles, which are all available, but
the order should contain only a subset of them, selecting them for every
order can take a long time. Starting with a copy of an existing order
can safe a lot of time.
@@ -63,6 +63,7 @@ def show
# Page to create a new order.
def new
@order = Order.new(supplier_id: params[:supplier_id]).init_dates
@order.article_ids = Order.find(params[:order_id]).article_ids if params[:order_id]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even better :)

wvengen added a commit that referenced this pull request Feb 18, 2015
Add possibility to copy an order
@wvengen wvengen merged commit 1ac2478 into foodcoops:master Feb 18, 2015
@paroga paroga deleted the copy_order branch February 18, 2015 22:33
@wvengen wvengen modified the milestone: 4.4 Feb 27, 2015
@Tamriel
Copy link

Tamriel commented Jul 23, 2015

Where can I find this function in the UI?

@wvengen
Copy link
Member

wvengen commented Jul 30, 2015

In the "manage orders" screen.
foodsoft_-manage_orders-_2015-07-30_20 01 01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants