Vaibhav (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-bug-843696-vda into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
Bug #843696 in OpenERP Web: "cannot create partner in "CRM Cases""
https://bugs.launchpad.net/openerp-web/+bug/843696
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-843696-vda/+merge/75157
On button action create new Record first.
Go To :
Human Resources > Recruitment > Applicants > create new record > click on
Create Partner.
if wizard/form does not have any fields, it ignores case of new record.
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-843696-vda/+merge/75157
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-bug-843696-vda.
=== modified file 'addons/web/static/src/js/form.js'
--- addons/web/static/src/js/form.js 2011-09-12 14:07:53 +0000
+++ addons/web/static/src/js/form.js 2011-09-13 11:21:24 +0000
@@ -358,9 +358,15 @@
});
}
} else {
- setTimeout(function() {
- self.on_saved({ result: true }, success);
- });
+ if (!this.datarecord.id) {
+ this.dataset.create(values, function(r) {
+ self.on_created(r, success, prepend_on_create)
+ });
+ } else {
+ setTimeout(function() {
+ self.on_saved({ result: true }, success);
+ });
+ }
return true;
}
},
_______________________________________________
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