summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 3de87106fd5..64b8083df7c 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -2143,6 +2143,8 @@ class Selection(Field):
# We cannot use field.selection or field.selection_add here
# because those attributes are overridden by ``_setup_attrs``.
if 'selection' in field.args:
+ if self.related:
+ _logger.warning("%s: selection attribute will be ignored as the field is related", self)
selection = field.args['selection']
if isinstance(selection, list):
if (
@@ -2156,6 +2158,8 @@ class Selection(Field):
self.selection = selection
if 'selection_add' in field.args:
+ if self.related:
+ _logger.warning("%s: selection_add attribute will be ignored as the field is related", self)
selection_add = field.args['selection_add']
assert isinstance(selection_add, list), \
"%s: selection_add=%r must be a list" % (self, selection_add)