summaryrefslogtreecommitdiff
path: root/doc/reference/orm.rst
AgeCommit message (Collapse)Author
2021-05-04[MOV] doc: move documentation to a dedicated repositoryVictor Feyens
In odoo/documentation-user#945, the developer documentation is merged with the user documentation in a single repository and build config. This commit then removes source files for the developer documentation from the odoo/odoo repository. DOC PR: https://github.com/odoo/documentation-user/pull/945 task-2351938 task-2352371 task-2205684 task-2352544 Co-authored-by: Victor Feyens <vfe@odoo.com> Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2020-10-15[FIX] doc: warn about pitfalls of inverse batchingAdrian Torres
This commit updates the documentation surrounding compute and inverse methods for fields, explicitly warning API consumers that grouping multiple compute fields under a single inverse method is error-prone and could not work at all (it can still work under specific conditions but henceforth it shall be considered bad practice). This case was found at https://github.com/odoo/enterprise/pull/13815/commits/a651413df915f166697d26a83084582207405858 closes odoo/odoo#60103 X-original-commit: 1d21924c1da0bed59cd105a3d9bf9b60fa2d7bc4 Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-09-16[IMP] doc: related fields do not support chained x2m dependenciesVictor Feyens
The behavior isn't exactly undefined: it will appear to work if the relation refers to only 1 instance. If there are multiple it will give results for 1 instance and ignore the others. This behavior should not be relied upon, hence I'm documenting it as undefined. I confirmed this with mat from the ORM team. Even better would be to raise an error or warning if `related` is used in this context. closes odoo/odoo#57270 closes odoo/odoo#57797 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com> Signed-off-by: Raf Geens <raf-odoo@users.noreply.github.com> Co-authored-by: Raf Geens <raf@odoo.com>
2020-07-28[IMP] core: orm docXavier Morel
* fix link from backend tutorial to log_access section * flesh out log access documentation * add documentation for log_access itself & improve doc for a few other model-level attributes
2020-07-23[IMP] doc: _inherits usage warningsVictor Feyens
The delegation inheritance is very useful in some cases, but its usage shouldn't be encouraged. Furthermore, chained _inherits may result in unexpected behavior/results, and really shouldn't be used. closes odoo/odoo#54864 X-original-commit: 4a06a4c79e962906832f98147fe87a2c19efaa75 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-19[REF] ir.autovacuum: declarative garbage collector registrationJulien Castiaux
The ir.autovacuum model purpose is to run several garbage collecting operations like removing files from the filestore when no attachment references them anymore. The precedent strategy to register new garbage collection tasks was to override the `power_on` method and to imperatively execute a vacuum cleaning method on a given model. All calls were executed in a single SQL transaction without any error handling, meaning a single fail during any call resulted in a complete failure of the entire vacuum cleaning chain. We introduce a new `@autovacuum` api decorator, its purpose it to register garbage collecting methods that will be safely executed in their own transaction by the vacuum cleaner. In order to ensure this new strategy is used, we deprecate `power_on` extensions. By the way, garbage-collecting methods can be quite heavy and we don't want users to directly call them. We now ensure they are private. closes odoo/odoo#47842 Task: 2154079 Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Co-authored-by: Raphael Collet <rco@odoo.com> Co-authored-by: Olivier Dony <odo@odoo.com>
2020-04-07[IMP] base: document all field types.Victor Feyens
closes odoo/odoo#49135 X-original-commit: cc653d3f1a49e2b7b2cc0ec833097bd7cf3528a1 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-07[IMP] doc: document the api.model decoratorVictor Feyens
X-original-commit: efa3a148cb178693b73af054cd6e19870d068454
2020-02-05[IMP] doc: orm page missing information + UIVictor Feyens
* Some fields types were missing * Add information on multi-record field access * UI finetuning
2019-11-28[ADD] doc: multi-company howtosVictor Feyens
closes odoo/odoo#41038 X-original-commit: eaabad20516a73a97b23343a22357659c29945f7 Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com> Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2019-11-12[ADD] ORM: with_companyVictor Feyens
2019-11-04[IMP] base, doc: orm page refactoring.Victor Feyens
closes odoo/odoo#39725 X-original-commit: 7ce7c58592c7c7202a37c73767c477be5a835752 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-08[FIX] doc: fix some sphinx warnings.Victor Feyens
closes odoo/odoo#38170 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-03[IMP] doc: add missing attributesFlorent de Labarre
Add documentation about model attributes _parent_name _date_name _fold_name _translate Forward port of #32559 to 13.0 closes odoo/odoo#37840 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-13[MERGE] forward port branch saas-12.4 up to fe59754c520Christophe Simonis
closes odoo/odoo#36721 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30[MERGE] forward port branch 12.0 up to 52f6e38cea8Christophe Simonis
2019-08-28[FIX] doc: add parent_of operatorFlorent de Labarre
closes odoo/odoo#32558 Signed-off-by: vfe <Feyensv@users.noreply.github.com>
2019-09-03[ADD] fields, models: company consistency checkSimon Lejeune
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
2019-08-01[IMP] doc: remove calls to @api.guess and @api.noguessmreficent
Those two decorators are removed/deprecated since recent commits but some references remained in the documentation. api.guess and api.noguess is deprecated and removed since c552fb7a618 closes odoo/odoo#35332 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-30[IMP] doc: remove calls to @api.multi and @api.oneYenthe666
Those two decorators are removed/deprecated since recent commits but some references remained in the documentation. api.multi is deprecated since https://github.com/odoo/odoo/commit/cc62447a44c2cf4e2edaf8a1f6d94520e799ddd9 api.one was removed with https://github.com/odoo/odoo/commit/407f1f6cdb87a59bbad9f853078d7345cdf9f60c closes odoo/odoo#35261 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-30[REM] doc: autodoc of removed api.* decoratorsXavier Morel
* @one was removed in 407f1f6cdb87a59bbad9f853078d7345cdf9f60c * @v7 and @v8 were removed in c552fb7a618afe2feea2e0358ead9eb6ebff0c94 * @multi was removed in a8767716cfd14abc7f87204d4d180811f663b648
2019-07-17[REM] *: calls to @api.multiAdrian Torres
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-08[IMP] api: remove deprecated decoratorsRaphael Collet
2018-11-23[MERGE] forward port branch 12.0 up to b3052b690faChristophe Simonis
2018-11-18[DOC] orm: fix a typo in `parent_path` docOlivier Dony
2018-11-18[DOC] orm: update doc for `parent_path` fieldOlivier Dony
As of 12.0, the `parent_left` and `parent_right` special fields previously used to store the tree structure have been replaced with a single `parent_path` field. See also PR #22558.
2018-11-06[MERGE] forward port branch 12.0 up to dd70c684268Christophe Simonis
2018-10-30[IMP] doc: add a more meaningful exampleBruno Paulino
update Model Inheritance Delegation docs with a more meaningful example
2018-11-02[MERGE] forward port branch saas-11.4 up to f6ca72b3ce9Christophe Simonis
2018-10-24[MERGE] forward port branch saas-15 up to bff43f0aa14Christophe Simonis
2018-10-23[FIX] doc: correct reference to the line in the fileMartin Trigaux
Introduced at 94e82753acc36
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis
2018-09-04[FIX] doc: Change name of method in documentationJesús Alan Ramos Rodríguez
invalidate_all no longer exists Closes #26613
2018-08-27[FIX] doc building and warningsXavier Morel
doc: * fix incorrect doc comments (documenting params which don't exist) * correctly quote non-refs * fix role label syntax (backticks must be escaped) * add newline to fix warning JS doc parser: * fix handling of already-resolved objects * fix handling of non-string properties (e.g. foo[0] at module toplevel) * don't blow up if subject of .include call can't be resolved (just ignore) Others: * add translator support for ``problematic`` node (apparently used for some refs by recent Sphinx)
2018-08-27[FIX] doc: API of createRaphael Collet
2018-08-06[REF] *: use native date/datetime for Date/Datetime fieldsRaphael Collet
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master. This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well. Task-ID: 47189
2018-03-19[MERGE] forward port branch saas-15 up to 0d552411852Christophe Simonis
2018-03-16[IMP] doc: add a tip to create a model without any tableJerther
As explained in #17386, _auto=False on a model is used for report where the table is explicitely created in init method. To create a model without any table, AbstractModel should be used. Closes #19448
2018-03-16[IMP] doc: add details of o2m and m2m limitationsRyan Cole
2017-07-06[FIX] doc: clarify: `record[field]` is valid/recommendedOlivier Dony
2017-06-16[FIX] doc: correctly link doc and test linesMartin Trigaux
The test is surprisingly formated but it is to be able to extract the relevant lines in the documentation
2017-02-23[MERGE] forward port branch saas-11 up to 1730dca1016Christophe Simonis
2017-02-17[MERGE] forward port branch 9.0 up to a7531810f39Christophe Simonis
2017-02-17[IMP] doc: more explicit section nameMartin Trigaux
A section for uncategorised methods. Fixes https://twitter.com/mannequin/status/832360802422312962
2016-10-11[FIX] doc: building correctly autoclass referencesMartin Trigaux
2016-09-22[MERGE] forward port branch saas-10 up to 477482eChristophe Simonis
2016-09-22[MERGE] forward port branch saas-6 up to 6a67e5cChristophe Simonis
2016-09-15[IMP] document subset/superset operationsxmo-odoo
2016-06-21[MERGE] forward port of branch saas-10 up to d73f0d8Christophe Simonis
2016-06-20[MERGE] forward port of branch saas-6 up to b87a93aChristophe Simonis