Merge lp:~openerp-dev/openobject-client-web/6.0-opw-4311-sma into lp:openobject-client-web

Proposed by Sananaz (Open ERP)
Status: Merged
Approved by: Xavier (Open ERP)
Approved revision: 4539
Merged at revision: 4541
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-4311-sma
Merge into: lp:openobject-client-web
Diff against target: 14 lines (+4/-0)
1 file modified
addons/openerp/static/javascript/form.js (+4/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-4311-sma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+53953@code.launchpad.net

Description of the change

Hello,

Please check with the sidebar actions:

Go to Product list > Click on `New` (Don't Save) > Click Procurement Request (Actions at sidebar)
It gives traceback.
So just give the message (`You must save this record to perform the action !`) same as GTK client if form is not saved don't perform any action.

Thank you.

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/static/javascript/form.js'
2--- addons/openerp/static/javascript/form.js 2011-01-28 15:21:15 +0000
3+++ addons/openerp/static/javascript/form.js 2011-03-18 07:09:31 +0000
4@@ -963,6 +963,10 @@
5 var id = eval(params['_terp_selection'])[0]
6 } else {
7 var id = jQuery('[id="'+field+'"]').val();
8+ if (id == 'False') {
9+ error_display(_("You must save this record to perform the action !"));
10+ return;
11+ }
12 }
13
14 var action_id = $src.attr('action_id') || null;