Chirag Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-17626-cpa into 
lp:openobject-client-web/6.0.

Requested reviews:
  Sananaz (Open ERP) (sma-tiny)
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-17626-cpa/+merge/76552

When declaration a button like this in a view:

 <button name="signal_validate" string="Validate" type="workflow"
states="draft" confirm="Do you 'want to validate this offer ?"
icon="terp-camera_test"/>

(NOTE: the quote is only there to raise the error ;-))

The confirm message contain a quote ('). Using this on the GTK client work as
excepted, but on the web client, the quote is not correctly escaped raising
javascript error and preving button to work correctly.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-17626-cpa/+merge/76552
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-17626-cpa.
=== modified file 'addons/openerp/widgets/form/templates/button.mako'
--- addons/openerp/widgets/form/templates/button.mako	2010-12-15 09:37:18 +0000
+++ addons/openerp/widgets/form/templates/button.mako	2011-09-22 10:47:09 +0000
@@ -3,9 +3,9 @@
         name="${name}"
         type="button"
         href="javascript: void(0)"
-        onclick="buttonClicked('${name}', '${btype}', '${model}', '${id}', '${confirm}', '${target}', getNodeAttribute(this, 'context'));"
+        onclick="buttonClicked('${name}', '${btype}', '${model}', '${id}', getNodeAttribute(this, 'confirm'), '${target}', getNodeAttribute(this, 'context'));"
         style="height: 20px;"
-        ${py.attrs(attrs, context=ctx)}>
+        ${py.attrs(attrs, confirm=confirm, context=ctx)}>
     % if string:
         % if icon:
             <img src="${icon}" width="16" height="16" alt="">&nbsp;<span>${string}</span>

_______________________________________________
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