Commit Graph
152162 Commits
Author SHA1 Message Date
Denis Ledoux b2e5cb8604 [FIX] sale: test_fiscalposition_application missing uom group
When `sale` is installed alone,
the test fails because it changes the field `product_uom`
which is invisible in the view because the user executing the test
doesn't have the appropriate group.

```
FAIL: TestSaleOrder.test_fiscalposition_application
Traceback (most recent call last):
  File "/data/build/odoo/addons/sale/tests/test_sale_pricelist.py", line 292, in test_fiscalposition_application
    line.product_uom = uom
  File "/data/build/odoo/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field product_uom
```

closes odoo/odoo#95910

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-13 16:23:05 +02:00
Denis Ledoux 5e4d697b24 [FIX] base: test_create_res_partner with only account_accountant
This is about the same than
d6ad39abba

but with account_accountant installed

```
FAIL: TestFormCreate.test_create_res_partner
Traceback (most recent call last):
  File "/data/build/odoo/odoo/addons/base/tests/test_form_create.py", line 35, in test_create_res_partner
    partner_form.property_account_payable_id = property_account_payable_id
  File "/data/build/odoo/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field property_account_payable_id
```

closes odoo/odoo#95903

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-13 16:22:55 +02:00
lejeune quentin 173d14c0c1 [FIX] hw_drivers: Add printer manually to IoT
Actually it is not possible to add manually a printer.

With this commit we loop into all printer recorded in cups to
check if a printer is not automatically added.
If a printer does not match with a identifier automaticcaly generated,
it is added to the list of usable printer.

closes odoo/odoo#95709

X-original-commit: de03cbefd537503cd46cbecf1622bd2a547b4615
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-13 13:48:47 +02:00
Nam Dao 5d50b4d89b [FIX] discuss: fix error open document inside channel on mobile device
When the user opens a document from the chat channel, the system opened the document, but the chat window is still there and covers the document.

closes odoo/odoo#95880

X-original-commit: 29fa81cc02e5f70ab4875164e290f8a69ffde2e3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-13 11:03:58 +02:00
Romeo Fragomeli 3af9f3d7c8 [FIX] web_editor: adjust alignment in media_dialog
Add some classes to improve the alignment.
Quite difficult to deal with as we have a lot of inputs on the same line.

Follow of odoo/odoo#95725

closes odoo/odoo#95815

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-13 09:47:53 +02:00
Joseph Caburnay 72bd6b86c3 [FIX] point_of_sale: automatically create new order
When in point_of_sale, the screen when getting out of the TicketScreen
is the current order's screen. However, when all the orders are deleted,
no new order is created, thus, pos crashes when clicking back button without
manually creating a new order. With this fix, when the TicketScreen is
closed (either by clicking an order, or clicking the TicketButton or
clicking Back button), a new order is automatically created when there
are no more orders. The sequence of the orders is also properly tracked
which is important in the fiscal data modules.

closes odoo/odoo#95876

Task-id: 2886099
X-original-commit: 20a04a70ba8b24349054522632a53a9701313329
Related: odoo/enterprise#29394
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-07-13 08:38:11 +02:00
Sébastien Theys 458cb9b55a [IMP] mail: display guest in channel member list
Part of task-2664860

closes odoo/odoo#95859

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 18:31:42 +02:00
Denis Ledoux 4161e1d04e [IMP] stock: default warehouse and location for orderpoint
This follows revision
odoo/odoo@9925c8fbaf

On creation of an orderpoint,

if warehouse and location are not specified,
set default warehouse and location

if warehouse is specified but not location,
set default location according to the warehouse chosen
(and not the location of the default warehouse, as formerly)

if location is specified, but not location,
set default warehouse according to the location chosen
(and not the default warehouse, as formerly)

if warehouse and location are specified,
let them, do not overwrite them.

closes odoo/odoo#95851

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-12 18:31:24 +02:00
Pierre Masereel 74c21caeb9 [FIX] point_of_sale: display product price with fiscal pos
When the price of the products is displayed in the product screen, we
are now taking into account the taxes when the pos diplays taxes
included.

The issue is that we are using the taxes on the product, and we are not
applying the fiscal position of the current order on the price.

We are now taking it into account

OPW-2860737

closes odoo/odoo#95848

X-original-commit: e162a7084f584fc9b5d5b2db7f519b5b47ad6406
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-12 18:31:21 +02:00
Denis Ledoux eddd52713e [FIX] purchase: missing uom group for test_with_different_uom
The user executing the test is changing the UOM
while the field was invisible because the user
did not have the multi uom group.

Therefore, add the group to the user for the test
so the field is visible in the form.

This is related to revision
odoo/odoo@5ccc32fcf7

```
2022-07-12 11:59:39,526 22 ERROR master odoo.addons.purchase.tests.test_purchase: FAIL: TestPurchase.test_with_different_uom
Traceback (most recent call last):
  File "/home/odoo/src/odoo/master/addons/purchase/tests/test_purchase.py", line 268, in test_with_different_uom
    po_line.product_uom = uom_dozens
  File "/home/odoo/src/odoo/master/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field product_uom
```

closes odoo/odoo#95841

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-12 18:31:17 +02:00
Dharmraj Jhala d8d30829c6 [FIX] calendar: open calendar view from 'Reschedule' activity button
With recent commit[1], we now use the wowlEnv instead of the legacy one,
and use the service provided by env to call the rpc.

This was adapted in the activity model, but not on the patched method
under calendar.

This commit fixes the issues to adpat the change, and so the 'Reschedule'
button for the meeting activity now opens the calendar view as expected.

Apart from that, this commit also tries to align this button with other
activity buttons, for better UI.

commit[1] - https://github.com/odoo/odoo/commit/3573a7fef497d

taskID-2899402

closes odoo/odoo#95747

X-original-commit: b7efe2a80f9da175114cf1138565580981690001
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 18:31:13 +02:00
Odoo's Mergebot 71abeef70d [MERGE][IMP] microsoft_outlook, fetchmail_outlook: improve usability, lessen module complexity
Purpose
=======

Improve the usability of the outlook modules. Lessen module complexity.

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

Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.

Hide the password field for Outlook / Gmail mail servers.

Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending do not
fail).

Merge fetchmail_{google/microsoft} into google_gmail / microsoft_outlook?
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules, for both
providers, to lessen complexity.

Task-2811567

closes odoo/odoo#88215

Related: odoo/upgrade#3419
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-12 15:36:51 +02:00
std-odoo ee61556907 [REF] microsoft_outlook, fetchmail_outlook: merge microsoft / fetchmail outlook
Purpose
=======
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules into Microsoft Outlook.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo 87c682c1df [REF] google_gmail, fetchmail_gmail: merge google / fetchmail gmail
Purpose
=======
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules into Google Gmail.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo e9f712278d [IMP] microsoft_outlook, fetchmail_outlook *: improve usability
* fetchmail, google_gmail, fetchmail_gmail

Purpose
=======
Improve the usability of the outlook modules.

Specifications
==============
Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.

Hide the password field for Outlook / Gmail mail servers.

Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending does not
fail).

Add an option in the mail module to install Outlook.

Show a message for the outgoing mail servers to explain each
authentication methods.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo afe8222712 [IMP] microsoft_outlook: allow customizing the outlook endpoint
Purpose
=======
If we want to deploy Outlook for a custom organization, it might be
useful to be able to customize the endpoint used in the API request.

For that purpose, we added a system parameter to overwrite the default
endpoint.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo eb2dd1d674 [IMP] base, fetchmail: improve the mail servers list
Purpose
=======
Improve the incoming mail server list view and the outgoing form view.
Show the most used option first, and make the view more responsive.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:49 +02:00
Laurent Stukkens (LTU) 9a0050149e [FIX] sale_timesheet: prevent sale_timesheet_tour to indeterministically fail
Prior to this commit, the `sale_timesheet_tour` was indeterministically failing
due to the fact that the tour step responsible of saving the data was not waiting
for the previous step (responsible to confirm the SO) to be finished.

This commit fixes this issue by ensuring that the buttons that allow confirming
the SO are not visible any more.

closes odoo/odoo#95825

X-original-commit: 287a7449ed5c809847a6b0c9719b8b3cc0215e3a
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 13:21:36 +02:00
Camille Spiritus ca999dd8a3 [IMP] account: remove deprecated invoice date method
Deprecated method _get_default_invoice_date is no longer used and can therefore be safely removed.

closes odoo/odoo#95820

Signed-off-by: William André (wan) <wan@odoo.com>
2022-07-12 13:21:33 +02:00
Sébastien Theys 2e4ae1f5fb [FIX] mail: prevent crash when cancelling message edit
task-2917199

closes odoo/odoo#95814

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 13:21:30 +02:00
Rémy Baranx (bar) 2fbfbf0dce [FIX] calendar, microsoft_calendar: backport bugfixes from master
As several customers complained about lot of bugs in microsoft_calendar in 14.0,
It has been decided to backport bug fixes of the model layer from master to 14.0,
without the need of an upgrade script (no new field, ...).

In master, we use 2 ids (organizer event id + universal id) instead of only one,
to handle Odoo <-> Outlook sync correctly when several attendees sync their Outlook
calendar with their Odoo calendar. For that, we have added a new field.
To report this bug fix in 14.0, the existing field which stores the organizer event id,
is now a string storing both ids separated by a ':' as follow: 'organizer_event_id:universal_id'.

2 new compute fields have been added to be able to use these 2 ids more easily.

(all commits from the original PR have been squashed to ease forward-port)

closes odoo/odoo#95736

X-original-commit: 5e83318a7240585371efd31e407829793f3e732f
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-12 13:21:27 +02:00
Xavier-Do d6ad39abba [FIX] base: manage non existing ref
If the test is ran on a database without account installed, it will fail
because of the missing ref.

closes odoo/odoo#95735

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-07-12 13:21:24 +02:00
Sébastien Geelen (sge) 923d139f9f [FIX] web_editor: ensure no root inline node
During Editor initialisation, detect if the editable element contain orphan inline nodes.
If so we transform the base element HTML to put those orphans inside `<p>` containers.

This is used to ensure the HTML generated by Etherpad is compatible with this editor,
allowing the user to use all the features without loosing the Etherpad look.

task-2877273

closes odoo/odoo#93207

closes odoo/odoo#95347

Related: odoo/enterprise#28965
Related: odoo/enterprise#29130
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js

closes odoo/odoo#95445

Related: odoo/enterprise#29185
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-07-12 13:21:16 +02:00
Sébastien Geelen (sge) 0d77895b09 [FIX] web_editor: inlines should be pasted inside container
During paste HTML, an inline element or a textNode should never be
inserted outside of the targeted initial container.

Those kind of orphans elements should never be present in an HTML paste data,
but better safe than sorry.

Part-of: odoo/odoo#95347

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js

Part-of: odoo/odoo#95445
2022-07-12 13:21:15 +02:00
Sébastien Geelen (sge) 8556b6d35e [FIX] web_editor: adapt unit tests
* Adapt Unit tests to always have a container block element
* Add some tests to ensure the editable root direct child nodes are all blocks
* Fix paste HTML unit tests to properly check that we never paste inline
  elements or text nodes outside the target container

Part-of: odoo/odoo#95347

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/test/spec/collab.test.js
#	addons/web_editor/static/lib/odoo-editor/test/spec/copyPaste.test.js
#	addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js

Part-of: odoo/odoo#95445
2022-07-12 13:21:15 +02:00
Kevin Baptiste ecf07e1043 [IMP] hr,hr_expense: adapt kanban views to OWL
task-2900536

closes odoo/odoo#95317

Related: odoo/enterprise#29116
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 13:21:07 +02:00
Audric Onockx (auon) 7ab3254b59 [IMP] hr_timesheet: change settings description
Change descriptions in settings:
'Employee reminder' > '...timesheets users that still have timesheets to encode'
'Manager reminder' > '... timesheets managers that still have timesheets to validate'

task-2859663

closes odoo/odoo#93169

Related: odoo/enterprise#27754
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 13:20:59 +02:00
Rahul Prajapati 51c72ae955 [IMP] mail: open dm chat on mention or member click
Purpose:

Access the DM chat to a user when clicking on its @mention
(DM or chatter) or member name (in Discuss).
The same goes for @mention to channels.

Specifications:

- DM to Author should be opened after clicking on his name
- DM to Author should be opened after clicking on his mention
- DM to channel should be opened after clicking on it's mention
- There should be a grey background hover effect on channel members in
  members list

Task-2631948

closes odoo/odoo#92050

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 13:20:56 +02:00
Julien Van Roy 4cdd9a0d86 [FIX] account_edi_ubl_cii: fix embedding of pdf in xml
The embedding of the pdf inside the xml should only take place
for a defined list of EDI formats (bis 3, ubl_de, nlcius),
not for all. Otherwise, we get unexpected behaviours when
generating other EDI's xml (e.g. l10n_pe_edi).

closes odoo/odoo#95795

X-original-commit: 75a87bc7fa1f3331efe2048bb949e3426df2dc57
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-07-12 12:00:50 +02:00
Ivan Yelizariev e0c179b6d2 [FIX] sale: fix multi-company error with partner bank
On creating Invoice for an SO, Odoo checks for available bank records for the
partner and if there few of them, it chooses the first one.

However, the first one might be from another company, which leads to
"Incompatible companies error". It may happen when user works with several
companies (few active companies in the company switcher).

Fix it by filtering available bank records by company

opw-2745339

closes odoo/odoo#95790

X-original-commit: 2617772f07a77375b49a64a8e379ffe1d6f450dd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-07-12 12:00:47 +02:00
Hardik Prajapati bdc4b4a21b [IMP] base,project: improve project and the uninstall wizard
This commit does the following changes:
 - Improve some project filter and views
 - Align the module kanban buttons
 - Sort the module in uninstallation wizard

task-2731708

closes odoo/odoo#83339

Related: odoo/enterprise#23783
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 10:37:02 +02:00
Achraf (abz) d46494006f [FIX] hr: Prevent user to access to activities without rights
Steps:
- Schedule some activities to `admin` (users with hr officer)
- Remove hr rights to `admin`
- Log-in with `admin` and click on notification
- Click on `Summary`
- Traceback

If we click on `Summary` a `_search` is executed in `hr.employee`
When a user does not have the required rights we will apply `_search` on
the fields on `hr.employee.public` instead of `hr.employee.private`.
Except that in the case of `activity_ids` this field does not exist in
`hr.employee.public`

opw-2765032

closes odoo/odoo#95802

X-original-commit: c4a5c63b6141424e31d7a7c8bc6d0c00d58643c0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 08:40:01 +02:00
Philippe Wauthy fdee8ab152 [IMP] hr_holidays: make duration field read only
In hr_holidays, the duration field is editable but doesn't bring any added value.
The field is errorprone and not editable if you are not HR Officer. It should be the same in every case.

The duration field should be read only on the dashboard and time off creation screens.

task-2901951

closes odoo/odoo#95534

Related: odoo/enterprise#29352
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 08:39:58 +02:00
pedrambiria fb36e02de5 [FIX] google_calendar: not sending emails to existing event attendees
Before this commit: syncing with google led to sending emails to
attendees of existing future events on Odoo.

Steps to reproduce the first issue:

	- Install 'google_calendar' module
	- Integrate with Google Calendar in setting
	- Add an event to the Odoo calendar for future date
	- Add one external attendee to the event
	- Sync with Google

	Invitation emails would be sent to the attendees of the events.

Solution

	It's possible to not send emails to the attendees in api calls. So
the solution is to not send emails to the attendees for the syncing
time.

opw-2819046

closes odoo/odoo#95781

X-original-commit: ac78ad6bf806ae3233ad38399771745edc8dc00d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-07-12 07:31:41 +02:00
Martin Trigaux d3cc71db72 [FIX] auth_totp: remove outdated trusted devices
The trusted devices are valid for maximum 90 days (TRUSTED_DEVICE_AGE).
No need to keep them in the list of trusted device, it may even be
confusing.

closes odoo/odoo#95796

X-original-commit: 49130e60a3c43fa3df0adddbd3359e437f5bc0b2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-07-12 06:21:03 +02:00
afmipy d190a2b48e [CLA] afmipy
closes odoo/odoo#95779

X-original-commit: 3747a32878515c3ded82194574cfaea1a4d1831a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-07-12 06:21:00 +02:00
Jeremy Kersten 8a18d7a20f [IMP] website_sale_autocomplete: don't search if less than 5 char
In case of error (wrong whitelisted ip e.g.), the error was not visible.
Now we log it in odoo-log.

Add arbitrary limit of 5 char before to make api call
(limit: 'Rue X', 'Street', ...)

Hide suggested dropdown if less than 5 chars or no results (in case of
error, results are empty and so dropdown not with class 'show')

task-2806842 (partially)

closes odoo/odoo#95773

X-original-commit: 387d19208fc97259c5786c5098c02ccc248c53ae
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-07-12 06:20:57 +02:00
Ipsita Borisagar 3fe33487e1 [FIX] im_livechat: disable attachment upload via drag and drop
Before this commit:

Attachments are not properly supported in livechat, so there is no point in
allowing attachments to be uploaded via drag and drop.

After this commit:

Disable attachment upload via drag and drop in livechat channels.

Task-2824502

closes odoo/odoo#95761

X-original-commit: 1aed05eb1c50ee69b974a140b3080e38c802cb2f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 06:20:51 +02:00
alt-odoo a6ca15fa9d [FIX] hr_gamification: grant badge to employee of another company
This is a side-effect of commit [1].

Consider we have access to companies A and B, and current active company
is A. Before the mentioned commit we were able to grand a badge to an
employee in company B. We should keep that behavior, as long as the
current user have also access to company B.

[1]:https://github.com/odoo/odoo/commit/b5b105eabd90419a5856e8279e277743c5915fc9

closes odoo/odoo#95757

X-original-commit: 9590b910ccaf92d0466b27ce3c4dda3c567f8676
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 06:20:45 +02:00
FrancoisGe 1f4e583ba2 [FIX] web: CP lose init seach value
Before this commit, in the HomeMenu, typing several characters very
quickly could result in some not being present in the command palette
when it was opened.

Exemple:
In the HomeMenu,if I type "a" "b" "c" quickly the command palette will
open with the search value "/a" or "/ac". So we have lost the second
and/or third character.

Why:
All characters typed between the first and the moment the command pallet
is not yet mounted are lost because the search bar of the command pallet
is not yet available.

Solution:
If you use openPalette and the command palette is already open.
The configuration of the command pallet will be overwritten by the one
given to openPalette.
In our case, we can pass new configurations with the correct searchValue
until the command palette is returned.

closes odoo/odoo#95492

Task-id: 2906623
Related: odoo/enterprise#29230
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-12 04:21:33 +02:00
Laura Schauer 2ee4251d07 [IMP] payment(_adyen, _authorize): disable tokens of disabled acquirers
Before this commit, zombie payment tokens (= tokens linked to disabled
acquirers) could still
1) be used by internal users and
2) reactivated when the acquirer’s state changed to ‘test’ or ‘enabled’.
This is not desirable because zombie tokens should neither be used,
nor reactivated.

After this commit, all tokens related to an acquirer are unassigned
from linked documents and archived as soon as the acquirer’s state is
changed to ‘disabled’. Creating a payment with an archived token is
prohibited. In addition, archived tokens cannot be un-archived anymore.

task-2649806

closes odoo/odoo#93774

Related: odoo/enterprise#28661
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-12 03:09:44 +02:00
Xavier BOL (xbo) 2432b4a490 [IMP] project_purchase: allow user to add new purchase order
Before this commit, when the user is in the project update kanban view
and click on Purchase Order row shown in Project Profitability section
in the right side panel, the user cannot create or edit a purchase order
because the AA on each purchase order line is used to link those
purchase orders to the project.

This commit adds the project and also `project_update` key in the
context to use them keys to set the AA on new Purchase Order Line by
default.

task-2861207

closes odoo/odoo#95721

Related: odoo/enterprise#29304
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 01:29:25 +02:00
Xavier BOL (xbo) c227ff755a [IMP] project: update contextValue for components in right side panel
This commit directly add the `default_project_id` key in the
`ProjectRightSidePanelComponent` component to get it in all components
which extends on the that component.

task-2861207

Part-of: odoo/odoo#95721
2022-07-12 01:29:24 +02:00
Denis Ledoux d369929d60 [IMP] mrp: convert unbuild uom and locations onchanges
This allows to create a mrp.unbuild record without
the need to call the onchanges to set the uom and locations
or to set them manually during the `create` call.

For instance, this makes easier to create unbuild orders
using XMLRPC when you do not use multiple UOMs or multiple locations.

closes odoo/odoo#95557

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-12 01:29:20 +02:00
Miquel Raïch 02c541a73b [FIX] delivery: assure stock user can validate pickings
Steps to reproduce:

- Delivery module is installed.
- User_1 is stock_manager and sale_manager.
- User_1 creates sale_order with set carrier_id and confirms it
  (Automatically is created a picking P).
- User_2 is stock user/manager but in sale is "Own documents only".
- User_2 open picking P and validates it.
  => Error: cannot validate due to access rules.

closes odoo/odoo#94684

X-original-commit: 465bb47b89e34609b34a647a5a4ba4db8a0ffc8a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-07-11 23:43:41 +02:00
Hubert Van de Walle (huvw) 9392129e96 [FIX] mail: update record after activity edit
Steps to follow:

  - Go to a crm.lead
  - Schedule an activity
  - Click on edit
  - Click on mark as done in the popup
  - Move the lead to a new stage
  -> A missing record error is displayed for the activity

Cause of the issue:

  Once the activity has been mark as done (deleted),
  The crm.lead record is not updated. The old activity is then
  passed to the server where an error is thrown

Solution:

  Update the main view after editing an activity

opw-2878984

closes odoo/odoo#95748

X-original-commit: 0a740e819b7f2aa7feb527bb3223b272e4c9f967
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-07-11 20:25:23 +02:00
Romeo Fragomeli 12e189bb48 [FIX] web: BS5: restore table-striped behaviour
In BS4 text color wasn't defined for `table-striped`.
In BS5 color text decorations in list views was broken because of BS5
sets the color of all `td` in a stripped table.
Now we simply override the value of the variable to inherit.

closes odoo/odoo#95746

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-11 20:25:20 +02:00
Xavier-Do 2c6e73a6f3 [FIX] account: avoid invisible product_uom_id
For a non well identified reason, the user doesn't have the uom group
to see the field during the test.

this commit adds the group to the user to make it visible during
the test as a simple fix.

closes odoo/odoo#95741

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-11 20:25:17 +02:00
Denis Ledoux 3d7c14a7e4 [IMP] mrp: fix import order in test_order.py
CI/Style
```
odoo/addons/mrp/tests/test_order.py:8
from odoo import Command, fields
C0412(ungrouped-imports) coll 0: Imports from package odoo are not grouped
```

closes odoo/odoo#95733

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-11 20:25:11 +02:00
Denis Ledoux 4abacd9cff [IMP] mrp: default workorder duration_expected without form/onchanges
With this revision, the expected duration is correctly set
when creating a production order with work orders without the need of
onchanges, through a form.

For instance, this allows an easier implementation to create a production
order with work orders through XMLRPC API calls,
as you will not need to manually set the expected duration value
or to call onchanges manually to set it.

For instance, without this change to remove the `default=60.0`,
the part added by this revision in the test `test_update_quantity_3`
would fail
```
2022-07-11 09:15:14,644 21 ERROR master odoo.addons.mrp.tests.test_order: FAIL: TestMrpOrder.test_update_quantity_3
Traceback (most recent call last):
  File "/home/odoo/src/odoo/master/addons/mrp/tests/test_order.py", line 347, in test_update_quantity_3
    self.assertEqual(production.workorder_ids.duration_expected, 90)
AssertionError: 60.0 != 90
```
while it just does the same thing than the existing `test_update_quantity_3` test
but without the use of a form / onchanges.

Part-of: odoo/odoo#95733
2022-07-11 20:25:11 +02:00