Commit Graph
159734 Commits
Author SHA1 Message Date
Pierrick Brun fbcd337a95 [REF] point_of_sale: help inherit pricelist items in get_price
This commit makes the pricelist item selection
in the get_price function inheritable

Description of the issue/feature this PR addresses:

Help inherit the pricelist item selection in the pos get_price function

Current behavior before PR:

pricelist item in the pos get_price selection is not easily inheritable

Desired behavior after PR is merged:

pricelist item in the pos get_price selection is easily inheritable

closes odoo/odoo#116614

X-original-commit: d2d690a80e5265e55b52e15cc52d01a96174e6fa
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-28 14:50:51 +02:00
Alexandre Kühn a99aa4a868 [FIX] mail: allow scroll in activity menu
Before this commit, it was not possible to scroll
inside long activity menu.

Dropdown already manage scroll, so the content should not put
overflow management, to the risk of introducing scrollbar twice
or making content non-scrollable.

Task-3249174

closes odoo/odoo#116815

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-28 13:44:06 +02:00
Yolann Sabaux 71ed187223 [FIX] account: display pdf attachment
Steps to reproduce:
- Install l10n_mx modules
- Switch to MX company
- Create invoice and confirm it
- Send it to PAC in test environment (Process Now button)
- Click Send & Print button

Issue:
- XML Preview does not display, only shows the file name in the top right corner of the chatter.

Cause:
In l10n_mx_edi, when posting the invoice, the only attachment available is the xml sent to the government in `_message_set_main_attachment_id`.
Therefore the xml is set as the main attachment.
When clicking on "Send and Print", the pdf is generated but the main attachment is still the xml

Solution:
Redefine the main attachment everytime the the main attachment is an xml

Note:
- octet-stream have also been filtered out

opw-3085934

closes odoo/odoo#116784

X-original-commit: 48e6e81a47f5371f5985d135e56f39f445eb2854
Related: odoo/enterprise#38861
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-28 13:43:57 +02:00
Christophe Simonis b84c846fe4 [FIX] account: handle upgrade of modules
closes odoo/odoo#116762

X-original-commit: 892db541b9474b2fc4ed4da36f1917720a07d1e4
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-03-28 13:43:52 +02:00
roen-odoo 4aaad55e57 [FIX] point_of_sale: keep refunded line when going back to floor plan
Current behavior:
In PoS restaurant, if you refund an order and go back to the floor plan,
before validating the refund, the link between the original order and
the refund is lost.

Steps to reproduce:
- Open PoS restaurant
- Create an order
- Refund the order but do not validate it
- Go back to the floor plan, and go back on the order
- Validate the refund
- Close the session
- Go on the orders, you will see that the refund has no link to the
  original order

opw-3202383

closes odoo/odoo#116748

X-original-commit: 3ea9a8a0b3a9085b35314633e56bb7e508df7008
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-28 13:43:49 +02:00
roen-odoo 32f7be02c0 [FIX] pos_loyalty: correct value for gift card with discount
Current behavior:
When you sell a gift card in the PoS with a discount, the value of the
gift card is not correct. For example, if you sell a gift card of 100€
with a 50% discount the customer should pay 50€ and the gift card should
be worth 100€. But the customer pays 50€ and the gift card is worth 50€.

Steps to reproduce:
- Create a gift card program
- Open a PoS session
- Sell a gift card of 100€ with a 50% discount
- Pay the order
- The value of the giftcard should be 100€ but it is 50€

opw-3221553

closes odoo/odoo#116746

X-original-commit: 1631ab332a6c9c7ca5e1f2451a51fb663534cb8e
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-28 13:43:46 +02:00
Thanh Dodeur 5f82fc4cc6 [IMP] mail: add the "raise hand" feature to calls
This commit adds a button to the `CallActionList` to signal to the
other participants of the call that one is raising a hand.

This will add a hand icon to the `CallParticipantCard` of the people
with a raised hand and send a notification that is displayed in the
`Call` view (only when in discuss, not in chat windows).

task-3229507

closes odoo/odoo#116658

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-28 13:43:40 +02:00
Julien Carion (juca) ec82454839 [FIX] web: Fix boolean fields display issue in settings
This commit resets the width of boolean fields inside right-pane settings
which was set to 50% in most cases for general display purpose.

closes odoo/odoo#116653

Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-03-28 13:43:37 +02:00
Julien Carion (juca) 085d7d484d [REF] base: Remove res.company favicon field
This commit simply removes the res.company favicon field and every
related code because the feature is obsolete

closes odoo/odoo#116367

Related: odoo/upgrade#4469
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-03-28 13:43:28 +02:00
Patrick Hoste 14b7eff7c2 [IMP] survey: move scoring graph data to review answer page
This commit moves the graph data the user got at the end
of the survey to the review answers section.

Task-2991360

closes odoo/odoo#114130

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-28 13:43:20 +02:00
Thomas Lefebvre (thle) 54ffd01b07 [FIX] website_sale, website_sale_product_configurator: move test
Move the test because the field `optional_product_ids` is defined
in the module "product_configurator".

Therefore, if the test is in "website_sale"
and is run without the "product_configurator" module there is an error.

We move the test to the "bridge" module
between "website_sale" and "product_configurator".

opw-3140859

closes odoo/odoo#116742

X-original-commit: 4f4d6c1422b5b258fc5176a0f341b47c0fc1e963
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-03-28 10:30:06 +02:00
Julien Castiaux ca5ca24bc6 [FIX] core: check browser lang is installed
A visitor could visit a web page having a lang in its context that is
not installed in the databased he is connected to. The problem is that
visitors are not logged-in thus it is not possible to determine their
lang via their `res.users` preferences. The lang used instead is the
lang set in the `Accept-Language` header of the incoming request, that
header is set by various browsers in accordance to the user system
preferences or browser settings.

The browser lang (`Request.best`) is only parsed according to the
`babel` database, it is a lang syntactically speaking but not necessary
a lang that is installed in the database.

At the moment the browser lang is set in the context (inside of
`Request._get_dbname_and_session`), it is not possible to verify it is
installed in the database as no connection to any database as been
established yet. Instead the lang is validated inside of
`ir.http._pre_dispatch` which is the method responsible to prepare/fix
various stuff on the request/session/context.

In regard to 93b684d3c7, we prefer to fallback on English, hence the
modification in `get_lang`.

closes odoo/odoo#116683

Reference-to: 93b684d3c7 ([FIX] base: lang should fallback on english instead of arab)
X-original-commit: 743e97667e44cdaab6db334d807cf3d409cea621
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-28 10:30:02 +02:00
amdi-odoo 5d0bdd6969 [FIX] mass_mailing: fix mailing model notes
Rewords and fix the typos in the mailing.mailing model notes.

Task-3240405

closes odoo/odoo#116756

X-original-commit: 156b901292b01e6bb6cd430caade3ae95742782b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-28 09:27:47 +02:00
hupo-odoo 9e075ed7f2 [FIX] account: fiduciary mode sequence checks
When the fiduciary mode is activated, we want to bypass the check of constrains on the date sequence.
Before this commit, fiduciary mode enabled to modify the name of a customer invoice but if the name resembled somewhat a normal sequence number,  there still might be cases where Odoo will try to match a "Journal ID" and a "Year" in a manual sequence number that is provided.

For example, writing 23-31-070 as the new invoice name, Odoo mistakingly interpreted the following:
- 23 is the name of the journal
- 31 is the year
- 070 is the sequence number

closes odoo/odoo#116740

X-original-commit: f1b695d9ec8a551c93197b3aaad1b5504af8fdd6
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-03-28 09:27:44 +02:00
Audric Onockx (auon) 0f40890a53 [MOV] hr_timesheet: update files per model
In previous commit, we just copy/move the files.
In this commit, delete the part of each file
that is not related to its model, and some style.

task-3244966

closes odoo/odoo#116256

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-28 09:27:38 +02:00
Audric Onockx (auon) d01399589f [MOV] hr_timesheet: copy/move files per model
In this commit, we just copy/move the files.
In next commit, delete the part of each file
that is not related to its model.

task-3244966

Part-of: odoo/odoo#116256
2023-03-28 09:27:38 +02:00
Arthur Detroux (ard)andSoukéina Bojabza 7853ca071d [FIX] website: fix editor crashing when clicking on an external link
Commit [1] fixed the editor not being able to start when clicking on a
link that triggers a download. This was caused by the
websiteRootInstance being undefined when a page is about to be
unloaded (beforeunload). Unfortunately, this event can be canceled.

This means that the websiteRootInstance had to be undefined when we are
certain that a navigation is going to happen within the iframe. However,
the condition introduced by [1] does not take into account multiple
factors, which lead to the websiteRootInstance being undefined during
edition.

This commit fixes that and introduces a test to make sure this behaviour
is not easily broken again.

Steps to reproduce:
- In edit mode, on the Home page, go in the footer and click on any link
(except "Contact Us") under "Useful Links" or on the house icon in the
Social Media snippet.
- Change the footer height with the Height option.
=> The option is applied correctly (because the link stays on the same
page).
- Click on "Contact Us" or another Social Media icon.
- Try to change the footer height again.
=> The preview works but when we leave it, we see that the option was
not applied.
- Drop a snippet and click on it.
=> Infinite loading.

[1]: https://github.com/odoo/odoo/commit/e47a9900e4a7842774d33a332b325e1f08c3ca45

opw-3196324
task-3212501

closes odoo/odoo#114366

X-original-commit: 15a17656b42442b40f4476efe8c985a9ba28ff93
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Co-authored-by: Soukéina Bojabza <sobo@odoo.com>
2023-03-28 09:27:35 +02:00
Géry Debongnie 94d7b2a773 [FIX] web: ComponentAdapter: detach it after unmounting
Before this commit, the ComponentAdapter would detach its dom before
calling the on_detach callback. This is not correct (even though it is
usually ok): we want the "unmount" code to be executed while the widget
is in the DOM, not after it has been detached. It is even more
problematic if the sub widget contains itself some owl components, since
this behaviour break Owl assumption that owl components are in the DOM
before being unmounted (so, for example, since owl 2.0.9, references
are null even if component is not in the DOM, even if the component is
still mounted).

The fix is quite simple: simply do the DOM removal after calling the
callback.

closes odoo/odoo#116752

X-original-commit: c56795d8715c9f1c85dec88d1c39e8becb4b1e62
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-28 00:05:49 +02:00
Andrew Gavgavian ee3ff4e36f [FIX] sale_timesheet: use the currency of the project in tests
Currently the profitability test assumes the project is in the USD currency.
However, if the companies default currency is something else, the asserts will fail.
Here we guarantee that the 0.00 amount will always be in the same currency as the
project to allow the tests to pass.

opw-3210514

closes odoo/odoo#116773

X-original-commit: 6ad9d1af8d8add56f2b7752632af55c3e66bd148
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-27 22:58:39 +02:00
Valentin Vallaeys (vava) 78a470173b [FIX] website_sale_picking,loyalty_delivery: stock/delivery fix
loyalty_delivery: the demo data updates the `tracking` field, which is a
stock-dependent field. As this module does not rely on stock anymore,
and since these lines only assign to the default value, the file is
removed.

website_sale_picking: the module dependency to stock has been forgotten
in the split of delivery from stock, and is added back to the manifest.

closes odoo/odoo#116747

X-original-commit: 9da0e43651070de2bf617035329ddc6a250398ff
Related: odoo/enterprise#38847
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-03-27 20:06:54 +02:00
Thomas Lefebvre (thle) eb2d91ec01 [FIX] hr_timesheet_attendance: remove project_id field in rule
Issue:
A user being in the group `group_hr_timesheet_approver`
will have a traceback if he goes to "Timesheets / Reporting / Timesheet/Attendance".

Cause:
The `project_id` field does not exist on the `hr.timesheet.attendance.report` model.

Solution:
It is acceptable for the `group_hr_timesheet_approver` group to have the same
access rights than the `group_timesheet_manager` group.

opw-3221963

closes odoo/odoo#116741

X-original-commit: 9d0bc00eff0f9290b401f648f865fd591ad5fca0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-27 20:06:52 +02:00
althaf shaik 9b2c39df36 [FIX] loyalty: prevent trace back when user deleted ewallet_product_50 record
This error was caught by sentry.

Steps to produce:-

* Install eCommerce,loyalty module.
* Delete 'Top-up eWallet' product from eCommerce/product.
* Then  create a new Gift card & eWallets from eCommerce/Gift card & eWallets.
* At this moment A trace back raise.

Because user deleted the product 'Top-up eWallet'.

Sentry:-3985154178

closes odoo/odoo#116738

X-original-commit: e5ae091a530de45741749e01d25f436af093a8a2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-27 19:13:50 +02:00
Andrew Gavgavian 4771963f7c [FIX] various: change domain on aml for move_id.state queries
`Account.move.line` contains a stored related field called `parent_state` which relates to `move_id.state`. This allows for performance improvements by accessing that instead of `move_id.state`.

However, across odoo and enterprise `account.move.line` is domained against `move_id.state`.

This can produce an unnecessary left join on SQL queries for reports or other queries when instead it could use the stored field directly.

To accomplish this fix, we adjust domains to refer to 'parent_state' instead of `move_id.state`

While this PR will adjust multiple modules to fix this domain, it should improve SQL queries over large tables when a left join is no-longer necessary.

opw-3178866

closes odoo/odoo#116679

X-original-commit: c94d57edc002e499e317d04b2864d22acb5f40fa
Related: odoo/enterprise#38808
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-27 19:13:37 +02:00
niyasraphy fe56e55516 [FIX] account: missing field used in domain traceback
before this commit, on enabling mass editing in payment and journals tree view, using studio throws exception saying field used in domain is missing in the view.

* install studio
* go to payment/journal tree view
* enable mass editing for the view using studio
* traceback is thrown

after this commit, no traceback on enabling mass editing

closes odoo/odoo#116127

X-original-commit: 3a53901aa4fce3080a42f9507de4afa5eb7cf7a4
Related: odoo/enterprise#38520
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-27 19:13:29 +02:00
Alvaro Fuentes 549b3a0d0a [FIX] sale_timesheet: allow install of demo data
The product `sale_timesheet.product_service_deliver_milestones` uses
`milestones` service_type but this is not available always.

Steps to reproduce issue:
1. Install sale_praject (with demo) in a clean DB
2. Unmark "Use milestones" in settings
3. Set invoice policy at delivery in settings
4. Try to install sale_timesheet
Demo data fails to install due to attempt to use milestores as service
type.
```
  File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 2720, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
```

This issue blocks many upgrades.

closes odoo/odoo#116697

X-original-commit: 8ae7bf6c9a3af45353e5ef43d8b72f95c6731e5f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-27 18:12:42 +02:00
Louis (loco) a7363381cb [FIX] web_editor, website: correctly remove the image gallery snippet
Steps to reproduce the bug:
- Add an Image Gallery (IG) snippet on the page.
- Click on "Remove all" to remove all the images of the IG snippet.
- Add 2 new images in the IG.
- Click on the first image of the IG to load its data.
- Click on the trash button to remove the snippet.
- Bug => The snippet is not removed (an image is removed instead).

When a snippet is removed, the `removeSnippet` function is called. The
problem is that the `call_for_each_child_snippet` will never resolve.
Two mechanisms are of interest to understand why: the first one is the
`updateCurrentSnippetEditorOverlay` function. Its goal is to destroy a
snippet each time its target is not in the DOM anymore. The second
mechanism is specific to the IG snippet: when an image of this snippet
is destroyed, the `slideshow` function goes through the remaining
images to update parameters. To do it, the function uses the
`_replaceContent` function that empties the content of the carousel and
then fills it with new data.

When a snippet is removed, a `SnippetEditor` is created for each
element of it. In the case of the IG, a `SnippetEditor` is created for
each image of the the snippet. Because the first image already has a
`SnippetEditor` (because it has been clicked), the callback of
`call_for_each_child_snippet` is called to remove this image from the
IG snippet. The second mechanism explained before will then be called.
Meanwhile, a `SnippetEditor` will be created for the second image.
However, because the `_replaceContent` function emptied the content of
the carousel, the `updateCurrentSnippetEditorOverlay` function will
destroy the `SnippetEditor` of the second image as its target is not
considered present in the DOM anymore. Unfortunately, the
`call_for_each_child_snippet` still needed this `SnippetEditor` and
will never entirely resolve.

To solve this problem, the `removeSnippet` function is executed inside
a mutex. Because the mutex is also used by
`updateCurrentSnippetEditorOverlay`, we are sure that this function
will not destroy the snippetEditor while the `removeSnippet` is still
running.

task-3147271

closes odoo/odoo#116352

X-original-commit: 1c99ab2bc04f65999098f70d062d24ed1ac4a9c3
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: loco-odoo <loco@odoo.com>
2023-03-27 16:05:05 +02:00
Géry Debongnie 3db0ad01a1 [REF] web, *: rework webclient cache invalidation system
The web client has a mechanism to invalidate the action and the view
cache: in the basic model (and the relationalmodel), some code is
looking for updates to some specific models (such as ir.actions) and
trigger a `CLEAR-CACHE` event. This event is then listened by the action
and view services to properly clear the caches.  This mechanism was also
used to reload the page after editing a company, or reloading the
currencies after editing some currency.

With this commit, we modify the orm service to trigger an event after
each rpc. This event can then be used by the action/view service, and
also by the currency/company services to perform their specific cleanup.
This work is one step in the future refactoring of the relational model.

closes odoo/odoo#115655

Related: odoo/enterprise#38814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-27 16:04:58 +02:00
Eteil Djoumatchoua (etdj) 7c71bcdfec [FIX] website_sale: show correct price of product not included in a pricelist discount
Steps to reproduce:
1) website config: show strikethrough price (price comparison), show tax included price, discounts, pricelists(with advanced price rules).
2) create a pricelist with "show price and discount to customer", and any rule like 50% off any category (doesn't really matter).
3) apply the pricelist to the website

Issue:
Notice that some strikethrough price is applied wrongly - the crossed amount is the same as the written amount

Cause:
Strike is applied if base price not equal to price_reduce, which is actually calculated using taxes prior.
it should not be the case for the tax-included product ( or base price should also have tax applied).

opw-3140616

closes odoo/odoo#116668

X-original-commit: 58108a84946817175a07c5e8f09f7a5ba88266ee
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-27 13:48:12 +02:00
Joseph Caburnay 3ec3bebcbf [FIX] point_of_sale: properly filter the orders to load
filtered method doesn't mutate the recordset, thus, we should reassign to
have the new set of desired records.

closes odoo/odoo#116667

X-original-commit: 7cca8011e0f97a2db00c769b8f629506eca6cbdd
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-03-27 13:48:09 +02:00
Laurent Smet 35e333822d [FIX] account: Fix is_refund for manual reconciliation widget
Create an misc journal entry with 1000 as debit and a tax.
The tax line is linked to a refund tax repartition line.

Open the manual reconciliation widget and do the same.
The tax line is linked to an invoice tax repartition line.

When dealing with tax grids, the resulting tags set on the journal items are not the same.
This is because the given price_unit is not following the sign of the debit/credit column.
Indeed, a positive amount means you are adding something on the credit column.

opw-3236208

closes odoo/odoo#116433

X-original-commit: a70f804d7da68d5cc7cdd79b75d73359c41b9367
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-03-27 13:48:07 +02:00
Antoine Guenet c3085b0011 [REF] web_editor: remove clearEmpty
This removes the `clearEmpty` util which was only used in the `enter`
command.

closes odoo/odoo#114178

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-27 13:48:04 +02:00
Antoine Guenet cd114a225c [REF] web_editor: refactor getDeepestPosition
This commit refactors the `getDeepestPosition` function to make it more
concise and easier to maintain and understand.

Part-of: odoo/odoo#114178
2023-03-27 13:48:04 +02:00
Antoine Guenet f7bfc21db9 [REF] web_editor: remove confusing parameter in isVisible
This removes a parameter in `isVisible` that made it consider (wrongly)
all blocks as visible. This made it confusing to use because it was
effectively returning fake news by default.

Part-of: odoo/odoo#114178
2023-03-27 13:48:03 +02:00
Antoine Guenet 989e9165af [REF] web_editor: rename isVisibleEmpty
This commit renames `isVisibleEmpty` to `isSelfClosingElement` to better
reflect what it does.

Part-of: odoo/odoo#114178
2023-03-27 13:48:03 +02:00
Antoine Guenet c109c8ac1d [REF] web_editor: clarify whitespace handling
This refactors the management of whitespace and visibility for clarity
since several concepts were mixed up together.

Part-of: odoo/odoo#114178
2023-03-27 13:48:03 +02:00
Thomas Lefebvre (thle) 0b395e828b [FIX] hr_recruitment: avoid creating two contacts
Steps to reproduce:
- create a new job application;
- click on the 'CREATE EMPLOYEE' button;
- save.

Issue:
Two contacts have been created.

Cause:
When creating an employee from a applicant, if the applicant does not have a linked contact, one is created.
Then, when validating the creation of the employee, we will create a contact if he does not have a contact linked to him in the `work_contact_id` field.
Therefore, two contacts will be created.

Solution:
Different information will be put in the context when we are redirected to the form view for the creation of an employee and in particular `default_applicant_id`.
If a current applicant is detected when creating an employee, we are certain that a contact already exists (because it was created previously).
In this case, the contact linked to the applicant is added to the employee's `work_contact_id` field to avoid the creation of another contact afterwards.

opw-3208808

closes odoo/odoo#116663

X-original-commit: 84507e03e47d49ee32ca4693bba8dcc22b772b1a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-27 12:47:28 +02:00
lihaotong100 5bc4e51ce7 [CLA] signature for lihaotong100
closes odoo/odoo#116661

X-original-commit: 0345e74a0c76b9824cc36856aadbd3eeb124e558
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-27 12:47:25 +02:00
Thanh Dodeur 49ff78711e [FIX] mail: prevents crash in some channelMember inserts
Before this commit, we were trying to access
`channelMember.thread.channelMembers` when inserting a member, but
some inserts come without this key.

A traceback could occur when inserts of `rtcSession` records came
with a `channelMember` with little information on their thread.

closes odoo/odoo#116656

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-27 12:47:23 +02:00
Loan (LSE) a6a7cd83f9 [FIX] hw_drivers: HTTPS certificate info on IoT homepage
HTTPS certificate IoT issues can be complicated to troubleshoot
as the information are not visible/given.
This PR aim to share this information on the IoT box homepage.
As there is a lot of possible causes for a given problem,
a code is used that will be explained/detailed in Odoo's
IoT documentation:
https://github.com/odoo/documentation/pull/3818

OPW-3227004

closes odoo/odoo#116650

X-original-commit: 8bc6b2d0033676507f95b74b3ae383ab17164203
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
2023-03-27 12:47:20 +02:00
Karl Southern 5d40181178 [FIX] purchase_stock: does not use company currency when writing the price_unit
When editing a purchase order line which is not in the company currency
the price_unit on the stock.move is overwritten with the price_unit in
the currency of the purchase order.

Secondary issue this causes is that if any further quantity changes
occur on a purchase.order, any new stock.moves may not be merged. If the
quantity is reduced this results in a negative stock.move quantity which
Odoo helpfully inverses the location and destination locations.

closes odoo/odoo#116620

X-original-commit: e7dfe10c81e69e3eb82b209db25483f29eb557e6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-27 11:43:09 +02:00
Mylyna Hy c2762d6229 [FIX] website_sale: fix price for product carousel
Problem:
The prices for products shown on the dynamic content: products on the website
can be displayed incorrectly.
Example:
Consider Product AB that is shared between Company A and Company B.
Company A sets Tax A for Product AB.
Company B sets Tax B for Product AB.
Product AB is published on Website A that belongs to Company A.
However, the price shown for Product AB on the dynamic content: products
is incorrect because the price includes taxes from both Company A & B.

Solution:
Filter the tax records based on the current context's allowed_company_ids.
The price for the product should only include taxes based on the website's company.

opw-3201283

closes odoo/odoo#115114

X-original-commit: 7046dd7c3095686c7cb33f441532e4234e8bdf1b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-27 11:43:03 +02:00
Claire Bretton (clbr) eab47ccc5d [FIX] account,point_of_sale,l10n_{ch,id}: fix fiscal country compute and related tests
The fiscal country was changed each time the user modified his
company's country. This caused problems (in particular at onboarding)
because it was not done transparently for the user and possibly
overrided his setup.

After this commit, the fiscal country will behave like this:
- When we install Invoicing/Accounting, it is set by default to company's country
- When we install CoA, it is set to the CoA's country, if there is one (override above setting)
- It is **no longer automatically changed** when the company's country changes.

Fixes related tests that depended on the previous way of compute fiscal country.

closes odoo/odoo#116322

Task: 3221792
X-original-commit: ac1f2a5774a2f8d03003b481829f6e183ab0b713
Related: odoo/enterprise#38623
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2023-03-27 10:40:22 +02:00
FrancoisGe 0ada8e8edb [FIX] hr_attendance: empty lines at the beginning of an xml file
Having one or more blank lines at the beginning of an xml file can
cause problems when parsing the xml.

closes odoo/odoo#116624

X-original-commit: aa400dbec834e7229f0f8d22298db995a490379b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-27 09:40:01 +02:00
gawa-odoo ab1ccfada5 [FIX] sale: distribution with same account in account and distrib
- Activate analytic accounting
- Create a Sale Order, with an analytic account for the whole order
- Add a line with a distribution containing the same account (100%)
- Create Invoice From this Order

=> The distribution on the account for the invoice is of 100% and
not 200% (the sum of the order's account and distribution).

The problem is that on the dict that we're returning, the key is a string

closes odoo/odoo#116617

X-original-commit: 9ecf263d4124b186b55e50ab025acb7541043d3a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-03-27 09:39:58 +02:00
niyasraphy 5a5ada1dc8 [FIX] website_forum: fix typo
Insteadeither is added without space, adding spacing between the words.

Insteadeither  --> Instead either

closes odoo/odoo#116493

X-original-commit: 4e59006e2a5a3812cc72dd622b2fcec1468ec0d2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-27 09:39:56 +02:00
Archana Vaghasiya 13554dd655 [FIX] mail: invalidate the cache of the documents
If applied, this commit will solve the keyError for _invalidate_documents.

Before this commit:
============================================
KeyError 'rating' or 'False' occurs when a user tries to send a message and
 _invalidate_documents() takes the parameter model equal to 'rating' or 'False'.
but the model 'rating' is not available in the database and It will be accessed
by the self.pool[model].

After this commit:
============================================
Solved the issue when the model 'rating' is not available or the model is 'False'
while sending a message.

sentry - 3956327451

closes odoo/odoo#116302

X-original-commit: 5becbca6531d5829bee262a5c1b64ae5e0917f8e
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-27 09:39:53 +02:00
FrancoisGe 0c9c20d747 [REF] *: fieldsToFetch to relatedFields
Since commit c1cbfb07516d2d06c3311d66e220b1de87c1b681, fieldsToFetch
has been renamed to relatedFields.

Apparently, some commits were merged after this one without using the
new name.

closes odoo/odoo#116623

X-original-commit: dea116bf4c65295e93cc7894132d9f48f98e4189
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-27 08:44:13 +02:00
Thomas Lefebvre (thle) efc0ff463b [FIX] hr_contract: do not close contracts a day early
Steps to reproduce:
Launch a contract which has an end date
scheduled for the next day for an employee
and manually activate the "HR Contract: update state" cron.

Issue:
Running contracts are closed one day in advance.

Solution:
Correct the condition which selects contracts to close.

opw-3217616

closes odoo/odoo#116580

X-original-commit: e08aa67009b191cb99dfb1f7f1d0cb9d6539376a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-03-27 07:28:59 +02:00
Xavier Bol (xbo) dd77374b47 [FIX] web: add missing input type in props
Before this commit, when the user edits a float time field a border
is displayed instead of having the same style then the others fields
(float, integer, etc). The reason is a style is added (`outline: none;`)
on input with `type="text"` but the type is missing on the input tag of
float time field component.

This commit adds a prop `inputType` and by default is `text` the others
fields component and this prop is used to define the type on the input
inside the template of float time component.

Issue found in task-3000757

closes odoo/odoo#116629

X-original-commit: 8ec5f7eb73844daf278b3f2aafa73dd0d65ec59c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-26 00:08:59 +01:00
Audric Onockx (auon) 4b3a8b4f7a [FIX] project_sms: send sms, but for real
`/project_sms:ProjectTask._send_sms` called `_message_sms_with_template`
without numbers, and so no sms was sent.
Now, we give the method an `sms_numbers` arg, and it works.

closes odoo/odoo#116514

X-original-commit: 5de1b941ce580253a21f0e4f6da0a8ca818f26b3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-25 18:58:00 +01:00