Skip to content
Health
82/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 5 months ago
  • Required by20/25
    2 modules depend on it
  • Maturity12/25
    In 2 Odoo series since 15.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
2
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.08 MB
Module directory on disk
Code analysis 0 migration notes 8 models 7 views 0 HTTP endpoints

Description

This module adds a commercial semaphore to help sales teams assess whether a quoted price stays within the discount policy defined for a product or product category.

For each product you can define three discount thresholds, expressed as a percentage over the public sale price:

  • Green: price is within the preferred commercial margin.
  • Yellow: price is still acceptable, but already close to the limit.
  • Red: price is below the warning threshold and should be reviewed.

The semaphore is displayed directly on sales order lines and propagated to customer invoice lines and reporting models, so the same visual indicator is available during the full sales flow.

When no product-specific configuration exists, the module can also reuse the thresholds defined on the product category.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 7

XML IDNameModelTypeStatus
product_category_form_view product.category form Inherits product.product_category_form_view
product_template_form_view product.template form Inherits product.product_template_form_view
sale_order_line_view_form_readonly sale.order.line form Inherits sale.sale_order_line_view_form_readonly
view_account_invoice_report_search account.invoice.report search Inherits account.view_account_invoice_report_search
view_move_form account.move form Inherits account.view_move_form
view_order_form sale.order form Inherits sale.view_order_form
view_order_product_search sale.report search Inherits sale.view_order_product_search

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 8

New fields (1)
  • semaphore Selection
    readonly=True args: [('success', '🟢'), ('warning', '🟡'), ('danger', '🔴')]
Public methods (0)

No public methods.

New fields (1)
  • semaphore Selection
    args: [('success', '🟢'), ('warning', '🟡'), ('danger', '🔴')]
Public methods (0)

No public methods.

New fields (4)
  • semaphore_active Boolean
  • semaphore_discount_danger Float
    string='Discount Danger'
  • semaphore_discount_success Float
    string='Discount Success'
  • semaphore_discount_warning Float
    string='Discount Warning'
Public methods (0)

No public methods.

New fields (4)
  • semaphore_active Selection
    help='If the value is blank, it will be inherited from the category.' selection=[('yes', 'Yes'), ('no', 'No')]
  • semaphore_discount_danger Float
    string='Discount Danger'
  • semaphore_discount_success Float
    string='Discount Success'
  • semaphore_discount_warning Float
    string='Discount Warning'
Public methods (0)

No public methods.

New fields (4)
  • semaphore_active Selection
    compute='_compute_semaphore_values' help='If the value is blank, it will be inherited from the category.' inverse='_inverse_semaphore_active' selection=[('yes', 'Yes'), ('no', 'No')]
  • semaphore_discount_danger Float
    compute='_compute_semaphore_values' inverse='_inverse_semaphore_discount_danger' string='Discount Danger'
  • semaphore_discount_success Float
    compute='_compute_semaphore_values' inverse='_inverse_semaphore_discount_success' string='Discount Success'
  • semaphore_discount_warning Float
    compute='_compute_semaphore_values' inverse='_inverse_semaphore_discount_warning' string='Discount Warning'
Public methods (0)

No public methods.

New fields (1)
  • price_below_semaphore Boolean
    compute='_compute_price_below_semaphore'
Public methods (1)
  • action_confirm(self)

New fields (6)
  • price_below_semaphore Boolean
    compute='_compute_price_below_semaphore'
  • semaphore Selection
    compute='_compute_semaphore' store=True args: [('success', '🟢'), ('warning', '🟡'), ('danger', '🔴')]
  • semaphore_active Boolean
    compute='_compute_semaphore' store=True
  • semaphore_max_price_danger Float
    compute='_compute_semaphore_max_prices'
  • semaphore_max_price_success Float
    compute='_compute_semaphore_max_prices'
  • semaphore_max_price_warning Float
    compute='_compute_semaphore_max_prices'
Public methods (1)
  • write(self, vals)

New fields (1)
  • semaphore Selection
    args: [('success', '🟢'), ('warning', '🟡'), ('danger', '🔴')]
Public methods (0)

No public methods.

Loading…