← Back to team overview

credativ team mailing list archive

[Merge] lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-line-tree into lp:~openerp-community/openobject-addons/elico-6.1

 

Tom Pickering has proposed merging lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-line-tree into lp:~openerp-community/openobject-addons/elico-6.1.

Requested reviews:
  OpenERP Community (openerp-community)

For more details, see:
https://code.launchpad.net/~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-line-tree/+merge/218424

This branch adds an editable tree view for Gap Analysis Lines, to allow for quick and easy manipulation. The view can be accessed either via the menu, or by an action in the Gap Analysis view which will open the tree view for only those lines in the corresponding Gap Analysis.
-- 
https://code.launchpad.net/~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-line-tree/+merge/218424
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-line-tree.
=== modified file 'gap_analysis/gap_analysis.xml'
--- gap_analysis/gap_analysis.xml	2013-06-22 02:18:01 +0000
+++ gap_analysis/gap_analysis.xml	2014-05-06 13:36:09 +0000
@@ -54,7 +54,28 @@
                 </form>
             </field>
         </record>
-        
+
+        <record id="view_gap_analysis_line_filter" model="ir.ui.view">
+            <field name="name">gap_analysis.line.search</field>
+            <field name="model">gap_analysis.line</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search Line">
+                    <field name="category"/>
+                    <field name="gap_id"/>
+                    <field name="functionality"/>
+                    <field name="openerp_fct" string="OpenERP Feature"/>
+                    <newline/>
+                    <group expand="0" string="Group By..." colspan="4">
+                        <filter string="Category" icon="terp-stage" context="{'group_by':'category'}"/>
+                        <filter string="Critical Level" icon="terp-gnome-cpu-frequency-applet+" context="{'group_by':'critical'}"/>
+                        <filter string="Phase" icon="terp-calendar" context="{'group_by':'phase'}"/>
+                        <filter string="Effort" icon="terp-project" context="{'group_by':'effort'}"/>
+                    </group>
+                </search>
+            </field>
+        </record>
+ 
         <!-- Functionality Categories -->
     	<record id="view_gap_analysis_functionality_category_tree" model="ir.ui.view">
             <field name="name">gap_analysis.functionality.category.tree</field>
@@ -152,7 +173,30 @@
                 </form>
             </field>
         </record>
-        
+
+
+        <!-- Gap Analysis Lines -->
+        <record id="view_gap_analysis_line_tree" model="ir.ui.view">
+            <field name="name">gap_analysis.line_tree</field>
+            <field name="model">gap_analysis.line</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Gap Analysis Lines" editable="top" colors="grey:keep==False;">
+                    <field name="gap_id"/>
+                    <field name="category"/>
+                    <field name="functionality"/>
+                    <field name="keep"/>
+                    <field name="phase"/>
+                    <field name="critical"/>
+                    <field name="effort"/>
+                    <field name="testing"/>
+                    <field name="total_time"/>
+                    <field name="total_cost"/>
+                </tree>
+            </field>
+        </record>
+
+
     	<!-- Gap Analysis -->
         <record model="ir.ui.view" id="view_gap_analysis_graph">
             <field name="name">gap_analysis.graph</field>
@@ -276,6 +320,12 @@
             <field name="view_mode">tree,form,graph</field>
             <field name="domain">[('is_tmpl','=',False)]</field>
         </record>
+        <record id="act_gap_analysis_line" model="ir.actions.act_window">
+            <field name="name">Gap Analysis Line</field>
+            <field name="res_model">gap_analysis.line</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
         <record id="act_my_gap" model="ir.actions.act_window">
             <field name="name">My Gap Analysis</field>
             <field name="res_model">gap_analysis</field>
@@ -334,7 +384,28 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
         </record>
-        
+        <record model="ir.actions.act_window" id="action_gap_analysis_open_line_tree">
+            <field name="name">Edit Lines</field>                                                               
+            <field name="type">ir.actions.act_window</field>
+            <field name="view_id" ref="view_gap_analysis_line_tree"/>
+            <field name="domain">[('gap_id','=',id)]</field>
+            <field name="context">{}</field>
+            <field name="res_model">gap_analysis.line</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="usage">menu</field>
+            <field name="target">current</field>
+        </record>
+        <record model="ir.values" id="values_gap_analysis_open_line_tree">
+            <field name="model_id" ref="gap_analysis.model_gap_analysis_line" />
+            <field name="object" eval="1" />
+            <field name="name">Edit Lines</field>
+            <field name="key2">client_action_multi</field>
+            <field name="value" eval="'ir.actions.act_window,' + str(ref('action_gap_analysis_open_line_tree'))" />
+            <field name="key">action</field>
+            <field name="model">gap_analysis</field>
+        </record> 
+ 
         <!-- Board -->
         <record id="board_gap_form" model="ir.ui.view">
             <field name="name">board.gap.form</field>
@@ -363,6 +434,7 @@
         <menuitem web_icon="images/gap.png" web_icon_hover="images/gap-hover.png" id="menu_gap" name="Gap Analysis" groups="gap_analysis.res_group_gap0,gap_analysis.res_group_gap1" action="act_board_gap"/>
 	        <menuitem id="menu_gap_00" 		name="Gap Analysis"      parent="menu_gap"    sequence="1"/>
 				<menuitem id="menu_gap_000" name="Gap Analysis"      parent="menu_gap_00" sequence="1" action="act_gap_analysis"/>
+                <menuitem id="menu_gap_line_tree" name="Gap Analysis Lines" parent="menu_gap_00" sequence="5" action="act_gap_analysis_line"/>
 	        
 	        <menuitem id="menu_gap_01" 		name="Templates" 				parent="menu_gap"    sequence="50" groups="gap_analysis.res_group_gap1"/>
 	        	<menuitem id="menu_gap_010" name="Gap Analysis Templates" 	parent="menu_gap_01" sequence="1"  action="act_gap_analysis_tmpl"/>
@@ -376,4 +448,4 @@
 	        	<menuitem id="menu_gap_022" name="Efforts" 					parent="menu_gap_02" sequence="6" action="act_gap_analysis_effort" />
 	        	<menuitem id="menu_gap_023" name="OpenERP Features" 		parent="menu_gap_02" sequence="9" action="act_gap_analysis_openerp" />
     </data>
-</openerp>
\ No newline at end of file
+</openerp>