Skip to content

Commit 4d33eb3

Browse files
alfredoavanzoscoihane
authored andcommitted
[ADD] hr_timesheet_stop_button: In Timesheets new fields: Start Date, and End Date. Also new button "Put end date".
1 parent 1d09f71 commit 4d33eb3

6 files changed

Lines changed: 185 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
2+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
3+
:alt: License: AGPL-3
4+
5+
========================
6+
Hr timesheet stop button
7+
========================
8+
9+
* In Timesheets new fields: Start Date, and End Date. Also new button "Put end
10+
date".
11+
* When the new button is clicked, the difference between the new dates is
12+
calculated.
13+
14+
Bug Tracker
15+
===========
16+
17+
Bugs are tracked on `GitHub Issues
18+
<https://github.com/avanzosc/hr-addons/issues>`_. In case of trouble, please
19+
check there if your issue has already been reported. If you spotted it first,
20+
help us smash it by providing detailed and welcomed feedback.
21+
22+
Credits
23+
=======
24+
25+
Contributors
26+
------------
27+
* Ana Juaristi <[email protected]>
28+
* Alfredo de la Fuente <[email protected]>
29+
30+
Do not contact contributors directly about support or help with technical issues.

hr_timesheet_stop_button/__init__.py

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2021 Alfredo de la Fuente - AvanzOSC
2+
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3+
{
4+
"name": "Hr Timesheet Stop Button",
5+
"version": "12.0.1.0.0",
6+
"license": "AGPL-3",
7+
"depends": [
8+
"hr_timesheet",
9+
"hr_timesheet_usability"
10+
],
11+
"author": "AvanzOSC",
12+
"website": "http://www.avanzosc.es",
13+
"category": "Human Resources",
14+
"data": [
15+
"views/account_analytic_line_views.xml",
16+
],
17+
"installable": True,
18+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * hr_timesheet_stop_button
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2022-01-24 14:38+0000\n"
10+
"PO-Revision-Date: 2022-01-24 14:38+0000\n"
11+
"Last-Translator: <>\n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: hr_timesheet_stop_button
19+
#: model:ir.model,name:hr_timesheet_stop_button.model_account_analytic_line
20+
msgid "Analytic Line"
21+
msgstr "Línea Analítica"
22+
23+
#. module: hr_timesheet_stop_button
24+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_search_inh_stop_button
25+
msgid "Customer"
26+
msgstr "Cliente"
27+
28+
#. module: hr_timesheet_stop_button
29+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
30+
msgid "End"
31+
msgstr "Fin"
32+
33+
#. module: hr_timesheet_stop_button
34+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
35+
msgid "Timesheet Activities"
36+
msgstr "Actividades del parte de horas"
37+
38+
#. module: hr_timesheet_stop_button
39+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
40+
msgid "Total"
41+
msgstr ""
42+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * hr_timesheet_stop_button
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2022-01-24 14:38+0000\n"
10+
"PO-Revision-Date: 2022-01-24 14:38+0000\n"
11+
"Last-Translator: <>\n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: hr_timesheet_stop_button
19+
#: model:ir.model,name:hr_timesheet_stop_button.model_account_analytic_line
20+
msgid "Analytic Line"
21+
msgstr ""
22+
23+
#. module: hr_timesheet_stop_button
24+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_search_inh_stop_button
25+
msgid "Customer"
26+
msgstr ""
27+
28+
#. module: hr_timesheet_stop_button
29+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
30+
msgid "End"
31+
msgstr ""
32+
33+
#. module: hr_timesheet_stop_button
34+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
35+
msgid "Timesheet Activities"
36+
msgstr ""
37+
38+
#. module: hr_timesheet_stop_button
39+
#: model_terms:ir.ui.view,arch_db:hr_timesheet_stop_button.hr_timesheet_line_tree_user
40+
msgid "Total"
41+
msgstr ""
42+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<odoo>
3+
<record id="hr_timesheet_line_tree_user" model="ir.ui.view">
4+
<field name="name">account.analytic.line.tree.user</field>
5+
<field name="model">account.analytic.line</field>
6+
<field name="arch" type="xml">
7+
<tree editable="top" string="Timesheet Activities" import="false">
8+
<field name="date"/>
9+
<field name="name"/>
10+
<field name="project_id" required="1"/>
11+
<field name="partner_id" domain="[('customer','=',True)]"/>
12+
<field name="task_id" context="{'default_project_id': project_id}" domain="[('project_id', '=', project_id)]"/>
13+
<field name="employee_id" invisible="1"/>
14+
<field name="time_start" widget="float_time" invisible="1"/>
15+
<field name="time_stop" widget="float_time" invisible="1"/>
16+
<field name="unit_amount" widget="timesheet_uom" sum="Total" readonly="1"/>
17+
<button attrs="{'invisible':[('unit_amount','!=',00.00)]}"
18+
icon="fa-hand-pointer-o" name="action_button_end"
19+
string="End" type="object" />
20+
</tree>
21+
</field>
22+
</record>
23+
24+
<record id="hr_timesheet_line_search_inh_stop_button" model="ir.ui.view">
25+
<field name="model">account.analytic.line</field>
26+
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search" />
27+
<field name="arch" type="xml">
28+
<field name="employee_id" position="after">
29+
<field name="partner_id" />
30+
</field>
31+
<filter name="groupby_employee" position="after">
32+
<filter string="Customer" name="groupby_customer" domain="[]" context="{'group_by':'partner_id'}"/>
33+
</filter>
34+
</field>
35+
</record>
36+
37+
<record id="hr_timesheet_line_tree_inh_stop_button" model="ir.ui.view">
38+
<field name="model">account.analytic.line</field>
39+
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
40+
<field name="arch" type="xml">
41+
<field name="project_id" position="before">
42+
<field name="partner_id" domain="[('customer','=',True)]"/>
43+
</field>
44+
</field>
45+
</record>
46+
47+
<record id="hr_timesheet.act_hr_timesheet_line_view_tree" model="ir.actions.act_window.view">
48+
<field name="view_mode">tree</field>
49+
<field name="sequence" eval="4"/>
50+
<field name="view_id" ref="hr_timesheet_line_tree_user"/>
51+
<field name="act_window_id" ref="hr_timesheet.act_hr_timesheet_line"/>
52+
</record>
53+
</odoo>

0 commit comments

Comments
 (0)