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