Commit Graph
146552 Commits
Author SHA1 Message Date
Sébastien Geelen (sge) 3275d19415 [FIX] web_editor,website_sale: monetary field UX fix
The forced selection of the entire text value was preventing the user
from changing the selection after the initial click inside the monetary field.

task-2679088

X-original-commit: d33d55aad46c9223192d15c01b7516340be77cce
Part-of: odoo/odoo#80071
2021-11-19 10:42:06 +00:00
Sébastien Geelen (sge) 54d2099c43 [FIX] web_editor: fix linting errors
X-original-commit: 00cc4681ebc787227e9740da1cb61060ec46158c
Part-of: odoo/odoo#80071
2021-11-19 10:42:06 +00:00
roen-odoo f12c91d162 [FIX] mrp : BoM report
Current behavior:
When creating a BOM with quantity different than 1 (here 12) with operation duration 1 minute and work center capacity 23
The BoM Structure & Cost report only changes the time for the operation when the quantity is > 276
However, when planning a MO the expected duration changes to 2 minutes when the quantity is > 23

Expected behavior:
Expected duration should be the same in the MO and BoM report

Steps to reproduce:
- BOM with quantity different than 1 (here 12)
- operation duration 1 minute
- work center capacity 23
- go in BoM report

closes odoo/odoo#80048

X-original-commit: cf90943875da25456cde4faf967ce27d886c0851
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-19 09:58:45 +00:00
Touati Djamel (otd) 4f386b0dec [FIX] stock: add correctly a product in storage categories
Steps to reproduce the bug:
- Connect as Admin and select “My Company (San Francisco)”
- Create a storable product “P1” and select “My Company (San Francisco)” in the `”company”` field
- Go to inventory settings and enable the “Storage Categories” option
- Create a new “Storage Categorie” > select “My Company (San Francisco)” in the `”company”` field > save

BUG1:  Edit and try to add the product “P1” > Edit and try to add the product “P1”
> "P1" is not filtered correctly with domain, because the `”company”` field of the `"stock.storage.category.capacity"` model is not set.
As it's a related field, the “default_company_id” should be in the context so that the “company_id” field will be correctly set with this value

BUG2: Add a new line > create and edit a new product > the product type is “consumable” instead of storable, so we should add the type in the context

BUG3: Add multi-company security rule

opw-2689426

closes odoo/odoo#80061

X-original-commit: f5554fa94d41d7eae62c4a1271e41012178c4d8f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-19 08:08:51 +00:00
Adrien Widart e206b8a80e [FIX] pos_resturant: distinguish all order lines
In some cases, it is not possible to print the order changes

To reproduce the issue:
(Use demo data)
1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
    - Printed Product Categories: Food
2. Edit the POS Bar:
    - Enable Order Printer
3. Start a session of POS Bar
4. Open table T1
5. Select a Food product and add a note
6. Submit the order to the kitchen
7. Select again the same product without any note

Error: The order button isn't green, it is not possible to sent the
second order line to the kitchen

The issue comes from the logic used in `computeChanges`:
https://github.com/odoo/odoo/blob/75fb0aa6e9c314b61b30d49b5c463fa126dfc835/addons/pos_restaurant/static/src/js/multiprint.js#L215-L222
`old_res` contains the products already sent to the kitchen
As a result, since the line from step 5 and the one from step 7 have the
same product, we consider that the new line (step 7) was already
present. Then, when comparing the quantities, both lines have their
quantity equal to 1, so we consider there isn't any information that
should be sent to the kitchen

OPW-2557518

closes odoo/odoo#80065

X-original-commit: fae786706977db4f9705eee055f4f804064784dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-18 21:45:50 +00:00
Alexandre Kühn bfed30cba5 [IMP] mail: remove editabletext component
It was no longer used.

closes odoo/odoo#80063

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-18 18:45:39 +00:00
Benoit Socias d2f30d1109 [FIX] web_editor: avoid error popup when saving incomplete link dialog
Before this commit saving an incomplete link dialog triggered the
display of a stacktrace error popup.

After this commit saving is cancelled when an attempt at saving an
incomplete link dialog is done. The incorrect fields already did display
their error status.

task-2675252

closes odoo/odoo#80043

X-original-commit: 47f0596233c2d8a09d91cdfae117aa3f595bb6bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-18 18:45:35 +00:00
Kevin Baptiste e20739312a [FIX] hr_holidays: allow Officers to create allocation again
The domain on the allocation leave type was too restrictive for Time Off
Officer and they couldn't create allocations when the "Employee
Requests" of the Time Off Type was set to "no".

This commit allows the Time Off Officer to request those allocations
again.

closes odoo/odoo#80041

Taskid: 2694163
X-original-commit: d79af924a59f32a0b2dee9b10bb7c8cf388892df
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-18 18:45:30 +00:00
Benoit Socias b15959c70f [FIX] website: change default template of mega menus
Before this commit the default template for mega menus was the "Multi
Menus" template.

After this commit the default template for mega menus is the "Odoo Menu"
template.

task-2675252

closes odoo/odoo#80040

X-original-commit: a4d686140133ecf59a3d09c8f930a70b91064599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-18 18:45:26 +00:00
Kevin Baptiste f63a0d3d5f [FIX] hr_attendance: use correct company in Kiosk mode
A wrong company was used in the Kiosk mode, preventing users to check in
/ out.

closes odoo/odoo#80035

Taskid: 2691031
X-original-commit: ed3003c9d8ce11a8f59966d28371883df5eb9c36
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-18 18:45:19 +00:00
Thibault Libioulle e458ab7a06 [REM] project: remove unused data
Prior to this commit, the tasks_analysis information was added to the
panel data dict but never used clientside.

This commit removes this useless call to avoid a Traceback on large
projects, with lots of tasks (MemoryError).

task-2694765

closes odoo/odoo#80030

X-original-commit: 33446939e0cc625832de3b22661709508a01044a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-18 18:45:15 +00:00
Valentin Chevalier 46be53f2c1 [FIX] payment,sale: access error in payment link
When a user was opening the payment_link_wizard and tried to select a
preferred payment acquirer, he was getting an AccessError telling that
he was not allowed to access 'payment.acquirer' records.

Fix PR #69334 (task-2504225)

task-2666881

closes odoo/odoo#80005

X-original-commit: 2ff580c073ac105219582dbf2108a1437645c9b5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-11-18 18:45:11 +00:00
Nicolas Bayet 812115716e [FIX] web_editor: close link popover of removed links
Before this commit, the link could be removed from the DOM
before hiding the query popover. After being removed, the
reference of the popover from the jquery element was lost.

We now keep the reference to the popover to always be able
to hide it.

Task-2684819

closes odoo/odoo#79943

X-original-commit: 72c46aef751ebc0de3873c644e3b159ffa349d1e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:45:03 +00:00
Nicolas Bayet f2b9960677 [FIX] web_editor: properly fix link selection
There is a fix in the editor to fix link selection (see
_fixLinkMutatedElements). Prior to this commit, in mass mailing
the main editable element had the class `o_not_editable`.
This class on the editable disabled the link fix.

Also, it was semantically strange to have the editable being
`o_not_editable`.

Task-2684360

closes odoo/odoo#79934

X-original-commit: 112f3776985fbe8f5291cd4d26424f6c427ff36c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:58 +00:00
Nicolas Bayet c9f1e56d87 [FIX] web_editor: prevent traceback when droping undroppable snippet
When trying to drop a snippet that could not be possibly dropped,
a traceback is shown but shouldn't.

Task-2692492

closes odoo/odoo#79924

X-original-commit: 4408dbaf74aa26272b6ed3ce718a2d915975d4b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:55 +00:00
Nicolas Bayet eb523fda3b [FIX] web_editor: use text url by default in link dialog
On an html field whenever selecting only text that contain an url
and opening the link dialog, the url was not reused.

Task-2580485

closes odoo/odoo#79923

X-original-commit: 8049c7cf937aec02fe0097ee4f233e2e76fb8ae3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:51 +00:00
Nicolas Bayet 553906853b [FIX] web_editor: remove button tooltip of link tooltip
Whenever the link tooltip hide, the tooltip of the buttons
could remain in the page but shouldn't.

Task-2692301

closes odoo/odoo#79922

X-original-commit: 5a5fce48852a6ac2a60db205e99d49e2095d1730
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:46 +00:00
Philippe Wauthy 35b4df7389 [IMP] hr: display employees kanban from department
Currently on the HR employee form, clicking on the department displays the default form of the department.
Instead, it should display the kanban view of the employees who are part of the department

task-2678198

closes odoo/odoo#79339

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-18 18:00:58 +00:00
Younn OlivierandMatthieu Stockbauer aba31e9f2d [IMP] web_editor, website: add connector options to steps snippet
A new option StepsConnector is added to the steps snippets, allowing to
pick the type of the steps connector and its color.

The option listens to changes in the UI or in the columns size to
recompute the width and position of the arrows.
The width of the connector is computed based on the widths of the
current step and the next step, which are defined in bootstrap columns.

The s_process_steps snippet CSS version is now 001.

task-2463009

closes odoo/odoo#77282

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Matthieu Stockbauer <tsm@odoo.com>
2021-11-18 16:00:40 +00:00
Laurent Stukkens (LTU) 48f8aad0b5 [REV] hr_timesheet: revert use of timesheet_ids in project kanban
This commit reverts 0fff5b0327 as it
fetches all the records which is a bad idea.

closes odoo/odoo#80022

X-original-commit: 737a0ed1f6d904bf6cd32be4e882f5dd3cfefcbe
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-18 15:11:30 +00:00
Achraf (abz) 612b705975 [FIX] stock: Don't try to load reports from unselected companies
If we have two companies A and B with B selected and we try to access the Forecast Report via a product, company A's warehouse is automatically selected, which of course creates a security error.

This fix modifies the ´get_warehouses´ method in order to return only the warehouses whose company is selected.

opw-2688135

closes odoo/odoo#80021

X-original-commit: 088e97aa3214578de99abbd47bd6aeccff244855
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2021-11-18 15:11:26 +00:00
Touati Djamel (otd) e8c15bf2bb [FIX] purchase_stock: delete a wrong field on setup class test
The field `invoice_policy` on the product model is defined in the module `sale`.
So if you run the tests with only “purchase_stock” installed on the DB, an error will be thrown.

Bug introduced by this commit: https://github.com/odoo/odoo/pull/75886/commits/72955411964440747125e7c9d00ef952bc69a80e#diff-f3237d6d25dc46b109ec461ad910dd4cf6f5c6572e29e1b7eedbd9cfa63cb5c2R22

opw-2685389

closes odoo/odoo#80006

X-original-commit: 6f86c979193dc5ba90ecdc614944c80b4906565e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-18 15:11:22 +00:00
Lucas Perais (lpe) 7e92434065 [FIX] web: list_view: pager in grouped list display
Before this commit, the style of the pager in a grouped list was a little off.
- The colors of the previous/next buttons were too dark in enterprise (because of: odoo/enterprise@f26203eb24)
- The pager's input lost its alignment.

After this commit, the situation is much better, colors are okay and the pager's
input doesn't jump randomly somewhere else.

closes odoo/odoo#80007

X-original-commit: 9da7620dd42f0ba940477cd4d05e6ac179ce2095
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-18 13:14:07 +00:00
Martin Trigaux 82c206a968 [FIX] mail: duplicate attachement using sudo
To be able to copy an attachement, we need to be have write access on
the linked record.
In this wizard, write access on mail.template is then required which
is no longer the case since cc012a0864
Read access on the template is already checked when reading the values
of the tempate.

closes odoo/odoo#79900

X-original-commit: ce342f42f21cad3aa5606f6ab0b5739f29f0c456
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2021-11-18 13:13:56 +00:00
Pierre Paridans b3dae8d669 [MOV] web: make ZXing barcode library available in community
This commit moves the ZXing library (used for QR/Barcode decoding) from
`web_enterprise` to `web` so it can be reused in other modules.

Change motivated by odoo/odoo#78204

closes odoo/odoo#80014

X-original-commit: 8c81e2f7c614c55247138278ffdf914e2866ec41
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-18 12:27:48 +00:00
Goffin Simon 773583b17b [FIX] account,purchase: do not override analytic values
Editable computed fields need to have their own compute
method.

Otherwise, when providing one of the two fields at create/write time
will not be taken into account because the compute method will be
triggered for the other field.

closes odoo/odoo#77912

X-original-commit: e35dc4c87821bbb668657eed99bb51c1f853c208
Related: odoo/enterprise#21685
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-18 10:54:03 +00:00
Kevin Baptiste 28eba3d6db [IMP] hr_skills: improve UX
- Reset skill levels on skill/skill type change
- Improve form view
- Add a sequence on hr.skill

closes odoo/odoo#73305

Taskid: 2575351
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-18 10:53:59 +00:00
Younn Olivierandqsm-odoo b71b784c98 [FIX] web_editor: fix logo poor quality
This commit fixes and improves the suggested width that we compute for
images optimizations.
Before, images displayed outside .container elements were resized to
their container size. As a result logos were resized to 2.5rem (40px).

Now, it handles these scenarios :
- The image is in the navbar, it is a logo
- The image is in a container/container-small
- The image is in a container-fluid
- The image is outside a container

Values are read from the css instead of being hardcoded.

Note: another issue remains with our resizing method. Drawing on a
canvas is not performant enough when there are large differences between
the width and the resize width. A solution could be to use
createImageBitmap for the resize, but it is not supported by enough
browsers.
In the meantime, imageSmoothing was enabled on the context.

Note 2: this also fixes rounding issues when computing the optimized
width which may break the UI update as comparing the integer and
floating value returned false.

task-2506205

closes odoo/odoo#79983

X-original-commit: 8355c10676e1dbb668702337863218bdda7c23dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-18 10:06:25 +00:00
Daniel Blanco 3150ad15e4 [FIX] l10n_cl: adds l10n_cl_journal_active field and change tha active documents
[FIX] l10n_cl: adds new latam reference document types
[FIX] l10n_cl: add additional document references
[I18N] l10n_cl: translate as T.doc to reduce width of column
[FIX] l10n_cl: add l10n_cl_active to latam document type view
[FIX] l10n_cl: change account 410235 to direct cost instead of expenses
[FIX] l10n_cl: change account withholding of second category to most recent tax rate (-11.5%)

closes odoo/odoo#75865

Related: odoo/enterprise#20565
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-18 10:06:19 +00:00
Romain Derie 8386d62702 [FIX] website: change the asset disabling from GC to CRON
Before this commit, the behavior disabling the unused snippet assets was put
directly in the autovacuum CRON instead of its own CRON.

That behavior is leading to some perf-issue running the autovacuum cron since
it would take too much time.
Indeed, the code will loop inside as many snippet as it exists, and every time
then perform an SQL Query to get the HTML fields using the snippet.

An improvement will come later to not loop on every snippet anymore.

task-2694120

closes odoo/odoo#79981

X-original-commit: 96ab95d37c9b442a4ccb737fd867ca91ec1c11b6
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-18 08:37:49 +00:00
Touati Djamel (otd) dc8948d79c [FIX] mrp_account: Update the AAL when changing the MO analytic account
Analytic Accounts can be defined in the MO and can be changed in any MO stage. So the analytic account line will also have to be updated to be linked to the new AA

opw-2674347

closes odoo/odoo#79955

X-original-commit: 65a18382c1712968148898998e3778b77f199dea
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-18 08:37:45 +00:00
Adrien Widart 65a2e46572 [FIX] stock: auto assign backorder
When a backorder is created, the quantities are not reserved. This is an
issue: the module should try to directly assign these quantities if the
reservation method of the associated operation type is "At Confirmation"

(Forward port of 723d4b35f9fa9c49249c1b4e9b8dc93e51c5d359)

OPW-2658469

closes odoo/odoo#79980

X-original-commit: ae19ae04192d21ad956af05e5739bde8c6bca746
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-18 07:53:36 +00:00
Florent de Labarre c5b72fa895 [FIX] sale: dont't show section/note in report
- Create sale order with section and note
- Go to Sale Analysis
--> Issue : you see count of section and note

closes odoo/odoo#79975

X-original-commit: 42920592028c6a66bab333b8a4a12b8305734dca
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-17 18:16:08 +00:00
Joseph Caburnay 231dc66f0f [FIX] point_of_sale: can't close session when negative split payment
To reproduce:
1. Create Bank payment method with Identify Customer = True
2. Make order, use the bank payment method in 1.
3. Refund the order, again, use the bank payment method in 1.
4. Try to close the session. Error.

This is because the account.payment object being creating has
negative amount. We fix this issue in this commit by explicitly
providing the destination account based on the partner, and
reverting the destination and outstanding accounts when the
payment amount is negative.

closes odoo/odoo#79966

X-original-commit: e6f1b3893ab33d3d3ddf73e31e4e2ad13f0f2681
Related: odoo/enterprise#22323
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-17 18:16:03 +00:00
Paul Morelle d271f6a2c2 [FIX] mail: fix performance issue on activities filter
Accessing `valid_docs.ids` for each activity to check was costly, and in
my example the whole loop took 125 seconds to execute.

By turning it into a set, the same loop takes 0.2 seconds to execute.

When re-constructing the list based on ids to keep the order, using a
set is also faster, and takes another 0.2 seconds instead of 13.6.

closes odoo/odoo#79969

X-original-commit: f994db760b679c8acdaf4245315f89c1d31a9e1c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 17:26:05 +00:00
Paul Morelle 1d86447395 [FIX] mail: consider more than last 1000 activities
Because activities_to_check was assigned in each loop, the result was
only containing the last chunk of 1000 records, instead of the whole
result.

This commit fixes the issue by concatenating into the list instead of
just assigning it.

X-original-commit: c06c96655b88cc4df59b8cdd5f05a2f600255c49
Part-of: odoo/odoo#79969
2021-11-17 17:26:05 +00:00
Prakash Prajapati 5dcf2633b5 [FIX] product: fix the pricelist report traceback
Currently, if we print the pricelist report after refresh,
the traceback will occur. It has been fixed.

closes odoo/odoo#79968

Task-id: 2584806
X-original-commit: a4c2f01a8e94e7361b25862758c1a20abad6c7aa
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-17 17:25:59 +00:00
William Braeckman 66bdf462f5 [FIX] website_payment: fix traceback with specific input
When trying to donate on the website without being logged in, having
'name' in your name would trigger a traceback.

TaskId-2694024

closes odoo/odoo#79967

X-original-commit: 9f6af0187d31fa72c10780657afeed142ae297d3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2021-11-17 17:25:55 +00:00
William BraeckmanandThibault Libioulle a2036c5dd7 [FIX] project: make better use of cache in dependency tracking
Minor changes to allow a better usage of the cache in dependency
tracking in order to reduce the query count.

See odoo/odoo#79931

TaskId-2693899

closes odoo/odoo#79956

X-original-commit: 52123efd0cbc77564d6dfc12856996b39666ad64
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Thibault Libioulle <tle@odoo.com>
2021-11-17 16:36:50 +00:00
William Braeckman a05eff87a1 [FIX] project: fix not checking for user_ids presence
Fixes an issue where new followers would always be checked upon updating
a task. Which could result in a lot more queries than necessary when
changes are cascading.

See odoo/odoo#79931

TaskId-2693899

X-original-commit: 09adeb7fe2b4345bd476058b2bf85ac1c08a1d1f
Part-of: odoo/odoo#79956
2021-11-17 16:36:50 +00:00
Thibault Delavallée 5a315a4364 [FIX] crm: ensure computation of PLS uses deterministic recordsets
closes odoo/odoo#79573

X-original-commit: 406270973250d05f1b9c63694b17391390f19c55
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 16:36:40 +00:00
Thibault Delavallée 6349319b0a [FIX] crm: fix randomness in assign tests
Seed is now fixed at beginning of each test to ensure random state is set
once for all and avoid random issues.

Task-2643740

X-original-commit: 85ebcaeaf909cd46743c20bf052360a65e60ea82
Part-of: odoo/odoo#79573
2021-11-17 16:36:39 +00:00
JF Aubert 047f2e556f Cherry pick of 20858c2a8805d9ec08edb98b090badf6c73fc342 failed
stdout:

stderr:
13:41:03.985365 git.c:344               trace: built-in: git cherry-pick 20858c2a8805d9ec08edb98b090badf6c73fc342
error: Cherry-picking is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: cherry-pick failed
----------
status:

closes odoo/odoo#79933

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-17 15:52:19 +00:00
Fabio Barbero 8467ad6518 [IMP] website_slide: change sample text
Purpose
=======
Make placeholder look more like sample text to avoid users confusing it
with actual text, add "Sample" ribbon to default course context to avoid
confusing some users.

Specifications
=============
Change default placeholder text, add css rule for placeholders in
website_slide to make the colour lighter and disappear on focus.

PR: odoo/odoo/pull/78845
Task-2674361

closes odoo/odoo#78845

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 15:52:15 +00:00
Joren Van Onder f7250550d0 [FIX] payment_authorize: don't error on long account names
The maximum length for nameOnAccount is 22 characters [1]. Entering a
longer name results in an unclear error message:

  Server Error
  We are not able to process your payment.
  E_WC_26: Please provide valid account holder name.

A maxlength="22" on the input was considered as well, but it would be
confusing for users and bank transactions with the first 22 characters
should be accepted.

opw-2688384

[1] https://developer.authorize.net/api/reference/features/acceptjs.html

closes odoo/odoo#79950

X-original-commit: 64b86f36264c2e655681c7b6bed69e89891107bf
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: jorenvo <jov@odoo.com>
2021-11-17 15:00:47 +00:00
luvi e756d9bc80 [FIX] web: anchor scroll crash
This commit fixes some issues happening when scrolling
with an anchor in Odoo. When the anchor was contained inside
of a notebook and no scrollable was found, a crash happens.
This fix improves the behavior in notebooks by showing the
correct pane before scrolling in form renderer. The scrollTo
util has been improved to remove duplicate lines and handle
multiple situations (0, one or more scrollables). Tests haven
been written to test such behaviors.

closes odoo/odoo#79935

X-original-commit: 4c2b807d1cb32e52a1b1fb5e6c80fb7e933940bc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-11-17 13:51:54 +00:00
Patrick Hoste b5c87d86ca [IMP] website(_event): replace old event snippet by new dynamic one
PURPOSE

Replace the old event snippet which was a simple template with a
javascript file doing a rpc by a new one directly inherited by the
dynamic snippet.
The old snippet was displaying a list of the upcoming events based
on the user's localization. With this commit, it will be completely
replaced by the new snippet. The migration will convert the old
snippets to avoid versioning and keeping ugly code.
The new snippet allows the user to set multiples tags to display
only the wanted events on the website.

LINKS

Task-2489680
PR : odoo/odoo#68644

Related: odoo/upgrade#2406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 13:05:53 +00:00
anhe-odoo 2a0ef92a1e [FIX] hr_expense: Make expense lines readonly on report
Expected Behaviour

When creating a journal entry for an expense, the journal
shouldn't be editable once it has been submitted for approval.

Observed Behaviour

Even when the journal entry has been validated by the manager,
the list of expenses is still editable, which can cause serious
trouble.

Reproducibility

This bug can be reproduced following these steps:
- Create a new expense
- Create the related journal entry (Create report)
- Submit the report for approval
- Validate the report
- Try to edit the expenses list

Problem Root Cause

As it can be seen in the PR, this issue came from the fact the
expense list isn't in read-only mode

Related Issue(s)

opw-2659436

closes odoo/odoo#79915

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-17 10:44:40 +00:00
alt-odoo b272cc0713 [FIX] website_sale: incorrect view called in borderless product view
We should call view portal_rating.rating_widget_stars_static instead of
portal_rating.rating_widget_stars_static_compressed.

closes odoo/odoo#79914

X-original-commit: 500ffd175869508893eaf10b06137ec7e044252a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2021-11-17 10:44:36 +00:00
awa-odoo 7c96f286db [IMP] base_import: add a test for the multi-mapping feature
This commit simply adds a small test for the import multi-mapping feature that
allows the end-user to map multiple columns of his import file to the same
field.

The values in the files are merged together, meaning concatenated for Char/Text
fields and accumulated for Many2many fields.

This commit is done as a preliminary step before fixing an issue related
to this feature in v15.

Task-2687407

closes odoo/odoo#79913

X-original-commit: ac832586e68e0873d69c0b10a3f8cc8b08ea506e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 10:44:32 +00:00