Skip to content

[18.0][IMP] pos_sale_picking_keep: Add a strategy to keep sale pickings and/or POS pickings too#1545

Open
rousseldenis wants to merge 5 commits into
OCA:18.0from
acsone:18.0-imp-pos_sale_picking_keep-dro
Open

[18.0][IMP] pos_sale_picking_keep: Add a strategy to keep sale pickings and/or POS pickings too#1545
rousseldenis wants to merge 5 commits into
OCA:18.0from
acsone:18.0-imp-pos_sale_picking_keep-dro

Conversation

@rousseldenis
Copy link
Copy Markdown
Contributor

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:pos_sale_picking_keep Module pos_sale_picking_keep labels May 5, 2026
@pedrobaeza pedrobaeza added this to the 18.0 milestone May 5, 2026
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

If you mix directly items from PoS from other loaded from sales, I think there's no discussion: both should be preserved, the ones from PoS in the PoS picking, and the sales one in the sales pickings, so I think there shouldn't be an option, just to proceed that way.

We were previously discarding everything from PoS, because we don't have that mixed option (for now), but if having it in the future, I don't conceive another option except that.

@rousseldenis
Copy link
Copy Markdown
Contributor Author

rousseldenis commented May 6, 2026

If you mix directly items from PoS from other loaded from sales, I think there's no discussion: both should be preserved, the ones from PoS in the PoS picking, and the sales one in the sales pickings, so I think there shouldn't be an option, just to proceed that way.

We were previously discarding everything from PoS, because we don't have that mixed option (for now), but if having it in the future, I don't conceive another option except that.

I wanted to keep your behaviour as I didn't know if you have particular processes on your side.

So, I keep the option activation or not through a Boolean in place of Selection.

Comment on lines +14 to +16
if all(
picking.state == "done" for picking in pos_lines.order_id.picking_ids
):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

not sure if we should prevent empty list (all([]) == True) here ?

Suggested change
if all(
picking.state == "done" for picking in pos_lines.order_id.picking_ids
):
if pos_lines.order_id.picking_ids and all(
picking.state == "done" for picking in pos_lines.order_id.picking_ids
):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@petrus-v Oh yes, wrong copy paste 😓

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@petrus-v In fact, no. We should wait : odoo/odoo#253333

@pedrobaeza
Copy link
Copy Markdown
Member

@rousseldenis you can go directly with no possible choice :)

@rousseldenis
Copy link
Copy Markdown
Contributor Author

@rousseldenis you can go directly with no possible choice :)

I'd prefer not as using stuffs for tests in code is not my cup of tea ;-)

@pedrobaeza
Copy link
Copy Markdown
Member

I don't get you. What do you mean by using stuffs for tests?

@rousseldenis
Copy link
Copy Markdown
Contributor Author

I don't get you. What do you mean by using stuffs for tests?

You want to say, install this module and the behaviour changes. Correct ?

@pedrobaeza
Copy link
Copy Markdown
Member

Well, yes, so I get your point. Let's keep the activation by pos config.

Comment thread pos_sale_picking_keep/models/pos_config.py
…t pickings

As in some cases, you want to mix in POS orders the payment of an existing sale and
added products in the same POS order, you still want to keep both pickings linked
to sale orders AND pos orders. This introduces the keep picking strategy that
allows to choose per POS configuration the strategy that fits the best to your case.
The behaviour should be the same when the configuration is applied for both
POS pickings and sale orders one.
@rousseldenis rousseldenis force-pushed the 18.0-imp-pos_sale_picking_keep-dro branch from 3438237 to 2d43560 Compare May 6, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:pos_sale_picking_keep Module pos_sale_picking_keep series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants