summaryrefslogtreecommitdiff
path: root/odoo/addons/test_impex/models.py
diff options
context:
space:
mode:
authorJinal Patel <jip@odoo.com>2019-04-29 04:47:58 +0000
committerXavier Morel <xmo@odoo.com>2020-03-23 11:51:30 +0000
commit8f8c93b68a640f1503aec2c7f9fa1255afbb8aad (patch)
tree2658e9764aea102691cb19e3c182557d2d08331f /odoo/addons/test_impex/models.py
parent800db7405c1fca3d080902562eb62d5072b7d9bb (diff)
[IMP] base: display full name of the field in import warning
Before this change, if an error occurs while trying to match / import a sub-field e.g. order_line/product_id, only the name of the top-level field is showing when displaying the error e.g. "Order Line", which lacks precision and makes understanding and fixing the issue more complicated. After this change, the entire field path should be displayed, e.g. "Order Line / Product" in the example above. Task-1906700 closes odoo/odoo#33031 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
Diffstat (limited to 'odoo/addons/test_impex/models.py')
-rw-r--r--odoo/addons/test_impex/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/addons/test_impex/models.py b/odoo/addons/test_impex/models.py
index 296c4677cc3..f5890aec480 100644
--- a/odoo/addons/test_impex/models.py
+++ b/odoo/addons/test_impex/models.py
@@ -80,6 +80,7 @@ class One2ManyChild(models.Model):
class One2ManyMultiple(models.Model):
_name = 'export.one2many.multiple'
_description = 'Export One To Many Multiple'
+ _rec_name = 'parent_id'
parent_id = fields.Many2one('export.one2many.recursive')
const = fields.Integer(default=36)
@@ -145,6 +146,7 @@ class SelectionWithDefault(models.Model):
class RecO2M(models.Model):
_name = 'export.one2many.recursive'
_description = 'Export One To Many Recursive'
+ _rec_name = 'value'
value = fields.Integer()
child = fields.One2many('export.one2many.multiple', 'parent_id')