Commit Graph
161230 Commits
Author SHA1 Message Date
Arthur Detroux (ard) ff66035b26 [IMP] website_mass_mailing: improve the newsletter block test
Prior to this commit, starting this test individually would not work as
the admin user is subscribed to the mailing list used during the test.

The reason the test has passed our test suite is because on runbot the
`mass_mailing_sms` module is installed, which adds a new mailing list to
 which the admin user is not subscribed.

 This commit changes the test to always ensure that the admin is not
 subscribed to any newsletter, making the test a bit more robust.

closes odoo/odoo#121200

X-original-commit: f7465d0f13236518ee79e43e65222d0ca0c0b0fb
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-05-15 15:07:22 +02:00
Rodolpho Lima 859b17e3fc [FIX] web_editor: fix typo that led to unexistant property read
closes odoo/odoo#119556

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-05-15 15:07:19 +02:00
Rodolpho Lima 5994c3a8b3 [FIX] web_editor: add unit tests for selection correction
This commit adds unit tests for cases where the cursor is placed at the
editable root (which is corrected by the Editor).

Part-of: odoo/odoo#119556
2023-05-15 15:07:19 +02:00
Rodolpho Lima 0c9980f1dc [FIX] web_editor: fix selection on editable root
Some of the Editor methods relies on not having inline elements at
the editable root. For this reason, the cursor should never be placed
at the editable root, but always inside a block element.

Before this commit, in some situations (notably around tables and
horizontal separators), the cursor could be placed having its anchorNode
at the editable root, allowing the user to insert inlined text at it.

This commit fixes the selection range in such cases, and an empty paragraph
is inserted in cases where there would be no other way to insert text before
or after an existing block.

task-3128747
opw-3106752

Part-of: odoo/odoo#119556
2023-05-15 15:07:19 +02:00
Rodolpho Lima ab0b2440fc [FIX] web_editor: split isVoidElement utility function
The `isVoidElement` utility function has a misleading name, and the need
for an actual list of void elements arose.

This commit replaces the `isVoidElement` utility by two functions:
- `isArtificialVoidElement`: returns true for elements that we decided to
treat as if they were void elements. This method is used to decide whether
they should have their "isContentEditable" attribute set to false.
- `isNotAllowedContent`: actual void elements + the ones above.

Part-of: odoo/odoo#119556
2023-05-15 15:07:18 +02:00
Horacio Tellez 2b1e2abda3 [IMP] payment,*: restrict access to payment.transaction records
Since 15.0, it is no longer possible to have partnerless transactions.
Nonetheless, migrated databases could contain transactions without a
`partner_id` set.
This commit cleans existing rules to make those transactions are not
accessible to unwanted users.

We take the opportunity to clean the security of payment.transaction
records globally.
Now only admin and accounting users have access to payment.transaction
records. The code of different applications has been adapted accordingly.

Task - 3102824

closes odoo/odoo#113515

Related: odoo/upgrade#4564
Related: odoo/enterprise#40939
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-15 15:07:13 +02:00
Josse Colpaert d471391dd8 [FIX] l10n_es_edi_sii: the 21% ISP tax in itself is not isp
The tax 21% ISP actually behaves like a normal 21% tax
(it gets reported in the same lines, ...)

But the reason for its existence is that in case of the
fiscal position Revendedor ISP...  it gets mapped to the
0% ISP tax (which needs to be 0)

Before, if you would however send a 21% ISP tax to the SII,
it would be set as ISP and you would get an error telling
that the tax rate should be 0 in case of ISP.  (but now, it
will be reported as S1 and not trigger the error)

See also discussion in
https://github.com/odoo/odoo/pull/119339#issuecomment-1519720558

closes odoo/odoo#121400

X-original-commit: 909fcbee95d0d9e69b4b91916f075a6724c09bda
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-05-15 13:59:34 +02:00
Sanket Brahmbhatt 2d70761dca [FIX] base,tools: raise usererror instead of a valueerror
This issue is generated when the user uploads an image of more than
50.0 million pixels, so error would be generated. But, currently it raises a
`ValueError` which results in traceback. So, we replace it with
`UserError` so the user has an idea about Image size or pixel being excessive.

closes odoo/odoo#121396

Sentry: - 4075426049
X-original-commit: ac2a3966cb035f112bf6aebb1244dc8d67831d1a
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-05-15 13:59:31 +02:00
MerlinGuillaume 082fa0c40a [FIX] hr_recruitment: change applicant refuse hotkey to d
The shortcut to refuse an application is overridden by the shortcut to
move the record to the next statusbar stage

Steps to reproduce:
1. Install Recruitment
2. Go to Recruitment > Applications > All Applications and open any
   application
3. Press and hold `alt`
4. The hotkey for the action 'Refuse' is shown (`x`)
5. With the `alt` key held, press on `x`
6. The application goes to the next stage instead of being refused

Solution:
Change refuse hotkey to `d`

Problem:
Commit https://github.com/odoo/odoo/commit/76b513917b4dad6eeecb4decac24e8c2d2c75b00
introduced a shortcut `alt+x` to move the record to the next state in
the statusbar. Because this shortcut has been chosen for its similarity
with shortcut `alt+shift+x` (Move to %s...), we prefer to change the
hotkey to refuse an applicant

opw-3206744

closes odoo/odoo#121395

X-original-commit: 37a9d552a5d581f14fd59728ea539726b1387f0b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-05-15 13:59:29 +02:00
Mehdi Bendali Hacine 0a2183a7d1 [IMP] base_vat: add TIN validation for KSA
closes odoo/odoo#121389

X-original-commit: efbaf72c0fd1781846b28baf08a1ea9a16f249f0
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-15 13:59:25 +02:00
Samuel Degueldre ba29387924 [REF] pos*, web: use reactivity to react to changes in UI size
pos*: point_of_sale, pos_restaurant, pos_sale

Previously the pos would rerender the entire UI when the window was
resized. In practice, most components do not care about the size of the
UI for their rendering, and so we're doing a lot of needless work, and
also using an owl feature (deep renders) whose perennity is not certain
(we may want to remove the ability to do deep renders completely in the
future).

This commit changes the pos code to use the ui service `isSmall` field,
makes the ui service reactive so that components can subscribe to
changes inside of it with `useState`, and makes the ui service update
its internal state at most once per animation frame, instead of after
100ms without resizing, so that resizing the viewport results in a
smoother user experience.

closes odoo/odoo#121343

Signed-off-by: adgu-odoo <adgu@odoo.com>
2023-05-15 13:59:22 +02:00
Jurgen (jugj) 26bb317708 [IMP] web : Open mail sender widget in a new window
This PR aims to change the target of the email widget to _blank. Indeed depending on
your mail provider, it can open the mail editor in your current tab and might not be
practical for the user if he needs information that was present on the previous tab
to compose the mail.
task-3324948

closes odoo/odoo#121277

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-05-15 13:59:20 +02:00
Mathieu Duckerts-Antoine 42907462fc [REF] web: callback recorders: from env to props
The fact that callback recorders are put in the env by the action
service has a serious disadvantage. A view using itself some View component
can have easily its own local state and global state polluted by that
subview (views use useSetupView). This would lead to very subtle
problems hard to detect and understand. Moreover, we view the callback
recorders as rather technical stuff and we would like the developers not
to have to think about them. For that reason we pass the callback
recorders as (optional) props to the View component that make them
available in the env. Note that the situation remains unchanged for
client actions (we do not have a View analog component for the actions).

closes odoo/odoo#121050

Related: odoo/enterprise#40901
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-15 13:59:14 +02:00
David Monnom (moda) cd81cc64ed [FIX] point_of_sale,pos_*: launch test with demo user
Before the PoS tours were mainly run with the `accountman` user, which
did not allow us to have a clear view of the permissions required for
each function of the Point of Sale.

Now, two users have been created for the PoS:
- `pos_user`
- `pos_admin`

The first one has no particular permission, he is a normal user of the
Point of Sale and Odoo, the second one is an administrator of the Odoo
application.

If the user `pos_user` is used and some permissions are missing in a
tour, these are added to the user with starting the test.

closes odoo/odoo#120380

Related: odoo/enterprise#40656
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-15 13:59:09 +02:00
Lucas Lefèvre 96669c74f8 [IMP] spreadsheet: share spreadsheet
This commit allows to share spreadsheets to other users (public, portal or
internal without the required access rights)

See Enterprise commit. This commit prepares the ground to sharing
`documents.document` spreadsheets.
(I expect dashboard spreadsheet sharing in the near future which will
use the same generic code)

The challenges of sharing odoo spreadsheets
-------------------------------------------

Odoo spreadsheets can have any data from the database.
ODOO.PIVOT and ODOO.LIST functions specifically can target *any model*
and *any field*.
The values are dynamically loaded with RPC calls when the
spreadsheet is open. Normal access rights apply to load this kind of
"embeded" data.

A user can open a spreadsheet if he can read the `documents.document` record,
but odoo specific functions might result in errors if the user doesn't have
the access rights on the underlying model.

That's obviously not what we want when sharing a spreadsheet to an external
person. We want this person to see the values and not a spreadsheet full
of errors.

Giving access to external user?
---------------------------------

Users must have a very clear understanding what they are "leaking" when
they share a spreadsheet. Sharing a spreadsheet should not open any door
the user wouldn't think of or wouldn't understand.

The best way is to be very strict with the data we are sharing.
That means: only the specific models, specific fields and specific records
visible in the spreadsheet by the user who is sharing (different users can
see different values for the same spreadsheet, depending on their access rights).

We also want to consider the following scenario:
Alice is a newcomer (with very limited access rights) and she shares a
spreadsheet to a customer. A few years later, she is manager and has a
lot more access rights (groups, ir.rules, etc.).
The forgotten spreadsheet shared years ago should not leak more data because
Alice now has access to all company data.

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

With all those challenges in mind, here is a first approach of shared
spreadsheet:

Readonly freezed spreadsheet for external users
-----------------------------------------------

When sharing a spreadsheet, we actually copy and freeze the spreadsheet at that
time. Odoo formulas are replaced with their value. This is the easiest and safest
way to deal with access rights to other models: there's no access to other
models at all ^^
The spreadsheet is displayed in readonly since it would only be editing a copy.
If the external person wants data to be updated, he can ask a new sharing link.

Read/Write for internal users
-----------------------------

The situation for internal users is different. We can rely on their actual access
rights.
When an internal user opens a spreadsheet sharing link, he is redirected to the
regular spreadsheet client action. A token is used to read/write the
`documents.document` record (and other linked models such as `spreadsheet.revision`),
but the data for pivots, lists, etc. is loaded with the user's own access rights.
If the user doesn't have the rights to read a model or field, the function results in
an error and that's the expected behavior.
This sharing strategy is perfectly fine for all spreadsheets that doesn't contain
any odoo data (think of all the Google Sheets we receive internally by email to
register to an event or any other stuff).

Future work
-----------
From a functional point of view, the spec is far from perfect.
Users would probably expect the data to "update" itself (not freezed).
People will want write access for external users as well.
Given the complexity of getting it right (from a tecnical, security and functional POV),
this is left for a later work

closes odoo/odoo#114040

Task: 3045808
Related: odoo/enterprise#37687
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-15 13:58:59 +02:00
MerlinGuillaume 93df76fedb [FIX] web: disable click on list action with target new
When importing data and checking the possible values of a field,
clicking on one of the records to open it throws an error

Steps to reproduce:
1. Install Projects
2. Go to Project > My Tasks and trigger the list view
3. Select any record and export it (check the import-compatible export
   option)
4. Open the exported file and modify the `project_id` to a non-existing
   project name
5. Click on Favorites > Import records
6. Upload the modified file and click on 'TEST'
7. In the `project_id` field, click on 'See possible values'
8. Click on any project, an error is thrown

Solution:
Prevent the form from being opened when the action is in target "new"

Problem:
Opening the record in a target new throws the error `switchView
called but the current controller isn't a view`

opw-3161777

closes odoo/odoo#121384

X-original-commit: 63d43713ea5b2efba2e63b1735954bb2069bc6f4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-05-15 12:56:20 +02:00
Alexandre Kühn d7d7f84ff2 [FIX] mail: make <hr/> visible
Before this commit, the <hr/> in Discuss and Chatter
were not visible.

These <hr/> had no height but had a border. The border showed the
separator.

With the redesign of web client, <hr/> now have opacity of 25%.
This combined with borders being lighter made these separators
barely visible.

This commit removes border on these <hr>, which makes them use
their default visual, which is the same as a border.

closes odoo/odoo#121378

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-15 12:56:17 +02:00
Chrysanthe (chgo) 63424d2484 [IMP] web: fix search background-color`
== ISSUE ==

The search component is using a `.bg-200` class which renders a grey
darker than the one of the `o_web_client`. Since we already define
a `background-color` for the web client, we do not need a custom one
on top of it. 

== After this commit ==

We remove the `bg-*` class applied to the element so it matches the
`.o_web_client background.`

task-3326289
part of task-3326263

closes odoo/odoo#121347

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-15 12:56:14 +02:00
Sébastien Theys bb627ae9de [FIX] mail: allow guest to delete attachments
closes odoo/odoo#121256

Related: odoo/enterprise#41025
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-15 12:56:09 +02:00
Sébastien Theys c6b86893f2 [REF] mail: move channel attachment url to discuss folder
Part-of: odoo/odoo#121256
2023-05-15 12:56:09 +02:00
Sébastien Theys f9611105e6 [REF] mail: clean attachment url
Part-of: odoo/odoo#121256
2023-05-15 12:56:09 +02:00
Sébastien Theys b1660a0b5c [FIX] mail: fix link of link preview image url
Part-of: odoo/odoo#121256
2023-05-15 12:56:08 +02:00
Sébastien Theys d6558cdcbe [IMP] mail: remove unused channelId on Persona
Part-of: odoo/odoo#121256
2023-05-15 12:56:08 +02:00
Soukéina Bojabza fa0cd18f9d [IMP] web_editor: align numeric inputs text without units to the right
Before this commit, the input widgets that do not have units have their
text aligned to the left. However, when the content is numeric, it would
be better if the number was on the right, just as when there is a unit.

This commit also considers as numeric an input widget that has the
`data-step` attribute (and not only the `data-unit` attribute) and
forces the text alignment to the right in this case.

task-2798576

closes odoo/odoo#89055

Signed-off-by: Dieleman Guillaume <gdi@odoo.com>
2023-05-15 12:55:58 +02:00
Soukéina Bojabza fdfd5042f8 [IMP] website: manage better the files uploaded in a form
Before this commit, now that multiple files can be uploaded in a form,
we could observe that the file input is not convenient to manage this
situation:

- Clicking again on the input to choose other files replaces the
previously uploaded ones, we can therefore not upload files one by one.
- A file cannot be deleted in an obvious way: we need to cancel a new
upload, as it will replace the file by nothing and therefore delete it.
- When multiple files are uploaded, only the number of files is
displayed and not their name (they are only displayed on hover).

This commit improves these behaviors:

- Clicking again on the input adds additional files instead of replacing
them (unless the number of files allowed is 1);
- The button text content is modified after the upload of files,
displaying "Add Files"/"Replace File" (if multiple/single files are
allowed) to show its role better.
- When files are uploaded, blocks containing each files name and a
cross to delete them are displayed.

In order to make these improvements, the file input is hidden and
replaced by an input of type=`button` when files are uploaded. This was
done for two reasons:
- It is not possible to modify the content of an input of type=`file`
but we can change the value of a button.
- The input did not look good with the file blocks, because it has a
text displaying file informations, which was redundant with the blocks.

task-2798576

Part-of: odoo/odoo#89055
2023-05-15 12:55:58 +02:00
Soukéina Bojabza f676463dbb [IMP] website: add options for file upload in forms (max size + number)
Currently, we can only upload one file in a form File Upload field and
this file does not have a size limit. (Note that the server can have a
limit to prevent files too large from being uploaded but the file input
itself does not have one.)

This commit adds options to the form file inputs in order to set a
maximum number of files and the maximum file size (in MB) allowed to be
uploaded in these fields. The default values are 1 file and 1 MB. Note
that the option for the number of files is not displayed for the fields
where only one file is supposed to be uploaded.

If the uploaded files do not respect these limits, the form is not sent
and a message is displayed.

task-2798576

Part-of: odoo/odoo#89055
2023-05-15 12:55:57 +02:00
kir-odoo 88bcd855ae [FIX] delivery: shipping carrier is set after delivery generated
Before this commit
==================
when SO is confirmed and Delivery is created then add the shipping method
in SO, in this case, the shipping carrier is not set in the existing undelivered
delivery of that SO.

After this commit
=================
So in this commit, we set the shipping carrier for undelivered delivery.

taskId - 2946360

closes odoo/odoo#121363

X-original-commit: 51523c0dbf6ce9dd1a1ff35e03fa6a51267da14b
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-15 11:41:57 +02:00
Benoit Socias 2b14e3148e [IMP] website: test edition of URL in mega menu with Cards template
Edition of block links has been broken several times.

This commit adds a test that makes sure it does not happen again by
changing the URL of a card of a mega menu with the Cards template.

task-3300977

closes odoo/odoo#121362

X-original-commit: b4b5816a4acd953eb4dabfd14d2a142934dee357
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
2023-05-15 11:41:54 +02:00
Benoit Socias 225cea8b74 [FIX] web_editor: restore avoiding updates of link content
[1] mistakenly removed the variable used by the mechanism that was
introduced in [2] to avoid updating link content.

This commit uses the link's `needLabel` instead to achieve the same
goal.

Steps to reproduce:
- Add a mega menu.
- Set the mega menu template to Cards.
- Click on the text of a card.
- DO NOT click on the edit link icon in the popover.
- Click on the href field in the options panel.
- Change the value.

=> Links content was broken (image was removed and texts were grouped).

[1]: https://github.com/odoo/odoo/commit/75166dbcd4962f30624fe19829757acbf8e76022
[2]: https://github.com/odoo/odoo/commit/7a0e58f8d7237514d23d815cdf3d81fc79edb1ec

task-3300977

X-original-commit: 1dbcf2825b2d495c206e110a39efe620e646e7c4
Part-of: odoo/odoo#121362
2023-05-15 11:41:54 +02:00
Xavier Luyckx (xlu) 3132763e95 [FIX] mail: channel invitation missing gap
Previous to this commit, in discuss, when a user wanted to invite people
and select users, the 'selected users' tags were missing a gap between
them. 

This commit adds a gap between them (adapted for milk).

task-3326399
part of task-3326263

closes odoo/odoo#121361

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-15 11:41:51 +02:00
Florian Charlier 1fdca777a2 [IMP] onboarding, *: customize step image
* = account, sale

This commit allows users to modify the panel image for the
onboarding steps. This is especially necessary for additional
onboardings that can be/could have been created, or if the
appointment onboarding was modified, as it was chosen to not
overly complicate the upgrade and simply not modify these records.

We also customize the placeholder icon to be one of these icons
instead of the default "camera" image.

Finally, a few icons are renamed to be more generally usable.

closes odoo/odoo#121349

Related: odoo/enterprise#41031
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-15 11:41:42 +02:00
Mylyna Hy 9477257b58 [FIX] stock: show exception log when cancel backorders
Steps to Reproduce Issue for single picking:
1. Install Sales, Inventory
2. Create an SO and confirm
3. Go to the transfer, assign the done value to be less than demanded
4. Validate the transfer and cancel the backorder

Current Behavior:
There is no exception error on the SO chatter

Expected Behavior:
An exception error should be logged on the SO chatter

Other Info: When cancelling a backorder for a single picking,
the exception error about less quantity than expected is not logged on the SO.
"process_cancel_backorder" does not call _log_less_quantities_than_expected.
As defined in "process", the exception is only logged when validating multiple pickings at once but
one is to backorder but the other is not.

opw-3222508

closes odoo/odoo#121331

X-original-commit: a1dfc58eebd1badc3eea501b23861748b3762d75
Signed-off-by: Mylyna Hy (myhy) <myhy@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-15 11:41:39 +02:00
Tommy (tong) 0a44f64840 [FIX] l10n_jp: add migrations script to update account.tax.group xmlid
Steps to reproduce:

- Install l10n_jp before the original commit
- Update code to latest
- Try to upgrade the l10n_jp module

Current behaviour:
Error shown because of missing account tax group.

Expected behaviour:
No error should be shown.

Explanation:
The new version of localisation changes the xmlid which caused the original tax group
cannot find the reference. Migrate them to prevent the error.

X-original-commit: 7a914a0
Close #118867

closes odoo/odoo#121267

X-original-commit: 95bfdbf426e9109f90dce4955ceb6795931e5365
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-15 11:41:37 +02:00
Lucas Lefèvre 421fd1baa6 [ADD] spreadsheet_dashboard_website_sale,website_sale: add eCommerce dashboard
The `sale.report `field `is_abandoned_cart` is moved from module
`website_sale_dashboard` to `website_sale`.
This allows to use it in the eCommerce dashboard in the community edition.

Task 3222991

closes odoo/odoo#121165

Related: odoo/enterprise#40979
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-15 11:41:31 +02:00
Ali Alfie (alal) 2f2250622b [FIX] hr_expense: expense categories padding issue
Before: in Expense Categories list view, if Internal Notes wasn't empty it would  cause a padding issue. The issue's cause was that the Internal Notes columns is an HTML field, where every line is assigned a margin-bottom.

Now: fixed the padding issue by removing the margin-bottom for the last line in the Internal Notes field.

task-32999162

closes odoo/odoo#121014

X-original-commit: f6bffc092ddc4bdfd9d68efe66dbbcdeed4f0309
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-15 11:41:29 +02:00
Tommy (tong) 9113a17a8b [IMP] l10n_hk: added FPS QR code payment for invoice
- Add FPS QR code payment by following the government document of FPS QR
Code Standard
- https://www.hkma.gov.hk/media/eng/doc/key-functions/financial-infrastructure/infrastructure/retail-payment-initiatives/Common_QR_Code_Specification.pdf

task-3042940

closes odoo/odoo#120050

Related: odoo/documentation#4309
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-15 11:41:26 +02:00
Tommy (tong) 373e023fe5 [ADD] account_qr_code_emv
- This is a bridge module to provide support for EMV Merchant-Presented
QR-code generation for Payment System.
- Other accounting localisation module will override _get_merchant_account_info
method to construct the qr code parameters. This module will help creating the
crc16 check sum to append in the qr code vals.

Part-of: odoo/odoo#120050
2023-05-15 11:41:26 +02:00
Jorge Pinna PuissantandAaron Bohy 58ca40b032 [REF] web, *: move progress bar to kanban view
The aim of this commit is to remove the specific complexity of the
kanban's progress bar from the relational model, and put it into the
kanban view itself.

This commit prepares and is part of the task that aim to refactor the
relational model and migrate it to owl.

part-of task-id 3179751

closes odoo/odoo#119781

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-05-15 11:41:20 +02:00
Jorge Pinna Puissant d145b1e627 [IMP] web: add rpc calls tests for kanban progress bar
In this commit, we add the list of rpc calls done in the progress bar
tests, this is done to avoid to add more rpc's doing the refactoring.

Part-of: odoo/odoo#119781
2023-05-15 11:41:20 +02:00
Panagiotis Kyriakou f2c1472f0f [IMP] make the kanban subtask button clickable everywhere
This commit button makes the kanban substack button
clickable everywhere - both in the icon and the x/y
indication next to it.

Additionally, this commit also makes it that the tooltip
on hover is shown when the user hovers over both the icon
and the x/y indication.

Task-3284498

closes odoo/odoo#119468

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-15 11:41:16 +02:00
Aaron Bohy c091afdf26 [FIX] web: re-enable pivot test inadvertently disabled
Commit [1] commented the second half of a pivot test (I guess it
was done to debug it, and we forgot to uncomment it afterwards).
This small diff was then lost in the huge diff of the Milk PR.

This commit re-enables the full test, which luckily still pass.

[1] odoo/odoo@a1e05c8357

closes odoo/odoo#121346

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-15 09:37:59 +02:00
Xavier Bol (xbo) 1c2ce8c213 [IMP] web: display the current user first in the result of name_search
Before this commit, when the user wants to self assign to a task for
instance, he has to write his name to be able to select himself.

This commit displays the current user first in the result of
`name_search` (the method called by relational widgets in JS).
If the current user does not satisfy the search condition then
he will not be in the result of the `name_search`.

task-3291745

closes odoo/odoo#121146

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-15 09:37:56 +02:00
Victor Feyens e275f0968d [IMP] website_(*)sale: configure tax display by website
task-3221549

closes odoo/odoo#120813

Related: odoo/upgrade#4643
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-15 09:37:51 +02:00
Pulinckx Pierre (PIPU) f4f0f78318 [REF] *: Replace underscore.js function by native JS
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238

closes odoo/odoo#120437

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-15 09:37:48 +02:00
niyasraphy 1b03544678 [IMP] website_forum: improve window title
before this commit, on editing a forum post
window title is shown as edit_post(id) as the
name is not set on the template.

after this commit, window title will be shown
as Edit Post.

closes odoo/odoo#114624

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-15 09:37:42 +02:00
Lucas Lefèvreandanhe-odoo 65d2bb7618 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/afee7d57 [REL] 16.3.0-alpha.8
https://github.com/odoo/o-spreadsheet/commit/3f5b6c41 [FIX] topbar: menu items are now sorted by sequence
https://github.com/odoo/o-spreadsheet/commit/88edc8b0 [IMP] core: add timestamp to remote revisions
https://github.com/odoo/o-spreadsheet/commit/289044a3 [FIX] sidepanel: switching from on sidepanel to another should trigger onCloseSidePanel
https://github.com/odoo/o-spreadsheet/commit/5848dcb7 [FIX] composer: fix placeholder scrollbar Task: 3258920
https://github.com/odoo/o-spreadsheet/commit/378bdd89 [FIX] menu items: text overflow not working
https://github.com/odoo/o-spreadsheet/commit/c7524c5a [FIX] evaluation: compute format from empty cell
https://github.com/odoo/o-spreadsheet/commit/bca6ad64 [IMP] TopBar: Add missing icons an gray disabled icons
https://github.com/odoo/o-spreadsheet/commit/e672e183 [FIX] menus: mark automatic format as active
https://github.com/odoo/o-spreadsheet/commit/fac211e1 [FIX] SelectionInput: Fix cross symbol
https://github.com/odoo/o-spreadsheet/commit/53ce0f02 [FIX] SelectionInputPlugin: prevent multiple range in 'singleRange' input Task: 3237798
https://github.com/odoo/o-spreadsheet/commit/4aa957bd [FIX] topbar: fix borderEditor props
https://github.com/odoo/o-spreadsheet/commit/803bc1a8 [FIX] topbar: active item color
https://github.com/odoo/o-spreadsheet/commit/f6705fa4 [FIX] ContentEditableHelper: fix getCurrentSelection for Firefox Task: 3071026
https://github.com/odoo/o-spreadsheet/commit/61766daa [REF] css: move hoverable-button to spreadsheet
https://github.com/odoo/o-spreadsheet/commit/34fd1982 [IMP] borders: add support for different line styles Task: 2714331
https://github.com/odoo/o-spreadsheet/commit/5539367a [FIX] lookup: horizontal search in LOOKUP function Task: 3277145
https://github.com/odoo/o-spreadsheet/commit/a7d7c0e5 [IMP] menu: disable insertion via menus when separate cols/rows selected
https://github.com/odoo/o-spreadsheet/commit/605ae100 [REF] selective_history: name constructor arguments Task: 3301044
https://github.com/odoo/o-spreadsheet/commit/23ec1c47 [FIX] collaborative: ignore bad snapshot revision
https://github.com/odoo/o-spreadsheet/commit/ed9ee1f3 [IMP] model: dispatch initial revision to core only
https://github.com/odoo/o-spreadsheet/commit/8dbd4801 [FIX] chart: no dataset with single cell

closes odoo/odoo#121273

Related: odoo/enterprise#41001
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: anhe-odoo <anhe@odoo.com>
2023-05-15 08:34:45 +02:00
Zeel Patel 7086c99334 [IMP] l10n_in_ewaybill: send service product details
We can send service product details if there are any one goods in the Invoice.

task - 3276398

closes odoo/odoo#119549

X-original-commit: 32b65ffcc9099ed312666f89acb3e651976c33ad
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-15 08:34:42 +02:00
Thomas Lefebvre (thle) 79b5e779b1 [FIX] project_account, project_purchase, sale_project: default currency
In the multi-company context, it is possible to create
an analytic account without a defined company.
The result is that the analytic account
will not have a currency.

A traceback will be triggered when calculating the
profitability of a project
(for example by changing its status when
the 'sale_timesheet' module is installed).

Solution:
Use the currency of the project.

Introduced by:
68b4ea69c173dd5894bcb42b99e6818f241f9734

opw-3292417

closes odoo/odoo#121143

X-original-commit: 90512da68f776459a8a65bed285f5a178f9dd77d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-15 07:30:57 +02:00
Claire Bretton (clbr) f8597f3301 [REF] account: remove manual reconciliation widget
The manual reconciliation widget is too complex. We completely remove it and
replace it with a simple wizard `account.reconcile.wizard` that opens when
selected lines can't be directly/silently reconciled (then we need a
write-off whose data will be filled in the wizard).

To do so we had to refactor reconciliation methods to allow to shadow some
values and fake reconciliation to get correct values.
We also now use of the _reconcile_plan instead of the previous reconciliation
which should be more efficient and correct.

Refactored a bit common between `test_account_reconcile_wizard` and
`test_account_move_reconcile` to avoid duplication.

In this process of simplification we also separate the previous `automatic_entry_wizard`
in two separate interfaces from the user's perspective: one only handle the change of
period and the other will handle complex transfer that are not possible through regular
reconciliation process (i.e. through the wizard we are creating in Enterprise related PR).

closes odoo/odoo#120832

Task: 3060792
Related: odoo/upgrade#4674
Related: odoo/enterprise#40510
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-14 00:02:31 +02:00
+7 cd20b56693 [REF] *: Milk, webclient redesign
This pull request introduces an overall redesign that encompasses significant improvements in both usability and aesthetic.
Codenamed "**milk**",  the project's primary goal  is to enhance the overall UX and provide a visually appealing interface that promotes intuitive interaction.

### Key Design Features:

- **Improved use of `primary`color**
Previously, **all** action buttons were indistinctly assigned `primary`, regardless of their importance in the user flow. The only exception were "_hyper-secondary_" actions, which were intentionally de-emphasized to the extent of being represented solely by text.
However, this approach proved to be problematic for users since the UI failed to effectively guide them through the workflow.
Now, each view has a limited number of primary buttons that serve as clear **call-to-action** elements. The design of secondary buttons has been enhanced to give them more prominence and visual weight.

- **Control panel**
The redesign employs a consistent and responsive layout that prioritise clarity and simplicity while maintaining the component original functionalities.  The information hierarchy has been reviewed, ensuring that essential actions are prominently displayed, while less critical elements are appropriately de-emphasized.

- **The new "_Cog Menu_"**
It consolidates actions specific to the current entry only, streamlining the user interface by centralizing functionalities that were previously scattered (e.g., Archive/Import/Export).
![Pasted Graphic 1](https://github.com/odoo/odoo/assets/8558351/4ed3d5ce-7378-4b17-8510-066e1ded1c65)

- **Font-size Enhancement**
The base font-size has been increased from `13px` to `14px` across the entire UI. This enhancement significantly improves readability, ensuring that text content is more legible and accessible to users. Moreover, the rendering of `fa` icons achieves now optimal clarity since were initially designed on a `14px` font-size base.
Furthermore, the `oi` icons have also been updated to the new font-size.
Although this change may seem small, it has significant consequences on the overall visual appearance, as spacing needs to be adjusted accordingly. While we are considering allowing users to customize these options, the current change represents a step forward in readability by reducing the amount of information displayed on the screen.

- **Badges**
Badges have been redesigned to provide a more consolidated design while ensuring comfortable readability. The color palette has been reviewed to strike a balance between aesthetics and readability, allowing the badge content to stand out while ensuring comfortable viewing.

- **AppIcons, Pictograms and users' avatars**
Deviate from the previous "fontAwesome design-line" and introduce a fresh design language that aligns with our branding strategy. All the assets now possess a unique and cohesive visual style, enhancing the overall user experience and strengthening our brand identity.

### SCSS:

- **Separate "Bootstrap Review" for Frontend and Backend Bundles**
Prior to this pull request, both the frontend and backend bundles were using the same `bootstrap_review.scss` file. However, as our backend design started to deviate from Bootstrap default, it became necessary to have a dedicated way to "review" Bootstrap styles specifically for the backend.
This pull request introduces two new stylesheets: `bootstrap_review_frontend.scss` and `bootstrap_review_backend.scss`. The original `bootstrap_review.scss` file remains as a shared asset, containing customizations needed by all bundles.
With this separation, we can now maintain distinct Bootstrap styles for the frontend and backend, enhancing clarity and flexibility of our codebase.

- **[NEW] `bootstrap_review_backend.scss`**
Reduce the need for cumbersome and unsightly overrides.  By adopting a flexible and modular approach, we introduce a more consistent way of defining custom classes and custom legacy classes (e.g., `bg-black-50`).
See `bootstrap_review_backend.scss`.

- **[NEW] `utilities_custom_backend.scss`**
Manage/limit/fine-tune the generation of Bootstrap utility classes for the backend.

- **[NEW] `functions.scss`**
Unlike `utils.scss`, this file is accessible at any stage of the compilation process.

- **[NEW] `o_avatar` class**
Uniform avatars designs defining a common class shared across different modules.

- **[NEW] `o_tag` class**
Define a common class for any type entry generated by the `TagsList` component (either badges or avatars)

- **[IMP] overall spacing system**
Solved a long-standing issue regarding spacing variables in Odoo (e.g., `$o-horizontal-padding`) and Bootstrap default spacing. By harmonizing these two systems, we now enable the seamless utilization of Bootstrap utility classes to manage webclient spacing. This enhancement ensures a consistent and uniform spacing experience throughout the application

closes odoo/odoo#116641

Related: odoo/upgrade#4652
Related: odoo/enterprise#38775
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Antoine (anso) <anso@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Damien Bouvy <dbo@odoo.com>
Co-authored-by: Dardenne Florent (dafl) <dafl@odoo.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
Co-authored-by: Florian Charlier <flch@odoo.com>
Co-authored-by: Julien Carion (juca) <juca@odoo.com>
Co-authored-by: Mathieu (mano) <mano@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: Romain Estievenart <res@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
Co-authored-by: chrysanthe(chgo) <chgo@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
Co-authored-by: xlu-odoo <xlu@odoo.com>
2023-05-12 22:59:24 +02:00