Launchpad automatic translations update.
[odoo/odoo.git] / addons / project_gtd / project_gtd_view.xml
index d96e70d..66e7a8a 100644 (file)
@@ -1,73 +1,92 @@
 <?xml version="1.0" ?>
 <openerp>
     <data>
-        <record model="ir.ui.view" id="view_gtd_context_tree">
-            <field name="name">project.gtd.context.tree</field>
-            <field name="model">project.gtd.context</field>
-            <field name="type">tree</field>            
-            <field name="arch" type="xml">
-                <tree string="Context">
-                    <field name="name"/>
-                    <field name="project_default_id"/>
-                </tree>
-            </field>
-        </record>
-        <record model="ir.ui.view" id="view_gtd_context_form">
-            <field name="name">project.gtd.context.form</field>
-            <field name="model">project.gtd.context</field>
-            <field name="type">form</field>
-            <field name="arch" type="xml">
-                <form string="Context">
-                    <field name="name"/>
-                    <field name="sequence"/>
-                    <field name="project_default_id"/>
-                </form>
-            </field>
-        </record>
-        <record model="ir.actions.act_window" id="open_gtd_context_tree">
-            <field name="name">Contexts</field>
-            <field name="res_model">project.gtd.context</field>
-        </record>
+    <record model="ir.ui.view" id="view_gtd_context_tree">
+        <field name="name">project.gtd.context.tree</field>
+        <field name="model">project.gtd.context</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <tree string="Context">
+                <field name="sequence" invisible="1"/>
+                <field name="name" select="1"/>
+            </tree>
+        </field>
+    </record>
 
-        <menuitem name="Time Management" id="menu_open_gtd_time" parent="project.menu_definitions" groups="group_project_getting"/>
-        <menuitem name="Contexts" id="menu_open_gtd_time_contexts" groups="group_project_getting" parent="menu_open_gtd_time" action="open_gtd_context_tree"/>        
+    <record model="ir.ui.view" id="view_gtd_context_form">
+        <field name="name">project.gtd.context.form</field>
+        <field name="model">project.gtd.context</field>
+        <field name="type">form</field>
+        <field name="arch" type="xml">
+            <form string="Context">
+                <field name="name" select="1"/>
+                <field name="sequence"/>
+            </form>
+        </field>
+    </record>
 
-        <record model="ir.ui.view" id="view_gtd_timebox_tree">
-            <field name="name">project.gtd.timebox.tree</field>
-            <field name="model">project.gtd.timebox</field>
-            <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <tree string="Timebox">
-                    <field name="sequence"/>
-                    <field name="name"/>                    
-                    <field name="icon"/>
-                </tree>
-            </field>
-        </record>
+    <record model="ir.actions.act_window" id="open_gtd_context_tree">
+        <field name="name">Contexts</field>
+        <field name="res_model">project.gtd.context</field>
+        <field name="help">Contexts are defined in the "Getting Things Done" methodology. It allows you to categorize your tasks according to the context in which they have to be done: at the office, at home, when I take my car, etc.</field>
+    </record>
 
-        <record model="ir.ui.view" id="view_gtd_timebox_form">
-            <field name="name">project.gtd.timebox.form</field>
-            <field name="model">project.gtd.timebox</field>
-            <field name="type">form</field>
-            <field name="arch" type="xml">
-                <form string="Timeboxes">
-                    <separator string="Timebox Definition" colspan="4"/>
-                    <field name="name"/>
-                    <field name="sequence"/>
-                    <field name="icon"/>
-                </form>
-            </field>
-        </record>
+    <menuitem name="Contexts" id="menu_open_gtd_time_contexts"
+                parent="project.menu_tasks_config" action="open_gtd_context_tree"/>
 
-        <record model="ir.actions.act_window" id="open_gtd_timebox_tree">
-            <field name="name">Timeboxes</field>
-            <field name="res_model">project.gtd.timebox</field>
-            <field name="view_type">form</field>
-                       <field name="view_mode">tree,form</field>
-            <field name="view_id" ref="view_gtd_timebox_tree"/>
-        </record>
-       
-        <menuitem name="Timeboxes" id="menu_open_gtd_time_timeboxes" parent="menu_open_gtd_time" action="open_gtd_timebox_tree" groups="group_project_getting"/>        
+    <record model="ir.ui.view" id="view_gtd_timebox_tree">
+        <field name="name">project.gtd.timebox.tree</field>
+        <field name="model">project.gtd.timebox</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <tree string="Timebox">
+                <field name="sequence" invisible="1"/>
+                <field name="name"/>
+                <field name="icon"/>
+            </tree>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_gtd_timebox_form">
+        <field name="name">project.gtd.timebox.form</field>
+        <field name="model">project.gtd.timebox</field>
+        <field name="type">form</field>
+        <field name="arch" type="xml">
+            <form string="Timeboxes">
+                <separator string="Timebox Definition" colspan="4"/>
+                <field name="name" select="1"/>
+                <field name="sequence"/>
+                <field name="icon"/>
+            </form>
+        </field>
+    </record>
+
+    <record model="ir.actions.act_window" id="open_gtd_timebox_tree">
+        <field name="name">Timeboxes</field>
+        <field name="res_model">project.gtd.timebox</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">tree,form</field>
+        <field name="view_id" ref="view_gtd_timebox_tree"/>
+        <field name="help">Timeboxes are defined in the "Getting Things Done" methodology. A timebox defines a period of time in order to categorize your tasks: today, this week, this month, long term.</field>
+    </record>
+
+    <menuitem name="Timeboxes" id="menu_open_gtd_time_timeboxes" parent="project.menu_tasks_config" action="open_gtd_timebox_tree"/>
+
+    <record model="ir.ui.view" id="project_task_tree">
+        <field name="name">project.task.tree.timebox</field>
+        <field name="model">project.task</field>
+        <field name="type">tree</field>
+        <field name="inherit_id" ref="project.view_task_tree2" />
+        <field name="arch" type="xml">
+            <field name="remaining_hours" position="after">
+                <field string="Timebox" name="timebox_id" invisible=" not context.get('gtd', False)"/>
+                <button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
+                <button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" invisible=" not context.get('gtd',False)"/>
+                <field name="context_id" invisible="not context.get('context_show', False)" widget="selection" groups="base.group_extended"/>
+                <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/>
+            </field>
+        </field>
+    </record>
 
     <record model="ir.ui.view" id="project_task">
         <field name="name">project.task.form.timebox</field>
         <field name="inherit_id" ref="project.view_task_form2" />
         <field name="arch" type="xml">
             <field name="progress" position="after">
-                <newline/>
-                <separator string="Getting Things Done" colspan="6"/>
-                <newline/>
-                <field name="context_id" select="2" widget="selection"/>
-                <field name="timebox_id" select="1"/>
-                <newline/>
+                <field name="context_id" widget="selection"/>
+                <field name="timebox_id" widget="selection" select="1"/>
             </field>
         </field>
     </record>
-    
-    <record id="view_project_task_tree2" model="ir.ui.view">
-        <field name="name">project.task.tree</field>
+
+    <record id="view_task_gtd_search" model="ir.ui.view">
+        <field name="name">project.task.gtd.search</field>
         <field name="model">project.task</field>
-        <field name="type">tree</field>
-        <field eval="2" name="priority"/>
+        <field name="type">search</field>
+        <field name="priority">50</field>
         <field name="arch" type="xml">
-            <tree editable="top" colors="grey:state in ('cancel','done');blue:remaining_hours&lt;0;red:bool(date_deadline) &amp; (date_deadline&lt;current_date) &amp; (state in ('draft','open'))" string="Tasks">
-                <field name="sequence" string="Seq."/>
+           <search string="My Tasks">
+                <filter name="open" string="In Progress" domain="[('state','in',('draft','open'))]" help="In Progress and draft tasks" icon="terp-camera_test"/>
+                <filter string="Pending" domain="[('state','=','pending')]" context="{'show_delegated':False}" help="Pending Tasks" icon="terp-gtk-media-pause"/>
+                <separator orientation="vertical"/>
+                <filter
+                    domain="[('timebox_id','=', False)]"
+                    help="Tasks having no timebox assigned yet" string="Inbox"/>
+                <separator orientation="vertical"/>
+                <separator name="gtdsep"/>
                 <field name="name"/>
-                <field name="project_id" icon="gtk-indent"/>
-                <field name="user_id"/>
-                <field name="date_deadline"/>
-                <field name="remaining_hours" widget="float_time"/>
-                <field name="progress" widget="progressbar"/>
-                <field name="context_id" select="2" />
-                       <field name="timebox_id" select="1"/>
-                <button name="next_timebox" string="Next Timebox" type="object" icon="gtk-print" />
-                <button name="prev_timebox" string="Previous Timebox" type="object" icon="gtk-indent"/>                    
-                <field name="priority"/>
-                <field name="state"/>
-                <button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent" help="For changing to draft state"/>
-                <button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-execute" help="For changing to open state"/>
-                <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks"/>
-                <button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause" help="For changing to pending state"/>
-                <button groups="base.group_extended" name="%(project.wizard_delegate_task)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-execute" help="For changing to delegate state"/>
-                <button name="%(project.wizard_close_task)d" states="pending,open" string="Done" type="action" icon="gtk-jump-to" help="For changing to done state"/>
-                <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
-            </tree>
+                <field name="context_id" widget="selection" groups="base.group_extended"
+                    context="{'context_show': True}">
+                    <filter string="Show Context"
+                        name="context_show"
+                        context="{'context_show': True}"
+                        domain="[]" icon="terp-camera_test"
+                        help="Show the context field"/>
+                    <filter string="Show Deadlines" context="{'deadline_visible': False}"
+                        domain="[]" help="Show only tasks having a deadline"
+                        icon="terp-gnome-cpu-frequency-applet+"/>
+                </field>
+            </search>
         </field>
     </record>
-        
-
-    <record model="ir.actions.act_window" id="action_prject_task_tree">
-        <field name="name">project.task</field>
+    <record model="ir.actions.act_window" id="open_gtd_task">
+        <field name="name">My Tasks</field>
         <field name="res_model">project.task</field>
+        <field name="search_view_id" ref="view_task_gtd_search"/>
+        <field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}</field>
+        <field name="domain">[('user_id','=',uid)]</field>
         <field name="view_type">form</field>
-               <field name="view_mode">tree,form</field>
-        <field name="view_id" ref="view_project_task_tree2"/>
-        <field name="search_view_id" ref="project.view_task_search_form"/>     
+        <field name="view_mode">tree,form,calendar,gantt,graph,kanban</field>
     </record>
+    <menuitem action="open_gtd_task" id="menu_open_gtd_timebox_tree" parent="project.menu_project_management" sequence="4"/>
 
-    <menuitem name="Tasks Inbox" groups="group_project_getting" id="menu_task_inbox" parent="project.menu_main" action="action_prject_task_tree"/>
-
-    <act_window name="My Inbox"
-        domain="[('user_id', '=', uid),('state','in',('draft','open'))]"
-        res_model="project.task"
-        src_model="project.gtd.timebox"
-        view_type="form"
-        view_mode="tree,form"
-        id="act_timebox_tasks_my_inbox"/>
-    <act_window name="My Open Tasks"
-        domain="[('user_id', '=', uid),('state','in',('draft','open'))]"
-        res_model="project.task"
-        src_model="project.gtd.timebox"
-        view_type="form"
-        view_mode="tree,form"
-        id="act_timebox_tasks_my_open"/>
-    <act_window name="My Pending Tasks"
-        domain="[('user_id', '=', uid),('state','=','pending')]"
-        res_model="project.task"
-        src_model="project.gtd.timebox"
-        view_type="form"
-        view_mode="tree,form"
-        id="act_timebox_tasks_my_pending"/>
-
-    <act_window name="My Deadlines"
-        domain="[('user_id', '=', uid),('state','in',('draft','open','pending')),('date_deadline','&lt;&gt;',False)]"
-        res_model="project.task"
-        src_model="project.gtd.timebox"
-        view_type="form"
-        view_mode="tree,form"
-        id="act_timebox_tasks_my_deadline_open"/>
-
-    <act_window name="Timebox Tasks"
-        domain="[('timebox_id', '=', active_id)]"
-        res_model="project.task"
-        src_model="project.gtd.timebox"
-        view_type="form"
-        view_mode="tree,form"
-        id="act_timebox_tasks"/>
 
     </data>
 </openerp>