Commit Graph
150890 Commits
Author SHA1 Message Date
Karan Bosamia d9cbb91ef3 [FIX][gamification]: Validate mail template
'name' field not present in 'gamification.goal' model
which causes error while rendering mail template such that
object 'gamification.goal' has no attribute 'name'
opw-2844136

closes odoo/odoo#92300

Closes: https://github.com/odoo/odoo/pull/91439
X-original-commit: 0a1970e218527440debb8c75fff2fa47de5e2677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-30 08:28:56 +02:00
Denis Ledoux 23c24843cc [FIX] mail: template _is_dynamic with a field having groups=
Using customization, if you add a field on `mail.template`
with a `groups=` attribute with a group your regular users do not belong to,
e.g. `groups="base.group_system"`,
the users will have an access error when attempting to read the given
field when checking if the template is dynamic,
with the `_is_dynamic` method.

We could restrict the list of fields to read/check to the fields
the user has access, but that means a user could
duplicate a template with code in the fields he cannot see.

So, read the field has sudo to make sure they do not contain code
is the way to go.

closes odoo/odoo#92371

X-original-commit: 41cbd3fdfec8e2b7a8b22360c5bb7f7b9bab4b1e
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-05-27 17:45:59 +02:00
Raphael Collet 3ae2c7db72 [FIX] base: avoid invalidation that slows down updating module dependencies
closes odoo/odoo#92356

Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-05-27 16:42:55 +02:00
Agustín Castro Bugallo 208c714b40 [FIX] hr_work_entry_contract: Fix is_unforeseen_is_leave constraint violation
The constraint is added in `hr_payroll`, checking that if `is_unforeseen`
is True, then so must be `is_leave`. To reproduce the error simply install
`hr_payroll`, edit Work Entry Type Attendance to set as unforeseen absence
and upgrade the module `hr_work_entry_contract`.

closes odoo/odoo#92358

X-original-commit: 5448ddcbec8a1058aa271206d5a8999b3e67dda5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-27 15:42:46 +02:00
Arnold Moyaux 86878dd13e [FIX] mrp,purchase_stock,stock: avoid new param
following commit 55398263f9297ab2709e4c4c2a9c6c3ee7f59c8a
Introduce a new param to fix a notification issue. However
we could use the context instead of a new parameter in order
to avoid breaking the customisation.

Linked to PR #88303 discussion

closes odoo/odoo#92353

X-original-commit: 69dcdd410adcefe29bfa4fecd2e7c50fe3465b19
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-05-27 15:42:40 +02:00
Jeremy Kersten 7d73a48367 [IMP] website: push 404 event to plausible
This Goal will help end user to find most 404 hits and fix the
legits one...
Fixing typo, creating missing redirect, or fixing code.

We need to cast the event-name since plausible only accept 'string'
as custom event name, so if we push 404 instead of '404' the event
crash.

closes odoo/odoo#92243

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-27 14:43:00 +02:00
qsm-odoo 8a01b40d29 [FIX] web_editor, website: review widgets stop on editor save
Original 14.0 commit title:
Prevent deadlock on editor save when an option is focused
See [1].

In 15.0, the code worsened... but, by chance, fixed the deadlock bug.
See adapted version via the X-original-commit.

With this master version of the original commit, it is tried to clean
the code a bit... at least around the code that was originally touched,
without starting a big refactoring that is again needed. The deprecated
(and added by mistake) 'edition_will_stopped' and 'edition_was_stopped'
events are now gone.
Hopefully, we will continue to improve that editor hierarchy (and
ultimately converting to OWL?) in future updates.

[1]: https://github.com/odoo/odoo/commit/53a08b3470d7d18488abf93b7ea6551700650460

Related to opw-2767903

closes odoo/odoo#92321

X-original-commit: 483a2d6cac1be3b40a4d1878536baea9e6098ec1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-27 12:47:45 +02:00
Yannick Tivisse 95ed4ce98a [FIX] hr_contract: Allow retrieving first contract date at given time
closes odoo/odoo#92310

X-original-commit: f78aad96bcf1d499e4da4b634d56efdd2342ccdf
Related: odoo/enterprise#27780
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-27 11:45:51 +02:00
Denis Ledoux 2c7b10ed56 [FIX] ir.ui.view: do not inline automatically form views
odoo/odoo#87522 introduced the concept to automatically
inline tree, kanban and form views under one2many/many2many fields
within form views.
The goal being for the web client to make less `get_views` calls.

However, currently, automatically inlined form views
under one2many/many2many fields leads
to more triggered onchanges than before,
triggering more field computations than before,
potentially leading to performance issues
as more fields are computed than before.
Besides,  they are not visible in the tree/kanban view
and their computation can therefore be considered useless.

At worst, it can even causes bugs, by triggering computation
in places they were not used / do not handle correctly,
as explained in
https://github.com/odoo/odoo/pull/87522#issuecomment-1132554918
odoo/odoo#91878

This revision reverts the behavior to automatically inline
form views, while keeping the inlining of kanban/tree views.

However, by reverting this, we re-introduce a limitation
of the web client behavior regarding onchanges,
explained in odoo/odoo#91935.

This is therefore not perfect,
but at least the previous behavior is back.

In the future, work will be done to re-introduce the automatically
inlined form view, while solving both issues:
 - Do not trigger more onchanges than necessary,
 - Solve the limitation of the web client shown in odoo/odoo#91935

closes odoo/odoo#91968

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-05-27 11:45:47 +02:00
roen-odoo c9a58904c5 [FIX] pos_sale: correct value in untaxed_amount of sale report
Current behavior:
When selling a product that have a taxe set in a PoS, the sale report
was not correct. The collumn untaxed amount to invoice would contains
the amount to invoice that includes the taxes wich is not correct.

Steps to reproduce:
- Install sales & pos
- Set the Acoustic bloc screen tax to 15%
- Open a pos session and Sell an acoustic bloc screen
- Validate the payment and close the session
- Open the sales app
- Sell an acoustic bloc screen to any customer
- Deliver it (update it's quantity if necessary)
- Sales > Reporting > Sales
- Switch to the pivot view
- On the "measures" button, check "Untaxed Amount Invoiced" and "Untaxed Amount To Invoice"
- Show the entries by Order#
- "Untaxed amount to invoice" should be the same as "untaxed total"

opw-2681477

closes odoo/odoo#92217

X-original-commit: 8c20fb4e126822d81fa7e1de6912d5c75a881b7b
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-27 10:46:37 +02:00
Touati Djamel (otd) 537e82d78d [FIX] purchase_stock: update the move price after changing the PO line price
Steps to reproduce the bug:
- Create a storable product “P1”:
    - Standard price: 20$
    - Add vendor in the Purchase tab:
        - name: Azure Interior
        - min qty: 10
        - price: $15

- Create a PO:
    - Vendor: "Azure Interior"
    - Product line: “P1”
Automatically, the Quantity field will automatically get populated as 10 Units
and price:$15 as per the pricelist

- Confirm the PO
A picking will be created containing a stock_move with a price of $15 and a QTY of 10

- Edit the Quantity to 9 Units and save the PO
The price will be updated to $20 on the PO line, but not in the `stock.move`

Problem:
When we update the qty in the PO line, a new move with a quantity of “-1” and
a price of “$20” will be created.
Then, it will be merged with the initial move, but since they are not identical in the price,
we can't merge them, so a new picking is created:
https://github.com/odoo/odoo/blob/dda9700d8236091626cbd78efc0ca4116e1e1acd/addons/stock/models/stock_move.py#L869-L881

Solution:
when the price is updated in a PO line, the price of its linked `stock.move` must also be updated

opw-2825160

closes odoo/odoo#92208

X-original-commit: c8d74a1cb4bfed8226e52e0bc6f243b4e483fc98
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-05-27 10:46:33 +02:00
Victor Feyens a1c2c6ee1f [REM] sale: duplicate access right
Two ACL were giving the same rights to the same group on the same model.

This commit removes the confusing one where the name targeted the 
managers when the rule was targeting sales users.

closes odoo/odoo#88210

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-27 10:46:29 +02:00
Victor Feyens ba25bc76dd [FIX] sale: confusing access right name
The rule name said it gave rights to sale manager when it was giving
rights to salesman (aka sale users).

Part-of: odoo/odoo#88210
2022-05-27 10:46:29 +02:00
Victor Feyens 050b0df25c [REM] sale: useless access rights
Remove rights given to sale manager when the same rights were given to
the sale users, which is implied by the sale manager group.

Part-of: odoo/odoo#88210
2022-05-27 10:46:28 +02:00
Victor Feyens 00a1975e24 [IMP] sale: order ir.model.access records
Part-of: odoo/odoo#88210
2022-05-27 10:46:28 +02:00
Pierre Paridans 24f89c6dff [FIX] mail: scroll to bottom assertion in Chrome 94+
Since (at least) Chrome 94+, some element's sizing computation returns a
slightly different value (in the order of a fraction of a pixel). Sadly,
due to rounding, this difference has an impact on exact sizing
assertion.

As the difference is *really* small, introducing a margin of error (i.e.
<= 1px) looks reasonnable ; as implemented in this commit. More
specifically as Element.scrollHeight can have either an int or a decimal
value (cf. fractional-scaling), this commit allows to property handle
both usecases.

Reference:
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled

closes odoo/odoo#92328

X-original-commit: 93348ae0d0b076fe2dfa094a2d7b3ef74442d390
Related: odoo/enterprise#27790
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-26 10:48:41 +02:00
Miquel Raïch 01f683f41a [FIX] account: delete account_analytic_default translation
Correct forward port of https://github.com/odoo/odoo/commit/d80dfd30ffb6524024999f88e069a400884e605b

closes odoo/odoo#92302

X-original-commit: d9ff39fda4ee870cdd50497781330997386b9f70
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-26 09:54:42 +02:00
Guillaume (gdi) b5c0b11df1 [FIX] web_editor, *: allow to manage all types of buttons
*: website_mass_mailing

Before this commit, some types of buttons were not managed by the
editor, only the primary, secondary and link buttons were supported.
However, if there is another type of btn in the DOM, the editor must be
able to handle it. This commit allows to manage all types of buttons in
the editor. This commit also adds a test so that the bug does not come
back.

Steps to reproduce the fixed bug:
 - Drop a block with a <a> with the btn-success class
 - Click on the button to edit it
 - The link tool part in the editor does not work properly
or
 - Drop the newsletter block
 - Save and register to the newsletter
 - Edit the new "Thanks" button
 - The link tool part in the editor does not work properly

opw-2802139

closes odoo/odoo#92325

X-original-commit: 4c68b3e923610e1d573b4bd2b241b2fc5923c412
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-25 22:31:23 +02:00
Lucas Perais (lpe) 9abc032a10 [FIX] point_of_sale: prevent menu_service from loading
This commit is a copy of 7ddcebfc, which was reverted in dfcfe63c.

Before this commit, the menu_service was not included into the
`pos.assets_backend` bundle which was fine until we had to add
a dependency to `menu_service` in a file which is included in
`web.assets_backend`. Since pos.assets_backend imports pratically
all `web.assets_backend` bundle, there was dependencies errors.

The sublient issue is that the pos bundle was built relying on a
specific feature (the primary copy of Qweb templates) which was
dropped when we introduced the new assets manager (8cc06617).

There a two other approaches that we could consider:
- Create a new bundle `web.assets_backend_primary` that would be
  called separately by `web.assets_backend`and `pos_assets_backend`,
  it would mimic the dropped behaviour
- Change the `pos_assets_backend` to manually call every specific
  element they need to function, which would prevent the depepdencies
  issues

Unfortunately, both solutions are not realistic on a stable release,
which is why we chose to reintroduce this patch, and will fix the POS
bundle properly in master, where the side-effects can be handled.

After this commit, there are no dependency issues, and the menus
are not loaded, as expected and as before.

Part of task 2860257

closes odoo/odoo#92324

X-original-commit: b077fe72e8d9338e802cbceb580f3abcb6938462
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-05-25 22:31:20 +02:00
qsm-odoo 2d75013ff0 [FIX] base: remove "removal branding" from the <head/> of rendered pages
Since [1], during the call of `apply_inheritance_specs` in charge of
resolving all the xpath of inheriting views and building the whole
primary view, processing instructions were added to mark the locations
where nodes were removed. Before that commit, another system was in
place where the following node next to the removal was marked via a
meta-oe-xpath-replacing attribute.

The problem with that change is that some of those processing
instructions were actually not removed once the branding was distributed
before the view was served... indeed all processing instructions which
were in the `<head/>` or a t-ignore area were ignored instead of removed.

This was actually already the case with the old system of the attribute
"meta-oe-xpath-replacing" but it was never noticed (as either the
attribute was there but had no effect or was indirectly gone if it
landed on a `<t>` node).

After [1], a bug was reported in 15.0 with the website configurator
where the processing instruction actually made some nonsense appear on
top of the page (at least without the work being discussed at [2] which
makes it so processing instructions act as HTML comments as it should
normally be the case).

[1]: https://github.com/odoo/odoo/commit/f67832a3ae0d9a3b5b53129132762e6bc1aed874
[2]: https://github.com/odoo/odoo/pull/92213

closes odoo/odoo#92316

X-original-commit: 4310d012a16f982c2336d084254b5c5617794ee2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-25 22:31:16 +02:00
Géry Debongnie 95880ab7b4 [REF] sale: simplify code for sales team progressbar
The kanban view for sales team is defined with a progressbar widget to
indicate sales target. There was a .include of KanbanRecord to customize
the behavior of that widget whenever the target value was not set.  This
was problematic for the following reasons:

1. it is a .include, so it is applied to all kanban records in odoo
2. it is a lot of code,
3. and it mostly duplicate the editing logic in the progressbar widget

With this commit, the .include is removed, and a new
'sales_team_progressbar' widget is introduced to mimic the previous
customization. This should be safer and easier to maintain.

closes odoo/odoo#92071

Related: odoo/enterprise#27747
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-05-25 20:31:42 +02:00
Géry Debongnie 8313a66a52 [REF] *: remove some kanbanrecord .includes
The kanban view was recently improved to add the support of 'action' and
'type' attributes on the kanban arch.  This commit takes advantage of
that change to simplify a few views in various addons.

Part-of: odoo/odoo#92071
2022-05-25 20:31:41 +02:00
Géry Debongnie 2507e8d5d3 [IMP] web: add a way for kanban view to declare action
It is very common when using kanban view to need a way to declare what
action is executed when clicking on a record.  The default action
(switching to form view) is sometimes not what we would like. For
example, clicking on a project kanban record should open the
corresponding tasks, instead of the project form view.

Until this commit, it was not possible to do this simply for a whole
kanban record, however it was possible to add a button with a name and
type attribute to specify the resulting action.  This commit introduces
the same idea, but on the complete kanban record, instead of just a sub
element.

To specify the action that should be executed when clicking on a record,
one can now use the 2 attributes 'action' and 'type' (which corresponds
to the 'name' and 'type' attribute for the kanban record. 'name' was
also considered, but it was too weird). For example:

<kanban default_order="name" action="action_brand_model" type="object">
   ...
</kanban>

Part-of: odoo/odoo#92071
2022-05-25 20:31:41 +02:00
Pierre Paridans 333a4e8733 [FIX] purchase_product_matrix: test breaking in newer Chrome (rounding)
Since (at least) Chrome 94+, some element's sizing computation returns a
slightly different value (in the order of a fraction of a pixel). Sadly,
due to rounding, this difference has an impact on exact sizing
assertion.

Specifically in these drag-and-drop tests, it prevents the sorting from
being triggered as the "mouse" doesn't pass beyond the center of the
destination element (aka. next row).

By setting the position to `bottom`, this commit mitigates this issue by
making sure to pass that boundary, just like a real-user would do.

closes odoo/odoo#92292

X-original-commit: ed798b216063caa299800a56c617277aabdfb8fd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-25 18:01:03 +02:00
Brieuc-brd 255510d10d [IMP] mail: NotificationListItem, css cross-browser compatibility
This commit improves cross-browser compatibility for the `user-select`
property by adapting the css statement to Safari's Webkit syntax.

task-2838625

closes odoo/odoo#90476

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 18:00:58 +02:00
Brieuc-brd 105c9dcad6 [IMP] mail: NotificationGroup remove design inconsistencies in mobile
Prior to this commit, there was no mobile layout adaptation on
`NotificationGroup` and this creates some design inconsistencies with
the other components (`ThreadPreview`, `ThreadNeedactionPreview` and
`NotificationRequest`).

This commit fixes these inconsistencies.

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Brieuc-brd 7841e07a57 [IMP] mail: NotificationGroup, ThreadPreview, remove useless css
Prior to this commit, there was still some unnecessary css that was
creating conflicts since the revamp of mixins in `NotificationListItem`
(commit: 7760c54ec09f93488ccb89d2925b6655fdb0092f).

This commit removes this unnecessary css.

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Brieuc-brd b0081b0233 [REF] mail: NotificationListItem, review and simplify mixins
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:58 +02:00
Brieuc-brd eaefb789e0 [IMP] web: bs5 utility-classes, add font-size
Define "Bootstrap v5 ready" utility-classes to handle font-size.
These classes definitions can be safely removed after migrating to v5.

task-2838625

Part-of: odoo/odoo#90476
2022-05-25 18:00:57 +02:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
Raphael Collet 60a1452a40 [REF] base: adapt code to new flush API
Part-of: odoo/odoo#87527
2022-05-25 18:00:47 +02:00
Raphael Collet 32bc28aa66 [IMP] core: better API for flush() and invalidate()
This provides a new API for those operations, in order to make the
distinction between the use cases more explicit.  The former API was
using obscure parameter combinations to correspond to various cases.

In the summary below, `fnames` is an iterable of field names.  If the
parameter is not given, it means "all fields" in the given context.
Note that method recompute() is now mostly private, as it should not be
used in business code.

    # process pending computations and updates
    records.env.flush_all()                # all fields of all models
    records.flush_model(fnames)            # the fields of all records of the model
    records.flush_recordset(fnames)        # the fields of the given records

    # process pending computations, became non-public methods
    records.env._recompute_all()           # all fields of all models
    records._recompute_model(fnames)       # the fields of all records of the model
    records._recompute_recordset(fnames)   # the fields of the given records

    # invalidate the cache of fields
    records.env.invalidate_all()           # all fields of all models
    records.invalidate_model(fnames)       # the fields of all records of the model
    records.invalidate_recordset(fnames)   # the fields of the given records

Part-of: odoo/odoo#87527
2022-05-25 18:00:46 +02:00
mafo-odoo 5ceef05996 [FIX] website_event_questions : set the answers as readonly from attendees list view
The users shouldn't be able to edit the answers from the attendees as they don't know
what questions they are answering to or the type of response expected.

opw-2845524

closes odoo/odoo#92283

X-original-commit: 379f8702a9759cdec533e29f43f15bca74de3b43
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-05-25 16:59:43 +02:00
Carlos Valverde 5f8a8838f8 [REF] mail: discuss_sidebar_mailbox scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2834810

closes odoo/odoo#90174

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 15:53:13 +02:00
Manisha Tulsiyani d2daaf95b4 [FIX] project: fix the traceback when clicking on blocking stat button
Currently, clicking on the blocking stat button throws an error when
there is more the 1 task in blocking stat.

So this commit, fixes the issue by removing the extra comma so that
clicking on blocking stat button doesn't throws an error.

task-2834743

closes odoo/odoo#92257

X-original-commit: cd7b7b02523e0982366f4ca60b6df2448d7e9cb5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-25 14:38:11 +02:00
Xavier Morel ddb64e30f1 [FIX] bus: restore _daemonic workaround
In fixing leftover jammy warnings in #92078 I mistakenly updated the
setting of `_daemonic` to the public `daemon`, missing that it was a
dedicated and explicit workaround for Python's checks (cf
d03b4f8675).

closes odoo/odoo#92255

X-original-commit: e35a4d87578a588e33f604638289ca7e7ee02029
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-05-25 14:38:07 +02:00
Sébastien Theys 203ed70789 [IMP] hr_holidays: remove createThreadViewComponent
Use real parent instead (Discuss in this case).

closes odoo/odoo#92253

Related: odoo/enterprise#27757
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 14:38:00 +02:00
Adrien Widart 4952d150ee [FIX] mrp_subcontracting_dropshipping: use a sub-location
When using a sub-location of "Subcontracing Location" and a dropshipped
component, the purchase order doesn't have any dropship address.

To reproduce the issue:
(Enable debug mode)
1. In Settings, enable "Multi-Step Routes"
2. Create a new location L:
    - Parent: Physical Locations/Subcontracting Location
    - Type: Internal Location
3. In Rules, duplicate the rules of route "Dropship Subcontractor on
Order" and replace "Physical Locations/Subcontracting Location" with L
4. Create two products:
    - P_finished:
        - Type: Storable
        - Vendor: V_subcontractor
    - P_compo:
        - Type: Consumable
        - Vendor: V_compo
        - Routes: Dropship Subcontractor on Order
5. Edit V_subcontractor:
    - Subcontractor Location: L
6. Create a bill of materials:
    - Product: P_finished
    - Type: Subcontracting
    - Subcontractor: V_subcontractor
    - Components: 1 x P_compo
7. Create and confirm a purchase order:
    - Vendor: V_subcontractor
    - Products: 1 x P_finished
8. Open the purchase order linked with P_compo

Error: the Dropship Address is not defined

This address is defined thanks to the value of `partner_id`:
https://github.com/odoo/odoo/blob/aec7fcdb693729f432ae2341c00ef317b65fbcbc/addons/purchase_stock/models/stock_rule.py#L300
However, this key is missing

OPW-2721474

closes odoo/odoo#92249

X-original-commit: 587d8cd0ecb956a5c1b1a32a7abadea3019f848e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-05-25 14:37:56 +02:00
xlu-odoo 37855ec266 [REF] mail: rtcCallParticipantCard, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2842691

closes odoo/odoo#91298

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 14:37:49 +02:00
xlu-odoo 9b98352f5f [IMP] web: bs5 utility-classes, add border-width
Define "Bootstrap v5 ready" utility-classes to handle border-width.
These classes definitions can be safely removed after migrating to v5.

task-2842691

Part-of: odoo/odoo#91298
2022-05-25 14:37:49 +02:00
roen-odoo f8ea8abf2e [FIX] point_of_sale: prevent pos from crashing with archived product
Current behavior:
If you create an order in a PoS then go in the backend and archive
any of the product in the order. If you try to go back in the PoS
session it will crash

Steps to reproduce:
- Open PoS session and create an order with some products
- Leave the session and archive atleast one of these products
- Go back to the session, the session crash

opw-2854018

closes odoo/odoo#92248

X-original-commit: 0a01e0b97f96754ac2ae84da207584b6b6860b0e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-25 13:40:14 +02:00
qsm-odoo db00365ba8 [FIX] base: properly render ProcessingInstruction nodes of views XML
Before this commit, when a view contained a ProcessingInstruction node
`<?XXX YYY?>`, if this was rendered via qweb, it was leading to very
strange results in the form of
```
<<cyfunction ProcessingInstruction at 0x7f538c4902b0>>YYY</<cyfunction ProcessingInstruction at 0x7f538c4902b0>>
```

After this commit, it will lead to "<?XXX YYY?>" being rendered which
will automatically be parsed into an HTML comment if reaching a browser:
```
<!--?XXX YYY?-->
```

Note: this will be rendered only if preserve_comments is set to true.

This was added following [1] which actually led to an issue where some
ProcessingInstruction nodes were rendered by mistake. That was fixed
with [2]. With this commit, that kind of mistake will silently fail
(which may not be good) but will lead to no harm and allows to better
debug such cases (by actually allowing rendering what was in the view).

[1]: https://github.com/odoo/odoo/commit/f67832a3ae0d9a3b5b53129132762e6bc1aed874
[2]: https://github.com/odoo/odoo/commit/de348b3f818adcf2068deb629e612c246a6a4374

closes odoo/odoo#92213

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-05-25 13:40:04 +02:00
Damien Raquet 745143f2a7 [IMP] timesheet_grid: improve timesheet overtime computation
Allows the timesheet overtime computation to be based on the contract
the employee had on the day of the timesheet instead of his current
contract. The employee creation date of the demo data is set in the past
in order to ensure demo data works properly.

task-2652259

closes odoo/odoo#88742

Related: odoo/enterprise#24910
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-25 13:39:57 +02:00
Valentin Chevalier 930b6860d7 [IMP] payment_stripe: support refund
Allows users of Stripe to refund their customers directly from Odoo.

task-2678763

closes odoo/odoo#92235

Related: odoo/documentation#2086
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-25 12:46:08 +02:00
Alexandre Kühn b65e6e3e16 [FIX] mail: error when editing record after removing followers
Before this commit:

BasicModel.localdata is not getting updated after follower removed

After this commit:

BasicModel.localdata is getting updated after follower removed

Task-2810734

closes odoo/odoo#91928

X-original-commit: c5da228
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-25 12:45:59 +02:00
Nemael 6f90029a12 [MOV] im_livechat: turn legacy livechat into odoo modules
Task-2825098

closes odoo/odoo#90842

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-25 12:45:55 +02:00
thcl-odoo f1e53538dd [FIX] l10n_de: fix uploaded document signature
Current behavior :
While having DIN 5008 (external_layout_din5008) as document's layout, an error
occurs when you try to validate & send a signed document, which has been uploaded

Steps :
- Install Germany - Accounting (l10n_de) and Sign
- Set Document's Layout to DIN 5008 in the Settings
- Go to Sign, then
  - Upload a pdf
  - Insert a sign field
  - Send it
- Try sending the document after signed it

Reason :
sign.request doesn't have name field which is used in DIN 5008 layout [1]

[1] : https://github.com/odoo/odoo/blob/d5b8c26c46b1daf795a6b286af80bb4dad8072ff/addons/l10n_de/report/din5008_report.xml#L107

OPW-2763962

closes odoo/odoo#92218

X-original-commit: c6d9988710e4414f787f85ad652674d0d72223fc
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-25 10:42:51 +02:00
Bastien Dosimont ba988f7e6b [ADD] website_sale_autocomplete : Autocomplete the address fields in website using Google Places.
task-id: 2806842
PR : https://github.com/odoo/odoo/pull/87636

- Implement an 'address.provider' structure, designed to be extendable and support multiple providers (not just google)
- Add a module website_sale_autocompletion, that could be relocated without too much hassle
- Add a module autocompletion_google_places thats adds google functionalities on top of the previous module

closes odoo/odoo#88782

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-25 10:42:47 +02:00
Bastien Dosimont 5b5150dfa5 [ADD] website_sale_onsite : Asking to pay/ship at physical store
Task-id : 2791237
PR : https://github.com/odoo/odoo/pull/87636

Allows customers to see a list of delivery carriers as shops in the website page;
A delivery carrier may now be an onsite one, which means the client comes to the corresponding store to pickup the products.

Also adds a payment acquirer based on wire transfer, for paying on site.
The customer can only pay on site if he also comes to pick the product on site

Notes :

- If a warehouse is set on a delivery carrier, the sales order will take it's address.

closes odoo/odoo#87636

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-25 09:45:07 +02:00
Benoit Socias fa550fbc76 [FIX] web_editor: allow moving gradient color steps for text colors
Since [1] gradient color steps cannot be moved anymore for the text
foreground and background colors.

This was already modified in [2] but it did not address the case of the
color palettes.

This commit makes sure that the mousedown events are not prevented
within the color palettes that are spawned within the toolbar.

Steps to reproduce:
- Drop a "Text - Image" snippet.
- Select the text header line.
- Apply a custom text gradient.
- Add an intermediary color step.
- Try to move the new color step.
=> Color step could not be moved.

[1]: https://github.com/odoo/odoo/commit/57701b2125f7de4fc543bd9c10642a5c11fa32b8
[2]: https://github.com/odoo/odoo/commit/84fd0b0a1bc1d874e7d6d6ff10b4fb6351f5a1af

task-2862233

closes odoo/odoo#92210

X-original-commit: 50342251895d8397788c3f914a2e7abf5439813f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-05-25 08:48:41 +02:00