1 <?xml version="1.0" encoding="utf-8"?>
6 <record id="account_analytic_planning_view_tree" model="ir.ui.view">
7 <field name="name">report.account.analytic.planning.tree</field>
8 <field name="model">report_account_analytic.planning</field>
9 <field name="type">tree</field>
10 <field name="arch" type="xml">
11 <tree string="Planning">
13 <field name="user_id" />
14 <field name="date_from" />
15 <field name="date_to" />
16 <field name="business_days" />
17 <field name="total_planned" />
18 <field name="total_free" />
19 <field name="state" />
24 <record id="account_analytic_planning_view_form" model="ir.ui.view">
25 <field name="name">report.account.analytic.planning.form</field>
26 <field name="model">report_account_analytic.planning</field>
27 <field name="type">form</field>
28 <field name="arch" type="xml">
29 <form string="Planning by Account">
30 <group col="6" colspan="4">
31 <field name="name" select="1" />
32 <field name="code" select="1" />
33 <field name="user_id" select="1" />
34 <field name="business_days" />
35 <field name="date_from" />
36 <field name="date_to" />
38 <notebook colspan="4">
39 <page string="Planning by User">
40 <field colspan="4" name="planning_user_ids"
41 nolabel="1" widget="one2many_list" readonly="1">
42 <tree string="Planning By User (in Days)">
43 <field name="user_id"/>
44 <field name="tasks" sum="Total Remaining Tasks"/>
45 <field name="plan_tasks" sum="Total Time Allocation of Tasks"/>
46 <field name="plan_open" sum="Total Time Allocation without Tasks"/>
47 <field name="holiday" />
48 <field name="free" sum="Total Unallocated Time"/>
49 <field name="timesheet"/>
53 <page string="Planning by Account">
54 <field colspan="4" name="planning_account"
55 nolabel="1" widget="one2many_list" readonly="1">
56 <tree string="Planning By Account (in Days)">
57 <field name="account_id" />
58 <field name="tasks" sum="Total Remaining Tasks"/>
59 <field name="plan_tasks" sum="Total Time Allocation of Tasks"/>
60 <field name="plan_open" sum="Total Time Allocation without Tasks"/>
61 <field name="timesheet" />
65 <page string="Time Encoding">
66 <field colspan="4" name="line_ids"
68 <tree editable="bottom"
69 string="Planning Lines">
70 <field name="user_id"/>
71 <field name="account_id" />
72 <field name="amount" />
73 <field name="amount_unit" />
74 <field name="task_ids" />
76 <field name="amount_in_base_uom" invisible="1" sum="Total Planned (in Days)"/>
79 <form string="Planning Lines">
80 <field name="user_id" domain="[('id','child_of',[parent.user_id])]"/>
81 <field name="account_id" />
82 <field name="amount" />
83 <field name="amount_unit" />
84 <!-- WIDGET MANY2MANY GIVES ERROR-->
85 <!-- <field name="task_ids" colspan="4" nolabel="1" widget="many2many"/>-->
86 <field name="task_ids" colspan="4" nolabel="1" mode="tree,form">
88 <group colspan="4" col="2">
89 <field name="name" select="1"/>
90 <field name="project_id" required="1" select="1" domain="[('category_id','=',parent.account_id)]"/>
92 <group colspan="4" col="4">
93 <field name="date_deadline"/>
94 <field name="user_id" select="1" domain="[('id','=',parent.user_id)]"/>
96 <notebook colspan="4">
97 <page string="Information">
98 <group col="3" colspan="4">
99 <field name="effective_hours" widget="float_time" invisible="True" />
100 <field name="planned_hours"
102 attrs="{'readonly':[('state','!=','draft')]}"
103 on_change="onchange_planned(planned_hours,effective_hours)"/>
104 <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"/>
105 <button name="%(project.action_config_compute_remaining)d" string="Review" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
107 <field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}" widget="text_wiki"/>
108 <group col="11" colspan="4">
109 <field name="state" select="1"/>
110 <button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/>
111 <button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-execute"/>
112 <button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert"/>
113 <button name="do_pending" states="open" string="Pending" type="object" icon="gtk-media-pause"/>
114 <button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open" string="Delegate" type="action" icon="gtk-sort-descending"/>
115 <button name="do_close" states="pending,open" string="Done" type="object" icon="gtk-jump-to"/>
116 <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
120 <page groups="base.group_extended" string="Extra Info" attrs="{'readonly':[('state','=','done')]}">
121 <group colspan="2" col="2">
122 <field name="priority"/>
123 <field name="sequence"/>
125 <separator string="Miscelleanous" colspan="4"/>
127 <field name="active"/>
128 <field name="partner_id"/>
129 <separator colspan="4" string="Notes"/>
130 <field colspan="4" name="notes" nolabel="1"/>
135 <separator string="Notes" colspan="4" />
136 <field name="note" colspan="4"
142 <group col="6" colspan="4">
143 <field name="state" select="1"
145 <button name="action_open" states="draft"
146 string="Open" type="object" icon="gtk-yes" />
147 <button name="action_done" states="open"
148 string="Done" type="object" icon="gtk-jump-to" />
149 <button name="action_cancel" states="draft,open"
150 string="Cancel" type="object" icon="gtk-cancel" />
151 <button name="action_draft" states="done,cancel"
152 string="Reset to Draft" type="object" icon="gtk-convert" />
158 <record id="account_analytic_planning_view_search" model="ir.ui.view">
159 <field name="name">report.account.analytic.planning.search</field>
160 <field name="model">report_account_analytic.planning</field>
161 <field name="type">search</field>
162 <field name="arch" type="xml">
163 <search string="Planning by Account">
164 <group col="8" colspan="4">
165 <filter icon="gtk-execute" string="My" domain="[('user_id','=',uid)]" help="My Plannings"/>
166 <filter icon="terp-project" string="Current Plannings" domain="[('date_from','<=',time.strftime('%%Y-%%m-%%d')),('date_to','>=',time.strftime('%%Y-%%m-%%d'))]" help="Current Plannings"/>
167 <separator orientation="vertical"/>
168 <field name="name" select="1"/>
169 <field name="code" select="1"/>
170 <field name="user_id" select="1"/>
171 <field name="state" select="1"/>
177 <!-- Planning Line -->
179 <record id="account_analytic_planning_line_view_tree" model="ir.ui.view">
180 <field name="name">report.account.analytic.planning.line.tree</field>
181 <field name="model">report_account_analytic.planning.line</field>
182 <field name="type">tree</field>
183 <field name="arch" type="xml">
184 <tree string="Planning Line">
185 <field name="planning_id"/>
186 <field name="user_id"/>
187 <field name="account_id" />
188 <field name="amount" />
189 <field name="amount_unit" />
190 <field name="note" select="1"/>
191 <field name="amount_in_base_uom" invisible="1" sum="Total Planned (in Days)"/>
196 <record id="account_analytic_planning_line_view_form" model="ir.ui.view">
197 <field name="name">report.account.analytic.planning.line.form</field>
198 <field name="model">report_account_analytic.planning.line</field>
199 <field name="type">form</field>
200 <field name="arch" type="xml">
201 <form string="Planning Line">
202 <field name="planning_id" select="1"/>
203 <field name="user_id" select="1"/>
204 <field name="account_id" select="1"/>
205 <field name="amount" />
206 <field name="amount_unit" />
207 <separator string="Notes" colspan="4" />
208 <field name="note" colspan="4" nolabel="1" />
213 <record id="action_account_analytic_planning_form" model="ir.actions.act_window">
214 <field name="name">Plannings</field>
215 <field name="res_model">report_account_analytic.planning</field>
216 <field name="view_type">form</field>
217 <field name="view_mode">tree,form</field>
218 <field name="search_view_id" ref="account_analytic_planning_view_search"/>
220 <menuitem id="base.menu_pm_planning" name="Planning" parent="base.menu_main_pm" sequence="5"/>
221 <menuitem id="planning_main" name="Long Term Planning"
222 parent="base.menu_pm_planning" />
224 <menuitem action="action_account_analytic_planning_form"
225 id="menu_report_account_analytic_planning" parent="planning_main" />
230 <record id="account_analytic_planning_stat_view_form" model="ir.ui.view">
231 <field name="name">report.account.analytic.planning.stat.form</field>
232 <field name="model">report_account_analytic.planning.stat</field>
233 <field name="type">form</field>
234 <field name="arch" type="xml">
235 <form string="Planning statistics">
236 <field name="planning_id" select="1" />
237 <field name="user_id" select="1" />
238 <field name="account_id" select="1" />
244 <record id="account_analytic_planning_stat_view_tree" model="ir.ui.view">
245 <field name="name">report.account.analytic.planning.stat.tree</field>
246 <field name="model">report_account_analytic.planning.stat</field>
247 <field name="type">tree</field>
248 <field name="arch" type="xml">
249 <tree string="Planning statistics">
250 <field name="planning_id" />
251 <field name="user_id" />
252 <field name="manager_id" />
253 <field name="account_id" />
254 <field name="sum_amount" />
255 <field name="sum_amount_real" />
256 <field name="sum_amount_tasks" />
261 <record id="account_analytic_planning_stat_view_graph" model="ir.ui.view">
262 <field name="name">report.account.analytic.planning.stat.graph</field>
263 <field name="model">report_account_analytic.planning.stat</field>
264 <field name="type">graph</field>
265 <field name="arch" type="xml">
266 <graph string="Planning statistics" type="bar">
267 <field name="account_id" />
268 <field name="sum_amount" operator="+" />
269 <field name="sum_amount_real" operator="+" />
270 <field name="sum_amount_tasks" operator="+" />
275 <record id="account_analytic_planning_stat_view_search" model="ir.ui.view">
276 <field name="name">report_account_analytic.planning.stat.search</field>
277 <field name="model">report_account_analytic.planning.stat</field>
278 <field name="type">search</field>
279 <field name="arch" type="xml">
280 <search string="Planning statistics">
281 <group col="10" colspan="4">
282 <filter icon="gtk-execute" string="My" domain="[('user_id','=',uid),('planning_id.state','<>','cancel')]" help="My Plannings Statistics"/>
283 <filter icon="gtk-execute" string="My Project" domain="[('manager_id','=',uid),('planning_id.state','<>','cancel')]" help="Planning Statistics of My Projects"/>
284 <separator orientation="vertical"/>
285 <field name="planning_id" select="1"/>
286 <field name="user_id" select="1"/>
287 <field name="account_id" select="1"/>
294 <record id="action_account_analytic_planning_stat_form" model="ir.actions.act_window">
295 <field name="name">Planning Statistics</field>
296 <field name="res_model">report_account_analytic.planning.stat</field>
297 <field name="view_type">form</field>
298 <field name="view_mode">graph,tree</field>
299 <field name="search_view_id" ref="account_analytic_planning_stat_view_search"/>
301 <menuitem id="next_id_85" name="Planning"
302 parent="hr.menu_hr_reporting" />
303 <menuitem action="action_account_analytic_planning_stat_form"
304 id="menu_report_account_analytic_planning_stat" parent="next_id_85" />
306 <!-- Analytic account Form -->
308 <record id="view_project_planning_form" model="ir.ui.view">
309 <field name="name">planning.account.analytic.account.form</field>
310 <field name="model">account.analytic.account</field>
311 <field name="type">form</field>
312 <field name="inherit_id" ref="account.view_account_analytic_account_form"/>
313 <field name="arch" type="xml">
314 <notebook position="inside">
315 <page string="Planning" >
316 <separator string="Planning lines"/>
317 <field name="planning_ids" colspan="4" nolabel="1">
318 <form string="Planning Lines">
319 <field name="planning_id" select="1"/>
320 <field name="user_id"/>
321 <field name="amount" />
322 <field name="amount_unit" />
323 <separator string="Notes" colspan="4" />
324 <field name="note" colspan="4" nolabel="1" />
326 <tree editable="bottom"
327 string="Planning Lines">
328 <field name="user_id"/>
329 <field name="account_id" />
330 <field name="amount" />
331 <field name="amount_unit" />
332 <field name="task_ids" />
333 <field name="note" />
334 <field name="amount_in_base_uom" invisible="1" sum="Total Planned (in Days)"/>
345 <record id="view_task_planning_form" model="ir.ui.view">
346 <field name="name">planning.task.form</field>
347 <field name="model">project.task</field>
348 <field name="type">form</field>
349 <field name="inherit_id" ref="project.view_task_form2"/>
350 <field name="arch" type="xml">
351 <field name="priority" position="before">
352 <field name="planning_line_id" domain="['|', ('user_id','=',user_id), ('user_id','=', False)]"/>
357 <!--Added link to open the list of all tasks planned on all lines of this planning.-->
358 <act_window context="{'planning': active_id}"
359 id="act_task_of_lines" name="Tasks" res_model="project.task"
360 src_model="report_account_analytic.planning"
363 <!-- company form -->
364 <record id="planning_company" model="ir.ui.view">
365 <field name="name">res.company.planning.config</field>
366 <field name="model">res.company</field>
367 <field name="type">form</field>
368 <field name="priority">25</field>
369 <field name="inherit_id" ref="base.view_company_form"/>
370 <field name="arch" type="xml">
371 <field name="project_time_mode_id" position="after">
372 <field name="planning_time_mode_id"/>