From commit 2ecfed335d, clicking on the arrow of a m2o opens the
record in form view and passes it the context of the current view.
After this commit, only the context defined on the <field> is passed.
Problem:
An example of a problem, is the use of an incorrect active_id in the
second view that is passed through the first form view to the second.
Previously, the active_id of a form view was always the id of the record
and not that of the previous view. This behaviour is debatable, but it
leads to major changes. We therefore prefer to revert to the old behaviour
and no longer pass the entire context in order to avoid this problem.
How to reproduce:
- Go to a form view with a m2o
- Click on the arrow of the m2o
Before this commit:
The view context contains all the context from the first form
view and the second.
After this commit:
The view context contains the context of the m2o field and the second view.
closesodoo/odoo#127538
Taskid: 3394945
X-original-commit: a9bec1fec3ff08461732ef2717457524339eb716
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
After odoo/odoo@ad40298a9, when a user having access to timesheet app
but not to accounting app tries to see his timesheet in list view, and
some lines have been invoiced manually, an access error is raised.
This commit ensure that user can compute `readonly_timesheet` even when
user has no accounting access.
opw-3415661
closesodoo/odoo#127996
X-original-commit: 8f224acaac2d3c67d06284726a75194c9dc20a28
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*: account,event_sale,fleet,hr_attendance,hr_contract,hr_timesheet,
im_livechat,point_of_sale,project
When the user tries to delete a record(s) from the reporting views, this
traceback will be generated.
Steps to produce (Example only):
- Settings > Technical > Actions > Window Actions
- Search for the Work Entries Analysis. Open it and add a 'tree' as view_mode
in that action.
- Payroll > Reporting > Work Entries Analysis menu and select the tree view.
- Select one or more records and try to delete these records.
Error: A traceback appears: "cannot delete from view "hr_work_entry_report"
Handled the unlink access by using their model access of the reporting models.
similarly, this issue resolves in other reporting models.
Sentry-3975590063
closesodoo/odoo#125697
X-original-commit: 209d8c76ce9bb1d6cc7084d55b5623e939af8fbc
Related: odoo/enterprise#42825
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The previous commit introduced an optimization to reduce the number of
queries and fields fetched when we call `name_search`. But it works much
better when the dependencies of `display_name` contain field names used
in the calculation (on the same record/model).
Then, to improve the performance and the cache coherency, add `depends`
and `depends_context` depending on the custom `_compute_display_name`.
Add only the first level of dependencies (never traverse relational
field) because only these have a positive impact on the previous
optimization and the cost is very low (see `modified`).
About `depends_context`, we don't include `lang` because (when `_` is
used by example) it is unlikely to get the same display_name in the same
request with two different lang.
closesodoo/odoo#122085
Related: odoo/documentation#4639
Related: odoo/enterprise#42599
Related: odoo/upgrade#4780
Signed-off-by: Raphael Collet <rco@odoo.com>
Rationale
=========
Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).
To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)
Changes
=======
- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).
Part-of: odoo/odoo#122085
before this commit, The Kanban view for project tasks includes a subtask button,
a remaining hour timer, an activity button, and assignees in its lower section.
However, when the task has subtasks and timesheet entries, these buttons appear
in the Kanban view, causing the view to lose its structure somewhat.
This commit includes reducing the right margin of the activity button and
remaining hours to provide enough space for other elements in the kanban view.
Additionally, the Lock Icon for private tasks has been given a left margin to
separate it from the activity button
task-3289941
closesodoo/odoo#126446
X-original-commit: eff472e39642bb29e5d4615fcfe1255c00ffc5ef
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Issue:
1) Install the timesheet module.
2) Update the encoding method in the timesheet settings to use 'days' instead.
3) Navigate to the project task section and observe that the allocated days
field incorrectly displays the unit of measure as hours instead of days.
Cause:
The planned_hours field in the project task form view contains a float_time
widget that does not convert the UOM when switching to the Days encoding method.
Fix:
Using the timesheet_uom_no_toggle widget resolves the issue by changing the
updated value. To minimize the extra space generated by using the
timesheet_uom_no_toggle widget, the o_field_float_time class is employed.
task-3318851
closesodoo/odoo#126211
X-original-commit: 93d6f475d4cca35e4d4c41e9dedce3001d50f72d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce:
1) Install the timesheet application.
2) Open the grid view and select a project.
3) Search for a task that does not exist, for example, 'xyz'
4) Notice that both 'Create xyz' and 'No records' are displayed
Cause:
-The issue arises when using the timesheet grid view, as the default_project_id
is passed through the context. However, when a project is initially selected,
the props do not update, resulting in the 'canCreate' value being set to false.
Fix:
-This change will allow canCreate value to be set as true when the project
is selected.
-In the timesheet grid view 'no_create_edit=True' is passed, indicating that the
user should not create and edit new tasks. Modifying this value is not
appropriate as it goes against the functionality of preventing the user from
editing the tasks.
task-3318851
closesodoo/odoo#122485
Related: odoo/enterprise#41500
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit:
In 16.2, we have implemented a nice tool to set various fields at the creation of a task from
the Kanban quick create using shortcuts.
This implementation is simple (only a few lines of code), but is not very flexible.
Indeed, shortcuts need to be in a specific order and at a specific place for them to work.
As a consequence, it is very easy for the user to fail in the creation of their tasks using shortcuts.
This task aims at making this feature more robust and complex so that it works in more cases.
In this commit:
It should be possible for the #tag, 23h, @demo, ! shortcuts to be put in whatever order, as long as they are at the end of the name
task-3349154
closesodoo/odoo#124155
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce the issue:
Add a project and create a task with a timesheet in it
set the allocated hours to 00:03
add a line in the timesheet with hours spent 00:03
Current Behaviour:
The percentage calculated would be 96%, even though the time allocated and time spent are equal.
Desired Behaviour:
The percentage should be 100 as both values i.e. time spent and time allocated are equal.
This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.
Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.
OPW-3270858
closesodoo/odoo#125619
X-original-commit: 94dd1d570410c9a994027b7030ee9204ca1ec3e9
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
When the hr_timesheet module is not installed and a customer uses the
action_project_timesheets action through customization, a traceback will
occur because he will not get the action of hr_timesheet.
closesodoo/odoo#125600
X-original-commit: cdeeb70ada8364c681c93961c2bd29f1069cebbf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Added the sum of the hours in the project.task tree view for the
"hours spent on sub-tasks" and "total hours" fields.
- Centered vertically the AA warning on the project form -> timesheet
notebook when the AA linked to the project is archived.
TaskId:3251653
closesodoo/odoo#120664
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps:
- Install timesheet.
- Give user a `user: own timesheets` access.
- Open timesheet app.
Issue:
- `My Timesheet` menu is not visible and `Reporting` is visible
but timesheet user should be able to see `My Timesheet` menu not
`Reporting` menu.
Cause:
- Both `My Timesheet` menus are under that `Timesheets` menu which
has appover group set on it but one of then should be outside of
that menu and missing group on `Reporting` menu.
Fix:
- Move one of `My Timesheet` menu outside to display it for timesheet
user and add approver group on `Reporting` menu.
task-3369534
closesodoo/odoo#125303
X-original-commit: 065227b05a9666798b918fe26ae9c4828ba53a8f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Removal of 'my team's ratings' and the 'my department's ratings'
filters in order to be more consistent with the project.task search view
- UI improvements in the project form ratting settings
TaskId-3251609
closesodoo/odoo#120633
Related: odoo/upgrade#4632
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Current behaviour:
In mobile view, if an user that doesn't have any rights over
"Employees", clicking on any of the Many2One `employee_id` (for ex:
when adding a timesheet on a task and clicking on the employee field),
for either the dropdown, or to the form view with the `external` button,
we get a stacktrace.
Expected behaviour:
We shouldn't be met with a stacktrace, if we don't have rights, we
should be redirected to the corresponding view for the `hr.employee.
public` model.
Steps to reproduce:
- Install Timesheets
- Set Marc Demo's Employee's right to `none/empty`, login as Marc
- In mobile view, go to Project > a task > open the timesheet sheet
- Click on Add or any of the present timesheets
- Click on employee field, either on it (redirect to the mobile
kanban view of all employees) or to the right edge of it (redirect
to the form view for the currently selected employee).
- Instead of being redirected, you are met with a stacktrace.
Reason for the problem:
Since the migration to Owl, there is an implicit consistency
expected between what is the requested model for said view, and the
model we get back from the server for said view. In general (for
example when in desktop view), usually we pass by an override of
`get_formview_action` which changes the model we are loading
front-end side depending on the access to the employee model. If
access, we load `hr.employee`, if no access, `hr.employee.public`.
But for mobile, we don't pass by an action, we just load a dialog,
and the `resModel` used for the dialog is based on the `relation` of
the `Many2OneField`, which is `hr.employee`. In that case when
`get_views` is being called, we receive a view with the model key
being `hr.employee.public`, which is inconsistent with what the
front-end requested (which is `hr.employee`) and we have a
stacktrace in owl.
Fix:
Override the `relation` property to the correct model in the
corresponding widget set on the template of the field, based on
available group. This relation is used to set the `resModel` when
opening the dialog.
Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master
opw-3269817
closesodoo/odoo#124961
X-original-commit: 05f1d58ee6143432ce85bc7629dbe76c74c2da33
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
New features developed in this PR:
- Write Javascript tests for the project.task.state widget
- Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
- Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
- Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
- Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)
Task-3213526
closesodoo/odoo#117968
Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Allow timesheeting on sub-tasks with no project_id set.
Instead, refer to the project_id set on its parent_id, and so on,
recursively.
task-3336215
X-original-commit: d794e41619a36a8c9ad1e77a816e57051207cdcf
Part-of: odoo/odoo#124563
This PR adds several UX improvements :
- Timesheet smartbutton : Get weekly view instead of daily
- Attestation (N) : Fix displayed year
- Remove demo profile picture for Marc Demo to allow the new one
- Employee tree view : Allow more flexibility in terms of what you can show and hide on the tree view
task - 3299145
closesodoo/odoo#120659
Related: odoo/enterprise#40766
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The purpose of this PR is to improve the generic usage of the project app.
So in this PR done following changes:
- switched Sales Orders button and planning, document button from their place in
the project kanban card burger menu
- In milestone form view added decoration-danger on quantity % if it is equal
to 0 and there is an SOL set
- On milestone creation the SOL of the project set default if it is of
milestone type
- In the product form view Uom is set as 'hours' if the service is either
prepaid or invoiced based on timesheets.
- In project.milestone list view changed quantity_percentage label to
to Quantity(%).
- Added product_uom_qty field in project.milestone list view .
- In project.sharing improved remaining hours widget now only the frame is
displayed in orange/red, not the background (as in the back-end)
- project.update right-side panel added the ref of the SO in the nameget
of the SOL
- In project.update right-side panel added Confirmation when trying to delete
a milestone
- Reduced the size of project and task sharing wizard
task-2989828
closesodoo/odoo#106284
Related: odoo/upgrade#4198
Related: odoo/enterprise#34322
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce
------------------
1. Install hr_timesheet.
2. Try deleting a task.
You will get a traceback.
Explanation
-----------
In https://github.com/odoo/odoo/pull/110737, the calls to `_read_group` were adapted to the new API,
but a slight mistake was introduced when adapting the code in `_unlink_except_contains_entries`.
This commit fixes it.
closesodoo/odoo#123597
X-original-commit: 83046fb1fd00ffde7568c35c76697ecf7f4db8fa
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.
This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).
closesodoo/odoo#121629
Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.
This commit fixes this issue.
task-3326633
Part of task-3326263
X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
Before this commit timesheet uom timer not displaying proper
aggregated value because it was not added in formatters registry.
This commit add timesheet uom timer widget in formatter registry to
display right value when timesheets are encoding in days and views
are displaying aggregated value(e.g. total in list view).
task-3251672
closesodoo/odoo#121788
X-original-commit: ef20722b9d4513519ef78ab6e973edda4fa4d7fc
Related: odoo/enterprise#41252
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit searching on project and task display all
records in search more dialog without distinction and because
of that sometimes it is difficult for user to find a proper
record.
This commit add default filter on search more dialog to
display user related record.
task-3251672
closesodoo/odoo#118911
Related: odoo/enterprise#39936
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps:
- Install timesheet app.
- Go to kanban view.
- Enable timer on kanban view.
- Click on task field.
Issue:
- Traceback.
Cause:
- Company field is used in timer but forgot to add in
kanban view.
Fix:
- Add company field kanban view.
task-3266724
closesodoo/odoo#120747
X-original-commit: 92b0881a3644d0128c3c505810a6b6f6fb648386
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit follows the addition of the OWL date picker and intends to:
- update views calling daterange widgets to use the new syntax (and
remove the end date field from the view in most cases);
- change the remaining components extending the previous DatePicker and
DateTimePicker components.
Part of task 3121497
Part-of: odoo/odoo#112171
Steps to reproduce
==================
- Use an IOS device
- Open a view with a float field
- Try to edit it
The virtual keyboard displayed is missing a dot, so you can only input
integers
Cause of the issue
==================
For fields that should accept a float value, the inputmode attribute
should be decimal.
Also, specifically on IOS, even with the inputmode set to decimal, it
isn't possible to enter a negative value.
> decimal:
> Fractional numeric input keyboard containing the digits and decimal separator
> Devices may or may not show a minus key (-)
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
Solution
========
For IOS, remove the inputmode attribute so that the default keyboard
shows. For other devices, use the decimal/numeric value depending on
whether a float should be accepted.
opw-3269275
closesodoo/odoo#120129
X-original-commit: fb37550715034e7a1fbe751889cd8ea2bd6e4128
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit timesheet community and enterprise form view
where different from each other because of that if we want to
change something in timesheet form we have to do change in both
view and sometimes it is hard to keep track of both view.
This commit use single form view in both community and enterprise
so it'll easier to change something in timesheet form view and
it'll remove some technical debt.
task-3255754
closesodoo/odoo#117748
Related: odoo/enterprise#39343
Related: odoo/upgrade#4520
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit brings a few improvements to the project.project and project.task
search views.
Task-3264820
closesodoo/odoo#118515
Related: odoo/enterprise#39766
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
To reproduce on runbot:
- go a to an existing task
- clear the "Analytic account" field
- add a timesheet line
- save
It then crash with the following error:
```
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/data/build/odoo/odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/data/build/odoo/odoo/service/model.py", line 134, in retrying
result = func()
File "/data/build/odoo/odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/data/build/odoo/odoo/http.py", line 1922, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/data/build/odoo/addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "/data/build/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/data/build/odoo/odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/data/build/enterprise/industry_fsm_stock/models/project_task.py", line 101, in write
result = super().write(vals)
File "/data/build/enterprise/helpdesk_fsm/models/project_task.py", line 45, in write
res = super().write(vals)
File "/data/build/odoo/addons/project_sms/models/project_task.py", line 25, in write
res = super().write(vals)
File "/data/build/enterprise/project_enterprise/models/project_task.py", line 288, in write
res = super().write(vals)
File "/data/build/odoo/addons/hr_timesheet/models/project.py", line 385, in write
res = super(Task, self).write(values)
File "/data/build/odoo/addons/project/models/project.py", line 2050, in write
result = super().write(vals)
File "/data/build/odoo/addons/mail/models/mail_activity_mixin.py", line 241, in write
return super(MailActivityMixin, self).write(vals)
File "/data/build/odoo/addons/rating/models/rating_mixin.py", line 101, in write
result = super(RatingMixin, self).write(values)
File "/data/build/odoo/addons/mail/models/mail_thread.py", line 311, in write
result = super(MailThread, self).write(values)
File "/data/build/odoo/odoo/models.py", line 3813, in write
field.write(self, value)
File "/data/build/odoo/odoo/fields.py", line 4168, in write
self.write_batch([(records, value)])
File "/data/build/odoo/odoo/fields.py", line 4189, in write_batch
self.write_real(records_commands_list, create)
File "/data/build/odoo/odoo/fields.py", line 4369, in write_real
flush()
File "/data/build/odoo/odoo/fields.py", line 4325, in flush
comodel.create(to_create)
File "<decorator-gen-368>", line 2, in create
File "/data/build/odoo/odoo/api.py", line 410, in _model_create_multi
return create(self, arg)
File "/data/build/odoo/addons/hr_timesheet/models/hr_timesheet.py", line 142, in create
vals_list = self._timesheet_preprocess(vals_list)
File "/data/build/enterprise/helpdesk_timesheet/models/analytic.py", line 61, in _timesheet_preprocess
return super(AccountAnalyticLine, self)._timesheet_preprocess(vals_list)
File "/data/build/odoo/addons/hr_timesheet/models/hr_timesheet.py", line 331, in _timesheet_preprocess
account = account_per_id[account_id]
KeyError: False
The above server error caused the following client error:
null
```
closesodoo/odoo#119597
X-original-commit: b86fa6a72cc5eaeb0245cf2092eefde09226aa12
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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
closesodoo/odoo#118527
X-original-commit: 527033596afe5640533c568ea8c7367c40ff183a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Currently the width of float_toggle widget is 100% so it appears in full size. In this
commit we have reduced it to 15%.
task-3251667
closesodoo/odoo#117317
Related: odoo/enterprise#39644
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit generating timesheet for time off doesn't have
clearer info after the recent change.
This commit update info according to recent changes to have better
understanding to end user.
task-3186664
closesodoo/odoo#115265
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
_* = sale_timesheet, account
In this commit, we have replaced the cancel button string with discord instead
of cancel.
task-3216495
closesodoo/odoo#115693
Related: odoo/enterprise#38341
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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
closesodoo/odoo#117834
X-original-commit: 4cce77bd0288eeb3326ba57e91ef11d436f8a0ce
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
It takes a too long to load project task kanban view.
And ~85% of this time is spent in `ProjectTask._get_all_subtasks`,
which is a recursive method returning the children of the children,
while any, of the task, for each task, just to display their count.
We replaced this recursive method with a SQL request,
which is way faster. Also, it can be called in batch.
It will return a dict {id: subtask_ids}.
task-3246085
closesodoo/odoo#117624
X-original-commit: 3b55936fed9ebdcfb8190437ad66c3e42c26b01c
Related: odoo/enterprise#39295
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose of the commit is to do the generic improvements for project.
So in this commit did the following changes:
- adding a label 'last update' to the stat button in project form view.
- indicate 'my project' in the tab instead of 'project sharing view in portal' in project sharing.
- set the first non-folded stage of the project as default on newly created tasks.
- remove user confirming the SO as the default project manager.
- hide fields service_tracking, service_upsell_threshold if sale_ok is false.
- set purchase_method to purchase by default if product is of service type.
- remove the : next to the totals labels and decrease the font-size for values of 'total hours'
and 'remaining hours' in timesheets notebook in project task form view.
task-2897867
closesodoo/odoo#96548
Related: odoo/enterprise#29774
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Manisha Tulsiyani <matu@odoo.com>
This commit reviews the UX and UI in Project app and improves the usability of the
new features recently added (subtasks list in kanban card, state field replacing
kanban_state field, etc).
The following changes are made in this commit:
- swap of user_id icon in the kanban box and the removal of the allow_unassign field and setting
- change the ordering of the fields in the subtask list
- make small layout changes in the project.task and project.project kanban cards
- remove the "lock-icon private" sub-title of private tasks, replace it with a
little lock icon on the bottom right icons of the kanban card.
- remove the break tag in the project.task kanban card that was unecessary
given the new display and margin style settings
- lock icon is bigger
- kanban icons are better aligned
- state is as big as avatar
- remove the 'remaining hours on SO' field
- deadline field will be optional and hidden by default in project.task list view
- remove the rating field
- add stage field as optional in project.task list views
- priority and state fields will no longer be optional
- stage_id will be copied when duplicating a task, except when the task is
generated through the recurrence
- remove the tooltip of the tag_ids field
- When duplicating a task having sub-tasks, '(copy)' is no longer
added to the name of the sub-tasks of this task.
- project.task kanban view:
* (+ x tasks) mention next to the name is removed
* The caret is replaced with 'fa-check-square-o x/y'
which will represent the number of sub-tasks closed
compared to the total number of sub-tasks
* Only open subtasks are displayed
* When changing the state of a sub-task to a closing one,
the sub-task is muted and removed from the list on the view reload
* The name of the parent task on the kanban card of sub-tasks is
displayed except when viewing the sub-tasks of a particular task
through the sub-tasks stat button
* project.project kanban view: the fa-check-square-o icon of
milestones is replaced with fa-flag-o
* project.task kanban card: the fa-play and fa-pause icons
are moved on the right of the remaining hours widge.
* Allow users to edit the stage_id in batch from the list view of tasks
if all of the selected tasks are part of the same project.
* the state will have the same size as the avatar
* change the opacity of the tasks that are closed
* state is at the right of subtask list
* the striked should be replaced by the opacity on the kanban card
Enterprise PR: odoo/enterprise#38132
Task-3229873
closesodoo/odoo#116628
X-original-commit: 09b5d5843096d27b5a4ab0f603ad44bdb2e74723
Related: odoo/upgrade#4478
Related: odoo/enterprise#38771
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Panagiotis Kyriakou <paky@odoo.com>
Co-authored-by: Bastien (bvdn) <bvdn@odoo.com>
Purpose of this commit is to do generic UX.
So, in this commit done following points:
- improve search on invoice for portal commit when invoice is in
draft then search on id of invoice instead of name.
- display unit_amount field in muted when value of unit_amount
is equal to 0.
- rename timesheet attendance report.
task-2969791
closesodoo/odoo#100141
Related: odoo/upgrade#3897
Related: odoo/enterprise#31304
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Allow tasks' progress to go beyond go beyond 100%.
In tasks' list views, display the progress bar in red
if the progress > 100%.
task-2909337
closesodoo/odoo#96104
Related: odoo/enterprise#29565
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, if both companies have employees with the same name, it is not known which
company the selected employee belongs to.
After this commit:
- The name of the company will only be appended by the name_get when more than
one company is present in the database.
Example
- Administrator - My Company
- Administrator - Tiny ERP
task-3101249
closesodoo/odoo#107938
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose of the commit is to improve the UX of the timesheet.
So in this commit did the following changes:
- SOL field display by default in timesheet list view
- If the timesheet is invoiced, it will appear in read-only mode
task-2918757
closesodoo/odoo#97203
Related: odoo/enterprise#30000
Related: odoo/upgrade#3729
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit user able to see and add customers on non fsm and
non billable tasks/projects which is not provide any significance as
user don't need customer for normal tasks/projects.
So, in this commit hide customer field and also move partner phone
and city to field service app as it was only usefull for FSM project
and task.
task-3141350
closesodoo/odoo#111335
Related: odoo/upgrade#4274
Related: odoo/enterprise#36459
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit allocated hours field label on task has
to change allocated days when user change encoding unit.
This commit change label to allocated time that work for
both encodinging unit and we don't have to change label
depending upon encoding unit.
task-3141350
Part-of: odoo/odoo#111335