From 1a809c2f4893d5381fb47326ea122a3f0bd42810 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 16 Mar 2011 17:33:38 +0530 Subject: [PATCH] [IMP]: base_setup: Improvement for the main application: like HR, we want them to be able to re-thick an installed application but in HRs configuration, if hr_holidays is already installed, the boolean "holidays management" should be thick and readonly bzr revid: rpa@tinyerp.com-20110316120338-zbdm1a6zo0rw76to --- addons/base_setup/installer.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index a1605fa55bb..50653e20be7 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -104,6 +104,17 @@ class base_setup_installer(osv.osv_memory): return {'value':value} + + def default_get(self, cr, uid, fields_list, context=None): + #Skipping default value as checked for main application, if already installed + return super(osv.osv_memory, self).default_get( + cr, uid, fields_list, context=context) + + def fields_get(self, cr, uid, fields=None, context=None, write_access=True): + #Skipping readonly value for main application, if already installed + return super(osv.osv_memory, self).fields_get( + cr, uid, fields, context, write_access) + def execute(self, cr, uid, ids, context=None): if context is None: context = {}