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

[14.0] shopfloor: add option to order pickings by priority #770

Closed
wants to merge 2 commits into from

Conversation

JuMiSanAr
Copy link
Contributor

@JuMiSanAr JuMiSanAr commented Oct 24, 2023

This PR adds an option to return the priority number of a picking to the frontend.
In the checkout scenario, we display this priority if available.

It also fixes a bug related to a missing key in shopfloor_menu.xml

ref: cos-4215

@OCA-git-bot
Copy link
Contributor

Hi @guewen, @sebalix, @simahawk,
some modules you are maintaining are being modified, check this out!

@JuMiSanAr JuMiSanAr force-pushed the 14.0--shopfloor--priority branch 4 times, most recently from 0bd9372 to b077fe2 Compare October 24, 2023 08:28
Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

LG

shopfloor/models/shopfloor_menu.py Outdated Show resolved Hide resolved
shopfloor/models/shopfloor_menu.py Outdated Show resolved Hide resolved
@sebalix
Copy link
Contributor

sebalix commented Nov 13, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 13, 2023
Signed-off-by sebalix
@OCA-git-bot
Copy link
Contributor

@sebalix your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@sebalix
Copy link
Contributor

sebalix commented Nov 13, 2023

/ocabot rebase

@OCA-git-bot
Copy link
Contributor

@sebalix The rebase process failed, because command git push --force camptocamp tmp-pr-770:14.0--shopfloor--priority failed with output:

remote: Permission to camptocamp/wms.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/camptocamp/wms/': The requested URL returned error: 403

@sebalix
Copy link
Contributor

sebalix commented Nov 13, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 13, 2023
Signed-off-by sebalix
@OCA-git-bot
Copy link
Contributor

@sebalix your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@sebalix
Copy link
Contributor

sebalix commented Nov 13, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 13, 2023
Signed-off-by sebalix
@OCA-git-bot
Copy link
Contributor

@sebalix your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 14, 2023
Signed-off-by sebalix
@OCA-git-bot
Copy link
Contributor

@sebalix your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@sebalix
Copy link
Contributor

sebalix commented Nov 14, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 14, 2023
Signed-off-by sebalix
@OCA-git-bot
Copy link
Contributor

@sebalix your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-770-by-sebalix-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@simahawk
Copy link
Contributor

/ocabot rebase

@OCA-git-bot
Copy link
Contributor

@simahawk The rebase process failed, because command git push --force camptocamp tmp-pr-770:14.0--shopfloor--priority failed with output:

remote: Permission to camptocamp/wms.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/camptocamp/wms/': The requested URL returned error: 403

@simahawk
Copy link
Contributor

@JuMiSanAr can you rebase?

@JuMiSanAr
Copy link
Contributor Author

JuMiSanAr commented Nov 20, 2023

@JuMiSanAr can you rebase?

When I try to push new content to this PR I get:

To github.com:camptocamp/wms.git
 ! [rejected]          14.0--shopfloor--priority -> 14.0--shopfloor--priority (stale info)
error: failed to push some refs to 'github.com:camptocamp/wms.git'

@sebalix
Copy link
Contributor

sebalix commented Nov 21, 2023

@JuMiSanAr I already rebased manually this branch, you'll have to get the history first then re-rebase :)

@sebalix sebalix force-pushed the 14.0--shopfloor--priority branch from 8494871 to 0fcc5c4

Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

Why do we need an option to allow sorting picking by priority?
In the zone picking, you can sort by date or priority. There is a button to choose the sorting.
Why don't you do the same in checkout? (I guess this concerns manual selection).
Let the user choose on shopfloor. I don't see the benefit of such option.

An option to set the default sorting (date or priority) would be a better approach, wouldn't be?

@jbaudoux
Copy link
Contributor

Why do we need an option to allow sorting picking by priority? In the zone picking, you can sort by date or priority. There is a button to choose the sorting. Why don't you do the same in checkout? (I guess this concerns manual selection). Let the user choose on shopfloor. I don't see the benefit of such option.

An option to set the default sorting (date or priority) would be a better approach, wouldn't be?

Coming back to my comment, in the zone picking you sort either by "priority, date" or "location". So in the checkout, it should be sorted by priority, date and there is no need for an option.

@@ -360,7 +363,10 @@ def _domain_for_list_stock_picking(self):
]

def _order_for_list_stock_picking(self):
return "scheduled_date asc, id asc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just change this line to `priority desc, scheduled_date asc, id asc" and drop all the rest that looks overkill

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I also add the button to choose how to sort them, like in zone_picking? Or just leave it ordered by priority first all the time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just pushed the updated version, without the button.

@jbaudoux
Copy link
Contributor

@JuMiSanAr There is a test to fix with the priority

@JuMiSanAr JuMiSanAr closed this Nov 22, 2023
@JuMiSanAr
Copy link
Contributor Author

Closed and replaced by #782

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

Successfully merging this pull request may close these issues.

5 participants