Commit Graph
151539 Commits
Author SHA1 Message Date
Josse Colpaert d34865f590 [IMP] http: avoid traceback when no postgresql server
This commit tries to avoid a traceback when no postgresql connexion is available.

closes odoo/odoo#92195

X-original-commit: 8199daf4bcba76277fed39554863efa3f1585b20
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-05-24 23:01:54 +02:00
Christophe Monniez 53d00c7ce5 [IMP] packaging: add a new install type for windows
In order to be able to use #86723 Odoo needs to be used as a local
proxy. With this commit, a new install type `Local Proxy Mode` is added
to the windows installer. When chosen, this install type does not
install the PostgreSQL server and it adds the `hw_l10n_eg_eta` as a
server wide module. It also generate and sets a proxy token.

While at it, the windows packaging is a bit improved:
* the VM now uses the virtio drivers
* the installer size and speed is improved

X-original-commit: 8586f78af36616d8014caf7ec9e44d8f6549d10d
Part-of: odoo/odoo#92195
2022-05-24 23:01:54 +02:00
Christophe Monniez bd3c681b99 [IMP] cli: add a command to generate a proxy token
This commit adds a `genproxytoken` command to generate and set an access
token for the proxy mode in the config file.

X-original-commit: 41a7224b46b3b163789257efd4583ef2d74479ba
Part-of: odoo/odoo#92195
2022-05-24 23:01:54 +02:00
baa d1ab5f549c [ADD] hw_l10n_eg_eta: add proxy-server to electronically sign binaries
For the egyptian localization, it is necessary to electronically sign invoices before sending them to the egyptian tax authority (ETA). This module is a proxy server located on the user's pc which will interact with a secure thumb drive provided by the governement which contains the private key used for signing.

X-original-commit: 71c3f46ead217ac89718aa34d94914452c75e699
Part-of: odoo/odoo#92195
2022-05-24 23:01:53 +02:00
akr 18b2ba6d10 [ADD] l10n_eg_edi_eta: add e-invoicing for egypt localization
X-original-commit: 6fc28ee7807409c90da806475dfed567cc9ccbae
Part-of: odoo/odoo#92195
2022-05-24 23:01:53 +02:00
akr 7b9774b946 [IMP] base: tools: Added json_round to round into json suitable representation
X-original-commit: 415c06362c7ecea9472acf8da2ff75615eedb392
Part-of: odoo/odoo#92195
2022-05-24 23:01:53 +02:00
Alexandre Kühn 3a844d8132 [FIX] mail: proper hover feedback of message action list buttons
Follow-up of https://github.com/odoo/odoo/pull/90893

Improvements of message action list introduced a gap of clickable
part of button between button and the container of buttons.

This commit fixes the issue by removing this gap.

Also fixes an issue where the icon buttons were too small in mobile.

Task-2862366

closes odoo/odoo#92196

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 19:11:10 +02:00
Sébastien Theys f2877f711a [IMP] mail: introduce and clean follower views
Part of task-2810734

closes odoo/odoo#92193

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 19:11:06 +02:00
Sébastien Theys 677eee90a9 [FIX] mail: fix potential issues with notification request
This patch was previously defined globally, but it has been removed at some
point. This absence prevents from running some tests that relied on it when the
current browser value does not match what the test is expecting.

Part of task-2810734

Part-of: odoo/odoo#92193
2022-05-24 19:11:06 +02:00
Demesmaeker 86ff8c6e8f [REF] payment(_*): compute feature fields
Computing the fields instead of storing them allows to implement the
feature for each provider more easily, without needing a migration
script.

task-2841744

closes odoo/odoo#91961

Related: odoo/enterprise#27618
Related: odoo/upgrade#3535
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-24 19:10:55 +02:00
Ipsita Borisagar 70f844e7a1 [IMP] mail: appropriate padding around chatbox search bar
Set appropriate padding around the chatbox search bar and aligned it with the
header content.

Task-2844934

closes odoo/odoo#91900

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-24 19:10:48 +02:00
Carlos Valverde f429502d92 [IMP] mail: discuss_sidebar design revamp
This commit improves the design of the `_quickSearch` component, by
adapting its design to the logic of Bootstrap's `form-control` class.

Task-2823729

closes odoo/odoo#88710

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 19:10:44 +02:00
Carlos Valverde 661f303e7c [REF] mail: discuss_sidebar scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2823729

Part-of: odoo/odoo#88710
2022-05-24 19:10:44 +02:00
Pierre Paridans f7f07ef6e5 [FIX] web: test breaking in newer Chrome due to rounding issue
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 the list view column sizing tests).

As the difference is *really* small, introducing a margin of error (i.e.
<= 1px) looks reasonnable ; as implemented in this commit.

closes odoo/odoo#92203

Forward-port-of: odoo/odoo#92066
X-original-commit: 5f0353814fc314b75a34a38e700bd7f0797dd18d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-24 18:10:31 +02:00
xlu-odoo e5e997ea96 [REF] mail: rtcCallViewer, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2835842

closes odoo/odoo#90407

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 18:10:26 +02:00
Abdelouahab (abla) 533cf7a984 [FIX] base : add unlink access to partner manager
To reproduce
============

- make sure to have two contacts with same email (duplicate Mitchell for example)
- in 'Contacts', switch to 'list view', selected any two contacts with the checkboxes, go the the 'Action' menu and select 'Merge'
- Click on 'Skip these contacts', then click on 'Deduplicate the other contacts', then check the 'Email' checkbox and click on 'Merge with manual check'.
- click on 'Skip these contacts'

an Access Error is raised

Purpose
=======

Partner Manager doesn't have the unlink access to `partner.merge.line` model, this access wasn't given because it's often unecessary,
but here it's good example where it's needed.

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

to solve the issue we give the unlink access to partner manager.

opw-2851507

closes odoo/odoo#92188

X-original-commit: a6754f3524401c325ae6926ed6984dc1add24f79
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-05-24 17:09:04 +02:00
abd-msyukyu-odoo 5186aeb867 [FIX] mass_mailing: keep body of invalid saved mailing
There was an issue when a mailing save failed: the edited body of the mailing
was lost.

Impacted versions:

  - 15.0 and higher

Steps to reproduce:

  1. Create a mailing "Start from scratch" and add some elements
  2. Do not fill in the subject (or at least one required field)
  3. Save (it should fail because of the empty required field)

Current behavior:

  - The edited template is lost

Expected behavior:

  - Keep the edited template even if the save failed

This commit fixes the problem by properly awaiting the promise _doAction so that
the field's value will be set correctly.

The testing tour `mass_mailing_editor_tour` is updated to check that the
body_arch is kept after a failed save.

This issue was introduced in 15.0 with:
95754eb6a4

Task-2856742

closes odoo/odoo#92186

X-original-commit: bc81178d541587f757d76932449d35ed426699aa
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-24 17:08:59 +02:00
FrancoisGe 321d687a2f [FIX] web: tests: patchDate use the offset fixed in luxon
Before this commit, patchDate used the machine offset and not the offset
fixed in luxon.

For example:
    Date to Patch = 01-01-2000 10:30:00
    Machine offset = -120 (UTC-2)
    Luxon offset = 360 (UTC+6)

Before:
    Patched Date = 01-01-2000 10:30:00 UTC-2

After:
    Patched Date = 01-01-2000 02:30:00 UTC-2

closes odoo/odoo#91591

Signed-off-by: Bruno Boi <boi@odoo.com>
2022-05-24 17:08:53 +02:00
FrancoisGe 646371b705 [IMP] web: tests: add patchTimeZone in test utils
This commit adds a testing utility function that applies a fixed time
zone to luxon based on an offset to the UTC time zone.

Part-of: odoo/odoo#91591
2022-05-24 17:08:53 +02:00
xlu-odoo e427dad102 [REF] mail: rtcInvitationCard, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2853300

closes odoo/odoo#91537

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 17:08:47 +02:00
Carlos Valverde a5cd14ec3a [REF] mail: discuss_sidebar_category_item scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2833744

closes odoo/odoo#88925

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-24 17:08:44 +02:00
Carlos Valverde 9b7ac5980b [IMP] mail: user-select cross-browser compatibility
This commit improves cross-browser compatibility by adapting the css
statement to Safari's Webkit syntax.

Task-2825261

Part-of: odoo/odoo#88925
2022-05-24 17:08:43 +02:00
Carlos Valverde 9ee2f5472a [REF] mail: discuss_sidebar_category scss refactoring
Current SCSS is replaced with global Bootstrap classes, in
order to reduce code lines and to increase performance.

Task-2825261

Part-of: odoo/odoo#88925
2022-05-24 17:08:43 +02:00
Jacky (trj) 2e3e1ab71d [FIX] point_of_sale,pos_restaurant: fix auto FloorScreen when idle
- Restaurant shops should automatically go back to floor screen when
idle. However, after https://github.com/odoo/odoo/pull/89712, this
feature is broken when pos_hr is also installed - the screen doesn't
automatically go back to floor screen.
A simple fix is to clear the tempScreen name when the shown tempScreen
is closed. Note that this change is fine because when tempScreen is closed
(!isShown), the `tempScreen.name` information has no use.

- Once the `idleTimer` is set, it is never removed. This means that
even if the conditions to go back to the FloorScreen at the current
time T are not satisfied, the `_actionAfterIdle` is still run.
Checking if the action can be done once triggered fix the issue.

closes odoo/odoo#92177

X-original-commit: d77d7e90b8f437c012dea2da2ec01e59c14b34ff
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-05-24 16:00:26 +02:00
Antoine Guenet a1e8d116d5 [FIX] mass_mailing: properly allow global customize separator colors
The design tab allows the customization of the separators' colors but
this is currently broken because it gets overridden by the default style
of the snippet, which has higher specificity.
Besides, the priority of styles was lost.

closes odoo/odoo#92174

X-original-commit: 098202ba584ca6ba3544ccd00397578f5deb12ad
Related: odoo/enterprise#27719
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-24 16:00:19 +02:00
Huy Le 504ff2a674 [FIX] website: exclude non installable theme on configurator
Exclude non installable theme from the configurator suggested themes.
Also, exclude themes which are found in the database (sql) but not in
the manifest (files/sources). This was reported after migration where
`theme_beauty_sale` was still in the database but did not exists
anymore.

Note that in prior versions, this was causing a `KeyError`.

closes odoo/odoo#92167

X-original-commit: 6e4faeb136e123e09d74cde06c47f7c822b1fd19
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-24 16:00:14 +02:00
Yannick Tivisse fdc54c4aab [FIX] hr_contract: Display the same count than the number of related contract
Purpose
=======

We open the contract history view, the count shouldn't be based on the
contracts, but on the history itself (to exclude canceled contracts for
example).

closes odoo/odoo#92040

X-original-commit: 5754eb95d681ec9ad63bf1a3c98a60cbb75d2869
Related: odoo/enterprise#27652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-05-24 16:00:02 +02:00
Yannick Tivisse 19441d2902 [FIX] hr_contract: Reset current contract on stage modification
Purpose
=======

Let's say we have 2 contracts A and B:

A --> Running
B --> Cancelled
contract_id : A

B is set to Running
Contract_id : B

B is set to Cancelled
contract_id : B

In this case, the current contract should be reset to A.

X-original-commit: f736264881cbb3086430ea8cd7dba7c4f5a351f4
Part-of: odoo/odoo#92040
2022-05-24 16:00:02 +02:00
Leonardo Pavan Rocha 2981fdec6f [IMP] hr_fleet: overwrite ir.attachment kanban view
In the assignation logs in hr_fleet, it is possible to access the list of
attachments and upload new files to a certain log. However, we currently
enter the form view for ir.attachment to create the record and many technical
fields are shown that are not necessary. This commit overwrites the kanban view
adding an upload button that will open the file upload dialog of the OS and
automatically add the uploaded files to that certain assignation log.

task-2742923

closes odoo/odoo#83755

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-24 15:59:57 +02:00
Leonardo Pavan Rocha 299bb47a53 [FIX] hr_fleet: fixes demo data vehicle assignation logs
In the demo data from hr_fleet, we add address_home_id's to some employees in
order to create the correct vehicle assignation logs. However, as the driver_id
is already set at that moment, the _compute_driver_employee_id is not called
again as no dependency was changed, resulting in an empty driver_employee_id
for some logs. This commit fixes this by calling the compute method on the demo
data with the assignation logs that have no driver_employee_id set and have a
driver_id.

task-2742923

Part-of: odoo/odoo#83755
2022-05-24 15:59:56 +02:00
Leonardo Pavan Rocha 5dba452227 [IMP] fleet, hr_fleet: improve assignment logs view
Assignment logs list view can be accessed both from fleet and from hr_fleet,
however they show many repeating fields and, for this reason, this commit
improves these views by leaving the repeating fields as optional="hide".

task-2742923

Part-of: odoo/odoo#83755
2022-05-24 15:59:56 +02:00
pedrambiria c3030c3a7c [FIX] pos_restaurant: get table draft orders without employee
Before this commit: In the PoS Restaurant, if the employee is not
installed, the orders wouldn't contain employee_id, and UI couldn't get
table draft orders.

Steps to reproduce the first issue:

	- Install the' Point of Sale' module
	- Make sure Employees (hr) isn't installed
	- Create a PoS with "Is a Bar/Restaurant" enabled
	- Open a PoS session in the incognito window
	- Add the product to the orders for different tables
	- Close the incognito window and open it again

	It couldn't get table draft orders from the back-end.

Solution

	It must check that "employee_id" exist in the dictionary.

opw-2856653

closes odoo/odoo#92157

X-original-commit: 822d444f74edf8dd9bae7a01d3646e0888128901
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-05-24 14:51:19 +02:00
Odoo's Mergebot bb4a4ce740 [FW][MERGE][FIX] website_{,sale_}slides: fix join/buy links and resource access
This commit fixes
* One link that was not updated to use the post_link class
* The join course link for "payment" courses after completing the quiz once
  logged in.
* The link to resources that became accessible for non-authorized users for
  "payment" courses

See underlying commits for details.

Task-2818136
Part of Task-2663320

closes odoo/odoo#92104

Forward-port-of: odoo/odoo#92055
Forward-port-of: odoo/odoo#88454
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2022-05-24 14:51:15 +02:00
Florian Charlier ab71f778ba [FIX] website_slides: fix resource ACLs
This commit fixes ACLs for slide resources:
 * Access to resources should be blocked for non-members (except publishers
 for the course: responsible and managers)
 * Tests are included

NB: As links are resources from this minor version on, their access
is protected as for files.

Task-2818136
Part of Task-2663320
FwdPort of odoo/odoo#88454

X-original-commit: 075a647d58dc7e817b31a80c2ac804b06c8492bb
Part-of: odoo/odoo#92104
2022-05-24 14:51:14 +02:00
Florian Charlier bff5daa40b [FIX] website{,_sale}_slides: fix join/buy links
This commit fixes the following fronted bugs:
  * One link to "buy course" that was not updated to use the post_link class
  * The join course link for "payment" courses after completing the quiz once
    logged in.
  * The link to resources that became accessible for non-authorized users for
    "payment" courses

Task-2818136
Part of Task-2663320
FwdPort of odoo/odoo#88454

X-original-commit: 1a4368b3fce6206da555a1d04751b1aea53c6a29
Part-of: odoo/odoo#92104
2022-05-24 14:51:14 +02:00
Antoine Guenet b45cfda756 [FIX] mass_mailing, web_editor, website: remove bg shape/video in m_mail
The conversion of background images for mass_mailing doesn't support the
conversion of shapes on them (limitation of html2canvas), and emails
should not contain videos. This removes these options for mass_mailing.
Since the video option was added in place by `website`, this adds an
option in its template so it can be disabled. A similar option was added
for shapes, which depends on images being enabled as well.

task-2856858

closes odoo/odoo#91314

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-24 14:51:08 +02:00
Antoine Guenet 420d914384 [IMP] mass_mailing: make masonry text white by default
The default image in masonry is very dark, making the black text on it
(if the user starts typing) practically invisible. This makes that text
white by default.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:08 +02:00
Antoine Guenet 14cb5ccfea [FIX] mass_mailing: do not allow links within background-image elements
Since background-image elements and their children will be flattened
into images, links within them won't work. This removes the link button
of the editor toolbar, as well as the link and button commands in those
contexts.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:07 +02:00
Antoine Guenet 61f7366d68 [FIX] mass_mailing: do not open link dialog with Powerbox
There are two ways of editing links: the link tools (in the sidebar) and
the link dialog. In `mass_mailing`, the link tools were in the sidebar
but using the link command of the Powerbox opened the link dialog. This
makes it so only one mechanism is in use (the link tools).

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:07 +02:00
Antoine Guenet 64fb91ec01 [FIX] web_editor: properly hide link tools on selection over blocks
When the user selects across several blocks, the link tools are supposed
to be hidden. This was however broken due to other mechanisms restoring
it after it got hidden.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:06 +02:00
Elisabeth Dickinson 9be73fd087 [IMP] mass_mailing: remove negative margin on iframe
When the first snippet in a mail is for example a cover image,
the html2canvas library exports the image with a white line along the
top caused by the negative top margin on the iframe.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:06 +02:00
Antoine Guenet 1f8b1f0791 [ADD] mass_mailing: add background image to s_cover
The `s_cover` snippet was designed to have text over it but this was not
supported in `mass_mailing` because of a limitation of Outlook on
Windows so we replaced it with just an image with no text. Now that we
support text over images thanks to the conversion process, we can offer
that possibility for the `s_cover` snippet in `mass_mailing` as well.
Note that buttons over images are not supported so they were not added
to the snippet like they are in `website`.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:06 +02:00
Antoine Guenet efbb4a1f3e [FIX] mass_mailing: restore background image styles
When importing snippets from `website` to `mass_mailing`, the styles for
`.o_bg_img` were not carried over. This makes the image of the `Masonry`
snippet size poorly. This duplicates that scss into mass_mailing.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:06 +02:00
Antoine Guenet 6b628ebd5b [FIX] web_editor: flatten background-images in convert_inline
Outlook on Windows doesn't support background images. This has the
unfortunate effect that there is now way to write text over an image and
have it be seen on Outlook Windows.
This "flattens" background images by converting them and all their
contents to a `png` image, using `html2canvas`.
Note that _all the contents_ of the element with a background-image are
flattened into an image. This means that any interactive content such as
buttons is unsupported in that context.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:06 +02:00
Antoine Guenet 3fcb74533a [MOV] web_editor, point_of_sale: move html2canvas to web_editor
This moves the `html2canvas` library from `point_of_sale` to
`web_editor` so as to be able to use it in `convert_inline`.
`point_of_sale`, depending from `web_editor`, doesn't lose access to the
library.

task-2856858

Part-of: odoo/odoo#91314
2022-05-24 14:51:05 +02:00
Philippe Wauthy c934652660 [IMP] hr_holidays: set time off default employee when created from allocation smart button
In hr_holidays, each allocation granted to an employee has a smart button to see the linked
time off for this employee.
The create button on the tree view that shows these time off opens the form
with self.env.user.employee_id as default employee.

This commit changes the default employee of the time off to be the one of the original allocation

task-2844554

closes odoo/odoo#90739

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-24 14:50:48 +02:00
Antoine Guenet 12107a4e5f [FIX] mass_mailing: properly parse all values in design tab
The default values of borders for buttons were not properly parsed in
the design tab because they come from the `btn` class, which was not
part of the selectors for buttons in the design tab. The fake element
created to get computed styles therefore didn't have that class and thus
didn't have a border value.

The separator width value was also broken whenever it was "auto" since
we're expecting values of "25%", "50%", "75%" or "100%". This interprets
"auto" as equivalent to "100%" in all cases.

closes odoo/odoo#92138

X-original-commit: 56521a69d9cb61ec726722a2b102150bb1714070
Related: odoo/enterprise#27708
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-05-24 12:48:20 +02:00
Antoine Guenet 332da2e2fb [FIX] mass_mailing: prevent website s_hr interference with mass_mailing
`wWebsite`'s `s_hr` snippet css targets the same element as
`mass_mailing`'s `hr` snippet, resulting in interferences. This raises
the speciticity of `mass_mailing.s_hr`'s css to counter that issue.

X-original-commit: 112758b7c07870c5d002a87f4eed58bd8feb9bee
Part-of: odoo/odoo#92138
2022-05-24 12:48:20 +02:00
Elisabeth Dickinson 20449d3fab [IMP] mass_mailing: replace deprecated snippet in theme_default
X-original-commit: 076bd5ef1067549befdc18248575c40f7e9794fa
Part-of: odoo/odoo#92138
2022-05-24 12:48:19 +02:00
Elisabeth Dickinson 3333ba0084 [IMP] mass_mailing: various styling fixes for theme_default
Remove default styles which remove underlines on links.
Add global styling for theme_default.

X-original-commit: 4ec9847057d9888820c3d9b1b068e3658e80acd4
Part-of: odoo/odoo#92138
2022-05-24 12:48:19 +02:00