Skip to content

Conversation

@victoralmau
Copy link
Member

@victoralmau victoralmau commented Oct 24, 2022

FWP from 14.0: #1511

Changes done:

  • Show error in stock.request.order in the "Confirm" or "Submit" buttons if there are no items.

Please @pedrobaeza and @chienandalu can you review it?

@Tecnativa TT39761

string="Confirm"
type="object"
attrs="{'invisible': [('state', 'not in', ['draft'])]}"
groups="stock_request.group_stock_request_manager"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why changing this behaviour ?

Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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

…m" or "Submit" buttons if there are no items.

TT39761
@victoralmau victoralmau force-pushed the 15.0-fix-stock_request-action_confirm branch from fc340d8 to 2c4ec9d Compare October 24, 2022 14:33
("user", "User"),
("manager", "Manager"),
],
default="user",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default="user",
default="manager",

Copy link
Contributor

@rousseldenis rousseldenis Oct 24, 2022

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.

Copy link
Member

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.

Copy link
Contributor

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

Copy link
Member

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.

Copy link
Contributor

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 ?

Copy link
Member

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.

@rousseldenis
Copy link
Contributor

@JordiBForgeFlow @kittiu I want your advice here

@victoralmau
Copy link
Member Author

I close this PR because finally it is not necessary to add any changes to v15 (changes are added in stock_request_submit).

@pedrobaeza
Copy link
Member

But what about the message when 0 stock request lines?

@victoralmau
Copy link
Member Author

But what about the message when 0 stock request lines?

Ok sorry, can you reopen it?

@pedrobaeza
Copy link
Member

It's nos possible anymore it seems. Do another one, and the fw-port of the submit thing is also pending, no?

ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Dec 27, 2022
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Jan 26, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Jan 27, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Jan 27, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Jan 30, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Feb 2, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Feb 15, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Feb 15, 2023
Urvisha-OSI pushed a commit to ursais/stock-logistics-request that referenced this pull request Mar 29, 2023
ps-tubtim pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Apr 18, 2023
Saran440 pushed a commit to ecosoft-odoo/stock-logistics-warehouse that referenced this pull request Aug 11, 2023
bguillot pushed a commit to akretion/stock-logistics-warehouse that referenced this pull request Feb 8, 2024
victoralmau added a commit to Tecnativa/stock-logistics-request that referenced this pull request Mar 25, 2024
peluko00 pushed a commit to APSL/stock-logistics-request that referenced this pull request May 15, 2024
peluko00 pushed a commit to APSL/stock-logistics-request that referenced this pull request Jun 13, 2024
Saran440 pushed a commit to ecosoft-odoo/stock-logistics-request that referenced this pull request May 2, 2025
Saran440 pushed a commit to ecosoft-odoo/stock-logistics-request that referenced this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants