Browse Source

[FIX] base_export_manager: Prevent possible inexisting fields

pull/533/head
Pedro M. Baeza 8 years ago
parent
commit
9c7c9cffa2
  1. 2
      base_export_manager/__openerp__.py
  2. 10
      base_export_manager/models/ir_exports_line.py

2
base_export_manager/__openerp__.py

@ -5,7 +5,7 @@
{
'name': "Manage model export profiles",
'category': 'Personalization',
'version': '8.0.2.0.0',
'version': '8.0.2.0.1',
'depends': [
'web',
],

10
base_export_manager/models/ir_exports_line.py

@ -143,8 +143,14 @@ class IrExportsLine(models.Model):
def _install_base_export_manager(self):
"""Populate ``field*_id`` fields."""
self.search([("export_id", "=", False)]).unlink()
self.search([("field1_id", "=", False),
("name", "!=", False)])._inverse_name()
lines = self.search(
[("field1_id", "=", False), ("name", "!=", False)])
for line in lines:
try:
line._inverse_name()
except:
# Prevent possible inexisting fields
pass
@api.model
def _get_field_id(self, model, name):

Loading…
Cancel
Save