Merge lp:~openerp-dev/openobject-client-web/6.0-opw-574673-msh into lp:openobject-client-web

Proposed by Mohammed Shekha(Open ERP)
Status: Merged
Approved by: Xavier ALT
Approved revision: 4805
Merged at revision: 4817
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-574673-msh
Merge into: lp:openobject-client-web
Diff against target: 11 lines (+1/-0)
1 file modified
addons/openerp/controllers/templates/openo2m.mako (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-574673-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+105069@code.launchpad.net

Description of the change

Hello,

Fixed the issue of warning mesaage, as we have used jquery fancybox library for it which adds some elements in body at the time of loading, but in one2many it will not work at the time of save & new because at that time body is replaced with new one2many form, so the elment of jquery fancybox will be removed from the body, now if we call some on_change and it gives warning and so we have called jQuery.fancybox in form.js to show that warning, but here fancybox will go to find the element which is added at the time of loading and it will not find the elements so the warning message will not be shown.

Demo :- Sale Order -> Sale Order Line -> create one line with the quantity more than stock so it will gives you a warning -> now click on Save & New button and again create the sale order line more than the stock quantity, so here the warning comes in the response but it is not shown by jquery fancybox.

Thanks.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/templates/openo2m.mako'
2--- addons/openerp/controllers/templates/openo2m.mako 2011-11-28 11:13:09 +0000
3+++ addons/openerp/controllers/templates/openo2m.mako 2012-05-08 13:45:23 +0000
4@@ -53,6 +53,7 @@
5 </td>
6 </tr>
7 </table>
8+ <script type="text/javascript" src="/openobject/static/javascript/jQuery/jquery.fancybox-1.3.1.js"></script>
9 <script type="text/javascript">
10 jQuery('form').submit(function () {
11 jQuery('.save_close:eq(0) button').attr('disabled', true);