-
-
Notifications
You must be signed in to change notification settings - Fork 796
[15.0][IMP] stock_request: Show error in stock.request.order in the "Confirm" or "Submit" buttons if there are no items. #1514
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
Conversation
| string="Confirm" | ||
| type="object" | ||
| attrs="{'invisible': [('state', 'not in', ['draft'])]}" | ||
| groups="stock_request.group_stock_request_manager" |
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.
Why changing this behaviour ?
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.
@victoralmau Stock request users should have access to confirmations. If you want to restrict, please either do it on your side or add an option to configure this behaviour.
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.
Perhaps another possible approach would be to add a setting to define who can use confirm button (user or manager). What do you think about this?
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.
Yes and protect the action method through that
…ording to the configuration option. TT39761
…m" or "Submit" buttons if there are no items. TT39761
fc340d8 to
2c4ec9d
Compare
| ("user", "User"), | ||
| ("manager", "Manager"), | ||
| ], | ||
| default="user", |
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.
| default="user", | |
| default="manager", |
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.
Nope as this changes the base behaviour from the beginning of this module. As already said, you can override that in your project.
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.
Yes, but that's the intended behavior. It's a nonsense to have 2 steps (submit and confirm), when both profiles can make by default both. We'll bump major version.
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.
We'll bump major version.
Yes, but it will be applied on further version. I think about migrations
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.
We can put a migration script for those coming from previous versions that preserve the other, but I really think it's a mistake to let it as it was before. If Jordi/Kitti thinks the same, we can even remove this mechanism and let the new default only.
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.
@pedrobaeza I've reviewed 14.0 module and I don't find any submit state.
There are only 'draft' one (default) and open one. Could you review that ?
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.
OK, I see the problem. The new module stock_request_submit is the one to fix:
- It should change the button "Confirm" to launch the method to put the request into submit.
- The button submit should call the method
confirm. - This button is the one to be protected by manager permission.
|
@JordiBForgeFlow @kittiu I want your advice here |
…nfirm and Submit buttons Related to OCA#1514 (comment)
|
I close this PR because finally it is not necessary to add any changes to v15 (changes are added in |
|
But what about the message when 0 stock request lines? |
Ok sorry, can you reopen it? |
|
It's nos possible anymore it seems. Do another one, and the fw-port of the submit thing is also pending, no? |
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA#1514 (comment)
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment) stock_request_submit 14.0.1.1.0
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment) stock_request_submit 14.0.1.1.0
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment) stock_request_submit 14.0.1.1.0
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment) stock_request_submit 14.0.1.1.0
…nfirm and Submit buttons Related to OCA/stock-logistics-warehouse#1514 (comment) stock_request_submit 14.0.1.1.0
FWP from 14.0: #1511
Changes done:
stock.request.orderin the "Confirm" or "Submit" buttons if there are no items.Please @pedrobaeza and @chienandalu can you review it?
@Tecnativa TT39761