Commit Graph
157157 Commits
Author SHA1 Message Date
Prakash Prajapati 58b743b28d [FIX] project: fix the traceback when we created task from project sharing
Reproduction steps:
     - Install project module
     - Create project and task
     - Share the project
     - Open the  portal
     - Open the project sharing list view
     - Create a new task

Before this fix:
      traceback occurs when we create task from project sharing.

Why traceback occurs:
    In `portal_chatter_init` route both res_id and res_model are mandatory.res_id
    is undefined during a task created from project sharing.

task-3012469

closes odoo/odoo#105392

X-original-commit: 2c2b7d94bbbe6f785c68bb6a479bc1aa4eceb668
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-15 00:17:56 +01:00
Pallavi Savaliya 826d6cf5a6 [IMP] sale_timesheet: prevent recompute allocated hours of project
Before this commit, the allocated hours of a project are set when
the linked sale order are confirmed. And then, the project manager
can change the allocated hours. However, if the sale manager
changes a qty in the sale order, then the allocated hours of
the project are recomputed according to the changes made in the
sale order and so the allocated hours set by the project manager
are erased.

This commit removes the compute of allocated hours and so only
the default value computed when the linked sale order is
confirmed are set to the allocated hours field of the project.

task-2955983

closes odoo/odoo#105727

X-original-commit: 318c07ec1e12940434d83b84d58603b1e69f9b14
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-14 22:14:49 +01:00
Prakash Prajapati 3a1afcc20a [FIX] project: filter projects for Late Milestones filter
Before this commit, when the user uses the `Late Milestones`
filter in the project views, all the projects in the views
are used, but some projects could have the feature disabled
and so those ones should be ignored in the filtered.

This commit filters the projects to only apply the filter
on those projects and not also the ones without the feature
enabled.

task-3033041

closes odoo/odoo#105709

X-original-commit: e8ee1e370ec3c6b4bc13d0d5da6b242af1e9b9c3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-14 18:17:52 +01:00
Prakash Prajapati e2b52e6358 [FIX] project: hide "Milestone" action button in project kanban card
Before this commit, when the Milestones feature is globally enabled
in the project app, the "Milestones" action button displayed in the
dropdown of the kanban card are always visible even if the project
has the feature disabled in its settings.

This commit changes the visibility of that action button to also
take into account the settings of each project.

task-3033041

X-original-commit: 05485bbd192c2316267d38934544d7f08ff4e9e8
Part-of: odoo/odoo#105709
2022-11-14 18:17:52 +01:00
Sébastien Theys c0f78e9d27 [IMP] base, web, mail: clean and move notification_alert
The code does not actually depend on mail features and it is intended to be used
in the base form view of user.

closes odoo/odoo#105415

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-14 18:17:49 +01:00
Bastien (bvdn) 0a23462728 [IMP] project: improve user experience
This commit introduces the following improvements:

- In `My Tasks` list view: the personal stage is displayed instead of the stage for private tasks
- When copying a stage, the new stage name is appended with `(copy)`
- A default filter 'open task' is added in the subtask notebook search
- A default filter on the project is set on the search of the `parent_id` task field

task-3024152

closes odoo/odoo#103318

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 18:17:44 +01:00
Nicolas (vin) 9168a8e73b [FIX] website_sale: make add_to_cart_snippet_tour run as expected
Add a setUpClass with a dummy payment provider to ensure that at
least one is always available when the tour is running, and set
the company country_id to None before starting the tour to avoid
any country dependant fields to block the tour during the checkout
process.

closes odoo/odoo#105700

X-original-commit: 779965fbf0471f2b003692f1afa541864a396651
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-14 17:18:11 +01:00
niyasraphy 08094099dc [FIX] hr_presence: wrong config key in get_param method
closes odoo/odoo#105699

X-original-commit: c3706f5caeb7cd8caeb0c58e253e31de1822d03e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 17:18:02 +01:00
Julien Castiaux 1219f043fe [FIX] http_routing: should redirect only for multilang
Define a route that is website but not multilang, e.g.

    @route('/example', website=True, multilang=False)

Login to the frontend, change the website lang to another (non-default)
lang (e.g. install french, keep english as default lang, log in the
french website) then access the '/example' controller by typing it
directly in your address bar.

You are being redirected to '/fr/example', you should not.

This commit restore the behavior pre-httpocalypse, that is the address
is kept as-is.

Note: in the comment, the 4th and 5th cases were inverted, we use this
commit as an opportunity to reorder the two.

closes odoo/odoo#105686

X-original-commit: be7a02917a66136a8d3b601d61a898b0419ff79d
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-11-14 17:17:59 +01:00
Hed Shefer 930b2f015e [IMP] l10n_il: improve CoA, fiscal positions, taxes and translations.
* Fix wrong translations for taxes, accounts and tax groups.
* Remove auto_apply for fiscal position israel, because partner from israel can also lead to other fiscal positions (self invoice, eilat,etc).
* Remove the duplicate account Income tax withheld - customers

closes odoo/odoo#105676

X-original-commit: 2e21514eeaabd00aadd80355ccc327667a2c4d14
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-11-14 17:17:53 +01:00
Ahmed Khalaf ead2e5e964 [IMP] stock: json widget no longer changes props
This commit changes the json widget to no longer edit the `props` of the
component as it might cause reactivity issues.

closes odoo/odoo#105663

X-original-commit: eb4ae1d79c455b1b9e163beebb98fb1935834194
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-14 17:17:50 +01:00
Audric Onockx (auon) 76b513917b [IMP] web,project: add and modify commands in the palette
\- Add 'Move to next stage'
Generic, we think it is a useful tool to have anywhere.

\- Change the 'Set priority...' command
to 'Set priority as Low/High' :
Only 1 command will be available with the 'not current' priority.
Specific, because it is used on selection fields,
which means there could be more than 2 options.

\- Transform the 'Set kanban state...' command into three commands
Generic. 2 commands will be available.
One for each 'not current' kanban state.

task-2857447

closes odoo/odoo#91821

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 17:17:47 +01:00
FrancoisGe 1c5fe423f2 [IMP] web: add isAvailable in options command
This commit adds the isAvailable option to the command. If you set this
option, then it determines if the command should be displayed or not
in the command palette.

Why add this option?
We want to allow a component to define a command that will be displayed
according to the internal state of the component

Part-of: odoo/odoo#91821
2022-11-14 17:17:47 +01:00
FrancoisGe 0340769af2 [FIX] web : indeterministic crash in Many2ManyTagsField tests
The goal of this commit is to fix indeterministic crashes
in Many2ManyTagsField test suite.

We could see that the wrong helper was used in some tests. We used
selectDropdownItem after an editInput on this same field.

Cause of the error:
editInput => event input debounce which causes the autocomplete to open.
selectDropdownItem => event click which causes the autocomplete to open.
                     After this event, a second click takes place to
                     select the dropdown item (call to clickOpenedDropdownItem).

The setTimeout is not patched, it is possible that the input event takes
place after the click which does not cause any crash. But if the click
event happens after the input then the autocomplete is closed before
the dropdown item is selected.

To solve this, we will patch the setTimeout and we will use only
clickOpenedDropdownItem to select the dropdownItem.

We also patched the setTimout in all tests to avoid indeterminate
behavior related to the debounce in the autocomplete input.

closes odoo/odoo#105693

X-original-commit: 36f6e6801166865e0c8047c1c2be43ef8826581f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-14 16:21:59 +01:00
FrancoisGe 473c4817e1 [FIX] web: test: ensure to wait for dialog to be opened
Before this commit, the modified test sometimes failed on runbot.
We need to wait for an extra tick, because the dialog might be
rendered in another animation frame that the crashing client
action.

X-original-commit: fb73b9f08fbb315544b3a4fce727a4bf2fbaa1bc
Part-of: odoo/odoo#105693
2022-11-14 16:21:59 +01:00
niyasraphy 46d015abd8 [FIX] crm_sms: remove unused models directory
crm_lead.py file does not exist, but models directory is not imported. We
can safely remove the init and the models directory.

Oversight of odoo/odoo@5d4208d44d

closes odoo/odoo#105690

X-original-commit: cf857b86b2073d1e83a5e3e5b009d67058116b69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 16:21:55 +01:00
Joseph Caburnay 7b61eefc0e [FIX] web: should keep background of folded column
**Issue:**

When moving a record in a kanban view from one column to another,
it is possible to keep holding the record, hover it in one column
for a moment, then move again to another column then eventually
drop the record. Doing this where a folded column is the intermediate
column results to visual issue, such that the darker highlight of
a folded column is lost.

The desired behavior is to keep the background color of a folded
column.

**Solution:**

When moving a record, the hovered column is highlighted, and right
after leaving the column, we remove the highlight. And we are doing
this without exempting the folded column, thus, its darker highlight
is lost during the record-moving-hovering process.

Instead of adding/removing .bg-100 during unhover/hover on each
kanban column to make sure of the "greenish" tint of the column when
hovered, we just make background of the .o_kanban_hover to be important.

closes odoo/odoo#105689

X-original-commit: fdd7f017c73718c9582256dde3124dd2655aeb01
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-14 16:21:52 +01:00
miad-odoo 7a5ee6e6f9 [FIX] crm: add user_company_ids to tree view
Before this commit, when using the `many2one_avatar_user` on the `user_id`
field of the crm tree views, an error was thrown because the domain of `user_id`
refers to  `user_company_ids` which the view did not have access to, so it
wasn't yet computed.

The field was added in invisible to the tree views so that it can be computed
before being accessed.

Task-3053146

closes odoo/odoo#105688

X-original-commit: 558607d98798d6a55adbcd98a6648a888286c3c9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 16:21:49 +01:00
FrancoisGe aaefe77c95 [FIX] *: override save checks that the save is valid
The goal of this commit is to avoid the execution of code depending
on the validity of the save of a Record.

Before this commit, several override save functions in Record execute
code after the record's save without checking if the record's save has
taken place.

Override before:
export class NewRecord extends Record {
    async save() {
        const isSaved = await super.save(...arguments);
        // doAction
        return isSaved;
    }
}

Override after:
export class NewRecord extends Record {
    async save() {
        const isSaved = await super.save(...arguments);
        if (isSaved) {
            // doAction
        }
        return isSaved;
    }
}

How to reproduce the problem:
    Go to a form view with a Record having its save override function.
    Edit a record in such a way to have an invalid field
    Click on the save button

Before this commit:
The doAction is executed

After this commit:
The doAction is not executed

Real use case
- Go to the form view of a lead in CRM
- Change stage
- Clear the name field
- Click on save button

Before this commit:
A call to get_rainbowman_message is made

After this commit:
No call to get_rainbowman_message is made.

closes odoo/odoo#105687

X-original-commit: 46b93da545b52496196624712c44599fd6467f4e
Related: odoo/enterprise#33913
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-14 16:21:44 +01:00
Gert Pellin 1d9dd51913 [CLA] Add CLA for gert@pellin.be
closes odoo/odoo#105679

X-original-commit: 987137dc911c9ff525bf06a39b15e0ba35172c8c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-14 16:21:41 +01:00
Alexandre Kühn b0116e4523 [IMP] web, mail: add mail module to prettier and linter
closes odoo/odoo#105677

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-14 16:21:39 +01:00
Antoine Vandevenne (anv) 424b77b6a8 [FIX] payment_adyen: update translatable terms
closes odoo/odoo#105664

X-original-commit: e0c16914d7602763b52a2b76c2e120b85927c42c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-11-14 16:21:36 +01:00
Ivan Yelizariev 8b027b69ce [FIX] payment_adyen: add missing fields to api call
It's needed to use "Automatic Risk assessment" feature in Adyen.

Technical docs:
https://docs.adyen.com/risk-management/configure-manual-risk/required-risk-field-reference

opw-3004646

X-original-commit: a8a166086b41692af49e0a9d4c44c0afdc0e05d4
Part-of: odoo/odoo#105664
2022-11-14 16:21:36 +01:00
Benoit Sociasandqsm-odoo fc61a2da5a [IMP] base: advertise view's active behavior in <template> vs <record>
Upon updates, the `active` field of `ir.ui.view` behaves differently
depending on whether the view is defined by using the `<template>` tag
or the `<record>` tag.

When using `<record>`, it behaves like any other field and gets updated
with the new value (notice that for qweb view, you should rarely rely
on this as if users customized those views with the website builder,
they are duplicated (COW)... updating the active field without migration
script would then be a source of errors).
When using `<template>`, it is not updated since [1], except for new
records since [2].

This commit adds a comment to the `active` field to help developers find
out about this difference.

See this [discussion].

[1]: https://github.com/odoo/odoo/commit/2d296cb77922d33be2dc45b900191fac34bda429#diff-175c28787c272a219b9275f79262a48af9aa029e718f45077fd609737559e84eR803-R804
[2]: https://github.com/odoo/odoo/commit/f1c70d4cc943ac4eb81a85a9dc005de34cd2060a#diff-175c28787c272a219b9275f79262a48af9aa029e718f45077fd609737559e84eR801-R804
[discussion]: https://github.com/odoo/odoo/pull/104836#discussion_r1013155860

Related to task-2963840

closes odoo/odoo#105647

X-original-commit: 454a47fdc1583bb7f77708e483606782743537b2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-11-14 16:21:29 +01:00
Ivàn Todorovich 382d6924b8 [IMP] core: remove useless mapped call when calling filtered with a str
The mapped call is supposed to populate the cache, but that's already
taking care of by prefetching. It ends up adding an overhead instead.

The perf improvement is more noticeable on large recordsets.
For example, on a database populated with 100k res.partner records.

Before:

.. code-block:: python

    partners = env["res.partner"].search([])
    partners.filtered("name")  # warm up
    timeit.timeit(lambda: partners.filtered("name"), number=10)
    # result: 7.15

After:

.. code-block:: python

    partners = env["res.partner"].search([])
    partners.filtered("name")  # warm up
    timeit.timeit(lambda: partners.filtered("name"), number=10)
    # result: 4.67

closes odoo/odoo#105350

Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-11-14 16:21:24 +01:00
Benoit Socias 5c08d0a47c [FIX] website: not mention "model" in tooltip
This commit updates the tooltips of disabled form field's duplicate &
remove buttons so that they do not reference the concept of "model".

task-2950433

closes odoo/odoo#105278

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-11-14 16:21:21 +01:00
jbw-odoo 82249b1c04 [FIX] account_edi: tax round globally
Prevent "per line" rounding taxes when tax rounding method is round globally.

Manual fwd port of https://github.com/odoo/odoo/commit/46504495664be211cf2ddbf2fa7532c022b1e5f0

closes odoo/odoo#105662

Task: opw-2963947
X-original-commit: c2b8ab136a5df4d70274d4abc5ceb14fa88b4149
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2022-11-14 15:21:26 +01:00
niyasraphy 4bf848e25c [FIX] base: show result separator only in done state
closes odoo/odoo#105660

X-original-commit: 68f29fda5d6d54719cf3abd5bdf38c810f39f854
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-14 15:21:22 +01:00
Sébastien Theys ea7d0435b2 [IMP] mail, im_livechat: move variables only used in livechat
closes odoo/odoo#105658

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-14 15:21:18 +01:00
Antoine Guenet d23f06ae78 [FIX] web_editor: properly copy editor content
When copying some list items in the editor and pasting it back into it,
we lost their parent list, leading to paragraphs being pasted rather
than a list. This restores the list.

task-3050150

closes odoo/odoo#105386

X-original-commit: 2333d8470df2fac80247e6f39d740a29f1eeb561
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-14 15:21:12 +01:00
Antoine Guenet 0aa4b317cd [FIX] web_editor: handle the cut clipboard event within the editor
The feature of not altering pasted content that was copied from the
editor was not enabled for content _cut_ from the editor.

X-original-commit: d79ed0298a8366ca51b1ca54fe725c7a55860254
Part-of: odoo/odoo#105386
2022-11-14 15:21:12 +01:00
Thomas Lefebvre (thle) ef300d6463 [FIX] website_slides: error message on elearning course preview
Steps to reproduce:
    - go to eLearning app;
    - select a course and go to its website page;
    - the course may (or not) be published;
    - join the course;
    - click on a course material which is not pusblished.
    (the course material does not have to be completed before)
    (on loading slide on full-screen mode)
    (in debug mode, it is not a "pop-up" but an classic error)

Issue:
   A message "Odoo Session Expired" appeard.

Cause:
   The course is not marked as completed. The `canSelfMarkCompleted` attribut is always False and will raise the error because we will continue the flow as if the slide is completed and this is not the case.

Solution:
   We have to test this `canSelfMarkCompleted` attribut to decide whether or not we continue.

opw-3033797

closes odoo/odoo#105379

X-original-commit: 6ca729d0ada58f2d7db736ecb4fa3aa98fbc9068
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-11-14 15:21:07 +01:00
Antoine Guenet c7cb454a67 [FIX] web_editor: allow pasting nested lists
The class that Odoo adds to nested list items to display them nicely was
not whitelisted for pasting so pasting nested lists ended up looking
ugly.

task-3050150

closes odoo/odoo#105378

X-original-commit: edfc8f318529a7e513c5ef1631461a5dc0258d4f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-14 15:21:02 +01:00
Vincent Schippefilt b7371660eb [IMP] base: add a many2one from ir.ui.view to model
When using the view "edit view" on the interface as administrator,
the user can see and modify the model of the view as a string, but
cannot navigate to the model easily or edit the model field
by selecting the model in a list.

This pull request adds the possibility to view and edit the model field
as a many2one.

closes odoo/odoo#105356

Task-id: 3007619
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-14 15:20:58 +01:00
FrancoisGe f3fc533401 [FIX] web: search in a m2o block the ui
Before this commit, performing a search in a m2o can block your ui
despite the result already being displayed.

Why?
When you perform your search in a m2o, a set of RPC queries are made
with the different search values (name_search). If the last search value
(the one that will be used by the m2o in its autocomplete) has already
been resolved, but one of the other RPCs has still not been resolved,
then the screen will remain blocked until all the rpc's have been resolved.

Solution:
Since we are only interested in the last rpc, we will cancel all the
others. So with each new rpc, we will cancel the previous one.

How to reproduce:
- Go to a form view with a m2o field
- Edit this field +- slowly (several rpc will be done with different values)
- Receive the result of the search. (The autocomplete is displayed with
     the right values)

Before this commit:
If one of the other rpc's is not yet resolved, the ui will block
until all rpc's are resolved.

After this commit:
The ui will not block.

closes odoo/odoo#105286

X-original-commit: 1700416551725a70eca5597b6e106b43282c00d2
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-11-14 14:20:45 +01:00
FrancoisGe 86824d8e0c [FIX] web: search in a m2o block the ui
Before this commit, performing a search in a m2o can block your ui
despite the result already being displayed.

Why?
When you perform your search in a m2o, a set of RPC queries are made
with the different search values (name_search). If the last search value
(the one that will be used by the m2o in its autocomplete) has already
been resolved, but one of the other RPCs has still not been resolved,
then the screen will remain blocked until all the rpc's have been resolved.

Solution:
Since we are only interested in the last rpc, we will cancel all the
others. So with each new rpc, we will cancel the previous one.

How to reproduce:
- Go to a form view with a m2o field
- Edit this field +- slowly (several rpc will be done with different values)
- Receive the result of the search. (The autocomplete is displayed with
     the right values)

Before this commit:
If one of the other rpc's is not yet resolved, the ui will block
until all rpc's are resolved.

After this commit:
The ui will not block.

closes odoo/odoo#105269

X-original-commit: 9917d841fa38ccc1e6d67875a665494dc22ef92f
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-11-14 14:20:42 +01:00
niyasraphy e00557fa3b [FIX] website_crm_iap_reveal: add rec_name to have a better breadcrumb
Having a rec_name allows to avoid having breadcrumb items like
crm.reveal.view(1) .

closes odoo/odoo#105091

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 14:20:39 +01:00
Patrick Hoste 2504a0bd2b [FIX] mass_mailing: change favourite filter helper icon
This commit changes the favourtie filter helper icon to
match the one in the mailing.mailing view.

Task-3048050

closes odoo/odoo#104756

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 14:20:36 +01:00
amdi-odoo f1cfe4d410 [FIX] survey: fix matrix preview
Fix the matrix question type preview display
on small and medium screen size.

Task-3006768

closes odoo/odoo#103294

X-original-commit: 8b008e01bc2c5effe3542ec30ccfe31dbae6840e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 14:20:33 +01:00
Julien Castiaux c726d81d98 [IMP] website_sale_digital: use ir.binary to serve attachment
We introduced `odoo.http.Stream` and its `ir.binary` companion model
to refactor all the "stream data over http" bits into a single unified
API. The API takes care of creating a cache-aware, proxy-accelerated,
headers-rich HTTP response out of any path, attachment or binary-field.

closes odoo/odoo#99658

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-11-14 14:20:29 +01:00
Julien Castiaux 97ee7ae05c [IMP] hw_drivers: use clever HTTP cache for logs
`odoo.http.send_file` is deprecrated, `odoo.http.Stream` using the
`from_path` constructor is a drop-in replacement.

Part-of: odoo/odoo#99658
2022-11-14 14:20:29 +01:00
Julien Castiaux 2755af8fac [IMP] base: test cases for ir_cron
The cron subsystem is the system responsible of running background task
at regular interval, it runs in multiple dedicated threads or workers
that are independent of the regular HTTP threads/workers.

There was a major overhaul of the system in v15 (4b28f1162a) to
introduce cron triggers, a way to run a task at a given moment in
addition to the regular configured interval. Although the cron system
was not extensively tested before that v15 refactor, no new test were
introduced with that refactor leaving the system mostly untested.

Since then we had to fix multiple subtle concurrency bugs such as
b940d1c25f and c06cee44fe. Due to the lack of an existing test suite,
no regression tests were added next to those fixes.

With this commit we introduce the missing cron test suite. The test
suite is separated in two different test cases:

- A standard pre-install TransactionCase to test everything that can be
  tested with a single cursor. This case can be run the usual way with
  `--test-tags :TestIrCron`.
- A non-standard post-install **database breaking** test case to run
  concurrency tests that often require multiple SQL transactions. This
  case requires the special `--test-tags database_breaking` to be
  executed. You MUST backup your current database before running that
  test or you'll loose data.

closes odoo/odoo#97087

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-11-14 14:20:25 +01:00
yhu-odoo ba4e24b932 [FIX] mrp_account: missing employee cost when calculate bom cost
Adapt community to make it possible to add employee cost when calculate
bom cost.

closes odoo/odoo#105645

X-original-commit: a239802249b2af2cc3fc2b3bb9fdfd0a408d887a
Related: odoo/enterprise#33898
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2022-11-14 13:01:57 +01:00
Viktors Lipskis (vili) 29789fb732 [FIX] web: fix smooth-scroll-on-drag behavior
Smooth-scroll-on-drag offset is eliminated, resulting in correct placement of scroll-sensitive areas.

task-2979060

closes odoo/odoo#105574

X-original-commit: 0ed6d65d903f8c52b664ab711f6918211e41b6d6
Related: odoo/enterprise#33876
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-11-14 13:01:51 +01:00
Camille Spiritus 2aff77efe0 [FIX] account: fix l10n_ch qr & din5008 display
Germany and Switzerland both use the DIN5008 paper layout and encoutered some issues while printing an invoice's pdf.

In Germany, the display of pdf invoices changed with v16.0. The header and footer would always display borders, which would mess up the rest of the display.

Adding the 'table-borderless' class solved this problem.

In l10n_ch, this issue was also encountered, and the general display of the qr bill page was set off. This is problematic since this display is highly rigid.

Those changes seem to be linked to wkhtmltopdf unability to process some of the Bootstrap5 changes.

While waiting for a more long term solution regarding wkhtmltopdf and BS5 compatibility, calling directly the adequate external_layout allows us to get back a correct QR Bill.

task-3037921

closes odoo/odoo#105464

X-original-commit: 627b0f581801705f8e2d2f2bead5176e9af884f8
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-11-14 13:01:49 +01:00
Adesh Jolhe (adjo) c90b2f7c46 [FIX] analytic: fixed name_get of analytic account model
Currently, In account.analytic.account model due to the extra
space in name field string formatting. which generates the issue while
searching on accounts.

This commit fixes this issue by removing extra space and seperator.

closes odoo/odoo#105391

X-original-commit: bff34e0e8a8b2d211ef90ffea4f43c514e8cad28
Related: odoo/enterprise#33781
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-14 12:04:04 +01:00
Kartik Chavda b80c01de11 [IMP] hr_timesheet: add employee delete wizard for employee
Before this commit user can directly delete employees even though
employees have timesheets that make employee field in timesheet
black which is not right behavior because in timesheet employee
field is required.

This commit adds a delete wizard for employee delete action
if employees have any timesheet then user cannot delete that
employees without deleting timesheets instead user can archive
that employees.

task-2938632

closes odoo/odoo#98233

Related: odoo/enterprise#30481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-14 12:03:54 +01:00
Jacky (trj) d0f89b3478 [IMP] point_of_sale,pos_*: back to basics
Overall improvement and simplification (along with some minor re-alignment)
for the point of sale.

POS Dashboard:
- added a new check for companies that hasn't installed any chart of account,
this gives them a better understanding of the real problem.
- added a new `menuitem` in the configuration tab that list all the pos configs,
this gives the user a way to access the sub-config of a pos (and indirectly give
access to its whole settings)

Opening/closing control:
- the `MoneyDetailsPopup` is now opened through the `showPopup` method, we're
no longer using the css to show/hide.
- the details of the money (if it exists) is now given to the `MoneyDetailsPopup`
component, this allows to have a record data usable of the details and
the user doesn't have to start from scratch if he just wants to modify
one thing
- opening the `MoneyDetailsPopup` no longer resets the cash input, that way the
user can just quickly check if everything is correct again without having
to recount everything and this won't reset the outcome

Customer display:
- added "Powered by" before the Odoo logo in order to accentuate that
it's from the software used is from Odoo

Product screen:
- visual improvement of the `EditListInput` component which is mostly
used by the lot/serial number, it gives more information to the user
and better UX
- "Cash out" is now automatically selected upon opening the
`CashMovePopup`. No more minus sign (-) in the input amount. This
should give better intuitiveness and one less click to do
- no more clear search button shown if the search input is empty
- removed the hover and clickable effect on `CashierName` component
in the normal point_of_sale since nothing happens when we click on it
- increased the width of the click zone with a label in the
`ProductConfiguratorPopup` which makes it easier to select a radio input
- the `PrintBillButton`, `SplitBillButton`, `RewardButton` and
`ResetProgramsButton` are now disabled when nothing happens
- the `textarea` of the `TextAreaPopup` component has been fixed
and is no longer resizable

Partner list screen:
- fixed phone, mobile and mail icons the contact area
- increased details button size

Floor screen:
- when idle, no longer redirect to the floor screen if there's
an open error popup. An error popup is opened for a specific
reason, we shouldn't redirect while having this open or
automatically close it. Other kinds of popup will be
closed since those are issued by the user that went away.

task-2916197

closes odoo/odoo#97803

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-14 12:03:51 +01:00
PNO c5c9d9d0c7 [FIX] stock: block product type change if sales count
Steps to reproduce:
- Create a product and complete a sales order.
- Then try to change the product type.
- The following message is shown:
"You cannot change the products type because it is already used in sales orders."
However, we can close the message and save.

Problem:
If some sales were already made, it should not be possible to change the product type.
There is a warning message on the onchange but it's not blocking.
This causes inconsistencies between the quantities and value shown in the quants and in the valuation layers.

Solution:
Raise an user error when trying to save the changes.

opw-3000886

closes odoo/odoo#105496

X-original-commit: 1b468ad100960cbd6940a24fbfaeeae4f01994de
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-14 10:24:42 +01:00
Hubert Van de Walle (huvw) 94392f8947 [FIX] purchase: Uom should not be displayed when disabled
Steps to reproduce
==================

- Use a mobile phone / mobile view in devtools
- Go to Purchase > Purchase Orders
- Click on one item
-> A traceback occurs, the uom is missing

Cause of the issue
==================

The field is declared as
  `<field name="product_uom" groups="uom.group_uom"/>`

The raw value is accessed with
  `<t t-esc="record.product_uom.value"/>`

Solution
========

Add the missing group

opw-3033650

closes odoo/odoo#105487

X-original-commit: bc6c2d8d15e22f6af720db6a28e21739defede94
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-11-14 09:28:36 +01:00