summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2019-05-22 09:03:55 +0000
committerYannick Tivisse <yti@odoo.com>2019-05-29 08:09:15 +0000
commitf5dfe4727c086c7577da2aef12c2d3548ba938a3 (patch)
tree8af04c84c18ded0c1ed48c7c61640021dd9d24cb /odoo/fields.py
parent11cab26fb0f2167bfccfc3f11db10ff308f067b4 (diff)
[IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property. Actually, company_id and company_ids on the environment are no fields. Calling env.company_id returns a browse record, not an id.
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index c1d0de756b3..8baf2fa2edd 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -657,7 +657,7 @@ class Field(MetaField('DummyField', (object,), {})):
# read property as superuser, as the current user may not have access
context = records.env.context
if 'force_company' not in context:
- company = records.env.company_id
+ company = records.env.company
context = dict(context, force_company=company.id)
Property = records.env(user=SUPERUSER_ID, context=context)['ir.property']
values = Property.get_multi(self.name, self.model_name, records.ids)
@@ -668,7 +668,7 @@ class Field(MetaField('DummyField', (object,), {})):
# update property as superuser, as the current user may not have access
context = records.env.context
if 'force_company' not in context:
- company = records.env.company_id
+ company = records.env.company
context = dict(context, force_company=company.id)
Property = records.env(user=SUPERUSER_ID, context=context)['ir.property']
values = {