Merge lp:~openerp-dev/openerp-web/6.1-opw-583151-msh into lp:openerp-web/6.1

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-583151-msh
Merge into: lp:openerp-web/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/view_form.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-583151-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+140829@code.launchpad.net

Description of the change

Hello,

Fixed the issue of buttons in editable one2many new record, button should be disable if there is new record of one2many.

Demo :- Open a record with one2many field which is editable with buttons, create a new one2many record and without saving the record click on button, you will get traceback.

Reason :- As we have used Buffered Dataset for one2many so for one2many we will not have real ID of record instead we will have virtual id, which passed when action is called on that button which causing the issue.

Behaviour :- Behaviour should be when new one2many record going to create at that time buttons should be disabled which is true for one2many form view but it is not working in editable one2many.

Thanks.

To post a comment you must log in.

Unmerged revisions

2500. By Mohammed Shekha(Open ERP)

[FIX]Fixed the issue of buttons in editable one2many new record, button should be disable if there is new record of one2many.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_form.js'
2--- addons/web/static/src/js/view_form.js 2012-12-04 11:02:12 +0000
3+++ addons/web/static/src/js/view_form.js 2012-12-20 07:28:53 +0000
4@@ -678,7 +678,7 @@
5 is_interactible_record: function() {
6 var id = this.datarecord.id;
7 if (!id) {
8- if (this.options.not_interactible_on_create)
9+ if (this.options.not_interactible_on_create || this.dataset instanceof openerp.web.BufferedDataSet)
10 return false;
11 } else if (typeof(id) === "string") {
12 if(openerp.web.BufferedDataSet.virtual_id_regex.test(id))