~anybox/openobject-client-web/6.0-anybox-bugfixes

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/form.js

  • Committer: olt at tinyerp
  • Date: 2011-12-19 08:20:25 UTC
  • mfrom: (4725.1.2 4079)
  • Revision ID: olt@tinyerp.com-20111219082025-ehp6bmoxwdhxxydo
[MERGE] opw 4079

Show diffs side-by-side

added added

removed removed

Lines of Context:
465
465
    var $caller = jQuery(openobject.dom.get(caller));
466
466
    var $form = $caller.closest('form');
467
467
 
 
468
    // Inline editable row pass the fields when not save row
 
469
    // so remove whole editable row when onchange called outside the o2m
 
470
    if (($('tr.editors').length) && (!$caller.closest('tr.editors').length)) {
 
471
        var edit_line_id = $('tr.editors').attr('record');
 
472
        if(edit_line_id != "-1"){
 
473
            o2m_id = $('tr.editors').closest('.gridview').attr('id');
 
474
            new One2Many(o2m_id).save(edit_line_id);
 
475
        }
 
476
        $('tr.editors').remove();
 
477
    }
 
478
 
468
479
    var callback = $caller.attr('callback');
469
480
    var change_default = $caller.attr('change_default');
470
481