-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] hr_timesheet_sheet #580
Merged
Merged
Changes from 1 commit
Commits
Show all changes
186 commits
Select commit
Hold shift + click to select a range
4cf5b13
[11.0][MIG] hr_timesheet_sheet (#125)
MiquelRForgeFlow a8c29a6
[UPD] Update hr_timesheet_sheet.pot
oca-travis 875586c
Translated using Weblate (Japanese)
yostashiro db37c87
Translated using Weblate (Português (Brasil))
030713a
[11.0][hr_timesheet_sheet]: allow to display more than 40 cells
JordiBForgeFlow bbc5e6e
hr_timesheet_sheet: add menu 'Timesheet Sheets to Approve'
JordiBForgeFlow bbbb619
[UPD] Update hr_timesheet_sheet.pot
oca-travis 2b1f974
hr_timesheet_sheet: pass selected project context to task creation
JordiBForgeFlow cc761b3
[11.0][IMP] hr_timesheet_sheet: ease extensions (#131)
astirpe d409b47
[UPD] Update hr_timesheet_sheet.pot
oca-travis df9f2ab
Fix task domain and default project_id
astirpe d42b253
Bump version
astirpe 3b6162a
[IMP] hr_timesheet_sheet ux
astirpe aa62875
Code review
astirpe 83ed77a
Update contributors list
astirpe bad25e6
[UPD] Update hr_timesheet_sheet.pot
oca-travis 99e70a6
[FIX] hr_timesheet_sheet: "Refuse" button name (#134)
astirpe dff92d5
[UPD] Update hr_timesheet_sheet.pot
oca-travis 02a68b2
[11.0][IMP] hr_timesheet_sheet: merge hr_timesheet_sheet_week_start_d…
LoisRForgeFlow 2dce546
[UPD] Update hr_timesheet_sheet.pot
oca-travis b5b8aff
restrict selection of projects to those that have 'allow_timsheets' set
JordiBForgeFlow 217a949
[MIG] hr_timesheet_sheet: Migration to 12.0
alexey-pelykh 87e571d
Update translation files
oca-transbot 0ea7066
[FIX] hr_timesheet_sheet: Don't fail tests on Sunday
pedrobaeza fac1fb9
[IMP] hr_timesheet_sheet: more extendability & cleanup
alexey-pelykh 76de449
[FIX] Fix related fields in hr_timesheet_sheet
AdriaGForgeFlow 0f16d67
[FIX] hr_timesheet_sheet: who approves timesheets should be the manager
MiquelRForgeFlow fd74521
[FIX]hr_timesheet_sheet : fix singleton error in _compute_line_ids
bizzappdev fd9adcc
Update translation files
oca-transbot f7c0e03
[FIX] timesheet sheet lines inconsistency
astirpe e192bac
[FIX] hr_timesheet_sheet: unlink only generated AAL
alexey-pelykh 281000a
[IMP] hr_timesheet_sheet: texts & formatting
alexey-pelykh dd0a924
[FIX] hr_timesheet_sheet: sheet_id when modifying the timesheet
astirpe 7fd8d35
[IMP] hr_timesheet_sheet: protect specific list of fields
alexey-pelykh 1926d96
Update translation files
oca-transbot ed3cedf
[FIX] Avoid cleaning when set to draft
MiquelRForgeFlow 61e703a
[IMP] Make a constant for the '/' name for empty lines
MiquelRForgeFlow 3ae7af3
[FIX] Correctly handle partial amounts of timesheets
MiquelRForgeFlow 9f9b7e0
[IMP] Rename method / parameters to a better descriptive name
MiquelRForgeFlow 7d98269
hr_timesheet_sheet: version bump
alexey-pelykh f8def33
[FIX] Wrong decorator
astirpe 840e1f1
Update translation files
oca-transbot 65ccb49
Translated using Weblate (Dutch)
50ae27e
[IMP] hr_timesheet_sheet: fix amount calculation issues + code simpli…
astirpe 95777c9
[FIX] Add lines of other employees
astirpe b46ed7e
[FIX] hr_timesheet_sheet: sheet name
alexey-pelykh 04df259
[12.0][FIX] hr_timesheet_sheet: subscribe user when confirm (#227)
astirpe 3af2b6b
[FIX] Allow timesheet sheet when employee's company is not set
astirpe 1f7c35e
[UPD] Update hr_timesheet_sheet.pot
oca-travis 7c2e9f1
[ADD] Constraint company_id in timesheet sheet line
astirpe 059d3ee
[ADD] company_id in blacklist of timesheet sheet line
astirpe 19aa080
[REM] Obsolete constraint
astirpe 701943d
[FIX] Consistency of company on projects and employees
astirpe 1d5db46
[IMP] hr_timesheet_sheet: Clearer interface
tarteo 6a67147
[FIX] hr_timesheet_sheet: tests
alexey-pelykh fccf198
[UPD] README.rst
OCA-git-bot c06cce4
[FIX] hr_timesheet_sheet: consistency with v11
alexey-pelykh c6d8782
[FIX]hr_timesheet_sheet : unit amount will display in formate hr:minute
bizzappdev f278137
[FIX] Don't create analytic lines in onchange
MiquelRForgeFlow 854eeea
[FIX] Tests
MiquelRForgeFlow 51c3633
Update translation files
oca-transbot 2f7bc61
[IMP] hr_timesheet_sheet: more hooks
alexey-pelykh 8e4f4a5
Translated using Weblate (German)
marylla fe67a44
Update translation files
oca-transbot 00d4e13
Translated using Weblate (German)
marylla f3f0f1f
[FIX] Expected singleton
astirpe ae8a256
[12.0][FIX] Do not remove lines when removing the timesheet sheet
astirpe 75a276c
Translated using Weblate (German)
marylla 39379a0
Translated using Weblate (Portuguese (Brazil))
britoederr fadcd44
Update translation files
oca-transbot 08b2190
[IMP] hr_timesheet_sheet: review policy
alexey-pelykh 3efa49d
Update translation files
oca-transbot 5c0edda
[FIX] hr_timesheet_sheet: remove non-existent models
alexey-pelykh 2fd2075
Update translation files
oca-transbot 6945aff
[IMP] hr_timesheet_sheet: error details
alexey-pelykh 3488b73
Update translation files
oca-transbot 3c9dcdf
[ADD] hr_timesheet_sheet: policies
alexey-pelykh 7788fdb
Update translation files
oca-transbot 1259b2f
Translated using Weblate (Spanish)
chienandalu b47d531
Translated using Weblate (Italian)
primes2h 439def9
Translated using Weblate (German)
marylla 52587dc
[IMP] hr_timesheet_sheet: allow employee to review own non-submitted …
alexey-pelykh 7d99c46
Translated using Weblate (German)
marylla a88af34
[FIX] hr_timesheet_sheet_policy*: admin always reviewer
astirpe 5463dc5
Update translation files
oca-transbot 31b9607
[FIX] hr_timesheet_sheet: don't store possible_reviewer_ids
alexey-pelykh 82c6bfa
Update translation files
oca-transbot aaef9d9
[FIX] Clean/merge timesheets when in draft only
astirpe 53d9282
Update translation files
oca-transbot 3eb088f
[FIX] hr_timesheet_sheet: same week in different years is still same
alexey-pelykh f680acc
Update translation files
oca-transbot 03bf451
[FIX] hr_timesheet_sheet: use unique IDs in line generation
alexey-pelykh 8a29b84
Update translation files
oca-transbot 1cd38a3
Translated using Weblate (Spanish)
pedrobaeza e6f0e4c
[IMP] hr_timesheet_sheet: hooks
alexey-pelykh bae1d84
[IMP] hr_timesheet_sheet: add id to allow modules add options
alexey-pelykh 4e0b18c
hr_timesheet_sheet: fix FR translation that trigger a crash
alexis-via 388d15e
[IMP] hr_timesheet_sheet: add kanban view
alexey-pelykh 7f47876
Translated using Weblate (Italian)
b5ebe10
Update translation files
oca-transbot ac6eb9a
[IMP] hr_timesheet_sheet: _get_subscribers hook
alexey-pelykh 6013cb2
[FIX] hr_timesheet_sheet: lost kanban mode
alexey-pelykh b7c91b5
Translated using Weblate (Dutch)
97e7559
[FIX] hr_timesheet_sheet: drop fuzzy+python-format translations
alexey-pelykh e406a00
[IMP] : black, isort
468ab9f
[MIG] hr_timesheet_sheet: Migration to 13.0
1bee737
[IMP] hr_timesheet_sheet: black, isort, prettier
MiquelRForgeFlow 398927e
[MIG] hr_timesheet_sheet: Migration to 13.0 (complete)
MiquelRForgeFlow 2f66430
[UPD] Update hr_timesheet_sheet.pot
oca-travis c5d4a71
[UPD] README.rst
OCA-git-bot 37a4918
Update translation files
oca-transbot 48a0083
[FIX] hr_timesheet_sheet: openupgrade
alexey-pelykh 3647a46
[FIX] failing tests, linting
9686345
hr_timesheet_sheet 13.0.1.0.1
OCA-git-bot 675ecdf
Update translation files
oca-transbot 0fab22f
[UPD] Update hr_timesheet_sheet.pot
oca-travis 1a295d4
Update translation files
oca-transbot 8122806
Translated using Weblate (French)
pedrobaeza 1de8ef9
[FIX] hr_timesheet_sheet WARNING DB odoo.osv.expression: The domain …
vishalaktiv c494b00
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh 3310f04
[UPD] README.rst
OCA-git-bot 326c690
[FIX] hr_timesheet_sheet: Add review policies for other groups
pedrobaeza 58d5597
[UPD] Update hr_timesheet_sheet.pot
oca-travis e790602
hr_timesheet_sheet 13.0.1.1.0
OCA-git-bot 50fae99
Update translation files
oca-transbot 1a052a9
[UPD] Update hr_timesheet_sheet.pot
oca-travis a6716d1
[FIX] Typo
ypapouin 0362197
[UPD] Update hr_timesheet_sheet.pot
oca-travis ad88ad0
hr_timesheet_sheet 13.0.1.1.1
OCA-git-bot 7eafaea
Update translation files
oca-transbot fd4d68d
Translated using Weblate (Dutch)
tarteo 448ef13
[IMP] hr_timesheet_sheet: black, isort, prettier
schhatbar-initos d5e084e
[14.0][MIG]hr_timesheet_sheet
schhatbar-initos b731a52
[UPD] Update hr_timesheet_sheet.pot
oca-travis 42b4ad6
[UPD] README.rst
OCA-git-bot db3c1ac
Added translation using Weblate (French (France))
Yvesldff 3264c61
Translated using Weblate (French (France))
Yvesldff 2f886c7
Translated using Weblate (French (France))
Yvesldff d9189d6
Translated using Weblate (German)
OSevangelist a16b570
Translated using Weblate (French)
Yvesldff 46d0a5c
[UPD] Update hr_timesheet_sheet.pot
oca-travis da00b86
Update translation files
oca-transbot fd0c808
[14.0] [FIX] hr_timesheet_sheet Week %s translation
innovara 9dcca1b
hr_timesheet_sheet 14.0.1.0.1
OCA-git-bot e85f3bd
[UPD] Update hr_timesheet_sheet.pot
oca-travis 7d0a8ef
Update translation files
oca-transbot 4e4efab
[IMP] hr_timesheet_sheet: Screenshot added for quick understanding
tarbib 61cdf8c
[UPD] README.rst
OCA-git-bot acad622
hr_timesheet_sheet 14.0.1.0.2
OCA-git-bot 356b3dc
Translated using Weblate (Swedish)
simonstromb 4fc81d7
Translated using Weblate (Swedish)
simonstromb 3b64030
Translated using Weblate (Swedish)
simonstromb ef6c088
Translated using Weblate (Swedish)
simonstromb 302d86f
Translated using Weblate (Swedish)
simonstromb f07bd2d
Translated using Weblate (Swedish)
simonstromb 55224ac
Translated using Weblate (Dutch)
bosd cfd37ad
Translated using Weblate (Dutch)
bosd cd15a39
Do not merge invoiced timesheet lines
400562b
Do not try to remove invoiced lines
404043a
hr_timesheet_sheet 14.0.1.0.3
OCA-git-bot ae08c89
hr_timesheet_sheet 14.0.1.0.4
OCA-git-bot 0e7e5c2
[IMP] update dotfiles [ci skip]
OCA-git-bot 5643a9b
[FIX] hr_timesheet_sheet: Add sale_timesheet dependency (timesheet_in…
victoralmau b2ced21
hr_timesheet_sheet 14.0.1.1.0
OCA-git-bot a6543fa
[IMP] hr_timesheet_sheet: black, isort, prettier
CRogos 3095f86
[MIG] hr_timesheet_sheet: Migration to 15.0
CRogos 473ff8b
Fix python-format translation issues.
6249ec6
[UPD] Update hr_timesheet_sheet.pot
8b56ded
[UPD] README.rst
OCA-git-bot a615a05
Translated using Weblate (French)
vincent-hatakeyama 20823b7
Translated using Weblate (Portuguese (Brazil))
douglascstd 6cfb6c5
[UPD] Update hr_timesheet_sheet.pot
ecab8ec
Update translation files
weblate 272af2a
Translated using Weblate (Italian)
mymage 00631ad
Translated using Weblate (Italian)
mymage 50e47b2
Translated using Weblate (Italian)
francesco-ooops d04f6b3
Translated using Weblate (Italian)
mymage 47bf54b
[IMP] hr_timesheet_sheet: timesheet_sheet_ids on hr.employee
carmenbianca 1a458e5
[UPD] Update hr_timesheet_sheet.pot
29f19a1
hr_timesheet_sheet 15.0.1.1.0
OCA-git-bot bc8b34a
Update translation files
weblate 6072971
[IMP] hr_timesheet_sheet: pre-commit stuff
tarteo 17ef581
[MIG] hr_timesheet_sheet: Migration to 16.0
tarteo 9403521
[DON'T MERGE] test-requirements.txt
tarteo b5f6372
Fix for https://github.com/odoo/odoo/pull/120597
tarteo 7041df0
remove test dependency
tarteo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,15 +149,22 @@ def _default_department_id(self): | |
add_line_project_id = fields.Many2one( | ||
comodel_name="project.project", | ||
string="Select Project", | ||
domain="[('company_id', '=', company_id), ('allow_timesheets', '=', True)]", | ||
help="If selected, the associated project is added " | ||
"to the timesheet sheet when clicked the button.", | ||
) | ||
add_line_task_id = fields.Many2one( | ||
comodel_name="project.task", | ||
string="Select Task", | ||
domain="[('id', 'in', available_task_ids)]", | ||
help="If selected, the associated task is added " | ||
"to the timesheet sheet when clicked the button.", | ||
) | ||
available_task_ids = fields.Many2many( | ||
comodel_name="project.task", | ||
string="Available Tasks", | ||
compute="_compute_available_task_ids", | ||
) | ||
total_time = fields.Float(compute="_compute_total_time", store=True) | ||
can_review = fields.Boolean( | ||
compute="_compute_can_review", search="_search_can_review" | ||
|
@@ -443,25 +450,26 @@ def _onchange_dates(self): | |
def _onchange_timesheets(self): | ||
self._compute_line_ids() | ||
|
||
@api.onchange("add_line_project_id") | ||
def onchange_add_project_id(self): | ||
"""Load the project to the timesheet sheet""" | ||
if self.add_line_project_id: | ||
return { | ||
"domain": { | ||
"add_line_task_id": [ | ||
("project_id", "=", self.add_line_project_id.id), | ||
("company_id", "=", self.company_id.id), | ||
("id", "not in", self.timesheet_ids.mapped("task_id").ids), | ||
@api.depends( | ||
"add_line_project_id", "company_id", "timesheet_ids", "timesheet_ids.task_id" | ||
) | ||
def _compute_available_task_ids(self): | ||
project_task_obj = self.env["project.task"] | ||
for rec in self: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some nitpick only if you want. instead of |
||
if rec.add_line_project_id: | ||
rec.available_task_ids = project_task_obj.search( | ||
[ | ||
("project_id", "=", rec.add_line_project_id.id), | ||
("company_id", "=", rec.company_id.id), | ||
("id", "not in", rec.timesheet_ids.mapped("task_id").ids), | ||
] | ||
} | ||
} | ||
else: | ||
return {"domain": {"add_line_task_id": [("id", "=", False)]}} | ||
).ids | ||
else: | ||
rec.available_task_ids = [] | ||
|
||
@api.model | ||
def _check_employee_user_link(self, vals): | ||
if "employee_id" in vals: | ||
if vals.get("employee_id"): | ||
employee = self.env["hr.employee"].sudo().browse(vals["employee_id"]) | ||
if not employee.user_id: | ||
raise UserError( | ||
|
@@ -479,10 +487,11 @@ def copy(self, default=None): | |
raise UserError(_("You cannot duplicate a sheet.")) | ||
return super().copy(default=default) | ||
|
||
@api.model | ||
def create(self, vals): | ||
self._check_employee_user_link(vals) | ||
res = super().create(vals) | ||
@api.model_create_multi | ||
def create(self, vals_list): | ||
for vals in vals_list: | ||
self._check_employee_user_link(vals) | ||
res = super().create(vals_list) | ||
res.write({"state": "draft"}) | ||
return res | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
This module relies on: | ||
|
||
* The OCA module '2D matrix for x2many fields', and can be downloaded from | ||
Github: https://github.com/OCA/web/tree/11.0/web_widget_x2many_2d_matrix | ||
Github: https://github.com/OCA/web/tree/16.0/web_widget_x2many_2d_matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean, it is working from the
web_widget_x2many_2d_matrix
itself which was customized in those js and scssThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this didn't worked in 15.0 either btw.