Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.0.2
Category
Sales
Folder size
0.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-08-07 09:06:23
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
JordiMForgeFlow, OCA-git-bot, oca-ci, adrip-s73, AlexGarS73
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module allows to set a general discount in a sales order. This
general discount is set to each line order in the standard discount
field.

You can configure:  
- a default general discount on customers
- On each product define if general discount is applied

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_normal_form_view sale_order_general_discount.product_normal_form_view product.product form Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_general_discount.form product.template form Inherits product.product_template_only_form_view
sale_order_general_discount_form_view sale.order.general.discount.form sale.order form Inherits sale.view_order_form
view_partner_form res.partner form Inherits base.view_partner_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (1)
  • bypass_general_discount Boolean
    help='If this checkbox is not ticked, it means changing general discount on sale order will impact sale order lines with this related product.'
Public methods (0)

No public methods.

New fields (1)
  • bypass_general_discount Boolean
    compute='_compute_bypass_general_discount' help='If this checkbox is not ticked, it means changing general discount on sale order will impact sale order lines with this related product.' inverse='_inverse_bypass_general_discount' search='_search_bypass_general_discount'
Public methods (0)

No public methods.

New fields (1)
  • sale_discount Float
    company_dependent=True digits='Discount'
Public methods (0)

No public methods.

New fields (1)
  • general_discount Float
    compute='_compute_general_discount' digits='Discount' readonly=False store=True
Public methods (1)
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model
    The purpose of this is to write a context on "order_line" field respecting other contexts on this field. There is a PR (https://github.com/odoo/odoo/pull/26607) to odoo for avoiding this. If merged, remove this method and add the attribute in the field.

New fields (1)
  • discount Float
    compute='_compute_discount' readonly=False store=True
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…