summaryrefslogtreecommitdiff
path: root/bin/addons/base/base_update.xml
diff options
context:
space:
mode:
authorXavier Morel <xmo@tinyerp.com>2010-01-26 17:42:37 +0100
committerXavier Morel <xmo@tinyerp.com>2010-01-26 17:42:37 +0100
commit392631cc3283d75b8e072249214dc5ffbbfa85e0 (patch)
treefd389e9b06c88bcdd6a2e63ff701d401c2f4f83d /bin/addons/base/base_update.xml
parent16c8091429f3aee5e1d5769e4e9121c65499f07d (diff)
[fix] res.config so the state of a todo is changed after being done with it, not when it's displayed.
Add the setting of states to ``skip`` (action_skip) and ``cancel`` (action_cancel) on top of ``done`` (action_next) plus a bit of documentation to the API. Also, fix res.config.users to use the right buttons/actions for its stuff, or clicking "Done" registers as having skipped the screen: create ``action_add`` event for "Add User" button, and hook "Done" to ``action_next`` with a NOOP ``execute``. bzr revid: xmo@tinyerp.com-20100126164237-0zvk4jc1dv9gqdc7
Diffstat (limited to 'bin/addons/base/base_update.xml')
-rw-r--r--bin/addons/base/base_update.xml25
1 files changed, 20 insertions, 5 deletions
diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml
index 180bd134a6e..3b969817d47 100644
--- a/bin/addons/base/base_update.xml
+++ b/bin/addons/base/base_update.xml
@@ -230,16 +230,31 @@
<field colspan="4" nolabel="1" name="groups_id"/>
</group>
- <xpath expr='//button[@name="action_skip"]'
- position='attributes'>
- <attribute name='string'>Done</attribute>
- <attribute name='icon'>gtk-go-forward</attribute>
- </xpath>
<xpath expr='//button[@name="action_next"]'
position='attributes'>
+ <attribute name="name">action_add</attribute>
<attribute name='string'>Add User</attribute>
<attribute name='icon'>gtk-add</attribute>
</xpath>
+
+ <xpath expr='//button[@name="action_skip"]'
+ position='attributes'>
+ <!-- if this one is performed first, it transforms
+ the action_skip into action_next, and the
+ transformation of action_next to action_add,
+ since it uses first-match, transforms the same
+ button. And we end up with [add] [next] instead
+ of [next] [add]
+
+ Would probably be simpler to just replace both
+ by nothing and create a pair of brand new
+ buttons... but we'd have to handle the groups
+ around the buttons... oh well...
+ -->
+ <attribute name="name">action_next</attribute>
+ <attribute name='string'>Done</attribute>
+ <attribute name='icon'>gtk-go-forward</attribute>
+ </xpath>
</data>
</field>
</record>