Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).
Also
- removes translation markers entirely when there's nothing to
translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
(DRY is generally a bad idea when translations are involved, even
more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
to fill-paragraph): `\` escapes only the newline, if the
continuation string is indented this results in a bunch of spaces
ending in the string to translate, which is pretty garbage for the
translator, using implicit concatenation works much better
Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.
Not in scope:
Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders
- Provides more context / data to the translator to make sense of the
sentence.
- Allows reordering the translated terms, which can be necessary
depending on the sentence and language.
closesodoo/odoo#139314
Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The aim is to harmonize the analytic search view between `hr_timesheet` and `account` by creating an inheritance from `analytic`.
This allows the accountant to have access to all the fields and filters defined in other modules.
task-3463639
closesodoo/odoo#138542
Related: odoo/enterprise#48870
Related: odoo/upgrade#5271
Signed-off-by: William André (wan) <wan@odoo.com>
This reverts commit 4dcf11a71d.
The reason is that it broke the inheritance with `analytic`, and thus with `account`.
This in turn made it impossible to harmonize the search view between modules.
Part-of: odoo/odoo#138542
The first intention of this commit was to remove ´@extend´ but
it actually makes sense to remove ´.oe_left´ and ´.oe_right´ classes.
Since grid we can avoid "float" elements (see .oe_subtotal_footer)
and we only have to remove this class.
For the other case, we have to use ´.float-start' and ´float-end´
to replace ´oe_left´ and ´oe_right´.
closesodoo/odoo#139199
Related: odoo/enterprise#49211
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
_*= account, hr_timesheet
This commit improves the Portal functionality and add email template:
- improve email template for invoice includes timesheet (add link in mail which
redirect to timesheets linked with invoice).
- improve timesheets template by renaming labels and internal header/footer.
task-3251680
closesodoo/odoo#127224
Related: odoo/enterprise#43593
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
_*= account, hr_timesheet
This commit improves the Portal functionality and add email template:
- improve email template for invoice includes timesheet (add link in mail which
redirect to timesheets linked with invoice).
- improve timesheets template by renaming labels and internal header/footer.
task-3251680
Part-of: odoo/odoo#127224
Steps
=====
- Install hr_timesheet
- Create a project shared (in edition) with a portal user
- Creata a task with a subtask and log timesheets for the subtask
- As a portal user open the parent task form
- Go in the timesheet tab
- Click on the button "Sub-tasks Hours/Days Spent" at the bottom of the
page
Issue
=====
An access error appears for an uom.uom record.
Cause
=====
Portal users have no access to uom.uom records. The method
_apply_timesheet_label uses this model to determine if the time spent
needs to be displayed with an 'hours' or a 'days' label. This raises a
traceback when it is called by a portal user.
Fix
===
The method _apply_timesheet_label is called as sudo, following the fix
that was already done in project sharing (see odoo/odoo#73341).
task-3527521
closesodoo/odoo#139125
X-original-commit: 01b1cf07bc1fb618d34065271cdc07fce561337f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In this commit we have manage sufficient space between allocated
hour and the percentage.
task-3248965
closesodoo/odoo#139113
X-original-commit: 1722359f1bedd238b162dd8f4c07d648d6d2d114
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit:
- project.task > list view: Currently, the progress is displayed
in purple if less than 100% and in red if above. The two colors
don't contrast a lot, making it hard to read. In addition, it
is not coherent with the color we usually apply for the remaining
hours in the rest of the app.
- onbording tour: the manual saving step is no longer necessary
as records are now automatically saved. In addition, showing it
doesn't provide a wow effect and is an extra opportunity to lose
people in the process
After this commit:
- the following color code was applied for the progress bar:
*if progress < 80 -> green
*if progress is between 80 and 100 included -> orange
*if progress > 100 -> red
- step removed.
task-3475170
closesodoo/odoo#132854
Related: odoo/enterprise#46162
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Following 116879e17e81657f48a7d11780d8d30715ecc68f a few improvements were needed to make it more
complete.
task-3484125
closesodoo/odoo#137522
Related: odoo/enterprise#48563
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.
To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.
task-3072562
X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
Improve added pivot and graph view for my timesheet in the timesheet app.
- Before this commit there was no pivot and graph view for my timseet in
timesheet app.
- In this commit pivot and graph view is added or my timseet in
timesheet app.
Task-3479322
closesodoo/odoo#134495
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In HR modules we have both hr.employee and hr.employee.public models and the
issue is that if a certain user doesn't have access to read the hr.employee
record, it will throw errors/avatar pictures won't appear. For this reason,
https://github.com/odoo/odoo/pull/116828 introduced a change in many2many
employee fields so that they always show hr.employee.public records. However,
we can improve this behavior by checking if the user has access to the record.
If they have access, the private record is shown (making it easier to navigate,
edit employee information) and if they don't have access, we show the public
record. In order to allow forcing a relation, it was decided to convert all
employee fields to accept a relation parameter in the options. If this option
is set, we use that as the relation.
This commit also changes the HR views using these widgets, removing the
relation option from fields that would benefit from this dynamic check for the
most suitable relation.
task-3524305
closesodoo/odoo#136786
Related: odoo/enterprise#48008
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit aims to simplify the evaluation context used to
evaluate expressions used in views (invisible, required, readonly,
domain and context attributes). For now, the evaluation context is
typically the current record (there's a key for each field in the
view). In addition to that, there're static keys (that may conflict
with field names): uid, allowed_company_ids, current_company_id,
active_id, active_ids and active_model.
The motivation of this commit is at some point to get rid of the
3 active_* keys, because they are misleading and basically useless.
The notion of active_* exists, but it is something else: when you
are in a form view (let's say the form of a partner) and you open
its opportunities (by clicking on the stat button), the list view
of opportunies shows up and in the context, there're 3 keys
active_*, referring to the record from which we came. One can
easily access those information with context.get("active_*"), in
python or in view archs.
However, almost all `active_id` found in archs were actually used
to refer to the id of the current record. Indeed, for now, in the
evaluation context of a record, the value of the `active_id` key is
always the id of the record. So this commit adapts them to
directly use `id` instead. There was no use of active_ids, and
a single use of active_model which was removed (active_model is
the res_model of the view, so it isn't really necessary).
This commit doesn't drop the support of those keys, it deprecates
them. They will be removed for v18. A warning will be displayed if
they are used.
closesodoo/odoo#136665
Related: odoo/enterprise#47917
Signed-off-by: Raphael Collet <rco@odoo.com>
Before this commit:
- The existing of two dates behaving as and end date for project_task
(date_deadline and planned_date_end) is confusing.
In this commit:
- The main goal is to simplify the interface by having one field/widget
that acts as both the deadline and the end date, instead of having two separate fields.
So we removed planned_date_end (changes can be seen in the enterprise related pr (link at
the end) and changed the date_deadline type from date to datetime in project_task and
report_project_task_user
Related PRs:
Enterprise: odoo/enterprise#40866
task-3084978
closesodoo/odoo#120953
Related: odoo/upgrade#4654
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, Even if the user doesn't have access to the timesheet still
user was able to see the "Allocated Hours" in Project tasks. which is part of
the timesheet.
After this commit, if the user doesn't have access to the timesheet then
the user won't be able to see the "Allocated Hours" in Project tasks.
task:3472646
closesodoo/odoo#137135
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description of the issue:
remaining hour field was visible to all users
Desired behavior after PR is merged:
remaining hour will only visible to that user who have timesheet access this
field will invisible if user doesn't have timesheet access
task-3484290
closesodoo/odoo#137082
X-original-commit: e737f0934f8a83cd02a4a79fbf174b95b524a4e7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit changes the default label of the graph view's axis to None
instead of undefined.
task-3519566
closesodoo/odoo#136822
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Add a new column, after tasks that shows the following information :
Tasks: Total done tasks / Total tasks (ratio in percentage)
Timesheet: Hours spent/ allocated hours (ratio in percentage)
\> visibility: only show if the timesheet setting is activated.
Right side panel :
Add the Done icon before Tasks
Add hours spent/allocated hours information under the Timesheet
Extra time: Add a new stat button that shows
the overall extra time used for the project.
visible if hours spent > allocated hours.
By clicking on this it will redirect to the same view
as we have for the timesheet stat button.
task-3432102
closesodoo/odoo#129177
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Update (some) query counters according to runbot state.
Also make some tests deterministic when involving company name.
Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#135288
Related: odoo/enterprise#47345
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, formatters like `formatMonetary` and `formatFloat`
weren't loaded in the assets front-end.
This commit introduces `formatAmount` ( `formatMonetary` calls
`formatAmount` but makes some prior processing to deduce the currency
from the field) and makes `formatAmount` and `formatFloat` accessible
from any front-end application.
Note: The currencies were added in the front-end session info because
they are needed in `formatAmount`.
closesodoo/odoo#133824
Related: odoo/enterprise#46658
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
before this commit, when time and material section is visible then 'To invoiced'
field is also visible in portal.
This commit hide the 'To invoiced' field in portal when time and material
section is visible and rename some fields.
closesodoo/odoo#126053
Task: 3251754
Related: odoo/enterprise#42995
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In the Kanban view of the project module, the remaining hour's widget should
have the frame colored orange, while the rest of the widget should have no color
task-
closesodoo/odoo#125526
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit 'project.task' model 'planned_hours' field
is inconsistent to the 'allocated_hours' field.
After this commit rename the 'planned_hours' to 'allocated_hours'
and related string change to 'Allocated Time'.
task-3231680
closesodoo/odoo#120405
Related: odoo/upgrade#4617
Related: odoo/enterprise#40643
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This will improve the following generic UX
- rename 'personal user stage' into 'personal stage' for private task
- added the 'personal stage' field to the right of the stage optional=hide
- earlier gantt view open with the user now it will open with groupby project
- removed groupby stage in pivot view
- rename 'undefined' into 'private' for graph view of private task
task-3251648
closesodoo/odoo#120094
Related: odoo/upgrade#4607
Related: odoo/enterprise#40515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The purpose of this PR is to improve the generic usage of the project app.
So in this PR done following changes:
- In reporting > tasks analysis measures:
- removed the # of tasks and average rating measures
- Changed rating value (/5) to rating (/5)
- In task analysis reporting formatted overtime as hh: mm
- In the project burndown chart added tip to action helper
- In project.task search view > quick searches:
- changed sale order to sales order
- under the SO one, a 'sales order item' has been added to the quick search
- Added many2one_avatar_employee widget in project sharing-> timesheets notebook
- In project.project form view > share editable added text in muted
- Added tip in the project.project form view > invoicing notebook under
employee/SOL o2m
- A placeholder has been added to the rating email template field in the project
task stages: 'Task: Rating Request'
- now rating submission page is editable
- In task stages list view :
- moved the project field on the right of the name
- switched the 'SMS template' and 'email template' fields from the place
- In project.task > recurrence notebook:
- moved the 'next tasks' list to the right of the recurrence
configuration fields
- In project.task > sub-tasks notebook > optional fields >
renamed 'initially planned hours' into 'allocated hours'
- In project.task portal form view: renamed
'history' into 'Message and communication history'
- Added 'open' filter in my tasks menu search view
- Added 'schedule an activity' status in the kanban activity widget
task-2903637
closesodoo/odoo#95971
Related: odoo/enterprise#29467
Related: odoo/upgrade#4095
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
To reproduce the issue, follow these steps:
1. Install the Timesheet and Project.
2. From the settings menu, create a new company.
3. Create a project using the newly created company(e.g. New Company) and add
a task to it.
4. Open the Timesheet application and create a new timesheet.
5. In the timesheet, select the project created in step 3, and observe that the
dropdown for tasks does not display any task.
Cause for this issue:
-The timesheet application has a domain set for the task field where the company
associated with the task_id should be the same as the company selected in the
current environment.
-However, when a new project is created with a 'New Company', the tasks
associated with it also have the 'New Company' assigned to them. On the other
hand, the current environment has a default company called 'Your Company'
associated with it.
-Therefore, due to this domain setting, the task field does
not display any tasks since there are no tasks associated with the
'Your Company' in the current environment.
Fix:
Since the cause of the issue is related to the company domain set in the task
field, we can solve it by removing it from the domain.
task-3323027
closesodoo/odoo#131197
X-original-commit: 7b9f9a1323ecaeab2b248784e1493b39fe07b8f1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, access rule for group_hr_timesheet_user is define for
read and write permission for task which allow internal user to edit task if
link is provided even if user have no access.
In this commit, we have remove access rule for group_hr_timesheet_user because
it is not required anymore since read access is already given to internal user
which does not allow user to edit task if user have no access.
task-3354831
closesodoo/odoo#130807
Related: odoo/upgrade#5020
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*=sale_timesheet.
In this commit improve following UI in task analysis and list view,
- aggregate the sum of following fields in project.task list view, hours spent
on sub-tasks, total hours, progress.
- in project.task list view move 'id' after the 'state'.
- from task analysis remove the measure 'remaining hours percentage'
from graph and pivot view.
task-3330295
closesodoo/odoo#124396
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
edition
- add branching options for several t-if directives without a t-else to
display for users (e.g. displaying the payment QR code if the value is
set vs. when the value is not set). These branching options are set to a
default value (the t-if node) which is what users see by default in the
report editor; the t-else node is a version they can manually toggle if
they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
these break the table layout in chomium-based engines (that we know of);
instead, try to have foreach loops on tr or td nodes directly, or hoist
t-set directives above the table node
- replace several div or p (block) nodes by span or other inline nodes
to make it easier for users to insert content in their vicinity
X-original-commit: eabdfe294d38df463828f87970b25d52ceae4a6a
Part-of: odoo/odoo#129492
_*: hr_timesheet,sale_project,sale_timesheet
Generally, you don't want subtasks to be displayed at the same level
as their parent tasks. You want to consider the subtasks as part of
their parent's project, but don't want to see them directly in this
project. Rather, you want them to be accessible only via their parent.
(There are exceptions to that and we want to stay flexible.)
First solution that comes to mind is to have `project_id` set to False
for the latter tasks, but then how to get the value of the fields that
are related to the project?
So, second solution would be to have a field `project_root_id`,
which would be the project of the parent, or the grand-parent, etc.
The issue now is that we have to fields "project", and it isn't obvious
when to use one or the other.
The most simple way to answer this need is to keep one field "project",
that will always be set for (non-private) tasks,
and create a boolean field : `display_in_project`.
But we want it to be technical (no checkbox in the view).
So, when the user unsets the project on a subtask, the view will act
as if the project was unset, but in the back-end,
we'll set `display_in_project` to False and set `project_id` back.
The fact that all tasks have a project allows us to know if action x
can be perform on this task t, dependind on t.project_id.allow_x.
task-3367246
closesodoo/odoo#128281
Related: odoo/enterprise#43996
Related: odoo/upgrade#4930
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit's purpose is to allow the user to set the company_id of a project to False, meaning the project is no longer restricted for the user who does not have access to the company of the project. This change induces a lot of other small behavior changes/approximation. Since some fields (currency_id, resource_calendar_id, etc) were company dependent, we had to updates some use cases.
task-3084819
closesodoo/odoo#122144
Related: odoo/enterprise#41363
Related: odoo/upgrade#4947
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.
task-3370463
closesodoo/odoo#127469
Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
One of the main issue with ormcache is that the invalidation clears
everything, meaning that some value, slow to compute but with a long
lifetime, can be removed from the cache because an easy to invalidate
value is cleared, like after writting or creating a product has an
example.
Most example in the code will try to invalidate the cache of the models
doing something like `env['ir.qweb'].clear_caches()` but it is
finally equivalent to `env.registry.clear_cache()`, and cross worker.
The idea is to have multiple cache, maybe with specific sizes for a
specific purpose.
Having one per model is maybe a bad idea because it will be difficult
to size the LRU correcly, and it is too dynamic. Checking invalidation
may be expensive.
The proposed solution is closed allow a limited number of named caches,
using onse sequence per cache. This is actually close to the
cache_longterm.
We want to discourage using a specific cache for one use case in
the buisness code. Adding a cache shouldn't be something easy, doable
in stable.
Note that we could also change the invalisation mecanism using an
insert only table. We an check the sequence of this table, but also
fetch all invalidation messages.
Another possible improvement, especially if we have more than x cache is
to have a global sequence, checking signaling would mean to check the
main sequence, and only the other ones if the main one changed.
Note that this poc is inspired from the long term cache but not all
use case where applie yet.
Part-of: odoo/odoo#119813
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>