Skip to content

Prevent Sending Quotation Emails Until Tier Validation Completion #3865

@MohamedESalem

Description

@MohamedESalem

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

Happy to assist with a code snippet or example if needed!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions