Commit Graph
147315 Commits
Author SHA1 Message Date
Louis Wicket (wil) 99b2c61d92 [IMP] mail: make inverses optional when unused
IdentifyingFields and fields marked `required` must have their inverse
with `isCausal: true`. This led to having to systematically declare
inverses on the related models in order to explicitly add `isCausal:
true` to them, even when these inverses are not used for anything else.

This commit automatically adds `isCausal: true` to the inverses
generated by the framework when they are related to required fields or
identifyingFields. Thus, it is no longer necessary to declare inverses
if they are not used for anything else.

This commit also removes all the inverses that are no longer needed
thanks to this change.

closes odoo/odoo#81679

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-20 17:59:01 +00:00
Achraf (abz) 6c39b566d6 [FIX] mass_mailing,project: Prevents crash on form views
When a user double clicks on a record in the kanban view of the form view of project a crash occurs.
This happens because there is an init which is called twice and during the second time the component created during the first click is destroyed and a DOM_updated event is still trigger which leads to a crash because in the case of project_form there is has a use of the element's dom which is then no longer available.

There is the same case in "FieldHtmlWithAction" and in "MassMailingFullWidthFormController"

The problem can be easily fixed by using on_attached_callback and on_detach_callback instead of setting a listener on DOM_updated in the init method.

opw-2685867

closes odoo/odoo#81680

X-original-commit: 8d83433d463dd3d1aef321921939962883f57d68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2021-12-20 16:53:09 +00:00
roen-odoo 927dd2d371 [FIX] hr: Cannot acces profile without right
Current behavior:
When a user doesn't have any HR access right he cannot access his own profile

Steps to reproduce:
-Go to the demo user settings
-Remove all the right in the HR section
-Log into demo account
-Try to access My Profile

opw-2712593

closes odoo/odoo#81674

X-original-commit: ee932eab329043a3ddf82bb39dff458f4eb7f7ad
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-20 16:53:05 +00:00
Florian Damhaut 44300c6d74 [FIX] stock: print traceability report
Step to reproduce:
Try to print traceability report

Current Behaviour:
Traceback wrongly generated header

Behaviour after PR:
No Traceback, the header is now correctly generated

opw-2704299

closes odoo/odoo#81673

X-original-commit: 6b567326edc7bc691d87d911759ee30a24a8a1d7
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-20 16:53:01 +00:00
Benjamin Vrayandqsm-odoo e51cdc1e60 [FIX] web_editor: prevent dropping popup inside a substructure
Before this commit, it was possible to drag and drop a popup inside an
oe_structure which was itself inside an other oe_structure (e.g. snippet
parallax). It didn't make sense and moreover created bugs.

After this commit, it is no longer possible to drag and drop the popup
snippet or the newsletter popup snippet in a substructure.

task-2491976

closes odoo/odoo#81669

X-original-commit: 49050c124795852ce7ad51b92958498972730dcf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-20 16:52:57 +00:00
Kevin Baptiste 9c5694e929 [IMP] hr: make tags visible/editable by Officer
The tags management on an employee was limited to HR Administrator,
which didn't make sense as an HR Officer could manage the tags just not
assign them to an employee.

closes odoo/odoo#81654

Taskid: 2715498
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-20 16:52:54 +00:00
Didier (did)andSébastien Theys 84adbcaffa [IMP] mail: move the activity handler inside a model view
part of task-2579306

closes odoo/odoo#79538

Related: odoo/enterprise#22506
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2021-12-20 16:52:47 +00:00
Antoine Guenet c53ebf8244 [FIX] web_editor: prevent line breaks at edges of anchor on press enter
When pressing enter at the edge of an anchor that is a child of an
unbreakable element, we inserted line breaks in the anchor itself, which
is unexpected. This inserts the anchors after/before it instead.

closes odoo/odoo#81662

X-original-commit: df6f8dd0c54c40ea7edbd3821ae068d79b1b7af7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 16:04:49 +00:00
Antoine Guenet d049e3d7d7 [FIX] web_editor: ensure snippet selection is kept when acting in it
The snippet selection was lost on every action in mass mailing. The code
that prevents that was checking if the target of a click was the body
element but for mass mailing we needed to be a little bit more
restrictive since the editable area is not the body itself and we want
to actually prevent changing the snippet selection when the target is
the iframe target as well.
Since the mailing itself has a options, the sidebar is actually never
empty and therefore removing a snippet doesn't bring us back to the
block tab. Since therefore also ensures that we actually do.

task-2716397

X-original-commit: ecdb71bf6a566f5f6c294904e84f2132561dbb3c
Part-of: odoo/odoo#81662
2021-12-20 16:04:49 +00:00
Tiffany Chang (tic) b8d2a07e3f [FIX] mrp_subcontracting: block all components = 0 qty_done
Same issue as odoo/odoo#71068 but for subcontracting rather than a MO.

Steps to reproduce:
- create a subcontracted product w/tracked component
- create receipt with subcontracted product (don't forget to set
  "Receive From" = subcontractor
- fill in Detailed Operations with tracked component lot/sn, but Done=0
- Try to record production

Expected Result: Subcontract production is done + window closes
Actual Result: nonsensical "The quantity to produce must be positive"
               validation error

Discovered during task: 2695173

closes odoo/odoo#81649

X-original-commit: 646789811c1f874160318badfe8105d84057b8bd
Related: odoo/enterprise#22998
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-20 15:09:50 +00:00
Tiffany Chang (tic) 631b111ead [FIX] mrp(_subcontracting): avoid view inheritance conflict
Both mrp_subcontracting and a module in Enterprise both inherit
`mrp.mrp_production_form_view`. This was leading to a conflict where the
Enterprise view could overwrite the invisible=1 attribute added by
mrp_subcontracting, therefore we update the views to avoid this.

Part of Task: 2695173
ENT PR: odoo/enterprise#22637

X-original-commit: 6317c34808d381e54bae2431fec2de4b8503b447
Part-of: odoo/odoo#81649
2021-12-20 15:09:50 +00:00
Tiffany Chang (tic) 509a32c3dc [FIX] mrp_subcontracting: show correct view when subcontracted product
Fixes 2 issues:

Issue 1: wrong view shown when registering strict consumption
To reproduce:
- create tracked product to subcontract
- create subcontract BoM with no tracked components + strict consumption
- create receipt of subcontracted product (remember to select From =
  subcontractor)
- click on `action_show_details` burger button in Operations

Expected result:
- Detailed Operations window with no move lines in it (i.e.
  stock.view_stock_move_nosuggest_operations view)
Actual Result:
- Detailed Operations window with move lines w/ 0 Done
  (i.e. stock.view_stock_move_operations view _ lines also do
  not get filled in when using the `action_assign_serial_show_details`,
  => twice as many lines as needed end up in view)i

Similar issue can occur when using a non-strict BoM + tracked product.

Issue appears to be that conditional was incorrectly updated during
refactoring to allow non-strict BoMs also record components.
stock.view_stock_move_operations view should only appear when all
productions are recorded

Issue 2: Consumption warning wizard not showing correctly
To reproduce:
- same as Issue 1, except consume less than BoM amount

Expected result: Consumption Wizard
Actual Result: stock move view shown instead

Issue was due to 'form_view_ref' value in context of picking view,
therefore we force clear this value everytime we expect this wizard
to open.

Task: 2695173
X-original-commit: b9990a5dab8731a8f69fd07aa73a318fc9d4a808
Part-of: odoo/odoo#81649
2021-12-20 15:09:50 +00:00
Antoine Guenet ccbcb4919e [FIX] mass_mailing: ensure media list items are full width
A horizontal padding was applied to each media list item, making it
impossible to make the media list items full width. Full width media
list items can always be reduced by adding padding in the editor, but
the converse is not true. For this reason, this commit applies
horizontal padding 0 to each media list item in the snippet template.

task-2716398

closes odoo/odoo#81637

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 13:38:59 +00:00
Antoine Guenet afa8233502 [FIX] mass_mailing: center image in cover snippet
When the cover snippet's image is in full width, we don't notice it's
not centered. But reduce its width and it appears at the left of its
container. There is no reasonable scenario in which this would be what
we expect so this commit centers that image by default.

task-2716399

Part-of: odoo/odoo#81637
2021-12-20 13:38:59 +00:00
Antoine Guenet f057befb82 [FIX] mass_mailing: use unicode copyright sign rather than font awesome
The footer templates were using a font awesome icon for the copyright
sign, while it has a unicode equivalent, which is easier to edit and
lighter.

task-2716401

Part-of: odoo/odoo#81637
2021-12-20 13:38:58 +00:00
Andrea Grazioso (agr-odoo) 8465d19c06 [FIX] account: creation of redundant entries
Have an MX database set up
Activate multicurrency (MXN and USD)
Have several rate for USD
- yesterday 0.047939098170
- today 0.048486729180
Make an invoice, dated yesterday for USD 116, tax 16% (cash basis)
Create a received payment dated today, for USD 116
Reconcile invoice and payment

Jounal items will be created for the invoice, for the exchange
difference and for the cash basis entries, but there are redundant
entries addressing the tax.
This occur because when reconciling the payment with the invoice the
system create the cash basis moves and reconcile them. During this inner
reconciliation exchange difference move are created (1) just for the tax
line.
Then the outer reconciliation flow continue and compute the exchange
difference moves, considering all cash basis items created before. A new
couple of journal items will be created to account for the difference in
tax, but this is redundant since it was already covered before (1)

opw-2685570

closes odoo/odoo#81624

X-original-commit: 03bf311bfde98f28a9b8e73953869a42b828c5e3
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-20 10:50:04 +00:00
Benjamin Vray 509b7654e9 [FIX] website_form: fix form redirection to an anchor in the same page
Before this commit, when the redirection of a form was an anchor and
that anchor link came from the anchor option, the scroll animation was
not triggered.

task-2172312

closes odoo/odoo#81622

X-original-commit: 5db838cfc91d8438d6234df00bd8174768445974
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-20 10:49:59 +00:00
rhe-odoo 27e65db56f [FIX] point_of_sale: receipt automatic print image fail
There were some issues when auto printing the receipt with images.
It could happen that the receipt was printed and the image were not yet visible.

To fix this, we make sure the image are rendered on the receipt before we print it.

closes odoo/odoo#81579

Ticket-id: 2688238
X-original-commit: 10d47ed2aee17f2a0d0b76c49c623fb3da4d5e30
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:52 +00:00
Pierre Masereel 70c12c5790 [FIX] l10n_sa_pos: qr code not seen on ticket
When a ticket was sent by email or printed, the qr code was not
visible. This was because it was not correctly put in the report and was
injected in the DOM throught the mounted of the component.

So we are now setting it in the qweb and prepare the values in
export_for_printing instead of inject it through the component that
display it.

closes odoo/odoo#81573

X-original-commit: 1ca12f15d39f9cda09fd1743184d64daf82adabc
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:49 +00:00
Florent de Labarre 572a7117b2 [FIX] point_of_sale : impossible to open the pos
- Create a TAX A and TAX B
- Create a fiscal position, and TAX A in scr and TAX B in dest, and add other tax map
- Use this fiscal position in POS
- A month latter unactive TAX B (because the law have change).
--> You have an issue during opening the pos

closes odoo/odoo#81427

X-original-commit: 7471f13264d7002bd5570b5008565d3cc84042e6
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:39 +00:00
anhe-odoo a38a0caa0e [FIX] sale_coupon: fix the unexpired_promotions filter
Expected behaviour

When having multiple promotions with, for example, a promotion of X% for the
first order and a promotion of Y% (Y<X), we should apply the first promotion
on the first order and then don't get this promotion into account to choose
the best promotion for a future order, so that we have:
1. A promotion of X% on the first order
2. A promotion of Y% on every other order

Observed behaviour

When trying to apply promotion on other order, nothing seems to happen, as
Odoo take the already-used X% promotion into account, being the most
interesting promotion, select it as the best promotion to apply and then
apply it to finally get a result of a 0% discount as the promotion has
already been used.

Problem Root Cause

As it can be seen in the commit, the error comes from the fact we filtered
the available promotion with a non-strict inequality.

Validation

A test has been added in test_program_numbers.py to validate our fix

Related issue

- opw-2674681

closes odoo/odoo#81633

X-original-commit: 9bade951570d79e2623d3bf548df445c22c31034
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2021-12-20 09:58:54 +00:00
Philippe Wauthy 98b8479585 [IMP] hr_skills: remove skills edit buttons when no rights
When the user has no rights on the Employee app, he can still
see the information on the employee public view
If the skills module is installed, there are add and remove buttons
displayed even in the absence of user rights.

Buttons should be hidden if the user has no rights to edit the
skills and resume

task-2702678

closes odoo/odoo#81617

X-original-commit: fd2f6e9586c5c853ba36d7ce511591574fac0bb2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-20 07:55:41 +00:00
Adrien Minet 96dab7ac98 [FIX] l10n_de: ensure o is defined in din5008 report
How to reproduce the bug:

- install l10n_de
- in Settings/General Settings/Business Documents, configure document
  layout to DIN 5008
- try to print one of several:
   => timesheet entries
   => direct debit mandates
   => follow-up reports

Bug:

When you use the DIN 5008 report defined in l10n_de, the o variable is
defined which generates an error.

closes odoo/odoo#81505

Opw: 2659703,2699563,2649221
X-original-commit: c6ffe7eb65844dad33db4390ffeeb24d61a36f40
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-18 21:00:49 +00:00
Josse Colpaert 144abbe552 [FIX] l10n_gcc_invoice: also add description/label of the invoice line
We did not add the description of the invoice line on the print-out
of the invoice. (probably because description is not translatable
and the name of the product is)

If a product is set, the name of the product becomes the description (label)
on the invoice line,  but of course this depends on the language.

So, we only add the description if it does not correspond
to either the English (/standard language) or Arabic product description.
(People can always add both languages in the same field)

Of course, if the product is not set, it will also just show the description (label).

Also put the : of the payment reference in Arabic on the other side.

closes odoo/odoo#81620

X-original-commit: 3485c7ad368d9c841d75a0b0614082b8989e2afc
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2021-12-17 21:59:10 +00:00
Josse Colpaert bc782cfc91 [FIX] l10n_sa_invoice: relax constraint for delivery date
We had a constraint(raise) that said that the delivery date needed
to be after the invoice date, but this is putting too many
constraints.

However, we put a help message to say that they should put the
date of the last delivery.  Also, the delivery date should not be
changed once confirmed like the other information in the invoice.

X-original-commit: 9e1a0fb37930de3c8cbc0ecf88052e5ddf55d474
Part-of: odoo/odoo#81620
2021-12-17 21:59:09 +00:00
William Braeckman 4902075e3d [IMP] hr: allow users to edit their settings in multi-company contexts
Before this commit users were not able to edit their settings if they
had a linked employee for a company that was not currently active for
them.
This is due to the fact that since the employee_ids field is considered
`safe` to read/write by your own user the fields were loaded in sudo and
thus bypassed the security rules that were meant to prevent that issue.
The security rule is now enforced as a domain on the `employee_ids`.

TaskId-2715341

closes odoo/odoo#81612

X-original-commit: b5b105eabd90419a5856e8279e277743c5915fc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2021-12-17 16:58:10 +00:00
William Braeckman 60ee56c0ed [REV] hr: revert commit 0e12620
Reverts commit 0e126201bf801e20412ae2b4cdf07e4a600adbd1
from PR #79472

TaskId-2715341

X-original-commit: bf1b27f9a77b42cd969a5129f67b9ffb0feed656
Part-of: odoo/odoo#81612
2021-12-17 16:58:09 +00:00
Adrien Widart 33f8a21155 [FIX] delivery: use tracking number only once
When having a shipper for a DO, if the user creates a backorder, the
information won't be sent to him.

To reproduce the issue:
(Use demo data)
1. Create a sale order SO with 2 products
2. Add Shipping: UPS US
3. Confirm SO
4. In the associated picking, deliver one of the products and create a
backorder
5. Process the backorder

Error: In the chatter, there is a label for the first picking but there
isn't any label for the backorder

When confirming the sale order, the backorder is first created and then
the initial picking is sent to UPS. As a result, considering the current
body of `send_to_shipper`, the field `carrier_tracking_ref` of both the
initial picking and the backorder is defined with the same value (i.e.,
the tracking number of the initial picking)

Therefore, when processing the backorder:
https://github.com/odoo/odoo/blob/f29da79ef64a8166e54544d1787912be5665076a/addons/delivery/models/stock_picking.py#L126-L129
`carrier_tracking_ref` is already defined, so `send_to_shipper` won't be
called

OPW-2678549

closes odoo/odoo#81599

X-original-commit: 89f9281b096e24583ff7780a1bb42f0c4b7b477e
Related: odoo/enterprise#22980
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-17 16:58:04 +00:00
Arthur Detroux (ard) 583f7ceb2d [IMP] website, web_editor: provide clarity for theme colors
Prior to this commit, the color presets generated by the color palette
would always be visible by the user which could lead to confusion.
Most users would click on the presets and edit them instead of editing
the color palette.

This commit groups the presets into a collapsed section under the color
palette to incentivize the user to click on the color bubbles instead.

task-2687469

closes odoo/odoo#79921

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-17 16:57:57 +00:00
Kevin Baptiste fbc7b78036 [FIX] lunch: show only company locations
All lunch locations were showing regardless of the company the user is
logged in.

Now only the lunch locations of the current company are showing.

closes odoo/odoo#81603

Taskid: 2710417
X-original-commit: 3e87770bb8faf2a58ba0b429148f64256537a4da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-17 16:07:37 +00:00
Kevin Baptiste b600373abb [FIX] hr_holidays: fix accrual test
The test `test_unused_accrual_postponed` was expecting at least 25
holidays to be accrued, but started failing around mid-December.

closes odoo/odoo#81592

X-original-commit: c2865b7f5b654a61d4b2690133797aa39712b00d
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-12-17 13:40:06 +00:00
Christophe Monniez 0aa8dbd295 [FIX] hr_holidays: fix freeze_time usage
When Freezegun is used with the `start` and `stop` method and the test
fails before the `stop`, the time stays frozen for all the other tests.

When it happens on runbot, a lot of tests brake with a lot of noise as
they are false negatives.

X-original-commit: 048796dc125b0d494f3c2fcd12625a84ee5cd91d
Part-of: odoo/odoo#81592
2021-12-17 13:40:05 +00:00
Arthur Detroux (ard) b7a110bf21 [IMP] web_editor: improve snippet search placeholder message
Tests showed that users didn't understand the goal of the search bar
above the snippets block under the tabs.

This commit changes the placeholder of the search bar to better
indicate its purpose.

task-2607728

closes odoo/odoo#81222

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-17 13:39:57 +00:00
Patrick Hoste af6c434812 [IMP] survey: open result page in new tab
SPECIFICATION

Before this commit, when clicking on the 'See Results' button
the page was loaded on the previous one.
After this commit, the page will open in a new tab.
We also took the opportunity to replace all the '_blank' value
occurence by the 'new' value as '_blank' value is not a valid
value for the 'target' field of the 'ir.actions.act_url' model.

LINKS

Task-2700305
PR : odoo/odoo#80858

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-17 13:39:53 +00:00
anhe-odoo 349c3710ae [FIX] website_*: update of the total amount according to the shipping method
Expected behaviour

When buying something on the website, the amount to be paid for the client
should take into account the choice of the shipping method.

Observed behaviour

When choosing a different shipping method than the default one, and only
if this method is a third party acquire, the total amount is updated on
the website, but the amount the client will be asked to pay doesn't take
into account this change, being computed according to the default shipping
method.

Steps to Reproduce this Issue
1. Select a product on the website and add it to the cart
2. View and validate the cart
3. Change the shipping method
4. Click on the "Pay now" button

Problem Root Cause

This issue comes from the fact that the amount was written in the view when
creating the cart view and wasn't updated by a change of shipping method.

Related issue
opw-2686369

closes odoo/odoo#81587

X-original-commit: 617ed0ef47d1496b912d5b85a494e3cda897da4d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2021-12-17 12:51:49 +00:00
Antoine Guenet 44a18a3ffa [FIX] mass_mailing: ensure mailing demo has a body_arch field
mass_mailing used to show the body_html but now shows the body_arch
field instead (and body_html only in debug mode). As a result, one demo
that had only defined body_html showed an empty field. This moves
the body_html of that demo into its body_arch.

task-2710460

closes odoo/odoo#81586

X-original-commit: a313276e7a84eac053b0b35b290e3f3132c051e2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-17 12:51:45 +00:00
Didier (did) 7d7a1e4029 [IMP] mail, website_slides: use mock server for activity test
closes odoo/odoo#81502

Related: odoo/enterprise#22941
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-17 12:51:39 +00:00
Andrea Grazioso (agr-odoo) f75abaf37e [FIX] point_of_sale,pos_sale: import tax from orderline
Set up a [TEST] product with a tax A
Create a SO with [TEST] and a tax B and confirm
Open POS, import the created SO

[TEST] will be imported with tax A
while tax B should be pulled from the sale order line instead

opw-2699793

closes odoo/odoo#81580

X-original-commit: 0a5cbfeb7edcce6e6bb915d6e61c736491695ada
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-17 11:58:44 +00:00
Florian Charlier 9540dc7772 [IMP] event: Improve logic and appearence of archived registrations
When an attendee's registration was archived, their seat was still
considered taken, which could be problematic such as in cases of
limited seat availability.

Only non-archived registrations are now counted as seats. The same
error as with regular registrations will be raised if there are not
enough seats available to un-archive a registration. These ValidationError
messages now show the name of the fully booked event.

A few python tests are included to verify the impact of (un)archiving on
seats availability for events and for event tickets.

The appearence of archived registrations was also not different in form
and kanban views, which is somewhat confusing and inconsistent with the
aspect of archived records in Odoo. Actions buttons are not available on
archived records.

Filtering in the archived records needed to be simplified from a "Custom
Filter" to a one-click feature, already available for many models.

Task-2646298

closes odoo/odoo#77715

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-17 11:04:53 +00:00
Rémy Baranx (bar) 846367530a [FIX] google_calendar: empty event name in google calendar
As explained at https://github.com/odoo/odoo/blob/171e42e380a46463b4359166955dc4c5f6ccf42e/addons/google_calendar/models/calendar.py#L206,
When there is no Odoo user who is the owner of the updated event,
modification are limited to some fields only.

In this case, that means we must use the `PATCH` method instead of the `PUT`
one to avoid erasing all not modified fields such the event name.

opw-2694739

closes odoo/odoo#81341

X-original-commit: 960e63a75350c28f186e55d69bffea6d51dcf7f1
Signed-off-by: Arnaud Joset <arj@odoo.com>
2021-12-17 10:10:49 +00:00
Nicolas Pierre bec3c58df3 [IMP] stock: Inventory Adjustments improvements
Improvements of the Inventory Adjustements page, among which:
 - Add a new 'Apply All' button (without the need to select a record)
 - Show the date at which the last count was done
 - Add warning icon next to duplicated SN
 - Allows to change the lot_id when empty and no quantities are set

closes odoo/odoo#78361

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-17 10:10:45 +00:00
Younn Olivier aa1134ac05 [FIX] website: fix mega menu items text edition
When inserting a new paragraph by pressing 'enter', it would
automatically close the mega menu.

As inserting a new paragraph triggers a historyRevert at the editor
level, it was leading to two issues:
- The widgets of the public root were stopped then restarted. The
StandardAffixedHeader (the public widget for the header), as an
Animation, would start its effects when started, which would close its
dropdowns. This commit changes the _updateHeaderOnScroll method to close
opened menus and dropdowns only when the animation has scrolled.
- Opening the dropdown was a recorded step. When history was reverted,
it would close it. Now toggling the mega menu is done with the editor
observer unactive.

task-2668908

closes odoo/odoo#81559

X-original-commit: 675430d53f6ef048b77afe95395bd760d3f5a2be
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-17 09:18:15 +00:00
Younn Olivier 6e15b916d2 [FIX] website: fix extra menu items dropdown display
[1] changed the structure to adapt it to the new dropdown menus. This
commit changes the css according to these changes so that mega menus are
correctly displayed inside the extra menu items dropdown from the auto
hide menu.

[1]: 29b9280c44534d2f210dbcea83e0049365949f48

task-2668908

X-original-commit: fdd06d70fa78098cbfe0bd5200acd2fa171f4576
Part-of: odoo/odoo#81559
2021-12-17 09:18:14 +00:00
Younn Olivierandqsm-odoo 073e63b824 [FIX] website: improve mega menus editability
This commit adds the possibility to modify some background colors of the
mega menus so that the templates are fully editable.

Some of these templates have a column with an extended background, using
the :before css pseudo element.
As this is not a DOM element, it cannot be changed from javascript.
It was decided that using shapes would not produce the same effect as
the designer intended, and that it would be too confusing for the user
to be provided with an option allowing to extend the background of a
column.
Therefore, these specific s_mega_menu_gray_area elements must have their
background hardcoded.

task-2668908

X-original-commit: f01c74118ad4c772fb18866956ab9fb214f781fa
Part-of: odoo/odoo#81559
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-17 09:18:14 +00:00
Tom De Caluwé e9f72aa643 [FIX] website: never hide countdowns with redirect action in edit mode
When editing a countdown with a redirect action, sometimes the
countdown block will be hidden when toggling the "Hide countdown at the
end" option.

The problem is caused by the button that allows previewing
and editing the end message of the countdown, this button does not
apply in the case of a redirect action though. However, the button can
still be activated by selecting a different end action first and
switching to the redirect action afterwards, in which case it will
incorrectly hide the countdown.

task-2638366

closes odoo/odoo#81557

X-original-commit: 7f6ebee33e8a82d7ccdf155c3a543898b187389c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-17 09:18:08 +00:00
Tom De Caluwéandqsm-odoo 9e5d149527 [FIX] website: correctly toggle the preview for the countdown snippet
The countdown snippet has an end action that can be configured to show a
message when the countdown reaches zero. A button in the editor toggles
a preview of this message. However, a bug currently makes the preview
disappear whenever the snippet's widget is restarted... which occurs by
simply hovering some other options.

To solve the problem, the preview visibility is now controlled by a
separate css class s_countdown_enable_preview overriding d-none. This
way, the preview visibility no longer interacts with the widget's logic
and is no longer affected by the widget restarting.

task-2638366

X-original-commit: c37354d457f5b868673b4f974e401f4c635062d2
Part-of: odoo/odoo#81557
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-17 09:18:07 +00:00
qsm-odoo 037bc4c255 [FIX] web_editor: remove useless test-breaking warning
A console.warn instruction was added with [1] in case an user interacts
with an editor widget which does not declare any linked option method
(as it is most probably a dev mistake). We have cases where it makes
sense though, adding a custom button with more complex events and
interactions or simply in some strange custo. This warning prevents to
test those uncommon behaviors in a tour test (which is what following
commits of this PR are trying to do).

This commit simply removes the warning.

[1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e#diff-ffb61e86e6b8297ef8997f9c605de14de896b54161c032d88a80bbaeac4f89beR490

X-original-commit: 1b18747c7a328df142d7b2cf206a84c39d5eac05
Part-of: odoo/odoo#81557
2021-12-17 09:18:07 +00:00
Florent de Labarre d8d67f470e [FIX] point_of_sale : allow edit to amount on done payment after reload
When you reload the pos (F5), this.payment_terminal is undefined.
And you can update the amount even if the payment is done.

closes odoo/odoo#81546

X-original-commit: 2e10f33511ced41f296e0f65d2d042f4e041cacb
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-17 09:18:00 +00:00
Jeremy Kersten de29bae3ee [FIX] hr: don't use .write() in a computed method
Before this commit, the computed field _compute_is_system make a write which
one is a bad practice and trigger a lot of others calls on res.user model.

opw-2716468

closes odoo/odoo#81555

X-original-commit: f85a67935c5dfa660e94f9bed8e8058c8df256cc
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2021-12-17 08:29:41 +00:00
Aaron Bohy 0376a259e5 [FIX] web: ActionService: send user context to /web/action/run
Since commit [1], the user context wasn't put in the context
sent when executing a server action (only the context of the
action sent). This commit fixes the issue.

[1] 7354d1686915ec21437fc677f15a6c5409106492

closes odoo/odoo#81552

X-original-commit: fee371be291ba3d6f1adc71c08420b6510fdf386
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-16 19:12:37 +00:00