- May 17, 2023
-
-
Florian Bieringer authored
closes odoo/odoo#120501 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Apr 12, 2023
-
-
Thomas Lefebvre (thle) authored
Issue: When a project is shared with portal users, only timesheets that are linked to tasks will be displayed. Solution: Change the domain that selects the timesheets to be displayed to take into account timesheets that are not linked to a task, but are in a project to which the portal user has access. opw-3253632 closes odoo/odoo#118329 Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>
-
- Mar 30, 2023
-
-
Victor Piryns (pivi) authored
Current behaviour: When creating a timesheet, if in the vals passed the AAL doesn't have a company (possible since it's not required), then the `uom` of the timesheet is False, which doesn't make sense. Expected behaviour: The timesheet `uom` should fallback on the uom of the company of the project. Steps to reproduce: - Install hr_timesheet, Accounting - Activate the AAL in the settings - Create a project with an AAL - Remove the company on the AAL of the project - In that project create a task and log some timesheet. - `uom` field should be empty Reason for the problem: When setting the `product_uom_id` in the vals when creating/writing a timesheet, we just take the `project_time_mode_id` on the company linked to the AAL. The problem is that the company on an AAL is not a required field, so it can be `False`, leading the setting the val for `product_uom_id` to `False`. Fix: In case the AAL has no company, we get the `uom` from the company linked to the project. Affected versions: - 14.0 - 15.0 - saas-15.2 - 16.0 - saas-16.1 - saas-16.2 - master opw-3245671 closes odoo/odoo#117012 Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>
-
- Oct 11, 2022
-
-
Kartik Chavda authored
Currently, if the employee is not linked with the user, then the current user is set in the timesheet.Now it will be fixed. Steps to reproduce: 1. Install hr_timesheet 2. Go To Employee 3. Create employee 4. Open the timesheets (Click on the 'Timesheets' stat button) 5. Create the timesheet 6. Check the user Task-2924292 closes odoo/odoo#96318 Signed-off-by:
Laurent Stukkens (ltu) <ltu@odoo.com>
-
- Aug 29, 2022
-
-
Jinjiu Liu authored
Reproduction: 1. Install Timesheet, and Project, check the timesheet box in the setting of Project 2. Go to Setting->manage users, set access right for Marc Demo, Project as “User”, Timesheets as “See own timesheets”, and Helpdesk as “User” 3. Go to Project, create a task and assign it to Marc Demo, go to the timesheet tab, set Initially Planned Hours as 20 hours, click save 4. Open an incognito page and log in as Marc Demo, go to this new task-> timesheet, edit, log 5 hours, save. Hour spent is now 5 5. Switch back to Mitchell Admin, refresh the task page, edit, log 3 hours, save. Hour spent is now 8. 6. Switch to the incognito page of Marc Demo, edit, log 2 hours and save Hour spent is now 7, which doesn’t consider the hours logged by Mitchell The right result should be 10 hours. 7. Switch back as Mitchell Demo, the spent hours are also wrong Reason: The cause is that effective_hours is a stored computed field. When Marc Demo logs hours after Mithcell Admin, the hours from Mitchell do not show for Marc Demo. Marc Demo cannot get the hours from other users because he can only see his own timesheet. Thus the computation is wrong and because it’s a stored computed field, it won’t change even after switching back to Mitchell Admin Fix: Use read_group to get the grouped by value of the amount spent on the task. This makes sure that the value of Hours spent is correctly computed after saving. It also allows the onchange to take the change made by the user into account before saving. opw-2909444 closes odoo/odoo#97241 Signed-off-by:
Laurent Stukkens (ltu) <ltu@odoo.com>
-
mafo-odoo authored
Steps to reproduce: - Install timesheet - Archive an employee - Create a timesheet Current behavior: You can select the archived employee Expected behavior: You can not select the archived employee Explanation: In commit 17b2b07e76121ebb0be16637bf4082e457c2ac63 the employee_id field of the timesheet was set to have context active_test to false. To fix this issue we reset the context for this field in every timesheet form and we add user errors if the employee is not active while the timesheet is created or edited. backport of odoo/odoo#94308 opw-2887727 opw-2870739 closes odoo/odoo#97760 Related: odoo/enterprise#30271 Signed-off-by:
Nasreddin Boulif (bon) <bon@odoo.com>
-
Audric Onockx (auon) authored
Steps : Install project and employee. Create 3 company and an employee for you user in 2 of them. Switch to the one without employee. Create a new project and task. Register a timesheet. Issue : The timesheet has no employee. Fix : Display start button and set an employee on the ts only if user has an employee in the company or has only one employee for all companies. backport of odoo/odoo#85780 opw-2745733 Part-of: odoo/odoo#97760
-
Audric Onockx (auon) authored
Steps : Archive your employee, go to your timesheets and add time on a task T line Go to task T and note that a line have been added without any employe Cause : By default, views do not show archived values. Fix : Show archived employees with context key 'test_active=False'. backport of odoo/odoo#85481 opw-2740228 Part-of: odoo/odoo#97760
-
Laurent Stukkens (LTU) authored
Prior to this commit: - The employee was the first one returned through a search that was not taking the company into account. After this commit: - The employee will be selected according to the company. This issue arose with b5b105ea backport of odoo/odoo#81693 Part-of: odoo/odoo#97760
-
- Jun 22, 2022
-
-
Xavier BOL (xbo) authored
Before this commit, if the user uses Studio app to customize the form view of timesheet and adds `product_uom_id` field in that view, then if for instance that field is invisible, it will be in in the vals when the user will create a timesheet. In that case, the value given to that field will be False since the field has no default value. Since in the compute of `total_timesheet_time` defined in project used that field to convert the `unit_amount` of each timesheet linked to this project in the right UoM, the `product_uom_id` field has to be defined if the AAL is a timesheet, otherwise, the timesheets without any UoM set on `product_uom_id` will be excluded in the compute. This commit fixes the issue by setting a UoM if the UoM is not in vals or if the value is False for a timesheet. opw-2884148 closes odoo/odoo#94162 Signed-off-by:
Laurent Stukkens (ltu) <ltu@odoo.com>
-
- Apr 27, 2022
-
-
Adrien Peiffer authored
As the company is not mandatory on both the employee and the analytical account, if neither is filled in, it causes the application to crash. This commit ensures that the currency of the current analytical line's company is provided when no company is set on the analytic account. closes odoo/odoo#89923 X-original-commit: e1c36901 Signed-off-by:
Laurent Stukkens (ltu) <ltu@odoo.com>
-
- Oct 21, 2021
-
-
Pierrot (prro) authored
How to reproduce the problem: - Install hr_timesheet and create a project. - Create a task in the project, and assign a Partner as the Customer - In the Timesheet tab of the Task, add a new entry. Save the Task. - Edit the task again and change the Customer. Save again. -> the partner on the Timesheet entry did not change. With sale_timesheet, the Sales Order Item of the timesheet entry can be updated from the Sales Order Item of the Task, but it isn't the case with the partner, which is not logical. Solution : Now, the partner_id is computed and will automatically be updated from the Task's Customer/partner_id. If sale_timesheet is installed, it will first filter out the invoiced timesheet entry: we don't want to change an already invoiced entry. opw-2616784 closes odoo/odoo#78577 Signed-off-by:
LTU-Odoo <IT-Ideas@users.noreply.github.com>
-
- Oct 04, 2021
-
-
Pierrot (prro) authored
How to reproduce the problem: - Go to Settings -> Users -> choose any user (example Laurie Poiret) - Note the ID of the res.user (example ID = 8) - Go to Contacts -> open the contact with that same ID. - Set that user as a company if not already one. - Go back to Settings -> Users - Open the related partner to the concerned user (visible in debug mode) - Set the parent company of that user as the contact modified before (contact with the ID = 8, in our example) - Log in with that user. - Go to Accounting -> Invoices -> open any invoice - Click on the preview button -> it will load forever. Cause of the problem : the system loops on a wrongly configured domain Solution : the system uses another domain for internal users. (fix inspired from https://github.com/odoo/odoo/commit/3378ca8252d3ac0e22a8aa1632ffc436864b26b7 ) opw-2543174 closes odoo/odoo#77683 Signed-off-by:
LTU-Odoo <IT-Ideas@users.noreply.github.com>
-
- Apr 29, 2021
-
-
Goffin Simon authored
Steps to reproduce the bug: - Let's consider a project P set with analytic account AA and company C - Allow timesheet on P - Let's consider a task T belonging to P - Set AA with comapny = False - Try to encode a timesheet on T Bug: A UserError was raised because the field company_id on account.analytic.line is required opw:2486034 closes odoo/odoo#70071 X-original-commit: b3dc922c Signed-off-by:
Simon Goffin (sig) <sig@openerp.com>
-
- Nov 30, 2020
-
-
Kevin Baptiste authored
Before this commit the fields project_id and task_id on account.analytic.line were sharing the same compute method which was not triggered when one of those fields were changed. Here the fields get their very own compute method. closes odoo/odoo#62071 Taskid: 2389727 Related: odoo/enterprise#14880 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Oct 07, 2020
-
-
Dominik Rubo authored
This change allows uninstallation of hr_timesheet from the configuration of Project. Previously, attempting to disable the Timesheets feature from the configuration of Project resulted in a user error that requested the user to first remove tasks in projects that were linked to analytic accounts. This was caused by the removal of demo data during the uninstallation of hr_timesheet, which attempted to unlink analytic accounts before unlinking the projects that were referencing those accounts. The order in which demo data are removed during uninstallation of a module is currently not fixed. This change avoids the problem by instead removing the explicit creation of analytic accounts as demo data. Furthermore, hr_timesheet would be immediately re-installed upon uninstallation through project_timesheet_synchro and project_timesheet_holidays. Disabling those modules along with hr_timesheet fixes this. Task 2339016 closes odoo/odoo#58759 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Sep 29, 2020
-
-
fw-bot authored
If a portal user was a customer but not a follower of a project he didn't have access to the timesheets linked to the project. Task-2299286 closes odoo/odoo#58621 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Sep 16, 2020
-
-
koz-odoo authored
Currently, method _apply_timesheet_label will add label on field unit_amount with widget timesheet_uom but the widget on this field is changed in another module as timesheet_uom_timer so it will not work when that module is installed. So in this method pass the view_type as argument so it can be easily override in another module based on view_type. closes odoo/odoo#57838 Taskid: 2287390 Related: https://github.com/odoo/enterprise/pull/11884 Related: odoo/enterprise#13276 X-original-commit: 6ce434b6d6ab686c91c111d2f86503176fec6517 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Sep 02, 2020
-
-
jbm-odoo authored
Before this commit: The field `planned_hours` and `subtask_planned_hours` are present twice. This causes problems with widget: different widgets are put on different fields, but only the last on was put on all of them. Code to edit label with hours/days is not flexible, we need to write each possibilities. After this commit: All fields are present only once in the view. A new widget is created to manage days with a factor. In this new widget, instead of having a toggle button, we can insert a float. When the widget timesheet_uom is set on a field, we modify his string with hours/days. closes odoo/odoo#56702 Taskid: 2326216 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Sep 09, 2020
-
-
Anh Thao Pham (pta) authored
- Go to Timesheets > Configuration > Settings and select Days as Encoding Unit - Go to Project and create a Project with Timesheets activated - Open the created Project and create a Task - Edit the task and encode a timesheet line with 1 Day duration "Hours Spent" and "Remaining Hours" have incorrect values. The 1 day encoded is computed as 1 hour. Reverting: https://github.com/odoo/odoo/commit/2a7ec79c6a4563b608a4525ebccdea5978799caa opw-2328603 closes odoo/odoo#57378 X-original-commit: 8b3eed7418d6eea870f5e65ae238a304c88bd9f5 Signed-off-by:
Anh Thao PHAM <kitan191@users.noreply.github.com>
-
- Aug 31, 2020
-
-
Victor Feyens authored
PURPOSE Clean code. Be more performance oriented. SPECIFICATIONS Improvements applied in this commit * not all() --> any(not) for earlier returns; * all([generator]) --> all(generator) to avoid unnecessary list casting. This code construct is better managed by all; This commit will probably not have a big performance effect on standard production databases. However each performance and cleaning improvement is welcomed. LINKS Task ID-2328619 closes odoo/odoo#56060 Related: odoo/enterprise#12486 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
- Aug 14, 2020
-
-
Victor Feyens authored
Replace wrong usages of any(list|recordset), by any(generator) to speed up computations, avoiding list creations and/or looping twice on a recordset for nothing. any([generator]) => any(generator) any(filtered) => any(generator) closes odoo/odoo#55768 Related: odoo/enterprise#12360 Signed-off-by:
Victor Feyens (vfe) <vfe@odoo.com>
-
- Aug 06, 2020
-
-
Jorge Pinna Puissant authored
- Install hr_timesheet and sales; - Create a product, set it as a service product with units of measurement in days. - Set the product as a task will be created from SO; - Add a timesheet for one day to a task in a project (8 hours for instance); - The smart button on the sales order shows the time logged for that project. Before this commit, when the timesheet encoding unit is 'Hours', the smart button shows the correct logged time (8 hours). But, when the timesheet encoding unit is changed to 'Days', the samrt button shows 0.125 Days instead of 1 Day. This occurs because the uom used to create the uom factor for the widget is not the Timesheet encoding unit. opw-2301510 closes odoo/odoo#55544 X-original-commit: 2a7ec79c Signed-off-by:
Jorge Pinna Puissant (jpp) <jpp@odoo.com>
-
- Aug 04, 2020
-
-
Nisha patel authored
Currently, In timesheet module when we update the description of existing entry and if the description is empty then it generates required field error. So in this commit, when a description updated as an empty then we set a default '/' in the description. closes odoo/odoo#55370 Taskid: 2301377 Closes: #54726 X-original-commit: 10cecadd05f0349765dc9cdb111e91c2d6d423b4 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Jul 23, 2020
-
-
Anh Thao Pham (pta) authored
[IMP] hr_timesheet: hide the "Round timesheets" feature in the settings of Timesheets if encoding unit is Days [IMP] hr_timesheet: hide the "Timesheet Timer" feature in the project form if encoding unit is not Hours [IMP] hr_timesheet: clean display of Days for timesheets A computed field has to be added to retrieve the encoding uom of the current company and be used in the views. FieldTimesheetFactor field has to be registered to "float_factor" widget for the "planned_hours" field to work correctly with Days (for the conversion from hours to days to be computed and to be able to set a greater value than 1 day) If encoding unit for timesheets is set to Days: - Display Days instead of Hours in Portal > Timesheets - Display Days instead of Hours in Portal > Tasks - Display Days instead of Hours in Portal > Invoices & Bills - Display Days instead of Hours in Portal > Tickets [IMP] hr_timesheet: display clean duration in Timesheet Entries Display Days instead of Hours in Timesheet Entries (print action) if encoding unit for timesheets is set to Days [IMP] hr_timesheet: correctly display timesheets in Days if configured to - correctly display remaining days in project.task kanban and list view - hide timer start button if timesheet is configured in Days - update several column names [IMP] hr_timesheet: clean code [IMP] hr_timesheet: small improvements when displaying timesheets in days - Rename some labels - Fixes style - Prevent fields displayed with widget "timesheet_uom" to change when timer is on - Display correctly "Initially Planned Days" field in task creation form
-
- Jul 31, 2020
-
-
Toufik Ben Jaa authored
- The HR staff may not be able to accept/refuse/cancel leaves if the module `project_timesheet_holidays` is installed. This is due to the commit c9da1571 introducing a manual check on the current user's group without checking if the current environment is in superuser mode. - Also fix the test verifying the access restriction, which meant to use a different user, but did that with sudo(), obviously defeating the fix. sudo is not used to switch user anymore, that `with_user`. closes odoo/odoo#55274 X-original-commit: 75a166f1d115cc712bb39e7711d0fcb173732650 Related: odoo/enterprise#12149 Signed-off-by:
Olivier Dony (odo) <odo@openerp.com>
-
- Jul 09, 2020
-
-
jbm-odoo authored
Before this commit: In helpdesk_timesheet, we have a compute_task_id with super. But in hr_timesheet, task_id is not a compute field, so this compute has no effect. After this commit: Task_id is changed to compute stored field. taskId 2285926 closes odoo/odoo#54117 Related: odoo/enterprise#11682 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Jun 30, 2020
-
-
Martin Trigaux authored
This commit fixes all issues detected by the new pylint gettext-variable test. It converts some calls to the new syntax _("Foo %s", bar) to progressively migrate the code to the new syntax. A few calls were not technically incorrect but still detected by the linter. _("Foo" + "Bar") has been converted to _("Foo" "Bar") as it has the same effect and make sure the argument is of type asteroid.Const instead of BinOp). closes odoo/odoo#53683 Related: odoo/enterprise#11467 Signed-off-by:
Raphael Collet (rco) <rco@openerp.com>
-
- Jun 29, 2020
-
-
qho authored
1. Generic timesheets improvements - Portal /my/timesheets - Add a group bys task, date, employee - Add search in project, name, employee, task * The task column should not be visible if none of the timesheets have the Task field set - If a group by task, date, employee or project is applied, the corresponding column should not be visible 2. Timesheets from sub-tasks on parent tasks - Portal /my/tasks - Display the 'Total Hours' spent on a task at the end of the list of timesheets - Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task) * Title should be: 'Timesheets for sub-task: xyz' * only visible if there are sub-tasks linked to this task * only visible if total hours > 0 3. Timesheets on Invoices - Portal /my/invoices - Add Project + task fields * Task field only visible if set on one of the timesheet entries * Project field only visible if there are at least 2 different projects in these timesheet entries 4. Correct visibility for the portal users - Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project - When a portal user is added as the message follower of the project, the user is added to allowed portal users as well - When a portal user is removed from allowed portal users, the user is also removed from message followers closes odoo/odoo#47248 Taskid: 2201908 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Jun 23, 2020
-
-
Victor Feyens authored
Potentially wrong in multi-company environment. closes odoo/odoo#53513 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Victor Feyens authored
* remove name_create override: allow_timesheet default is True anyway * create projects in batch * write improvement
-
Victor Feyens authored
Do not say that the task has timesheets linked when there are none linked...
-
- Jul 29, 2020
-
-
Thibault Francois authored
Allow user that have a employee in a company A and that is allowed on company A and B to timesheet on company B Problem: A user have access on company A and B but is link to an employee that belong to company A. He want to timesheet on a project from the company B. He gets an error "Incompatible companies on records". Since most users are linked to only one employee that belongs to one company. It's impossible to have consistent companies. Solution: The employee shouldn't be checked on the timesheet closes odoo/odoo#55074 X-original-commit: 7eada96b8fc1c370801ff42231167885cc8e46bc Signed-off-by:
Olivier Dony (odo) <odo@openerp.com>
-
- Jun 23, 2020
-
-
Rémy Baranx (bar) authored
The fields 'project_id' and 'user_id' have been converted to stored-editable computed fields. Convert the 'allow_timesheets' field. Improvement of the _compute_task_id method to check the task_id field before using it. Update hr_timesheet tests by removing calls to onchange methods because now, compute methods are always called. Get back the onchange on the 'project_id' to compute the task_id field due to a complex bug found in sale_timesheet tests.
-
- Jun 18, 2020
-
-
Martin Trigaux authored
When more than one parameter is present in a message, it helps the translation to use named placeholder. This way, the order can be changed. It also helps the comprehension of the message.
-
- Jun 15, 2020
- Jun 11, 2020
-
-
Thibault Francois authored
mixin method should not return in the middle of the loop Use the value updated on the record instead super() is called with self at every iteration which is not very efficient and can be wrong Solution call super for each specific record and only when needed write is not a good practice in compute method closes odoo/odoo#52858 X-original-commit: 7e19ed98d18305370b5c14edd3d310cfea5df714 Related: odoo/enterprise#11100 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
- Jun 02, 2020
-
-
Yannick Tivisse (yti) authored
Improve the onboarding of new users and clean a few screens. Task ID: 2237996 closes odoo/odoo#50284 Related: odoo/enterprise#10536 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by:
dmonzonis <mod@odoo.com>
-
- Apr 29, 2020
-
-
Nisha patel authored
Currently, when the unit amount of line is zero and the timer time spent on entry is less than one minutes then entries are unlinked once the timer is stopped and due to that the entry disappear from the kanban view and traceback is generated. After this commit, we fix the issue by preventing the deletion of entries by setting options 'prevent_deletion' on widget so we should no allow to delete the entry if the option is set on widget. closes odoo/odoo#50395 Taskid: 2230155 Closes: #49128 X-original-commit: 64b9a9b4deaee5a8139b0afbe3f222a476a038f9 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-