Commit Graph
165643 Commits
Author SHA1 Message Date
Thibault Delavallée a8b08b8e92 [FIX] base_automation: check server actions model match rule model
New implementation of automated rules does not check if rule model matches
models of its children server actions. This can easily lead to updating
records of another model which have nothing in common with the automation
rule.

Also better write the reset when changing model.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Xavier Morel a92e88d547 [IMP] base: make tests less sensitive to babel / CLDR updates
Babel's named / implicit formats (short, medium, long, ...) come from
the CLDR, which can get tuned as debates get settled, cultures shift,
etc... as a result using these formats can break tests on any babel or
even CLDR release (technically nothing stops distros from updating
their bundled babel with new CLDR data).

b77eb98bbf6bc937efb7941802c0794ae3622094 previously did some
mitigation of this issue, but even if they're not yet in distros
further Babel updates (e.g. 2.12) already affect some of the patterns
we're using.

Proactively mitigate this issue more by only using explicit datetime
patterns (and time patterns, date is fine because it retrieves the
pattern from the lang rather than default to babel patterns) in the
date/time formatting tests. This means only specific terms still vary,
and those should be a lot more stable / reliable than e.g. futzing
with separators and minor formatting issues.

closes odoo/odoo#137181

X-original-commit: 3547e980428cc1dd11c8e82446e7d7f824b9f6f8
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-02 05:56:06 +00:00
Chrysanthe (chgo) c91c221c4c [FIX] web: reintroduce CSS variables for navbar entries
This commit aims to reintroduce CSS variables to handle the different
states of our navbar entries.

Recently, the way we handle the navbar entries changed. Previously, we
used to set CSS variables in Community, which would allow us to control
the color of ours nav entries at every state.

On the Enteprise side, this would allow us to use the different colors we
use for these buttons and style them differently

This approach was also very helpful because we could override these CSS
variables once again to handle the colors of the Studio navbar elements.

Recently, the approach used to control these elements changed :

- On Community, we make use of CSS variables ;
- On Enterprise, we use the Bootstrap `btn-light` class.

Using `btn-light` was a very good approach to ensure that no issues would
appears on our buttons and also to reduce the amount of code needed, but
unfortunately, using `btn-light` directly affects Studio, causing contrast
issues. It was also a bit weird to have CSS variables + Bootstrap classes
being set at the same time.

To fix these issues, we reintroduce CSS variables in Enterprise and Studio,
to fully control the color of our elements and ensure everything is
readable. Most of these variables are defined in Community, inside the
`navbar.scss` file, and we simply override them in Enterprise and Studio.

task-3418936
part of task-3326263

closes odoo/odoo#137140

X-original-commit: af6d914c379953d2deec9833579399f126076194
Related: odoo/enterprise#48174
Signed-off-by: Stefano Rigano (sri) <sri@odoo.com>
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
2023-10-02 05:56:04 +00:00
Walid f55824ce17 [FIX] delivery: long trackingRef form view
Steps to reproduce:
- Create a transfer with a delivery method.
- Add a lot of characters in the tracking reference field.

Bug:
after saving the field overflows in the view

opw-3370813

closes odoo/odoo#137176

X-original-commit: 707ae95d32836296e57540cdbdf78a2b3a7c7117
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-29 20:48:45 +00:00
Gurupreet Singh a3c4cb6ba2 [FIX] project: fix project tour
When we run the project tour manually, even if we select the assignee, the tour
does not move to the next step, so we have clicked the input button manually.

task-3302315

closes odoo/odoo#137152

X-original-commit: 99f13f2e2c9d30f829c3eba3d16d23ae203d0754
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 18:16:14 +00:00
tsm-odoo df57ab6221 [IMP] im_livechat: restrict operator assignation during call
This PR changes the operator allocation algorithm so that operators
in a call with already two ongoing chats are not prioritized over
more occupied operators that are not in a call.

part of task-2900771

closes odoo/odoo#135113

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-29 17:15:39 +00:00
Pedram (PEBR) 020f5061d1 [FIX] point_of_sale: Prevent adding archived products by barcode
When limited product loading is enabled, archived products can still be
added to orders by scanning their barcode, because
`get_pos_ui_product_product_by_params` loads archived products to
prevent errors when refunding orders.

This allows adding archived products via barcode even though they are not
visible in the POS interface.

To prevent this, we exclude archived products from the product_by_barcode
when adding products to it. This ensures archived products cannot be
added by barcode when limited product loading is enabled.

opw-3502136

closes odoo/odoo#137119

X-original-commit: 95c3807d541afe0581b636eb8394cd8f79bb770e
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-29 16:08:48 +00:00
David Monnom (moda) cfe0a6f463 [IMP] pos_self_order: add search bar
After the merge of kiosk and mobile self, the search bar had not been
reimplemented.

In this commit, we add it.

closes odoo/odoo#137063

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-29 16:08:47 +00:00
rajh-odoo ed47260648 [FIX] lunch: fix traceback when we product add to cart
Description of the issue:
This commit addresses a traceback error that occurred when adding a product to
the cart with an empty cart. The issue was related to accessing values for
'topping_ids_1', 'topping_ids_2', and 'topping_ids_3' without proper validation

Fix:
In this fix i have added checks to ensure that the values are present before
accessing them this prevents an 'index out of range' error and resolves the
traceback problem, additionally, the code now considers the values in
'topping_1_values', 'topping_2_values', and 'topping_3_values' to determine
 whether to access the values or fall back to default values from the order.

Desired behavior after PR is merged:
traceback will fixed and work properly

task-3511953

closes odoo/odoo#135942

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-29 16:08:46 +00:00
shag-odoo dd5e3b97f0 [IMP] fleet: improve length of model field
Improvement:
Following this commit the length of model field inside form view of vehicle is
expanded.

closes odoo/odoo#133431

Taskid: 3477830
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-29 16:08:44 +00:00
Mayurrajsinh Rathod 68ddd3c3a0 [FIX] website_slides: prevent content title overflow
This commit resolves the issue of content title overflow in both fullscreen
and non-fullscreen views by cropping the title and adding '...' at the end.

Task-3384661

closes odoo/odoo#137112

X-original-commit: 2275279a74757d47b3138587793aef67f6b5e7ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 14:48:22 +00:00
Hugo Carlier (Huca) 5098f4e2f4 [FIX] project_todo: remove filter on project when converting a to-do
Before this commit, the conversion of to-do to task is performed through
a form view on the project.task record. This view let the user pick a
project for the current record. A domain is applied on the project_id
field to only let the user select a project from the current selected
companies. This commit removes that filter to only rely on the ir.rule
of project.project instead.

task-3458909

closes odoo/odoo#137111

X-original-commit: 8adc4e2f08e6e704c314cda21494bb3486a32fd2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 14:48:20 +00:00
Benoit Socias f35de1bd5a [FIX] web_editor: only pre-convert webp images when within image fields
Since [1] when webp support was introduced, pre-converted images
(resizes and jpgs) are automatically created so that the images can be
used in PDF reports.
This only needed to be done for image fields - which can be referenced
in reports.

This commit limits the pre-conversion of images to images that are set
in image fields.

[1]: https://github.com/odoo/odoo/commit/0449fe85cb0e1d639a4e1aeba26e90906f79254d

task-3510621

closes odoo/odoo#137109

X-original-commit: cd0164339e5179177aaaf21b69615a71a8982da8
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-09-29 14:48:18 +00:00
rajh-odoo 9b2ca51df7 [FIX] hr_timesheet: fix project kanban remaining hour field visibility
Description of the issue:
remaining hour field was visible to all users

Desired behavior after PR is merged:
remaining hour will only visible to that user who have timesheet access this
field will invisible if user doesn't have timesheet access

task-3484290

closes odoo/odoo#137082

X-original-commit: e737f0934f8a83cd02a4a79fbf174b95b524a4e7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 14:48:17 +00:00
Maruan Aguerdouh (magm) 30290b592f [FIX] point_of_sale: ticket cashier does not change after order finished
Steps to reproduce:

- Install PoS and activate Multi Employees per Session (Add atleast 2
employees)
- Open a session in the PoS shop and create a new order.
- Follow the steps until the ticket screen of the order.
- Here change the cashier of the PoS, and see the ticket cashier.

We don't want to change the ticket cashier of an order that has already
been done, since then the cashier of the order is not going to match the
cashier of the ticket.

opw-3483405

closes odoo/odoo#137019

X-original-commit: 819dfa288cf13111fd483cafc1a77b8c68ad06ce
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-09-29 14:48:17 +00:00
Rodolpho Lima bfe0c5fedf [FIX] web_editor: use Node from editable's document
Steps to reproduce:
- In website, paste a URL like "odoo.com" as plain text.

The expected result is a transformed link, just like it happens when
pasting is done in an html field (ex: project.task description), but
a simple text node is inserted instead.

The reason for this is that an element created by the iframe document's
`createElement` method has in its prototype chain the iframe context's
global `Node` constructor, which is a distinct constructor object from the
main window's `Node` constructor.

task-3521152

closes odoo/odoo#136597

X-original-commit: 392d78dab632f67721ec2ba8810d5c8053640b86
Related: odoo/enterprise#48136
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-29 14:48:14 +00:00
Rémy Voet (ryv) a9dd388a11 [IMP] *: use private _read_group for efficiency/consistency.
Since https://github.com/odoo/odoo/pull/110737, it is better to use
`_read_group` instead of `read_group` in the backend. In fact, the
public method is less efficient (it computes display_name of relational
groupby, extra order, ...) and more verbose.

This commit replaces these new uses of `read_group` with `_read_group`.

closes odoo/odoo#136381

Related: odoo/enterprise#47826
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 14:48:13 +00:00
Rémy Voet (ryv) afef0b390f [FIX] mail: allow searching on message_partner_ids for portal
Because we now check groups in the domain, some searches raise
`AccessError` when using `message_partner_ids` in the domain for the
portal user:
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L35
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L41
- https://github.com/odoo/odoo/blob/ba1a5509fa49fd846739252d16083dd8cb334b53/addons/website_forum/models/forum_post.py#L831
- https://github.com/odoo/odoo/blob/86b43bcfa6c9a5b6ac1b3ac9ba0c308f1169ea3b/addons/hr_timesheet/models/hr_timesheet.py#L41

Since there are many invalid domains and it is impossible to sudo only
part of the domain, it is easier to override `_flush_search` to allow
`message_partner_ids` in search domain leafs with some restriction.

closes odoo/odoo#135111

Related: odoo/enterprise#47822
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 14:48:09 +00:00
Rémy Voet (ryv) eb0ba7f79b [IMP] core: check field groups for search domain and order
In order to boost the read security of groups on field, we now
check groups of field used in search domain and search order.

Part-of: odoo/odoo#135111
2023-09-29 14:48:09 +00:00
Ali Alfie (alal) 767341d4ec [IMP] account: default taxes for multi-company product creation
Before:
When a new product was created in a multi-company setting, if the company field is empty, the product is available for all companies. The default sale and purchase tax of the company was set on the product. The problem is that only the default taxes of the currently  active company was set on the product, so viewing  the product in other companies showed an empty field for the tax.

Now:
- When creating a new product with the company field empty, the default taxes of the other companies are set on the product as well.
- Tax display_name now shows company name if in a multi-company environment and more than one company is selected to make it easier to know which tax belongs to which company.

task-3375286

closes odoo/odoo#127196

Related: odoo/enterprise#45075
Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-29 14:48:07 +00:00
Patrick Hoste 25cb3ac1c0 [IMP] survey: allow user to navigate freely
This commit allows the user to navigate freely through a
survey with mandatory questions. He will be able to skip
questions and come back to them later. If he still hasn't
answered them at the final submit they will automatically
be displayed with an error message to invite the user to
answer them. The user can navigate through the skipped
questions with a button within the error box.

Task-2605657

closes odoo/odoo#119315

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 14:48:06 +00:00
Xavier Morel e2752a04ff [FIX] safe_eval: 3.11 compatibility
Complement on 1e35315399 (#112450):
alongside the split between forwards and backwards jump we missed that
3.11 has a specialized version of each for the `is None` and `is not
None` cases. A use of that was added in standard in 16.5 (#120446) but
more generally it makes sense that server actions would support
conditional tests against `None`, probably...

closes odoo/odoo#137099

X-original-commit: 3227ae45fb79cd08a102aecb484e4f0a4f2597c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-09-29 13:11:58 +00:00
David (dafr) 1da26ab27d [FIX] stock,product_expiry: Add 'with_expiration' context to _get_available_quantity
This commit fix 3 issues with the reservation with use_expiration_date set on the product:

1) -- Discrepancy of available_quantity --
StockMove._update_reserved_quantity() works along StockMove._get_available_quantity()
If the with_expiration context is added to one and not the other, the available_quantity sent to the 'update' method will not be correct.

2) -- Can't reserve on imperishable quants --
On the Quant, if expiration_date is False, the reservation will not be possible.
Changed the domain from `expiration_date >= date` to `expiration is False or expiration_date >= date`

---

# How to Reproduce
 - Create a product P, tracked by lot, with use_expiration_date = True
 - Set quantity on hand to 10 (without lot)
 - Create a Sale Order for 1 unit of P: Confirm
 - On the Delivery, 'Check Availability' (if not done automatically)
 => The Transfer is marked as Ready (aka: at least 1 unit reserved), but nothing is reserved.
 => If you Unreserve, the product availability is shown as Available, and if your Reserve again, it is shown as 'Not Available'

 OPW-3434996

closes odoo/odoo#137097

X-original-commit: b5463465fa877b9913eb9747869aae00c6b394ca
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
2023-09-29 13:11:56 +00:00
Valentin Vallaeys (vava) a7e65c1c06 [FIX] website_sale: fix test with snippets to add to cart
Fixes build error 22850
Fixes build error 22851

closes odoo/odoo#137091

X-original-commit: f6e74a4d707f1b5e5e6286956d0bf66087045302
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-09-29 13:11:55 +00:00
Jinal Patel 6609a56f8b [FIX] tools: Avoid to delete translation for Structured Model fields
Issue: Translation missing after upgrade when the customer had any
       other language except English and he changed the value instead
       of translation.

In this commit, avoid to delete the translation.

closes odoo/odoo#137087

Opw: 3489453
X-original-commit: b3bfdf676d0daedbd71501d153170f37e97c94d8
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 13:11:54 +00:00
Rodolpho Lima 5f89007b1c [FIX] web_editor: save image as attachment in forms
Before this commit, when the Wysiwyg was used in a html form (like
website_forum), its `savePendingImages` method was not called. This
resulted in keeping pasted or dropped images as base-64 encoded sources
instead of converting them to attachments.

This commit ensures such conversion takes place.

task-3499058

closes odoo/odoo#137073

X-original-commit: 00aad6aa92c8ad476f9f78779b7a24cb5f7af2ff
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
2023-09-29 13:11:53 +00:00
Paolo Gatti (pgi) c27d3281b0 [FIX] l10n_it_edi: register proxy user per company fix
We have switched from a config_parameter (all companies rely on the
same) to account_edi_proxy_client_user.edi_mode which is company based
in `saas-16.3`.

We forgot to add the company to the domain while searching for existing
for test proxy users when changing the field in the res_config_settings.
So if it finds a test user "in any company" it still blocks you.

See: #116059
Task link: https://www.odoo.com/web#id=3525461&model=project.task

task-35225461

closes odoo/odoo#137012

X-original-commit: 63595f4bb1bc069387579f512082f128d1484fe5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-09-29 13:11:52 +00:00
Odoo's Mergebot c59fe65096 [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 through modules that use the mail composer. In the mail composer wizard, 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

closes odoo/odoo#126049

Related: odoo/enterprise#42993
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 13:11:50 +00:00
miad-odoo f608bce9b8 [IMP] mail: prevent saving template when no model
With this commit, we now raise a UserError if a user tries to save a template
with a composer that has no attached model.

Task-2504439

Part-of: odoo/odoo#126049
2023-09-29 13:11:50 +00:00
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