Commit Graph
169052 Commits
Author SHA1 Message Date
Raja Prasad fbfeeba29f [FIX] project: fix space between progress bar and date
Steps to reproduce:
- open project updates of any project by clicking three dots
- add some update of project
- switch to mobile view

Issues:
- in kanban cards of project update, no spaces between progress bar and date

Solution:
- add some space between progress bar and date to  have  better experience

Task:3633405

closes odoo/odoo#145774

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-25 11:50:06 +00:00
Adrien Widart (awt) 294a37b0a3 [ADD] stock_landed_costs_company: create LC from branch
If the user selects a branch and deactivates the parent company, he
will not be able to create any LC.

Explanations: Since the company field is a related one that targets
the company of the journal, and since the journal belongs to the parent
company, the LC created in the branch actually belongs to the parent
company, which triggers an access error.

Asking users to create branch-specific journals would just cancel
all the benefits of the company branch feature.

OPW-3651022

closes odoo/odoo#150972

X-original-commit: 915b2e2b8401db937db4162e32e84cf968728072
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2024-01-25 09:46:50 +00:00
Laurent Smet 8a443222a1 [FIX] account: Fix indian taxes computation.
For the indian case, when facing two percent price-included taxes having the same percentage,
both need to produce the same tax amounts.

task_id: 3410529

closes odoo/odoo#150971

X-original-commit: 235347db954495b8c0a1bf3bfd0cd408aec7ef0f
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-01-25 09:46:49 +00:00
Walid d7fc350ecd [FIX] pos_mrp: subkits cost
Steps to reproduce:
- Create the following subkits boms
F-> SK1 -> A
        -> B
    SK2 -> C
        -> D
- Set all these products to be available in pos and have AVCO automated
valuation with A,B,C and D having a cost of 5$
- Sell F in pos creaing an invoice
- In accounting check the expense account (cost of goods) wrong cost

Bug:
´comp[1]['product']´ referrs to the kit product of the last children boms
(SK1 and SK2 in this case) which would then each be counted twice
instead use ´comp[0].product_id´ (the components of the child boms)

also fixed total_cost computation for pos lines which would filter out
all the subkits moves

opw-3538285

closes odoo/odoo#150937

X-original-commit: d6a513355ee0ae4b02e38baacdde760cc35fb873
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-25 09:46:47 +00:00
suth-odoo a887c470d6 [FIX] project: fixes the default company_id issue in timesheets
Steps to reproduce:
- install timesheets module
- install all related timesheets bridge modules
- open timesheets module
- click on configuration
- click on settings
- under the timeoff, create a new project and click on create and edit

Issue:
- the current company is  not set by default on the newly created record

Cause:
- the project id did not have any default company id attribute

Solution:
- if we gave a default attribute to the project id field then the issue
  will be solved

task-3607053

closes odoo/odoo#150675

X-original-commit: 61a6ad35280dcca0e03dc0ca7ad3923ae1a12027
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-25 09:46:45 +00:00
Joseph Caburnay 03c6912d36 [FIX] pos_sale: runbot error 55596
Do not use demo data in test.

Runbot error: 55596

closes odoo/odoo#150421

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2024-01-25 09:46:44 +00:00
Shubham Thanki 69868536e5 [FIX] event_booth_sale: display the correct event booth count
How to reproduce:

- Create a new quotation.
- Add a product 'Event Booth'.
- Select an Event, and select any available booth category.
- From the available booths, select some of them.
- Click 'Ok' and manually save the quotation.
- Now, edit the same SO line, and select 'Event Booth' again(similar or different).
- Confirm the SO.

Before this commit:
Users can now see the incorrect total event booth count as 'Booths' on the
stat-button.

Issue:
While editing the booths in the configurator, the new selection does not get
updated in the 'event_booth_registration' table.

After this commit:
The records in the 'event_booth_registration' table are updated with the user
selection of event booths. Users can now see the correct event booth count in
the stat-button.

Task-3309218

closes odoo/odoo#150974

X-original-commit: 1b077436fcb09d9a8cbf3d81e9978b696900924e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-25 08:29:13 +00:00
Bastien (bvdn) b45d2c96fe [FIX] web: fix calendar mobile view creation record
issue:
- calendar mobile view (month) > pressing on a day or timeframe to create a task doesn't work
if the view does not have the "day" calendar scale set up

Fix:
- We are removing the condition preventing the renderer to use the createRecord callback when
the view is Mobile and in monthly scale

So now a record will be directly created when a user clicks on a timeframe in monthly view even
if he's in mobile view

Task-3677216

closes odoo/odoo#150624

X-original-commit: da23aa3d68e0f8b833d085c09bcf81d8aa2a4285
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-25 08:29:12 +00:00
lj-oerp 191f243871 [CLA] update OERP members
closes odoo/odoo#150765

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2024-01-25 07:19:07 +00:00
Andrew Gavgavian 6ce294fa52 [FIX] base: swap regen asset bundle to registry cache
Since [1] `model.clear_cache` is no longer recommended.
Most models were changed besides the function responsible
for regenerating asset bundles. This leads to a deprecation warning
when pressing the button in the debug menu in 16.4+

1: #119813
opw-3694331

closes odoo/odoo#150948

X-original-commit: ef0db39416c678a3a3e53ddb97971f87e912f44c
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Andrew Gavgavian (andg) <andg@odoo.com>
2024-01-24 23:07:11 +00:00
Thibault Delavallée e86617fd93 [FIX] mail, sms: respect scheduled_date for notification
When a 'scheduled_date' is given to posting API notifications are delayed.
They are send using a cron running on a schedule model. However SMS are
not respecting this parameter. This is now fixed.

We also use sql.now() instead of datetime.now() when checking notification
delay. This leads to values that are consistent through the transaction
and avoid non deterministic behavior.

This leads to fixing a global mock of "cr.now" that has unexpected side
effects in composer tests. Indeed now that the scheduled notification checks
cursor now instead of datetime now this global mock leads to some notification
not being sent. We now mock cr.now() only for creating records, allowing
to effectively test templates using create_date for dynamic scheduled date
computation.

closes odoo/odoo#150911

Related: odoo/enterprise#55052
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-24 23:07:09 +00:00
Paul Morelle d6d6bee087 [FIX] portal: fix submitting /my/account when can't edit VAT
Since 1be6866b15, when VAT can't be
edited, the country_id select field is disabled.
Disabled fields aren't submitted in the POST query, which causes an
error `Some required fields are empty`, with the Country field being
highlighted even if a value is selected.

With this commit, when the user cannot edit their country, the value is
forced into the POST data so that it is found.

closes odoo/odoo#150909

Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
2024-01-24 23:07:08 +00:00
Lucas Perais e474bd5f4b [FIX] web_editor: factorize open Cropper from toolbar
Before this commit, the cropper tool was opened by a closure that spawned the Cropper
tool aside from the editable document.

This was anoying as the editable document can be in an iframe, hence the Cropper would have
been virtually unusable.

This commit factorizes the code in a method to allow overrides. Which is done in
web_studio:ReportEditorWysiwyg.

opw-3484065

closes odoo/odoo#150904

Related: odoo/enterprise#55049
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2024-01-24 23:07:07 +00:00
Lucas Perais 645216248c [FIX] web_editor: loading an image in an srcdoc iframe
To load images in an iframe, the web_editor code expected the iframe to have an src
attribute and built an URL for the image on the basis of that url.

With the srcdoc attribute, there is no need for an src, making the code crash.

After this commit, if an iframe only has srcdoc, we build images' url on the basis of
the main window.

opw-3484065

Part-of: odoo/odoo#150904
2024-01-24 23:07:07 +00:00
Lucas Perais dd16bacc97 [FIX] web_editor: image processing allows already loaded images.
Before this commit, the image processing code always added a listener on the load event
of an image before opening the Cropper tool.
If the image was already loaded, the promise did not resolve at all.

After this commit, an image can be already loaded without any Promise not to be resolved.

Part-of: odoo/odoo#150904
2024-01-24 23:07:07 +00:00
Lucas Perais ad18375f69 [FIX] stock: fix size of picking operations and placeholder field
Before this commit, the Picking Operation report's texts were small and the layout
was somewhat odd.
This was because of [1]:
- an oe_structure div was added in a bootstrap row that was already filled (all bootstrap cols were used)
This did not play nice in wkhtmltopdf and made the texts size very small.
- a scalar t-field add a default content which was rendered if the field's value was False
(which can happen when the field is unset)

opw-3668900

[1]:567b8d676b3b6dc747df4d9bf10e7a91b4cb61bb

closes odoo/odoo#150905

X-original-commit: 2a511bc5cd105e2e59d797886efa192bb821f6aa
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2024-01-24 21:27:27 +00:00
Harald Panten 4648a1f157 [ADD] l10n_es: new tax IRPF 24 rendimientos del capital
closes odoo/odoo#139978

X-original-commit: 2ecbec6ba52d96ea6c8ac493c1e141f8c5c0ad45
Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-01-24 19:58:40 +00:00
Aurelien van Delft (avd) 6660762511 [FIX] point_of_sale: fix issues with x2many in settings
The change introduced in 72f7c0d7d16a1b avoids recomputes
when there is nothing that needs to be written on a pos.config.

However, starting v17 the way x2many are managed changed and
while the command to assign values on x2many from settings was
[(6, 0, ids)], in v17 it's [[4,id],...,[4,id]]. The set command
was replaced by the link command. This changes the returned value
of the convert_to_cache method and made it impossible to change
pos_config.x2many values in v17 because of the changes in 72f7c0d7d16a1b.

To fix that, move the _keep_new_vals method from res_config_settings
to pos_config and use _preprocess_x2many_vals_from_settings_view
to change link commands to unlink + link commands.

Steps to reproduce:
   - Install point_of_sale
   - Go to Settings > Point of Sale
   - Remove a payment method
   - Save
   - The payment method is still set on the pos.config.

opw-3692150

closes odoo/odoo#150900

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-24 17:49:04 +00:00
Maryam Kia 6cad45d926 [FIX] portal: access avatar with hash and pid
In portal chatter, user could be authenticated with `access_token` or `hash and
pid`. The problem is that `portal_avatar()` only checks the access_token, so if
it doesn't have the access token but the hash and pid, it misses the user's
avatar (PR #141414).
This commit adds these two parameters to `portal_avatar` controller to cover all
 cases of authentication in portal chatter messages.

closes odoo/odoo#150878

X-original-commit: ab932abc3b3fd814b21282dd863fe44bfb177eb8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-24 17:49:03 +00:00
David Monnom (moda) a261bd5bcd [IMP] point_of_sale: improve UX of product configurator popup
- Improved the UX of the product configurator.
- Display of attribute name in orderline name.

Previously, the user had to click on the checkbox or radio to select
the option, clicking on the label didn't work.
The attribute name was not displayed in the orderline name, only the
values.

Now the input has been replaced by a button, making it easier to use
on touch-screen devices.
The attribute name is displayed in the orderline name in the format
`Size: M, Fabric: Leather`.

closes odoo/odoo#147744

Taskids: 3638192 & 3633555
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-24 17:49:01 +00:00
vifo 9beebd4141 [FIX] iot: Generate new password at launch
Generate a new password at launch for security reasons

3696215

closes odoo/odoo#150776

X-original-commit: 5e985abdd2a10f359438b5d4f276778e17559f24
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
2024-01-24 15:56:29 +00:00
Rob Coekaerts 6cda7c2411 [IMP] hr_skills: change wizard title for skills resume wizard
This commit simply changes the title of the skills resume wizard for
clarity.

task-3660000

closes odoo/odoo#146294

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-24 15:56:28 +00:00
Yannick Tivisse 5e1a6e6a72 [FIX] hr_holidays: Improve dashboard loading time
closes odoo/odoo#150857

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-24 14:02:19 +00:00
visp-odoo 0818a8497f [FIX] web_editor: sometimes bullet list is not working properly
Before this commit:

Sometimes applying bulletlist does not produce the expected bullet list
formatting .This issue arises when the selection is on an emptyTextNode(""), and
the traversal of nodes using getTraverseNodes results in the same
emptyTextNode(""). In the toggleList function, we typically remove the
emptyTextNode(""), leaving no appropriate node for creating a bullet list.

After this commit:

Now it will create bullet list because we move the selection to its parent when
it is on an emptyTextNode(""), similar to what we have done with the "BR" element.

task-3547574

closes odoo/odoo#150854

X-original-commit: d5380742b05c64ced7eee92fcf520f208e33819e
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-01-24 14:02:19 +00:00
AaronHForgeFlow 4cbeb0dade [FIX] sale_mrp: BOM selection in anglosaxon price calculation
We give preference to the bom in the stock moves for the sale order lines
If there are changes in BOMs between the stock moves creation and the
invoice validation a wrong price will be taken

closes odoo/odoo#150506

X-original-commit: 855727eccb4ba9a2af72350b6ab9cc40ba7e50d9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-01-24 14:02:17 +00:00
Joseph Caburnay 80fa6d1416 [FIX] point_of_sale: runbot error pricelist
After
https://github.com/odoo/odoo/commit/54a6f1688fb8d15b662848b03cecbe8236292d07,
the `TestConfigureShops.test_should_not_affect_other_pos_config` and
`TestConfigureShops.test_is_header_or_footer_to_false` started to fail randomly
in runbot. This is because when res.config.settings form initializes, it may
start with `pos_config_id` that contains pricelists that are not compatible to
the currency of the pos_config that will be selected in the form.

This commit makes sure that when the `pos_config_id` is changed to something
that doesn't use pricelist, the `pos_available_pricelist_ids` field is updated
accordingly.

Runbot Errors: 31294, 31293

closes odoo/odoo#150454

X-original-commit: f271b0e373b29b7d708c4fab454318776e1bee91
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-24 14:02:15 +00:00
Alexandre Kühn 17a3a84aaa [FIX] mail: fold discuss app category when no conversation selected
Before this commit, when no conversation was selected in the
Discuss app, folding a category such as "Channels" results in
a crash.

This happens because `store.discuss.thread` is `undefined`, so it
must be properly guarded in the template of discuss sidebar category.

closes odoo/odoo#150828

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-24 12:30:09 +00:00
Julien (jula) 25fe8cfbae [FIX] web_editor: fix crash if non-element node in card children
__Current behavior before commit:__
If `child` is not an `Element` (like a Text or a Comment node), the call
to `querySelectorAll` at the following line will crash.

__Description of the fix:__
End the current loop iteration if `child` is not an `Element` to avoid
calling `querySelectorAll` on it.

__Steps to reproduce the issue on runbot:__
In 15.0:
- Open Email Marketing > Mailings > Create > Second template
- Drag and drop a `Comparisons` block
- Display source code
- Write some text under the `<div class="card ...">`
- Save --> Traceback

In 16.0+:
- Open Email Marketing > Mailings > New > `Start From Scratch`
- Drag and drop an `Event` block
- Replace one of the image (a comment node will be added [here][1])
- Save --> Traceback

opw-3682469
opw-3689181

[1]: https://github.com/odoo/odoo/blob/df1b43a6de5ad15a8fee3713de7d8ec926c61f12/addons/web_editor/static/src/js/backend/convert_inline.js#L715

closes odoo/odoo#150752

X-original-commit: 3d1c95d9d143df35320e97abf898f673f4bb1a68
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
2024-01-24 12:30:08 +00:00
Loukas Wets (lowe) 01419ad0b8 [IMP] pos_self_order: kiosk printer
With this commit the kiosk will now print the kitchen tickets.

closes odoo/odoo#149353

Task: 3553947
Related: odoo/enterprise#54288
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-24 12:30:06 +00:00
Walid 541b082d84 [FIX] website_sale_delivery: do not check delivery for only services
Steps to reproduce:
- Setup easypost delivery
- Create a service product and publish it on the website
- Add that product alone to the cart and proceed to payment

Bug:
Error raised because total weight of the order is null

Fix:
no delivery will be created so we should skip the check if no deliverable
product is present on the order
note: on "_get_shop_payment_errors" switched the order to short circuit
"_get_delivery_methods"

opw-3647420

closes odoo/odoo#150735

X-original-commit: 3108339921dd7af65daacf60dc0104713116557b
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-24 10:44:45 +00:00
Dang Van Loc bfbc959d18 [FIX] stock_*: use sudo log activity
Problem:
In some places I think it is necessary to use sudo to avoid permission
errors when creating actions or something else from a other model.

For example, I have a picking created from PO attached to MO. When
receiving inventory in a smaller quantity than actual quantity, will
create activity schedule on MO. But if you don't have the rights, you
will get an error

closes odoo/odoo#150697

X-original-commit: ac1862ddc2dec0269a156d5470b940a7d85cc078
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-01-24 10:44:44 +00:00
Antoine Dupuis (andu) 69d292fa2e [FIX] l10n_ch_hr_payroll_account: Fix employee cost account codes
In https://github.com/odoo/odoo/pull/105119, new accounts were added
to represent employee-related expenses. Based on the non-official
document https://swissdec.ch/document/share/295/4cc46aca-8b47-49e9-882a-03c37eb8dea3
we used account codes 2990 and 2999 for accounts 'Indemnities' and
'Company Car Correction'.

However, these accounts have no place with the equity accounts in 29xx,
since they are not equity but rather expense accounts. Examples of CoAs
that include employee indemnity accounts place them under account group
5 with the other employee-related expenses.

(e.g. https://plancompta.com/plan-comptable-suisse-pcg-2021/)

As such, we move accounts 2990 Indemnities -> 5840
and 2999 Company Car Correction -> 5031.

Fixing this in stable will not cause any in-database corruption, since
the updated code is only executed when the CoA is loaded/reloaded.
However, users will need to reload the CoA in order to take advantage
of the fix.

This also ensures that the Swiss Balance Sheet is balanced.

taskid:3060790

closes odoo/odoo#150692

Related: odoo/enterprise#54941
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-24 10:44:42 +00:00
std-odoo 9792d5d761 [FIX] web: decimal property crash in list view
Bug
===
The decimal property crash when added in a list view, if some records
have False as a value.

Technical
=========
Since fe797a03285ec9c81d29ed631839c91e2b9957a4 , we use the wrong
Formatter in the Float field.

Task-3698415

closes odoo/odoo#150682

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-24 10:44:41 +00:00
Julien Castiaux f003eaf884 [FIX] link_tracker: make relative target URLs absolute
Install mass_mailing with demo data, send a mailing using the "Thank
you for joining us" template. Inside your mail client, click on the
LOGIN button, this open your web browser on a link-tracker URL but the
page fails to load because "The page isn't redirecting properly".

Inside the template of that "Thank you for joining us" mail, the logging
button is basically defined as follow: `<a href="#">LOGIN</a>`, a URL
with a fragment that is empty, a redirection to the current page.

Upon rendering that template and send it to the recipients, all links
are wrapped inside a link-tracker for well tracking purpose, this
created a link `/r/xyz` targeting `#`. Upon accessing that `/r/xyz` URL
the client would be redirected to `#` which in that context is actually
`/r/xyz#`: the link-tracker itself. The browser detects that there is a
redirecting loop and show an error instead.

The problem is solved by saving an absolute link with the link-tracker
instead of a relative one.

Task-3603607

closes odoo/odoo#150678

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-01-24 10:44:40 +00:00
Julien Castiaux 05fd991389 [FIX] link_tracker: prevent links from linking themselves
It was technically possible to register a link that would loop on itself
by abusing the query and fragment parts of the URL. It was possible to
register a link targetting `#` and get the following HTTP exchange which
enter an infinite loop.

	GET /r/bAd HTTP/1.0

	HTTP/1.0 301 Redirect
	Location: #

	GET /r/bAd# HTTP/1.0

Prevent such links from being registered and highlight flaws inside the
`validate_url` method with unittests.

Part-of: odoo/odoo#150678
2024-01-24 10:44:40 +00:00
Benoit Socias caf01f9bb2 [FIX] website: repair registry calls for model-based forms
Since [1] when the legacy registry was replaced for website forms,
model-based forms cannot be created anymore because the legacy registry
getter returned a falsy value upon missing keys, while the new registry
raises an error.
Commit [2] already fixed one of the wrong calls but there were two other
ones.

This commit specifies a default values on the calls to the registry to
avoid the error.

[1]: https://github.com/odoo/odoo/commit/2d9f6fb32441b5db386e35200a5aab6b11b840dd#diff-59b3bc5742547152ea8d3248e1bd6606fbace25e572d7ca6c50c61e5847d184fL3-R3
[2]: https://github.com/odoo/odoo/commit/38155143dc67cee86fef50af8e164f063e5413bb

opw-3677790
opw-3683466

closes odoo/odoo#150659

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-01-24 10:44:39 +00:00
Yannick Tivisse 1cc423954c [FIX] hr_work_entry_contract: Don't recompute work entries on salary simulation
closes odoo/odoo#150648

Related: odoo/enterprise#54928
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-24 10:44:39 +00:00
AH-Yussef ed95da37dc [FIX] base: translate partner display_name
Steps to reproduce:
- Install Contacts app
- Go to General Settings and add another language
- Add a new contact to a parent.
        - Don't add a specific contact name
        - Assign a contact type (delivery address, invoice address, other address)
- Go to the list or kanban view of the contancts and change the language
- The type of the contact listed next to the parent name is not translated from English.

Investigation:
- When the contact name is not set, the `display_name` displayed in both kanban and list views is set by concatinating the parent name with the contact type.
- The line https://github.com/odoo/odoo/blob/03b7e17faef4075dbbb805bca4e7f40f7fbcc988/odoo/addons/base/models/res_partner.py#L345 in the function `_compute_display_name`, `with_context({})` in particular basically enforce to compute the name in english language regardless of the active language. That actually makes sense as the `display_name` field has `store=True` https://github.com/odoo/odoo/blob/03b7e17faef4075dbbb805bca4e7f40f7fbcc988/odoo/addons/base/models/res_partner.py#L199

Solution:
- add a computed field that is not stored that gets recomputed on changing the language.

opw-3569171

closes odoo/odoo#147650

X-original-commit: 60b3ae846de59b1f6e71df68e99e29758ba734fe
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-01-24 10:44:36 +00:00
Chrysanthe (chgo) cdb2612357 [FIX] portal: missing space in messages count
This commit fixes a spacing issue with the count of messages sent in the
portal chatter being placed right next to the word `comment`, without a
space.

fixes #147801
task-3651084

closes odoo/odoo#147496

Related: odoo/enterprise#53383
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
2024-01-24 10:44:35 +00:00
Chrysanthe (chgo) 1c79cbe778 [FIX] portal: fix layout and spacing issues
This commit fixes some layout issues from the portal redesign.

The aims of this commit is to :

1) fix some issues with the column layout, mainly in the quotation section.

2) fix some spacing issues by using the right classes and better units.

3) fix the typescale and the information architecture with the right
heading tag.

4) fix some layout issues within the column layout and fixing unconsistent
layouts shared between different items.

5) fix an issue about the first information of the sidebar often
being hidden when scrolling, due to the sticky position of the sidebar

task-3651084

Part-of: odoo/odoo#147496
2024-01-24 10:44:35 +00:00
Benoit Socias 9bd063cd23 [FIX] web_editor: apply spacing after palette only when on same row
Since [1] a margin is applied when another `o_we_user_value_widget`
follows a color palette. Unfortunately this is also applied when the two
elements are not on the same row. Because of this the "Slideout Effect"
option below the "Colors" option of "Footer" looks like it is indented
while it is unrelated to the color selection.

This commit restricts that margin to elements that belong to the a
`we-row`.

[1]: https://github.com/odoo/odoo/commit/2f81c6ae68751d5f93c30aef822730ee04ead391

task-3696870

closes odoo/odoo#150701

X-original-commit: 50c0a5479a11fef0b03bf319283817a94a32cea4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2024-01-24 09:12:44 +00:00
Florian Charlier 6baf904cc3 [FIX] survey: review survey answers past deadline
Reproduce the bug:

1. Create a survey and share it with someone with a deadline
2. Complete the survey as that someone
3. Change the deadline of the answers to a date in the past
  (simulates reviewing later on)
4. Go to the participation record and try "Print"

Issue: You are denied access to review the answers because
the deadline is in the past.

Fix: Do not check deadline for reviewing/printing answers. This
deadline is only a limit for answering the survey.

Task-3680802

closes odoo/odoo#150793

X-original-commit: 8f4c5c85c9bc194b4fec9698753db4cc84a08a90
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-24 07:55:37 +00:00
Arnold Moyaux 610fbd7060 [FIX] stock_account: valuation category change
This reverts commit 652edc38527b14995f017d514053a57825091813.

It creates a new issue with valuation change.

Steps to reproduce:
-Create a new product with a cost of 10 (std, manual)
-Create an inventory adjustment to set the quantity to -3
-Change the product's category to real-time
-Now the valuation for this product is -30€, but the accounting part has 30€, creating a difference of 60€."

A better solution to fix both issues has been tried but it was far from
optimal. Since it's an edge usecase we will not support it until master

closes odoo/odoo#150112

X-original-commit: a3bae79d8102f528c4947b2231ecabe8cf907bce
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2024-01-24 07:55:35 +00:00
Victor Piryns (pivi) c92bdffd16 [PERF] account: index account_type to speed up reports
Description:
Add missing index to speed up queries related to the P&L reports. As the
report queries per `account_type` it's beneficial to have it indexed.
The field is not write heavy, and has low count of distinct values (
since it's a selection field), so there is little downside of having it.
It is meant to support the changes done in the related enterprise PR.

Reference:
opw-3659497

closes odoo/odoo#150775

X-original-commit: 01ec86ded9128ae9fd11d27285e64d139a0ce31b
Related: odoo/enterprise#54986
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2024-01-24 06:39:17 +00:00
lejeune quentin 013a0f6f65 [FIX] point_of_sale: Fix modules version for iot
When the IoT V23_11 checkout a Odoo DB 15.0, the newest module:

urllib3
PyPDF2
Werkzeug

Can't run this Odoo version.

So we fix the version of these module to match to Odoo 15 / 16 / 17

closes odoo/odoo#150708

Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
2024-01-24 00:16:52 +00:00
Hubert Van De Walle 28a954997f [FIX] spreadsheet_dashboard: prevent crash on chart double click
Steps to reproduce
==================

- Use a mobile viewport / device (small window)
- Go to Dashboard
- Double click on a chart

=> `this.env.openSidePanel is not a function`

Cause of the issue
==================

On mobile, the MobileFigureContainer is used instead of the Spreadsheet component.
The both use `useSubEnv` but the mobile one was missing the
openSidePanel function.

Solution
========

Add an empty `openSidePanel` function that does nothing.

opw-3677552

closes odoo/odoo#150702

X-original-commit: 990452ad985b1515ba565ff1fe8c6bbaa14fb031
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2024-01-24 00:16:51 +00:00
Hubert Van De Walle a76641cb06 [FIX] web: prevent empty json field from passing the required check
Steps to reproduce
==================

- Enable analytic accounting
- Go to customer invoices
- Open a record
- Open studio
- Click on the Invoice lines > Edit list view
- Set the analytic field as required
- Close studio
- Create a new record
- Add a new line
- Click on the analytic field
- Close the popup
- Save the record

=> Even though we didn't set a value for the field, it is saved

Cause of the issue
==================

The actual field value is an empty object.
The validity of a field is checked here [0].
An empty object is considered a truthy value.

When setting the required attribute directly on the python field
declaration, an empty object does not pass the check

Solution
========

Add a specific check for json fields. When the value is either false
(not set) or an empty object, the field is considered invalid.

---

[0]: https://github.com/odoo/odoo/blob/23f01c533512cbfb33e90509e22cd3c3c4f99d40/addons/web/static/src/views/basic_relational_model.js#L284

opw-3659763

closes odoo/odoo#150677

X-original-commit: 51b538b3f678298f27bbbf458de5696706c18349
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2024-01-24 00:16:50 +00:00
Claire Bretton (clbr) a5d169f1a8 [FIX] l10n_ch: fix data migration
In a previous commit we fixed Swiss localization's taxes data.
We changed two children taxes that had wrong tax_type_use since it depends
on their parents.
This could raise the python constraint `_check_children_scope()` which is preventing
some databases to correctly update their taxes.

See https://github.com/odoo/odoo/commit/7b07df873535446f97abc1de9176b9332de5cb07

closes odoo/odoo#150669

X-original-commit: 90e064140b88b77d75686558106f79664da4af48
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2024-01-24 00:16:49 +00:00
Xavier ALT 4c01f803be [FIX] hr_recruitment: "Generate Email" invisible on new link tracker
To reproduce on runbot:

- Log-in as admin
- Enable debug mode
- Go to Settings / General Settings
  and ensure that there is a alias domain configured for the
  current company

- Go to recruitment app
- on "Experienced Developer", open the option dropdown (meatball)
  and click on "Trackers"
- observe there is no button "Generate Email"

The `has_domain` field serve to check if the mail alias domain is
correctly configured, before odoo/odoo@638e0f658, is was computed
only from the `mail.catchall.domain` ICP, now we only consider
the alias domain from the recruitment source alias.

  But for new record there is no alias, so `has_domain` is always
falsy which prevent the `Generate Email` button to be show.

This commit fallback to the job's or user's current company mail alias
domain to check if mail alias is correctly configured when there is no
alias on the recruitment source.

closes odoo/odoo#150645

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-01-24 00:16:47 +00:00
Yosua Nicolaus 4544b4642f [FIX] l10n_ro_edi: CIUS-RO DocumentTypeCode rule
In one of the schematron rules for CIUS-RO, there is a rule for
DocumentTypeCode element in the XML that failed the validity test.

`
<rule context="cac:AdditionalDocumentReference">
  <assert id="UBL-SR-43" flag="fatal" test="((cbc:DocumentTypeCode='130') or
  ((local-name(/*) = 'CreditNote') and (cbc:DocumentTypeCode='50')) or
  (not(cbc:ID/@scheme) and not(cbc:DocumentTypeCode)))">
    [UBL-SR-43]-Scheme identifier shall only be used for invoiced object
    (document type code with value 130)
  </assert>
</rule>
`

This commit fixes the current behavior by applying this behavior:
- DocumentTypeCode won't show up when exporting Invoice XML
- DocumentTypeCode will show up with the value '50' when exporting
  CreditNote XML

closes odoo/odoo#150613

Task-id: 3649426
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-23 22:52:03 +00:00