GoodERP
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

543 Zeilen
21KB

  1. <openerp>
  2. <data>
  3. <record model="ir.ui.view" id="timesheet_form">
  4. <field name="name">今日</field>
  5. <field name="model">timesheet</field>
  6. <field name="arch" type="xml">
  7. <form string="今日">
  8. <sheet>
  9. <group>
  10. <group>
  11. <field name="user_id"/>
  12. <field name="date"/>
  13. </group>
  14. </group>
  15. <notebook>
  16. <page name='task' string='待办事项'>
  17. <field name="task_ids" domain="[('user_id', '=', uid)]">
  18. <list string="计划">
  19. <field name="name" optional="show"/>
  20. <field name="next_action" optional="show"/>
  21. <field name="next_datetime" optional="show"/>
  22. <field name="status" optional="show"/>
  23. <field name="note" string="任务描述" optional="show"/>
  24. </list>
  25. </field>
  26. </page>
  27. <page name='timeline' string='工作记录'>
  28. <field name="timeline_ids" mode="list,kanban">
  29. <list string="进展" editable='bottom'>
  30. <field name='task_id' domain="[('user_id', 'in', [uid, False]),('status.state', '!=', 'done')]" optional="show"/>
  31. <field name='just_done' optional="show"/>
  32. <field name='next_action' optional="show"/>
  33. <field name='hours' sum="全天合计" groups='task.group_task_hours' optional="show"/>
  34. <field name="user_id" optional="show"/>
  35. <field name='next_datetime' optional="show"/>
  36. <field name='set_status' optional="show"/>
  37. <field name="create_date" string='创建时间' readonly='1' optional="show"/>
  38. </list>
  39. <kanban class="o_kanban_mobile">
  40. <field name='color'/>
  41. <templates>
  42. <t t-name="card">
  43. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click_edit">
  44. <div class="o_dropdown_kanban dropdown">
  45. <a class="dropdown-toggle btn" role="button" data-toggle="dropdown" href="#" >
  46. <span class="fa fa-bars fa-lg" title="菜单" role="img" aria-label="菜单"/>
  47. </a>
  48. <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  49. <li><a type="delete">删除</a></li>
  50. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  51. </ul>
  52. </div>
  53. <span t-attf-class="oe_kanban_content">
  54. <field name="create_date"/>
  55. <field name="task_id"/>
  56. <field name="just_done"/>
  57. <div groups='task.group_task_hours'>
  58. <field name="hours"/>
  59. </div>
  60. </span>
  61. </div>
  62. </t>
  63. </templates>
  64. </kanban>
  65. </field>
  66. </page>
  67. </notebook>
  68. </sheet>
  69. </form>
  70. </field>
  71. </record>
  72. <record id="timesheet_kanban" model="ir.ui.view">
  73. <field name="name">timesheet kanban</field>
  74. <field name="model">timesheet</field>
  75. <field name="arch" type="xml">
  76. <kanban class="o_kanban_mobile">
  77. <field name="date"/>
  78. <field name="user_id"/>
  79. <field name="color"/>
  80. <templates>
  81. <t t-name="card">
  82. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
  83. <ul class="oe_kanban_colorpicker" data-field="color"/>
  84. <div class="o_kanban_image">
  85. <t>
  86. <img t-att-src="kanban_image('res.users', 'image_1920', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_module_icon"/>
  87. </t>
  88. <p>
  89. <t t-esc="record.user_id.value"/>
  90. </p>
  91. </div>
  92. <p>
  93. <t t-esc="record.date.value"/>
  94. <!--<t t-esc="record.user_id.value"/>-->
  95. </p>
  96. </div>
  97. </t>
  98. </templates>
  99. </kanban>
  100. </field>
  101. </record>
  102. <record model="ir.ui.view" id="project_list">
  103. <field name="name">项目列表</field>
  104. <field name="model">project</field>
  105. <field name="arch" type="xml">
  106. <list>
  107. <field name="name"/>
  108. <field name="customer_id"/>
  109. <field name="type_id"/>
  110. <field name="plan_hours" groups='task.group_task_hours'/>
  111. <field name="hours" groups='task.group_task_hours'/>
  112. <field name='active' column_invisible='1'/>
  113. </list>
  114. </field>
  115. </record>
  116. <record model="ir.ui.view" id="project_form">
  117. <field name="name">项目</field>
  118. <field name="model">project</field>
  119. <field name="arch" type="xml">
  120. <form string="项目">
  121. <sheet>
  122. <group>
  123. <group>
  124. <field name="name"/>
  125. <field name="customer_id"
  126. domain="[('c_category_id', '!=', False)]"
  127. options="{'no_create': True, 'no_open': True}"/>
  128. <field name="type_id"/>
  129. <field name="address" widget='url'/>
  130. </group>
  131. <group>
  132. <field name="plan_hours" groups='task.group_task_hours,base.group_portal'/>
  133. <field name="hours" groups='task.group_task_hours,base.group_portal'/>
  134. </group>
  135. </group>
  136. <notebook>
  137. <page name='task' string='任务'>
  138. <field name="task_ids">
  139. <list string="任务" editable='bottom'>
  140. <field name="sequence" widget="handle" optional="show"/>
  141. <field name="name" optional="show"/>
  142. <field name="user_id" optional="show"/>
  143. <field name="next_action" optional="show"/>
  144. <field name="next_datetime" optional="show"/>
  145. <field name="plan_hours" groups='task.group_task_hours,base.group_portal' sum="计划工时" optional="show"/>
  146. <field name="hours" groups='task.group_task_hours,base.group_portal' sum="实际工时" optional="show"/>
  147. </list>
  148. </field>
  149. </page>
  150. <page name='project_invoice' string='发票行'>
  151. <field name="invoice_ids">
  152. <list string="发票" editable='bottom'>
  153. <field name="date_due" optional="show"/>
  154. <field name="tax_rate" optional="show"/>
  155. <field name="amount" optional="show"/>
  156. <field name="tax_amount" optional="show"/>
  157. <field name="invoice_id" optional="show"/>
  158. <button name='make_invoice' type='object' string='生成发票' class='oe_highlight'
  159. invisible="invoice_id"/>
  160. </list>
  161. </field>
  162. </page>
  163. </notebook>
  164. <field name="note" placeholder='描述......'/>
  165. <chatter/>
  166. </sheet>
  167. </form>
  168. </field>
  169. </record>
  170. <record model="ir.ui.view" id="task_list">
  171. <field name="name">任务列表</field>
  172. <field name="model">task</field>
  173. <field name="arch" type="xml">
  174. <list>
  175. <field name="sequence" widget="handle"/>
  176. <field name="project_id"/>
  177. <field name="project_type_id"/>
  178. <field name="name"/>
  179. <field name="user_id"/>
  180. <field name="next_action"/>
  181. <field name="next_datetime"/>
  182. <field name="status"/>
  183. <field name="is_schedule"/>
  184. <button name='assign_to_me' type='object' string='指派给我' class='oe_highlight'
  185. invisible="user_id"/>
  186. </list>
  187. </field>
  188. </record>
  189. <record model="ir.ui.view" id="task_form">
  190. <field name="name">任务</field>
  191. <field name="model">task</field>
  192. <field name="arch" type="xml">
  193. <form string="任务">
  194. <header>
  195. <field name="status" widget="statusbar" clickable="true"/>
  196. </header>
  197. <sheet>
  198. <group>
  199. <group>
  200. <field name="project_id" options="{'no_create': True}"/>
  201. <field name="project_type_id"/>
  202. <field name="name"/>
  203. <field name="plan_hours" groups='task.group_task_hours'/>
  204. <field name="user_id"/>
  205. </group>
  206. <group>
  207. <field name="next_action"/>
  208. <field name="next_datetime"/>
  209. <field name="hours" groups='task.group_task_hours'/>
  210. <field name="tag_ids" widget="many2many_tags"/>
  211. </group>
  212. </group>
  213. <field name="timeline_ids">
  214. <list string="进展" create='0' edit='0'>
  215. <field name="create_uid" string='创建人' optional="show"/>
  216. <field name="create_date" string='创建时间' optional="show"/>
  217. <field name='hours' sum="全天合计" groups='task.group_task_hours' optional="show"/>
  218. <field name='just_done' optional="show"/>
  219. </list>
  220. </field>
  221. <field name="note" placeholder='描述......'/>
  222. </sheet>
  223. <chatter/>
  224. </form>
  225. </field>
  226. </record>
  227. <record id="task_kanban" model="ir.ui.view">
  228. <field name="name">task kanban</field>
  229. <field name="model">task</field>
  230. <field name="arch" type="xml">
  231. <kanban class="o_kanban_mobile">
  232. <field name="name"/>
  233. <field name="user_id"/>
  234. <field name="project_id"/>
  235. <field name="next_action"/>
  236. <field name="next_datetime"/>
  237. <field name="hours"/>
  238. <field name="plan_hours"/>
  239. <field name="color"/>
  240. <field name="priority"/>
  241. <templates>
  242. <t t-name="card">
  243. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
  244. <div class="o_kanban_image">
  245. <t>
  246. <img t-att-src="kanban_image('res.users', 'image_1920', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_module_icon"/>
  247. </t>
  248. <p>
  249. <t t-esc="record.user_id.value"/>
  250. </p>
  251. </div>
  252. <div class="oe_kanban_details">
  253. <p>
  254. <t t-esc="record.project_id.value"/>
  255. <t t-esc="record.name.value"/>
  256. <div groups='task.group_task_hours'>
  257. <t t-esc="record.hours.value"/>
  258. /
  259. <t t-esc="record.plan_hours.value"/>
  260. </div>
  261. </p>
  262. <p>
  263. <t t-esc="record.next_datetime.value"/>
  264. </p>
  265. <p>
  266. <t t-esc="record.next_action.value"/>
  267. </p>
  268. <field name="priority" widget="priority"/>
  269. </div>
  270. </div>
  271. </t>
  272. </templates>
  273. </kanban>
  274. </field>
  275. </record>
  276. <record id="task_search" model="ir.ui.view">
  277. <field name="name">task.search</field>
  278. <field name="model">task</field>
  279. <field name="arch" type="xml">
  280. <search string="Search Task">
  281. <field name="name" filter_domain="['|',('project_id','ilike',self),('name', 'ilike', self)]"/>
  282. <field name="user_id"/>
  283. <field name="status"/>
  284. <separator/>
  285. <filter string="我的任务" name="assigned_to_me"
  286. domain="[('user_id', '=', uid)]"
  287. help="指派给我的任务"/>
  288. <filter string="未指派的" name="unassigned"
  289. domain="[('user_id','=', False)]" help="未指派的任务"/>
  290. <separator/>
  291. <group expand="0" string="分组">
  292. <filter name="group_user_id" string="指派给" context="{'group_by':'user_id'}"/>
  293. <filter name="project_id" string="项目" context="{'group_by':'project_id'}"/>
  294. <filter name="group_status" string="阶段" context="{'group_by':'status'}"/>
  295. <separator orientation="vertical" />
  296. <filter string="创建月份" context="{'group_by':'create_date:month'}" name="month"/>
  297. </group>
  298. </search>
  299. </field>
  300. </record>
  301. <record model="ir.ui.view" id="task_calendar">
  302. <field name="name">task.calendar</field>
  303. <field name="model">task</field>
  304. <field name="priority" eval="2"/>
  305. <field name="arch" type="xml">
  306. <calendar color="user_id" date_start="next_datetime" string="任务安排">
  307. <field name="project_id"/>
  308. <field name="name"/>
  309. <field name="next_action"/>
  310. </calendar>
  311. </field>
  312. </record>
  313. <record model="ir.ui.view" id="timeline_list">
  314. <field name="name">工作记录</field>
  315. <field name="model">timeline</field>
  316. <field name="arch" type="xml">
  317. <list create='0' edit='0' default_order='create_date desc'>
  318. <field name='task_id' optional="show"/>
  319. <field name='project_id' optional="show"/>
  320. <field name='just_done' optional="show"/>
  321. <field name='need_help'/>
  322. <field name='hours' sum="全天合计" groups='task.group_task_hours' optional="show"/>
  323. <field name='set_status' optional="show"/>
  324. <field name="create_uid" string='创建人' optional="show"/>
  325. <field name="create_date" string='创建时间' optional="show"/>
  326. </list>
  327. </field>
  328. </record>
  329. <record id="timeline_search" model="ir.ui.view">
  330. <field name="name">timeline.search</field>
  331. <field name="model">timeline</field>
  332. <field name="arch" type="xml">
  333. <search string="工作记录">
  334. <field name="task_id"/>
  335. <field name="project_id"/>
  336. <field name="create_uid" string='创建人'/>
  337. <separator/>
  338. <filter string="今日" name="today_timeline"
  339. domain="[('create_date', '&gt;=', time.strftime('%Y-%m-%d 00:00:00')),
  340. ('create_date', '&lt;=', time.strftime('%Y-%m-%d 23:59:59'))]"
  341. help="今日工作记录"/>
  342. <filter name="group_create_uid" string="创建人" context="{'group_by':'create_uid'}"/>
  343. <filter name="group_project_id" string="项目" context="{'group_by':'project_id'}"/>
  344. <separator/>
  345. <filter string="创建月份" context="{'group_by':'create_date:month'}" name="month"/>
  346. </search>
  347. </field>
  348. </record>
  349. <!-- timeline Form View -->
  350. <record id="timeline_form" model="ir.ui.view">
  351. <field name="name">timeline.form</field>
  352. <field name="model">timeline</field>
  353. <field name="arch" type="xml">
  354. <form string="timeline">
  355. <sheet>
  356. <group>
  357. <field name="task_id" domain="[('user_id', 'in', [uid, False]),('status.state', '!=', 'done')]"/>
  358. <field name="just_done"/>
  359. <field name="hours" groups='task.group_task_hours' class="oe_inline"/>
  360. <field name='next_action'/>
  361. <field name='next_datetime'/>
  362. <field name='set_status'/>
  363. <field name='user_id'/>
  364. <field name="create_date" string="创建时间" readonly='1'/>
  365. </group>
  366. </sheet>
  367. </form>
  368. </field>
  369. </record>
  370. <record model="ir.ui.view" id="task_status_list">
  371. <field name="name">任务阶段</field>
  372. <field name="model">task.status</field>
  373. <field name="arch" type="xml">
  374. <list editable='bottom'>
  375. <field name="sequence" widget="handle"/>
  376. <field name="name"/>
  377. <field name="project_type_id"/>
  378. <field name="state"/>
  379. </list>
  380. </field>
  381. </record>
  382. <record model="ir.ui.view" id="task_status_form">
  383. <field name="name">任务阶段</field>
  384. <field name="model">task.status</field>
  385. <field name="arch" type="xml">
  386. <form>
  387. <group>
  388. <field name="sequence"/>
  389. <field name="name"/>
  390. </group>
  391. </form>
  392. </field>
  393. </record>
  394. <!--门户用户单独的项目视图-->
  395. <record model="ir.ui.view" id="project_portal_list">
  396. <field name="name">项目列表</field>
  397. <field name="model">project</field>
  398. <field name="arch" type="xml">
  399. <list create='0'>
  400. <field name="name"/>
  401. <field name="customer_id"/>
  402. <field name="plan_hours" groups='task.group_task_hours'/>
  403. <field name="hours" groups='task.group_task_hours'/>
  404. </list>
  405. </field>
  406. </record>
  407. <record model="ir.ui.view" id="project_portal_form">
  408. <field name="name">项目</field>
  409. <field name="model">project</field>
  410. <field name="arch" type="xml">
  411. <form string="项目" edit='0' create='0'>
  412. <sheet>
  413. <group>
  414. <group>
  415. <field name="name"/>
  416. <field name="customer_id"/>
  417. <field name="address" widget='url'/>
  418. </group>
  419. <group>
  420. <field name="plan_hours" groups='task.group_task_hours,base.group_portal'/>
  421. <field name="hours" groups='task.group_task_hours,base.group_portal'/>
  422. </group>
  423. </group>
  424. <notebook>
  425. <page name='task' string='任务'>
  426. <field name="task_ids">
  427. <list string="任务" editable='bottom'>
  428. <field name="sequence" widget="handle" optional="show"/>
  429. <field name="name" optional="show"/>
  430. <field name="user_id" optional="show"/>
  431. <field name="next_action" optional="show"/>
  432. <field name="next_datetime" optional="show"/>
  433. <field name="plan_hours" groups='task.group_task_hours,base.group_portal' sum="计划工时" optional="show"/>
  434. <field name="hours" groups='task.group_task_hours,base.group_portal' sum="实际工时" optional="show"/>
  435. </list>
  436. </field>
  437. </page>
  438. <page name='project_invoice' string='发票行'>
  439. <field name="invoice_ids">
  440. <list string="发票" editable='bottom'>
  441. <field name="date_due" optional="show"/>
  442. <field name="tax_rate" optional="show"/>
  443. <field name="amount" optional="show"/>
  444. <field name="tax_amount" optional="show"/>
  445. <field name="invoice_id" optional="show"/>
  446. <button name='make_invoice' type='object' string='生成发票' class='oe_highlight'
  447. invisible="invoice_id"/>
  448. </list>
  449. </field>
  450. </page>
  451. </notebook>
  452. <field name="note" placeholder='描述......'/>
  453. <chatter/>
  454. </sheet>
  455. </form>
  456. </field>
  457. </record>
  458. <!--action-->
  459. <record model="ir.actions.act_window" id="action_project">
  460. <field name="name">项目</field>
  461. <field name="res_model">project</field>
  462. <field name="view_mode">list,form</field>
  463. <field name="context">{'type':'project'}</field>
  464. <field name="help" type="html">
  465. <p class="oe_view_nocontent_create">点击创建一个项目</p>
  466. </field>
  467. </record>
  468. <!--门户用户只能查看他关注的项目-->
  469. <record model="ir.actions.act_window" id="action_project_portal">
  470. <field name="name">项目</field>
  471. <field name="res_model">project</field>
  472. <field name="view_mode">list,form</field>
  473. <field name="context">{'type':'project'}</field>
  474. <field name="view_ids" eval="[(5, 0, 0),
  475. (0, 0, {'view_mode': 'list', 'view_id': ref('project_portal_list')}),
  476. (0, 0, {'view_mode': 'form', 'view_id': ref('project_portal_form')})]"/>
  477. <field name="help" type="html">
  478. <p class="oe_view_nocontent_create">您还未关注一个项目</p>
  479. </field>
  480. </record>
  481. <record model="ir.actions.act_window" id="action_task">
  482. <field name="name">任务</field>
  483. <field name="res_model">task</field>
  484. <field name="view_mode">kanban,calendar,list,form,search</field>
  485. <field name="context">{
  486. 'search_default_group_status': 1,
  487. }
  488. </field>
  489. <field name="help" type="html">
  490. <p class="oe_view_nocontent_create">点击创建一个任务</p>
  491. </field>
  492. </record>
  493. <record model="ir.actions.act_window" id="action_timeline">
  494. <field name="name">工作日志</field>
  495. <field name="res_model">timeline</field>
  496. <field name="view_mode">list,pivot</field>
  497. <field name="context">{'search_default_today_timeline': 1}</field>
  498. </record>
  499. <record model="ir.actions.act_window" id="action_timesheet_today">
  500. <field name="name">今日工作日志</field>
  501. <field name="res_model">timesheet</field>
  502. <field name="view_mode">kanban,form</field>
  503. <field name="domain">[('date', '=', context_today().strftime('%Y-%m-%d')),('user_id', '=', uid)]</field>
  504. <field name="help" type="html">
  505. <p class="oe_view_nocontent_create">点击创建今日的工作日志</p>
  506. </field>
  507. </record>
  508. <record model="ir.actions.act_window" id="action_task_status">
  509. <field name="name">任务阶段</field>
  510. <field name="res_model">task.status</field>
  511. <field name="view_mode">list</field>
  512. <field name="help" type="html">
  513. <p class="oe_view_nocontent_create">点击创建一个任务阶段</p>
  514. </field>
  515. </record>
  516. <menuitem name="任务" id="menu_task_root" web_icon="task,static/description/icon.png"
  517. groups='task.group_task' sequence='200'/>
  518. <menuitem name="今日" id="menu_timesheet" parent="menu_task_root"
  519. action="action_timesheet_today" sequence='1'/>
  520. <menuitem name="主数据" id="menu_task_data" parent="menu_task_root" sequence='5'/>
  521. <menuitem name="任务" id="menu_task" parent="menu_task_data"
  522. action="action_task" sequence='1'/>
  523. <menuitem name="项目" id="menu_project" parent="menu_task_data"
  524. action="action_project" sequence='5' groups='task.group_task'/>
  525. <menuitem name="报表" id="menu_task_report" parent="menu_task_root"
  526. groups='task.group_task_manager' sequence='10'/>
  527. <menuitem name="工作日志" id="menu_task_timesheet" parent="menu_task_report"
  528. action="action_timeline" sequence='1'/>
  529. <menuitem name="设置" id="menu_task_configuration" parent="menu_task_root"
  530. groups='task.group_task_manager' sequence='15'/>
  531. <menuitem name="任务阶段" id="menu_task_status" parent="menu_task_configuration"
  532. action="action_task_status" sequence='1'/>
  533. <!--门户用户的项目菜单-->
  534. <menuitem name="项目" id="menu_project_portal" web_icon="task,static/description/icon.png"
  535. action="action_project_portal" groups='base.group_portal'/>
  536. </data>
  537. </openerp>
上海开阖软件有限公司 沪ICP备12045867号-1