summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-03-15 11:05:42 +0100
committerThibault Delavallée <tde@openerp.com>2012-03-15 11:05:42 +0100
commit6808cd7e5321d73e47fa2e75c8d50da061fc7389 (patch)
tree35c8cbcd123169fc376e72efa033e867a93cac28
parent632c5e3036b39fdee58b442aff72e7a50baa7496 (diff)
[ADD] Added a menu entry in Settings/Users, along with a tree view definition.
bzr revid: tde@openerp.com-20120315100542-xhlvb43lda9d3a0m
-rw-r--r--doc/api/need_action_specs.rst2
-rw-r--r--openerp/addons/base/__openerp__.py1
-rw-r--r--openerp/addons/base/base_needaction_view.xml29
3 files changed, 32 insertions, 0 deletions
diff --git a/doc/api/need_action_specs.rst b/doc/api/need_action_specs.rst
index d33536a347d..5cffe05be2c 100644
--- a/doc/api/need_action_specs.rst
+++ b/doc/api/need_action_specs.rst
@@ -12,6 +12,8 @@ This class also offers several global services,:
This mechanism is used for instance to display the number of pending actions in menus, such as Leads (12).
+A menu in Settings/Users has been added to allows having a quick look to need_action_user_ids.
+
Addon implementation example
++++++++++++++++++++++++++++
diff --git a/openerp/addons/base/__openerp__.py b/openerp/addons/base/__openerp__.py
index 802a0510e28..67920c7239a 100644
--- a/openerp/addons/base/__openerp__.py
+++ b/openerp/addons/base/__openerp__.py
@@ -40,6 +40,7 @@
],
'update_xml': [
'base_update.xml',
+ 'base_needaction_view.xml',
'ir/wizard/wizard_menu_view.xml',
'ir/ir.xml',
'ir/ir_config_parameter_view.xml',
diff --git a/openerp/addons/base/base_needaction_view.xml b/openerp/addons/base/base_needaction_view.xml
new file mode 100644
index 00000000000..84f7612cac9
--- /dev/null
+++ b/openerp/addons/base/base_needaction_view.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="view_notification_tree">
+ <field name="name">base.needaction_users_rel.tree</field>
+ <field name="model">base.needaction_users_rel</field>
+ <field name="type">tree</field>
+ <field name="sequence">10</field>
+ <field name="arch" type="xml">
+ <tree string="Subscription">
+ <field name="user_id"/>
+ <field name="res_model"/>
+ <field name="res_id"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="action_view_needaction_users_rel" model="ir.actions.act_window">
+ <field name="name">Need action relationships</field>
+ <field name="res_model">base.needaction_users_rel</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem id="menu_needaction_users_rel" name="Need actions" parent="base.menu_users" sequence="20" action="action_view_needaction_users_rel" groups="base.group_extended"/>
+
+ </data>
+</openerp>