diff options
| author | Raphael Collet <rco@openerp.com> | 2016-09-02 16:16:50 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-09-02 17:28:12 +0200 |
| commit | 4a700d0ad9eecb00233f734042a96c3959aa7e83 (patch) | |
| tree | 7dffd79a4d3d7e19110a0f509e37ff8ff9eedc36 /odoo/fields.py | |
| parent | 9e64f9f9514194d74e166b032add8511182f2677 (diff) | |
[FIX] odoo: rename imports and adapt import hooks
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 0b9a481320e..4d3f43f0fa7 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -15,12 +15,12 @@ import xmlrpclib import psycopg2 -from openerp.sql_db import LazyCursor -from openerp.tools import float_precision, float_repr, float_round, frozendict, \ - html_sanitize, human_size, pg_varchar, ustr, OrderedSet -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT -from openerp.tools.translate import html_translate, _ +from odoo.sql_db import LazyCursor +from odoo.tools import float_precision, float_repr, float_round, frozendict, \ + html_sanitize, human_size, pg_varchar, ustr, OrderedSet +from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT +from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT +from odoo.tools.translate import html_translate, _ DATE_LENGTH = len(date.today().strftime(DATE_FORMAT)) DATETIME_LENGTH = len(datetime.now().strftime(DATETIME_FORMAT)) @@ -196,7 +196,7 @@ class Field(object): return [('name', operator, value)] The compute method has to assign the field on all records of the invoked - recordset. The decorator :meth:`openerp.api.depends` must be applied on + recordset. The decorator :meth:`odoo.api.depends` must be applied on the compute method to specify the field dependencies; those dependencies are used to determine when to recompute the field; recomputation is automatic and guarantees cache/database consistency. Note that the same @@ -268,7 +268,7 @@ class Field(object): .. rubric:: Incremental definition A field is defined as class attribute on a model class. If the model - is extended (see :class:`~openerp.models.Model`), one can also extend + is extended (see :class:`~odoo.models.Model`), one can also extend the field definition by redefining a field with the same name and same type on the subclass. In that case, the attributes of the field are taken from the parent class and overridden by the ones given in @@ -2393,6 +2393,6 @@ class Id(Field): raise TypeError("field 'id' cannot be assigned") # imported here to avoid dependency cycle issues -from openerp import SUPERUSER_ID +from odoo import SUPERUSER_ID from .exceptions import AccessError, MissingError, UserError from .models import check_pg_name, BaseModel, IdType |
