Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] [16.0] sale_product_configurator: disable auto install #80

Draft
wants to merge 123 commits into
base: 16.0
Choose a base branch
from

Conversation

ThomasBinsfeld
Copy link
Member

DO NOT MERGE

irsa-odoo and others added 30 commits December 7, 2023 22:29
Steps to reproduce:
- Open Project
- Go to project for which sale order item is created
- By clicking on three dots, go to Project Updates
- In right side panel, milestone section, there is no space between milestone
  name and the SOL

Issue:
- This lack of spacing between milestone name and SOL makes it difficult for
  users to read and understand milestone information.

Cause:
- The project.update right-side panel was displaying milestone names and SOL
  without a space, causing readability issues for users.

Solution:
- added a space between the milestone name and SOL.

task-3545942

closes odoo#138384

Related: odoo/enterprise#52227
Signed-off-by: Xavier Bol (xbo) <[email protected]>
Steps to reproduce:
-------------------
- on ecommerce, activate "Extra Info" feature;
- go to the extra info form;
- write something for "Your Reference";
- press Enter.

Issue:
------
The Bad Request message is displayed.

Cause:
------
Pressing Enter triggers the form's default submit.
To use the controller of the `/website/form/shop.sale.order` route,
we need to apply the JS logic of the `s_website_form`
widget (the `send` function).

Solution:
---------
Add an event for the `submit` which will prevent
the default behaviour and send the form data.

opw-3591135

closes odoo#145479

X-original-commit: 51cabec
Signed-off-by: Romain Derie (rde) <[email protected]>
Signed-off-by: Thomas Lefebvre (thle) <[email protected]>
If the snippet names are too long (e.g., after being translated), they
overflow and cause a horizontal scrollbar to appear on the snippet menu.

Steps to reproduce the issue:

- Set 'Finnish' as the language for the connected user in Odoo.
- Go to Website edit mode.
- Bug: Some snippet names are too long and overlfow their parent
elements.

This commit fixes this issue by adding the CSS rule 'ellipsis' to
snippet names.

task-3584011

closes odoo#145478

X-original-commit: 0ab6400
Signed-off-by: Romain Derie (rde) <[email protected]>
Signed-off-by: Benjamin Vray (bvr) <[email protected]>
Current behavior:
Firefox customer display was not correctly loading the CSS and the display was not correct.

Steps to reproduce:
- Setup an IoT box with a customer display
- Open the IoT box customer display in Firefox
- Link the customer display to a POS
- Open the POS and add some products to the order
- The customer display is not correctly displayed

opw-3509606

closes odoo#145538

X-original-commit: b2fa692
Signed-off-by: Quentin Lejeune (qle) <[email protected]>
Signed-off-by: Robin Engels (roen) <[email protected]>
Since the update in odoo@d4b366f, the POS loyalty program stopped
printing customer names on receipts for transactions without points won
or spent. Originally, printing a loyalty program also included the
customer's name, which users relied on to print the customer's name
on receipts.

This commit ensures the customer's name is printed on the receipt,
regardless of whether any loyalty points were won or spent.

opw-3620536

closes odoo#144521

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
__Current behavior before commit:__
`_compute_meeting` computes the meetings linked to the children of the
partners in `self`. To do so, it first retrieves all children partners
of `self`, then it loops through all of them to apply the meetings to
the parents.

This way of doing is inefficient because it is useless to iterate over
the children that don't have any meetings. Moreover, in each iteration
we loop again through `all_partners` which makes this function execute
in O(n²).

This can be particularly annoying if a partner is a big company with
100k+ children partners. If this company apperas in the res.partner
kanban view, it will load for several minutes even if no partner has a
meeting.

__Description of the fix:__
Loop only through the partners that have a meetings instead of all
children partners.
Improve the line that retrieves a partner parent from O(n) to O(1).

Improve `test_meeting_count` to test the case where only the child
partner has a meeting but the parent has initially none. This test
improvement is a forward port of [odoo#144575][1].

__Benchmark:__

| len(all_partners) | w/o fix | with fix |
| ----------------- | ------- | -------- |
| 10k               | 10 s    | 800 ms   |
| 150k              | > 3 min | 1.82 s   |

opw-3511371

[1]: odoo#144575

closes odoo#145528

X-original-commit: 347af7f
Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Previously, products loaded from the background included the internal
reference in their displayed name. This behavior was due to the
'display_default_code' context, which prevents the inclusion of
'default_code' in the product name, not being utilized within the
'get_pos_ui_product_product_by_params' function.

opw-3617195

closes odoo#144204

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Prior to this commit, pressing the backspace key to remove an orderline
when no orderline was present resulted in a traceback error.

opw-3622679

closes odoo#144714

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Speedup computation of tax_country_id by first filtering
on record with fiscal_position_id.foreign_vat. Then group records
without foreign_vat by company_id and call __setitem__ on each group.

In the best case (1 company and no record with foreign_vat) this gives
a speedup of 7.37s -> 450ms for 1000 records.
This also speeds up the importing of account_bank_statements.

opw-3576526

closes odoo#144713

X-original-commit: d507a86
Signed-off-by: Florian Gilbert (flg) <[email protected]>
The issue:
the default currency for Montenegro is LYD (Libyan Dinar) instead of EUR

The fix:
Set it to EUR

opw-3601783

closes odoo#145650

X-original-commit: 97c57c8
Signed-off-by: Habib Ayob (ayh) <[email protected]>
Steps to reproduce:
- install the e-commerce module
- in General settings, add and switch French -or any- language
- Go to website
- Under e-commerce > product in the menu bar
- click on any product
- click on go to website smart button
- click on edit button to edit the website page
- choose any block to insert, You can notice the message (DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS) stays in English

Investigation
- The message is not add to website_sale.pot file, as the message string passed to an attribute not an actual string inside a tag.

opw-3573881

closes odoo#145466

X-original-commit: 144893c
Signed-off-by: Ali Hassan Youssef (alhy) <[email protected]>
To reproduce
============
- go on any record with list view (for example a Quotation)
- Check many hidden fields in the list view to show them
- The dialogue box for checking and unchecking hidden fields moves
with the horizontal scrollbar, sometimes even going off screen.

Problem
=======
the position of the dropdown menu is computed using the position of the toggler
butoon, so if this button moves the menu moves with it

Solution
========
make the toggler button sticky so it's always visible and the dropdawn menu
will keep same position.

opw-3589726

closes odoo#144368

Signed-off-by: Bastien Fafchamps (bafa) <[email protected]>
The accuracy "Product Unit Of Measure" does not exist, it is "Product Unit of Measure"

closes odoo#145191

Signed-off-by: Victor Feyens (vfe) <[email protected]>
Before this commit, when the microsoft sync was reset with the following options:
- Delete from the current Microsoft Calendar account
- Delete from both

An rpc error was encountered:

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:
https://graph.microsoft.com/v1.0/me/calendar/events/<event_id>

After this commit, the local events are deleted if necessary and
the non-recurring events are deleted on microsoft. We keep the
recurring one to be consistant with
odoo@29ce2f0

closes odoo#133051

closes odoo#145340

Taskid: 3437386
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Signed-off-by: Arnaud Joset (arj) <[email protected]>
Issue:
The _predicted_field is still slow after refactor.

Analyze:
Due to the refactor of the query made in account_move.py
_predicted_field, an index is needed on partner_id.

Fix:
Add an index on partner_id Many2One.

Note:
The previous PR has already been merged
https://github.com/odoo/enterprise/pull/50911 but without the index it
is not as fast as expected. This index had been added by
hand.

Benchmark:
| # Input data | Before PR | After PR |
|:-------------:|:----------:|:---------:|
|   30M                |    22.827 s            |     18.59 ms|

Related task:
opw-3539632

closes odoo#145675

X-original-commit: a0475f3
Signed-off-by: William André (wan) <[email protected]>
Signed-off-by: Benjamin Hanquin (beha) <[email protected]>
This commit correctly aligns certain header elements when the CTA button
has a larger vertical padding.

Steps to reproduce the issue:

- Install 'eCommerce' on your website.
- In Website edit mode, click on the 'THEME' tab.
- Adjust the vertical padding of buttons to 25px.
- Click on the header in the page.
- In the 'STYLE' tab, select the 'Slogan' header.
- Bug: The 'user' selector is not aligned with the CTA button.
- In the 'STYLE' tab, select the 'Centered Logo' header.
- Bug: The 'user' selector and the 'cart' button are not aligned with
the CTA button.

task-3478334

closes odoo#145678

X-original-commit: d2f6710
Signed-off-by: Outagant Mehdi (mou) <[email protected]>
Signed-off-by: Benjamin Vray (bvr) <[email protected]>
Current behaviour:
When removing the ribbon from a product,
the other ribbons are removed as well.

Steps to reproduce:
1. Go to website
2. Go to Shop
3. Click on Edit (top right)
4. Add a ribbon to multiple products
5. Click on Save
6. Select a product with a ribbon
7. Remove the ribbon
8. (other ribbons are gone)

Cause of the issue:
Reverting fix introduced by odoo@5d13fa5
t-out was modified into t-field to be considered dirty when modified.
but when removing a ribbon, t-field is set as empty,
which overwrites ribbons html value.

opw-3487397

closes odoo#135908

Signed-off-by: Quentin Smetz (qsm) <[email protected]>
Steps to reproduce:
- Decimal Accuracy for Product Price > 4 digits
- Purchase a product using a price (1.2345 in my example)
- Go to Purchase > Reporting
- Enable the List View
- Add the field Average Cost (price_average)
- This displays as just two decimals

Note:
can be edited with studio but you can just add the field "price_average"
to the "purchase_report_view_tree" view xml

Fix:
round using product price Accuracy

opw-3560792

closes odoo#145646

X-original-commit: d5a3430
Signed-off-by: William Henrotin (whe) <[email protected]>
Signed-off-by: Walid Hanniche (waha) <[email protected]>
Before this commit, the "Send" button on the feedback form for livechat was not
translatable.

This commit follows 8908de0 which fixed
translations for those templates.

opw-3509309

closes odoo#145648

X-original-commit: 58a20d8
Signed-off-by: Alexandre Kühn (aku) <[email protected]>
Prior to this commit, an issue was identified with the Coins/Bills
feature during the opening and closing cash control process. The
counted amount for coins and bills was always incorrectly displayed as
0, regardless of the actual amount entered.

With this correction, it now accurately displays the counted amount for
coins and bills, ensuring reliable and precise cash management.

opw-3593300

closes odoo#145676

X-original-commit: 30b5ce3
Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Signed-off-by: Pedram Bi Ria (pebr) <[email protected]>
Description of the issue/feature this PR addresses:
Within the project task form view, in the timesheet notebook, the "Remaining
Hours on SO" label becomes misaligned when the planned hours are set to 0.

Fix:
To ensure proper alignment, add a condition for the label.

task:3468392

closes odoo#134078

Signed-off-by: Xavier Bol (xbo) <[email protected]>
Before this commit, interacting with the list_activity widget (e.g.
mark activity done, schedule activity...) in a list view reloaded
the list, and the offset was lost. In other words, if the user did
such an operation without being on the first page of the list, it
automatically came back to the first page when reloading, which was
annoying.

With this commit, we keep the offset when reloading, so the list
remains on the same page.

Note that as of 17.0, the problem doesn't occur as we only reload
the altered record, instead of the whole list.

OPW 3359567

closes odoo#145792

Signed-off-by: Alexandre Kühn (aku) <[email protected]>
Since odoo#122569, we now try to import the migrations sub-package of each module to find upgrade tests.
However, this badly written regex match the OCA module base_maintenance, which generate a RecursionError.
It was partially fixed on odoo#136282 but some collateral damages where raised on tests

closes odoo#145800

Signed-off-by: Christophe Simonis (chs) <[email protected]>
Previously, after the changes made in odoo@5a0113a, PoS stopped
showing the internal ref for products in imported sale orders.

opw-3620141

closes odoo#145649

X-original-commit: 51776fc
Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Signed-off-by: Pedram Bi Ria (pebr) <[email protected]>
Lacking a flush to database before the query used to compute
the gap-in-sequence warning, the gap-in-sequence warning
would stay active even when the all-users lock-date was set.
Which is confusing for the user as they can't do anything about it.

This
 - adds the required flushes
 - adds a tooltip explaining the warning in more details
as it was deemed confusing
 - Adds all the moves that took a sequence number in the query

Task-3613058

closes odoo#144567

Signed-off-by: Florian Gilbert (flg) <[email protected]>
Fix a typo in an account name.

closes odoo#145807

X-original-commit: 7fd0ff7
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <[email protected]>
Signed-off-by: Claire Bretton (clbr) <[email protected]>
Steps to reproduce:
- Install l10n_fr
- Switch to a French Company (i.e. FR Company)
- Create an invoice for a contact from Monaco with a VAT number
=> The default fiscal position is "Import/Export Hors Europe + DOM-TOM".
In France, for Monaco, it should be "Domestique - France".

Solution:
Create a country group with France and Monaco and set it to
"Domestique - France" fiscal position.

opw-3617761

closes odoo#145829

X-original-commit: f1212b5
Signed-off-by: William André (wan) <[email protected]>
Signed-off-by: Anh Thao Pham (pta) <[email protected]>
Before this commit, when the user tried to quick create a record in
a grouped kanban view (by clicking on the "+" icon of a column, for
instance), and then clicked on the "Edit" button of the quick
create, if the name_create rpc failed, the webclient switched to
the form view and an error was displayed.

The displayed error was about a destroyed component trying to do an
rpc, namely the kanban controller. This is because it does 2 things
when the name_create failed: it opened the form view in a dialog
and it also switched to the form view. The latter was unwanted:
in case of errors, we don't want to switch to the form view but
rather to quick create from a dialog.

The error was actually caused by a small mistake: we use the
record variable to determine if the quick create succeeded and if
we can switch to the quick created record. However, that same
variable was already set before, for another purpose.

OPW 3620671

closes odoo#145877

Signed-off-by: Francois Georis (fge) <[email protected]>
After the previous fix introducing a deepcopy, the pregenerate of the
assets became slower because of the many call to get_manifest (in loop,
recursively)
Since the manifest is immutable here and won't go outside of the call,
we can use the lower level version.

closes odoo#144723

Signed-off-by: Xavier Dollé (xdo) <[email protected]>
anko-odoo and others added 29 commits December 19, 2023 11:14
If customer did not have address,email and telephone fields,
"False" would be send to Adyen resulting in these field
containing False values, which in some cases was falsely
triggering anti-fraud system.

task-3159378

closes odoo#146724

X-original-commit: ceb8b78
Signed-off-by: anko-odoo <[email protected]>
Steps to reproduce the issue:

- In website edit mode, add newsletter block onto the page.
- In the options of the snippet, change the template to "form".
- Click on the "Display Thanks Button" checkbox.
- => Traceback.

In this commit [1], a button has been added to the options of the
"Newsletter Block" snippet to allow the user to display the "thanks"
button in edit mode to be able to edit it.

Later, in another commit [2], a new "Form" template was added to the
"Newsletter Block" snippet, but the "Display Thanks Button" option was
not adapted for it.

This commit adapts the "Display Thanks Button" option for the "Form"
template of the "Newsletter Block" snippet so that it displays the thank
you message on the page, and the user can also edit it.

[1]: odoo@a9eae10
[2]: odoo@bd6ef64

task-3610063

closes odoo#145429

Signed-off-by: Guillaume Dieleman (gdi) <[email protected]>
Steps to reproduce -->
1) Have Returns operation return type set to Delivery Order
2) Create an SO -> Deliver with a shipping carrier
3) Return the delivery and re-return with the same shipping carrier (need to manually update this field value)

Solution -->
Keep track of `next_moves` that have been accessed

This PR is basically an extension of odoo#142942

opw-3588205

closes odoo#146590

Signed-off-by: William Henrotin (whe) <[email protected]>
Before this commit if invisible elements are in the DOM (e.g.
device-visibility restricted) the arrows to move snippets (columns,
sections) did show up and behave as if the neighbour elements were
visible.

This commit hides arrows that would not visually move the snippet, and
upon using the move arrow, it also moves the snippet beyond the first
visible neighbour.

Steps to reproduce as of 16.0:
- Drop a "Columns" snippet.
- Make the center column hidden on desktop.
- Move the first column to the right.

=> It did not move and an arrow to move to the left was displayed.

Steps to reproduce before 16.0:
- Drop three snippets.
- Make the second snippet conditionally visible.
- Hide it using the eye icon in the "Invisible Elements" list.
- Move the first block down.

=> It did not move and an arrow to move upwards was displayed.

task-3584947

closes odoo#146667

X-original-commit: d5a83de
Signed-off-by: Robin Lejeune (role) <[email protected]>
Current behavior:
When you only used the "Next order coupons" loyalty program, the "enter
code" button was not displayed.

Steps to reproduce:
- Install the pos_loyalty module
- Archive all the loyalty programs
- Create a loyalty program with "Next order coupons" as reward
- Open a PoS session

opw-3608894

closes odoo#146681

Signed-off-by: Adrien Guilliams (adgu) <[email protected]>
Steps to reproduce issue:

1. Create two companies, **A** and **B**.
2. Create employee *X* in **A**.
3. Create a contract, assign it to *X* and change its state to Running.
4. Duplicate *X* to create employee *Y*
5. Change *Y*'s company to **B** (bypass warnings and errors).
6. Try to access Payroll Dashboard.
7. A Multi-Company access errors is raised

Explanation:

When duplicating *X*, the value from `contract_id` is copied to *Y*.
After *Y*'s company is changed to **B**, Payroll Dashboard tries to retrieve data from its `contract_id` and, the contract still being related to **A**, a Multi-Company access error occurs.

Suggested fix:

Preventing the value being copied solves the problem. It also lines up with the `contract_ids` not being copied.
The root issue existing in *v15.0*, the fix will be implemented in that version too.

opw-3623483

closes odoo#146708

X-original-commit: 54f89b9
Signed-off-by: Sofie Gvaladze (sgv) <[email protected]>
Signed-off-by: Stroobant Paul (stpa) <[email protected]>
…i companies

Steps to Reproduce:

Create 2 companies > Create employee in 1st company > Enable both companies > Create public holidays company-wise> In company 1 create a public holiday for (13/11/2023) > In company 2 create public holidays (13/11/2023) and (29/11/2023).

Then switch to the one company (where the public holiday was created only for (13/11/2023))> Go to attendance > Configuration > Enable the count extra hours feature > Create attendance date (29/11/2023) for ex. 9 hours > Go to employee form > You may see the extra hour of "1 hour" > Because there is no public holiday on 29/11/2023.

Then enable both companies > Create attendance date (29/11/2023) for ex. 9 hours > Go to employee form > You may see the extra hours of "9 hours" > Because there is a public holiday in another company on 29/11/2023.

Bug Source:
commit 1407052 fixed the fact that public holidays are not taken into account when computing the overtime, but it doesn't cover the multi companies case.

Solution:
Verify that the public holiday company and the employee company are the same before applying the compute.
An optimization was also added to avoid searching for public holidays in db by filtering with the
employee company.

opw-3597287

closes odoo#143381

Signed-off-by: Xavier Bol (xbo) <[email protected]>
A anchor menu in the mobile collapse related to an element in the
current page doesn't work correctly:
- The collapse-menu doesn't close
- If the menu is large enough, on mobile, you actually don't even see
  the page scrolling behind it so it looks like the click did nothing.

This is probably because of the switch from BS4 to BS5.
In later version, it's even worse, as we are using bootstrap Offcanvas
instead of collapse, creating another bug:
- The page doesn't scroll at all

This will be fixed in the forward port.

This commit simply manually closes the collapse before starting  our own
smooth scrolling.
It also targets the desktop offcanvas menu (when hamburger layout is
selected).

opw-3604963

closes odoo#146132

Signed-off-by: Quentin Smetz (qsm) <[email protected]>
The balance check doesn't work when a line is being moved from one move
to another because we never notified the move owning the lines at the
start that the lines are being modified.

To reproduce using a simple CSV to import:
```csv
"line_ids/id","line_ids/product_id"
"__export__.account_move_line_9_25fb2fbf","[FURN_7777] Office Chair"
```

To reproduce using a simple server action:
```python
self.env['account.move'].create({'line_ids': [(4, 9)]})
```

We now notify the original move also, triggering everything that needs
to be triggered: sync of dynamic lines and the check for the balance.

closes odoo#146529

Signed-off-by: Quentin De Paoli <[email protected]>
Since Chrome 120 (specifically Chromium build 1208985), an empty message
is received from the CDT at the end of a test run, which obviously
cannot be parsed as JSON.

This is due to a fix made in Chromium [1] where ChromeDriver didn't send
the CLOSE frame in response to the CLOSE frame sent by the client. The
websocket-client library we use to talk with the CDT interprets this
frame as a empty string when receiving message (cf. in `_core.py` [2]).

As we don't need to interpret more complex low-level messages, this
commit simply skips the empty message (which was already implicitly done
in 15.0 [3]).

[1]: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4499
[2]: https://github.com/websocket-client/websocket-client/blob/69e470fee083cd4d5f42bccaff3a6168bfeee863/websocket/_core.py#L379-L399
[3]: https://github.com/odoo/odoo/blob/b5b069564c0a0246f3f263804088d40c3990633a/odoo/tests/common.py#L1169

closes odoo#146882

X-original-commit: 28d5a26
Signed-off-by: Xavier Morel (xmo) <[email protected]>
Signed-off-by: Pierre Paridans (app) <[email protected]>
The _search method of the portal search panel uses the currently
selected dropdown item to retrieve the search criteria ; however, when
using a search criteria that is not displayed in the dropdown menu, the
replace method causes a traceback, since calling attr on the empty
jquery selector object returns undefined.

The _search method was changed to use optional chaining before
accessing the replace method, and to replace the search_in value by an
empty string in case the result of the expression is undefined.

closes odoo#146507

X-original-commit: 0531765
Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Before this commit
================
- Portal users were not able to download the return label via the portal because
the Access token is not passed.

After this commit
================
- Portal users are able to download return labels via the portal.

task-3245766

closes odoo#146224

X-original-commit: 21279a8
Signed-off-by: William Henrotin (whe) <[email protected]>
Steps to reproduce:

  - Install website_event_crm_questions module
  - Go to events and create a new event
  - Add a question of type `text input`
  - Publish the event and go to it on the website
  - Register to the event with an email containing `@example.com` and
    answer the question.
  - Go to CRM in backend and open the new lead created.

Issue:

  Html tags are not escaped in the lead description.
  Same issue with `text_box` type question when having html in answer.

Cause:

  The override of `_get_lead_description_registration` is returning
  a string that escape also the `</br>` tags + the `text_box` answer
  is not escaped.

Solution:

  Use Markup around strings that contain the `</br>` tags to be not
  escaped + escape `text_box` answers.

opw-3471097

closes odoo#146506

X-original-commit: 53361eb
Signed-off-by: Thibault Delavallee (tde) <[email protected]>
If multiple questions are conditionally displayed if the user selects an answer
in another multi-choice question, that answer was added multiple times in the
list used to filter mandatory questions that have to be answered when displayed.
This is an issue because the answer was only removed once if the user changes
his choice resulting in a state where a mandatory question that is hidden stays
mandatory even though it is not displayed to the user.

How to reproduce:
- create a new survey with:
      - Question1:
        - multi-choice with one answer
        - 2 answers (A, B)
      - Question2:
        - single line text box
        - mandatory answer
        - conditional display depending on answer B of Question1
      - Question3:
        - single line text box
        - conditional display depending on answer B of Question1
- start the survey
- click on answer B then click on answer A

Current behavior:
- user is not able to submit the survey with answer A selected

Expected behavior:
- user should be able to submit the survey

task-3630079

closes odoo#146910

X-original-commit: 34b6a7a
Signed-off-by: Florian Charlier (flch) <[email protected]>
Signed-off-by: Damien Abeloos (abd) <[email protected]>
Co-authored-by: Salvo Rapisarda <[email protected]>
Co-authored-by: Damien Abeloos <[email protected]>
This deals with a bug when an expense re-invoiced
with a 'sale_price' expense_policy and 'delivery' invoice_policy

Current bad behaviour:
- When re-invoicing another expense matching the first one's
  price_unit and product the quantities aren't updated properly
- Furthermore, reversing the original move doesn't impact the sale order
- Resetting the expense sheet to draft neither

New correct behaviour:
- When re-invoicing another expense matching the first one's
  they aren't grouped together on the same line, allowing to update
  and reverse the lines independently
- Reversing the original move sets its corresponding sale order line
  quantity and delivered quantity to 0
- Resetting the expense sheet to draft does the same
- Resetting the original move does the same
- Adds clarity to the sale_stock error message, so it's understandable
  from the expense view

task-3458826

Part-of: odoo#146781
When setting the ordered quantity on a sale order
under the delivered quantity, if the product used is storable in stocks,
an error is raised.

This improves the error message so that it's more understandable when
this happens due to canceling an expense report (move)
 or re-setting it to draft

 task-3458826

Part-of: odoo#146781
Fix a bug where quick-create of products from the expense form view
would not use the service detailed_type by default. Allowing bugs
when sale_stock module is installed as it would be considered
as a storable product

Also updates the demo data accordingly

task-3458826

closes odoo#146781

Signed-off-by: Habib Ayob (ayh) <[email protected]>
Signed-off-by: Julien Alardot (jual) <[email protected]>
The `test_01_shop_mail_tour` test was modified in commit [1] to make it
independent of demo data. But the unique constraint on `domain` field
(cf. commit [2]) make it break when run with 3 or more websites.

This commit made the dummy domain assigned in this test non-unique,
which doesn't alter the original meaning of the test but, allows to run
it with multiple existing websites.

Note: this fix is similar to commit [3].

runbot-52417

[1]: odoo@ad6e975
[2]: odoo@507db4e
[3]: odoo@0c522e4

closes odoo#146842

Signed-off-by: Christophe Monniez (moc) <[email protected]>
Related to odoo/enterprise#52648
we add the analytic distributino to the move vals for
the exchange diff move.
We also remove the precompute on the fields, manual backport
of odoo@b9047fe

opw-3603668

closes odoo#146549

Related: odoo/enterprise#52648
Signed-off-by: Habib Ayob (ayh) <[email protected]>
Previous PR odoo#143570 moved some move line ordering logic from the
model to the view to avoid recomputing of these fields since it was
causing issues with the computes occurring at the wrong time.
Unfortunately every field used in the `default_order` in the view has to
be present in the view and since v16 any fields that have a groups
attribute that isn't met isn't loaded in the view.

Therefore we have to force the `result_package_id` to always be in the
view even if `stock.group_tracking_lot` is not true (i.e. packages are
active)

Steps to reproduce:
- create +save a receipt with a tracked product
- click on the burger button to open the detailed operations of the
  tracked product
- add 2 move lines + Confirm

Expected behavior:
the move lines save

Actual behavior:
JS traceback due to trying to sort on a field that isn't present in the
view

closes odoo#146963

Signed-off-by: Quentin Wolfs (quwo) <[email protected]>
Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737

closes odoo#139467

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
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#143514

Signed-off-by: Rémy Voet (ryv) <[email protected]>
When the payment reference is set as the customer reference, the warning message of the
transaction still show the order reference instead.

With this commit, we now ensure the expected reference is shown instead.

opw-3461181

closes odoo#146808

Signed-off-by: Morgane Demesmaeker <[email protected]>
The VAT rate is increasing from 20% to 22% from January 1st, 2024.
We need to keep both 20% and 22% taxes until the end 2025 for phasing out period.
20% taxes will be inactive for new customers.

task-3615036

closes odoo#145324

Related: odoo/enterprise#52921
Signed-off-by: Josse Colpaert <[email protected]>
To reproduce:

1. enable 'debug' mode
2. go to menu "Settings / Translations / Languages" and enable a new
  language (ex: nl_NL)
3 create a new lead and set that language
  (IMPORTANT: do not set a customer)
4. go back to menu "Settings / Translations / Languages" and disable the
  language you previously enabled at step 2.
5. from the lead list view, selection the lead you created at step 3,
   click "Action" and choose "Convert to opportunities"
6. In the wizard choose for:
   * Conversion Action: Convert to opportunity
   * Customer: Create a new customer
7. Click button "Convert to opportunity"

This crash with the following error:
```
Traceback (most recent call last):
  File "/data/build/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/data/build/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: Wrong value for res.partner.lang: 'nl_NL'
```

This commit ensure that when converting a lead to an opportunity, we
don't crash if language is archived.

OPW-3617359

closes odoo#146615

X-original-commit: 057d2a1
Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Signed-off-by: Xavier Alt (xal) <[email protected]>
- Create a "/test" page, publish it
- Set "/test" as homepage url directly on the website (in the settings)
- Go to that page
- Open the page properties and change its URL from /test to /else

From there, the website setting (`homepage_url` field) was still set to
/test and not /else.
It means that the first "published" menu would then be used to avoid
serving a 404 as homepage to your visitors.

It is a bit confusing and people probably just expect to change that
website setting too when changing the page URL.

We had some feedback about similar flows (that couldn't be reproduced or
where people weren't sure) where people ended up writting on the wrong
page or losing their content.
Maybe this will mitigate the issue.

Kind of related: task-3476840

closes odoo#145802

Signed-off-by: Jérémy Kersten <[email protected]>
Previously, the code for adding placeholders checked if the content
inside a block was either an empty string (`''`) or just a single `<br>`
element. While this logic was intended to provide hints when blocks were
empty, it had the unintended consequence of adding placeholders in
situations where it wasn't necessary, such as when removing images from
a section.

To prevent unexpected placeholders, this commit refines the logic. It
now adds a placeholder only when the content inside a block consists
solely of a single `<br>` element, which is a more accurate indicator of
an empty block.

Additionally, this PR resolves an issue with the `drag and drop a
building block here` functionality. Previously, when entering edit mode
and clicking on `drag and drop a building block here,` it moved upward.
after these changes, it remains fixed in its original position.

task-3380599

closes odoo#146859

X-original-commit: def1eee
Signed-off-by: Nicolas Bayet (nby) <[email protected]>
Signed-off-by: Antoine Guenet (age) <[email protected]>
Previously, the order line quantity would inadvertently update if the
Customer list screen was opened without clicking the search bar and
typing numbers. This commit resolves the issue by disabling the event
handler while a temp screen is open. Also, it enhances usability by
focusing on the search bar upon opening the Customer list screen.

opw-3634910

closes odoo#146993

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
@sbidoul
Copy link
Member

sbidoul commented Dec 21, 2023

@ThomasBinsfeld That's a lot of commits. Something wrong with the source branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.