odoo-addon-hr-timesheet-autofill-project-off 17.0.1.0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. odoo/addons/hr_timesheet_autofill_project_off/README.rst +108 -0
  2. odoo/addons/hr_timesheet_autofill_project_off/__init__.py +3 -0
  3. odoo/addons/hr_timesheet_autofill_project_off/__manifest__.py +14 -0
  4. odoo/addons/hr_timesheet_autofill_project_off/i18n/hr_timesheet_autofill_project_off.pot +19 -0
  5. odoo/addons/hr_timesheet_autofill_project_off/models/__init__.py +3 -0
  6. odoo/addons/hr_timesheet_autofill_project_off/models/hr_timesheet.py +24 -0
  7. odoo/addons/hr_timesheet_autofill_project_off/readme/CONTRIBUTORS.md +5 -0
  8. odoo/addons/hr_timesheet_autofill_project_off/readme/DESCRIPTION.md +1 -0
  9. odoo/addons/hr_timesheet_autofill_project_off/readme/USAGE.md +9 -0
  10. odoo/addons/hr_timesheet_autofill_project_off/static/description/icon.png +0 -0
  11. odoo/addons/hr_timesheet_autofill_project_off/static/description/index.html +451 -0
  12. odoo/addons/hr_timesheet_autofill_project_off/static/img/01_project_autofill_without_addon.png +0 -0
  13. odoo/addons/hr_timesheet_autofill_project_off/static/img/02_no_project_autofill_with_addon.png +0 -0
  14. odoo/addons/hr_timesheet_autofill_project_off/tests/__init__.py +3 -0
  15. odoo/addons/hr_timesheet_autofill_project_off/tests/test_account_analytic_line_default_get.py +37 -0
  16. odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/METADATA +124 -0
  17. odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/RECORD +19 -0
  18. odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/WHEEL +5 -0
  19. odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,108 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
5
+ ================================
6
+ Timesheet - Autofill project off
7
+ ================================
8
+
9
+ ..
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ !! This file is generated by oca-gen-addon-readme !!
12
+ !! changes will be overwritten. !!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !! source digest: sha256:cd6f15e674add7f2818e33dd9c805030abf8b2b43b3c847d47562dda1ce027c1
15
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
+
17
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18
+ :target: https://odoo-community.org/page/development-status
19
+ :alt: Beta
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22
+ :alt: License: AGPL-3
23
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
24
+ :target: https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off
25
+ :alt: OCA/timesheet
26
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27
+ :target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_autofill_project_off
28
+ :alt: Translate me on Weblate
29
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=17.0
31
+ :alt: Try me on Runboat
32
+
33
+ |badge1| |badge2| |badge3| |badge4| |badge5|
34
+
35
+ Disables automatic filling of the project field based on previous
36
+ entries on timesheets.
37
+
38
+ **Table of contents**
39
+
40
+ .. contents::
41
+ :local:
42
+
43
+ Usage
44
+ =====
45
+
46
+ The feature provided by this module is enabled automatically after
47
+ installation, with no further steps required.
48
+
49
+ By default, when adding a new line in a timesheet, the system will
50
+ autofill the Project field if the same project was selected in the last
51
+ five entries, as shown below:
52
+
53
+ |Project autofill enabled|
54
+
55
+ With this module installed, this behaviour is disabled and the Project
56
+ field must be selected manually each time, regardless of previous
57
+ selections, as shown below:
58
+
59
+ |Project autofill disabled|
60
+
61
+ .. |Project autofill enabled| image:: https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/01_project_autofill_without_addon.png
62
+ .. |Project autofill disabled| image:: https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/02_no_project_autofill_with_addon.png
63
+
64
+ Bug Tracker
65
+ ===========
66
+
67
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
68
+ In case of trouble, please check there if your issue has already been reported.
69
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
70
+ `feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_autofill_project_off%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
71
+
72
+ Do not contact contributors directly about support or help with technical issues.
73
+
74
+ Credits
75
+ =======
76
+
77
+ Authors
78
+ -------
79
+
80
+ * Innovara
81
+
82
+ Contributors
83
+ ------------
84
+
85
+ - `Innovara <https://innovara.tech>`__:
86
+
87
+ - Manuel Fombuena <mfombuena@innovara.tech>
88
+
89
+ - `Solvos <https://www.solvos.es>`__:
90
+
91
+ - David Alonso
92
+
93
+ Maintainers
94
+ -----------
95
+
96
+ This module is maintained by the OCA.
97
+
98
+ .. image:: https://odoo-community.org/logo.png
99
+ :alt: Odoo Community Association
100
+ :target: https://odoo-community.org
101
+
102
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
103
+ mission is to support the collaborative development of Odoo features and
104
+ promote its widespread use.
105
+
106
+ This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off>`_ project on GitHub.
107
+
108
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,3 @@
1
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
2
+
3
+ from . import models
@@ -0,0 +1,14 @@
1
+ # Copyright 2025 Innovara Ltd - Manuel Fombuena
2
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3
+
4
+ {
5
+ "name": "Timesheet - Autofill project off",
6
+ "version": "17.0.1.0.0",
7
+ "author": "Innovara, Odoo Community Association (OCA)",
8
+ "license": "AGPL-3",
9
+ "category": "Human Resources",
10
+ "depends": ["hr_timesheet"],
11
+ "website": "https://github.com/OCA/timesheet",
12
+ "installable": True,
13
+ "auto_install": False,
14
+ }
@@ -0,0 +1,19 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * hr_timesheet_autofill_project_off
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 17.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #. module: hr_timesheet_autofill_project_off
17
+ #: model:ir.model,name:hr_timesheet_autofill_project_off.model_account_analytic_line
18
+ msgid "Analytic Line"
19
+ msgstr ""
@@ -0,0 +1,3 @@
1
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
2
+
3
+ from . import hr_timesheet
@@ -0,0 +1,24 @@
1
+ # Copyright 2025 Innovara Ltd - Manuel Fombuena
2
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3
+
4
+ import logging
5
+
6
+ from odoo import api, models
7
+
8
+ _logger = logging.getLogger(__name__)
9
+
10
+
11
+ class AccountAnalyticLine(models.Model):
12
+ _inherit = "account.analytic.line"
13
+
14
+ @api.model
15
+ def default_get(self, field_list):
16
+ result = super().default_get(field_list)
17
+ if (
18
+ not self._context.get("default_project_id")
19
+ and self._context.get("is_timesheet")
20
+ and result.get("project_id", False)
21
+ ):
22
+ result["project_id"] = False
23
+ _logger.debug("project_id set to False")
24
+ return result
@@ -0,0 +1,5 @@
1
+ - [Innovara](https://innovara.tech):
2
+ - Manuel Fombuena \<mfombuena@innovara.tech\>
3
+
4
+ - [Solvos](https://www.solvos.es):
5
+ - David Alonso
@@ -0,0 +1 @@
1
+ Disables automatic filling of the project field based on previous entries on timesheets.
@@ -0,0 +1,9 @@
1
+ The feature provided by this module is enabled automatically after installation, with no further steps required.
2
+
3
+ By default, when adding a new line in a timesheet, the system will autofill the Project field if the same project was selected in the last five entries, as shown below:
4
+
5
+ ![Project autofill enabled](../static/img/01_project_autofill_without_addon.png)
6
+
7
+ With this module installed, this behaviour is disabled and the Project field must be selected manually each time, regardless of previous selections, as shown below:
8
+
9
+ ![Project autofill disabled](../static/img/02_no_project_autofill_with_addon.png)
@@ -0,0 +1,451 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>README.rst</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: gray; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic, pre.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document">
364
+
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="timesheet-autofill-project-off">
370
+ <h1>Timesheet - Autofill project off</h1>
371
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
+ !! This file is generated by oca-gen-addon-readme !!
373
+ !! changes will be overwritten. !!
374
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
+ !! source digest: sha256:cd6f15e674add7f2818e33dd9c805030abf8b2b43b3c847d47562dda1ce027c1
376
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_autofill_project_off"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/timesheet&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
+ <p>Disables automatic filling of the project field based on previous
379
+ entries on timesheets.</p>
380
+ <p><strong>Table of contents</strong></p>
381
+ <div class="contents local topic" id="contents">
382
+ <ul class="simple">
383
+ <li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
384
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
385
+ <li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
386
+ <li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
387
+ <li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
388
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
389
+ </ul>
390
+ </li>
391
+ </ul>
392
+ </div>
393
+ <div class="section" id="usage">
394
+ <h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
395
+ <p>The feature provided by this module is enabled automatically after
396
+ installation, with no further steps required.</p>
397
+ <p>By default, when adding a new line in a timesheet, the system will
398
+ autofill the Project field if the same project was selected in the last
399
+ five entries, as shown below:</p>
400
+ <p><img alt="Project autofill enabled" src="https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/01_project_autofill_without_addon.png" /></p>
401
+ <p>With this module installed, this behaviour is disabled and the Project
402
+ field must be selected manually each time, regardless of previous
403
+ selections, as shown below:</p>
404
+ <p><img alt="Project autofill disabled" src="https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/02_no_project_autofill_with_addon.png" /></p>
405
+ </div>
406
+ <div class="section" id="bug-tracker">
407
+ <h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
408
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/issues">GitHub Issues</a>.
409
+ In case of trouble, please check there if your issue has already been reported.
410
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
411
+ <a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_autofill_project_off%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
412
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
413
+ </div>
414
+ <div class="section" id="credits">
415
+ <h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
416
+ <div class="section" id="authors">
417
+ <h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
418
+ <ul class="simple">
419
+ <li>Innovara</li>
420
+ </ul>
421
+ </div>
422
+ <div class="section" id="contributors">
423
+ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
424
+ <ul class="simple">
425
+ <li><a class="reference external" href="https://innovara.tech">Innovara</a>:<ul>
426
+ <li>Manuel Fombuena &lt;<a class="reference external" href="mailto:mfombuena&#64;innovara.tech">mfombuena&#64;innovara.tech</a>&gt;</li>
427
+ </ul>
428
+ </li>
429
+ <li><a class="reference external" href="https://www.solvos.es">Solvos</a>:<ul>
430
+ <li>David Alonso</li>
431
+ </ul>
432
+ </li>
433
+ </ul>
434
+ </div>
435
+ <div class="section" id="maintainers">
436
+ <h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
437
+ <p>This module is maintained by the OCA.</p>
438
+ <a class="reference external image-reference" href="https://odoo-community.org">
439
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
440
+ </a>
441
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
442
+ mission is to support the collaborative development of Odoo features and
443
+ promote its widespread use.</p>
444
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off">OCA/timesheet</a> project on GitHub.</p>
445
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
446
+ </div>
447
+ </div>
448
+ </div>
449
+ </div>
450
+ </body>
451
+ </html>
@@ -0,0 +1,3 @@
1
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
2
+
3
+ from . import test_account_analytic_line_default_get
@@ -0,0 +1,37 @@
1
+ # Copyright 2025 Innovara Ltd - Manuel Fombuena
2
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3
+ from unittest.mock import patch
4
+
5
+ from odoo.tests.common import TransactionCase
6
+
7
+
8
+ class TestAccountAnalyticLineDefaultGet(TransactionCase):
9
+ @patch(
10
+ "odoo.addons.account.models.account_analytic_line.AccountAnalyticLine.default_get"
11
+ )
12
+ def test_project_id_removed_when_is_timesheet_without_default_project(
13
+ self, mock_parent_default_get
14
+ ):
15
+ mock_parent_default_get.return_value = {"project_id": 123}
16
+
17
+ context = {
18
+ "is_timesheet": True,
19
+ }
20
+
21
+ aal_model = self.env["account.analytic.line"].with_context(**context)
22
+ result = aal_model.default_get(["project_id"])
23
+
24
+ mock_parent_default_get.assert_called_once_with(["project_id"])
25
+
26
+ self.assertFalse(result.get("project_id"))
27
+
28
+ def test_project_id_preserved_with_default_project_id_in_context(self):
29
+ context = {
30
+ "is_timesheet": True,
31
+ "default_project_id": 1,
32
+ }
33
+
34
+ aal_model = self.env["account.analytic.line"].with_context(**context)
35
+ result = aal_model.default_get(["project_id"])
36
+
37
+ self.assertIn("project_id", result)
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo-addon-hr_timesheet_autofill_project_off
3
+ Version: 17.0.1.0.0.2
4
+ Requires-Python: >=3.10
5
+ Requires-Dist: odoo>=17.0a,<17.1dev
6
+ Summary: Timesheet - Autofill project off
7
+ Home-page: https://github.com/OCA/timesheet
8
+ License: AGPL-3
9
+ Author: Innovara, Odoo Community Association (OCA)
10
+ Author-email: support@odoo-community.org
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Framework :: Odoo
13
+ Classifier: Framework :: Odoo :: 17.0
14
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
15
+ Description-Content-Type: text/x-rst
16
+
17
+ .. image:: https://odoo-community.org/readme-banner-image
18
+ :target: https://odoo-community.org/get-involved?utm_source=readme
19
+ :alt: Odoo Community Association
20
+
21
+ ================================
22
+ Timesheet - Autofill project off
23
+ ================================
24
+
25
+ ..
26
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
+ !! This file is generated by oca-gen-addon-readme !!
28
+ !! changes will be overwritten. !!
29
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
+ !! source digest: sha256:cd6f15e674add7f2818e33dd9c805030abf8b2b43b3c847d47562dda1ce027c1
31
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
+
33
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
34
+ :target: https://odoo-community.org/page/development-status
35
+ :alt: Beta
36
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
37
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
38
+ :alt: License: AGPL-3
39
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
40
+ :target: https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off
41
+ :alt: OCA/timesheet
42
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
43
+ :target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_autofill_project_off
44
+ :alt: Translate me on Weblate
45
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
46
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=17.0
47
+ :alt: Try me on Runboat
48
+
49
+ |badge1| |badge2| |badge3| |badge4| |badge5|
50
+
51
+ Disables automatic filling of the project field based on previous
52
+ entries on timesheets.
53
+
54
+ **Table of contents**
55
+
56
+ .. contents::
57
+ :local:
58
+
59
+ Usage
60
+ =====
61
+
62
+ The feature provided by this module is enabled automatically after
63
+ installation, with no further steps required.
64
+
65
+ By default, when adding a new line in a timesheet, the system will
66
+ autofill the Project field if the same project was selected in the last
67
+ five entries, as shown below:
68
+
69
+ |Project autofill enabled|
70
+
71
+ With this module installed, this behaviour is disabled and the Project
72
+ field must be selected manually each time, regardless of previous
73
+ selections, as shown below:
74
+
75
+ |Project autofill disabled|
76
+
77
+ .. |Project autofill enabled| image:: https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/01_project_autofill_without_addon.png
78
+ .. |Project autofill disabled| image:: https://raw.githubusercontent.com/OCA/timesheet/17.0/hr_timesheet_autofill_project_off/static/img/02_no_project_autofill_with_addon.png
79
+
80
+ Bug Tracker
81
+ ===========
82
+
83
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
84
+ In case of trouble, please check there if your issue has already been reported.
85
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
86
+ `feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_autofill_project_off%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
87
+
88
+ Do not contact contributors directly about support or help with technical issues.
89
+
90
+ Credits
91
+ =======
92
+
93
+ Authors
94
+ -------
95
+
96
+ * Innovara
97
+
98
+ Contributors
99
+ ------------
100
+
101
+ - `Innovara <https://innovara.tech>`__:
102
+
103
+ - Manuel Fombuena <mfombuena@innovara.tech>
104
+
105
+ - `Solvos <https://www.solvos.es>`__:
106
+
107
+ - David Alonso
108
+
109
+ Maintainers
110
+ -----------
111
+
112
+ This module is maintained by the OCA.
113
+
114
+ .. image:: https://odoo-community.org/logo.png
115
+ :alt: Odoo Community Association
116
+ :target: https://odoo-community.org
117
+
118
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
119
+ mission is to support the collaborative development of Odoo features and
120
+ promote its widespread use.
121
+
122
+ This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_autofill_project_off>`_ project on GitHub.
123
+
124
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,19 @@
1
+ odoo/addons/hr_timesheet_autofill_project_off/README.rst,sha256=s9vgT2lSZ5uUGQmY8lh4rP15W5suoNpo0ZHL_8TVB74,4071
2
+ odoo/addons/hr_timesheet_autofill_project_off/__init__.py,sha256=nGN_WM7n8r6bQC4oJhP4N2IAYaislr5pRn8rlpVM3po,87
3
+ odoo/addons/hr_timesheet_autofill_project_off/__manifest__.py,sha256=f21H1DizpgLgu9cozE_NHmw2W_VS6XaIRUpHk8OVUe8,451
4
+ odoo/addons/hr_timesheet_autofill_project_off/i18n/hr_timesheet_autofill_project_off.pot,sha256=UbgEv6oT6vu8rhH73KwqoHsfb6rE_tJYuWjcOQ5W3z0,543
5
+ odoo/addons/hr_timesheet_autofill_project_off/models/__init__.py,sha256=8BknaVGBQpXJHAvub37_aD5rWK0qtVSL7LV8TN_A3b4,93
6
+ odoo/addons/hr_timesheet_autofill_project_off/models/hr_timesheet.py,sha256=c66hQMjvAYaX7yDo5_YiZ1QzGekyHwrmNddqPEGPEVU,678
7
+ odoo/addons/hr_timesheet_autofill_project_off/readme/CONTRIBUTORS.md,sha256=B9Sgka7nEQGn_odtBYKnCKEpGUGK0hkIBkIGqmk7wl8,138
8
+ odoo/addons/hr_timesheet_autofill_project_off/readme/DESCRIPTION.md,sha256=BiBtEz45h0hFl1tOhVXpMY8AaL3zBCchQVNjur77hO0,89
9
+ odoo/addons/hr_timesheet_autofill_project_off/readme/USAGE.md,sha256=IqNYHmRmEx3f-L-KStCXUYjIrUUwvIiiRRWvkZ_dfF4,614
10
+ odoo/addons/hr_timesheet_autofill_project_off/static/description/icon.png,sha256=CgnOEZCwoe6f1vlLwkqFVfc2q_uwBMU0UnXN8j6X5ag,10254
11
+ odoo/addons/hr_timesheet_autofill_project_off/static/description/index.html,sha256=GuHTQ5laoohDlQioKZemm5z8OApdWPfPzm1DMY5rQdg,13685
12
+ odoo/addons/hr_timesheet_autofill_project_off/static/img/01_project_autofill_without_addon.png,sha256=Zkdek1zbf1sWoZFR17bajDU2vVRCcA8602x9Ilj7Ud0,49831
13
+ odoo/addons/hr_timesheet_autofill_project_off/static/img/02_no_project_autofill_with_addon.png,sha256=dYeT_epnLbC7xjDuG0pHdOspO9iBQnj94v1B3Spf6w0,51523
14
+ odoo/addons/hr_timesheet_autofill_project_off/tests/__init__.py,sha256=HMgAxA5nlI9evVvWqlFgRQxFun9Cj8nwUISK9aVU4fM,119
15
+ odoo/addons/hr_timesheet_autofill_project_off/tests/test_account_analytic_line_default_get.py,sha256=XSCj57_oRZTFLg5Mx4DNfiwNXojkLr9UEMhBetgar7g,1229
16
+ odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/METADATA,sha256=oXazmGN4gLx1rMtp_lbXKO_sgwS7WEdLhB40hJsV-eM,4645
17
+ odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
18
+ odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
19
+ odoo_addon_hr_timesheet_autofill_project_off-17.0.1.0.0.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: Whool 1.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+