Commit Graph
149493 Commits
Author SHA1 Message Date
Touati Djamel (otd) eeaff033b8 [FIX] mrp_landed_costs: validate a landed cost without the need for MRP access
Steps to reproduce the bug:
- Install mrp_landed_costs
- Connect as Admin
- Remove MRP access to Admin and Give him Stock manager access
- Go to inventory settings > Enable “Landed costs”
- Go to inventory > operation > Select any landed cost
- Try to validate

Problem:
An access error is triggered because we check if there are finished moves in the associated pickings and manufacturing orders
before validating the landed cost, but in the "_get_targeted_move_ids" function we access the "mrp_production_ids" field, which is reserved for mrp users.

Solution:
Creating and validating a landed cost is a feature for stock manager users.
We can therefore have users who do not need access to MRP, but who need to  validate and submit landed costs.
So we can give access to all of them even if they are not MRP users.

opw-2800367

closes odoo/odoo#87624

X-original-commit: 3b92178b27dcaa25024b9d79ae35c8768cd72fa6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-03-31 09:40:55 +02:00
Kevin Baptiste 565f11ec92 [FIX] lunch: properly open lunch products
Since odoo/odoo#fb9c8cd6 it was no longer possible to open the lunch product
in the kanban view as both _openRecord() (from base class) and
_onSelectRecord() were triggering events.

closes odoo/odoo#87612

Taskid: 2810219
X-original-commit: a497d95e8a4a55884800377d0de32babb78c05ce
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-31 09:40:48 +02:00
Nicolas Martinelli 3bdba8bc44 [FIX] server.py: cron trigger in recovery
When setting up the PG replication, the slave is considered in recovery
mode. However, `LISTEN / NOTIFY` is not supported in this mode, leading
to an endless loop of crashes.

In recovery mode, we simply deactivate the feature.

closes odoo/odoo#87619

X-original-commit: 6389a64953081130d62f2a1703a27ddfa751098b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-03-31 08:45:41 +02:00
Nicolas (vin) d9ee3a019e [FIX] l10n_fr_fec: allows exporting FEC without TVA number.
Not all company needs a French TVA number but still needs to provide
FEC file.
Improve that by making the TVA number optional, allowing to export the
FEC file without it. The only difference is that in such case, the vat
number won't be appended to the file name.

Task id #2801629

closes odoo/odoo#87620

X-original-commit: 59937bbea86a9d01bb7038f7e307fd88fbb82976
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-03-31 07:55:40 +02:00
Julien Castiaux 1dd3865208 [IMP] *: odoo.addons.web.controllers.main splitted
The odoo.addons.web.controllers.main python module have been splitted
over multiple files on the basis 1 controller = 1 file. In this work we
adapt all modules to use the new imports.

A non-exhaustive list of where stuff have been moved:

* main.Home		--> home.Home
* main.Session		--> session.Session
* main.WebClient	--> webclient.WebClient
* main.clean_action	--> action.clean_action
* main.ensure_db	--> home.ensure_db

The complete list is accessible in odoo.addons.web.controllers.main.

closes odoo/odoo#87571

Related: odoo/enterprise#25746
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-31 02:10:53 +02:00
Julien Castiaux bcf665a291 [MOV] web: split controllers.main in several files
The odoo.addons.web.controllers.main module was a very long bloated file
where many different controllers were concatened. It proved difficult to
work on that file on a regular basis,mainly because ctrl-p "web main.py"
was not pointing the right file.

In this work the file has been split on the basic 1 controller = 1 file.
The original way of importing stuff (through main.py) is still possible
thanks to deprecated aliases.

Part-of: odoo/odoo#87571
2022-03-31 02:10:53 +02:00
Nemael e5e5396db9 [MOV] im_livechat: move Thread outside of public_livechat.js
Task-2212347

closes odoo/odoo#87597

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 19:27:00 +02:00
Nemael 327208ca22 [IMP] im_livechat: change html to text to better suit the data type
Part-of: odoo/odoo#87597
2022-03-30 19:27:00 +02:00
Nemael 06b1d20efc [MOV] im_livechat: move Timers outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael f5e682be6b [MOV] im_livechat: move Timer outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 69268ee243 [MOV] im_livechat: move CCThrottleFunction outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 6fa40e3958 [MOV] im_livechat: move CCThrottleFunctionObject outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:59 +02:00
Nemael 4cc47b6eda [MOV] im_livechat: move AbstractThreadWindow outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael 3f70dcef5b [MOV] im_livechat: move AbstractMessage outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael c6370cf8e6 [MOV] im_livechat: move ThreadTypingMixin outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael 1ad530529c [MOV] im_livechat: move AbstractThread outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:58 +02:00
Nemael c1318210bc [MOV] im_livechat: move WebsiteLivechatWindow outside of -
- public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Nemael a5f8c8a160 [MOV] im_livechat: move WebsiteLivechatMessage outside of -
-public_livechat.js

Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Nemael 634aa21019 [MOV] im_livechat: move WebsiteLivechat outside of public_livechat.js
Task-2212347

Part-of: odoo/odoo#87597
2022-03-30 19:26:57 +02:00
Alexandre Kühn c6daa388f1 [IMP] mail: introduce MessageSeenIndicator/text
Task-2793280

closes odoo/odoo#87372

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 19:26:36 +02:00
Rahul Prajapati e3c9e29a44 [IMP] mail: improve active style on mentions dropdown
PURPOSE

The current 'active' class on the @mentions dropdown is not clear enough.
The purpose of this task is to add a grey hover background when the item is
active.

SPECIFICATION

Add the grey hover background when the item is active

Task-2786679

closes odoo/odoo#87598

X-original-commit: 9685d5fed97bb3ef3a84cfbbde2e757755a4bd2a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:32:00 +02:00
Alexandre Kühn f0fbdd3a06 [IMP] mail: remove 'MessageSeenIndicator' recompute methods
Task-2806655

closes odoo/odoo#87352

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:53 +02:00
Alexandre Kühn 081c6f147c [IMP] mail: remove MailTemplateComponent/activity
Task-2793280

closes odoo/odoo#87342

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 18:31:47 +02:00
Alexandre Kühn 6bd65a50d2 [IMP] mail: turn 'FollowerSubtypeView/subtype' into field
Task-2793280

closes odoo/odoo#87013

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 18:31:40 +02:00
Abdelouahab (abla) 6246ec0f46 [FIX] google_calendar : fix default reminder
To reproduce
============

- Sync Google Calendar to Odoo
- Create an event in GCaledar without setting a notification
In Odoo Notification reminder is set

Purpose
=======

we use default reminder given by Google which is notification 30 minutes before even if the event
doesn't have a reminder.

Specification
=============

To solve the issue we use empty reminder instead of the default given by google if no reminder is set.

opw-2792364

closes odoo/odoo#87592

X-original-commit: a25d38dd252a657ea44c822a227e415337003672
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-03-30 17:35:26 +02:00
Yannick Tivisse 9b1b25522f [FIX] hr_contract: Avoid setting a calendar from another company
closes odoo/odoo#87588

Related: odoo/enterprise#25739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-30 17:35:11 +02:00
Julien Castiaux 5ced646b3f [FIX] auth_signup: impossible to login
Install auth_signup, go to /web/login, 500 Internal Server Error.

auth_signup extends the /web/login template and in this extension calls
`keep_query()` which has been wrongly moved from base to http_routing in
commit 880954ebfc. Here, we restored `keep_query()` in the base module
but moved in ir_qweb.

closes odoo/odoo#87491

Related: odoo/enterprise#25754
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-03-30 17:35:06 +02:00
Aaron Bohy 0e6f152ea4 [REF] web: orm service: export x2many commands magic numbers
This commit renames the `Commands` object exported by the orm
service into `x2manyCommands`, and adds the magic numbers in that
object.

closes odoo/odoo#87582

Related: odoo/enterprise#25750
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-30 16:34:26 +02:00
Huy 34e5bdc6f7 [FIX] website_crm: skip archived visitors in stat button
Currently stat button on crm.lead form view still shows page views count of
archived visitor records. This is not coherent with the action performed
when clicking which filters out archived records.

We now correctly count only active visitors page count.

closes odoo/odoo#87574

X-original-commit: 325aaebca2d7b6b3a0e285f957e2be5736e7c69e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-30 16:34:18 +02:00
Merlin (megu) b0a614bfb9 [FIX] l10n_de_stock: delivery slip template data
Delivery slip with the document layout `external_layout_din5008` should
not contain two times the order number and shipping date

Steps to reproduce:
1. Install Sales and Inventory apps and l10n_de module
2. Select the german company
3. Create and confirm a sale order with and specify a customer and a
product
4. Open the delivery through the Delivery smart button
5. Print the Delivery Slip
6. The order and shipping date are displayed two times; once on the top
right, another time under the document title

Solution:
Remove `l10n_din5008_template_data` because it's a redundant information
The order number and shipping date that it previously contained were
already displayed in the report template
https://github.com/odoo/odoo/blob/ec90e9bfee208761f8247b55260895990b7614ed/addons/stock/report/report_deliveryslip.xml#L49-L53
so `l10n_de_template_data` should be removed and this is the simplest
way without touching din5008_report.xml

opw-2761919

closes odoo/odoo#87573

X-original-commit: 4ebcc46098b3849098184f3efb67032862d88062
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-03-30 16:34:10 +02:00
Waleed Mohsen c31423a756 [FIX] web: navbar: set action id in menu href
Before this commit, the href attribute of menu elements didn't
contain the "action=xx" part but only the id of the menu.

closes odoo/odoo#87570

X-original-commit: 6b8242ee1918b784dfdb2160cca6df1c165a824b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-30 16:34:04 +02:00
Brieuc-brd f6a9c2868c [IMP] mail: ChatterTopbar, remove inconsistent style
Prior this commit, there were several inconsistencies with the corners
of `ChatterTopbar` buttons. Some of them had rounded corners, others did
not.

After this commit, the `ChatterTopbar` buttons have the same consistent
style: rounded in Community and square in Enterprise.

task-2781992

closes odoo/odoo#87148

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 16:33:53 +02:00
William Braeckman 970b3d1700 [FIX] website_payment: fix invalid update call
Fixes an invalid call to update after values were no longer parsed into
ints.

TaskId-2694089

closes odoo/odoo#85228

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-30 16:33:48 +02:00
Christophe Monniez 784049e97e [FIX] reqs: bump requests to match urllib3 requirements
The urrilb3 version was bumped to 1.26.5 in a87af91211bb but it appears
that requests 2.22.0 needs an urllib version < 1.26 [0].

With this commit, the requests version is bumped to 2.25.1 which needs urllib3 < 1.27 [1].

Debian Bullseye also provides requests 2.25.1 [2] while Ubuntu Focal
provides 2.22.0 [3].

[0] https://github.com/psf/requests/blob/aeda65bbe57ac5edbcc2d80db85d010befb7d419/setup.py#L47
[1] https://github.com/psf/requests/blob/c2b307dbefe21177af03f9feb37181a89a799fcc/setup.py#L47
[2] https://packages.debian.org/bullseye/python3-requests
[3] https://packages.ubuntu.com/focal/python3-requests

closes odoo/odoo#87517

X-original-commit: 0340de280e592517f73de8731683a5cd45988245
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-03-30 15:33:58 +02:00
Giang Phạm f9e0880c82 [FIX] core: computed stored many2many field not computed at install
closes odoo/odoo#87553

X-original-commit: b54f78de307543efcea934206806f361eaac811a
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-30 14:19:52 +02:00
Romain Derie c2450aa353 [FIX] website: correct page properties groups behavior
Before this commit and since [1], there was an issue regarding the
group feature on the page properties dialog.
When a page visibility is set to restricted groups, and that more then
one group is required, a link would be displayed to edit the page's
view in the backend. That link was hardcoded, always pointing to the
same view.

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

task-2800685

closes odoo/odoo#87549

X-original-commit: 9c7a540ddb3e23d847bd1564274b76d8426b2732
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-03-30 13:05:04 +02:00
tsm-odoo 1da8863a7d [IMP] mail: adapt remaining tests data seeding
task-2792108

closes odoo/odoo#87430

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 13:04:58 +02:00
Hubert Van de Walle (huvw) 0097bd77e9 [FIX] web: the search bar input should be trimmed
Steps to follow

  - Go to the Sales app
  - Search for a entry with a space at the end
  -> No results are returned

The search input should be trimmed, it was in 13.0

opw-2803156

closes odoo/odoo#87529

X-original-commit: 06817417e190d64ab6b0fc6151e02b6090b1fd39
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-03-30 12:06:38 +02:00
Laurent Desausoi (lade) 25b62dc46b [FIX] stock_picking: SM with default partner_id
SM doesn't contain its partner_id (Destination Address)
unless the partner is manually updated from the Stock Picking form.

To reproduce the issue:
1. Create a new "Planned Transfer" (e.g.: on a Delivery Order)
2. Fill in mandatory fields
3. Enter some "Product Operations" AFTER having selected a "Delivery
   Address". THEN, save.
4. Now, go to "Reporting > Stock Moves" while in debug mode and group by:
   "Destination Address"
5. The newly created SM will be included underneath the
   "Undefined" section while they should be underneath the section
associated to the "Delivery Address" choosed in Step 3

Solution: The partner_id must be linked into the SM upon creation of the Stock Picking

opw-2784805

closes odoo/odoo#87507

X-original-commit: 759485afcf62b5f53f26c392644e7e6e54abc804
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-03-30 12:06:34 +02:00
Alexandre Kühn ccf3ff3043 [IMP] mail: introduce 'insertText' test helper
Task-2806986

closes odoo/odoo#87396

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 12:06:29 +02:00
Alexandre Kühn eb77f59197 [IMP] mail: turn "Rtc/pushToTalkTimeout" into fields
Task-2734101

closes odoo/odoo#85036

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-30 12:06:20 +02:00
Didier (did) 5151425abc [FIX] mail: follow up send is_main with the attachments
task-2783076

closes odoo/odoo#87508

X-original-commit: 7fcc26adf6c4aff1e89574617cfe79337f703b96
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-30 11:13:34 +02:00
bve-odoo ad6827f5e5 [FIX] base: allow the codeview on users signature
Since v15 and the owl improvment, the signatures of other users
could not be modified in HTML (as v14 and previous) as the
codeview button was missing.

In order to modify the signature with this commit in v15:
1/ Access a user
2/ Edit
3/ Click on the codeview button (Odoo Green button with </> inside)
4/ Copy/paste your html code
5/ (/!\) Click again on the codeview button
> You should see your HTML signature
6/ Save

opw-2728194
follow-up of https://github.com/odoo/odoo/pull/80788

closes odoo/odoo#87506

X-original-commit: 573a33d10d0cc830ab6e23b4ec512f9394530c90
Signed-off-by: Simon Goffin <sig@odoo.com>
Signed-off-by: Vergote Baptiste (bve) <bve@odoo.com>
2022-03-30 11:13:30 +02:00
William Braeckman f665aececa [IMP] hr_holidays: allow limiting postponed days on accrual allocations
Adds a new option on accrual levels to limit the days that can be
post-poned year by year.

TaskId-2768674

closes odoo/odoo#85281

Related: odoo/upgrade#3279
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-30 11:13:21 +02:00
William Braeckman 81b56427c6 [IMP] hr_holidays: remove level compute from accrual levels
The level compute was a bit complicated and not accurate at all.
It is now done using css instead.

TaskId-2768674

Part-of: odoo/odoo#85281
2022-03-30 11:13:20 +02:00
Pierre-Yves Dufays 22f7851272 [IMP] survey: copy conditional questions when duplicating a survey
Allow users to easily duplicate complex surveys that contain questions
displayed based on previous answers.
Currently, when duplicating a survey, the conditional settings are not copied
and the user has to re-do the entire mapping manually.

The implementation adds a post-process that recreates the orginal conditional
display mapping on the new copy of the questions.

Task-2766473

closes odoo/odoo#85117

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-30 11:13:02 +02:00
Brieuc-brd 05ab3dec89 [IMP] web: improve design of block_ui
Prior this commit the spinner was an image.
After this commit the spinner is an animated SVG. It also improves the
layout of the block_ui component.

task-2750837

closes odoo/odoo#83811

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-03-30 11:12:57 +02:00
Brieuc-brd d55740fbbc [IMP] web: revamp block_ui
This commit simplifies the SCSS of the block_ui component.

task-2750837

Part-of: odoo/odoo#83811
2022-03-30 11:12:56 +02:00
Umesh Gupta cf0398f9c3 [IMP] {event_}sms, test_mail_full: remove record count in SMS composer
Currently we have the record counter in sms composer wizard, that allows
us to select all the records with given active domain (so that instead of
just the records selected by user, SMS can be sent on all the records
matching the active domain).

However, now in standard, we already have a feature that allows user to
not only select records in the current page, but from all the records
matching the current domain in list view. So, in the SMS composer, the
feature to select all records is not much useful, and repeats the
information user already has.

With this commit, we remove this feature and it's related code, to make
the composer simpler and align it with what has been done for the
mail composer. We also improve the wordings for invalid phone number
related warning.

TaskID-2728556
Upgrade PR: https://github.com/odoo/upgrade/pull/3181

closes odoo/odoo#82947

Related: odoo/upgrade#3181
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-30 11:12:46 +02:00
Xavier Morel 2cb4ec90aa [FIX] project: random cache flushing issue in test_task_portal_no_read
test_task_postal_no_read` calls `assertEqual`, which internally
creates a savepoint which flushes pending computations.

This is done by flushing the transaction (through the cursor), which
in turn goes and flushes the models.

The environment being used to flush the models is arbitrary, picked
from the set of all living environments associated with the
transaction favoring those with a user set. This means the environment
used to perform the pending computation can be a lot more restrictive
than the operation used to initiate said computation, which may lead
to the computation being flushed not being *possible to perform*.

The issue here is that the test specifically involves a restricted
user ("Portal user", created for the occasion). Logging the set, at
the start of the test function there are 11 active environments
associated with the superuser (uid1) and one (1) environment
associated with that user, let's call it 19 (because that's the uid it
gets when running only that job).

On the runbot the envset seems to shuffle really well and about 2/10
of the runs will have the env(uid=19) in leading position[0], thus try
to flush the *creation of the task* with the portal user, which
specifically does not have access to tasks.

This works around the issue by flushing the task creation in the
`setUp`, however the underlying issues remain.

[0]: This also seems to require some load on the runbots, if the
     runbots are pretty much unloaded (no pending builds)
     reproduction is never achieved. It is not clear why load
     would matter.

     Local reproduction was not successful, even using a dump from the
     runbot and inducing artificial load (via stress-ng).

closes odoo/odoo#87512

X-original-commit: fc08ff42ec8886f6258bde6586c4293b64c89456
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-03-30 08:15:49 +02:00