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] stock_picking_group_by_partner_by_carrier #641

Merged

Conversation

gurneyalex
Copy link
Member

This module can be used if your customers expect that several different orders
they passed will be shipped in a single delivery order.

With this module installed, when a sale order is confirmed, the stock moves for
the lines of the sale order can be placed in an existing delivery order that
shares the same delivery address and carrier (or lack thereof).

Sale orders with a Shipping Policy set to 'When all products are ready' always
get their own shipping.

@gurneyalex gurneyalex force-pushed the 13.0-stock_picking_group_by_partner_by_carrier branch 4 times, most recently from 412525f to 296caef Compare March 24, 2020 10:24
This module can be used if your customers expect that several different orders
they passed will be shipped in a single delivery order.

With this module installed, when a sale order is confirmed, the stock moves for
the lines of the sale order can be placed in an existing delivery order that
shares the same delivery address and carrier (or lack thereof).

Sale orders with a Shipping Policy set to 'When all products are ready' always
get their own shipping.
@gurneyalex gurneyalex force-pushed the 13.0-stock_picking_group_by_partner_by_carrier branch from 30efa03 to 827a149 Compare March 24, 2020 20:41
Copy link
Member

@jgrandguillaume jgrandguillaume left a comment

Choose a reason for hiding this comment

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

Works perfectly !

@simahawk simahawk added this to the 13.0 milestone Mar 25, 2020
if self.env.context.get("picking_no_overwrite_partner_origin"):
written_fields = set(values.keys())
if written_fields == {"partner_id", "origin"}:
values = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

any chance to land here w/ other values you'd better preserve?

).copy(defaults)

def do_something(self):
return "bla bla"
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope it does 😄

moves = self.move_lines.sorted(lambda m: m.sale_line_id.order_id)
if len(moves.mapped("sale_line_id.order_id")) > 1:
sales_and_moves = []
for sale, sale_moves in groupby(
Copy link
Contributor

Choose a reason for hiding this comment

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

can we split this part as it's the same as at line 55?

@florian-dacosta
Copy link
Contributor

Thanks for the module
Just one functional remark, I think that not allowing to group "When all products are ready" pickings is too restrictive.
A lot of business configure it this way to avoid partial delivery, which maybe expensive. But it does not mean they would not want to group this kind of picking, too reduce the shipping cost.

I think we should at least have the possibility to group the pickings having this shipping policy if needed, maybe making it configurable or something.
What do you think @gurneyalex ?

* the grouped picking must not be cancelled

* in WH multi step mode:
** ensure the picking ids are computed correctly
** the sale order cancelation does what is expected
@gurneyalex
Copy link
Member Author

@florian-dacosta Yes we can make this configurable. I'll add the code for this. Thanks for your feedback.

sebalix and others added 3 commits April 29, 2020 16:12
…r_by_carrier-imp

[FIX] group pick operations as well with pick-ship delivery steps
… domain on move_type

And add a test with the 'pick_pack_ship' configuration with grouping
enabled on pack+ship (but not pick).
@jgrandguillaume
Copy link
Member

/ocabot merge

@OCA-git-bot
Copy link
Contributor

Hi @jgrandguillaume. Your command failed:

Required option bumpversion_mode for command merge. Possible values : major, minor, patch, nobump.

Ocabot commands

  • ocabot merge major|minor|patch|nobump

More information

@jgrandguillaume
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 13.0-ocabot-merge-pr-641-by-jgrandguillaume-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request May 29, 2020
Signed-off-by jgrandguillaume
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 13.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 13.0-ocabot-merge-pr-641-by-jgrandguillaume-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request May 29, 2020
Signed-off-by jgrandguillaume
@guewen
Copy link
Member

guewen commented Jun 2, 2020

@gurneyalex needs to merge this first gurneyalex#4

…r_by_carrier-imp2

[FIX] stock_picking_group_by_partner_by_carrier: add a hook to handle domain on move_type
@pedrobaeza
Copy link
Member

ocabot stuck. Please relaunch

@jgrandguillaume
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 13.0-ocabot-merge-pr-641-by-jgrandguillaume-bump-minor, awaiting test results.

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 13.0-ocabot-merge-pr-641-by-jgrandguillaume-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jun 17, 2020
Signed-off-by jgrandguillaume
@OCA-git-bot OCA-git-bot merged commit 5fd9328 into OCA:13.0 Jun 17, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 1a9ccd0. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot
Copy link
Contributor

It looks like something changed on 13.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 13.0-ocabot-merge-pr-641-by-jgrandguillaume-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b9057ea. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

8 participants