gpa(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-bug-727263-gpa into 
lp:openobject-server.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #727263 in OpenERP Server: "[6.0] diagram view (workflow) fails when 
labels contain non-ASCII characters or use m2o fields (e.g when showing group 
on wkf)"
  https://bugs.launchpad.net/openobject-server/+bug/727263

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-727263-gpa/+merge/70290

Fixed bug 727263
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-727263-gpa/+merge/70290
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-bug-727263-gpa.
=== modified file 'openerp/addons/base/ir/ir_ui_view.py'
--- openerp/addons/base/ir/ir_ui_view.py	2011-06-24 13:33:35 +0000
+++ openerp/addons/base/ir/ir_ui_view.py	2011-08-03 16:12:33 +0000
@@ -158,10 +158,10 @@
                 label_string = ""
                 if label:
                     for lbl in eval(label):
-                        if t.has_key(str(lbl)) and str(t[lbl])=='False':
+                        if t.has_key(tools.ustr(lbl)) and tools.ustr(t[lbl])=='False':
                             label_string = label_string + ' '
                         else:
-                            label_string = label_string + " " + t[lbl]
+                            label_string = label_string + " " + tools.ustr(t[lbl])
                 labels[str(t['id'])] = (a['id'],label_string)
         g  = graph(nodes, transitions, no_ancester)
         g.process(start)

=== modified file 'openerp/addons/base/ir/workflow/workflow.py'
--- openerp/addons/base/ir/workflow/workflow.py	2010-12-19 20:08:42 +0000
+++ openerp/addons/base/ir/workflow/workflow.py	2011-08-03 16:12:33 +0000
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,7 +15,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
@@ -46,21 +46,21 @@
         return super(workflow, self).write(cr, user, ids, vals, context=context)
 
     def get_active_workitems(self, cr, uid, res, res_id, context={}):
-        
+
         cr.execute('select * from wkf where osv=%s limit 1',(res,))
         wkfinfo = cr.dictfetchone()
         workitems = []
-        
+
         if wkfinfo:
             cr.execute('SELECT id FROM wkf_instance \
                             WHERE res_id=%s AND wkf_id=%s \
                             ORDER BY state LIMIT 1',
                             (res_id, wkfinfo['id']))
             inst_id = cr.fetchone()
-         
+
             cr.execute('select act_id,count(*) from wkf_workitem where inst_id=%s group by act_id', (inst_id,))
-            workitems = dict(cr.fetchall())        
-         
+            workitems = dict(cr.fetchall())
+
         return {'wkf': wkfinfo, 'workitems':  workitems}
 
 
@@ -148,12 +148,12 @@
     _columns = {
         'trigger_model': fields.char('Trigger Object', size=128),
         'trigger_expr_id': fields.char('Trigger Expression', size=128),
-        'signal': fields.char('Signal (button Name)', size=64, 
+        'signal': fields.char('Signal (button Name)', size=64,
                               help="When the operation of transition comes from a button pressed in the client form, "\
                               "signal tests the name of the pressed button. If signal is NULL, no button is necessary to validate this transition."),
-        'group_id': fields.many2one('res.groups', 'Group Required', 
+        'group_id': fields.many2one('res.groups', 'Group Required',
                                    help="The group that a user must have to be authorized to validate this transition."),
-        'condition': fields.char('Condition', required=True, size=128, 
+        'condition': fields.char('Condition', required=True, size=128,
                                  help="Expression to be satisfied if we want the transition done."),
         'act_from': fields.many2one('workflow.activity', 'Source Activity', required=True, select=True, ondelete='cascade',
                                     help="Source activity. When this activity is over, the condition is tested to determine if we can start the ACT_TO activity."),
@@ -161,9 +161,11 @@
                                   help="The destination activity."),
         'wkf_id': fields.related('act_from','wkf_id', type='many2one', relation='workflow', string='Workflow', select=True),
     }
+
     _defaults = {
-        'condition': lambda *a: 'True',
+        'condition': lambda *a: 'False',
     }
+
 wkf_transition()
 
 class wkf_instance(osv.osv):

=== modified file 'openerp/addons/base/ir/workflow/workflow_view.xml'
--- openerp/addons/base/ir/workflow/workflow_view.xml	2010-10-26 09:34:55 +0000
+++ openerp/addons/base/ir/workflow/workflow_view.xml	2011-08-03 16:12:33 +0000
@@ -52,7 +52,7 @@
             <field name="flow_stop" invisible="1"/>
             <field name="subflow_id" invisible="1"/>
           </node>
-          <arrow object="workflow.transition" source="act_from" destination="act_to" label="['signal','condition']">
+          <arrow object="workflow.transition" source="act_from" destination="act_to" label="['signal','condition','group_id']">
             <field name="act_from"/>
             <field name="act_to"/>
             <field name="signal"/>
@@ -329,7 +329,7 @@
       <field name="type">form</field>
       <field name="arch" type="xml">
         <form string="Workflow Workitems">
-          <field name="wkf_id" readonly="1"/>  
+          <field name="wkf_id" readonly="1"/>
           <field name="act_id" readonly="1"/>
           <field name="subflow_id" readonly="1"/>
           <field name="inst_id" readonly="1"/>
@@ -343,7 +343,7 @@
       <field name="type">tree</field>
       <field name="arch" type="xml">
         <tree string="Workflow Workitems">
-          <field name="wkf_id"/>  
+          <field name="wkf_id"/>
           <field name="act_id"/>
           <field name="subflow_id"/>
           <field name="inst_id"/>
@@ -359,7 +359,7 @@
         <search string="Workflow Workitems">
           <filter icon="terp-camera_test" string="Active" name="active" domain="[('state','=','active')]"/>
           <separator orientation="vertical"/>
-          <field name="wkf_id" widget="selection"/>  
+          <field name="wkf_id" widget="selection"/>
           <field name="act_id"/>
           <field name="subflow_id"/>
           <field name="inst_id"/>

_______________________________________________
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