Compare commits

...

29 Commits

Author SHA1 Message Date
Fabrice Henrion
67f7400086 [IMP] payment acquirers: a note in Authorize.net
X-original-commit: df10f17c3e
2022-05-12 13:24:53 +02:00
Laurent Desausoi (lade)
5dca17ad7d [IMP] sale_management: remove price_unit from quotation template
Companion of [1].

[1]: https://github.com/odoo/odoo/pull/47186

opw-2824263

closes odoo/documentation#1979

X-original-commit: f6bf1183db
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-05-10 16:16:53 +02:00
Antoine Vandevenne (anv)
a0181810fd [FIX] conf: allow building the documentation with Python 3.6.
Commit 3d358fdb introduced a new import of Odoo source files which
complain about the minimal Python version if the hack added by 57e1e314
is not executed early enough.

closes odoo/documentation#1972

X-original-commit: 557b261e01
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 16:23:50 +02:00
wan
3fb30d87d7 [REF] i18n/localization.rst: rework the entire localization tutorial
closes odoo/documentation#1968

X-original-commit: 9db567159d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: William Andre <wan@odoo.com>
Co-authored-by: Ivan Yelizariev <iel@odoo.com>
2022-05-09 13:30:05 +02:00
wan
1e20a49f47 [ADD] extension: allow to build graphs using graphviz
X-original-commit: e00b5e35c7
Part-of: odoo/documentation#1968
2022-05-09 13:30:05 +02:00
wan
5aa9ba31fe [ADD] extensions: new autofield directive
This new directive is generating documentation from Odoo fields. This
can be used to build documentation about business classes.
This will help developpers import/export data and build localization
modules for instance.

X-original-commit: 16afaf6fa7
Part-of: odoo/documentation#1968
2022-05-09 13:30:05 +02:00
wan
2e6634ea7a [ADD] conf: give relative and absolute path to odoo repo
Also add a condition on some directives to ignore them when we have no
relative/absolute path.

X-original-commit: a514c905c0
Part-of: odoo/documentation#1968
2022-05-09 13:30:04 +02:00
Demesmaeker
6fc5fd5249 [IMP] amazon: explain how to use a carrier
In case of an unsupported carrier or a self Delivery, Odoo won't block
the user to use the Amazon connector, but explanation were needed for
these cases.

task-2804907

closes odoo/documentation#1966

X-original-commit: 3231d20d92
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 13:29:57 +02:00
Tori (vpk)
6a2ecf5675 [IMP] CRM: update multiple sales teams doc
closes odoo/documentation#1963

Task: 2588786
X-original-commit: 98f306eca5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 12:31:18 +02:00
Jeremy Kersten
d956bfd5c9 [IMP] odoo_theme: allow to add plausible script
export PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js
export PLAUSIBLE_DOMAIN=yourdomain.com

closes odoo/documentation#1954

X-original-commit: 4c526eb02f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-05-09 11:20:38 +02:00
Jonathan Castillo (jcs)
2d72944305 [IMP] install/maintain: add seealso links in domain names doc
closes odoo/documentation#1937

X-original-commit: d7da800674
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-05-09 10:20:53 +02:00
Zachary Straub (ZST)
4b97817afa [ADD] accounting: avatax integration
closes odoo/documentation#1945

X-original-commit: 093aea15ec
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 08:25:13 +02:00
Altela Eleviansyah Pramardhika
376ee43cf7 [FW][FIX] developer/howtos: missing parentheses in print statement
Added parentheses in a print function

closes odoo/documentation#1930

Forward-port-of: odoo/documentation#1923
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-06 11:42:49 +02:00
Jonathan Castillo (jcs)
8bada22d42 [IMP] contributing: modify titles and headings guidelines
The previous guidelines for titles and headings included an exception to
capitalize feature names as they are written in the apps. However, this
exception seems to have confused most writers as it isn't always clear
what should be considered as a feature name or what should be considered
as a noun or noun group. This commit removes this exception to make the
writing and reviewing processes easier while retaining good titles and
improving consistency across the documentation. It also changes the
titles of the Accounting section to provide a better example to other
writers.

task-id 2843109

closes odoo/documentation#1921

X-original-commit: 1997788e81
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-05-05 15:27:05 +02:00
Antoine Dupuis (andu)
f0ea12f515 [FW][IMP] accounting: add a warning about invoices in USD in Mexico
Mexican companies very commonly issue invoices in USD, to be fulfiled
in MXN, at the official exchange rate defined by the Banco de Mexico
on the day of payment.

(Presumably, this is to insure against the volatility of the Mexican
peso.)

Odoo supports this workflow, but only if the payment is registered
directly on the invoice using the 'Register Payment' button.

If the payment is created separately, and then reconciled manually
with the invoice, a whole host of problems occur:
- the payment typically can't be reconciled fully with the invoice,
  (even though that can usually be solved by manually creating
  an exchange move)
- but more problematically, the amounts on the payment CFDI will
  be wrong, and even manually creating an exchange move won't solve
  that.

So, we absolutely need to warn users not to try to do that.

(We've been encountering lots of tickets lately in the tech-support
pipe because of users who tried this and then wonder why it doesn't
work.)

This is currently an issue in 14.0, 15.0 and master.

closes odoo/documentation#1916

Forward-port-of: odoo/documentation#1728
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-05 10:20:35 +02:00
Alexandre de Pape
a271ebfef5 [FIX] sales: fix typo
critarias -> criteria

closes odoo/documentation#1905

X-original-commit: b2f4a9e818
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-02 18:41:58 +02:00
Antoine Vandevenne (anv)
41a19f587e [ADD] .gitattributes: include RST files in language statistic on GitHub
closes odoo/documentation#1897

X-original-commit: 34d604ca89
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-28 20:06:58 +02:00
root
a7478dd186 [ADD] multi_website: add info to configure multiple domains
closes odoo/documentation#1896

X-original-commit: 324936c43e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-28 20:06:55 +02:00
Loan (lse)
daf07926a6 [IMP] outlook mail_plugin: add solution for cookie issue
closes odoo/documentation#1884

X-original-commit: 3e25d94b0d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-28 15:08:48 +02:00
Adrien Milis
1bee07e966 [FIX] developer/rd-training: fix commands
Changed commands that were still referring to Odoo 14.0 to 15.0

closes odoo/documentation#1879

X-original-commit: b578f575d0
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-27 10:06:02 +02:00
MichaSi
bc2e37d73d [FW][FIX] crm: fix typos and menuselection items
closes odoo/documentation#1873

Forward-port-of: odoo/documentation#1183
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-26 15:08:48 +02:00
Antoine Vandevenne (anv)
44a62e385f [FIX] developer/rdtraining: fix typos
closes odoo/documentation#1866

X-original-commit: f8f5ed93e1
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-26 10:54:57 +02:00
Dossogne Bertrand
4d8c21fc11 [FIX] developer: fix duplicate action availability
The duplicate action is not available for list views

closes odoo/documentation#1859

X-original-commit: ce1961ebaf
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-25 10:57:51 +02:00
Dossogne Bertrand
5ba9583788 [FIX] developer: fix duplicate availability
The duplicate action is not available for list views

closes odoo/documentation#1852

X-original-commit: 9cf425d886
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-22 17:16:06 +02:00
Touati Djamel (otd)
cb239b36a0 [FIX] inventory_and_mrp: documentation update
After this PR: https://github.com/odoo/odoo/pull/78199

The explanation of the `Security Lead Time for Purchase` field needs to be updated

opw-2766940

closes odoo/documentation#1840

X-original-commit: 9c242400b6
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-04-21 16:59:09 +02:00
Benoit Socias
af27e20e02 [IMP] rdtraining: clarify transition sentence to view inheritance
The "View Inheritance" section is introduced by a sentence that can be
understood as "do this task then we'll be ready to go the next section"
instead of "in the next section we will see how to do this task".
This can confuse the reader into thinking that some knowledge was not
acquired in the previous parts.

This commit makes it clear that the task described in the transition
sentence will be achieved in the next part.

task-2822582

closes odoo/documentation#1830

X-original-commit: 5a39ba7d24
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-04-14 13:43:55 +02:00
Benoit Socias
7462b89f57 [IMP] rdtraining: add note about Settings requiring at least one app
At the point when the developer mode is introduced in the training, it is
confusing because the documentation page describes the option inside the
Settings page, but that page only appears if at least one application is
installed. (Otherwise, the Settings app shows the Users instead)

This commit adds a note so that the reader does not start looking for a
screen that cannot be reached at that point.

task-2822582

X-original-commit: 2ebb7fe802
Part-of: odoo/documentation#1830
2022-04-14 13:43:54 +02:00
Altela Eleviansyah Pramardhika
c4ffa7a8cd [FW][FIX] developer/rdtraining: fix typo
Fixed `name = field.Char(required=True)` to
`name = fields.Char(required=True)`.

closes odoo/documentation#1823

Forward-port-of: odoo/documentation#1816
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-11 12:39:57 +02:00
Antoine Vandevenne (anv)
9cb3eaa2ef [REL] freeze saas-15.3 branch
closes odoo/documentation#1791

Related: odoo/odoo#87949
Related: odoo/design-themes#558
Related: odoo/enterprise#25888
2022-04-11 12:37:49 +02:00
106 changed files with 1235 additions and 600 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Include RST files in language statistics on GitHub.
*.rst linguist-detectable

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.pyc
.*
*.mo
.*
!.gitattributes
# Sphinx build files
_build/

View File

@ -19,12 +19,14 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
-D is_remote_build=$(IS_REMOTE_BUILD) \
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY) \
-A plausible_script=$(PLAUSIBLE_SCRIPT) \
-A plausible_domain=$(PLAUSIBLE_DOMAIN) \
-j $(WORKERS)
SOURCE_DIR = content
HTML_BUILD_DIR = $(BUILD_DIR)/html
ifdef VERSIONS
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/master
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/saas-15.3
endif
ifneq ($(CURRENT_LANG),en)
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/$(CURRENT_LANG)

View File

@ -4,11 +4,11 @@
### Requirements
- [Git](https://www.odoo.com/documentation/master/contributing/documentation.html#install-git)
- [Python 3.7 or 3.8](https://www.odoo.com/documentation/master/contributing/documentation.html#python)
- Python dependencies listed in the file [`requirements.txt`](https://github.com/odoo/documentation/tree/master/requirements.txt).
- [Make](https://www.odoo.com/documentation/master/contributing/documentation.html#make)
- A local copy of the [odoo/odoo repository in master](https://github.com/odoo/odoo/tree/master) (Optional)
- [Git](https://www.odoo.com/documentation/saas-15.3/contributing/documentation.html#install-git)
- [Python 3.7 or 3.8](https://www.odoo.com/documentation/saas-15.3/contributing/documentation.html#python)
- Python dependencies listed in the file [`requirements.txt`](https://github.com/odoo/documentation/tree/saas-15.3/requirements.txt).
- [Make](https://www.odoo.com/documentation/saas-15.3/contributing/documentation.html#make)
- A local copy of the [odoo/odoo repository in saas-15.3](https://github.com/odoo/odoo/tree/saas-15.3) (Optional)
### Instructions
@ -23,7 +23,7 @@
2. Open the file `documentation/_build/html/index.html` in your web browser to display the render.
3. See [this guide](https://www.odoo.com/documentation/master/contributing/documentation.html#preview-your-changes)
3. See [this guide](https://www.odoo.com/documentation/saas-15.3/contributing/documentation.html#preview-your-changes)
for more detailed instructions.
Optional: to fully build the developer documentation with inline docstrings for documented Python
@ -34,7 +34,7 @@ be shown.
## Contribute to the documentation
For contributions to the content of the documentation, please refer to the
[Introduction Guide](https://www.odoo.com/documentation/master/contributing/documentation.html).
[Introduction Guide](https://www.odoo.com/documentation/saas-15.3/contributing/documentation.html).
To **report a content issue**, **request new content** or **ask a question**, use the
[repository's issue tracker](https://github.com/odoo/documentation-user/issues) as usual.

79
conf.py
View File

@ -1,9 +1,12 @@
import re
import os
import shutil
import sys
from pathlib import Path
import docutils
from pygments.lexers import JsonLexer, XmlLexer
from sphinx.ext import graphviz
from sphinx.util import logging
import sphinx
@ -19,7 +22,7 @@ copyright = 'Odoo S.A.'
# `version` if the version info for the project being documented, acts as replacement for |version|,
# also used in various other places throughout the built documents.
# `release` is the full version, including alpha/beta/rc tags. Acts as replacement for |release|.
version = release = 'master'
version = release = 'saas-15.3'
# The minimal Sphinx version required to build the documentation.
needs_sphinx = '3.0.0'
@ -53,6 +56,11 @@ add_function_parentheses = True
#=== Extensions configuration ===#
source_read_replace_vals = {
'GITHUB_PATH': f'https://github.com/odoo/odoo/blob/{version}',
'GITHUB_ENT_PATH': f'https://github.com/odoo/enterprise/blob/{version}',
}
# Add extensions directory to PYTHONPATH
extension_dir = Path('extensions')
sys.path.insert(0, str(extension_dir.absolute()))
@ -74,11 +82,15 @@ if not odoo_sources_dirs:
{'dir_list': '\n'.join([f'\t- {d.resolve()}' for d in odoo_sources_candidate_dirs])},
)
else:
odoo_dir = odoo_sources_dirs[0].resolve()
sys.path.insert(0, str(odoo_dir))
if (3, 6) < sys.version_info < (3, 7):
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6.
sys.version_info = (3, 7, 0)
odoo_dir = odoo_sources_dirs[0].resolve()
source_read_replace_vals['ODOO_RELPATH'] = '/../' + str(odoo_sources_dirs[0])
source_read_replace_vals['ODOO_ABSPATH'] = str(odoo_dir)
sys.path.insert(0, str(odoo_dir))
import odoo.addons
odoo.addons.__path__.append(str(odoo_dir) + '/addons')
from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option
odoo_version = odoo_release.version.replace('~', '-') # Change saas~XX.Y to saas-XX.Y
odoo_version = 'master' if 'alpha' in odoo_release.version else odoo_version
@ -98,12 +110,18 @@ else:
)
odoo_dir_in_path = True
# Mapping between odoo models related to master data and the declaration of the
# data. This is used to point users to available xml_ids when giving values for
# a field with the autodoc_field extension.
model_references = {
'account.account.type': 'addons/account/data/data_account_type.xml',
'res.country': 'odoo/addons/base/data/res_country_data.xml',
'res.currency': 'odoo/addons/base/data/res_currency_data.xml',
}
# The Sphinx extensions to use, as module names.
# They can be extensions coming with Sphinx (named 'sphinx.ext.*') or custom ones.
extensions = [
# Parse Python docstrings (autodoc, automodule, autoattribute directives)
'sphinx.ext.autodoc' if odoo_dir_in_path else 'autodoc_placeholder',
# Link sources in other projects (used to build the reference doc)
'sphinx.ext.intersphinx',
@ -133,7 +151,15 @@ if odoo_dir_in_path:
extensions += [
'sphinx.ext.linkcode',
'github_link',
# Parse Python docstrings (autodoc, automodule, autoattribute directives)
'sphinx.ext.autodoc',
'autodoc_field',
]
else:
extensions += [
'autodoc_placeholder',
]
extensions.append('sphinx.ext.graphviz' if shutil.which('dot') else 'graphviz_placeholder')
todo_include_todos = False
@ -158,6 +184,7 @@ sphinx.transforms.i18n.docname_to_domain = (
# is populated. If a version is passed to `versions` but is not listed here, it will not be shown.
versions_names = {
'master': "Master",
'saas-15.3': "Odoo Online",
'saas-15.2': "Odoo Online",
'saas-15.1': "Odoo Online",
'15.0': "Odoo 15",
@ -266,6 +293,22 @@ latex_logo = 'static/img/odoo_logo.png'
# If true, show URL addresses after external links.
latex_show_urls = 'True'
# https://github.com/sphinx-doc/sphinx/issues/4054#issuecomment-329097229
def source_read_replace(app, docname, source):
"""Substitute parts of strings with computed values.
Since the RST substitution is not working everywhere, i.e. in directives'
options, we need to be able to input those values when reading the sources.
This is using the config `source_read_replace_vals`, mapping a name to its
replacement. This will look for the name surrounded by curly braces in the source.
Meant to be connected to the `source-read` event.
"""
result = source[0]
for key in app.config.source_read_replace_vals:
result = result.replace(f"{{{key}}}", app.config.source_read_replace_vals[key])
source[0] = result
def setup(app):
# Generate all alternate URLs for each document
@ -274,12 +317,34 @@ def setup(app):
app.add_config_value('versions', None, 'env')
app.add_config_value('languages', None, 'env')
app.add_config_value('is_remote_build', None, 'env') # Whether the build is remotely deployed
app.add_config_value('source_read_replace_vals', {}, 'env')
app.connect('source-read', source_read_replace)
app.add_lexer('json', JsonLexer)
app.add_lexer('xml', XmlLexer)
app.connect('html-page-context', _generate_alternate_urls)
# Add a `condition` option on directives to ignore them based on config values
app.add_config_value('odoo_dir_in_path', None, 'env')
def context_eval(expr):
return eval(expr, {confval.name: confval.value for confval in app.config})
def patch(to_patch):
to_patch.option_spec['condition'] = context_eval
original_run = to_patch.run
def new_run(self):
if not self.options.get('condition', True):
return []
return original_run(self)
to_patch.run = new_run
for to_patch in (
sphinx.directives.code.LiteralInclude,
docutils.parsers.rst.directives.tables.CSVTable,
):
patch(to_patch)
def _generate_alternate_urls(app, pagename, templatename, context, doctree):
""" Add keys of required alternate URLs for the current document in the rendering context.

View File

@ -21,6 +21,11 @@ You can use a custom domain name to access your Odoo database and websites:
databases for one year. Visitors can then access your website with an address such as
``www.example.com`` rather than the default ``example.odoo.com``.
.. seealso::
- `Odoo Tutorials: Register a Free Domain Name
<https://www.odoo.com/slides/slide/register-a-free-domain-name-1663>`_
- `Odoo Quick Tips: Get a free domain name! <https://www.youtube.com/watch?v=eAfgeNOHLP4>`_
.. _domain-name/about:
About domain names

View File

@ -1,8 +1,8 @@
:nosearch:
===========
Bank & Cash
===========
=============
Bank and cash
=============
.. toctree::
:titlesonly:

View File

@ -1,7 +1,7 @@
:nosearch:
==========
Bank Feeds
Bank feeds
==========
.. toctree::

View File

@ -1,5 +1,5 @@
===============
Bank Statements
Bank statements
===============
Importing your bank statements in Odoo Accounting allows you to keep track of the financial

View File

@ -1,5 +1,5 @@
======================================
Bank Synchronization: Automatic Import
Bank synchronization: Automatic import
======================================
Odoo can synchronize directly with your bank institution to get all bank statements imported

View File

@ -1,7 +1,7 @@
:nosearch:
===================
Bank Reconciliation
Bank reconciliation
===================
.. toctree::

View File

@ -1,7 +1,7 @@
:nosearch:
====================
Fiscal Localizations
Fiscal localizations
====================
.. toctree::

View File

@ -555,6 +555,14 @@ be *In Payment* since the payment will be effectively validated when it is bank
associated with the invoice, it must be valid so that the stamped payment complement can be
created.
.. warning::
- When making a payment in MXN for an invoice in USD, the payment must be created using the
:guilabel:`Register Payment` button **on the invoice view** and not separately as a payment.
Otherwise, the payment CFDI is not correctly generated.
- As such, a payment in MXN cannot be used to pay multiple invoices in USD. Rather, the payment
should be separated into multiple payments created using the :guilabel:`Register Payment`
button on the corresponding invoices.
Register PUE Payments
~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,5 +1,5 @@
============================
Fiscal Localization Packages
Fiscal localization packages
============================
**Fiscal Localization Packages** are country-specific modules that install pre-configured taxes,

View File

@ -6,7 +6,7 @@ Odoo Accounting can be used in many countries out of the box by installing the a
Here is a list of all :doc:`Fiscal Localization Packages <fiscal_localization_packages>` that are
available on Odoo.
Fiscal Localization Packages available
Fiscal localization packages available
======================================
- Algeria - Accounting

View File

@ -1,7 +1,7 @@
:nosearch:
===============
Getting Started
Getting started
===============
.. toctree::

View File

@ -1,7 +1,7 @@
:nosearch:
=====================
Initial Configuration
Initial configuration
=====================
.. toctree::

View File

@ -1,8 +1,8 @@
:nosearch:
===========
========
Analytic
===========
========
.. toctree::
:titlesonly:

View File

@ -1,7 +1,7 @@
:nosearch:
================
Account Payables
Account payables
================
.. toctree::

View File

@ -1,7 +1,7 @@
:nosearch:
===============
Vendor Payments
Vendor payments
===============
.. toctree::

View File

@ -1,5 +1,5 @@
=============
Pay by Checks
Pay by checks
=============
Once you decide to pay a supplier bill, you can select to pay by check.

View File

@ -1,7 +1,7 @@
:nosearch:
============
Vendor Bills
Vendor bills
============
.. toctree::

View File

@ -1,5 +1,5 @@
===================================
Non-current Assets and Fixed Assets
Non-current assets and fixed assets
===================================
**Non-current Assets**, also known as **long-term assets**, are investments that are expected to be

View File

@ -1,5 +1,5 @@
=================================
Deferred Expenses and Prepayments
Deferred expenses and prepayments
=================================
**Deferred expenses** and **prepayments** (also known as **prepaid expense**), are both costs that

View File

@ -1,5 +1,5 @@
===================
Manage vendor Bills
Manage vendor bills
===================
The **Purchase** application allows you to manage your purchase orders,

View File

@ -1,5 +1,5 @@
==============================================================
Digitize Vendor Bills with Optical Character Recognition (OCR)
Digitize vendor bills with optical character recognition (OCR)
==============================================================
Encoding bills manually can be a time-consuming task. Having a solution that allows you to digitize

View File

@ -1,5 +1,5 @@
=================
Purchase Receipts
Purchase receipts
=================
**Purchase Receipts** are not invoices but rather confirmations of received payments, such as a

View File

@ -1,7 +1,7 @@
:nosearch:
===================
Account Receivables
Account receivables
===================
.. toctree::

View File

@ -1,7 +1,7 @@
:nosearch:
=================
Customer Invoices
Customer invoices
=================
.. toctree::

View File

@ -1,5 +1,5 @@
=============
Cash Rounding
Cash rounding
=============
**Cash rounding** is required when the lowest physical denomination

View File

@ -1,5 +1,5 @@
========================
Credit Notes and Refunds
Credit notes and refunds
========================
A **credit note**, or **credit memo**, is a document issued
to a customer that notifies them that they have been credited

View File

@ -1,5 +1,5 @@
=================
Deferred Revenues
Deferred revenues
=================
**Deferred revenues**, or **unearned revenue**, are payments made in advance by customers for

View File

@ -1,5 +1,5 @@
===================================
Payment Terms and Installment Plans
Payment terms and installment plans
===================================
**Payment Terms** specify all the conditions under which a sale is paid, mostly to ensure customers

View File

@ -1,5 +1,5 @@
======================================
Send your Invoices by Post (Snailmail)
Send your invoices by post (Snailmail)
======================================
Direct mail is a great way to capture individuals attention at a time where inboxes are always

View File

@ -1,7 +1,7 @@
:nosearch:
=================
Customer Payments
Customer payments
=================
.. toctree::

View File

@ -1,5 +1,5 @@
==================================================
Batch Payments: Batch Deposits (checks, cash etc.)
Batch payments: Batch deposits (checks, cash etc.)
==================================================
A **Batch Deposit** groups multiple payments in a single batch. This allows you to deposit several

View File

@ -1,5 +1,5 @@
=======================================
Batch Payments: SEPA Direct Debit (SDD)
Batch payments: SEPA Direct Debit (SDD)
=======================================
SEPA, the Single Euro Payments Area, is a payment-integration initiative of the European Union for

View File

@ -1,5 +1,5 @@
======================
Invoice Online Payment
Invoice online payment
======================
To make it more convenient for your customers to pay the invoices you issue, you can activate the

View File

@ -1,8 +1,8 @@
:nosearch:
===========
=========
Reporting
===========
=========
.. toctree::
:titlesonly:

View File

@ -1,5 +1,5 @@
============================
Tax Return (VAT Declaration)
Tax return (VAT declaration)
============================
Companies that are registered for **VAT (Value Added Tax)** must file a **Tax return** on a monthly

View File

@ -1,7 +1,7 @@
:nosearch:
===========
Fiscal Year
Fiscal year
===========
.. toctree::

View File

@ -11,6 +11,7 @@ Taxes
taxes/default_taxes
taxes/fiscal_positions
taxes/eu_distance_selling
taxes/avatax
taxes/taxcloud
taxes/retention
taxes/B2B_B2C

View File

@ -0,0 +1,74 @@
==================
Avatax integration
==================
Avatax is a tax calculation provider that can be integrated in Odoo.
.. _avatax/credentials:
Credential configuration
========================
To integrate Avatax with Odoo, go to :menuselection:`Accounting --> Configuration --> Settings -->
Taxes` and add your Avatax credentials in the :guilabel:`Avatax` section.
.. tip::
If you do not yet have credentials, click on :guilabel:`How to Get Credentials`.
.. image:: avatax/avatax-configuration-settings.png
:align: center
:alt: Configure Avatax settings
.. _avatax/tax-mapping:
Tax mapping
===========
The Avatax integration is available on Sale Orders and Invoices with the included Avatax fiscal
position.
Before using the integration, specify an :guilabel:`Avatax Category` on the product categories.
.. image:: avatax/avatax-category.png
:align: center
:alt: Specify Avatax Category on products
Avatax Categories may be overridden or set on individual products as well.
.. image:: avatax/override-avatax-product-category.png
:align: center
:alt: Override product categories as needed
.. _avatax/address-mapping:
Address validation
==================
Manually validate customer addresses by clicking the :guilabel:`Validate address` link in the
customer form view.
.. image:: avatax/validate-customer-address.png
:align: center
:alt: Validate customer addresses
If preferred, choose to keep the newly validated address or the original address in the wizard that
pops up.
.. image:: avatax/choose-customer-address.png
:align: center
:alt: Address validation wizard
.. _avatax/tax-calculation:
Tax calculation
===============
Automatically calculate taxes on Odoo quotations and invoices with Avatax by confirming the
documents. Alternatively, calculate the taxes manually by clicking the :guilabel:`Compute taxes
using Avatax` button while these documents are in draft mode.
Use the :guilabel:`Avalara Code` field that's available on customers, quotations, and invoices to
cross-reference data in Odoo and Avatax.
.. seealso::
- :doc:`fiscal_positions`

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,5 +1,5 @@
=============
Default Taxes
Default taxes
=============
**Default Taxes** define which :doc:`taxes <taxes>` are automatically selected when there is no

View File

@ -1,5 +1,5 @@
===================================
EU intra-community Distance Selling
EU intra-community distance selling
===================================
**Distance sales within the European Union** include cross-border sales of goods and services to a

View File

@ -1,5 +1,5 @@
==========================================
Fiscal Positions (tax and account mapping)
Fiscal positions (tax and account mapping)
==========================================
Default taxes and accounts are set on products and customers to create new transactions on the fly.

View File

@ -28,8 +28,13 @@ To retrieve them, log into your Authorize.Net account, go to :menuselection:`Acc
Key**.
.. important::
If you are trying Authorize.Net as a test, with a *sandbox account*, change the **State** to
*Test Mode*. We recommend doing this on a test Odoo database, rather than on your main database.
If you are trying Authorize.Net as a test, with a *sandbox account*, change the :guilabel:`State`
to :guilabel:`Test Mode`. We recommend doing this on a test Odoo database, rather than on your
main database.
If you set :guilabel:`Test Mode` on Odoo and use an authorize.net account instead of a
sandbox.authorize.net account, it results in the following error: *The merchant login ID or
password is invalid or the account is inactive*.
Configuration tab
-----------------

View File

@ -38,12 +38,10 @@ are:
customer. Then, the default scheduled date on the delivery order
is **SO delivery date - Security Lead Time**.
- **Purchase Security Lead Time**: additional time to mitigate the risk
of a vendor delay. The receipt will be scheduled that many days
earlier to cope with unexpected vendor delays. In case of a
*Replenish to Order*, the **Delivery order scheduled date -
Security lead time** for purchase will be the default
*Receipt* scheduled date.
- **Purchase Security Lead Time**: margin of error for vendor lead times.
When the system generates Purchase Orders for procuring products,
they will be scheduled that many days earlier to cope with unexpected
vendor delays.
- **Purchase Delivery Lead Time**: this is the expected time between a
PO being confirmed and the receipt of the ordered products. The

View File

@ -75,6 +75,21 @@ Connect your database
Only a limited amount of *Company Insights* (*Lead Enrichment*) requests are available as a
trial. This feature requires :ref:`prepaid credits <mail_plugins/pricing>`.
.. tip::
If, after a short while, the panel is still empty, it is possible that your browser cookie
settings prevented it from loading.
Note that these settings also change if you are in "Incognito" mode on your
browser.
To fix this issue, configure your browser to always allow cookies on Odoo's plugin page.
For Google Chrome, you can do so by following the guide at:
`https://support.google.com/chrome/answer/95647 <https://support.google.com/chrome/answer/95647#:~:text=Allow%20or%20block%20cookies%20for%20a%20specific%20site>`_
and adding `download.odoo.com` to the list of `Sites that can always use cookies`.
Once done, the Outlook panel needs to be opened again.
#. Enter your Odoo database URL and click on *Login*.
.. image:: outlook/enter-database-url.png

View File

@ -31,7 +31,7 @@ From there, click on the **Generate Leads** button, a window where you will be a
:align: center
When choosing to target Companied and their contacts you can choose the contacts you are getting based on Role or Seniority.
When choosing to target Companies and their contacts you can choose the contacts you are getting based on Role or Seniority.
When getting contact information make sure to be aware of the latest EU regulation, get more information about General Data Protection Regulation on
`Odoo GDPR <http://odoo.com/gdpr>`__,
@ -49,10 +49,10 @@ You can also add tags to track your generated leads.
Pricing
==================
This is an In-App Purchase feature, each generated lead will cost you one credit.
If you choose to get contact information each contact will also cost us one additional credit.
If you choose to get contact information each contact will also cost you one additional credit.
Here is the pricing for this `feature <https://iap.odoo.com/iap/in-app-services/167?>`__,
To buy credits you can either go to :menuselection:`CRM --> Configuration --> Settings --> Buy
Credits`; or go to :menuselection:`Settings --> In-App Purchases --> View my Services`.
Credits`; or go to :menuselection:`Settings --> Contacts --> Odoo IAP --> View my Services`.
.. image:: media/LM6.png
:align: center

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,47 +1,65 @@
===========================
Manage multiple sales teams
===========================
====================
Multiple sales teams
====================
In Odoo, you can manage several sales teams, departments or channels
with specific sales processes. To do so, we use the concept of *Sales
Channel*.
Odoo lets you manage several sales teams, departments, or channels, each with their own unique
sales processes, using *Sales Teams*.
Create a new sales channel
==========================
To create a new *Sales Channel*, go to :menuselection:`Configuration --> Sales Channels`.
There you can set an email alias to it. Every message sent to that email
address will create a lead/opportunity.
.. image:: media/multi_sales_team01.png
:align: center
Add members to your sales channel
---------------------------------
You can add members to any channel; that way those members will see the
pipeline structure of the sales channel when opening it. Any
lead/opportunity assigned to them will link to the sales channel.
Therefore, you can only be a member of one channel.
This will ease the process review of the team manager.
.. image:: media/multi_sales_team02.png
:align: center
If you now filter on this specific channel in your pipeline, you will
find all of its opportunities.
.. image:: media/multi_sales_team03.png
:align: center
Sales channel dashboard
Create a new Sales Team
=======================
To see the operations and results of any sales channel at a glance, the
sales manager also has access to the *Sales Channel Dashboard* under
*Reporting*.
To create a new Sales Team, go to :menuselection:`CRM --> Configuration --> Sales Teams` then
click **Create**.
On the creation page, set an *Email Alias* to automatically generate a lead/opportunity for this
Sales Team every time a message is sent to that unique email address. You can also choose whether
to accept emails from *Everyone*, *Authenticated Partners*, or *Followers Only*.
Set a *Domain* to assign leads/opportunities to this Sales Team based on specific filters, such as
country, language, or campaign. Set an *Invoicing Target* if this team has specific monthly revenue
goals.
.. image:: multiple_sales_teams/sales-team-creation.png
:align: center
:alt: Creating a Sales Team
Add members to a Sales Team
---------------------------
To add team members, click **Add** under the Assignment tab when editing the Sales Team's
configuration page. Select a salesperson from the dropdown menu or create new salesperson. Set a
maximum number of leads that can be assigned to this salesperson in a 30-day period to ensure that
they do not overwork.
.. image:: multiple_sales_teams/add-a-salesperson.png
:align: center
:alt: Adding a Salesperson
One person can be added as a team member or Team Leader to multiple Sales Teams, allowing them to access all of the pipelines that they need to.
Sales Team dashboard
====================
To view the Sales Team dashboard, go to :menuselection:`CRM --> Configuration --> Sales Teams`. Any
teams you are a part of will appear as dashboard tiles.
Each tile gives an overview of the Sales Team's open opportunities, quotations, sales orders, and
expected revenue, as well as a bar graph of new opportunities per week and an invoicing progress
bar.
.. image:: multiple_sales_teams/sales-team-overview.png
:align: center
:alt: Sales Team Overview
Click on the three dots in the corner of a tile to open a navigational menu that lets you quickly
view documents or reports, create new quotations or opportunities, pick a color for this team, or
access its configuration page.
.. image:: multiple_sales_teams/team-overview-three-dot-menu.png
:align: center
:alt: Three Dot Menu
Click on the **Pipeline** button to go directly to that team's CRM pipeline.
It is shared with the whole ecosystem so every revenue stream is
included in it: Sales, eCommerce, PoS, etc.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -41,6 +41,13 @@ turn, notify the customer that the order (or a part of it) is on its way.
carrier. If the carrier doesn't automatically provide a tracking reference, you'll need to set
one manually. This concerns all marketplaces.
.. tip::
- If your chosen carrier isn't one supported by Odoo, you can still create a carrier bearing its
name (e.g. create a carrier named `Colissimo`). This name is case insensitive, but be careful
about typos, as Amazon won't recognize them.
- Create a delivery carrier named `Self Delivery` to inform Amazon that you make your own
deliveries. You still have to enter a tracking reference, but Amazon won't do anything with it.
.. seealso::
- :doc:`../../../inventory_and_mrp/inventory/shipping/setup/third_party_shipper`

View File

@ -4,7 +4,7 @@ How to adapt your prices to your customers and apply discounts
Odoo has a powerful pricelist feature to support a pricing strategy tailored to your business.
A pricelist is a list of prices or price rules that Odoo searches to determine the suggested price.
You can set several critarias to use a specific price: periods, min. sold quantity (meet a minimum order quantity and get a price break), etc.
You can set several criteria to use a specific price: periods, min. sold quantity (meet a minimum order quantity and get a price break), etc.
As pricelists only suggest prices, they can be overridden by vendors completing sales orders.
Choose your pricing strategy from :menuselection:`Sales --> Settings`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -38,10 +38,6 @@ products and quantities as well as the expiration time of the quotation.
:class: img-thumbnail
:alt: Create a new quotation template on Odoo Sales
.. note::
On each template, you can also specify discounts if the option is activated in the **Sales**
settings.
Design your template
====================

View File

@ -126,6 +126,15 @@ be redirected to the right website using GeoIP.
.. seealso::
- :doc:`/administration/maintain/domain_names`
If you setup an extra website and specify the domain name you will have to
do three things to get this feature to work:
#. Setup an A-record in the DNS configuration of your hosting provider so
that "www.mywebsite2.ext" is redirected to the IP of your Odoo instance.
#. Create an extra Nginx ``server`` block in which you set the
``server_name`` that you've set in the :guilabel:`Website domain` field.
#. Reload and restart your Nginx instance to use the new ``server`` block.
Customize the visitor experience
================================

View File

@ -220,7 +220,8 @@ Python comes with its own package manager: `pip
a single command.
#. Download and install the recommended release (`see README file
<https://github.com/odoo/documentation/tree/master/README.md>`_) of **Python 3** on your machine.
<https://github.com/odoo/documentation/tree/saas-15.3/README.md>`_) of **Python 3** on your
machine.
#. Make sure to have **pip** installed on your machine (on Windows, you can install pip alongside
Python).
#. Execute the following commands in a terminal to verify that both installations finished

View File

@ -72,42 +72,38 @@ Titles and headings
To write good titles and headings:
- **Be concise.**
- **Avoid sentences**, questions, and titles starting with "how to."
- **Don't use pronouns** in your titles, especially 2nd person (*your*)
- **Avoid sentences**, unnecessary verbs, questions, and titles starting with "how to."
- **Don't use pronouns** in your titles, especially 2nd person (*your*).
- Use **sentence case**. This means you capitalize only:
- the first word of the title or heading
- the first word after a colon
- proper nouns (brands, product and service names, etc.)
- app features, as written in the apps
.. important::
Do not capitalize common nouns when they are not referred to as features. This is more likely
to happen in headings rather than in titles.
.. note::
- Most titles and headings generally refer to a concept and do *not* represent the name of a
feature or a model.
- Do not capitalize the words of an acronym if they don't entail a proper noun.
- Verbs in headings are fine since they often describe an action.
+------------------+-----------------------------------+--------------------------------------------------------+
| | Examples | Explanations |
+==================+===================================+========================================================+
| | **Titles** | *Quotation Templates* | "Quotation Templates" is a feature in Odoo. |
| | (H1) +-----------------------------------+--------------------------------------------------------+
| | *Lead Mining* | "Lead Mining" is a feature in Odoo. |
| +-----------------------------------+--------------------------------------------------------+
| | *Resupply from another Warehouse* | "Warehouse" is capitalized as we refer to the feature |
| | | in the app rather than to a real warehouse. |
| +-----------------------------------+--------------------------------------------------------+
| | *Synchronize Google Calendar | "Google Calendar" is a product and "Odoo" is a brand. |
| | with Odoo* | |
+------------------+-----------------------------------+--------------------------------------------------------+
| | **Headings** | *Confirm the quotation* | "The quotation" is a common noun not referring to a |
| | (H2, H3, etc.) | | feature in Odoo. |
| +-----------------------------------+--------------------------------------------------------+
| | *Test environment* | "Environment" is a common noun. |
| +-----------------------------------+--------------------------------------------------------+
| | *Add a new Payment Acquirer* | "Payment Acquirers" is a feature in Odoo. |
| +-----------------------------------+--------------------------------------------------------+
| | *Generate SEPA Direct Debit XML | "SEPA Direct Debit" and "XML" are considered as proper |
| | files to submit payments* | nouns. |
+------------------+-----------------------------------+--------------------------------------------------------+
.. example::
- **Titles** (H1)
- Quotation templates
- Lead mining
- Resupply from another warehouse
- Synchronize Google Calendar with Odoo
- Batch payments: SEPA Direct Debit (SDD)
- Digitize vendor bills with optical character recognition (OCR)
- **Headings** (H2, H3)
- Project stages
- Email alias
- Confirm the quotation
- Generate SEPA Direct Debit XML files to submit payments
.. _contributing/document-structure:

View File

@ -13,3 +13,5 @@ Tutorials
howtos/backend
howtos/profilecode
howtos/company
howtos/accounting_localization
howtos/translations

View File

@ -0,0 +1,386 @@
=======================
Accounting localization
=======================
.. warning::
This tutorial requires knowledge about how to build a module in Odoo (see
:doc:`/developer/howtos/backend`).
Installation procedure
======================
On installing the `account <{GITHUB_PATH}/addons/account>`_ module, the localization module corresponding to the country code of the company is installed automatically.
In case of no country code set or no localization module found, the `l10n_generic_coa <{GITHUB_PATH}/addons/l10n_generic_coa>`_ (US) localization module is installed by default.
Check `post init hook <{GITHUB_PATH}/addons/account/__init__.py>`_ for details.
For example, `l10n_ch <{GITHUB_PATH}/addons/l10n_ch>`_ will be installed if the company has ``Switzerland`` as country.
Building a localization module
==============================
The structure of a basic ``l10n_XX`` module may be described with the following :file:`__manifest__.py` file:
.. code-block:: py
{
"name": "COUNTRY - Accounting",
"version": "1.0.0",
"category": "Accounting/Localizations/Account Charts",
"license": "LGPL-3",
"depends": [
"account",
# "l10n_multilang",
],
"data": [
# Chart of Accounts
"data/account_chart_template_data.xml",
"data/account_account_tag_data.xml",
"data/account.account.template.csv",
"data/account.group.template.csv",
# Taxes
"data/account_tax_group_data.xml",
"data/account_tax_report_data.xml",
"data/account_tax_template_data.xml",
"data/account_fiscal_position_template_data.xml",
"data/account_account_template_post_data.xml",
"data/account_chart_post_data.xml",
"data/account_chart_template_try_loading.xml",
# Views and others
"views/xxxmodel_views.xml"
],
"demo": [
"demo/demo_company.xml",
]
}
In the first file :file:`data/account_chart_template_data.xml`, we set the name for the chart of accounts along with some basic fields.
.. seealso::
:ref:`Chart Template References <reference/account_chart_template>`
.. example::
`addons/l10n_ch/data/l10n_ch_chart_data.xml <{GITHUB_PATH}/addons/l10n_ch/data/l10n_ch_chart_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/data/l10n_ch_chart_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: l10nch_chart_template
:end-at: </record>
.. note::
Recommended **xmlid** for the record is `chart_template`.
If you need many chart of accounts, you can add some suffixes, i.e. `chart_template_XXX`.
Chart of Accounts
=================
Account tags
------------
.. seealso::
:ref:`Account Tag References <reference/account_account_tag>`
Tags are a way to sort accounts.
For example, imagine you want to create a financial report having multiple lines but you have no way to find a rule to dispatch the accounts according to their ``code``.
The solution is the usage of tags, one for each report line, to filter accounts like you want.
Put the tags in the :file:`data/account_account_tag_data.xml` file.
.. example::
`addons/l10n_lt/data/account.account.template.csv <{GITHUB_PATH}/addons/l10n_lt/data/account.account.template.csv>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_lt/data/account.account.template.csv
:condition: odoo_dir_in_path
:language: csv
:end-at: account_account_template_1201
.. example::
`addons/l10n_at/data/account_account_template.xml <{GITHUB_PATH}/addons/l10n_at/data/account_account_template.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_at/data/account_account_template.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: chart_at_template_0010
:end-at: </record>
.. _howtos/account_localization/accounts:
Accounts
--------
.. seealso::
- :ref:`Account References <reference/account_account>`
- :doc:`/applications/finance/accounting/getting_started/initial_configuration/chart_of_accounts`
Obviously, :guilabel:`Chart of Accounts` cannot exist without :guilabel:`Accounts`. You need to specify them in :file:`data/account.account.template.csv`.
.. example::
`addons/l10n_ch/data/account.account.template.csv <{GITHUB_PATH}/addons/l10n_ch/data/account.account.template.csv>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/data/account.account.template.csv
:condition: odoo_dir_in_path
:language: csv
:end-at: ch_coa_1171
CSV is prefered but you may use XML format instead.
.. example::
`addons/l10n_at/data/account_account_template.xml <{GITHUB_PATH}/addons/l10n_at/data/account_account_template.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_at/data/account_account_template.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: chart_at_template_0010
:end-at: </record>
.. warning::
- Avoid the usage of liquidity ``account.account.type``!
Indeed, the bank & cash accounts are created directly at the installation of the localization module and then, are linked to an ``account.journal``.
- Only one account of type payable/receivable is enough for the generic case. We need to define a PoS receivable account as well however. (linked in the CoA)
- Don't create too many accounts: 200-300 is enough. But mostly, we try to find a good balance where the CoA needs minimal adapting for most companies afterwards.
Next settings for the chart of accounts are set in a separate file, because we need to provide a :ref:`list of accounts <howtos/account_localization/accounts>` first. In :file:`data/account_chart_post_data.xml`, we set some default accounts:
.. todo add reference to account_id in CoA
.. example::
`addons/l10n_ch/data/l10n_ch_chart_post_data.xml <{GITHUB_PATH}/addons/l10n_ch/data/l10n_ch_chart_post_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/data/l10n_ch_chart_post_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: l10nch_chart_template
:end-at: </record>
Account groups
--------------
.. seealso::
:ref:`Account Group References <reference/account_group>`
Account groups allow describing the hierarchical structure of the chart of accounts. The filter needs to be activated in the report and then when you decollapse into journal entries it will show the parents of the account.
It works with the prefix *start*/*end*, so every account where the code starts with something between *start* and *end* will have this account.group as the parent group. Furthermore, the account groups can have a parent account group as well to form the hierarchy.
.. example::
`addons/l10n_il/data/account.group.template.csv <{GITHUB_PATH}/addons/l10n_il/data/account.group.template.csv>`_
.. csv-table::
:condition: odoo_dir_in_path
:file: {ODOO_ABSPATH}/addons/l10n_il/data/account.group.template.csv
:widths: 20,20,20,20,20
:header-rows: 1
Taxes
-----
.. seealso::
- :ref:`Tax References <reference/account_tax>`
- :doc:`/applications/finance/accounting/taxation/taxes/taxes`
To add taxes you first need to specify tax groups. You normally need just one tax group for every tax rate, except for the 0% as you need to often distinguish between exempt, 0%, not subject, ... taxes.
This model only has two required fields: *name* and *country*. Create the file :file:`data/account_tax_group_data.xml` and list the groups:
.. code-block:: xml
<odoo>
<data noupdate="1">
<record id="tax_group_tva_0" model="account.tax.group">
<field name="name">TVA 0%</field>
<field name="country_id" ref="base.ch"/>
</record>
...
</data>
</odoo>
.. example::
`addons/l10n_ch/data/account_tax_group_data.xml <{GITHUB_PATH}/addons/l10n_ch/data/account_tax_group_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/data/account_tax_group_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-after: <data
:end-before: </data>
.. example::
`addons/l10n_uk/data/account.tax.group.csv <{GITHUB_PATH}/addons/l10n_uk/data/account.tax.group.csv>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_uk/data/account.tax.group.csv
:condition: odoo_dir_in_path
:language: csv
Now you can add the taxes via :file:`data/account_tax_template_data.xml` file. The first tax you define that is purchase/sale also becomes the default purchase/sale tax for your products.
.. example::
`addons/l10n_ae/data/account_tax_template_data.xml <{GITHUB_PATH}/addons/l10n_ae/data/account_tax_template_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ae/data/account_tax_template_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: uae_sale_tax_5_dubai
:end-at: </record>
If some accounts should use default taxes, you can set them up in :file:`data/account_account_template_post_data.xml`
Tax Report
----------
.. raw:: html
<div><span class="badge" style="background-color:#AD5E99">Enterprise feature</span><div>
The tax report is declared in the :guilabel:`Invoicing` (`account`) app, but the report is only accessible when :guilabel:`Accounting` (`account_accountant`) is installed.
.. seealso::
- :ref:`Tax Report Line References <reference/account_tax_report_line>`
- :doc:`/applications/finance/accounting/reporting/declarations/tax_returns`
In the previous section, you noticed the fields `invoice_repartition_line_ids` or `refund_repartition_line_ids` and probably understood nothing about them. Good news: you are not alone on this incomprehension. Bad news: you have to figure it out a bit. The topic is complicated. Indeed:
.. graphviz:: accounting_localization/tax_report.dot
:class: overflow-auto
The simple version is that, in the tax template, you indicate in the invoice/refund repartition lines whether the base or a percentage of the tax needs to be reported in which report line (through the *minus/plus_report_line_ids* fields).
It becomes clear also when you check the tax configuration in the Odoo interface (or check the docs :ref:`Tax References <reference/account_tax>`, :ref:`Tax Repartition References <reference/account_tax_repartition>`).
And fortunately we have a presentation explaining the tax reports (as in version 13.0) in details:
.. youtube:: PuXE_NyFRTM
:align: right
:width: 700
:height: 394
So, once you have properly configured taxes, you just need to add the :file:`data/account_tax_report_data.xml` file with a record for your `account.tax.report` at the beginning:
.. code-block:: xml
<odoo>
<record id="tax_report" model="account.tax.report">
<field name="name">Tax Report</field>
<field name="country_id" ref="base.XX"/>
</record>
...
</odoo>
... followed by the declaration of its lines, as `account.tax.report.line` records.
.. example::
`addons/l10n_au/data/account_tax_report_data.xml <{GITHUB_PATH}/addons/l10n_au/data/account_tax_report_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_au/data/account_tax_report_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: tax_report
:end-before: account_tax_report_gstrpt_g3
Fiscal positions
----------------
.. seealso::
- :ref:`Fiscal Position References <reference/account_fiscal_position>`
- :doc:`/applications/finance/accounting/taxation/taxes/fiscal_positions`
Specify fiscal positions in the :file:`data/account_fiscal_position_template_data.xml` file.
.. example::
`addons/l10n_es/data/account_fiscal_position_template_data.xml <{GITHUB_PATH}/addons/l10n_es/data/account_fiscal_position_template_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_es/data/account_fiscal_position_template_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: fp_nacional
:end-before: fp_intra
Final steps
===========
The last step when installing a localization module is to try to apply its chart of accounts to the current company (if it does not already have one).
The file :file:`data/account_chart_template_try_loading.xml` is responsible for that.
.. example::
`addons/l10n_ch/data/account_chart_template_data.xml <{GITHUB_PATH}/addons/l10n_ch/data/account_chart_template_data.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/data/account_chart_template_data.xml
:condition: odoo_dir_in_path
:language: xml
:start-at: <function
:end-at: </function>
Finally, you may add a demo company, so the localization can easily be tested in demo mode.
.. example::
`addons/l10n_ch/demo/demo_company.xml <{GITHUB_PATH}/addons/l10n_ch/demo/demo_company.xml>`_
.. literalinclude:: {ODOO_RELPATH}/addons/l10n_ch/demo/demo_company.xml
:condition: odoo_dir_in_path
:language: xml
:start-after: <odoo>
:end-before: </odoo>
Accounting reports
==================
.. raw:: html
<div><span class="badge" style="background-color:#AD5E99">Enterprise feature</span><div>
.. seealso::
:doc:`/applications/finance/accounting/reporting/overview`
Accounting reports should be added via a separate module `l10n_XX_reports` that should go to the `enterprise repository <{GITHUB_ENT_PATH}>`_.
Basic :file:`__manifest__.py` file for such a module looks as following:
.. code-block:: py
{
"name": "COUNTRY - Accounting Reports",
"category": "Accounting/Localizations/Reporting",
"version": "1.0.0",
"license": "OEEL-1",
"depends": [
"l10n_XX", "account_reports"
],
"data": [
"data/account_financial_html_report_data.xml",
],
"auto_install": True,
}
Functional overview of financial reports is here: :doc:`/applications/finance/accounting/reporting/overview/main_reports`.
Some good examples:
* `l10n_ch_reports/data/account_financial_html_report_data.xml <{GITHUB_ENT_PATH}/l10n_ch_reports/data/account_financial_html_report_data.xml>`_
* `l10n_be_reports/data/account_financial_html_report_data.xml <{GITHUB_ENT_PATH}/l10n_be_reports/data/account_financial_html_report_data.xml>`_
For the fields' meaning, dive directly to the source:
* `account.financial.html.report (v15) <https://github.com/odoo/enterprise/blob/d4eff9d39469cf3fe18589a1547cb0cdb93f4ae9/account_reports/models/account_financial_report.py#L59-L75>`_
* `account.financial.html.report.line (v15) <https://github.com/odoo/enterprise/blob/d4eff9d39469cf3fe18589a1547cb0cdb93f4ae9/account_reports/models/account_financial_report.py#L931-L964>`_
The menu for the new report is created automatically. By default, it is located under :menuselection:`Accounting -> Reporting`.
To create a dedicated section in the :guilabel:`Reporting` menu, you need to create a new `ir.ui.menu` record (usually in the main `l10n_XX` module) and set it as `parent_id` field in the `account.financial.html.report` model. Example for the Belgian localization:
* `ir.ui.menu record in l10n_be <{GITHUB_PATH}/addons/l10n_be/data/menuitem_data.xml>`_
* `parent_id field in l10n_be_reports (v15) <https://github.com/odoo/enterprise/blob/d4eff9d39469cf3fe18589a1547cb0cdb93f4ae9/l10n_be_reports/data/account_financial_html_report_data.xml#L11>`_

View File

@ -0,0 +1,73 @@
digraph foo {
graph [
newrank=true,
overlap=false,
];
node [
fontname="Ubuntu"
fontsize=10,
style="filled,setlinewidth(6)",
shape=box,
height=0.1,
width=0.1,
];
edge [
fontsize=8,
];
res_country[label="res.country", fillcolor=white, penwidth=1];
subgraph cluster_invoice {
style = filled;
label = "Invoices";
color = lightyellow;
node [style=filled, color=white];
account_move_line[label="account.move.line"]
account_tax[label="account.tax"]
account_tax_repartition_line[label="account.tax.repartition.line"];
account_account_tag[label="account.account.tag"];
account_move_line -> account_tax [label="tax_ids | tax_line_ids"];
account_move_line -> account_tax_repartition_line [label="tax_repartition_line_id"];
account_move_line -> account_account_tag [label="tag_ids"];
account_tax_repartition_line -> account_account_tag [label="tag_ids"];
account_tax -> account_tax_repartition_line [label="1 for base, 1..* for tax amount"];
}
subgraph cluster_reporting {
style = filled;
label = "Reporting";
color = mistyrose;
node [style=filled, color=white];
account_tax_report_line[label="account.tax.report.line"];
account_generic_tax_report[label="account.generic.tax.report"];
account_tax_report[label="account.tax.report"];
account_tax_report -> account_generic_tax_report [label="Calls and displays", dir=back];
account_tax_report -> account_tax_report_line [label="0..*"]
}
subgraph cluster_templates {
style = filled;
label = "Templates";
color = lightblue;
node [style=filled, color=white];
account_tax_template[label="account.tax.template"];
account_tax_repartition_line_template[label="account.tax.repartition.line.template"];
account_tax_template -> account_tax_repartition_line_template [label="1 for base, 1..* for tax amount"];
}
{
rank=same;
account_tax;
account_tax_repartition_line;
account_account_tag;
res_country;
}
{
rank=same;
account_tax_report;
account_tax_report_line;
account_tax_template;
account_tax_repartition_line_template;
}
account_tax -> account_tax_template [label="Creates when installing CoA", dir=back];
account_tax_repartition_line -> account_tax_repartition_line_template [label="Creates when installing CoA", dir=back];
account_tax_repartition_line_template -> account_account_tag [label="tag_ids"];
account_tax_report_line -> account_account_tag [label="Creates (+ and -)"];
account_tax_report -> res_country [label="0..1"];
account_account_tag -> res_country [label="0..1"];
}

View File

@ -467,7 +467,7 @@ Relational field types are:
:class:`Many2one(other_model, ondelete='set null') <odoo.fields.Many2one>`
A simple link to an other object::
print foo.other_id.name
print(foo.other_id.name)
.. seealso:: `foreign keys <http://www.postgresql.org/docs/9.3/static/tutorial-fk.html>`_
@ -477,7 +477,7 @@ Relational field types are:
accessing it results in a (possibly empty) set of records::
for other in foo.other_ids:
print other.name
print(other.name)
.. danger::
@ -491,7 +491,7 @@ Relational field types are:
records, accessing it also results in a possibly empty set of records::
for other in foo.other_ids:
print other.name
print(other.name)
.. exercise:: Many2one relations

View File

@ -148,10 +148,10 @@ Here are some useful git commands for your day-to-day work.
.. code-block:: console
$ cd $HOME/src/odoo
$ git checkout 14.0
$ git checkout saas-15.3
$ cd $HOME/src/enterprise
$ git checkout 14.0
$ git checkout saas-15.3
* Fetch and rebase:
@ -159,11 +159,11 @@ Here are some useful git commands for your day-to-day work.
$ cd $HOME/src/odoo
$ git fetch --all --prune
$ git rebase --autostash odoo/14.0
$ git rebase --autostash odoo/saas-15.3
$ cd $HOME/src/enterprise
$ git fetch --all --prune
$ git rebase --autostash enterprise/14.0
$ git rebase --autostash enterprise/saas-15.3
Install the dependencies
@ -312,6 +312,10 @@ This is useful for training and we assume that the user is in developer mode for
To activate the developer or debug mode you can follow the steps `here <https://www.odoo.com/documentation/user/general/developer_mode/activate.html>`_.
.. note::
The main page of the Settings screen is only accessible if at least one application is installed.
You will be led into installing your own application in the next chapter.
Extra tools
===========

View File

@ -231,7 +231,7 @@ Common Attributes
Much like the model itself, fields can be configured by passing
configuration attributes as parameters::
name = field.Char(required=True)
name = fields.Char(required=True)
Some attributes are available on all fields, here are the most common ones:

View File

@ -18,7 +18,7 @@ Data Files (CSV)
Odoo is a highly data driven system. Although behavior is customized using Python code, part of a
module's value is in the data it sets up when loaded. One way to load data is through a CSV
file. One example is the
`list of country states <https://github.com/odoo/odoo/blob/master/odoo/addons/base/data/res.country.state.csv>`__
`list of country states <https://github.com/odoo/odoo/blob/saas-15.3/odoo/addons/base/data/res.country.state.csv>`__
which is loaded at installation of the ``base`` module.
.. code-block:: text

View File

@ -159,7 +159,7 @@ By convention, each inherited model is defined in its own Python file. In our ex
- Add a domain to the field so it only lists the available properties.
Now let's add the field to the view and check that everything is working well!
In the next section let's add the field to the view and check that everything is working well!
View Inheritance
================

View File

@ -169,7 +169,7 @@ C X
====== ====== ==== ====== ======
A user with the groups A and C will be able to do anything but delete the object
while one with B and C will be able to read or update, but not search or read.
while one with B and C will be able to read and update it, but not create or delete it.
.. note::

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -8,5 +8,4 @@ Misc
:titlesonly:
misc/api
misc/i18n
misc/other

View File

@ -1,11 +0,0 @@
:nosearch:
====================
Internationalization
====================
.. toctree::
:titlesonly:
i18n/localization
i18n/translations

View File

@ -1,425 +0,0 @@
=======================
Accounting Localization
=======================
.. warning::
This tutorial requires knowledges about how to build a module in Odoo (see
:doc:`/developer/howtos/backend`).
Building a localization module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When installing the ``accounting`` module, the localization module corresponding to the country code of the company is installed automatically.
In case of no country code set or no localization module found, the ``l10n_generic_coa`` (US) localization module is installed by default.
For example, ``l10n_be`` will be installed if the company has ``Belgium`` as country.
This behavior is allowed by the presence of a *.xml* file containing the following code:
.. code-block:: xml
<function model="account.chart.template" name="try_loading_for_current_company">
<value eval="[ref(module.template_xmlid)]"/>
</function>
Where ``module.template_xmlid`` is the **fully-qualified** xmlid of the corresponding template.
Usually located in the ``data`` folder, it must be loaded at the very last in the ``__manifest__.py`` file.
.. danger::
If the *.xml* file is missing, the right chart of accounts won't be loaded on time!
Configuring my own Chart of Accounts?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First of all, before I proceed, we need to talk about the templates. A template is a record that allows replica of itself.
This mechanism is needed when working in multi-companies. For example, the creation of a new account is done using the ``account.account.template`` model.
However, each company using this chart of accounts will be linked to a replica having ``account.account`` as model.
So, the templates are never used directly by the company.
Then, when a chart of accounts needs to be installed, all templates dependent of this one will create a replica and link this newly generated record to the company's user.
It means all such templates must be linked to the chart of accounts in some way. To do so, each one must reference the desired chart of accounts using the ``chart_template_id`` field.
For this reason, we need to define an instance of the ``account.chart.template`` model before creating its templates.
.. code-block:: xml
<record id="..." model="account.chart.template">
<!-- [Required] Specify the name to display for this CoA. -->
<field name="name">...</field>
<!-- [Required] Specify the currency. E.g. "base.USD". -->
<field name="currency_id" ref="..."/>
<!-- [Required] Specify a prefix of the bank accounts. -->
<field name="bank_account_code_prefix">...</field>
<!-- [Required] Specify a prefix of the cash accounts. -->
<field name="cash_account_code_prefix">...</field>
<!-- [Optional] Define a parent chart of accounts that will be installed just before this one. -->
<field name="parent_id" ref="..."/>
<!-- [Optional] Define the number of digits of account codes. By default, the value is 6. -->
<field name="code_digits">...</field>
<!-- [Optional] Boolean to show or not this CoA on the list. By default, the CoA is visible.
This field is mostly used when this CoA has some children (see parent_id field). -->
<field name="visible" eval="..."/>
<!-- [Optional] Boolean to enable the Anglo-Saxon accounting. By default, this field is False. -->
<field name="use_anglo_saxon" eval="..."/>
<!-- [Optional] Boolean to enable the complete set of taxes. By default, this field is True.
This boolean helps you to choose if you want to propose to the user to encode the sale and purchase rates or choose from list of taxes.
This last choice assumes that the set of tax defined on this template is complete. -->
<field name="complete_tax_set" eval="..."/>
<!-- [Optional] Specify the spoken languages.
/!\ This option is only available if your module depends of l10n_multilang.
You must provide the language codes separated by ';', e.g. eval="'en_US;ar_EG;ar_SY'". -->
<field name="spoken_languages" eval="..."/>
</record>
For example, let's take a look to the Belgium chart of accounts.
.. code-block:: xml
<record id="l10nbe_chart_template" model="account.chart.template">
<field name="name">Belgian PCMN</field>
<field name="currency_id" ref="base.EUR"/>
<field name="bank_account_code_prefix">550</field>
<field name="cash_account_code_prefix">570</field>
<field name="spoken_languages" eval="'nl_BE'"/>
</record>
Now that the chart of accounts is created, we can focus on the creation of the templates.
As said previously, each record must reference this record through the ``chart_template_id`` field.
If not, the template will be ignored. The following sections show in details how to create these templates.
Adding a new account to my Chart of Accounts
############################################
It's time to create our accounts. It consists to creating records of ``account.account.template`` type.
Each ``account.account.template`` is able to create an ``account.account`` for each company.
.. code-block:: xml
<record id="..." model="account.account.template">
<!-- [Required] Specify the name to display for this account. -->
<field name="name">...</field>
<!-- [Required] Specify a code. -->
<field name="code">...</field>
<!-- [Required] Specify a type. -->
<field name="user_type_id">...</field>
<!-- [Required] Set the CoA owning this account. -->
<field name="chart_template_id" ref="..."/>
<!-- [Optional] Specify a secondary currency for each account.move.line linked to this account. -->
<field name="currency_id" ref="..."/>
<!-- [Optional] Boolean to allow the user to reconcile entries in this account. True by default. -->
<field name="reconcile" eval="..."/>
<!-- [Optional] Specify a group for this account. -->
<field name="group_id" ref="...">
<!-- [Optional] Specify some tags. -->
<field name="tag_ids" eval="...">
</record>
Some of the described fields above deserve a bit more explanation.
The ``user_type_id`` field requires a value of type ``account.account.type``.
Although some additional types could be created in a localization module, we encourage the usage of the existing types in the `account/data/data_account_type.xml <https://github.com/odoo/odoo/blob/14.0/addons/account/data/data_account_type.xml>`_ file.
The usage of these generic types ensures the generic reports working correctly in addition to those that you could create in your localization module.
.. warning::
Avoid the usage of liquidity ``account.account.type``!
Indeed, the bank & cash accounts are created directly at the installation of the localization module and then, are linked to an ``account.journal``.
.. warning::
Only one account of type payable/receivable is enough.
Although the ``tag_ids`` field is optional, this one remains a very powerful feature.
Indeed, this one allows you to define some tags for your accounts to spread them correctly on your reports.
For example, suppose you want to create a financial report having multiple lines but you have no way to find a rule to dispatch the accounts according their ``code`` or ``name``.
The solution is the usage of tags, one for each report line, to spread and aggregate your accounts like you want.
Like any other record, a tag can be created with the following xml structure:
.. code-block:: xml
<record id="..." model="account.account.tag">
<!-- [Required] Specify the name to display for this tag. -->
<field name="name">...</field>
<!-- [Optional] Define a scope for this applicability.
The available keys are 'accounts' and 'taxes' but 'accounts' is the default value. -->
<field name="applicability">...</field>
</record>
As you can well imagine with the usage of tags, this feature can also be used with taxes.
An examples coming from the ``l10n_be`` module:
.. code-block:: xml
<record id="a4000" model="account.account.template">
<field name="name">Clients</field>
<field name="code">4000</field>
<field name="user_type_id" ref="account.data_account_type_receivable"/>
<field name="chart_template_id" ref="l10nbe_chart_template"/>
</record>
.. warning::
Don't create too much accounts: 200-300 is enough.
Adding a new tax to my Chart of Accounts
########################################
To create a new tax record, you just need to follow the same process as the creation of accounts.
The only difference being that you must use the ``account.tax.template`` model.
.. code-block:: xml
<record id="..." model="account.tax.template">
<!-- [Required] Specify the name to display for this tax. -->
<field name="name">...</field>
<!-- [Required] Specify the amount.
E.g. 7 with fixed amount_type means v + 7 if v is the amount on which the tax is applied.
If amount_type is 'percent', the tax amount is v * 0.07. -->
<field name="amount" eval="..."/>
<!-- [Required] Set the CoA owning this tax. -->
<field name="chart_template_id" ref="..."/>
<!-- [Required/Optional] Define an account if the tax is not a group of taxes. -->
<field name="account_id" ref="..."/>
<!-- [Required/Optional] Define an refund account if the tax is not a group of taxes. -->
<field name="refund_account_id" ref="..."/>
<!-- [Optional] Define the tax's type.
'sale', 'purchase' or 'none' are the allowed values. 'sale' is the default value.
Note: 'none' means a tax can't be used by itself, however it can still be used in a group. -->
<field name="type_tax_use">...</field>
<!-- [Optional] Define the type of amount:
'group' for a group of taxes, 'fixed' for a tax with a fixed amount or 'percent' for a classic percentage of price.
By default, the type of amount is percentage. -->
<field name="amount_type" eval="..."/>
<!-- [Optional] Define some children taxes.
/!\ Should be used only with an amount_type with 'group' set. -->
<field name="children_tax_ids" eval="..."/>
<!-- [Optional] The sequence field is used to define order in which the tax lines are applied.
By default, sequence = 1. -->
<field name="sequence" eval="..."/>
<!-- [Optional] Specify a short text to be displayed on invoices.
For example, a tax named "15% on Services" can have the following label on invoice "15%". -->
<field name="description">...</field>
<!-- [Optional] Boolean that indicates if the amount should be considered as included in price. False by default.
E.g. Suppose v = 132 and a tax amount of 20.
If price_include = False, the computed amount will be 132 * 0.2 = 26.4.
If price_include = True, the computed amount will be 132 - (132 / 1.2) = 132 - 110 = 22. -->
<field name="price_include" eval="..."/>
<!-- [Optional] Boolean to set to include the amount to the base. False by default.
If True, the subsequent taxes will be computed based on the base tax amount plus the amount of this tax.
E.g. suppose v = 100, t1, a tax of 10% and another tax t2 with 20%.
If t1 doesn't affects the base,
t1 amount = 100 * 0.1 = 10 and t2 amount = 100 * 0.2 = 20.
If t1 affects the base,
t1 amount = 100 * 0.1 = 10 and t2 amount = 110 * 0.2 = 22. -->
<field name="include_base_amount" eval="..."/>
<!-- [Optional] Boolean false by default.
If set, the amount computed by this tax will be assigned to the same analytic account as the invoice line (if any). -->
<field name="analytic" eval="..."/>
<!-- [Optional] Specify some tags.
These tags must have 'taxes' as applicability.
See the previous section for more details. -->
<field name="tag_ids" eval="...">
<!-- [Optional] Define a tax group used to display the sums of taxes in the invoices. -->
<field name="tax_group_id" ref="..."/>
<!-- [Optional] Define the tax exigibility either based on invoice ('on_invoice' value) or
either based on payment using the 'on_payment' key.
The default value is 'on_invoice'. -->
<field name="tax_exigibility">...</field>
<!-- [Optional] Define a cash basis account in case of tax exigibility 'on_payment'. -->
<field name="cash_basis_account" red="..."/>
</record>
An example found in the ``l10n_pl`` module:
.. code-block:: xml
<record id="vp_leas_sale" model="account.tax.template">
<field name="chart_template_id" ref="pl_chart_template"/>
<field name="name">VAT - leasing pojazdu(sale)</field>
<field name="description">VLP</field>
<field name="amount">1.00</field>
<field name="sequence" eval="1"/>
<field name="amount_type">group</field>
<field name="type_tax_use">sale</field>
<field name="children_tax_ids" eval="[(6, 0, [ref('vp_leas_sale_1'), ref('vp_leas_sale_2')])]"/>
<field name="tag_ids" eval="[(6,0,[ref('l10n_pl.tag_pl_21')])]"/>
<field name="tax_group_id" ref="tax_group_vat_23"/>
</record>
Adding a new fiscal position to my Chart of Accounts
####################################################
.. note::
If you need more information about what is a fiscal position and how it works in Odoo,
please refer to :doc:`/applications/finance/accounting/taxation/taxes/fiscal_positions`.
To create a new fiscal position, simply use the ``account.fiscal.position.template`` model:
.. code-block:: xml
<record id="..." model="account.fiscal.position.template">
<!-- [Required] Specify the name to display for this fiscal position. -->
<field name="name">...</field>
<!-- [Required] Set the CoA owning this fiscal position. -->
<field name="chart_template_id" ref="..."/>
<!-- [Optional] Add some additional notes. -->
<field name="note">...</field>
</record>
Adding the properties to my Chart of Accounts
#############################################
When the whole accounts are generated, you have the possibility to override the newly generated chart of accounts by adding some properties that correspond to default accounts used in certain situations.
This must be done after the creation of accounts before each one must be linked to the chart of accounts.
.. code-block:: xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_xx_chart_template" model="account.chart.template">
<!-- Define receivable/payable accounts. -->
<field name="property_account_receivable_id" ref="..."/>
<field name="property_account_payable_id" ref="..."/>
<!-- Define categories of expense/income account. -->
<field name="property_account_expense_categ_id" ref="..."/>
<field name="property_account_income_categ_id" ref="..."/>
<!-- Define input/output accounts for stock valuation. -->
<field name="property_stock_account_input_categ_id" ref="..."/>
<field name="property_stock_account_output_categ_id" ref="..."/>
<!-- Define an account template for stock valuation. -->
<field name="property_stock_valuation_account_id" ref="..."/>
<!-- Define loss/gain exchange rate accounts. -->
<field name="expense_currency_exchange_account_id" ref="..."/>
<field name="income_currency_exchange_account_id" ref="..."/>
<!-- Define a transfer account. -->
<field name="transfer_account_id" ref="..."/>
</record>
</odoo>
For example, let's come back to the Belgium PCMN. This chart of accounts is override in this way to add some properties.
.. code-block:: xml
<record id="l10nbe_chart_template" model="account.chart.template">
<field name="property_account_receivable_id" ref="a4000"/>
<field name="property_account_payable_id" ref="a440"/>
<field name="property_account_expense_categ_id" ref="a600"/>
<field name="property_account_income_categ_id" ref="a7010"/>
<field name="expense_currency_exchange_account_id" ref="a654"/>
<field name="income_currency_exchange_account_id" ref="a754"/>
<field name="transfer_account_id" ref="trans"/>
</record>
How to create a new bank operation model?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
How a bank operation model works exactly in Odoo? See :doc:`/applications/finance/accounting/bank/reconciliation/reconciliation_models`.
Since ``V10``, a new feature is available in the bank statement reconciliation widget: the bank operation model.
This allows the user to pre-fill some accounting entries with a single click.
The creation of an ``account.reconcile.model.template`` record is quite easy:
.. code-block:: xml
<record id="..." model="account.reconcile.model.template">
<!-- [Required] Specify the name to display. -->
<field name="name">...</field>
<!-- [Required] Set the CoA owning this. -->
<field name="chart_template_id" ref="..."/>
<!-- [Optional] Set a sequence number defining the order in which it will be displayed.
By default, the sequence is 10. -->
<field name="sequence" eval="..."/>
<!-- [Optional] Define an account. -->
<field name="account_id" ref="..."/>
<!-- [Optional] Define a label to be added to the journal item. -->
<field name="label">...</field>
<!-- [Optional] Define the type of amount_type, either 'fixed' or 'percentage'.
The last one is the default value. -->
<field name="amount_type">...</field>
<!-- [Optional] Define the balance amount on which this model will be applied to (100 by default).
Fixed amount will count as a debit if it is negative, as a credit if it is positive. -->
<field name="amount">...</field>
<!-- [Optional] Define eventually a tax. -->
<field name="tax_id" ref="..."/>
<!-- [Optional] The sames fields are available twice.
To enable a second journal line, you can set this field to true and
fill the fields accordingly. -->
<field name="has_second_line" eval="..."/>
<field name="second_account_id" ref="..."/>
<field name="second_label">...</field>
<field name="second_amount_type">...</field>
<field name="second_amount">...</field>
<field name="second_tax_id" ref="..."/>
</record>
How to create a new dynamic report?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you need to add some reports on your localization, you need to create a new module named **l10n_xx_reports**.
Furthermore, this additional module must be present in the ``enterprise`` repository and must have at least two dependencies,
one to bring all the stuff for your localization module and one more, ``account_reports``, to design dynamic reports.
.. code-block:: py
'depends': ['l10n_xx', 'account_reports'],
Once it's done, you can start the creation of your report statements. The documentation is available in the following `slides <https://www.odoo.com/slides/slide/how-to-create-custom-accounting-report-415>`_.

View File

@ -17,3 +17,4 @@ Backend
backend/testing
backend/http
backend/mixins
backend/standard_modules

View File

@ -0,0 +1,10 @@
:nosearch:
================
Standard modules
================
.. toctree::
:titlesonly:
standard_modules/account

View File

@ -0,0 +1,17 @@
:nosearch:
==========
Accounting
==========
.. toctree::
:titlesonly:
account/account_account_tag
account/account_account
account/account_chart_template
account/account_fiscal_position
account/account_group
account/account_tax_report_line
account/account_tax
account/account_tax_repartition

View File

@ -0,0 +1,19 @@
.. _reference/account_account:
=======
Account
=======
.. automodel:: odoo.addons.account.models.chart_template.AccountAccountTemplate
:main:
.. autofield:: name
.. autofield:: currency_id
.. autofield:: code
.. autofield:: user_type_id
.. autofield:: reconcile
.. autofield:: note
.. autofield:: tax_ids
.. autofield:: nocreate
.. autofield:: chart_template_id
.. autofield:: tag_ids

View File

@ -0,0 +1,16 @@
.. _reference/account_account_tag:
===========
Account Tag
===========
.. automodel:: odoo.addons.account.models.account_account_tag.AccountAccountTag
:main:
.. autofield:: name
.. autofield:: applicability
.. autofield:: color
.. autofield:: active
.. autofield:: tax_report_line_ids
.. autofield:: tax_negate
.. autofield:: country_id

View File

@ -0,0 +1,50 @@
.. _reference/account_chart_template:
==============
Chart Template
==============
.. automodel:: odoo.addons.account.models.chart_template.AccountChartTemplate
:main:
.. autofield:: name
.. autofield:: parent_id
.. autofield:: code_digits
.. autofield:: visible
.. autofield:: currency_id
.. autofield:: country_id
.. autofield:: use_anglo_saxon
.. autofield:: bank_account_code_prefix
.. autofield:: cash_account_code_prefix
.. autofield:: transfer_account_code_prefix
.. autofield:: account_ids
.. autofield:: income_currency_exchange_account_id
.. autofield:: expense_currency_exchange_account_id
.. autofield:: account_journal_suspense_account_id
.. autofield:: account_journal_payment_debit_account_id
.. autofield:: account_journal_payment_credit_account_id
.. autofield:: default_cash_difference_income_account_id
.. autofield:: default_cash_difference_expense_account_id
.. autofield:: default_pos_receivable_account_id
.. autofield:: property_account_receivable_id
.. autofield:: property_account_payable_id
.. autofield:: property_account_expense_categ_id
.. autofield:: property_account_income_categ_id
.. autofield:: property_account_expense_id
.. autofield:: property_account_income_id
.. autofield:: property_stock_account_input_categ_id
.. autofield:: property_stock_account_output_categ_id
.. autofield:: property_stock_valuation_account_id
.. autofield:: property_tax_payable_account_id
.. autofield:: property_tax_receivable_account_id
.. autofield:: property_advance_tax_payment_account_id
.. autofield:: property_cash_basis_base_account_id
.. automodel:: odoo.addons.l10n_multilang.models.account.AccountChartTemplate
Multi language support for Chart of Accounts, Taxes, Tax Codes, Journals,
Accounting Templates, Analytic Chart of Accounts and Analytic Journals.
.. autofield:: spoken_languages

View File

@ -0,0 +1,22 @@
.. _reference/account_fiscal_position:
===============
Fiscal Position
===============
.. automodel:: odoo.addons.account.models.chart_template.AccountFiscalPositionTemplate
:main:
.. autofield:: sequence
.. autofield:: name
.. autofield:: chart_template_id
.. autofield:: account_ids
.. autofield:: tax_ids
.. autofield:: note
.. autofield:: auto_apply
.. autofield:: vat_required
.. autofield:: country_id
.. autofield:: country_group_id
.. autofield:: state_ids
.. autofield:: zip_from
.. autofield:: zip_to

View File

@ -0,0 +1,14 @@
.. _reference/account_group:
=============
Account Group
=============
.. automodel:: odoo.addons.account.models.chart_template.AccountGroupTemplate
:main:
.. autofield:: parent_id
.. autofield:: name
.. autofield:: code_prefix_start
.. autofield:: code_prefix_end
.. autofield:: chart_template_id

View File

@ -0,0 +1,28 @@
.. _reference/account_tax:
=====
Taxes
=====
.. automodel:: odoo.addons.account.models.chart_template.AccountTaxTemplate
:main:
.. autofield:: chart_template_id
.. autofield:: name
.. autofield:: type_tax_use
.. autofield:: tax_scope
.. autofield:: amount_type
.. autofield:: active
.. autofield:: children_tax_ids
.. autofield:: sequence
.. autofield:: amount
.. autofield:: description
.. autofield:: price_include
.. autofield:: include_base_amount
.. autofield:: is_base_affected
.. autofield:: analytic
.. autofield:: invoice_repartition_line_ids
.. autofield:: refund_repartition_line_ids
.. autofield:: tax_group_id
.. autofield:: tax_exigibility
.. autofield:: cash_basis_transition_account_id

View File

@ -0,0 +1,16 @@
.. _reference/account_tax_repartition:
================
Tax Repartitions
================
.. automodel:: odoo.addons.account.models.chart_template.AccountTaxRepartitionLineTemplate
:main:
.. autofield:: factor_percent
.. autofield:: repartition_type
.. autofield:: account_id
.. autofield:: invoice_tax_id
.. autofield:: refund_tax_id
.. autofield:: tag_ids
.. autofield:: use_in_tax_closing

View File

@ -0,0 +1,24 @@
.. _reference/account_tax_report_line:
===============
Tax Report Line
===============
.. automodel:: odoo.addons.account.models.account_tax_report.AccountTaxReportLine
:main:
.. autofield:: name
.. autofield:: tag_ids
.. autofield:: report_action_id
.. autofield:: children_line_ids
.. autofield:: parent_id
.. autofield:: sequence
.. autofield:: report_id
.. autofield:: tag_name
.. autofield:: code
.. autofield:: formula
.. autofield:: carry_over_condition_method
.. autofield:: carry_over_destination_line_id
.. autofield:: carryover_line_ids
.. autofield:: is_carryover_persistent
.. autofield:: is_carryover_used_in_balance

View File

@ -599,7 +599,7 @@ Javascript
#. Add any step you want.
Every step contains at least a trigger. You can either use the `predefined steps
<https://github.com/odoo/odoo/blob/master/addons/web_tour/static/src/js/tour_step_utils.js>`_ or write
<https://github.com/odoo/odoo/blob/saas-15.3/addons/web_tour/static/src/js/tour_step_utils.js>`_ or write
your own personalized step.
Here are some example of steps:

View File

@ -92,7 +92,7 @@ an impact on all view types.
Disable/enable record deletion on the view through the **Action** dropdown.
* ``duplicate`` (``form`` & ``list``)
* ``duplicate`` (``form``)
Disable/enable record duplication on the view through the **Action** dropdown.
@ -1707,7 +1707,7 @@ root can have the following attributes:
``{$name}`` can be ``bf`` (``font-weight: bold``), ``it``
(``font-style: italic``), or any `bootstrap contextual color`_ (``danger``,
``info``, ``muted``, ``primary``, ``success`` or ``warning``).
``create``, ``edit``, ``delete``, ``duplicate``, ``import``, ``export_xlsx``
``create``, ``edit``, ``delete``, ``import``, ``export_xlsx``
allows *dis*\ abling the corresponding action in the view by setting the
corresponding attribute to ``false``
``limit``

View File

@ -1130,7 +1130,7 @@ to be translated. The way it currently works is the following:
is found.
Note that translations are explained in more details, from the server point of
view, in the document :doc:`/developer/misc/i18n/translations`.
view, in the document :doc:`/developer/howtos/translations`.
There are two important functions for the translations in javascript: *_t* and
*_lt*. The difference is that *_lt* is lazily evaluated.
@ -2241,5 +2241,3 @@ For more information, look into the `control_panel_renderer.js <https://github.c
https://api.jquery.com/delegate/
.. _datepicker: https://github.com/Eonasdan/bootstrap-datetimepicker

View File

@ -0,0 +1,144 @@
import datetime
from typing import Sequence
from docutils.parsers.rst import directives
from docutils.parsers.rst.states import RSTState
from sphinx.domains.python import PyClasslike, PyAttribute
from sphinx.ext.autodoc import AttributeDocumenter, ClassDocumenter
import odoo
nested_parse = RSTState.nested_parse
def patched_nested_parse(self, block, input_offset, node, match_titles=False,
state_machine_class=None, state_machine_kwargs=None):
match_titles = True
return nested_parse(self, block, input_offset, node, match_titles, state_machine_class, state_machine_kwargs)
RSTState.nested_parse = patched_nested_parse
class OdooClassDocumenter(ClassDocumenter):
objtype = 'model'
priority = 10 + ClassDocumenter.priority
option_spec = {**ClassDocumenter.option_spec, 'main': directives.flag}
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
return isinstance(member, odoo.models.MetaModel)
def add_content(self, more_content):
sourcename = self.get_sourcename()
cls = self.object
if 'main' in self.options:
self.add_line(f".. _model-{cls._name.replace('.', '-')}:", sourcename)
self.add_line('.. py:attribute:: _name', sourcename)
self.add_line(f' :value: {cls._name}', sourcename)
self.add_line('' , sourcename)
super().add_content(more_content)
def add_directive_header(self, sig: str) -> None:
"""Add the directive header and options to the generated content."""
sourcename = self.get_sourcename()
module = self.modname.split('addons.')[1].split('.')[0]
if 'main' in self.options:
title = f"Original definition from `{module}`"
else:
title = f"Additional fields with `{module}`"
self.add_line(title, sourcename)
self.add_line('=' * len(title), sourcename)
self.add_line('', sourcename)
return super().add_directive_header(sig)
class FieldDocumenter(AttributeDocumenter):
objtype = 'field'
priority = 10 + AttributeDocumenter.priority
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
return isinstance(member, odoo.fields.Field)
def update_annotations(self, parent):
super().update_annotations(parent)
annotation = parent.__annotations__
attrname = self.object.name
annotation[attrname] = dict
field = self.object
if field.type == 'many2one':
annotation[attrname] = int
elif field.type in ('one2many', 'many2many'):
annotation[attrname] = Sequence[odoo.fields.Command]
elif field.type in ('selection', 'reference', 'char', 'text', 'html'):
annotation[attrname] = str
elif field.type == 'boolean':
annotation[attrname] = bool
elif field.type in ('float', 'monetary'):
annotation[attrname] = float
elif field.type == 'integer':
annotation[attrname] = int
elif field.type == 'date':
annotation[attrname] = datetime.date
elif field.type == 'datetime':
annotation[attrname] = datetime.datetime
def add_content(self, more_content):
source_name = self.get_sourcename()
field = self.object
if field.required:
self.add_line(f":required:", source_name)
self.add_line(f":name: {field.string}", source_name)
if field.readonly:
self.add_line(f":readonly: this field is not supposed to/cannot be set manually", source_name)
if not field.store:
self.add_line(f":store: this field is there only for technical reasons", source_name)
if field.type == 'selection':
if isinstance(field.selection, (list, tuple)):
self.add_line(f":selection:", source_name)
for tech, nice in field.selection:
self.add_line(f" ``{tech}``: {nice}", source_name)
if field.type in ('many2one', 'one2many', 'many2many'):
comodel_name = field.comodel_name
string = f":comodel: :ref:`{comodel_name} <model-{comodel_name.replace('.', '-')}>`"
self.add_line(string, source_name)
reference = self.config.model_references.get(comodel_name)
if reference:
self.add_line(f":possible_values: `{reference} <{self.config.source_read_replace_vals['GITHUB_PATH']}/{reference}>`__", source_name)
if field.default:
self.add_line(f":default: {field.default(odoo.models.Model)}", source_name)
super().add_content(more_content)
if field.help:
self.add_line('', source_name)
for line in field.help.strip().split('\n'):
self.add_line(line, source_name)
self.add_line('', source_name)
def get_doc(self, encoding=None, ignore=None):
# only read docstring of field instance, do not fallback on field class
field = self.object
field.__doc__ = field.__dict__.get('__doc__', "")
res = super().get_doc(encoding, ignore)
return res
def disable_warn_missing_reference(app, domain, node):
if not ((domain and domain.name != 'std') or node['reftype'] != 'ref'):
target = node['reftarget']
if target.startswith('model-'):
node['reftype'] = 'odoo_missing_ref'
return True
def setup(app):
app.add_config_value('model_references', {}, 'env')
directives.register_directive('py:model', PyClasslike)
directives.register_directive('py:field', PyAttribute)
app.add_autodocumenter(FieldDocumenter)
app.add_autodocumenter(OdooClassDocumenter)
app.connect('warn-missing-reference', disable_warn_missing_reference, priority=400)
return {
'parallel_read_safe': True,
'parallel_write_safe': True,
}

View File

@ -19,6 +19,8 @@ def setup(app):
directives.register_directive('autodata', PlaceHolder)
directives.register_directive('automethod', PlaceHolder)
directives.register_directive('autoattribute', PlaceHolder)
directives.register_directive('autofield', PlaceHolder)
directives.register_directive('automodel', PlaceHolder)
return {
'parallel_read_safe': True,

Some files were not shown because too many files have changed in this diff Show More