Commit Graph
154296 Commits
Author SHA1 Message Date
Denis Ledoux ef16e96255 [FIX] base, web: graph and pivot views requires more field descriptions
Following odoo/odoo@4636620004
`get_views` only pass the model fields included in the view architecture,
except for the main model when the search views is requested.
Because the search views requires all fields for the user to be able
to make advanced filters and advanced group by using any fields of the
model.

However, other views requires more field descriptions as well than
just the fields included in their architecture:
- the graph view requires all integer and float fields,
    to automatically add suggestions of measures in the measures dropdown
    menu. It's a bit like the search view, the user should be able
    to choose any measure available in the model
    (as long as this is integer or float fields)
- the pivot view requires all groupable fields,
    so the user can group by any groupable fields of the model.

The JS MockServer `getViews` is adapted to include the changes added by the above
revision as well as the current revision,
for the qunit tests suite to be able to reflect these API changes
from the server side.

closes odoo/odoo#100376

Related: odoo/enterprise#31427
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-17 00:51:34 +02:00
Stanislas Sobieski 82e8c74f1e [FIX] base: avoid indexing attachment on copy
When sending a mass mailing with a pdf attachment, the ir.attachment
is copied in the mail.composer for each email. Spending time and
resources in the indexing of the pdf. On copy that value is already in
the vals. This is especially true when attachment_indexation is
installed, processing the pdf documents can be costly with pdfminer.

It could also be done by overwriting the copu from ir_attachment but it
could happen a misuse of mass create of ir.attachment with the same file
has the same issue

closes odoo/odoo#100374

X-original-commit: 3d59cc849ed1040c08c4d1488866ba78c80990c8
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-17 00:51:32 +02:00
Aaron Bohy c31a159b4e [FIX] web: ListView: do not show handle column if grouped
The HandleField widget should not be displayed in grouped list
view, probably because we do not support the resequence feature
in this situation. This is the legacy spec.

In the wowl ListView, we didn't implement this restriction. As
a consequence, some list views (e.g. DebugMenu > Open View) didn't
render correctly when grouped, because the presence of the handle
field (which is aggregatable) didn't leave any space to display
the group titles.

closes odoo/odoo#100356

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-17 00:51:29 +02:00
Aaron Bohy 31c975ae94 [FIX] web: ListView: correctly format group aggregates
Before this commit, if a grouped list view contained an aggregatable
field (e.g. a float field) with a widget for which there's no
associated formatter (e.g. progressbar), the aggregate value was
left unformatted. It was for instance the case in the "My tasks"
list view, with the field "progress".

With this commit, the value is formatted according to the field
type, as expected.

Part-of: odoo/odoo#100356
2022-09-17 00:51:29 +02:00
Aaron Bohy f6bc1af630 [FIX] web: RelationalModel: wait for load before rendering
This commit fixes a race condition in the RelationalModel, which
can be identified by a ListView test [1], with a subset of addons
installed. Before the fix, we didn't wait for the record to be
reloaded before re-rendering the list. It could then crash because
the data object was empty (not yet filled with values).

This commit also prevent unnecessary reload/rerendering after an
urgent save, i.e. when the user is closing the tab.

[1] editing a record should change same record in other groups when
    grouped by m2m field

Part-of: odoo/odoo#100356
2022-09-17 00:51:29 +02:00
Kevin Baptiste b658171ea2 [IMP] hr_recruitment: allow multiple interviewers on applicant
Allow multiple interviewers on hr.applicant instead of a Many2One.

odoo/upgrade#3904
task-2939388

closes odoo/odoo#100338

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 23:49:43 +02:00
Xavier-Do 395b30e39d [IMP] tests, web: improve test_js end catching
Since #99912 logging an error message doesn't always end qunit tests.
This was mainly to allow to failfast logging qunit errors earlier
without stopping the tests in order to test all qunit anyway.

The logic was to have an end message that stops the test.

Unfortunately some errors will prevent the qunit suite to start
and the test will wait a 1800 long timer. An example was because of
a Missing dependencies. https://runbot.odoo.com/runbot/build/19306352

This new approach will avoid to stop only if the message looks like a
qunit failure and the final message is not there (to be sure).

closes odoo/odoo#100238

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-16 20:52:08 +02:00
Xavier-Do c61c4a4068 [IMP] web: log qunit for each tests
A previous version tried to log qunit by module but it is still possible
to have multiple random errors in the same test occuring with different
combination. This will help to avoid duplicating automatically
parsed errors in this case.

Also skips the message if it is emppty/undefined.

Part-of: odoo/odoo#100238
2022-09-16 20:52:08 +02:00
Simon Genin (ges) 7fcee56737 [FIX] web: fix grouped kanban hasData
Before: In a grouped kanban view, if all the groups are set to folded
by default, the view incorrectly thought it had no record. They were
simply not loaded and some method was not fetching the right data to
get the number of records.
It resulted in displaying the demo data and the no content helper,
making it impossible to see the actual data.

After: The number of records, despite no being fetch, is correctly used
in hasData and showNoContentHelper to fix the wrong behavior.

closes odoo/odoo#100234

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-16 20:52:04 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
Hubert Van de Walle (huvw) c1809ab7dc [FIX] mrp_workorder, sign: missing styles for the pdf_viewer
The class for the pdf_viewer field changed from o_field_pdfviewer to
o_field_pdf_viewer

closes odoo/odoo#100014

Related: odoo/enterprise#31237
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-16 19:17:08 +02:00
Valentin Vallaeys (vava) efbf0c0838 [IMP] payment: use ondelete instead of custom error
Use generic method on_delete instead of personalized one for the sake of
clarity and reproductibility.

task-2883630

closes odoo/odoo#99958

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-16 19:17:05 +02:00
Romain Derie af320bad34 [IMP] website: make code snippet more obvious to edit
Some (most?) people keep trying to double click on it to edit it.
The wording was not helping as "Replace this" doesn't really tell the
user how to do it. He actually has to click on the "Edit" button on the
right panel.

Personal experience, the first times I tried that code snippet, I didn't
find that button and it took me a few times before understanding how it
works.

The new wording and the shortcut button to edit it should be more clear.
Another idea was to allow dblclick to enter edit mode, but this seems
overkill and the 2 improvements here should be enough to make it easy to
figure.

Also added a comment about the `&#10` and one-liner, it is far from
obvious when reading the code..

task-2978786

closes odoo/odoo#99922

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-16 19:17:02 +02:00
Pierre-Yves Dufays e94d65519d [FIX] website: fix issue when creating account / relogging
When creating an account from the website (through the link "Don't have an
account?") while having been previously identified, the creation lasts a very
long time and ends-up with a http 502 error (actually a timeout). Same when
logging although being already logged.

Technical note: The problem was due to a database deadlock because of going
twice through authentication. A record was deleted in one transaction while
being written in another (_merge_visitor deletes it and _update_visitor_last
visit writes it but with different environment).

Task-2950241

closes odoo/odoo#99723

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-16 19:16:59 +02:00
Yannick Tivisse c70984f403 [ADD] base_install_request: Allow internal users requesting an app install
closes odoo/odoo#99438

Taskid: 2969678
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-16 19:16:54 +02:00
Yannick Tivisse 6c213203cb [IMP] base: Improve app uninstall wizard UX
Taskid: 2969678
Part-of: odoo/odoo#99438
2022-09-16 19:16:54 +02:00
Audric Onockx (auon) 62a7c0cee1 [FIX] resource: copy default company and calendar
Prior to this fix, when a ResourceMixin was copied
and a `company_id` set in its default values,
it was not taken into account, because
ResourceMixin.copy_data first copied self.resource_id
without default values, then set the company of it
into the default values for its own copy.
Same went with `resource_calendar_id`,
just copying the calendar of its resource.

With this fix, if present, we first set these two values
in the Resource default values (`company_id` and `calendar_id`)
and only then copy them in the ResourceMixin default values
(as `company_id` and `resource_calendar_id`).

closes odoo/odoo#93823

Related: odoo/enterprise#28490
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-16 19:16:45 +02:00
Audric Onockx (auon) 51a4b978f2 [IMP] hr_timesheet : force active employee at timesheet creation
At creation of aal, check that timesheets have an active employee.

task-2884736

Part-of: odoo/odoo#93823
2022-09-16 19:16:45 +02:00
Rémy Voet (ryv) c80265b91c [IMP] stock: add index on stock.quant.package_id
Because `quant_ids` (`stock.quant.package`) is a one2many inverse of
`package_id` and some depends use it.
It is important to have in index on package_id on `stock.quant`

closes odoo/odoo#100371

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-16 16:20:59 +02:00
Arthur Detroux (ard) 085d7ed6d4 [FIX] website_slide: wait for the url to be checked before clicking
In the tour course_publisher_standard and course_publisher, the triggers
were not making sure that the url was validated before clicking on the
button, therefore clicking on a disabled button. This resulted in tests
randomly failing on runbot.

This commit adds an extra trigger to make sure the URL has been
validated.

runbot-4060

closes odoo/odoo#100369

X-original-commit: 2795d33d756e3101537c8ed0a017e6cc22afb1db
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-16 16:20:56 +02:00
Jorge Pinna PuissantandLucas Perais e234810faa [FIX] web: SettingsPage propagate NoContentHelper slot
Before this commit, we propagate all the slots to the SettingsPage. This
could raise an issue if the default slot (propagated) has a content, for
more information see: https://github.com/odoo/owl/issues/1256

Now, to avoid this, we only propagate the slots that are used on the
SettingsPage component, ie: NoContentHelper.

closes odoo/odoo#100362

Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
2022-09-16 16:20:49 +02:00
Kevin Baptiste 0ae8a6b03a [FIX] hr: fix typo in compute name
There was an extra `r` in the name of the super method called, which
produces a traceback.

closes odoo/odoo#100361

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 16:20:47 +02:00
niai 9d25ebf39c [FIX] point_of_sale: iot display is not connected
Before this commit
==================
When the IoT customer display and customer display(without IoT) are set in the pos shop settings.
When we open the POS session it gives a warning "Connected, not owned" and nothing is displayed in the IoT display

After this commit
=================
When the IoT customer display and customer display(without IoT) are set in the pos shop settings.
When we open the POS session it will connect to the IoT display successfully.

Technical
=========
There is a wrong field name used in the js file so the IoT display is not connecting

closes odoo/odoo#100357

X-original-commit: a9ad8170145cbeae182f71943a589872a13fe77e
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2022-09-16 16:20:44 +02:00
qsm-odoo 53724aa3cc [IMP] website: review frontend mini UI "Edit" button
The mini UI on the frontend as a connected backend user was a bit
confusing: the "Edit" button used the exact same design and wording as
the "Edit" button in the backend but it had not the same effect as it
did not enter edit mode but just redirected the user to the website
preview (client action iframe).

We still want the same behavior, we just needed another button design:

- Change the label from "Edit" to "Editor".

- Change the "pencil" fa icon with the website app icon (same as app
  switcher in enterprise).

- Use a dark color instead of the primary color. This reuses a dark
  color of the website edit mode.

closes odoo/odoo#100355

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-16 16:20:42 +02:00
Zelong Lin 1c73df728e [IMP] mail: remove legacy Dialog from call_view
The Dialog is no more used in the call_view.
Just cleanup the code of the import

task-2783069

closes odoo/odoo#100352

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-16 16:20:39 +02:00
Antoine Vandevenne (anv) 3bead2cbea [CLN] payment: code cleanup
This commit removes unused imports and renames some confusing variable
names and helper texts that were changed with commit f7b8f075 when
renaming the term "acquirer" to "provider".

closes odoo/odoo#100348

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-16 14:26:05 +02:00
Antoine Vandevenne (anv) e345204345 [FIX] payment: fix crash when uninstalling payment providers
Part-of: odoo/odoo#100348
2022-09-16 14:26:04 +02:00
Camille Spiritus 4c540d6f17 [FIX] account : fix payment term example display
The payment term example display was not functional anymore and always displayed 0.

This was because of a inversed condition.

Took the opportunity to fix the tax reduction description.

closes odoo/odoo#100345

Signed-off-by: Laurent Smet <las@odoo.com>
2022-09-16 14:26:01 +02:00
Lucas Lefèvre afec5e4f15 [IMP] spreadsheet_dashboard_*: update dashboards
closes odoo/odoo#100343

Related: odoo/enterprise#31407
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-16 14:25:59 +02:00
Lucas Lefèvre 0f89912d5b [ADD] spreadsheet_dashboard_purchase_stock: add puchase dashboard
Part-of: odoo/odoo#100343
2022-09-16 14:25:58 +02:00
William Braeckman 3ed96f292e [FIX] loyalty: include date_to in program's validity
closes odoo/odoo#100339

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-16 14:25:53 +02:00
Thomas Lefebvre (thle) 84a384e812 [FIX] mrp: bill of material overlapping
Steps to reproduce:
- install the mrp_plm module (Product Lifecycle Management app);
- create a product with a long name;
- create a bill of material for that product;
- create a manufacturing order and select that bill of material;
- confirm the manufacturing order.

Issue:
The value of the bill of material field overflows into the second column.

Cause:
There is a problem in the use of classes in the .xml file (o_row and d-flex).

Solution:
Change the classes used (Bootstrap and Odoo classes) to have the correct rendering.

opw-2966863

closes odoo/odoo#100305

X-original-commit: 7a7c6870a2006edab8ffe62c016e5eb0681a46f8
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-09-16 14:25:50 +02:00
Nicolas Bayet d1d3332152 [FIX] web_editor,mass_mailing: fix history in new mass massmailing
Before this commit
When creating a new mass_mailing and hitting multiples times enter, the
content was reset.

task-2985162

closes odoo/odoo#100284

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-16 14:25:48 +02:00
Lucas Lefèvre d08982684b [MOV] spreadsheet: move RecordSelector template to its own file
closes odoo/odoo#100246

Related: odoo/enterprise#31365
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-16 14:25:41 +02:00
Lucas Lefèvre d1160cf45a [REF] spreadsheet: rename X2ManyTagSelector component
It feels more natural with the new name;
The "X2ManyTags" things is because it used to use
a many2many tags fields under the hood.
1) It's no longer true
2) It's an implementation detail

Part-of: odoo/odoo#100246
2022-09-16 14:25:41 +02:00
Lucas Lefèvre 79b9c0e03e [REF] spreadsheet: convert record selector to wowl components
The X2ManyTagSelector component still used a legacy many2many tags
widget under the hood and an adapter layer on top.
With this commit, it uses new components

Part-of: odoo/odoo#100246
2022-09-16 14:25:41 +02:00
Tiffany Chang (tic) 02ad90ee75 [FIX] stock: correctly trigger loc warehouse compute
Commit [1] made it so the computed stock_location.warehouse_id field is
stored. Unfortunately it did not correctly add the additional depends
value of `location_id` so when this value is changed after the record
has been initially created+saved without a location_id, the warehouse
will never be correctly computed.

[1] https://github.com/odoo/odoo/commit/9978bcb366d0ea48ed25a7891e0c7653a2f96bfb

Followup to task: 2882539

closes odoo/odoo#100219

Related: odoo/upgrade#3901
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-16 14:25:35 +02:00
Tiffany Chang (tic) 6d28c9c2e5 [IMP] mrp_subcontracting: hide is_subcontracting_location setting
The `is_subcontracting_location` setting is intended only for
complicated route/rule use cases therefore we make it visible
only in debug mode to prevent users from setting this value and
unintentionally creating a lot of new routes/rules unnecessary.

Additionally, it is expected that users who previously set these up
manually will not want their custom rules/routes changed but will still
need the existing behavior to continue, so we restore the previous check
for subcontracting locations set as sublocations of the primary company
subcontracting location.

Follow up to task: 2720393

Part-of: odoo/odoo#100219
2022-09-16 14:25:34 +02:00
tsm-odoo 2507be3a78 [FIX] bus: fix incorrect login colors
Before [1], the web_editor module was auto installed. After that commit,
the bus module has been added to the web_editor dependencies. Since
the bus module is not auto installed, the web_editor module dependencies
are not met which means the login colors are wrong (blue instead of green).

This commit fixes this error by adding the `auto_install` flag to the
bus module.

[1]: odoo@a5623d24b77f523aeeafbb8c2bfaf27241ef3c8e

closes odoo/odoo#100212

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 14:25:31 +02:00
Alexandre Kühn e975a9849e [IMP] mail: make emoji picker available in knowledge
Introduce header actions so that emoji picker in knowledge
can have an action to remove emoji.

Task-2980528

closes odoo/odoo#100010

Related: odoo/enterprise#31231
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-09-16 14:25:29 +02:00
Dossogne Bertrand f9d4c74de9 [IMP] website_hr_recruitment: fix job apply page colors
On the application page, too much elements are set
in the primary color, creating confusion as of where is
located the main page action.

Also changes the phone field in the job application page
to be stored as a mobile phone instead of a home phone.

task-2980889

closes odoo/odoo#99976

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 14:25:23 +02:00
Dardenne Florent (dafl) af89b46c5b [IMP] web: DomainSelector: enhance user experience
The purpose of this commit is to improve the domain selector UX with
multiple little changes:

- The model field selector popover is now autofocused when opened
- Removal of a div that appeared during a hover on "add leaf" and
"ellipsis button"
- Caret icon next to the root node selector
- Minor CSS changes

task-2861497

closes odoo/odoo#99321

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-16 14:25:21 +02:00
Dardenne Florent (dafl) bd8afccf16 [IMP] web: Dropdown: add caret props
Before, the small "caret" to the right of the dropdown was only
 displayed if the current Dropdown was a child of another Dropdown.

It is sometimes necessary to display this caret in a parent
 `Dropdown` in order to make the user understand that there is a
  dropdown if he clicks on the text.

Now, it is possible thanks to a props to display manually this carret
 if desired.

Part-of: odoo/odoo#99321
2022-09-16 14:25:20 +02:00
Odoo's Mergebot 4e82c45abd [IMP] core: store translated fields as JSONB columns
[IMP] core: store translated fields as JSONB columns

Translated fields no longer use the model ir.translation.  Instead they store
all their values as JSON, and store them into JSONB columns in the model's
table.  The field's column value is either NULL or a JSON dict mapping language
codes to text (the field's value in the corresponding language), and must
contain an entry for key 'en_US' (as it is used as a fallback for all other
languages).  Empty text is allowed in translation values, but not NULL.

Here are examples for a field with translate=True:

    `NULL`
    `{"en_US": "Foo"}`
    `{"en_US": "Foo", "fr_FR": "Bar", "nl_NL": "Baz"}`
    `{"en_US": "Foo", "fr_FR": "", "nl_NL": "Baz"}`

Like before, writing False to the field makes it NULL, i.e., False in all
languages.  However, writing "" to the field makes its value empty in the
current language, but does not discard the values in the other languages.

Here are examples for a field with translate=xml_translate:

   ` NULL`
    `{"en_US": "<div>Foo<p>Bar</p></div>", "fr_FR": "<div>Fou<p>Barre</p></div>"}`

Change for callable(translate) fields: one can now write any value in any
language on such a field.  The new value will be adapted in all languages, based
on the mapping of terms between languages in the old values.  Basically the
structure of the value must remain the same in all languages, like before.

Reading a translated field is now both simpler and faster than the former
implementation.  We fetch the value of the field in the current language by
coalescing its value with the 'en_US' value of the field:

    `SELECT id, COALESCE(name->>'fr_FR', name->>'en_US') AS name ...`

The raw cache of the field contains either None or a dict which is conceptually
a subset of the JSON value in database (except for missing languages).  For the
sake of simplicity, most cache operations deal with the dict and return the text
value in the current language.

Trigram indexes have been adapted to the new storing strategy, and should enable
to search in any language.  Before this change, only the source value of the
field ('en_US') could be indexed.

Computed stored translated fields are not supported by the framework, because of
the complexity of the computation itself: the field would need to be computed in
all active languages.  We chose to not provide any hook to compute a field in
all languages at once, and the framework always invokes a compute method once to
recompute it.

Code translations are no longer stored into the database.  They become static,
and are extracted from the PO files when needed.  The worker simply uses a cache
with extracted code translations for performance.  This is reasonable, since
fr_FR code translations for all modules takes around 2MB of memory, and the
cache can be shared among all registries in the worker.  Changing code
translations requires to update the corresponding PO file and reloading the
worker(s).

Performance summary:
(+) reading 'model' translated fields is faster
(+) reading 'model_terms' translated fields is much faster (no need to inject
     translations into the source value)
(+) searching translated fields with operator 'ilike' is much faster when the
     field is indexed with 'trigram'
(+) updating translated fields requires less ORM flushing
(-) importing translations from PO files is 2x slower

Some extra fixes:
- make field 'name' of ir.actions.actions translated; because of the PG
   inheritance, this is necessary to make the column definition consistent in
   all models that inherit from ir.actions.actions.
- add some backend API for the web/website client for editing translations
- move methods get_field_string() to model ir.model.fields
- move _load_module_terms to model ir.module.module
- adapt tests in test_impex, test_new_api
- because env.lang is injected into SQL queries, its returned value is
   now guaranteed to correspond to a valid active language or None
- remove wizard to insert missing translations (no longer makes sense)

closes odoo/odoo#97692

Task-id: 2081307
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-16 14:25:13 +02:00
hiroh-odoo 85a485034b [IMP] sale_(project): improve ux' for project
Purpose of this PR to improve the generic usage of project app

So in this commit done the following changes:
 - when a project is archived, the 'tasks' stat button should
   count/show archived tasks
 - when delete project it's milestone should also be deleted automatically.
 - project.task > blocked by notebook: it should be possible to select tasks
   in projects that are not allowing 'task dependencies'
 - project.task portal form view: hide the description if it is empty

task-2853991

closes odoo/odoo#94138

Related: odoo/enterprise#28654
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-16 14:25:04 +02:00
Pierre Rousseau ee3ff4064e [IMP] spreadsheet_dashboard: re-introduce border
Border was incorrectly removed here: e55cc83068
This commit re-introduce it.

closes odoo/odoo#100340

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-09-16 11:12:44 +02:00
Xavier-Do f68f7fc2e6 [FIX] base: use all date for assetsbundle version
The current asset_bundle version uses the last modified date.
This can be problematic in some case.

Even if it is a long time issue, the problem was rediscovered on runbot
with a commit being in the future. Runbot will export all file and set
the write date of the file to the commit date. The main purpose is to
have deterministic bundle version between different builds. This also
allows to generate assets bundle once at install for all post install
subbuild.

The issue here is that the commit date was greater than now(), meaning
that some tests setting custom css in attachment won't trigger the
regeneration of assets bundle. This wasn't really noticeable before
assets pregeneration.

This is not the first time strange issues occurs because of the
last modified logic.

This commit combined all last_modified to generate the bundle
version.

The current adaptation is quick and dirty and this will be reworked in
another post 16.0 freeze assets refactoring and cleanup.

closes odoo/odoo#100160

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-16 11:12:34 +02:00
Ruben Gomes 9ff1f4000b [FIX] l10n_hu: fix COA, taxes and tax report
Fix chart of accounts, taxes, tax report and fiscal positions for Hungarian localization

closes odoo/odoo#97883

Task-id: 2816907
Related: odoo/enterprise#30274
Signed-off-by: Ruben Gomes <rugo@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-16 11:12:29 +02:00
Damien Bouvy e0522e0bf5 [IMP] hr_expense: stop tracking the approver on expenses
The field is related towards the 'manager' field of the expense sheet,
which means that when the approver is suggested automatically based
on hr data, the expense records get written a value for this field
(which is not in the view) which gets logged as:
- None -> Mitchell Admin (Approved By)

which seems to suggest that:
- the expense has been approved (it has not, a report was created)
- Mitchell Admin has approved: it may not be him (as when approving,
the 'manager' field does not log who did the approval but who was
supposed to initially)

Disabling tracking for this field (which contained no actionable
information at best, and incorrect suggestions at worst) makes this
problem go away.

closes odoo/odoo#100241

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 10:09:39 +02:00
Achraf (abz) 8d4bb8c109 [FIX] web: Allow to hide model in ReferenceField
In legacy, hide_model attribut on FieldReference was used to hide
the model input, but it was not implemented in ReferenceField
(new version).

closes odoo/odoo#99819

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-09-16 10:09:26 +02:00