-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Module: sale_tier_validation (OCA—sale-workflow)
Issue Status: Currently, the module allows users to send quotation emails even when validation is pending. This is a recognized limitation. (OCA documentation
notes that sending is not blocked)
Odoo Community Association (OCA)
Problem Description
The current behavior allows users to bypass the intended validation workflow simply by clicking "Send by Email" before a quotation is approved. This undermines the integrity of the tier validation process since the quotation may reach clients without the necessary internal approvals.
Several attempts to circulate awareness of this have surfaced as GitHub issues:
Issue #2080 describes how online customer signing gets blocked and misleading error messages appear, as the module doesn't fully support that flow.
GitHub
Issue #2965 notes that once validated reviewers complete their approval, the order still can't be confirmed or sent in some cases.
GitHub
Proposed Enhancement
Add a boolean option (e.g., block_send_email_until_validated) to the tier definitions:
When enabled, this flag should prevent the quotation from being emailed until all validation tiers are approved.
Ideally, the logic sits within the action_quotation_send or relevant email-sending methods, raising a UserError if the sale order is still pending validation.
This would align email functionality with existing print blocking options, extending behavior to email sending as well.
Suggested Request Template
Prevent Quotation 'Send by Email' if Tier Validation Pending
Description
Currently, even when a sales order is in "Waiting Approval" because of pending tier validation, users can still send the quotation via email. This allows unapproved documents to reach clients, defeating the purpose of the workflow.
Proposed Solution
Introduce a boolean option in Tier Definition, such as block_send_email_until_validated. When enabled, calling action_quotation_send (or equivalent) should be blocked with a clear user-friendly error unless all validations are approved.
Use Cases
- Legal departments requiring sign-off before client communications.
- Multi-layer validation workflows that require integrity across sending and confirming stages.
Benefits
- Closes an existing gap in the module’s enforcement of validation logic.
- Encourages proper use of validation workflows.
- Enhances product maturity and trustworthiness.
References
- OCA documentation acknowledging current behavior: “The sales order ... will still send the email even if the validation is not approved by the corresponding tier.” :contentReference[oaicite:3]{index=3}
- GitHub issue [[16.0] sale_tier_validation: Can't confirm order #2965]: “Cannot send a quotation or confirm the order once ... validated by the reviewer” :contentReference[oaicite:4]{index=4}
- GitHub issue [v[14] sale_tier_validation does not work well when customer sign and approve online #2080]: Online signature flow blocked by validation, causing unexpected UX behavior :contentReference[oaicite:5]{index=5}
Happy to assist with a code snippet or example if needed!