Commit Graph
165814 Commits
Author SHA1 Message Date
miad-odoo 39dd2fc2ab [IMP] mail: allow users to manage own templates
Before this commit, all mail templates were shared, which was cluttering the UI
for everyone.

Now, each user can have their own templates that they can edit and save. Access
is done through the mail composer wizard, where users can only access their own
templates and templates that don't belong to anyone.

Some groups are considered as admins and can access all templates in
Settings/Technical/Email/Email Templates:

- Sales Admin
- Project Admins
- Helpdesk Admins
- Accountants
- Event Admins
- Recruitment Admins

Task-2504439

Part-of: odoo/odoo#126049
2023-09-29 13:11:50 +00:00
utag-odoo cdbd8d038d [FIX] website: make navbar content invisible when block invisible
Steps to reproduce:
 1. Go to the website
 2. Add website languages
 3. Drag Table Of Content
 4. Select snippet block
 5. Go to customize the block
 6. Select visibility conditionally - set visible/hide for languages.

Before the commit, selecting block visibility conditionally makes only
the block is invisible but not the navbar content is invisible due to the
absence of the `data-visibility-id` attribute.

In this commit, handling conditional visibility of the navbar when the
the snippet block is invisible.
Also, This commit adds a check for missing visibility IDs in anchor
links. The code checks if both the visibility ID values exist or if they
are both missing. If either condition is met, the function returns
without creating the `<a>` tag.

task-3373943

closes odoo/odoo#137081

X-original-commit: 182d3f20d8d3ae8149280ac3084423ba11e0975d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-09-29 11:59:06 +00:00
shsa-odoo 9e2f0edba5 [FIX] web_editor: apply font size on selected cells
Before this commit:

-Font size does not get applied to selected cells.
-Font style buttons were active when cells are selected.

After this commit:

-Font size can be applied.
-The font styles should not all be toggle by default.

task-3477490

closes odoo/odoo#137080

X-original-commit: 1d20abfbfd9f337f356c5a237edc713fb973b636
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Sanjay Sharma (shsa) <shsa@odoo.com>
2023-09-29 11:59:05 +00:00
Louis Wicket (wil) 8e4aa704c6 [REM] website_event_questions: remove useless directory
The module has been deleted, but the i18n directory is still there.
This commit removes it.

closes odoo/odoo#137079

X-original-commit: 603b9c6bf861c330eb28a15c095bba67483c1398
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 11:59:04 +00:00
roen-odoo 2449695515 [FIX] point_of_sale: correctly set lot_id on refund orders
Current behavior:
When refunding an order, the lot_id of the original order was not set
on the refund order.

Steps to reproduce:
- Create a product with tracking by lot
- Open the POS and add the product to the order
- Set a lot on the product
- Pay the order
- Refund the order
- Check the lot on the refund order, there is no lot set

opw-3485740

closes odoo/odoo#136991

X-original-commit: 8868f689f2aea48ca82ee00478083ba72370bfbd
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-29 11:59:03 +00:00
Renilkumar Kajavadra 3b448265fc [FIX] project: import records of project
When user import records of project and if it contains tags in the file,
a traceback will appear.

Steps to reproduce the error:
- Go to project > Favorites > Import records > Upload File
Note: Make sure that file contains tags

Error: A traceback appears:
"TypeError: unsupported operand type(s) for +=: NoneType and list"

https://github.com/odoo/odoo/blob/0480005e4498d76fe7a3446693f41500122e41d7/addons/project/models/project.py#L2763
When user import records that contains tags, here args will be None.
So it will lead to above traceback.

sentry-4494554048

closes odoo/odoo#136973

X-original-commit: 9e14cf0fb618c517fe12138416e40c3e66383276
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 11:59:02 +00:00
Arnold Moyaux eff2c6edaa [FIX] stock: backorder base on initial demand
This reverts commit 656d8ace87.

The rational was: "If people don't have inventory, they will need a
backorder anyway and it's logical to not display the popup even
if the picking type has 'ask' for create backorder".

Also for the barcode application in OE we only show the reserved lines and
you could have the message if the picking was not fully reserve. Even if
you completed all the lines. So we could have a single flow for backend
and frontend.

But it's difficult for poeple to understand that the backorder is
base on the reservation and not on the initial demand. So we do a
step back. On top of it, people usualy won't mix flow. So they
could totaly use the "always create a BO" option on picking type
when they use the barcode and "ask" when they use the backend.

closes odoo/odoo#136725

X-original-commit: ed291c4d47783c5912ffb40db7893c321ccdb1e2
Related: odoo/enterprise#47959
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-29 11:59:01 +00:00
abd-msyukyu-odoo e657831f5a [IMP] web_editor: add preserveCursor callback return value
By returning the `setSelection` value in the callback returned by the
`preserveCursor`, we allow better control for the caller over the fact that the
selection was effectively restored or if it failed.

task-3383561

closes odoo/odoo#126340

Related: odoo/enterprise#43087
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 11:58:58 +00:00
Thomas Lefebvre (thle) dbd9942c21 [FIX] fleet: manage recurring yearly costs in report
Issue:
------
Contracts with a "Yearly" recurring cost
are not applied every year in the report.

Cause:
------
We use truncation to compare dates.

The following condition:
```sql
date_trunc('month', coy.date) = date_trunc('month', d)
```
can be read as:
"When year and month are the same".

The `date_trunc` function sets to "zero" the parts of the date we want to truncate.

This is why the recurrence only appears for one year.

Solution:
---------
Use the date comparison provided with postgresql
and use `date_part` function to check the month.

opw-3468253

closes odoo/odoo#137060

X-original-commit: f2ed4a179bb10cbca1d095389deac75dd8ca054f
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-09-29 10:41:50 +00:00
Severin Zumbrunn 44078cd674 [FIX] website_blog, website_event: incompat. of options
closes odoo/odoo#137028

X-original-commit: 04002d3a1610283445f7dfa9a59bce5a34a4eca9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-29 09:21:55 +00:00
Benoit Socias 262a05931c [FIX] web_editor: replace extension of webp converted images
This commit replaces the `.jpg`, `.jpeg` or `.png` extension of uploaded
images to `.webp` when the image is converted to webp.

task-3460171

closes odoo/odoo#137022

X-original-commit: 77624c9eafc7f21a2ec5edcd3d56ee76e646fc38
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-09-29 09:21:55 +00:00
Soukéina Bojabza bd3e0030d0 [FIX] web_editor: make loadImageInfo robust to absolute URLs
This commit makes the rpc call in the `loadImageInfo` method robust to
the case where an image src would be an absolute URL, by only
considering the relative part of the URL.

The images src are generally always relative but commit [1] wrongly put
absolute URLs to images in grid mode with the `_reloadLazyImages`
method. While this behavior was fixed by commit [2], the images that
were saved before this fix was available still have an absolute URL.
Hence the need to make `loadImageInfo` robust.

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
[2]: https://github.com/odoo/odoo/commit/3528f2c3f9d3b30266f3421672986d202c724a76

task-3514519

closes odoo/odoo#136951

X-original-commit: af5ddabb0285daa9e57bc01cf21628f2f94bc18f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-29 09:21:54 +00:00
Krzysztof Magusiak 569fdb3028 [FIX] sale_project: filter on tasks linked to the sale
In the case where we have multiple projects, we also want to filter on
tasks linked to the SO. In the current implmementation, the default sale
order passed in the context is used to filter by name which results in
including tasks where name of the SO contains the name of the SO instead
of being equal.

opw-3499181

closes odoo/odoo#136895

X-original-commit: f24dc0b681db398755dcd5656c707273d3d72ef4
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
2023-09-29 09:21:53 +00:00
Rodolpho Lima 82ba5791f0 [IMP] web_editor: unify behaviour for http protocol
LinkTools creates http links by default, while OdooEditor creates https
links by default on paste and auto link transformation with SPACE.

This commit standardizes the result of both mechanisms, adopting "http"
as the default protocol.

task-3516854

closes odoo/odoo#136487

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-29 09:21:52 +00:00
Rodolpho Lima 69a27360c9 [IMP] web_editor: omit protocol in URL input field
Before this commit, when an existing link was edited with the LinkTools
or LinkDialog, the URL input field omitted the "mailto:" part of the URL
for email links, but displayed the protocol/scheme for http(s) links and
phone numbers (tel: or tel://).

This commit standardizes the behaviour of the referred input field such
that the protocol/scheme for http(s), mailto and tel URLs are omitted,
in order to have a cleaner UI.

task-3516854

Part-of: odoo/odoo#136487
2023-09-29 09:21:52 +00:00
Rodolpho Lima 6d4a3b3ab5 [IMP] web_editor: deduce phone URL in Link(Tools/Dialog)
When creating or editing a link via the LinkTools or LinkDialog, http
and email URLs can be deduced from incomplete user inputted URL (that
is, URLs not containing the http(s):// or mailto: protocol).

This commit extends such URL deduction to telephone numbers, allowing
the user to create a tel:// link without the need to explicitly write
"tel:" or "tel://".

Obs: "tel//:" protocol is preferred over "tel:" for the reasons stated
in [this] commit.

[this]: https://github.com/odoo/odoo/commit/56ce29e71f75a657d4b518d86c1d7084891e898e

task-3516854

Part-of: odoo/odoo#136487
2023-09-29 09:21:52 +00:00
FrancoisGe 058e9a92d2 [REF] auth_*: convert PasswordMeter to Public Component
Addons: auth_password_policy_portal, auth_password_policy_signup

The purpose of this commit is to convert PasswordMeter into a Public Component
so that the legacy Widget is no longer used.

Part of task 3439226

closes odoo/odoo#136159

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-09-29 09:21:51 +00:00
Samuel Degueldre be4f674ff9 [IMP] web: public component service
This commit introduces the publicComponentService, which makes it easy
to mount OWL components in the front end. All public components will share
the same env and therefore the same services.

To define an OWL Component in a public template, first create an owl component
and add it to the "public_components" registry in javascript, then use
<owl-component name="key"> in the template, where key is the key you used when
registering your component. If you want to pass props to your component, you can
give it a props attribute in the template, containing the props as JSON.

Example:

My Public Component:

```js
class MyPublicComponent extends Component {...}
registry.category("public_components").add("my_public_component", MyPublicComponent);
```

My Public Template:

```xml
<templates>
    ...
     <owl-component
        name="my_public_component"
        props='{"title": "My First Public Component"}'/>
    ...
</templates>

```

Part-of: odoo/odoo#136159
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2023-09-29 09:21:51 +00:00
kais-odoo 356ddcb0da [FIX] project: fixes newly created partner isn't displayed as set
Before this commit, when creating a new partner using the quick create option,
 partner is not set because an email address is required to send a shared link.

In this commit, hide the quick create option so that user can add email,
if user wants to share link.

task-3460164

closes odoo/odoo#131995

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 09:21:48 +00:00
kais-odoo 78e94807d3 [FIX] project: fixes recursion on options state selection
Before this commit, get traceback on deleting project task record cause
it is getting stuck in recursion.

In this commit, fixes traceback issue by no calling get option itself.

task-3460164

Part-of: odoo/odoo#131995
2023-09-29 09:21:48 +00:00
ravb-odoo 64524dfb20 [IMP] sale_project: add icon on company dependent fields
This commit improves the visual indication of company dependent fields.
add icon of 'fa fa-building' on side of fields label.

task-3186717

closes odoo/odoo#130163

Related: odoo/enterprise#44830
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 09:21:46 +00:00
roen-odoo 841d013dee [FIX] point_of_sale: use customer language for invoice product
Current behavior:
When creating an invoice from a POS order, the invoice product is not
written in the customers language.

Steps to reproduce:
- Create a customer that uses French as language
- Make sure the user is using English as language
- Create a POS order for the customer
- Invoice the order and look for the product name
- The product name is in English but it should be in French

opw-3283743

closes odoo/odoo#137027

X-original-commit: 1081f7ff670f30e7d69b5e07fb1eb5b2619e3eaa
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-29 08:07:05 +00:00
Abdelouahab (abla) f69f3623d9 [FIX] sms: use partners on record to send sms
To reproduce
============
- create sms template and apply it to a module different than `res.partner`
for example Tasks
- add context action
- create a task and select a customer that has a phone number
- from action try to send the sms, an error is displayed

Problem
=======
when computing the receipient info, the partner on the record is not taken
into account.

opw-3475456

closes odoo/odoo#137014

X-original-commit: 6e6a8c24c3ab1a6b3ff27564f4244ed3d6b4c022
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 08:07:04 +00:00
Mahdi Cheikh Rouhou (macr) efea7e13c5 [FIX] base, test_read_group : process duplicated groupbys without lazy
Issue:
======
When you have duplicate groupbys with `lazy=False` you will get an error.

Steps to reproduce the error:
=============================
- Install timesheet
- Go to timesheet / reporting / By Employee
- Add a groupby by month for one employee
- I will show an error.

Origin of the issue:
====================
The timesheet component will the send a request for read_group having
`['date:month', 'date:month']` so we will have duplicated groupby which
will be processed later in `_read_group_format_result` which update the
value of `row[group]` for each group so the first group will have the
original values which is ok but the second one will have the updated
values by the first iteration which will result in error.

Solution:
=========
We need to check that the value is of class BaseModel to update it , it
means that's the first time encountered.

opw-3497803

closes odoo/odoo#137000

X-original-commit: 91d6dc7ed56f67d41adab90ec0019fbb920d9042
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-09-29 08:07:02 +00:00
Anita (anko) c375b8f534 [IMP] payment(_demo): support express checkout
This will allow users to test the "express checkout" feature in
eCommerce without requiring to setup a real payment provider.

task-3047772

closes odoo/odoo#113644

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-09-29 08:07:00 +00:00
Nicolas Viseur (vin) a1d670ca30 [FIX] l10n_id_efaktur: rounding improvement
The efaktur export has rounding issues due to the fact that
we need to display both the amount_untaxed and amount_tax rounded to 0 decimals
as well as the detail of each line.

As the rounding of the sum will most of the time be different to the sum of rounded
lines, the government website refuse the resulting file.

This fix will try to improve things a bit by:

- Avoiding to round the values while we are still manipulating them.
- Round the values once when the initial computation is done for the lines.

Once all lines have been computed, we will:

- Find the difference, if any, between the rounded amount_untaxed and amount_tax
and the line totals and round that too.
- Update the first line with enough value in the result with that value in order to correct the total
- Finally, round the values for representation to two decimals.

If we cannot correct it in a single line, the correction is split in multiple lines.

Hopefully, these steps will help ensure that the sum of the lines will be equal to the
rounded values of the amount_untaxed and amount_tax and thus be correct.

Task id # 3420220

closes odoo/odoo#136996

X-original-commit: 65e7446ffad5c87ec44f1012e709606b44f3af39
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-09-29 01:02:06 +00:00
Thibault Delavallée 0b5f8a85a1 [FIX] mail: fix alias values given when copying records
Copy calls 'create' on 'self' which means self is not a void recordset. In
mail this causes issues as it may have an impact of values generated for
aliases, which depends on 'self' when calling '_alias_get_creation_values'.

Followup of odoo/odoo#130632

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#136968

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-28 20:16:54 +00:00
Thibault Delavallée 3351e891dc [FIX] mail: fix call to super of '_get_default_bounce_address'
It was calling super of another method. But as the base code (located in
base/ir_mail_server) is the same, the result is actually the same.

Followup of odoo/odoo#130750

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#136968
2023-09-28 20:16:54 +00:00
Julien Van Roy 36ca12e359 [FIX] account: add _run_vat_test in account to avoid base_vat dependency
This way, it can be used without having to add the dependency to
`base_vat`. For instance, in `account_edi_ubl_cii` in
`_import_retrieve_and_fill_partner`.

This commit essentially backports part of commit
212be2920affdab5baf14b3025ef31ee2d6a652b

closes odoo/odoo#136950

X-original-commit: 32e72ef26f033cf7701d7d797738688a339d9b77
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-09-28 18:20:22 +00:00
Valentin Vallaeys (vava) 441cc5f5d8 [IMP] sale_management: add hooks for template product domain and price
task-3076912

closes odoo/odoo#135811

Related: odoo/enterprise#47557
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-28 18:20:19 +00:00
Valentin Vallaeys (vava) 3c236e00c0 [IMP] delivery, sale: use pricelist price in catalog
task-3076912

Part-of: odoo/odoo#135811
2023-09-28 18:20:19 +00:00
Valentin Vallaeys (vava) 24f295b988 [FIX] delivery: fix delivery price in catalog controller
Part-of: odoo/odoo#135811
2023-09-28 18:20:19 +00:00
Mahamadasif Ansari 3389bbafad [REM] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Ref-https://github.com/odoo/odoo/pull/130467

task-3508331

closes odoo/odoo#136920

Related: odoo/enterprise#48065
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-28 16:57:55 +00:00
Julien Van Roy 86a84afc69 [IMP] account_edi_ubl_cii: handle payment terms
Handle payment terms for UBL as described by the Belgian Peppol
Authority and documented by VBO-FEB.

In case of early payment discount (for instance 2% if payment within 7
days):

* add one document level allowance per VAT rate (this allows to reduce
the tax base amount to take the discount into account)

* add one document level charge exempt from VAT (the amount of this
charge is the amount of the discount the customer can get by paying
early)

* Recompute the document level TaxTotal accordingly

Hence, nothing changes for the invoice lines. Importing the xml is then
convenient since each document level AllowanceCharge will create an
invoice line on top of the existing invoice lines. The total amount of
the invoice will be the amount to pay in case of no early payment
discount. To get the total amount to pay in case of early payment
discount, simply remove the document level charge.

References:
https://openpeppol.atlassian.net/wiki/spaces/Belgium/overview
https://efactuur.belgium.be/sites/default/files/3.%20Cash%20discount.docx

opw-3235769
task-3326963

closes odoo/odoo#136635

X-original-commit: 80bb997d7ecab208e6ca9719114cf9ae3c31f505
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-09-28 15:48:27 +00:00
Yannick Tivisse ba3d6356ab [IMP] hr_contract: Add country_code on structure type
closes odoo/odoo#135508

Related: odoo/enterprise#37928
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-28 15:48:23 +00:00
Yannick Tivisse aa4ebe072b [IMP] l10n_au: Add payroll related accounts
Part-of: odoo/odoo#135508
2023-09-28 15:48:22 +00:00
dasz 2ce2b30591 [IMP] hr_employee: Add util method to retrieve employee's age method
Part-of: odoo/odoo#135508
2023-09-28 15:48:22 +00:00
Mayurrajsinh Rathod 9fc8492259 [FIX] website_slides: prevent content title overflow
This commit fixes the overflow of content title on without fullscreen view(Exit-
Fullscreen) of content page by cropping the title and adding  '...' at end.

Task-3384661

closes odoo/odoo#136939

X-original-commit: 09244c59f1681f9222abbbe347b24baacc8483b0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-28 13:21:04 +00:00
Gurupreet Singh 81567bcf6a [FIX] project: set the default color in the project app
Description of the issue/feature this PR addresses:

-In the project module when the calendar view of a task is open click on any
  schedule, and popover is open.
-In popover tags colors are not visible

Current behavior before PR:
In the popover, tag field colors are not visible

Desired behavior after PR is merged:
tags colors are visible when opening the popover

Fix:
  we add options attribute in the many2many_tags widget.

task-3269548

closes odoo/odoo#136910

X-original-commit: 64cbac9b3d4c686368195a44a45566c9278376b4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-28 13:21:02 +00:00
Julien Carion (juca) fadb88b651 [IMP] web, *: display none instead of undefined
This commit changes the default label of the graph view's axis to None
instead of undefined.

task-3519566

closes odoo/odoo#136822

Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
2023-09-28 13:21:01 +00:00
snd 08015c2a15 [IMP] stock: move multiple quants at once
Add a new button Relocate on the stock.quant views.
This button appears when selecting 1+ quants and allows to create a stock.move to another location.
This button also allows to change the package of the quant(s) selected.

LIMITS:
- if a quant has reserved quantities, it will unreserved along with the related smls
- if a package is not fully moved to a new location, the quants selected will be unpacked
- no intercompany moves are allowed
- only available for stock manager roles

Addendum: there are 2 functions with almost identical names:
- action_set_inventory_quantity_to_zero
- action_set_inventory_quantity_zero

renaming action_set_inventory_quantity_to_zero to action_clear_inventory_quantity to make them easier to differentiate

task 3346212

closes odoo/odoo#124501

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-28 13:20:58 +00:00
MerlinGuillaume 1189863b45 [FIX] crm: responsive prorated mrr in forecast kanban view
The prorated MRR displayed in the kanban header of CRM's forecast resets
to 0 when moving leads from one column to another

Steps to reproduce:
1. Install CRM
2. Go to Settings > CRM and enable Recurring Revenues
3. Go to CRM > Reporting > Forecast
4. Open a lead in the first column and set a recurring revenue and a
   recurring plan (after the "+" in the expected revenue)
5. Go back to Forecast, a value is displayed after the "+" next to the
   progress bar of the first column
6. Change the column of the edited lead, the prorated MRR of all columns
   change to 0

Solution:
ForecastKanbanController should extend crmKanbanView.controller

Problem:
The ForecastKanbanController extended the generic KanbanController so it
didn't inherit from the crmKanbanView.Controller override of the getter
`progressBarAggregateFields` that adds the prorated MRR to the fields
used in the progress bar

opw-3463826

closes odoo/odoo#136929

X-original-commit: bab34140725a014995d9374ec0994399776ce4aa
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-28 11:56:54 +00:00
Louis Baudoux e6719cd124 [IMP] iap: disable new IAP accounts on neutralized database
On a neutralized database, all the IAP accounts should be disabled,
including new ones.

closes odoo/odoo#136872

X-original-commit: c7a1d53f286c2f0e928922e9c59dbb804adc06bf
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-09-28 11:56:53 +00:00
Guillaume (gdi) 5297388cd2 [FIX] website: prevent traceback on sharer click
Some pages don't have an image for the sharer. This wasn't too critical,
as the code to retrieve the image was written in JQuery and didn't cause
any problems if no image existed.
```
$('meta[property="og:image"]').attr('content')
```
If there is no element matching the selector, it returns `undefined`.
[This commit] was merged and migrated the JQuery code to vanilla JS.
```
document.querySelector('meta[property="og:image"]').content
```
If there is no matching element, it throws an error (we can't read the
content on undefined).

This commit keeps the vanilla JS code but prevents the error if there is
no image to share. In addition, for this master commit, we took the
opportunity to refactor the code.

Steps to reproduce the bug as an admin:
- Go to /slides and click on "View" next to the user's name
- Edit the page
- Drop the share block on the page
- Save the page
- Click on the Pinterest share button

=> An error appears on the screen.

[This commit]: https://github.com/odoo/odoo/commit/ddb2c06be4196c86ff6a2fd74874487d75b31c94

opw-3326724

closes odoo/odoo#136737

X-original-commit: 66651fabcc36e8d5f455c08d5bffb9036bef8d3c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-28 11:56:52 +00:00
mano-odoo 5e1dc71680 [FIX] web_editor: fix the design of active shape in selection menu
The border radius on an active shape in its menu was making a weird
gap between the element and its border. This commit fixes this gap by
using an outline on the active state.

task-3503975

closes odoo/odoo#136871

X-original-commit: 0c4816e1b4996b6e3048b3061c6e2cff06eeb499
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-28 10:22:09 +00:00
mano-odooandbvr-odoo 838564e0ac [FIX] web_editor: fix colorpicker margin and dropdown UI
The negative margin used for the colorpicker was creating a weird
spacing when we use the oval shape image or if we have a button group
without the colorpicker. This commit adapts the margin on the element
itself by overriding it with an !important instead of relying on a
negative margin.

The dropdown caret from the colorpicker dropdown was misaligned, it
happened because the default CSS rule for we-select had priority due
to more specific selector. This is fixed by making the selector more
relevant to take priority over the default rule.

task-3503975

X-original-commit: 2f81c6ae68751d5f93c30aef822730ee04ead391
Part-of: odoo/odoo#136871
Co-authored-by: bvr-odoo <bvr@odoo.com>
2023-09-28 10:22:08 +00:00
oco-odoo 521176c2b8 [FIX] account: use column group options to audit carryover lines
In enterprise, when doing a comparison between multiple periods with values carried over to them, auditing the carryover values (through the dedicated button in the popup, in debug mode) always opened the latest period.

This was due to the fact the main options of the report were directly used, instead of the ones corresponding to the column group owning the value.

closes odoo/odoo#136868

X-original-commit: e80680e47218f2109c0ba599d4a1f41651f65c62
Related: odoo/enterprise#48030
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-28 10:22:07 +00:00
Lopes Marc (loma) 2e5175919c [IMP] website_profile,*: specify reason for profile access denial
*: website_forum, website_slides

Purpose
=======

Website profiles of users like Mitchell Admin, which are set as "public",
are also rendered as "Private". In Fact, users can be denied access to
the public profile of other users for different reasons. In such
situations, users should get a more accurate feedback on the reason of
the access denial.

Specifications
==============

On profile access denial, give users a more accurate reason:

- "This profile is private!" when the profile is indeed private
or the karma of the user profile is equal to 0.

-"Not have enough karma to view other users' profile." when the profile
is public but the requesting user has insufficient karma rights.

Also:
- Redirect to the 404 page users trying to access a non-existing
profile.

Note: the minimum level of karma required to access a public profile is
now editable. See odoo/odoo#123411

Task-3360050

closes odoo/odoo#128686

Related: odoo/upgrade#4955
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-28 10:22:05 +00:00
Paweł Fertyk c31c6f5de5 [IMP] stock: append "copy" to duplicated resources
Also, "Short Name" for duplicated warehouses was set to "COPY", because
of the 5 char limit which doesn't allow appending " (copy)" to the
original value.

closes odoo/odoo#122511

Task: 3290154
Related: odoo/upgrade#5138
Related: odoo/enterprise#42541
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-28 10:22:03 +00:00
Paweł Fertyk 26922c8d1d [IMP] purchase: add vendor search to products
Task: 3290154
Part-of: odoo/odoo#122511
2023-09-28 10:22:03 +00:00