~openerp-dev/openobject-client/6.0-opw-573646-xal

« back to all changes in this revision

Viewing changes to bin/widget/screen/screen.py

  • Committer: Xavier ALT
  • Date: 2012-04-16 11:31:08 UTC
  • Revision ID: xal@openerp.com-20120416113108-wh1se2h1viud2zl0
[FIX] editable tree: force 'set_cursor()' on screen new() to finish editing before inserting new line in model

Show diffs side-by-side

added added

removed removed

Lines of Context:
647
647
        if self.current_view and self.current_view.view_type == 'tree' \
648
648
                and not self.current_view.widget_tree.editable:
649
649
            self.switch_view(mode='form')
 
650
        if self.current_view and self.current_view.view_type == 'tree' \
 
651
                and self.current_view.widget_tree.editable and self.current_view:
 
652
            # finish editing at current position
 
653
            self.current_view.set_cursor()
650
654
        ctx = self.context.copy()
651
655
        ctx.update(context)
652
656
        model = self.models.model_new(default, self.action_domain, ctx)