summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2019-08-28 11:07:36 +0000
committerSimon Lejeune <sle@openerp.com>2019-09-03 15:03:45 +0000
commit504b5fe5a9613bb836bd865475c4b17713b78864 (patch)
treeecb7241cb955006b84e563d64e62a1ec248ec021 /doc/reference
parentf6ab2198d7aee40f3b32c64379c9e973bcf85598 (diff)
[ADD] fields, models: company consistency check
Assigning `check_company=True` to a field will - set a default domain filtering the companies - allow to call `_check_company` on the records to ensure the domain is respected Setting `_check_company_auto = True` on a model will ensure `_check_company` is called at create and write, enforcing the multi company domain. Joint work with Raphael Collet <rco@odoo.com> task-1985992
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/orm.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst
index b71b52a8907..47b3d508a37 100644
--- a/doc/reference/orm.rst
+++ b/doc/reference/orm.rst
@@ -697,6 +697,13 @@ Model Reference
:type: bool
+ .. attribute:: _check_company_auto
+
+ On write and create, call ``_check_company`` to ensure companies
+ consistency on the relational fields having ``check_company=True``
+ as attribute.
+ (default: ``False``)
+
.. rubric:: CRUD
.. automethod:: create