diff options
| author | Simon Lejeune <sle@openerp.com> | 2019-08-28 11:07:36 +0000 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2019-09-03 15:03:45 +0000 |
| commit | 504b5fe5a9613bb836bd865475c4b17713b78864 (patch) | |
| tree | ecb7241cb955006b84e563d64e62a1ec248ec021 /doc/reference | |
| parent | f6ab2198d7aee40f3b32c64379c9e973bcf85598 (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.rst | 7 |
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 |
