Base Global Discount

base_global_discount
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/19.0/base_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Maksym Yankin
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 xpath Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_global_discount.form product.template xpath Inherits product.product_template_only_form_view
res_partner_form_view res.partner group Inherits base.view_partner_form
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.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/18.0/base_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, eugenio
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 xpath Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_global_discount.form product.template xpath Inherits product.product_template_only_form_view
res_partner_form_view res.partner group Inherits base.view_partner_form
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.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/17.0/base_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, miguel-S73
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 tree New
product_normal_form_view sale_order_global_discount.product_normal_form_view product.product xpath Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_global_discount.form product.template xpath Inherits product.product_template_only_form_view
res_partner_form_view res.partner group Inherits base.view_partner_form
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.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/16.0/base_global_discount
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, ferran-73, oca-ci, ferran-S73
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:54:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
product_normal_form_view sale_order_global_discount.product_normal_form_view product.product xpath Inherits product.product_normal_form_view
product_template_only_form_view product.template.sale_order_global_discount.form product.template xpath Inherits product.product_template_only_form_view
res_partner_form_view res.partner group Inherits base.view_partner_form
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 (1)
  • name_get(self)

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' 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.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/15.0/base_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSKiril Vangelovski, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:43
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
res_partner_form_view res.partner group Inherits base.view_partner_form
Models touched (2)

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 (1)
  • name_get(self)

New fields (4)
  • 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'
  • customer_global_discount_ids_readonly Many2many
    readonly=True related='customer_global_discount_ids' string='Sale Global Discounts (readonly)'
  • 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'
  • supplier_global_discount_ids_readonly Many2many
    readonly=True related='supplier_global_discount_ids' string='Purchase Global Discounts (readonly)'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/14.0/base_global_discount
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSEnric Tobella, OCA Transbot, Omar (Comunitea), oca-travis, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
res_partner_form_view res.partner group Inherits base.view_partner_form
Models touched (2)

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')] string='Discount Scope'
  • name Char
    required=True string='Discount Name'
  • sequence Integer
    help='Gives the order to apply discounts'
Public methods (1)
  • name_get(self)

New fields (4)
  • 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'
  • customer_global_discount_ids_readonly Many2many
    readonly=True related='customer_global_discount_ids' string='Sale Global Discounts (readonly)'
  • 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'
  • supplier_global_discount_ids_readonly Many2many
    readonly=True related='supplier_global_discount_ids' string='Purchase Global Discounts (readonly)'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/13.0/base_global_discount
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, david, OCA Transbot, JordiMForgeFlow, Ernesto Tejeda, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
res_partner_form_view res.partner group Inherits base.view_partner_form
Models touched (2)

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')] string='Discount Scope'
  • name Char
    required=True string='Discount Name'
  • sequence Integer
    help='Gives the order to apply discounts'
Public methods (1)
  • name_get(self)

New fields (4)
  • 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'
  • customer_global_discount_ids_readonly Many2many
    readonly=True related='customer_global_discount_ids' string='Sale Global Discounts (readonly)'
  • 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'
  • supplier_global_discount_ids_readonly Many2many
    readonly=True related='supplier_global_discount_ids' string='Purchase Global Discounts (readonly)'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/12.0/base_global_discount
VERSION
VERSION 3.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSStefan Rijnhart, david, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Simone Rubino, Manuel Calero
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
res_partner_form_view res.partner group Inherits base.view_partner_form
Models touched (2)

New fields (6)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • discount Float
    default=0.0 digits=dp.get_precision('Discount') required=True
  • discount_base Selection
    default='subtotal' help='Amount that will be discounted.' required='True' selection=[('subtotal', 'Subtotal'), ('total', 'Total')] string='Discount Base'
  • discount_scope Selection
    default='sale' required='True' selection=[('sale', 'Sales'), ('purchase', 'Purchases')] string='Discount Scope'
  • name Char
    required=True string='Discount Name'
  • sequence Integer
    help='Gives the order to apply discounts'
Public methods (1)
  • name_get(self)

New fields (4)
  • customer_global_discount_ids Many2many → global.discount
    column1='partner_id' column2='global_discount_id' comodel_name='global.discount' domain=[('discount_scope', '=', 'sale')] string='Sale Global Discounts'
  • customer_global_discount_ids_readonly Many2many
    readonly=True related='customer_global_discount_ids' string='Sale Global Discounts (Readonly)'
  • supplier_global_discount_ids Many2many → global.discount
    column1='partner_id' column2='global_discount_id' comodel_name='global.discount' domain=[('discount_scope', '=', 'purchase')] string='Purchase Global Discounts'
  • supplier_global_discount_ids_readonly Many2many
    readonly=True related='supplier_global_discount_ids' string='Purchase Global Discounts (Readonly)'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/11.0/base_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYBase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSoca-travis, OCA-git-bot, David
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
global_discount_view_form global.discount form New
global_discount_view_tree global.discount tree New
res_partner_form_view res.partner group Inherits base.view_partner_form
Models touched (2)

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

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')] 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')] string='Purchase Global Discounts'
Public methods (0)

No public methods.