← Back to team overview

savoirfairelinux-openerp team mailing list archive

[Merge] lp:~savoirfairelinux-openerp/openerp-program/result_indicator_conflict into lp:~savoirfairelinux-openerp/openerp-program/program

 

David Cormier has proposed merging lp:~savoirfairelinux-openerp/openerp-program/result_indicator_conflict into lp:~savoirfairelinux-openerp/openerp-program/program.

Requested reviews:
  Savoir-faire Linux' OpenERP (savoirfairelinux-openerp)

For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-program/result_indicator_conflict/+merge/210819

Add result indicator

Fix conflict with main program branch
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-program/result_indicator_conflict/+merge/210819
Your team Savoir-faire Linux' OpenERP is requested to review the proposed merge of lp:~savoirfairelinux-openerp/openerp-program/result_indicator_conflict into lp:~savoirfairelinux-openerp/openerp-program/program.
=== modified file 'program/i18n/fr.po'
--- program/i18n/fr.po	2014-03-12 21:02:03 +0000
+++ program/i18n/fr.po	2014-03-13 15:12:35 +0000
@@ -198,3 +198,8 @@
 #: model:ir.model,name:program.model_program_action_target
 msgid "program.action.target"
 msgstr "program.action.target"
+
+#. module: program
+#: view:program.action:0
+msgid "Monitoring"
+msgstr "Suivi"

=== modified file 'program/i18n/program.pot'
--- program/i18n/program.pot	2014-03-12 21:02:03 +0000
+++ program/i18n/program.pot	2014-03-13 15:12:35 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-12 20:32+0000\n"
-"PO-Revision-Date: 2014-03-12 20:32+0000\n"
+"POT-Creation-Date: 2014-03-12 21:35+0000\n"
+"PO-Revision-Date: 2014-03-12 21:35+0000\n"
 "Last-Translator: <>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -21,6 +21,11 @@
 msgstr ""
 
 #. module: program
+#: view:program.action:0
+msgid "Monitoring"
+msgstr ""
+
+#. module: program
 #: view:program.action.level:0
 msgid "Search Action Levels"
 msgstr ""

=== modified file 'program/program_action_view.xml'
--- program/program_action_view.xml	2014-03-06 15:59:02 +0000
+++ program/program_action_view.xml	2014-03-13 15:12:35 +0000
@@ -74,6 +74,8 @@
                   -->
                 </group>
               </page>
+              <page name="monitoring" string="Monitoring">
+              </page>
             </notebook>
           </sheet>
         </form>

=== modified file 'program_indicator/__openerp__.py'
--- program_indicator/__openerp__.py	2014-03-10 17:50:45 +0000
+++ program_indicator/__openerp__.py	2014-03-13 15:12:35 +0000
@@ -35,14 +35,19 @@
 Contributeurs
 -------------
 * David Cormier (david.cormier@xxxxxxxxxxxxxxxxxxxx)
+
 """,
     'depends': [
-        'program'
+        'program',
+        'program_result',
     ],
     'license': 'AGPL-3',
     'external_dependencies': {},
     'data': [
         'program_indicator_view.xml',
+        'program_result_indicator_view.xml',
+        'program_indicator_workflow.xml',
+        'program_action_monitoring_view.xml',
     ],
     'demo': [
     ],

=== modified file 'program_indicator/i18n/fr.po'
--- program_indicator/i18n/fr.po	2014-03-06 21:01:33 +0000
+++ program_indicator/i18n/fr.po	2014-03-13 15:12:35 +0000
@@ -16,7 +16,9 @@
 "Plural-Forms: \n"
 
 #. module: program_indicator
+#: code:addons/program_indicator/program.py:134
 #: view:program.indicator:0
+#: field:result.indicator,indicator_id:0
 msgid "Indicator"
 msgstr "Indicateur"
 
@@ -36,9 +38,21 @@
 msgstr "Risques et hypothèses"
 
 #. module: program_indicator
-#: model:ir.model,name:program_indicator.model_program_indicator
-msgid "program.indicator"
-msgstr ""
+#: field:program.result,result_indicator_id:0
+#: view:result.indicator:0
+msgid "Result Indicator"
+msgstr "Indicateurs de résultats"
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: field:result.indicator,action_id:0
+msgid "Action"
+msgstr "Action"
+
+#. module: program_indicator
+#: selection:result.indicator,state:0
+msgid "Draft"
+msgstr "Brouillon"
 
 #. module: program_indicator
 #: model:ir.actions.act_window,name:program_indicator.action_program_indicator_tree
@@ -52,3 +66,142 @@
 msgid "Verification means"
 msgstr "Moyens de vérification"
 
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_action
+msgid "program.action"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,state:0
+msgid "Status"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,risk_hypothesis:0
+msgid "Risk hypothesis"
+msgstr "Risques et hypothèses"
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Search Result Indicators"
+msgstr "Rechercher"
+
+#. module: program_indicator
+#: field:result.indicator,partner_id:0
+msgid "User"
+msgstr "Utilisateur"
+
+#. module: program_indicator
+#: field:result.indicator,value_date:0
+msgid "Date"
+msgstr "Date"
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_result_indicator
+msgid "result.indicator"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: field:result.indicator,result_id:0
+msgid "Result"
+msgstr "Résultat"
+
+#. module: program_indicator
+#: view:program.result:0
+msgid "Result indicators"
+msgstr "Indicateurs de résultats"
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:135
+#: field:result.indicator,value_target:0
+#, python-format
+msgid "Target value"
+msgstr "Valeur cible"
+
+#. module: program_indicator
+#: field:program.indicator,name:0
+msgid "Name"
+msgstr "Nom"
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:133
+#: field:result.indicator,value_initial:0
+#, python-format
+msgid "Initial value"
+msgstr "Valeur initiale"
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Submitted"
+msgstr "Soumis"
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:136
+#: field:result.indicator,value:0
+#, python-format
+msgid "Value"
+msgstr "Valeur"
+
+#. module: program_indicator
+#: selection:result.indicator,state:0
+msgid "Cancelled"
+msgstr "Annulé"
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_result
+msgid "program.result"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,comment:0
+msgid "Comment"
+msgstr "Commentaire"
+
+#. module: program_indicator
+#: model:ir.actions.act_window,name:program_indicator.action_program_result_indicator_tree
+#: model:ir.ui.menu,name:program_indicator.menu_result_indicator_action_action
+#: view:result.indicator:0
+msgid "Result Indicators"
+msgstr "Indicateurs de résultats"
+
+#. module: program_indicator
+#: field:result.indicator,mandatory:0
+msgid "Mandatory"
+msgstr "Obligatoire"
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_indicator
+msgid "program.indicator"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Group by..."
+msgstr "Grouper par..."
+
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Validated"
+msgstr "Validé"
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Open"
+msgstr "Ouvert"
+

=== modified file 'program_indicator/i18n/program_indicator.pot'
--- program_indicator/i18n/program_indicator.pot	2014-03-06 21:01:33 +0000
+++ program_indicator/i18n/program_indicator.pot	2014-03-13 15:12:35 +0000
@@ -6,8 +6,8 @@
 msgstr ""
 "Project-Id-Version: OpenERP Server 7.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-06 20:45+0000\n"
-"PO-Revision-Date: 2014-03-06 20:45+0000\n"
+"POT-Creation-Date: 2014-03-12 22:00+0000\n"
+"PO-Revision-Date: 2014-03-12 22:00+0000\n"
 "Last-Translator: <>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
@@ -16,16 +16,14 @@
 "Plural-Forms: \n"
 
 #. module: program_indicator
+#: code:addons/program_indicator/program.py:134
 #: view:program.indicator:0
+#: field:result.indicator,indicator_id:0
+#, python-format
 msgid "Indicator"
 msgstr ""
 
 #. module: program_indicator
-#: field:program.indicator,name:0
-msgid "Name"
-msgstr ""
-
-#. module: program_indicator
 #: field:program.indicator,generic:0
 msgid "Generic"
 msgstr ""
@@ -36,19 +34,171 @@
 msgstr ""
 
 #. module: program_indicator
-#: model:ir.model,name:program_indicator.model_program_indicator
-msgid "program.indicator"
+#: field:program.result,result_indicator_id:0
+#: view:result.indicator:0
+msgid "Result Indicator"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: field:result.indicator,action_id:0
+msgid "Action"
+msgstr ""
+
+#. module: program_indicator
+#: selection:result.indicator,state:0
+msgid "Draft"
 msgstr ""
 
 #. module: program_indicator
 #: model:ir.actions.act_window,name:program_indicator.action_program_indicator_tree
 #: model:ir.ui.menu,name:program_indicator.menu_program_indicator_action
 #: model:ir.ui.menu,name:program_indicator.menu_program_indicator_action_action
+#: view:program.action:0
 msgid "Indicators"
 msgstr ""
 
 #. module: program_indicator
 #: field:program.indicator,verification_means:0
+#: field:result.indicator,verification_means:0
 msgid "Verification means"
 msgstr ""
 
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_action
+msgid "program.action"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,state:0
+msgid "Status"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,risk_hypothesis:0
+msgid "Risk hypothesis"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Search Result Indicators"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,partner_id:0
+msgid "User"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,value_date:0
+msgid "Date"
+msgstr ""
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_result_indicator
+msgid "result.indicator"
+msgstr ""
+
+#. module: program_indicator
+#: view:program.result:0
+msgid "Result indicators"
+msgstr ""
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:135
+#: field:result.indicator,value_target:0
+#, python-format
+msgid "Target value"
+msgstr ""
+
+#. module: program_indicator
+#: field:program.indicator,name:0
+msgid "Name"
+msgstr ""
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:133
+#: field:result.indicator,value_initial:0
+#, python-format
+msgid "Initial value"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Submitted"
+msgstr ""
+
+#. module: program_indicator
+#: code:addons/program_indicator/program.py:136
+#: field:result.indicator,value:0
+#, python-format
+msgid "Value"
+msgstr ""
+
+#. module: program_indicator
+#: selection:result.indicator,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_result
+msgid "program.result"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,comment:0
+msgid "Comment"
+msgstr ""
+
+#. module: program_indicator
+#: model:ir.actions.act_window,name:program_indicator.action_program_result_indicator_tree
+#: model:ir.ui.menu,name:program_indicator.menu_result_indicator_action_action
+#: view:result.indicator:0
+msgid "Result Indicators"
+msgstr ""
+
+#. module: program_indicator
+#: field:result.indicator,mandatory:0
+msgid "Mandatory"
+msgstr ""
+
+#. module: program_indicator
+#: model:ir.model,name:program_indicator.model_program_indicator
+msgid "program.indicator"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Group by..."
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: field:result.indicator,result_id:0
+msgid "Result"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+msgid "Cancel"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Validated"
+msgstr ""
+
+#. module: program_indicator
+#: view:result.indicator:0
+#: selection:result.indicator,state:0
+msgid "Open"
+msgstr ""
+

=== modified file 'program_indicator/program.py'
--- program_indicator/program.py	2014-03-10 17:50:45 +0000
+++ program_indicator/program.py	2014-03-13 15:12:35 +0000
@@ -21,6 +21,235 @@
 ##############################################################################
 
 from openerp.osv import fields, orm
+from mako.template import Template
+from openerp.tools.translate import _
+
+class program_result(orm.Model):
+
+    _inherit = 'program.result'
+
+    _columns = {
+        'result_indicator_id': fields.one2many(
+            'result.indicator',
+            'result_id',
+            'Result Indicator',
+        )
+    }
+
+class program_action(orm.Model):
+    
+    _inherit = 'program.action'
+
+    def _child_results_list(self, cr, uid, ids, name, arg, context=None):
+        template = Template(
+"""<ul style="list-style-type: none;margin-left: -130px;">
+% for result in values:
+  <h3>${result['result'].name}</h3>
+<table class="oe_form_group">
+  <tbody>
+    <tr class="oe_form_group_row">
+      <td class="oe_form_group_cell">
+        <div class="oe_form_field oe_form_field_many2many">
+          <div class="oe_list oe_view">
+            <table class="oe_list_content">
+              <thead>
+                <tr class="oe_list_header_columns">
+                  <th class="oe_list_header_char null">
+                    ${_indicator}
+                  </th>
+                  <th class="oe_list_header_char null">
+                    ${_initial_value}
+                  </th>
+                  <th class="oe_list_header_char null">
+                    ${_target_value}
+                  </th>
+                  <th class="oe_list_header_char null">
+                    ${_value}
+                  </th>
+                </tr>
+              </thead>
+              <tbody>
+                % for indicator in result['indicators']:
+                <tr data-id="${indicator.id}" style>
+                  <td class="oe_list_field_cell oe_list_field_char oe_required">
+                    ${indicator.indicator_id.name or ""}
+                  </td>
+                  <td class="oe_list_field_cell oe_list_field_char oe_required">
+                    ${indicator.value_initial or ""}
+                  </td>
+                  <td class="oe_list_field_cell oe_list_field_char oe_required">
+                    ${indicator.value_target or ""}
+                  </td>
+                  <td class="oe_list_field_cell oe_list_field_char oe_required">
+                    ${indicator.value or ""}
+                  </td>
+                </tr>
+                % endfor
+              </tbody>
+            </table>
+          </div>
+        </div>
+      </td>
+    </tr>
+  </tbody>
+</table>
+  <br />
+% endfor
+       
+</ul>""")
+
+        if context is None:
+            context = {}
+
+        if isinstance(ids, (int, long)):
+            ids = [ids]
+
+        res = {}
+
+        result_pool = self.pool.get('program.result')
+        indicator_pool = self.pool.get('result.indicator')
+
+        vals = []
+        for action in self.browse(cr, uid, ids, context=context):
+            
+            for result in action.results:
+                
+                indicator_values = []
+
+                indicator_ids = indicator_pool\
+                    .search(cr, uid,[('result_id', '=', result.id)],
+                            context=context)
+
+                indicators = indicator_pool.browse(cr, uid, indicator_ids,
+                                                   context=context)
+                
+                for indicator in indicators:
+                    indicator_values.append(indicator)
+                vals.append({
+                    'result': result,
+                    'indicators': indicator_values
+                })
+
+            initial_value = _("""Initial value""")
+            indicator = _("""Indicator""")
+            target_value = _("""Target value""")
+            value = _("""Value""")
+
+            res[action.id] = template.render(values=vals,
+                                             _initial_value=initial_value,
+                                             _indicator=indicator,
+                                             _target_value=target_value,
+                                             _value=value)
+
+        return res
+
+
+    _columns = {
+        'child_results_list': fields.function(
+            _child_results_list,
+            type='html',
+            method=True,
+            string='Child Results',
+        ),
+    }
+
+class result_indicator(orm.Model):
+
+    _name = 'result.indicator'
+
+    def change_indicator(self, cr, uid, ids, indicator_id, context=None):
+        indicator = self.pool.get('program.indicator').browse(cr, uid, indicator_id, context=context)
+
+        return {
+            'value': {
+                'verification_means': indicator.verification_means,
+                'risk_hypothesis': indicator.risk_hypothesis
+            }
+        }
+
+    _defaults = {
+        'state': 'draft',
+    }
+
+    _columns = {
+
+        'state': fields.selection(
+            [
+                ('draft', 'Draft'),
+                ('pending', 'Pending'),
+                ('open', 'Open'),
+                ('submitted', 'Submitted'),
+                ('validated', 'Validated'),
+                ('cancel', 'Cancelled'),
+            ],
+            'Status',
+            select=True,
+            required=True,
+            readonly=True
+        ),
+
+        'indicator_id': fields.many2one(
+            'program.indicator',
+            'Indicator',
+            required=True,
+        ),
+
+        'action_id': fields.related(
+            'result_id',
+            'parent_action',
+            type="many2one",
+            relation="program.action",
+            string="Action",
+            store=True
+        ),
+
+        'result_id': fields.many2one(
+            'program.result',
+            'Result',
+            required=True,
+        ),
+
+        'mandatory': fields.boolean(
+            'Mandatory'
+        ),
+
+        'verification_means': fields.text(
+            'Verification means'
+        ),
+
+        'risk_hypothesis': fields.text(
+            'Risk hypothesis'
+        ),
+
+        'value_initial': fields.char(
+            'Initial value',
+            size=128,
+        ),
+
+        'value_target': fields.char(
+            'Target value',
+            size=128,
+        ),
+
+        'value': fields.char(
+            'Value',
+            size=128,
+        ),
+
+        'value_date': fields.datetime(
+            'Date'
+        ),
+
+        'partner_id': fields.many2one(
+            'res.partner',
+            'User',
+        ),
+
+        'comment': fields.text(
+            'Comment',
+        ),
+        
+    }
 
 
 class program_indicator(orm.Model):
@@ -48,3 +277,9 @@
         ),
 
     }
+
+class program_result(orm.Model):
+    
+    _inherit = 'program.result'
+
+    

=== added file 'program_indicator/program_action_monitoring_view.xml'
--- program_indicator/program_action_monitoring_view.xml	1970-01-01 00:00:00 +0000
+++ program_indicator/program_action_monitoring_view.xml	2014-03-13 15:12:35 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<openerp>
+  <data>
+    <record id="view_program_action_evaluation_form" model="ir.ui.view">
+      <field name="name">Program Evaluation Form</field>
+      <field name="model">program.action</field>
+      <field name="inherit_id" ref="program.view_program_action_form" />
+      <field name="arch" type="xml">
+        <xpath expr="//notebook/page[@name='monitoring']" position="inside">
+          <page name="indicators" string="Indicators">
+            <group colspan="4" col="2">
+                <field name="child_results_list" nolabel="1" context="{'from_action': True }"> 
+                </field>
+            </group>
+          </page>
+        </xpath>
+      </field>
+    </record>
+  </data>
+</openerp>

=== added file 'program_indicator/program_indicator_workflow.xml'
--- program_indicator/program_indicator_workflow.xml	1970-01-01 00:00:00 +0000
+++ program_indicator/program_indicator_workflow.xml	2014-03-13 15:12:35 +0000
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <record id="program_result_indicator_workflow" model="workflow">
+      <field name="name">program.result.indicator.workflow</field>
+      <field name="osv">result.indicator</field>
+      <field name="on_create">True</field>
+    </record>
+
+    <record id="act_draft" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">draft</field>
+      <field name="flow_start">True</field>
+    </record>
+
+    <record id="act_pending" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">pending</field>
+      <field name="kind">function</field>
+      <field name="action">write({'state': 'pending'})</field>
+    </record>
+
+    <record id="act_open" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">open</field>
+      <field name="kind">function</field>
+      <field name="action">write({'state': 'open'})</field>
+    </record>
+
+    <record id="act_submitted" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">submitted</field>
+      <field name="kind">function</field>
+      <field name="action">write({'state': 'submitted'})</field>
+    </record>
+
+    <record id="act_cancel" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">cancel</field>
+      <field name="kind">function</field>
+      <field name="action">write({'state': 'cancel'})</field>
+      <field name="flow_stop">True</field>
+    </record>
+
+    <record id="act_validated" model="workflow.activity">
+      <field name="wkf_id" ref="program_result_indicator_workflow"/>
+      <field name="name">validated</field>
+      <field name="kind">function</field>
+      <field name="action">write({'state': 'validated'})</field>
+      <field name="flow_stop">True</field>
+    </record>
+
+    <record id="trans_draft_pending" model="workflow.transition">
+      <field name="act_from" ref="act_draft" />
+      <field name="act_to" ref="act_pending" />
+      <field name="signal">pending</field>
+    </record>
+
+    <record id="trans_draft_open" model="workflow.transition">
+      <field name="act_from" ref="act_pending" />
+      <field name="act_to" ref="act_open" />
+      <field name="signal">open</field>
+    </record>
+
+    <record id="trans_draft_submitted" model="workflow.transition">
+      <field name="act_from" ref="act_open" />
+      <field name="act_to" ref="act_submitted" />
+      <field name="signal">submitted</field>
+    </record>
+
+    <record id="trans_draft_validated" model="workflow.transition">
+      <field name="act_from" ref="act_submitted" />
+      <field name="act_to" ref="act_validated" />
+      <field name="signal">validated</field>
+    </record>
+
+    <record id="trans_draft_cancel" model="workflow.transition">
+      <field name="act_from" ref="act_draft" />
+      <field name="act_to" ref="act_cancel" />
+      <field name="signal">cancel</field>
+    </record>
+
+    <record id="trans_pending_cancel" model="workflow.transition">
+      <field name="act_from" ref="act_pending" />
+      <field name="act_to" ref="act_cancel" />
+      <field name="signal">pending</field>
+    </record>
+
+    <record id="trans_open_cancel" model="workflow.transition">
+      <field name="act_from" ref="act_open" />
+      <field name="act_to" ref="act_cancel" />
+      <field name="signal">cancel</field>
+    </record>
+
+    <record id="trans_submitted_cancel" model="workflow.transition">
+      <field name="act_from" ref="act_submitted" />
+      <field name="act_to" ref="act_cancel" />
+      <field name="signal">cancel</field>
+    </record>
+  </data>
+</openerp>

=== added file 'program_indicator/program_result_indicator_view.xml'
--- program_indicator/program_result_indicator_view.xml	1970-01-01 00:00:00 +0000
+++ program_indicator/program_result_indicator_view.xml	2014-03-13 15:12:35 +0000
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<openerp>
+  <data>
+    <record id="view_program_result_result_indicator_form" model="ir.ui.view">
+      <field name="inherit_id" ref="program_result.view_program_result_form"></field>
+      <field name="model">program.result</field>
+      <field name="arch" type="xml">
+        <xpath expr="//notebook/page[@name='children']" position="after">
+          <page name="result_indicators" string="Result indicators">
+            <group colspan="4" col="2">
+              <field name="result_indicator_id" context="{'from_result': True}"/>
+            </group>
+          </page>
+        </xpath>
+      </field>
+    </record>
+
+    <record id="view_program_result_indicator_search" model="ir.ui.view">
+      <field name="name">Program Result Indicator Search</field>
+      <field name="model">result.indicator</field>
+      <field name="arch" type="xml">
+        <search string="Search Result Indicators" version="7.0">
+          <group expand="0" string="Group by...">
+            <filter string="Result" name="result_id" context="{'group_by': 'result_id'}" />
+            <filter string="Action" name="action_id" context="{'group_by': 'action_id'}" />
+          </group>
+        </search>
+      </field>
+    </record>
+
+    <record id="view_program_result_indicator_tree" model="ir.ui.view">
+      <field name="name">Program Result Indicator Tree</field>
+      <field name="model">result.indicator</field>
+      <field name="arch" type="xml">
+        <tree string="Result Indicators" version="7.0">
+          <field name="indicator_id" />
+          <field name="value_initial" />
+          <field name="value_target" />
+          <field name="value" />
+          <field name="state" />
+        </tree>
+      </field>
+    </record>
+
+    <record id="view_result_indicator_tree" model="ir.ui.view">
+      <field name="name">Program Result Indicator Tree</field>
+      <field name="model">result.indicator</field>
+      <field name="arch" type="xml">
+        <tree string="Result Indicators" version="7.0">
+          <field name="action_id" />
+          <field name="result_id" />
+          <field name="indicator_id" />
+          <field name="value_initial" />
+          <field name="value_target" />
+          <field name="value" />
+          <field name="state" />
+        </tree>
+      </field>
+    </record>
+
+    <record id="view_program_result_indicator_form" model="ir.ui.view">
+      <field name="name">Program Result Indicator Form</field>
+      <field name="model">result.indicator</field>
+      <field name="arch" type="xml">
+        <form string="Result Indicator" version="7.0">
+	  <header>
+	    <button
+		string="Pending"
+		name="pending"
+		states="draft"
+		type="workflow"
+		class="oe_highlight"
+		/>
+
+	    <button
+		string="Open"
+		name="open"
+		states="pending"
+		type="workflow"
+		class="oe_highlight"
+		/>
+
+	    <button
+		string="Submitted"
+		name="submitted"
+		states="open"
+		type="workflow"
+		class="oe_highlight"
+		/>
+
+	    <button
+		string="Validated"
+		name="validated"
+		states="submitted"
+		type="workflow"
+		class="oe_highlight"
+		/>
+	    <button
+		string="Cancel"
+		name="cancel"
+		states="draft,pending,open,submitted"
+		type="workflow"
+		class="oe_highlight"
+		/>
+
+
+	    <field name="state" widget="statusbar" statusbar_visible="draft,pending,open,submitted,validated"/>
+	  </header>
+
+
+          <sheet>
+            <group>
+              <field name="indicator_id"
+                     on_change="change_indicator(indicator_id)" />
+              <field name="result_id" 
+                     required="not context.get('from_result', False)"
+                     invisible="context.get('from_result', False)" />
+                
+              <field name="mandatory" />
+              <field name="verification_means" />
+              <field name="risk_hypothesis" />
+              <field name="value_initial" />
+              <field name="value_target" />
+              <field name="value" />
+              <field name="value_date" />
+              <field name="partner_id" domain="[('is_company', '=', False), ('contact_id', '=', False)]" />
+              <field name="comment" />
+            </group>
+          </sheet>
+        </form>
+      </field>
+    </record>
+
+    <record id="action_program_result_indicator_tree" model="ir.actions.act_window">
+      <field name="name">Result Indicators</field>
+      <field name="res_model">result.indicator</field>
+      <field name="view_type">form</field>
+      <field name="view_mode">tree,form</field>
+      <field name="view_id" ref="view_result_indicator_tree" />
+      <field name="search_view_id" ref="view_program_result_indicator_search" />
+      <field name="target">current</field>
+    </record>
+
+    <menuitem
+      id="menu_result_indicator_action_action"
+      name="Result Indicators"
+      parent="menu_program_indicator_action"
+      action="action_program_result_indicator_tree"
+      groups="program.program_action_user"
+      sequence="1" />    
+
+  </data>
+</openerp>


Follow ups