Unit rounded invoice

account_invoice_rounding
REPOSITORY
REPOSITORYOCA/account-invoicing
GIT
GIThttps://github.com/OCA/account-invoicing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-invoicing/tree/10.0/account_invoice_rounding
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSLorenzo Battistini, eLBati, Pedro M. Baeza, GitHub, Akim Juillerat, Stéphane Bidoul (ACSONE), tafaRU, OCA Transbot, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - report
    - analytic
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_account_config_settings account settings.add.rounding account.config.settings xpath Inherits account.view_account_config_settings
Models touched (4)

New fields (3)
  • tax_calculation_rounding Float
    default=0.05 related='company_id.tax_calculation_rounding' string='Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one
    comodel='account.account' domain=[('internal_type', '<>', 'view')] related='company_id.tax_calculation_rounding_account_id' string='Tax Rounding account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." related='company_id.tax_calculation_rounding_method' selection=[('round_per_line', 'Round per line'), ('round_globally', 'Round globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding an invoice line')] string='Tax calculation rounding method'
Public methods (1)
  • onchange_company_id(self)
    @api.onchange('company_id')

New fields (4)
  • amount_tax Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Tax'
  • amount_total Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Total'
  • amount_untaxed Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Subtotal' track_visibility='always'
  • global_round_line_id Many2one → account.invoice.line
    compute=_get_rounding_invoice_line_id readonly=True string='Invoice Line for total rounding' args: 'account.invoice.line'
Public methods (0)

No public methods.

New fields (1)
  • is_rounding Boolean
    args: 'Rounding Line'
Public methods (0)

No public methods.

New fields (3)
  • tax_calculation_rounding Float
    args: 'Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one → account.account
    domain=[('internal_type', '<>', 'view')] args: 'account.account', 'Tax Rounding Account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." string='Tax Calculation Rounding Method' args: [('round_per_line', 'Round per Line'), ('round_globally', 'Round Globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding a line')]
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/9.0/account_invoice_rounding
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, mreficent, Akim Juillerat, Stéphane Bidoul (ACSONE), OCA Transbot, Denis Leemann, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - report
    - analytic
    - web_tip
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_company_inherit_form company settings.add.rounding res.company xpath Inherits account.view_company_inherit_form
Models touched (5)

New fields (3)
  • tax_calculation_rounding Float
    default=0.05 related='company_id.tax_calculation_rounding' string='Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one
    comodel='account.account' domain=[('internal_type', '<>', 'view')] related='company_id.tax_calculation_rounding_account_id' string='Tax Rounding account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." related='company_id.tax_calculation_rounding_method' selection=[('round_per_line', 'Round per line'), ('round_globally', 'Round globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding an invoice line')] string='Tax calculation rounding method'
Public methods (1)
  • onchange_company_id(self, company_id)
    @api.multi

New fields (4)
  • amount_tax Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Tax'
  • amount_total Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Total'
  • amount_untaxed Float
    compute=_compute_amount digits=dp.get_precision('Account') store=True string='Subtotal' track_visibility='always'
  • global_round_line_id Many2one → account.invoice.line
    compute=_get_rounding_invoice_line_id readonly=True string='Invoice Line for total rounding' args: 'account.invoice.line'
Public methods (0)

No public methods.

New fields (1)
  • is_rounding Boolean
    args: 'Rounding Line'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • compute_inv(self, taxes, price_unit, quantity, product=None, partner=None, precision=None)
    @api.model
    Using swedish rounding we want to keep standard global precision so we add precision to do global computation

New fields (3)
  • tax_calculation_rounding Float
    args: 'Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one → account.account
    domain=[('internal_type', '<>', 'view')] args: 'account.account', 'Tax Rounding Account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." string='Tax Calculation Rounding Method' args: [('round_per_line', 'Round per Line'), ('round_globally', 'Round Globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding a line')]
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/8.0/account_invoice_rounding
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Yannick Vaucher, Lorenzo Battistini, Alexandre Fayolle, GitHub, Stéphane Bidoul (ACSONE), OCA Transbot, hurrinico, archetipo, Charbel Jacquin, oca-travis, Weblate, OCA-git-bot, Matjaž Mozetič, Simone Rubino, Simon Schmid
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - report
    - analytic
    - board
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
invoice_supplier_form invoice_supplier_form account.invoice xpath Inherits account.invoice_supplier_form
view_account_config_settings account settings.add.rounding account.config.settings xpath Inherits account.view_account_config_settings
view_partner_form view.partner.form res.partner xpath Inherits account.view_partner_property_form
Models touched (6)

New fields (3)
  • tax_calculation_rounding Float
    default=0.05 related='company_id.tax_calculation_rounding' string='Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one
    comodel='account.account' domain=[('type', '<>', 'view')] related='company_id.tax_calculation_rounding_account_id' string='Tax Rounding account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." related='company_id.tax_calculation_rounding_method' selection=[('round_per_line', 'Round per line'), ('round_globally', 'Round globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding an invoice line')] string='Tax calculation rounding method'
Public methods (1)
  • onchange_company_id(self, cr, uid, ids, company_id, context=None)

New fields (5)
  • amount_tax Float
    compute=_compute_amount digits_compute=dp.get_precision('Account') store=True string='Tax'
  • amount_total Float
    compute=_compute_amount digits_compute=dp.get_precision('Account') store=True string='Total'
  • amount_untaxed Float
    compute=_compute_amount digits_compute=dp.get_precision('Account') store=True string='Subtotal' track_visibility='always'
  • enable_rounding_for_supplier Boolean
    string='Enable rounding'
  • global_round_line_id Many2one → account.invoice.line
    compute=_get_rounding_invoice_line_id readonly=True string='Invoice Line for total rounding' args: 'account.invoice.line'
Public methods (1)
  • onchange_partner_id(self, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False)
    @api.multi

New fields (1)
  • is_rounding Boolean
    args: 'Rounding Line'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None)
    Using swedish rounding we want to keep standard global precision so we add precision to do global computation

New fields (3)
  • tax_calculation_rounding Float
    args: 'Tax Rounding unit'
  • tax_calculation_rounding_account_id Many2one → account.account
    domain=[('type', '<>', 'view')] args: 'account.account', 'Tax Rounding Account'
  • tax_calculation_rounding_method Selection
    help="If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." string='Tax Calculation Rounding Method' args: [('round_per_line', 'Round per Line'), ('round_globally', 'Round Globally'), ('swedish_round_globally', 'Swedish Round globally'), ('swedish_add_invoice_line', 'Swedish Round by adding a line')]
Public methods (0)

No public methods.

New fields (1)
  • enable_rounding Boolean
    help='This field enables swedish rounding (if configured) for supplier invoices' string='Enable rounding'
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/7.0/account_invoice_rounding
VERSION
VERSION 1.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSYannick Vaucher, Alexandre Fayolle, Pedro M. Baeza, Stéphane Bidoul (ACSONE), Launchpad Translations on behalf of account-core-editors, OCA Transbot, Rudolf Schnapka
WEBSITE
WEBSITEhttp://www.camptocamp.com/
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - process
    - decimal_precision
    - mail
    - analytic
    - board
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Unit rounded invoice (_`Swedish rounding`)
==========================================

Add a parameter to give a unit for rounding such as CHF 0.05 for Swiss
invoices

In Settings -> Configuration -> Accounting you will find 2 new types of
rounding

- `Swedish Round globally`

  To round your invoice total amount, this option will do the adjustment in
  the most important tax line of your invoice.

- `Swedish Round by adding an invoice line`

  To round your invoice total amount, this option create a invoice line without
  taxes on it. This invoice line is tagged as `is_rounding`

You can choose the account on which the invoice line will be written

.. _Swedish rounding : https://en.wikipedia.org/wiki/Swedish_rounding

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_account_config_settings account settings.add.rounding account.config.settings xpath Inherits account.view_account_config_settings
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • onchange_company_id(self, cr, uid, ids, company_id, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None)
    Using swedish rounding we want to keep standard global precision so we add precision to do global computation

New fields (0)

No new fields.

Public methods (0)

No public methods.