OCA / stock-logistics-warehouse

Odoo Warehouse Management Addons
https://odoo-community.org/psc-teams/logistics-18
GNU Affero General Public License v3.0
320 stars 718 forks source link

[14.0][BUG] stock_request_tier_validation: ValidationError dont check pending Tiers #2066

Open kaynnan opened 5 months ago

kaynnan commented 5 months ago

Module

stock_request_tier_validation

Describe the bug

The module in v14.0 and v15.0 does not have the correct behavior in tier.validation, it ignores pending reviews when only SRO Tier Validation is activated, in versions 12 and 13 the behavior displayed a Warning indicating that there are pending reviews.

To Reproduce

Affected versions:

v14.0:

image

Steps to reproduce the behavior:

  1. Create new tier.definition for Stock Request Order (only active SRO)
  2. Create new SRO
  3. Save
  4. Request for Validation
  5. Confirm

Expected behavior

Warning: "A validation process is still open for at least."

Additional context

Runboat v12.0 (Work):

Captura de imagem_20240607_190802

Runboat v13.0 (Work):

Captura de imagem_20240607_191340

cc @douglascstd @marcelsavegnago

kaynnan commented 4 months ago

I conducted some tests with the stock_request module and noticed that after implementing this change to obtain the status, which prevents stock.request.order from remaining in the open state when it has already been completed [14.0][IMP] stock_request: Convert the state field of stock.request.order as compute store to complete all use cases, the tier.validation of stock.request.order began to ignore pending reviews. This causes a significant issue where completed SROs or those needing to revert to draft status cannot perform this action if there are pending reviews.

Additionally, I performed tests using the previous commit [14.0][FIX] stock_request: set stock request order state to done when partially delivered, and the tier.validation for stock.request.order functioned individually as expected.

kaynnan commented 4 months ago

cc @victoralmau @pedrobaeza

pedrobaeza commented 4 months ago

Sorry, but that module is not ours and we are not even using it.

kaynnan commented 4 months ago

cc @ForgeFlow