Skip to content

saas-14.4-teleport-editor-nby - #73296

Closed
Goaman wants to merge 279 commits into
odoo:masterfrom
odoo-dev:saas-14.4-teleport-editor-nby
Closed

saas-14.4-teleport-editor-nby#73296
Goaman wants to merge 279 commits into
odoo:masterfrom
odoo-dev:saas-14.4-teleport-editor-nby

Conversation

@Goaman

@Goaman Goaman commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

No description provided.

DjamelTouati and others added 30 commits June 4, 2021 12:28
Steps to reproduce the bug:
- Go to elearning app > Courses > content
- Create new slide > Upload a PDF file with faulty content

Problem :
Pypdf2 throws errors because it does not support some content or syntax.
In our case we are just trying to get the number of pages in the PDF, so if we put `strict = false`
we just determine that the user should not be informed of all the errors that pypdf2 encounters,
the flag `strict` is not a security indicator.

FYI: https://pythonhosted.org/PyPDF2/PdfFileReader.html
``` strict (bool) - Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Defaults to True.```

opw-2530829

closes odoo#71751

X-original-commit: 3acd0d6
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Steps:
- Go to Point of Sale
- Open a new session
- Add an item to the cart
- Click [+/-], [1] to get a negative price
- Reload the page
- Click Payment
- Click Cash
- Validate
- Close the UI and go back to the backend
- Click the three dots on the POS
- Click View / Orders
- Open the last order

Bug:
The order is still in "New" state and two payments of the same amount
have been registered. This results in the order not being fully paid.

Explanation:
`get_change()` returns the amount to be given back to the customer. It's
usually set back to 0 when the payment lines are created (e.g. when
clicking "Cash"). `amount_return` is then sent to the backend with the
order.
However, when reloading the page before clicking "Cash", no payment
lines are made and `amount_return` has been saved in LocalStorage with
the result of `get_change()`. `amount_return`, which is usually
undefined is now set back to its old value when reloading from the saved
JSON.
Because `amount_return` is not undefined in this case, it doesn't change
the result sent in the JSON when clicking "Cash"; it's not updated with
0 from `get_change()`. This results in two payments being recorded in
the order after validating and sending it to the backend.

This commit always uses the result of `get_change()` when sending the
order to the backend.

opw:2446563

closes odoo#71754

X-original-commit: 5d1640d
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This is computed automatically since
04522f0

closes odoo#71755

Signed-off-by: Josse Colpaert <jco@openerp.com>
When you are opening a POS session, a number corresponding to count of
connection to this session is incremented, to be sure to have a unique
identifier on receipts.

In recent browsers, when you are reopening a recent tab (Ctrl+Shift+t)
the browser will load the response of last request and won't perform the
request. So the count of login won't be incremented, and this will
result of duplication of receipt number.

To avoid this behavior, we are explicitly say to the browser (through
the response header) that we don't want to cache the request result.

closes odoo#71763

X-original-commit: 21c92bf
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Move the lead mining section to the top right as we now have a lot more empty
space after the removal of the outlook plugin settings

Task-2531032

closes odoo#71712

X-original-commit: 1cb0c74
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since the computation of employees work intervals is done in batch,
i.e. 1 call to _work_intervals for each (tz, resource_calendar_id) pairs,
removing tz duplicates from mapped results improves
the perf of hr_presence_state/hr_icon_display computations.

This is especially true for grouped hr.employee kanban view as each column
search_read triggers a recompute for these fields.

closes odoo#71765

X-original-commit: be6d4a2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
PURPOSE

Replace text fields by html ones now that our own html editor has been
merged. Indeed it gives more options to users in the way they format their
content without weighting too much on the UI as tools appear on demand
and not by default.

SPECIFICATIONS

Convert a lot of text fields to Html fields as we have our own OdooEditor.
In some modules code adaptation will be necessary to handle html /
plaintext conversion when required.

See individual commits per main application scope for more details.

LINKS

Task ID-2499504

closes odoo#70663

Related: odoo/enterprise#18498
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- added test case for click on author name and on author avatar.

task-2391179

closes odoo#71737

X-original-commit: df2f110
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit updates owl to the latest release. It contains an
improvement: the support for the t-tag directive, which allow us
to have dynamic tagname in templates

Release on github: https://github.com/odoo/owl/releases/tag/v1.3.0

closes odoo#71769

X-original-commit: a1c173e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
rounding_line_vals is invoked directly with a .create(), so the "currency_id" key's value should be an integer. See line 810.

This is hard to catch, i use Sentry on my servers and i found this bug. I cannot provide steps to reproduce, as i just see this bug report in Sentry.

closes odoo#71764

X-original-commit: 38de8fc
Signed-off-by: William André (wan) <wan@odoo.com>
Make link tracker handle other types than many2one for tracking fields.
Currently, when a field of type char is returned, an error occurs.

odoo/addons/utm/models/utm_mixin.py already handles other types than
many2one for tracking_fields(). This aligns to that behaviour in the
link tracker.

opw-2494686

closes odoo#71779

X-original-commit: a2068f9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…s real_time

Steps to reproduce the bug:
- Go to inventory > create a new product
    -Create a new product category:
        * Select "Manual" inventory Valuation
        * Choose "First In First Out (FIFO)" costing Method
        * Be sure that in "Automated" inventory valuation, stock journal is not settled
- Save
- Update quantity of the product
- Go to Inventory > Inventory Valuation> Choose the product newly created
- Click on the "+" button to make manual valuation

Problem:
An error is triggered because we try to access stock_journal when it is false.

Solution:
Use “account_journal_id” only if the valuation is real_time and relax the required constraint of `account_journal_id` in case of manual inventory Valuation (which is not used in that case).

Opw-2541497

closes odoo#71705

X-original-commit: 4212719
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
When the user searches a phone number, the search function will generate
a pattern by removing the "+" sign as well as well as the prefix "00" from
the input string.

Problem:

If the input string starts with "+", it means that the phone number will
be prefixed by something different than "00". As the function will
systematically remove the first occurrence of "00" from the input string,
the function can remove part of the input string that does not correspond
to a prefix. The search results can hence be incorrect.

Example:

If the user types "+32485001122", the function will remove the "+" sign
and the first occurrence of "00" from the input string. In the provided
example, the function will search phone numbers matching with the pattern
"324851122" which is incorrect.

Solution:

The function should remove the first occurrence of "00" iff the phone
starts with "00".

Task id: 2479277
COM PR: odoo#69729

closes odoo#71708

X-original-commit: 53b4a7c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, when the start datetime of base_event_id in recurrences was not set, a traceback would occurs when trying to notify the user.

closes odoo#71716

X-original-commit: d5b9403
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
…er usign /lead command

Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead.
Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset.

closes odoo#71790

X-original-commit: 04ff97e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:

- Let's consider that Reservation = manual (Inventory>Configuration)
- Let's consider two interna users I1 and I2 with the following access rights:
   -Sales: own document only
   -Inventory: user
- Login as I1 : Create sale order SO1 to sell a storable product P
- Confirm SO1 to create delivery order DO1
- SO1's Sales Person should be assigned to I1 and DO1's status should be "waiting"
- Login as I2 : Create sale order SO2 to sell P
- Confirm SO2 to create delivery order DO2
- SO2's Sales Person should be assigned to I2 and DO2's status should be "waiting"

Bug:

When I1 or I2 tried to access DO1 or DO2, an access error was raised due to personal order line record rule

opw:2530101

closes odoo#71720

X-original-commit: ab2663a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This commit will fix a bug related to the position
of the shapes Blocks/01 and Blocks/02.
- Now, they can be connected when using together.
- Avoid a bug of position when the snippet is too tall.

Fix related to the PR odoo#70843

closes odoo#71806

X-original-commit: b5f135f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Fine tuning of
odoo@bdd36f7
to perform the assignment and related operation only when 'consignment' is
enabled

opw-2508371

closes odoo#71795

X-original-commit: 441ff95
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Part of odoo#67357
task-2471323

closes odoo#71828

X-original-commit: 37fcd93
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently there is an action_assign_serial_show_details button within
the detailed operations form of a serial tracked product move.
Unfortunately there is no way to undo the assigning/creating of move
lines from this action (including via clicking the "Discard" button).
This can lead to a lot of manual work (e.g. 500 SNs produced instead of
50) to remove unwanted move lines. To remedy this, we add in a button
to unlink all of the move's move lines whenever the Assign Serial
Numbers button is visible.

closes odoo#71827

Task: 2426281
X-original-commit: a6191c4
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- before this commit,
it was raising an error when trying to install the l10n_in module, due
to unavailability of report element

- after this commit,
l10n_in module can be installed successfully

closes odoo#71840

Signed-off-by: Josse Colpaert <jco@openerp.com>
We check if the mimetype is supported when uploading an image.

task-2523574

closes odoo#71836

X-original-commit: 3765ac1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Open Accounting>Reporting>Invoices
Add measure 'Average Price'

The reported amount will be wrong, as it will not consider the quantity,
making an average of the price subtotal

opw-2522621

closes odoo#71857

X-original-commit: 978012b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
The user_type_id field seems a bit out of place at the moment
in the header of the form view.
We will move it to the accounting tab with other fields in order to
improve that.

Task id #2563472

closes odoo#71863

Signed-off-by: William André (wan) <wan@odoo.com>
closes odoo#71867

X-original-commit: a299fb2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
On safari in saas-14.2, opening the full mail editor cause an error:

    Traceback: Error: The string did not match the expected pattern.
    matches@[native code]
    getMatchedCSSRules

This is happening because this cause an error in safari:

    document.body.matches(".custom-range::-webkit-slider-thumb");

and we get selector with :: that we should ignore because in d50c3b0
we use a global regex with `test` and multiple call of the regex on the
same string iterates over the string, for example:

    var x = /a/g;
    [x.test('a'), x.test('a'), x.test('a')]

gives [true, false, true]

opw-2489730
opw-2489515
opw-2502066
opw-2504051
opw-2518635
opw-2532695

closes odoo#71833

X-original-commit: ad0160d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
HTML fields used to have a toggle button for a "code view" (which came
from the Summernote library), in debug mode. This allowed the advanced
user to edit content with jinja conditions. This was lost with the new
editor but reintroduced for Mass Mailing. As it turns out it was needed
elsewhere so this makes the code view available as a node option, and
already activates it for mail templates.
To activate the code view in an html field:
```xml
<field type="html" options="'codeview': True"/>
```

Task: 2561300

closes odoo#71860

closes odoo#71883

X-original-commit: 0f96846
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
…t module to stock_landed_cost module

Link to the original commit: odoo@fc9d63f

opw-2547663

closes odoo#71884

X-original-commit: 4139a80
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
When confirming a RfQ, even if a follower is subscribed to "RFQ
Confirmed", he will not receive any email.

To reproduce the error:
(Need a mail catcher)
1. Create a PO
2. Add a follower and edit his subscriptions:
    - Check 'RFQ Confirmed'
3. Confirm the PO
Error: No mail has been sent. The user should have been subscribed to
"RFQ Approved" to receive an email.

OPW-2447234

closes odoo#71887

X-original-commit: b459fc8
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
…mail content

It is currently escaped as it is not Markup-ed and not considered safe.
It means raw content is currently displayed in sent emails, which is not
really what we expect.

closes odoo#71813

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
nboulif and others added 14 commits July 2, 2021 17:33
Steps to reproduce :

  - Install 'Accounting'
  - Create a quotation then send it (without confirming it)
  - Click on Preview

Issue :

  `Date` field is not preceded by a label.

Solution :

  Display "Quotation Date:" label if quotation is not in one of this states :
  `sale`, `done` or `cancel`.

opw-2585000

closes odoo#73178

X-original-commit: b35b893
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
We are now using the sessionstorage to make the data the user enters when
he completes the configurator persistant during the whole session. Which
means that these data are not lost anymore on page refresh.

task-2518565

closes odoo#73095

X-original-commit: 74cc69f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
closes odoo#73195

X-original-commit: 8166e1e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Avoid website_publisher unwittingly breaking portal page layouts where
publisher_comment is enabled.

closes odoo#73156

X-original-commit: 72357c9
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When an installed module is not installable, we don't want
to check its dependencies because they may not be available.
Erroring out on such dependencies is not needed because
the module will not be loaded anyway. On the contrary, such
errors prevent starting a database which would otherwise
function normally.

Such errors occur when doing incremental migrations where
it happen that addons are installed (from the previous version)
but not migrated yet and therefore not installable.
When we migrate lower level dependencies Odoo marks
higher level addons as "to upgrade" even if they are not installable.
That is usually harmless, except when such addons have
dependencies that are themselve not available.
This PR fixes that.

closes odoo#73203

X-original-commit: a11e8a3
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
This makes it possible to patch only _prepare_transaction_request in
case parameters need to be added.

closes odoo#73207

X-original-commit: 35a6c18
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
By default max cron threads is setted to 2.
But this value must be setted to 0 in the IoT
This parameter is added to odoo.conf of the IoT

closes odoo#73213

X-original-commit: 3d33b7f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
In l10n_latam, creating a debit note with stock_account installed ends
up in stock account checking for a property in a dictionnary that may
not exist.

Using the get property will solves this issue by providing a value.

closes odoo#73217

Ticket: opw-2580992
Bug-fix: opw-2588504
X-original-commit: 423d2d4
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Brice Bartoletti <Levizar@users.noreply.github.com>
Move candidate.unlink out of the for loop to unlink
records in batch.

Remove to_unlink_candidates.move_id from move_to_recompute as
move_line.unlink() will trigger recompute of their move's state.

---

opw-2585598

closes odoo#73155

X-original-commit: e2e51c1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Carousels (carousel and quotes_carousel snippets) in pages created by the
configurator are not added through a drag'n'drop. onBuilt and _assignUniqueId
are thefore not called. We set the unique id directly in the xml to make
the carousel slides also work when these snippets are added by the configurator.

task-2518565

closes odoo#73250

X-original-commit: 3638799
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
…hose orders are skipped instead

In case you have installed sale_timesheet and try to do a bulk invoice creation you will be blocked if one order does not have invoiceable lines instead of skipping this specific order.

closes odoo#73257

X-original-commit: 3e03fe4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
Scenario to reproduce the issue on runbot 12.0 Community:
- Go to Settings > Technical > Email > Digest Emails
- Select the Weekly Digest
- Click on Action > Delete
- Click on OK
- Go to Settings > Users & Companies > Users
- Click on Create
- Fill the Name and the Email Address
- Save
- Odoo Server Error - Missing Record

Some users seem to delete this record to stop receiving the digest for
everyone, including for future users.  The problem is that, even if the
digest has been deleted, the config parameters are still referencing it.

This commit prevents the exception by having an empty recordset if the
digest does not exist.

closes odoo#73231

X-original-commit: 2910bd2
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Steps to reproduce:

  - Create a new pricelist;
  - In the Price Computation, select "Formula" then
    change it to "Based on Cost";
  - Change the price computation back to "Percentage (discount);
  - Create a sale and set this new pricelist.

Issue:

  Price discount made on the cost of the product instead to get back
  to sale price as default

Cause:

  When switching `Compute Price` and != 'formula', not setting back
  `Based on` (base) to `Public Price` (list_price).

Solution:

  If compute_price is changed and new value != 'formula'; set
  pricelist `Based on` to `Public Price`.

opw-2587295

closes odoo#73262

X-original-commit: 3f409c0
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
When deleting a SO with an event ticket, the number of attendees becomes
incorrect

To reproduce the error:
1. In Settings, enable "Tickets"
2. On website, register an attendee to event E
3. In module Events, open E

Error: The number of attendees (X) is incorrect. If the user clicks on
it, there are X-1 attendees: the one added on step 2 has been deleted
but the number is not updated

When deleting a SO or a SO line, the associated registration is deleted:
https://github.com/odoo/odoo/blob/3fd3fc5f782f1422f578ad38e3fad444130273a8/addons/event_sale/models/event.py#L197-L198
This is the problem: it won't trigger the `compute` methods.

In the case above, this method won't be called:
https://github.com/odoo/odoo/blob/72ce1b867dc81672e6a73a586542b20216388a05/addons/event/models/event.py#L176
So the number of seats won't be updated

This fix suggests deleting the registrations from the ORM in order to
trigger the `compute` methods.

Note: Writing the tests revealed another problem. When deleting the SO,
if a wizard `registration.editor` exists and is linked to the SO, the
deletion will trigger an SQL constraint. This is the reason why the
`ondelete` has been added to the field `sale_order_id`

OPW-2452760

closes odoo#73258

X-original-commit: 89ddb75
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
@Goaman
Goaman requested review from a team as code owners July 6, 2021 11:27
@Goaman Goaman self-assigned this Jul 6, 2021
@Goaman
Goaman requested a review from Zynton July 6, 2021 11:27
@robodoo

robodoo commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@mart-e

mart-e commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

Wrong target branch, please create in draft first

@mart-e mart-e closed this Jul 6, 2021
@tde-banana-odoo
tde-banana-odoo deleted the saas-14.4-teleport-editor-nby branch July 6, 2021 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.