Atik Agewan(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-configrework2-aag into 
lp:~openerp-dev/openobject-addons/trunk-configrework2.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configrework2-aag/+merge/69425


Hello 
   
    Assosiation: When Assosiation Install -project_gtd and hr_expense fields 
are shown only one time in Install Application wizard.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configrework2-aag/+merge/69425
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-configrework2.
=== modified file 'association/profile_association.py'
--- association/profile_association.py	2011-06-23 12:37:55 +0000
+++ association/profile_association.py	2011-07-27 10:11:16 +0000
@@ -18,7 +18,7 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
 #
 ##############################################################################
-
+from lxml import etree
 from osv import fields, osv
 
 class profile_association_config_install_modules_wizard(osv.osv_memory):
@@ -35,5 +35,24 @@
                  "to keep track of business knowledge and share it with "
                  "and  between your employees."),
     }
+    
+    def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+        res = super(profile_association_config_install_modules_wizard, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+        doc = etree.XML(res['arch'])
+        nodes_gtd = doc.xpath("//field[@name='project_gtd']")
+        nodes_exp = doc.xpath("//field[@name='hr_expense']")
+        count_gtd = 0.0
+        count_exp = 0.0
+        for node in nodes_gtd:
+            count_gtd = count_gtd + 1
+            if count_gtd > 1 :
+                node.set('invisible', '1')
+        for node in nodes_exp:
+            count_exp = count_exp + 1
+            if count_exp > 1 :
+                node.set('invisible', '1')
+        res['arch'] = etree.tostring(doc)
+        return res
+   
 profile_association_config_install_modules_wizard()
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to