Repository
OCA/server-backend · module folder · Try on Runboat
Module version
1.0.0
Category
Base
Folder size
0.07 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-backend
Last tracking update
2026-08-07 09:06:34
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Maksym Yankin, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
- bus
- uom
Python dependencies
None
System dependencies
None
Required by
account_global_discount
Description
Base module to have global discounts applied to either sales or
purchases. It doesn't do much for itself, so account_global_discount or
purchase_global_discount should be installed to benefit from it.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount list New
product_normal_form_view sale_order_global_discount.product_normal_form_view product.product form Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_global_discount.form product.template form Inherits product.product_template_only_form_view
res_partner_form_view res.partner form Inherits base.view_partner_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (5)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • discount Float
    default=0.0 digits='Discount' required=True
  • discount_scope Selection
    default='sale' required=True selection=[('sale', 'Sales'), ('purchase', 'Purchases')]
  • name Char
    required=True string='Discount Name'
  • sequence Integer
    help='Gives the order to apply discounts'
Public methods (0)

No public methods.

New fields (1)
  • bypass_global_discount Boolean
    help='If this checkbox is ticked, it means that this product will not be taken into account when calculating the global discounts.' string="Don't apply global discount"
Public methods (0)

No public methods.

New fields (1)
  • bypass_global_discount Boolean
    compute='_compute_bypass_global_discount' help='If this checkbox is ticked, it means that this product will not be taken into account when calculating the global discounts.' inverse='_inverse_bypass_global_discount' search='_search_bypass_global_discount' string="Don't apply global discount"
Public methods (0)

No public methods.

New fields (2)
  • customer_global_discount_ids Many2many → global.discount
    column1='partner_id' column2='global_discount_id' comodel_name='global.discount' domain=[('discount_scope', '=', 'sale')] relation='customer_global_discount_rel' string='Sale Global Discounts'
  • supplier_global_discount_ids Many2many → global.discount
    column1='partner_id' column2='global_discount_id' comodel_name='global.discount' domain=[('discount_scope', '=', 'purchase')] relation='supplier_global_discount_rel' string='Purchase Global Discounts'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…