-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
[ADD] stock_picking_group_by_partner_by_carrier #641
Conversation
412525f
to
296caef
Compare
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.
30efa03
to
827a149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly !
if self.env.context.get("picking_no_overwrite_partner_origin"): | ||
written_fields = set(values.keys()) | ||
if written_fields == {"partner_id", "origin"}: | ||
values = {} |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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?
Thanks for the module 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. |
* 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
@florian-dacosta Yes we can make this configurable. I'll add the code for this. Thanks for your feedback. |
…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).
/ocabot merge |
Hi @jgrandguillaume. Your command failed:
Ocabot commands
More information
|
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
It looks like something changed on |
@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
ocabot stuck. Please relaunch |
/ocabot merge nobump |
On my way to merge this fine PR! |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 1a9ccd0. Thanks a lot for contributing to OCA. ❤️ |
It looks like something changed on |
Congratulations, your PR was merged at b9057ea. Thanks a lot for contributing to OCA. ❤️ |
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.