Merge lp:~openerp-dev/openerp-web/7.0-opw-584981-cpa into lp:openerp-web/7.0

Proposed by Chirag Patel (OpenERP)
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-584981-cpa
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+2/-0)
1 file modified
addons/web/static/src/js/view_list_editable.js (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-584981-cpa
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Needs Fixing
Review via email: mp+145602@code.launchpad.net

Description of the change

Hello,

Can't save object with deleted invalid row in editable tree.

Reproduce Issue: check the related bug #1103507 description.

Thanks

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

This is not the right place to perform this operation, if it should be performed at all: at worst it should be performed in the editor's `cancel` method, but at best (and more importantly) wouldn't the actual problem more likely be in the way the O2M field (or its component One2ManyListView) checks for its own validity?

review: Needs Fixing

Unmerged revisions

3732. By Chirag Patel (OpenERP)

[FIX] Can't save object with deleted invalid row in editable tree.

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_list_editable.js'
2--- addons/web/static/src/js/view_list_editable.js 2012-12-10 10:09:14 +0000
3+++ addons/web/static/src/js/view_list_editable.js 2013-01-30 13:32:52 +0000
4@@ -88,6 +88,8 @@
5 do_delete: function (ids) {
6 var nonfalse = _.compact(ids);
7 var _super = this._super.bind(this);
8+ var form = this.editor.form;
9+ form.$el.removeClass('oe_form_dirty');
10 var next = this.editor.is_editing()
11 ? this.cancel_edition(true)
12 : $.when();