Commit Graph
146045 Commits
Author SHA1 Message Date
Thomas Josse 255cdfe4f6 [IMP] website_profile: improve profile display when no leaderboard
Purpose
=======

This commit improves the front-end when we have no leaderboard yet

Specifications
==============

It hides the `Show All` button when we have no leaderboard.
It also modifies the leaderboard view if a user manages to get to it.

task-2597345

See odoo/enterprise#20480
See odoo/upgrade#2784

Part-of: odoo/odoo#75646
2021-10-22 11:09:17 +00:00
Thomas Josse ef4ad5a9d4 [IMP] rating: changes the conversion of the ratings
Purpose
=======

This commit changes a conversion variable
`RATING_LIMIT_SATISFIED` in order to follow a new conversion:
> 5/4 := Satisfied
> 3 := Okay
> 2/1 := Dissatisfied

Specifications
==============

This commit only changes the variable in order to limit the
modifications made to the `rating` module/models.

This is done in order to change the faces displayed for each review/rating
without impacting the statistics. The ratings/reviews will have the same values
as before but will only get a different conversion if higher than 4.

task-2597345

See odoo/enterprise#20480
See odoo/upgrade#2784

Part-of: odoo/odoo#75646
2021-10-22 11:09:17 +00:00
Thomas Josse 91db19c187 [IMP] mass_mailing_slides / survey / website_forum / website_[sale_]slides_* : enhancing the views in eLearning
Purpose
=======
This commit is enhancing the website_slides module.

Specifications
==============
It changes placeholders for certain fields, it changes helpers in some
of the views.

It updates some of the main views of the menus and corrects wordings
inside of them.

It activates the Graph and Pivot views for the reporting of
Courses, Reviews and Quizzes.

It cleans up some of the measures inside of the Pivot and Graph views
of each menus where it is available.

It also merges 2 models: slide.slide.link and slide.slide.resource into
slide.slide.resource with a type Selection field.
This is done in order to create a single table for the additional
resources of a Content.

It also improves the front-end of the module with minor changes.
It fixes the problem of long names inside of breadcrumbs.
It also adds a message when there is no leaderboard in /profile/users.

task-2597345

See odoo/enterprise#20480
See odoo/upgrade#2784

Part-of: odoo/odoo#75646
2021-10-22 11:09:16 +00:00
Bruno Boi 6fe52c9012 [FIX] web: adjust FullCalendar for luxon v2
See preceding commit

closes odoo/odoo#78797

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-22 09:52:44 +00:00
Bruno Boi d2cdcd9058 [IMP] web: update luxon from 1.25.0 to 2.0.2
See [upgrade guide](https://moment.github.io/luxon/#/upgrading?id=_1x-to-20)

Part-of: odoo/odoo#78797
2021-10-22 09:52:43 +00:00
Jeremy Kersten c9fb92f996 [FIX] base: support tail text after a comment
This commit fixes the case where you have some text after a comment.
Until know, we miss it. Now we render the tail part.

```
<t>
        <!-- HIDE Text 1 -->
        Text 1
        <p>SHOW Text 2</p>
</t>
```

After the fix, Text 1 is correctly rendered

This commit fixes #76628

closes odoo/odoo#78782

X-original-commit: 566360b07b4ff6c7290f264d9064400df2b06ca5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-10-22 08:38:37 +00:00
Rémy Voet (ryv) de09253d53 [REF] stock,mrp: move assets to be lazier
Move some file to other asset bundle to be load
less.

task-2643681

closes odoo/odoo#77174

Related: odoo/enterprise#21172
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-10-22 08:38:33 +00:00
Rémy Voet (ryv) 068dadcd09 [REM] mrp: remove unused widget bullet_state
During the refactor for v14 the bullet_state was not used
anymore (used for product_availability of workorder).

task-2643681

Part-of: odoo/odoo#77174
2021-10-22 08:38:33 +00:00
Krunal Trivedi b39a2ca3a8 [FIX] mail: fix attachment removed when editing message
when a message or logenote with attachment(s) is edited attachment gets removed
even if user does not want to delete attachment.

after this commit,
editing message text will update only message and attachment will not be removed.
attachment will be deleted only when user wants to delete it

closes odoo/odoo#78785

X-original-commit: dbd6cf34d3fcf9d66657b68766d2a25ee0d2515b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-21 22:18:44 +00:00
Kishan Gajjar 27e0307c07 [FIX] web_editor: link widget should respect native bootstrap class
Before this commit, When you try to edit the link then the link widget is
removing 'btn-block' class from the class list of the link node.

After this commit, the link widget will allow using 'btn-block' class.

closes #78511

closes odoo/odoo#78783

X-original-commit: 888687b487e95b4bf4fb080118b5eb945c8ab724
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-10-21 19:09:52 +00:00
Christophe Monniez 01949f9419 [FIX] packaging: remove mako
Mako is not used anymore for a long time.

closes odoo/odoo#78781

X-original-commit: fb9f89afbc7a22e82309150617e8b5de5c995ff9
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-21 19:09:48 +00:00
Christophe Monniez f446e2fa19 [IMP] packaging: sort requirements
X-original-commit: 32f3e358853c24f4bb94d464bcf10629f8613380
Part-of: odoo/odoo#78781
2021-10-21 19:09:47 +00:00
Christophe Monniez 38deea6730 [IMP] requirements: adapt to latest focal versions
With the release of Debian Bullseye the time has come for the balancing
act by trying to update the requirements.

The constraints are the following:
    * Stick as close as possible to python3-* Debian packages versions
      of the current Debian stable.
    * Same but for the Ubuntu LTS version.
    * When one of the above package is patched by Debian or Ubuntu
      maintainers, set the upstream version that includes the patch if any.

Also, as support for python < 3.7 is dropped, some cleanup can be done.

The `reportlab / pillow` combo is a special case:
    * Pillow has to be updated to 8.1.2 as this version includes the
      security patches that were added to Ubuntu package 7.0.0 (Focal).
    * Reportlab crashes with 8.1.2 with version prior to 3.5.54 [0].
      The problem does not occur on Ubuntu Focal as both versions from
      the Ubuntu packaging are compatible.

So the reportlab 3.5.59 is chosen as it's the Debian Bullseye version
and to avoid multiple lines for a few minor versions.

[0] https://hg.reportlab.com/hg-public/reportlab/rev/0cf382dab63b

X-original-commit: 794677fb6a3391379200eb2144a6ed372e89c17a
Part-of: odoo/odoo#78781
2021-10-21 19:09:47 +00:00
Louis Wicket (wil) 7c76f29111 [FIX] mail, web: properly add messaging menu to the systray
This commit intends to fix two strange bugs encountered while trying to
push a new component into the systray menu:
- MessagingMenuWidget and RtcActivityNoticeWidget were removing their
parent node via DOM manipulations when attached in the DOM. This caused
a crash when adding other items to the systray menu since the deleted
nodes were actually managed by OWL.
- The t-foreach directive in the navbar used indexes as the t-key, which
led mapping items subsequently added to wrong templates.

closes odoo/odoo#78784

X-original-commit: 5f0f80da4fc951954d253c9e45defd591605f556
Related: odoo/enterprise#21829
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Ooming <oomsveta@users.noreply.github.com>
2021-10-21 18:02:06 +00:00
Kamen Zhekov 3739d74afe [IMP] website - add noindex when not browsing configured domain
Description of the issue/feature this PR addresses:
Currently, search engines index a SAAS-hosted website twice
(once for the actual domain, and once for the .odoo.com domain)
which is something that should be preventable.

Desired behavior after PR is merged:
If a domain name is configured, and the website is accessed
through a different domain than the configured one, the noindex
tag appears, preventing crawlers from indexing it..

task-2418904

closes odoo/odoo#78425

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-21 16:54:43 +00:00
Nasreddin Boulif (bon) ab523354fa [FIX] website_sale: Display pricelist price if no price_unit
Steps to reproduce:

  - Install website_sale module
  - Enable discount and advanced pricelist in settings
  - Create product with sale price 0$ and set a website in
  - eCommerce + publish the product
  - Create pricelist PPP with Discount Policy as
  - "Show public price & discount to the customer" and selectable in the website
  - Go to the product and set an extra price of 10$ for the new pricelist
  - Go to the product in the eshop and select the pricelist PPP
  - Add the product to the shop cart

Issue:

  The price displayed is 0$ instead of 10$.

Cause:

  Since price_unit equal 0$, not possible to calculate the discount and
  therefore using the 0$ value.

Solution:

  Use price of pricelist in case 'discount_policy' is 'without_discount'
  and price_unit equal 0$.

opw-2652192
Forward-Port-Of: #78570

Cherry pick of 32d34ffb04b3c6a8397c8ff7eb4e8a3dd9fb8a95

closes odoo/odoo#78778

X-original-commit: f34e441578bd2ba93dff1feffe6cafee633b9d32
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-10-21 15:47:31 +00:00
Jerome (jev) 43ccf2e12f [FIX] point_of_sale: Show warning when pricelist company missmatches
This commit ensure the pricelists are properly configured before launching a pos session.

Steps to reproduce:
- Have a V13 with point_of_sale
- Have minimum 2 companies A & B
- Select both companies in the company selector
- Go to Settings / General Settings
  - Point of Sale
    - Check Pricelists
- Go to Point of Sale
  - Open a pos.config PC
    - Set a Pricelist PL as Default Pricelist
- Go to Point of Sale / Products / Pricelists
  - Open PL
    - Set a company (must be different than PC)
- Go to Point of Sale
  - Click "New session" on PC
--> Traceback

In V13, the traceback shows as "Traceback not available"
As from V14, the traceback is shown properly

A variant would be to start the session before changing
the pricelist company then click on "Resume" on PC

closes odoo/odoo#78767

X-original-commit: 86381c60214d210a42f736261a54e32042eedaba
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-21 15:47:27 +00:00
Romain Derie 7d8a8ddea0 [IMP] website(_forum/_profile): remove _get_http_domain method
Before Odoo saas-14.4, one should call `_get_http_domain()` on website to get
its domain. Indeed, that method was in charge of cleaning that domain, as it
was done with commit [1].

Since Odoo saas-14.4, that cleaning is automatically performed on domain before
saving it into database, thanks to commit [2].

Thus, we can now remove the `_get_http_domain()` and use directly the domain as
it is considered clean.

Note that migrated databases coming from version older than Odoo saas-14.4
could still have an incorrect domain (trailing slash, no scheme..).
This will be handled during migration with [3].

[1]: https://github.com/odoo/odoo/commit/3ad775aab717b395a5d11527aeb3596af66afa99
[2]: https://github.com/odoo/odoo/commit/042c95b0219bb0aa13e73385e092fa76ff1a1b0a
[3]: https://github.com/odoo/upgrade/pull/2951

closes odoo/odoo#78766

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 15:47:22 +00:00
Nidhi Patel f5db920f0b [FIX] project,web: fix project status color in kanban progress bar
Currently, projects that are 'on hold'  stage are represented in grey in
the kanban progress bar while the colored dot on their card is in blue.

In this commit, we change the color of the 'on hold' stage into 'info'
instead of 'muted'. After this projects that are 'on hold' are display
blue in the kanban progress bar as well.

Task-Id:2633273

closes odoo/odoo#78761

X-original-commit: 0886c10d5f276aca2539060ffaa047780a408354
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-21 15:47:14 +00:00
Kevin Baptiste 497c2b9ab8 [IMP] hr: show employees on Department form
Show an "Employee" stat button on the department form view.

closes odoo/odoo#78680

Taskid: 2672986
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-21 15:47:10 +00:00
Aurélien (avd) a0ea00c8dd [FIX] stock_valuation_layer: auto_join product_id to avoid bloating queries
The active field of stock_valuation_layer is related to product_id.active.
Adding auto_join = True avoids bloating search/read_group queries in
expression.parse().

closes odoo/odoo#69207

X-original-commit: 2526c640969f462c18ab8a3da7aa0a4e8ed871f8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-10-21 15:47:00 +00:00
Hardik Prajapati 11228a2c7c [FIX] project: align the project and task name to the right in the activity view
purpose of this commit is to display the project name and task
to the right of the div in the activity view.

before this commit, the project name and task displays next to
the many2many_tags div in the activity view.

closes odoo/odoo#78738

Taskid: 2646204
X-original-commit: bb9734fbf761c3c11be0226cbe4da9d764ccbf74
Related: odoo/enterprise#21817
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-21 11:09:04 +00:00
Leonardo Pavan Rocha 5664bda0f7 [FIX] base: use address_format in layout designer
In task-2355704 changes were made to the pdf layout designer to allow more
flexibility when setting company data. However, for the default values of both
company_details and report_footer, the data wasn't being escaped, therefore
offering security risks. Also, they didn't take into account the address_format
when computing the default value. This PR implements Markup usage in the html
fields and fixes _default_company_details to use the set address_format.

closes odoo/odoo#78725

X-original-commit: 83aeb8fbc3b2a4b39123f756232e34c1ce603299
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-10-21 11:09:00 +00:00
William Braeckman 33f9e1e289 [IMP] hr_skills: update hr_skills wording
Updating menuitem names to avoid mismatches between the menuitem and the
action title.

TaskId-2664863

closes odoo/odoo#78148

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-21 11:08:55 +00:00
William Braeckman c4621c4099 [IMP] hr: update hr plans wording
To avoid mixing both plan and planning in hr plan options it was decided
to reword menus to plan instead of planning.

TaskId-2664863

Part-of: odoo/odoo#78148
2021-10-21 11:08:54 +00:00
Louis Wicket (wil) 92c47e5fbb [IMP] mail: enforce the definition of identifying fields in models
Ensure that all models have their own explicit definition of identifying
fields. Prior to this commit, if a model did not have identifying fields,
the ones in mail.model were used implicitly because of the inheritance.

closes odoo/odoo#78722

X-original-commit: 02fb0c7caaa8a9813e7e78b464710eb772091e44
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-21 09:56:51 +00:00
Tom De Caluwé f81f2a124c [IMP] website: prevent clicking while starting the editor
When visiting a page with enable_editor set to true, the web editor
will be automatically started. However, while the editor is loading,
the end user can still click other buttons in the navbar.

For example, some changes in the web editor require a save and reload
of the current page being edited. After saving, the same page will be
reloaded with enable_editor.

This commit blocks any clicks while the editor is being loaded.

task-2607755

closes odoo/odoo#78721

X-original-commit: 89bdfcd16828e1432900ea46118fd6ddadf96f2d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 09:56:47 +00:00
Alexandre Kühn 6f56216533 [FIX] mail: memleak model manager in tests
closes odoo/odoo#78726

X-original-commit: 4c18e2d09a372e975c2133516cc9bdd1880b2c1b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-10-21 08:39:48 +00:00
svs-odoo b60d53fe38 [IMP] stock: inventory_quantity_set own compute
Sets the `inventory_quantity_set` as an editable field (not readonly)
and creates its own compute to avoid to override it each time the
`inventory_quantity` is modify and we set the `inventory_quantity_set`
aside (before this commit, this field new value was always overrided by
the `inventory_diff_quantity` compute).
This is useful when we want to write on the quants from the Barcode App
as we can write on `inventory_quantity` and `inventory_quantity_set` at
the same time.

task-2632818

closes odoo/odoo#78719

X-original-commit: 489e76ade600f7983a9a1976c04529ac542fdd44
Related: odoo/enterprise#21810
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-10-21 07:32:54 +00:00
Florian DamhautandThibault Libioulle 93f529c853 [FIX] sale_timesheet : test fixed price invoiced accounted for twice
Description of the issue/feature this PR addresses:

When using analytical account and invoicing a fixed price sales order
item, which is linked to a project task, where timesheet has been
recorded, the invoice gets double counted into the project revenues -
both as Invoiced and as Other revenues on the project overview
profitability.

Current behavior before PR:

The invoice gets double counted into the project revenues - both as
Invoiced and as Other revenues on the project overview profitability.

Desired behavior after PR is merged:

The invoice gets counted only in the project revenues as invoiced/to
invoice on the project overview profitability.

This commit adds tests to assess this use case is covered.

PR : #78230

opw-2631163

closes odoo/odoo#78646

X-original-commit: ddab279813a71caa2fa7ea081e9cbf0c56ae3613
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Thibault Libioulle <tle@odoo.com>
2021-10-21 06:28:51 +00:00
Thibault Libioulle 16ac647544 [FIX] sale_timesheet: fix multiple issues in project profitability
This commit fixes multiple issues in project profitability report.

Steps to reproduce opw-2596224:
- Go to sale
- Make a RFQ for a service product with service_policy set at
delivered_timesheet (Timesheets on tasks), set quantity as 10
- Confirm order and create two invoices for 15%, confirm the two
invoices
- Create a credit note for one of the invoice and confirm it
- Go back to the Sale Order and click on Project Overview
=> Inconsistencies (Downpayment reported twice)
- Add an expense
=> Inconsistencies in expense amount untaxed invoiced
- Add timesheets
- Create an invoice from the SOL
=> Inconsistencies in Other costs, counting the downpayment.

This issue is fixed by :
- Excluding downpayments which are linked to a reversed invoice line
- Use expense amount to invoice and expense amount invoiced separetely
in the project overview.
- Do not report not invoiced SOLs in the expense amount invoiced.
- Exclude negative amounts in analytic account which are linked to
credit notes.
- Include all services and not timesheetes  SOLs linked to project,
project task or project's analytic account in the invoice/invoiced
subquery.
- Remove the unused downpayment column in the subqueries
- Remove unused subquery (relative to downpayment)

PR : #78230

opw-2596224
opw-2631163

X-original-commit: 69c5a55887d67b8852c7c45a52def38f3c742e7d
Part-of: odoo/odoo#78646
2021-10-21 06:28:51 +00:00
Benoit Socias 9b854f5d39 [FIX] web_editor: make class-based colors selectable for custom buttons
Before this commit selecting a class-based color (gray scale,
o-color-1~5) was ignored when configuring a custom button colors.

After this commit the color's class is applied.
Additionally, upon switching between Custom and other types, the custom
UI is now cleaned up.

task-2653874

closes odoo/odoo#78720

X-original-commit: 26d37812f0217ae913c8ddf761bcb26b5c44bff5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-20 17:53:40 +00:00
Benoit Socias 6087585f3b [IMP] web_editor: reset button text styles when customizing button
Before this commit if button text had styles, they would override the
color set by customizing the button.

After this commit button text styles are removed when applying custom
button colors.

task-2653874

X-original-commit: 03c02639f1e92b58a38d8efb620b17761ae2d81d
Part-of: odoo/odoo#78720
2021-10-20 17:53:40 +00:00
Aaron Bohy 9c5fecdf90 [FIX] web: ActionContainer: properly unbind handler
This isn't a problem in production, because the ActionContainer is
never destroyed, but it caused a small memory leak in the test
environment.

closes odoo/odoo#78698

X-original-commit: d01c89d80d58763e45309dbcfbf83f852866982e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-20 15:15:24 +00:00
Aaron Bohy 3feba2da91 [FIX] web: ui service: remove leak in tests
Before this commit, the ui service listened to the "change" event
on several MediaQueryList corresponding to specific window sizes.
However, those event handlers were never removed. Whereas this
isn't an issue in production (services are started once and live
forever), this caused a memory leak in tests, where services are
deployed on demand, test by test.

There is no cleanup function for services (since they live forever
by nature). In the test environment, we have a solution for handlers
bound on window (i.e. window.addEventListener), by monkey patching
the function (thanks to the browser object), and automatically
removing all handlers bound during a test, at the end of that test.

This commit fixes the memory leak by no longer using addEventListener
on MediaQueryList (as this is a deprecated feature anyway [1]), and
simply using window (or browser)'s addEventListener instead. This
leak sometimes produced a timeout in the QUnit test suite [2].

[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener
[2] https://runbot.odoo.com/web#id=2374&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405

X-original-commit: d86cc5c016cf4eff9a7e4f8b35a9ed38ddc24636
Part-of: odoo/odoo#78698
2021-10-20 15:15:24 +00:00
Aaron Bohy 3459aa9061 [FIX] crm: properly call super in forecast tests
Before this commit, those tests sometimes failed because we didn't
correctly wait for the load and reload promises.

X-original-commit: f62503a56c4ec5c3de6638c5fe2138330d217eac
Part-of: odoo/odoo#78698
2021-10-20 15:15:23 +00:00
Aaron Bohy 7bd4ae9566 [FIX] web: prevent some tests from failing undeterministically
This is a tricky one. The problematic tests involve the quick edit
feature. Before this commit, those tests sometimes failed [1],
because there was no guarantee that we waited enough in the test
before doing assertions.

[1] https://runbot.odoo.com/web#id=2012&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405

X-original-commit: 78762d0a0017e02f2df00d60140a2709fafaa0d5
Part-of: odoo/odoo#78698
2021-10-20 15:15:23 +00:00
Aaron Bohy 0c8b5c5da8 [FIX] web: attempt to fix non deterministic issue in tests
This commit *could* prevent a test from failing randomly. The
important part in the diff is the switch from $.Deferred to native
Promise. JQuery Deferred behave differently upon resolution (it is
sync if the deferred is resolved directly, whereas it is not the
case for native Promise). I couldn't find any other reason to
explain why the test was sometimes failing. There is no reason to
use Deferred anyway.

The issue didn't occur after this commit in more than 600 builds.

[1] https://runbot.odoo.com/web#id=2297&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405

X-original-commit: ed0761dce44bd37cdd9d40ddd6e021517f466f97
Part-of: odoo/odoo#78698
2021-10-20 15:15:23 +00:00
Aaron Bohy b6ef017f64 [FIX] web: make test more robust
Before this commit, the changed test sometimes failed on runbot
(rarely though), because it might happen that the debounce released
before the promise returned by the click helper resolved (e.g. if
the server was overloaded, or was garbage collecting...). That
promise waited for a setTimeout, and then for a nextAnimationFrame.
In this scenario, there's no need to wait so long, as there is no
rendering to wait for.

Example of failing build: https://runbot.odoo.com/runbot/build/10360554

X-original-commit: 880c4683698c987f212e4a113b374230566001f1
Part-of: odoo/odoo#78698
2021-10-20 15:15:23 +00:00
Aaron Bohy f9594fba3f [FIX] web: patch: can call a not bound patched function
Before this commit, it wasn't possible to patch some functions
(e.g. setTimeout) on window, because of the way we call them.
Indeed, we typically do `setTimeout(...)`, because this function
doesn't need to be bound to the window object.

X-original-commit: 476dbf75bb88dc2ddfdd47c1f229ce53cf7fadb7
Part-of: odoo/odoo#78698
2021-10-20 15:15:22 +00:00
Kevin Baptiste 60d62a1d9d [REF] hr*: misc cleanup
*: hr_expense, hr_holidays, hr_work_entry_holidays

- Remove unused template;
- Remove unused fields (hr_expense);
- Rename group_days_allocation to convey proper meaning;
- Remove deprecated method.

closes odoo/odoo#78128

Related: odoo/upgrade#2907
Taskid: 2665866
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-20 15:15:03 +00:00
Florian Charlier 17183e5a3b [FIX] event_sale: create tickets with default product type "service"
In some cases when creating a new ticket, the default product
type shown is a "Consumable". It should rather be handled as a
"Service". In later versions, a detailed type is created, but the
base product type should be set to service too.

This commit uses the `product_id` `context` to set the default
detailed type to "event".

Task-2655226

closes odoo/odoo#78690

X-original-commit: a03e12810152559efc712cb067756d517c7647ca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-20 13:01:20 +00:00
Florian Damhaut 4946768d16 [FIX] l10n_it_stock_ddt : fixed ddt report quantity
Currently, DDT use the product_uom_quantity of product for the ddt move which is inaccurate in case of no-backorder change in quantity

The fix correctly check if the done quantity is other than 0 for the delivery and if it is, use it as the delivery quantity

opw-2663174

closes odoo/odoo#78671

X-original-commit: 8678bf385d79adf207c12beb47012898dbb4ddc9
Signed-off-by: Florian D <fdamhaut@users.noreply.github.com>
2021-10-20 13:01:17 +00:00
Florian Charlier 80ce93cd44 [IMP] crm: add expected closing date in tree view
It is more convenient to be able to keep an eye on the expected
closing date of opportunities.

Task-2668131

closes odoo/odoo#78399

Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-10-20 13:01:12 +00:00
Bruno Boi 39777c9039 [FIX] web: always add usercontext to legacy action
In the new web client architecture, the user context is added to server
requests through the ORM service and is therefore not needed in the
action context. Thus the commit 7354d16 has removed it from the action.

Before the new webclient architecture, the user context was always
prepended to the action context. So this commit reintroduces it for
the legacy views and client actions through their proper adapters.

closes odoo/odoo#78685

X-original-commit: 7975674166a3d8fa9cd8714adab769a7fd681368
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-10-20 11:44:58 +00:00
Bruno Boi 8687a220b7 [FIX] web: do not keep additional context in stored action
Before this commit
The current action is stored in the session storage with its evaluated
context. This design is wrong because a context is by definition
contextual which means it has to be evaluated at the last possible
moment to ensure it reflects the most recent context.

After this commit
The current action is now stored in the session storage it its most
original state. This is sufficient as in any case actions go through
the doAction method which evaluates the context right before applying
the action logic.

X-original-commit: 2533d47a1d312907389fb85af83f8812c402a609
Part-of: odoo/odoo#78685
2021-10-20 11:44:58 +00:00
std-odoo a7618b96ec [FIX] web: do not write before saving when clicking on a radio
Bug
===
If we open a view in readonly mode, click on a radio widget and if a
constraint exists on this field, an error message is raised.
(e.g. the enroll field in "website_slides_sale").

Technical
=========
This is because in the "Basic controller", in the "_onFieldChanged",
we force "force_save" if the view is in readonly mode. This is wanted
for widgets that can change the value even in readonly mode
(e.g. Priority), but clicking on a Radio widget switch the mode to edit,
so this is not needed.

To fix that, we call `setValue` after switching to the edit mode. So
the `setValue` is skipped in `_onInputClick` if we are in readonly mode,
and the `setValue` is done in `_quickEdit` instead.

Task-2668763

closes odoo/odoo#78684

X-original-commit: ff1329ca86691dd5f042158de6913c4aa2c69b6c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-20 11:44:52 +00:00
Mitul Shah be826aa88e [FIX] website_crm: fix random website_crm_pre_tour bug
Currently, The 'TestWebsiteCrm.test_catch_logged_partner_info_tour' is randomly
failing on runbot. The tour is triggered on contactus page. Tour bug is
occurring because editor may not be completely loaded. In that case some
selectors are not accessible.

This tour is linked with selectors. In this commit updates the selectors and
add the extra triggers in order to be sure editor is fully loaded and the
tour can resume.

Task-2649723

closes odoo/odoo#78676

X-original-commit: d135916b754ae7fde184c4e2d69177dbc1dddc9d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-20 10:27:46 +00:00
Ivàn Todorovich bdd1f2062b [FIX] web: restore proper alignment and spacing of navbar's user avatar
closes odoo/odoo#78673

X-original-commit: 1dc91c2b22c5b99f48d692ec284ae39700fa2739
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-20 09:12:33 +00:00
Touati Djamel (otd) dae7fb01f5 [FIX] product: display pricelists that have no defined end date
Steps to reproduce the bug:
- Go to purchase > Configuration > Vendor Pricelists
- Filters > select the “Active” filter

Problem:
Currently, the filter does not include records that do not have a specified `”date_end”`, even though they are considered active.

Opw-2659829

closes odoo/odoo#78643

X-original-commit: bb8bef5cff3b67e42218469e898f2b95e4ab315d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-10-20 09:12:30 +00:00