Commit Graph
142934 Commits
Author SHA1 Message Date
Arnaud Joset 5b5cfd0beb [FIX] google_calendar: prevent traceback in error handling
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/odoo#71724

X-original-commit: d5b9403c0023d8df49487293b217c59265189a7a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-04 07:38:24 +00:00
Julien Banken f0f1cf3902 [FW][FIX] crm: fix incorrect prefix removal from phone filter
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/odoo#69729

closes odoo/odoo#70954

X-original-commit: 53b4a7cf045df8828716e31e6d2a56cf93123bba
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-07 05:32:25 +00:00
Krzysztof Magusiak 74a5776482 [FIX] link_tracker: Compute URL with char tracking fields
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/odoo#71780

X-original-commit: a2068f9696917d7fa4848bc09d05eced84d0cc2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-04 18:26:09 +00:00
nounoubensebia c89c5ff3ed [FIX] crm: rearrange settings
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/odoo#71544

X-original-commit: 1cb0c743c4c15d6817773d66a7ac27321b8bbada
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-01 12:10:21 +00:00
Carlos Valverde 276a51920d [IMP] project : rating mail template improvement
Rating mail template, from the 'project' module, has been improved,
by adding more margin to the top of the icons, which increase its
visibility.

--

task-2531541

closes odoo/odoo#71094

Closes: #71094
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-04 14:39:43 +00:00
Carlos Valverde 9e8a709f80 [IMP] rating : rating icons improvement
Previous rating icons had readability issues, especially when used in
small containers. For this reason, this commit includes the following
improvements:

- New rating icons have been designed and included in PNG and SVG, in
order to increase readability.
- 'Thank you for rating our services!' template, in the 'rating'
module, has been revamped, by removing the old '.card' template and by
improving the shadow effect cast on focus plus a better user
interaction.

--

task-2531541
Closes: #71094
2021-06-04 14:39:43 +00:00
Csaba Tóth bd4886446b [FIX] account: fix reference to currency object
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/odoo#71771

X-original-commit: 38de8fc52b4d6f6bdab4dd5e28eb9e3e5315145c
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-04 16:02:31 +00:00
wan 9e743cb31c [FIX] l10n_in: do not specify payment method in demo data
This is computed automatically since
04522f01e6

closes odoo/odoo#71777

X-original-commit: f6a2c5f1ebfefc16a91d7a6103704fbace955620
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-04 16:55:06 +00:00
Géry Debongnie 0a525e16b3 [FIX] web: update owl from 1.2.6 to v1.3.0
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/odoo#71775

X-original-commit: a1c173ef6d3808a7c70b7e758e7e65fc6a40b2c7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-04 16:51:07 +00:00
Pierre Masereel 2bd3ab2333 [FIX] point_of_sale: duplicated reference in POS
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/odoo#71770

X-original-commit: 21c92bf4d1a469f5ec1d0edcf2b2e08102df5b20
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-04 16:01:48 +00:00
Yannick Tivisse 9a5b2e2549 [MOV] fleet: Split model files according to coding guidelines
closes odoo/odoo#70612

Related: odoo/upgrade#2493
Related: odoo/enterprise#18250
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-04 08:47:45 +00:00
William Braeckman 32a8dc42f8 [IMP] fleet: add trailer_hook field to vehicles
Task ID: 2487706
2021-06-04 07:20:15 +00:00
William Braeckman e85763d982 [IMP] fleet: minor changes to views
Adds two new columns to the vehicle model tree view.
Changes the name of the vehicle model action.
Modifies the order by which vehicle manufacturers are ordered.
Adds filter and modify goupby on vehicle, vehicle model/brand.

Task ID: 2487706
2021-06-04 07:20:15 +00:00
William Braeckman 9b5768688a [IMP] fleet: add vehicle model categories
Adds categories to vehicle models

Task ID: 2487706
2021-06-04 07:20:15 +00:00
nie afda1c359c [FIX] point_of_sale: reload order with negative price
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/odoo#71757

X-original-commit: 5d1640d05442613963426adc1d83fe066480c1a4
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-04 13:59:57 +00:00
Djamel (otd) d6c409444d [FIX] website_slides: set PdfFileReader to strict=False
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/odoo#71756

X-original-commit: 3acd0d666af56c39e34fc551e182468cc7bedc42
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-04 13:33:25 +00:00
Priyanka Kakadiya 14d177c3f3 [IMP] mail: added test case for message clicked status
- added test case for click on author name and on author avatar.

task-2391179

closes odoo/odoo#71746

X-original-commit: df2f110df0fb7cbfee55e611cb0ceee4aceefdcf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-04 11:58:18 +00:00
Didier (did) 8447162d8e [IMP] mail: use a generic formatter for ir.attachment
This allows to reuse this formatter.

Part of task-2365881

closes odoo/odoo#71676

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-04 14:01:43 +00:00
Barad Mahendra 29147681a7 [IMP] project: do not display the archived sub-task in list
Currently, when go to project > settings > enable 'sub-tasks'
create a task >> add a sub-task and archive the sub-task
then the archived sub-task is still displayed in the sub-tasks list

so in this commit, removed the active_test context from the field to
hide the archived sub-task. also include the timesheet of archived
task while calculating the subtask_effective_hours and on click
of sub task hour open the timesheet of archived tasks.

PS: revert of the commit: https://github.com/odoo/odoo/commit/7a2cba3c8934064b311da4312ef2fbd07c6329ec
As we would deduct archived tasks from the count and the number of planning hours,
and keep them included in the timesheets.

closes odoo/odoo#71719

Taskid: 2534898
X-original-commit: e527ed80e25f638390fd8c56296e690b1630ec49
Related: odoo/enterprise#18744
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Mahendra Barad <mba-odoo@users.noreply.github.com>
2021-06-04 06:58:57 +00:00
Pierre Masereel 7dcb57181e [FIX] point_of_sale: correct payment method when price updated
When the selected payment line is updated but is in state 'paid', it
adds a new line with the first payment method. Since we load more
payment methods than the ones in the pos config, we should only take the
ones that are on the pos config

closes odoo/odoo#71736

X-original-commit: 8e7739fd2299246e963e8da3f4c53b699b84c1eb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-04 10:41:07 +00:00
Anh Thao Pham (pta) 9ec1b599fe [FIX] stock_account: do not create aml when updating cost of consumable
- Create a Product Category: (i.e. Category X)
  * Costing Method: Average Cost (AVCO)
  * Inventory Valuation: Automated
- Create a Consumable Product with Category X (i.e. Product X)
- Create PO with Product X and receive products
- On Product X form, update Cost
- In debug mode, go to Accounting > Accounting > Journal Items
Account move lines have been created for stock valuation on cost change,
but it shouldn't for a consumable product.

opw-2510315

closes odoo/odoo#71723

X-original-commit: b8e6f77101d28d05dd3d79c5b6de56da4dd5d2e6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-04 07:27:17 +00:00
Benjamin Vray 9371715fdc [IMP] web_editor, website: not display edit link popover if not needed
This commit allows not to display the popover where we don't need it.
Like on the next or prev buttons of the carousel for example.

task-2537840

closes odoo/odoo#71721

X-original-commit: 60853837a234f9fbfee5816f8a4766cc5a0b7d19
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-04 08:42:20 +00:00
Antoine Vandevenne (anv)andToufik Ben Jaa 1969d48f15 [FIX] payment: don't send customer IP address when running a cron
If a payment request is made from a cron (e.g., Subscriptions' cron for
recurring payments), the worker is not bound to an HTTP request and
therefore the value of `request.httprequest.remote_addr` is an instance
of the 'LocalProxy' object, which is not serializable.
If we're in this scenario, don't send the customer IP address.

task-2494916

closes odoo/odoo#71717

X-original-commit: e85464ad2281f25cbaf7ded0c1e5d7659a322696
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Co-authored-by: Toufik Ben Jaa <tbe@odoo.com>
2021-06-04 06:54:28 +00:00
Qiuyu (QHO) 60b013e6b1 [IMP] mail: change timestamp color in the systray
The timestamp color should be gray instead of primary green even when the thread is unread or needs action.

Task id: 2383054

closes odoo/odoo#71034

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-19 12:57:31 +00:00
Priyanka Kakadiya 6c83017e70 [IMP] mail: small improvement on systray activity
PURPOSE

- A helper should be aligned vertically in the systray menu.
- A sentence should also be changed by
  "Congratulations, you're done with your activities."

SPECIFICATION

A helper changed and also it will be appeared in the
middle of the dropdown.

Task- 2525928

closes odoo/odoo#70832

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-17 13:36:02 +00:00
Simon Genin (ges) 62f99565be [FIX] web: remove debug comment on qweb template extension
Owl 1 has some issues handling comments. So when people were in odoo
debug mode, inheriting in extension mode a t template, the comment
added from the server would throw a frontend error.
For now, we comment it, waiting for better comment handling in owl.

closes odoo/odoo#70227

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-03 14:30:51 +00:00
Nicolas Lempereur 25ef82ca80 [FIX] l10n_latam_invoice_document: header/footer in mutli-print
When l10n_latam_invoice_document is installed and the current company
does not have a custom header (in stable, only Chile and Argentina with
their localization installed use custom header), printing multiple
invoice at once, one out of two had no header or footer.

This is because `<div class="header"/>` and `<div class="footer"/>`
should be unique per record being printed, and when a custom header was
not used they were duplicated with the duplicate empty.

As an example, if we had 3 documents:

- record 1 : good header
- record 1 : empty header
- record 1 : body
- record 1 : good footer
- record 1 : empty footer

- record 2 : good header
- record 2 : empty header
- record 2 : body
- record 2 : good footer
- record 2 : empty footer

- record 3 : good header
- record 3 : empty header
- record 3 : body
- record 3 : good footer
- record 3 : empty footer

When we give them to wkhtmltopdf, it would be mismatched:

- headers:
  - record 1 : good header
  - record 1 : empty header
  - record 2 : good header

- bodies:
  - record 1 : body
  - record 2 : body
  - record 3 : body

- footers:
  - record 1 : good footer
  - record 1 : empty footer
  - record 2 : good footer

so record 2 will have empty header/footer, and record 3 will get those
of record 2.

opw-2507137

note: the master forward-port also remove t-if that are no longer
necessary since the same t-if is on an ancestor tag now.

closes odoo/odoo#69718

X-original-commit: 90bdb5c7b7aa6a9b98e9acb1774d449ae65a3918
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-06-04 08:18:21 +00:00
Antoine Guenet 33e021c2cd [FIX] website: allow editing empty non-arch fields
987fc1190a had added a rule that made
empty fields non-editable so that a snippetless website would not be
editable. This makes empty t-fields non-editable as well which is - to
say the least - not welcome.
This commit fixes that problem by making the rule more restrictive: what
we don't want to be able to edit are empty _arch_ field specifically.

closes odoo/odoo#71718

X-original-commit: 6886c2a2a2ad47d1150dd072888c39ccfb59b163
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-06-04 06:55:10 +00:00
Prakash Prajapati 9ec2f4cb44 [FIX] mail: fix the attachment traceback sync attachment
Currently, traceback occurs when same attachments are sync with
form view and bottom chatter and removed from chatter.

So in this commit, on click of remove attachment dialog wait
till the attachment id is removed from list of attachments.

closes odoo/odoo#65093

Taskid: 2431478
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-13 13:38:31 +00:00
Barad Mahendra 51399445a3 [IMP] hr_holidays: support document on Time Off based on Time Off type
Currently, it's possible to add supporting documents on the chatter of
the time off. But it's not easy to use and doesn't make really sense.
So we will add the possibility to add it more easily.

So in this commit,
 - Added 'Supporting Document' on Time Off type to support the
attachment based on types.
 - On new Time Off, if the Time Off type has a support document then allow
uploading the supporting document in form view.
 - The File is recorded on the chatter of the Time Off request.
 - There will be synchronization between chatter and form attahcments.

PS: added non-stored m2m field to display the attachment view(m2m_binary)
in the form view as o2m does not support it.

TaskID: 2431478
2021-04-13 13:38:31 +00:00
Xavier-Do c217973137 [IMP] core: bump master release version to 14.5 alpha
closes odoo/odoo#71688

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-06-03 17:26:33 +00:00
Xavier-Do 245029c02a [IMP] base, profiler: add entry count
Entry count can be useful to estimate the size on disk of a profile
file.

The entry count would be quite expensive to compute and thus should be
stored. It is impossible to use a compute stored in this case, since
ir.profile shouldn't have any "business" logic upon insert.

closes odoo/odoo#71673

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-06-03 14:24:50 +00:00
Xavier-Do 73ac78f072 [IMP] profiler: remove parameter 'path'
Even if only accessible when writing some custom code, the path option
of Profiler looked a little dangerous from a security point of view,
since this option allows to write the result of the collector anywhere.
This shouldn't be a problem, since Profiler shoudn't be accessible
inside a safe_eval() and the path param cannot be user defined, but this
is still a risk.

An alternative option would have been to give a file descriptor instead,
so that the user must have access to `open()`, which is unlikely inside
a server action.  This alternative has some disadvantages, though,
because the file descriptor should be given when creating the profiler,
or at least before `__exit__()`, removing the possibility to add the
number of entries in the filename.

This commit proposes another solution: add a generic way to output the
profiler as a json text.  The result can thus be saved the way the
developer chooses.  A utility method format_path() will help to format
path the same way the profiler did before this change.
2021-06-03 14:24:50 +00:00
Xavier-Do 3b861dfe7f [IMP] http: better request context manager
The usage of an additional optional context manager leads to the usage
of ExitStack. Unfortunately, this changes the initial format quite a
lot, decreasing readability and adding a loop on context managers, even
if there should be only one most of the time (request).

This commit proposes to a nesting utility for the profiler, allowing to
nest another context manager inside a profiler.

This solution allows an easier integration into http.py, avoids to
manage the "enter_context" case when recovering the init stack and can
be useful in other cases.
2021-06-03 14:05:01 +00:00
Xavier-Do f2dbac8ef7 [IMP] http: tweak profiling conditions
Improvement of get_dispatch_context_managers conditions and styling:
 - Check profile expiration very first.
 - Add an additional check for odoo.evented. Profiling will crash on an
   evented server. Only longpolling should use evented servers, it but
   this is more future proof.
2021-06-03 11:22:19 +00:00
Xavier Morel 7b60db192e [FIX] web_editor: libsass warning and also incorrect / confusing @extend
Apparently libsass has never actually supported compound
selectors (or at least never the way people interpreted it should
work).

Therefore since libsass 3.5 (July 2017) that is deprecated and emits a
warning. Which is problematic because libsass is also hard-coded to
emit its deprecation warning to stderr[^1], resulting in a
few issues:

* because it's not decorated (let alone as a warning) it's not really
  noticeable on the runbot or in most dev logs
* but because it's not associated with a logger it's basically the
  only thing which shows up when running in `--log-level=warn` (as
  it's printed at least once per tour)
* and it's pretty gnarly to get the information back in Python as,
  again, hard-coded to stdout

odoo/odoo#70927 explored messing around with fds to intercept the
writes and re-emit them to the proper location, but that was
considered a bit too iffy.

And of course the intent was always to eventually fix the warning
itself, which qsm provided for in [a comment][fix-extend], the
important bit was the extension of `:disabled` so that's what's left
here to fix the warning. The logic of the fix is that the loader is
always used with the `form-control` class (internally) and the
`:disabled` part of the `form-control` styling is what we really want
to copy over. It's possible that third-party lose the styling if they
use `o_wysiwyg_loader` alone (without an explicit `form-control` next
to it) but that seems like an unlikely situation.

[^1] libsass 4 (sass/libsass#3135) surfaces warnings at the API level,
     and removes the hardcoded / direct stream writing

[fix-extend]: https://github.com/odoo/odoo/pull/70927#issuecomment-847964413

closes odoo/odoo#71667

X-original-commit: 5c2c6b881152630ffbf68d55c7c77fa2234f3ac1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-06-03 10:57:59 +00:00
Benjamin Frantzen (bfr) 22e04c6d56 [REF] account_edi: remove test_mode from _post_invoice_edi and _cancel_invoice_edi
Before this commit, business logic was mixed with tests. This commit aims to replace the test_mode with mocks for all account_edi tests.

closes odoo/odoo#71650

Related: odoo/enterprise#18709
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-03 09:18:24 +00:00
Romain Derie 6ca30e23ee [REM] website_sale_digital: remove dead code
Product field type value `digital` doesn't exist anymore, see 1a1efe3fce
Moreover, `digital` as qcontext seems like it was not used anyway, see
8a1b8e880c.

closes odoo/odoo#71629

Related: odoo/enterprise#18697
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-03 12:03:13 +00:00
Romain Derie 566fe68f34 [REM] stock, website_sale: remove occurences of digital type
The product type value `digital` is gone since long time, see 1a1efe3fce.
This commit removes the leftover occurences of it.

Relatedt to https://github.com/odoo/odoo/issues/25651
2021-06-03 12:03:13 +00:00
Martin Trigaux b4f81c18d6 [FIX] *: fix typo in route kw
The common mistake of method instead of method leads to the parameter being ignored.
Add a warning to ensure no other controllers are defined this way

closes odoo/odoo#71571

X-original-commit: d0048ef115985a24eec1e47ceb146f4a98f71b38
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-06-03 13:33:43 +00:00
Munaf Khan 20955462f0 [IMP] various: beautify list-views using decoration
Currently, to identify records based on state, in most of the list views we
use 'badge' widget on 'state' fields which can be decorated as needed.

However, for the list views, best approach would be to also add list
decoration along with 'badge' widget so that the whole line is colored
and it's easy for user to 'scan' the information

This commit improves the behavior adding decorations to several list-views.
To check the list of changes, kindly see the task specification

Apart from that, this commit also improves label of the module state from
'Not Installed' to 'Uninstalled'.

TaskID-2527119

closes odoo/odoo#71367

Related: odoo/enterprise#18587
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-03 09:24:13 +00:00
Romain Derie 5a7e6d0247 [IMP] website: add tests - redirect 301 in case if trailing slash
This commit add tests to ensure every dispatch flows redirect to a 301 if the
requested URL has a trailing slash.
It also ensures the URL params are not lost in the process.

  - Basic controller: `/my/?a=b`
  - Website Pages: `/my-page/?a=b`
  - Basic controller with language: `/fr_BE/my/?a=b`
  - Website Pages with language: `/fr_BE/my-page/?a=b`
  - Homepage with language (special case/controller): `/fr_BE/?a=b`

opw-2505818
opw-2513575

closes odoo/odoo#71065

Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
Related: odoo/enterprise#18615
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-03 12:07:32 +00:00
Romain Derie c1ae086cdb [IMP] *: remove trailing slash from routes
* http, http_routing, website, website_sale_comparison

At an crawling engine/SEO level, having trailing slashes or not in URLs doesn't
change anything.
Still, whichever solution is chosen, it should be done consistantly: either all
URLs have trailing slashes, or none of them have it.

See https://developers.google.com/search/blog/2010/04/to-slash-or-not-to-slash
" Be consistent with the preferred version. Use it in your internal links. If
  you have a Sitemap, include the preferred version (and don't include the
  duplicate URL). "

opw-2505818
opw-2513575
Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
2021-06-03 12:07:32 +00:00
Romain Derie 119d9437e0 [IMP] http_routing: remove trailing / for homepage with language
Before this commit, `/fr_BE/` and `/fr_BE` would both be served without one
being redirected to the other.
That would be considered as duplicate content, as 2 different URLs would be
serving the same content.

opw-2505818
opw-2513575
Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
2021-06-03 12:06:07 +00:00
Romain Derie 4f029a2739 [IMP] website: remove trailing / for website.page
This commit fixes multiple bugs when serving a `website.page` which has a
trailing slash:

  1. We use a 301 instead of a 302 as it is done for every other dispatching
     flows (mostly through the redirect in `_postprocess_args()`)
  2. The language is no more lost during the dispatching, before this commit
     `/fr_BE/contactus/` would redirect to `/contactus`
  3. The URL params are no more lost during the dispatching, before this commit
     `/contactus/?a=b` would redirect to `/contactus`

opw-2505818
opw-2513575
Community: https://github.com/odoo/odoo/pull/71065
Enterprise: https://github.com/odoo/enterprise/pull/18615
2021-06-03 12:06:07 +00:00
Romain Derie 01788decbb [IMP] product, website_sale: small improvements on priority field
- Rename Priority to Favorite
- Move the priority field star icon in the kanban view
- Remove the sequence field from the list view
- (website_sale) make the favorite column optional in tree view
- (website_sale) keep same order in kanban view than in list view

task-2496758

closes odoo/odoo#69657

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-03 12:26:09 +00:00
William Braeckman 864595901e [IMP] hr,hr_payroll: plan automation on triggers
Automate activites linked to plan on certain triggers.
To automate onboarding and offboarding processes, we can now define
plans that will activate upon triggers, such as employee creation,
departure (archive), contract start or contract end.
Manual plans are still possible.

Upon activation of a plan, a message will be added to the employee's
chatter with the name of the plan.

More options have been added related to when to schedule the plan's
activities.

The blocking mechanism has been removed (the plan would not launch if an
activity could not be started, due to lack of information), failed
activities will now be logged into the employee's chatter.

The list and kanban employee views have also been updated to include
info such as first contract date and activity information.

Task ID: 2489095

closes odoo/odoo#68451

Related: odoo/enterprise#17343
Related: odoo/upgrade#2314
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-03 12:09:32 +00:00
Benoit Socias 2cc481d1a6 [IMP] website: support a snippet to embed custom code
Before this commit there no general purpose snippet to embed HTML code
in the page.

After this commit there is a new Embed Code snippet that allows the user
to include any HTML within the page.

task-2517473

closes odoo/odoo#68019

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-05-28 12:37:49 +00:00
Toufik Ben Jaa 7d438f6bc7 [FIX] payment_ogone: SHA sign incorrect with non ISO charset
- Re-introduce the changes added by commit 783a8e22a9
 - It seems like Ogone has a bug on their side. Even when configuring
   the encoding to UTF-8 on their back office, when signing a request
   containing non ISO characters the signature we send do not match
   the one computed by Ogone.

   By calling the URLs suffixed with `_utf8` the issue is fixed.

closes odoo/odoo#71672

X-original-commit: f435ad2d69c7910139cd3ea6a47576399fb4d882
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2021-06-03 11:06:14 +00:00
Robin Heinz 21b235d8fa [FIX] point_of_sale: Fix order management reprint infinite recursive loop
The were few times where we ended up with a infinite recursion while clicking on an order in the order management screen.
This lead to a browser stuck.
Now we don't use a temporary screen anymore and use the same mechanism of the receiptScreen to print the order.

closes odoo/odoo#71668

X-original-commit: 2ea13121cf82c4c9b069363cfd2ef2857fc8ccaf
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-03 10:58:26 +00:00