From 23972a52b037bfe977273d657e2faeb591a16aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 21 Apr 2015 13:41:04 +0200 Subject: [PATCH 1/3] [FIX] tools: yaml_import: filter returned values of _create_record. Commit 81364790b91b52f00333dd17975a00e48dd9424d added default values for all fields present in the view to emulate. However some fields present in the view are not stored and should not be sent to create. This bug appears with function field in new API that are not stored. Using the Yaml import generated warning, for example for fields like alias_domain that is a not stored computed field. --- openerp/tools/yaml_import.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index bdb0cb18ee1..90bf3da4bc8 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -487,6 +487,7 @@ class YamlInterpreter(object): if key not in fields: # do not shadow values explicitly set in yaml. record_dict[key] = process_val(key, val) + # locals_dict.update(record_dict) else: _logger.debug("The returning field '%s' from your on_change call '%s'" " does not exist either on the object '%s', either in" @@ -502,6 +503,11 @@ class YamlInterpreter(object): continue field_value = self._eval_field(model, field_name, expression, parent=record_dict, default=False, context=context) record_dict[field_name] = field_value + + # filter returned values; indeed the last modification in the import process have added a default + # value for all fields in the view; however some fields present in the view are not stored and + # should not be sent to create. This bug appears with not stored function fields in the new API. + record_dict = dict((key, record_dict.get(key)) for key in record_dict if (key in model._columns or key in model._inherit_fields)) return record_dict def process_ref(self, node, field=None): From 64de282c526f783ed8dda85d7d375a85572512f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 23 Apr 2015 10:26:03 +0200 Subject: [PATCH 2/3] [FIX] Typo: removed leftover commented line. --- openerp/tools/yaml_import.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index 90bf3da4bc8..4db12dd8d48 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -487,7 +487,6 @@ class YamlInterpreter(object): if key not in fields: # do not shadow values explicitly set in yaml. record_dict[key] = process_val(key, val) - # locals_dict.update(record_dict) else: _logger.debug("The returning field '%s' from your on_change call '%s'" " does not exist either on the object '%s', either in" From 4bef17cc555af487b989dd470b0988c21db37a9a Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Wed, 29 Apr 2015 16:40:03 +0200 Subject: [PATCH 3/3] [FIX] auth_oauth: reinstated facebook provider data The task (12179) was to remove Facebook from settings but keep the OAuth provider. Partial revert of 3f8787953058fd5200027a4bed03d92ee1238712. --- addons/auth_oauth/auth_oauth_data.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/auth_oauth/auth_oauth_data.xml b/addons/auth_oauth/auth_oauth_data.xml index a23f1356fa2..ff5187f18f1 100644 --- a/addons/auth_oauth/auth_oauth_data.xml +++ b/addons/auth_oauth/auth_oauth_data.xml @@ -11,6 +11,15 @@ Log in with Odoo.com + + Facebook Graph + https://www.facebook.com/dialog/oauth + + https://graph.facebook.com/me/permissions + + fa fa-facebook-square + Log in with facebook + Google OAuth2 https://accounts.google.com/o/oauth2/auth