Account Global Discount

account_global_discount
REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/19.0/account_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Maksym Yankin
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Apply global discounts to invoices

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' compute='_compute_global_discount_ids' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=False store=True string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.
  • write(self, vals)

New fields (2)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/18.0/account_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSEnric Tobella, Weblate, OCA-git-bot, oca-ci, eugenio
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Apply global discounts to invoices

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' compute='_compute_global_discount_ids' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=False store=True string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.
  • write(self, vals)

New fields (2)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/17.0/account_global_discount
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYAccounting
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, Ethan Hildick, oca-ci, miguel-S73
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Apply global discounts to invoices

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' compute='_compute_global_discount_ids' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=False store=True string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.
  • write(self, vals)

New fields (3)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_item Boolean
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/16.0/account_global_discount
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYAccounting
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, Sylvain LE GAL, Weblate, OCA-git-bot, oca-ci, ferran-S73
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 02:42:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=True states={'draft': [('readonly', False)]} string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.
  • write(self, vals)

New fields (3)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_item Boolean
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('account_type', 'not in', ['asset_receivable', 'liability_payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/15.0/account_global_discount
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSKiril Vangelovski, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, Alexei Rivera
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:38
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=True states={'draft': [('readonly', False)]} string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.

New fields (3)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_item Boolean
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/14.0/account_global_discount
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYAccounting
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, OCA Transbot, oca-travis, Weblate, OCA-git-bot, JesusVMayor, Christopher Ormaza
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('move_type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(move_type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" readonly=True states={'draft': [('readonly', False)]} string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.

New fields (3)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_item Boolean
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/13.0/account_global_discount
VERSION
VERSION 2.0.3
CATEGORY
CATEGORYAccounting
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, Lois Rilo, OCA Transbot, Víctor Martínez, Ernesto Tejeda, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
view_move_form account.move xpath Inherits account.view_move_form
Models touched (5)

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" required=True string='Account'
  • base Float
    digits='Product Price' string='Base before discount'
  • base_discounted Float
    digits='Product Price' string='Base after discount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' compute_sudo=True currency_field='currency_id' string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' string='Global Discount'
  • invoice_id Many2one → account.move
    domain=[('type', 'in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])] index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.move'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax' string='Taxes'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' compute_sudo=True currency_field='currency_id' readonly=True store=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    If we create the invoice with the discounts already set like from a sales order, we must compute the global discounts as well, as some data like ``tax_ids`` is not set until the final step.

New fields (3)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_item Boolean
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    check_company=True comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    check_company=True comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/12.0/account_global_discount
VERSION
VERSION 1.2.2
CATEGORY
CATEGORYAccounting
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, oca-travis, Weblate, OCA-git-bot, sergiocorato, pedrocasi, Thor
WEBSITE
WEBSITEhttps://github.com/OCA/account-invoicing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
account_invoice_form_view account.invoice field Inherits account.invoice_form
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
Models touched (5)

New fields (5)
  • amount_global_discount Monetary
    compute='_compute_amount' currency_field='currency_id' readonly=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' currency_field='currency_id' readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" string='Invoice Global Discounts'
  • global_discount_ids_readonly Many2many
    readonly=True related='global_discount_ids' string='Invoice Global Discounts (readonly)'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • get_taxes_values(self)
    Override this computation for adding global discount to taxes.
  • invoice_line_move_line_get(self)
    @api.model
    Append global discounts move lines

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" required=True string='Account'
  • base Float
    digits=dp.get_precision('Product Price') readonly=True string='Base discounted'
  • base_discounted Float
    digits=dp.get_precision('Product Price') readonly=True string='Discounted amount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    readonly=True string='Discount (number)'
  • discount_amount Monetary
    compute='_compute_discount_amount' currency_field='currency_id' readonly=True string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' readonly=True string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' readonly=True string='Global Discount'
  • invoice_id Many2one → account.invoice
    index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.invoice'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax'
Public methods (0)

No public methods.

New fields (1)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
Public methods (0)

No public methods.

New fields (1)
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" string='Account'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/11.0/account_global_discount
VERSION
VERSION 2.0.2
CATEGORY
CATEGORYAccounting
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, GitHub, david, OCA Transbot, oca-travis, OCA-git-bot, Isaac Gallart Bochons
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_global_discount
odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
account_invoice_form_view account.invoice field Inherits account.invoice_form
global_discount_view_form global.discount field Inherits base_global_discount.global_discount_view_form
global_discount_view_tree global.discount field Inherits base_global_discount.global_discount_view_tree
report_invoice_document report_invoice_document ir.ui.view qweb Inherits account.report_invoice_document
Models touched (5)

New fields (4)
  • amount_global_discount Monetary
    compute='_compute_amount' currency_field='currency_id' readonly=True string='Total Global Discounts'
  • amount_untaxed_before_global_discounts Monetary
    compute='_compute_amount' currency_field='currency_id' readonly=True string='Amount Untaxed Before Discounts'
  • global_discount_ids Many2many → global.discount
    column1='invoice_id' column2='global_discount_id' comodel_name='global.discount' domain="[('discount_scope', 'in', { 'out_invoice': ['sale'], 'out_refund': ['sale'], 'in_refund': ['purchase'], 'in_invoice': ['purchase']}.get(type, [])), ('account_id', '!=', False), '|', ('company_id', '=', company_id), ('company_id', '=', False)]" string='Invoice Global Discounts'
  • invoice_global_discount_ids One2many → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' inverse_name='invoice_id' readonly=True
Public methods (2)
  • get_taxes_values(self)
    Override this computation for adding global discount to taxes.
  • invoice_line_move_line_get(self)
    @api.model
    Append global discounts move lines

New fields (13)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" required=True string='Account'
  • base Float
    digits=dp.get_precision('Product Price') readonly=True string='Base discounted'
  • base_discounted Float
    digits=dp.get_precision('Product Price') readonly=True string='Discounted amount'
  • company_id Many2one
    readonly=True related='invoice_id.company_id'
  • currency_id Many2one
    readonly=True related='invoice_id.currency_id'
  • discount Float
    readonly=True string='Discount'
  • discount_amount Monetary
    compute='_compute_discount_amount' currency_field='currency_id' readonly=True string='Discounted Amount'
  • discount_display Char
    compute='_compute_discount_display' readonly=True string='Discount'
  • global_discount_id Many2one → global.discount
    comodel_name='global.discount' readonly=True string='Global Discount'
  • invoice_id Many2one → account.invoice
    index=True ondelete='cascade' readonly=True string='Invoice' args: 'account.invoice'
  • name Char
    required=True string='Discount Name'
  • tax_ids Many2many → account.tax
    comodel_name='account.tax'
Public methods (0)

No public methods.

New fields (1)
  • base_before_global_discounts Monetary
    readonly=True string='Amount Untaxed Before Discounts'
Public methods (0)

No public methods.

New fields (1)
  • invoice_global_discount_id Many2one → account.invoice.global.discount
    comodel_name='account.invoice.global.discount' string='Invoice Global Discount'
Public methods (0)

No public methods.

New fields (2)
  • account_analytic_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' string='Analytic account'
  • account_id Many2one → account.account
    comodel_name='account.account' domain="[('user_type_id.type', 'not in', ['receivable', 'payable'])]" string='Account'
Public methods (0)

No public methods.