In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :
<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>
task-3292454
closesodoo/odoo#131390
Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@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
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.
Main changes that were requested are:
- record datapoints no longer always have an "id" key in their
data (they still do if the id field is in the view), so we use
record.resId instead
- the new model is based on fined-grained reactivity, so several
components that previously relied on onWillUpdateProps to update
their internal state no longer worked. Typically, using the hook
"observeRecord" is the way to go now.
- specialdata are no longer handled in the model, so the components
needing specialData can use the hook "useSpecialData"
- more generally, all overrides of models (RelationalModel or
KanbanModel) needed to be reworked.
Part of task~3179751
Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
Steps to reproduce:
-------------------
- being in a multi-company context;
- select a company that is not the user's default company;
- add a manager to an employee;
Issue:
------
We don't see the organization chart.
Cause:
------
There is no "allowed_company_ids" key
in the context of the rpc call.
Solution:
---------
If a context is passed explicitly
in the call rpc kwargs, it must be used.
Otherwise, use the default context of call rpc.
opw-3422642
closesodoo/odoo#129233
X-original-commit: 32353bcf94fa4f7378f61c22664267e1e8a34a1f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Setting or changing the manager of an employee would not refresh the
OrgChart.
task-3381781
closesodoo/odoo#126617
X-original-commit: cbd5feed298efece8809d13434409e50326bd79b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*: gamification, hr, hr_contract, hr_expense, hr_holidays, hr_org_chart,
lunch, mail, web
Since the Milk refactoring, the backend uses only `.rounded` avatar
images. The `.rounded-circle` classes on images have been replaced by
`.rounded`.
task-3336569
part of task-3326263
closesodoo/odoo#123286
X-original-commit: b492049788353274fb32bb6fbe4d40e97a184a87
Related: odoo/enterprise#41798
Signed-off-by: Pierre Paridans (app) <app@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>
Making a test post_install using @tagged should always remove the
at_install tag.
The main reason for that is that runbot split config select if an
at_install or post_install tests should be executed is using negation:
`--test-tags -post_install`. The reason for that is that giving a positive tag will
replace the "standard" tag and non standard tag could be executed if
giving `--test-tags at_install` (without negation)
Since runbot tests in parallel builds, one of them using
`--test-tags -post_install` and the other `--test-tags -at_install`,
a test that is both post install and at install wont be executed at all.
Also, a tests with both tags will be executed twice
in a normal flow, usually not intended.
The correct way to make a test post_install is to use
@tagged('post_install', '-at_install')
closesodoo/odoo#118969
X-original-commit: d1db306b212d4abb5b2faab9e56c8e83b85c53b9
Related: odoo/enterprise#39966
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
**Before this commit**
Almost all of the use cases of the `usePopover` hook are dealing
with an abnormal amount of complexity:
- they have to store the closing function of the popover, and sometimes
keep track to its opening state,
- you can find a duplication of a useUniquePopover hook, which is
anyway the behavior that is always wanted for popover users.
This is due to the fact that usePopover is just some kind of wrapper
to the lower level popover service.
**After the commit**
- The usePopover now has a new API, which simplifies its usage.
- The useUniquePopover hook implementations have been removed and
this "unique" behavior is now merged into usePopover
and has become the standard one (not configurable).
- All of the use cases have been adapted, even the cases where
components used directly the popover service (through `useService()`).
See the adapted jsDoc around the hook in popover_hook.js
closesodoo/odoo#118066
Related: odoo/enterprise#39654
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
They dates from < 2027 and are quite outdated. Favour the nl
translation instead.
n_BE is not on Transifex so it was not possible to correct bad
translations.
closesodoo/odoo#115845
X-original-commit: d04c8b7e484db8306d858c891a7a2b11885fdcd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, the field's description was stored on the
component and this component was then registered.
Now, an object describing the field is used on registration the same way
as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671.
This split the component's description (props, template, ...) of
the field's description (displayName, supportedTypes, ...) and makes
it clearer.
closesodoo/odoo#112498
Task: 3171520
Related: odoo/enterprise#37105
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Go to Employee
- Open the Employee profile and click on Work information.
- In the Organization Chart Below the hierarchy See All button is visible.
- Click on the 'See All' button.
Currently, when we click on the ``see all'' button of the organization chart, the traceback
comes. Fixed it in this commit.
task-3133047
closesodoo/odoo#110476
X-original-commit: 9f4e1fa80dc75900fb8a2c979568c3ab8f65a635
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, in the search view, it is not possible to filter the
employees to only have those ones who is a subordinate of the current
user. That is, if Pierre is the current employee/user and he is the
manager of Paul and Paul is the manager of Jacques. Pierre could want to
see his subordinates in his view of so Paul and Jacques instead of just
Paul.
This commit adds a new boolean field called `is_subordinate` in
`hr.employee` and `hr.employee.public` models. This field will be True
if the employee is a subordinate of the current user.
task-3061362
closesodoo/odoo#108060
Related: odoo/enterprise#34181
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
When an employee was their own manager, the org chart would be filled
with their own name.
task-3093917
closesodoo/odoo#107546
X-original-commit: 53f9359d84a6bb500db693298a12608964a0a118
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This PR adapts the form views since the merge of #100570.
task-3002465
closesodoo/odoo#102750
X-original-commit: 03b7ed51d9bb1e0717d21cd6516f98e477a2c926
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The colspan attribute was missing for the form view making it look like
there was a label for the org chart widget, which should not be there.
closesodoo/odoo#100469
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit fixes an issue with the org chart since it was converted to
owl, the data would not be reloaded when changing from record to record.
Instead it would always show the data from the first record it ever
loaded.
closesodoo/odoo#99618
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
*: hr_org_chart,l10n_gcc_invoice_stock_account,mail,point_of_sale,
purchase,website,website_sale,website_sale_autocomplete,
website_slides_survey
Some commit have added old Bootstrap 4 classes after the merge of
Bootstrap 5.
Note that it's not possible anymore as the merge bot is now able to
detect it.
closesodoo/odoo#98349
Related: odoo/enterprise#30551
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2865713
closesodoo/odoo#93049
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
> Media query mixins parameters have changed for a more logical approach
> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).
https://getbootstrap.com/docs/5.1/migration/#sass
Task ID: 2766483
Part-of: odoo/odoo#95450
How to reproduce:
1: create two employees (A B) and two departments (C D)
2: Assign A as manager of C and B as manager of D
3: Assign C as A's department and A as A's manager
4: Change A's department to D -> A is deleted
This is due to `parent_id` being both a computed field and the source
field for a One2many. By changing the `department_id` the `parent_id`
also changed which results in it being report in the `onchange` method.
For some reason however the command sent by the orm is not `UNLINK` but
`DELETE` which results in the `active_id` being deleted.
TaskId-2711428
closesodoo/odoo#81153
X-original-commit: 3ec9dcc59b133bd1f5e100bd4d950e9ba87a3890
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
On the employee view there is a possibility to open a list of all the
employees managed by the current employee however the action contains
the key 'res_id' which makes both create and open action invalid. (the
manager is opened either way instead of the right action)
The action now also has a proper name instead of displaying `unnamed`,
aswell as containing the context necessary to default the manager as
expected. and the triple dots displayed when there are too many
employees has been replaced with `See All`.
TaskId-2648133
closesodoo/odoo#76905
X-original-commit: 2fe87bcfbf0c9b1f08cc2c38f0881de3738af537
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.
Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient
Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The attributes field.depends and field.depends_context are problematic
for sharing fields across registries, because they depend on the model's
registry class, which may vary from one registry to another. In order
to make computed fields shareable, we have to move those values away
from fields.
For the same reason, field.recursive should not be inferred, because its
value may depend on the registry, although it is generally not the case.
Moreover, the flag recursive=True is set on a field when field triggers
are determined (on the registry). A compute method may be called before
the flag is set (if no update has been done yet), and that can lead to
incorrect computations.
This happened in test TestUsers2.test_reified_groups in module 'base'.
The user groups view was apparently determined without the flag being
set, and the view depends on the recursive field 'trans_implied_ids',
which was not correctly computed.
We thus force developers to be explicit about recursive computed fields.
The code now logs a warning when the flag is not set up properly.
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit:
When loading a employee form, a write is done due to hr_org_chart
After this commit:
No write should be performed
closesodoo/odoo#42214
Taskid: 2150314
X-original-commit: 6e150ee19bb1f42c14d13218114ae9afbb84ebf4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía
closesodoo/odoo#41624
X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>