变更日志

Odoo version 18.0

  • Searching by name is now implemented as _search_display_name like all other fields. See #174967.

  • New methods to check access rights and rules now combine both access rights and rules: check_access, has_access and _filtered_access. See #179148.

  • Translations are made available from the Environment with #174844.

Odoo Online version 17.4

  • The internal operator inselect is removed. The alternative is to use in with a Query or SQL object. #171371.

Odoo Online version 17.3

  • We can now group by date parts numbers in read_group, _read_group and domains with #159528.

Odoo Online version 17.2

  • The group_operator attribute of Field is renamed into aggregator with #127353.

  • We can now group/aggregate/order by related no-store field with #127353.

Odoo Online version 17.1

  • Method _flush_search() has been deprecated with #144747. The flushing of fields is now done by execute_query(), and is based on metadata put in the SQL object by _search() and other low-level ORM methods that build such objects. Those methods are also responsible for checking the access rights on the fields that are used in the SQL object.

Odoo version 17.0

  • Introduce an SQL wrapper object to make SQL composition easier and safer with respect to SQL injections. Methods of the ORM now use it internally. Introduced by #134677.

Odoo Online version 16.4

  • Method name_get() has been deprecated with #122085. Read field display_name instead.

Odoo Online version 16.3

Odoo Online version 16.2

  • Refactor the implementation of searching and reading methods to be able to combine both in a minimal number of SQL queries. We introduce two new methods search_fetch() and fetch() that take advantage of the combination. More details can be found on the pull request #112126.

Odoo 版本 16.0

  • 翻译字段的翻译存储为 JSONB 值,使用 #97692#101115。代码翻译不再存储在数据库中。它们变得静态,并在需要时从 PO 文件中提取。

  • search_count() takes the limit argument into account with #95589. It limits the number of records to count, improving performance when a partial result is acceptable.

Odoo 在线版本 15.4

  • 使用 #87527 的新API来刷新数据库和使缓存失效。已经在 odoo.models.Modelodoo.api.Environment 中添加了新的方法,并且在每种情况下更加清晰明了。请参阅 SQL Execution 部分。

Odoo 在线版本 15.4

Odoo 在线版本 15.2

  • 字段上的特定索引类型:通过 #83274#83015,开发人员现在可以定义PostgreSQL在字段上可以使用的索引类型。请参阅 odoo.fields.Fieldindex 属性

  • The _sequence attribute of Model is removed. Odoo lets PostgreSQL use the default sequence of the primary key. #82727

  • The method _write() does not raise an error for non-existing records. #82727

  • The column_format and deprecated attributes of Field are removed. #82727