summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-06-13 17:38:42 +0200
committerXavier Morel <xmo@openerp.com>2012-06-13 17:38:42 +0200
commit49f6ab98539640fa21b83711b71c71bcacec9459 (patch)
tree689c8a47c1906fbc5e02873f0354963204ab0f17 /addons/analytic_user_function/analytic_user_function.py
parent9f9bbcff33a5a3153a22ea6f736b8c668c4f5a81 (diff)
[FIX] do not break dataset index (at the wrong moment) when clicking on [Create] row
dataset.index was previously set to ``null`` in handler of [Create] button (to fullfill contract with form view that dataset.index should be ``null`` to indicate the creation of a new record with no id). Issue: after setting the index to ``null``, the list view calls ``render_row_as_form`` which starts out trying to save a row being edited (case: clicking of the [Create] button after having selected a row for edition or after having written in a new record e.g. [Create] -> type -> [Create] type -> ...). This tentative to save the existing form would be performed in the context of a ``null`` dataset.index, which the form view doesn't (and shouldn't, index should be that of record *being edited*) expect. -> first save in whatever dataset state is the current one, and *right before* creating the new form (after having saved and/or discarded the previous one) we have the id of the new record to edit (or ``null``), find the index for *that* and set ``dataset.index`` to that (or ``null``) so the new form view can be created and opened in the right context. bzr revid: xmo@openerp.com-20120613153842-pd6xitjs8n003ogs
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function.py')
0 files changed, 0 insertions, 0 deletions