From e085c3e8e88fbf88d1981eb48c14d36848c1c150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20V=C3=A1squez?= Date: Thu, 19 Jan 2017 15:08:22 -0600 Subject: [PATCH] [FIX] BUG #57 that does not allow to create fields in the UI. --- pos_remove_pos_category/product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos_remove_pos_category/product.py b/pos_remove_pos_category/product.py index 7cee84f1..d4fcf4bc 100644 --- a/pos_remove_pos_category/product.py +++ b/pos_remove_pos_category/product.py @@ -76,7 +76,8 @@ def _auto_end(self, cr, context=None): (pos_remove_pos_category monkey patching) """ context = context or {} - module = context['module'] + # If the field is created by the user, there is no module. + module = context.get('module', False) foreign_keys = [] patched = 'openerp.addons.pos_remove_pos_category' in sys.modules