Commit Graph
168870 Commits
Author SHA1 Message Date
Lucas Lefèvre (lul) 4f600ea6aa [FIX] spreadsheet: remove log
closes odoo/odoo#149884

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2024-01-18 10:28:47 +00:00
Anh Thao Pham (pta) 0a4ac677d9 [FIX] stock: fix reservation on multiple moves when validating a picking
Steps to reproduce:
- Activate developer mode
- Install Inventory and Sales
- Go to "Inventory / Configuration / Settings"
- Activate "Storage Locations" and "Multi-Steps Routes"
- Go to "Inventory / Configuration / Warehouse Management / Warehouses"
- Configure main warehouse: (e.g. San Francisco warehouse)
  * Outgoing Shipments: Send goods in output and then deliver (2 steps)
- Go to "Inventory / Configuration / Warehouse Management / Rules"
- Open the following rule:
  * Action: Pull From
  * Source Location: WH/Stock
  * Destination Location: WH/Output
  * Route: San Francisco: Deliver in 2 steps (pick + ship)
- Configure the rule:
  * Propagation of Procurement Group: Fixed
  * Fixed Procurement Group: [create a new one]
- Create a storable product (e.g. Product X)
- Update its quantity (e.g. 3) and apply
- Create a SO with 2 Product X and confirm
- Go to "Inventory / Operations / Transfers"
- Open the pick move linked to the SO (e.g. WH/PICK/00001)
- Set done quantity to 1 and validate
- Create a backorder for the remaining quantity (e.g. WH/PICK/00002)
- Create another SO with 1 Product X and confirm
=> Its pick move is merged with WH/PICK/00002, which contains now 2 Product X
- Open WH/PICK/00002, set done quantity to 2 and validate

Issue:
When validating WH/PICK/00002, the products should be reserved in the delivery moves
of both SO, but it is only done for the first one, leaving the second one in the
"Waiting Another Operation" state.

Cause:
When validating a move (i.e. WH/PICK/00002) linked to several destination moves,
the destination moves are reserved by checking the availability of the product.
For the first destination move, its origin moves are WH/PICK/00001 and WH/PICK/00002,
having an IN value of 3 and an OUT value of 2, which is correct.
When checking the availability of the second destination move, its origin move is
WH/PICK/00002, having an IN value of 2, but for the OUT value, the first destination move
is taken into account, generating an OUT value of 3.

Solution:
When computing the availability, if the origin move is linked to several destination
moves, it should take all the origin moves of all the destination moves into account.

opw-3548123

closes odoo/odoo#149867

X-original-commit: 0c8f0d14d29117e689d8e4c3331bc90b29ab1b98
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2024-01-18 10:28:46 +00:00
Noe Antoine e6760d3dcc [FIX] mass_mailing: fix typo in team snippet
"He lovesto" -> "He loves to"
The msg is updated in translation file.

Task-3685546

closes odoo/odoo#149777

X-original-commit: 5ff7e350fec532a65a8bdb7fc067b1e19247be88
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-18 09:04:48 +00:00
Lucas Lefèvre (lul) dd6e6bd384 [FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/0f2d46e7a [REL] 17.0.8
https://github.com/odoo/o-spreadsheet/commit/518469ade [FIX] range: Support ranges with no `Rangeparts` Task: 3608941
https://github.com/odoo/o-spreadsheet/commit/676c3fb43 [FIX] config: remove latest tag
https://github.com/odoo/o-spreadsheet/commit/a0cb69a93 [FIX] Cell: Fix detection of markdown links Task: 3628780
https://github.com/odoo/o-spreadsheet/commit/82d2e774e [FIX] Datavalidation: fix checkbox style Task: 3650740

closes odoo/odoo#149726

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-18 09:04:47 +00:00
David (dafr) 8c5d533c8d [FIX] purchase-stock: Limit get_price_unit from invoice to 'purchase' purchase_method
# HOW TO REPRODUCE
- Create Product P, storable, AVCO
- Create Purchase Order for 100 units of P for $10 each > confirm
- Receive 40 units of P, create backorder
- Create Bill, change price to $12, confirm
- Return 10 units of P
- Receive 60 units of P
=> unit-cost in SVL is $12 instead of $10

OPW-3635451

closes odoo/odoo#149312

X-original-commit: 734149fbb3473f9a943c47d4ec13ab16afe2b35a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
2024-01-18 07:10:57 +00:00
Prakash Prajapati 72c26c8c30 [FIX] web: fix color-list in the Dark Mode
Step:
 - install planning module
 - active the Dark Mode
 - open planning model
 - create shift with material resource
 - check the material resource icon

Issue:
   when dark mode active that time background and color are not proper show

Fix:
   We have fixed according the tag_list.

task-3524295

closes odoo/odoo#138391

Related: odoo/enterprise#54510
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-18 05:12:44 +00:00
Serge Bayet (seba)andqsm-odoo 6fdb086a1f [FIX] website: resolve issue with logo transformation from text to image
This commit addresses an issue when the logo is in text mode and we
want to click on the `logo` check button under the `Header`/`Elements`
options.

The bug manifested itself in [this commit] during the redesign of the
website template headers. The logo button, initially assumed to have two
states, is, in fact, comprised of three: None, Text, and Logo. To
address this issue, a workaround has been implemented, treating None and
Text as a single state. Consequently, if the current state is Text or
None, toggling will transition to Logo, and conversely, if it is Logo,
the toggle will shift to None.

Steps to reproduce:
- Enter edit mode.
- Click on the header navbar.
- Click on the logo.
- Go to navbar brand options and choose "Text" in the dropdown Logo
  selector.
- The website is now saved. click on the button `LOGO` under the
  "Header" -> "Elements" option.
- An error occurs: the template is not well-formed or wrong.

[this commit]: https://github.com/odoo/odoo/commit/e5380a8e40be47cddf53aa24ff01e7c6802bbdb7

opw-3624285

closes odoo/odoo#146839

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2024-01-18 03:48:00 +00:00
thco-odoo 9efafb1105 [FIX] l10n_ke_edi_tremol: Multiline invoice taxes
Before this commit:
In the case of an invoice with multiple product lines and a line has a tax amount in (16, 8, 0), a KeyError is raised while generating the message for the device.

After this commit:
The message for the device can be generated.

closes odoo/odoo#149778

X-original-commit: 00d9d3c70bc72da2f6397cb62d78231dd8f739b8
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-18 01:34:18 +00:00
Tiffany Chang (tic) a7837d3cd9 [FIX] website_sale: translate cart notification
Missing _t to translate a string made it so the cart notification title
was always in English.

opw-3683578

closes odoo/odoo#149761

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2024-01-18 01:34:17 +00:00
Xavier Bol (xbo) 72f3e40a0c [FIX] sale{_timesheet}: avoid using allowed_so_line_ids
Before this commit, the `allowed_so_line_ids` has been introduced
to always use `_default_sale_line_domain` method in the domain of
`so_line` field and so instead of easing the domain in the field definition
we will be able to override the domain by overriding `_default_sale_line_domain`
method. However, since in `sale_timesheet` module, the new domain will contain
a dynamic value in the right part of a leaf
(`('order_partner_id', 'child_of', commercial_partner_id)`), the
`allowed_so_line_ids` is instead use in the domain of `so_line` field to
easily add that leaf in the domain returned `_default_sale_line_domain`
in the compute method of that field. The problem is the number of SOLs
fetched could be really huge and caused a performance issues.

This commit reverts the commit b7491b5b94 by
- deprecating the `allowed_so_line_ids`, that is, that field will
  now always get an empty recordset.
- deprecating the `_default_sale_line_domain` method, that is the method
  will no longer be used
- manually adding the domain instead of calling `_default_sale_line_domain`
- altering the domain when the `sale_timesheet` module is installed to
  get the same domain used in the `sale_line_id` of `project.task` model

closes odoo/odoo#149747

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-18 01:34:16 +00:00
Jorge Pinna Puissant 04a894c936 [FIX] web: kanban progressbar update aggregates compute
When clicking on a filter on a progress bar of a group, the aggregates
need to be recomputed. To do this, a web_read_group is called.
Since [1], the key groupDomain was removed, with the result that, the
web_read_group is called for all the groups and not only for the needed
one. This can be a performance issue.

Now, the key groupDomain was reintroduced and the web_read_group is done
only for the modified filter's group.

[1]: https://github.com/odoo/odoo/commit/8723f020c3587a900c811b8cc23f53fe34b98df3

closes odoo/odoo#149695

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-18 01:34:15 +00:00
Shaan Thakkar (THSH) cd1b30e95b [FIX] portal: fix dialog box border
Before this commit
===================
1). Go to website slides.
2). Open any Course.
3). Click on 'Add a review' or 'Edit your review'.
  -> We can see that textarea and div both have a border.

After this commit
=================
When we are in the pop-up view div border will be not shown.

Task-3623765

closes odoo/odoo#149434

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-17 22:38:36 +00:00
Djamel Touati 33c7235584 [FIX] mrp: unbuild the qty produced
Steps to reproduce the bug:
- Create a storable product “P1” with BoM:
    - Component: C1, Qty: 1

- Create a Mo to produce 5 units of P1
- Confirm and mark as done the MO
- Unlock the MO
- Change the qty produced to 20
- Try to unbuild the MO

Problem:
Bug 1: The wizard triggered is set with the product_qty(5) instead
of the qty_produced (20)

Bug 2: Set the product_qty to 5 and validate the unbuild, in result
the stock moves in the unbuild order are 20 units instead of 5 units

opw-3630001

closes odoo/odoo#149494

X-original-commit: e4bac3ea028c529e6f47583e7c1af02158f23c2e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-01-17 20:25:02 +00:00
Lucas Lefèvre (lul) beaf1af8c5 [FIX] spreadsheet: avoid useless rpc
- define a relational global filter without any default value.
- reference that filter with `ODOO.FILTER.VALUE`
=> when loading the spreadsheet, a `read` RPC is triggered
with an empty list of ids.

This is:
- useless network call
- useless evaluation when the RPC resolves

closes odoo/odoo#149741

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-17 18:12:46 +00:00
roen-odoo 5783e0573d [FIX] pos_loyalty: prevent using expired eWallets
Current behavior:
It was possible to use an expired eWallet to pay for an order. It was
also possible to put money on an expired eWallet.

Steps to reproduce:
- Create an eWallet with an expiration date in the past
- Open PoS and add products to the order
- Click on the eWallet button
- You can still use the eWallet to pay for the order

opw-3568270

closes odoo/odoo#149622

X-original-commit: e3492b9192d9ca56104e0ce92371fffc1731b406
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-17 18:12:44 +00:00
roen-odoo e1ed78511f [FIX] pos_loyalty,pos_sale_loyalty: avoid creating 2 loyalty cards
Current behavior:
When you create an order for partner A but do not confirm it, then
settle the order in the PoS and add some product. You will have 2
loyalty cards created for partner A. This is happening because when you
confirm the order in the PoS it will confirm the sale order and create
a first loyalty card, but the PoS will not be aware of this and when it
will try to apply the point for the product added through the PoS it
will create a new loyalty card.

Steps to reproduce:
- Activate a loyalty program
- Create a partner A
- Create a sale order for partner A but do not confirm it
- Go to the PoS and settle the order
- Add some product to the order
- Pay the order
- Go to the backend and check the loyalty cards for partner A
- You will have 2 loyalty cards created

To avoid this we will check if the partner has a loyalty card before
creating a new one.

opw-3582174

closes odoo/odoo#149621

X-original-commit: ecd62dcc4b97f542c1cd10226c7c308691e97e4f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-17 18:12:43 +00:00
Josse Colpaert 4d997bcfc1 [FIX] l10n_es_edi_tbai: services were put wrongly in the dict
opw-3665167

closes odoo/odoo#147987

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-17 15:36:30 +00:00
Tiffany Chang (tic) f7b36faf54 [FIX] stock_account: retain assigned automated accounts
Steps to reproduce:
1- install stock_account and account_accountant
2- activate in Settings > Accounting > Automatic Accounting
3- open a Product Category > set Inventory Valuation = Automated
   [`real_time`] (optional step: can change the account stock properties
   values, but doesn't matter)
4- install mrp_account

Expected result:
- Accounts already set under the Account Stock Properties
  (i.e.: property_stock_valuation_account_id,
         property_stock_account_input_categ_id, etc)
  remain unchanged.

Actual result:
- Account stock properties for any Product Categories already set to
  Automated before installing mrp_account are wiped to nothing

Issue:
`_post_load_data` was resetting all property values (i.e. the accounts)
to False since PR odoo/odoo#119564 to ensure correct accounts were used
for `manual_periodic` valuation when stock_account and mrp_account are
first installed. This was previously not an issue because no valuations
could be set to `real_time` before stock_account was installed and
mrp_account did not run `post_load_data` (i.e. an mrp account was added)
until saas-16.3. So now we avoid wiping existing assigned accounts when
mrp_account calls `_post_load_data` at its install time

closes odoo/odoo#147958

Task: 3471065
X-original-commit: cc741525f9349077aefc7d137b6199a68fc87a23
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-01-17 15:36:29 +00:00
Rodolpho Lima 4a7b2a5051 [FIX] web_editor: URL transformation when followed by '.'
Typing a valid http URL + SPACE transforms the URL into a link (anchor
element).

[1] broke such URL transformation if the URL is followed by punctuation
characters, e.g. "somelink.com...".

After this commit, typing "somelink.com..." + SPACE transforms
"somelink.com" into a link, restoring the behavior prior to [1].

task-3602890

[1]: https://github.com/odoo/odoo/commit/4da0608f7c7cd7a6550ec40535b9562fb35c5417

closes odoo/odoo#147845

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2024-01-17 15:36:28 +00:00
Arnold Moyaux ab00d9dbcd [FIX] stock: be able to edit sml in mobile
Fine tuning of #143380

It only works for stock.move but it should also be the case for
stock.move.line

closes odoo/odoo#147597

X-original-commit: b218655990137e223f8df7977ae3ac36d93a32a7
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-01-17 15:36:27 +00:00
Shaan Thakkar (THSH) deea06a2e3 [FIX] website_slides: button padding issue
How to reproduce
=================
1. Go to website slides.
2. Open any course which has quiz content.
3. Solve the quiz or open an already solved quiz.
-> Here we can see that the reset and continue buttons are overlapped.

After this commit
=================
Now there will be a space between the reset and continue buttons.

Task-3635485

closes odoo/odoo#146646

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-17 15:36:26 +00:00
Pierre-Yves Dufays 6d5be6def6 [FIX] website_slide: correct spacing in quiz answer info
How to reproduce it:
- Install website_slides
- Go in the course "Basics of Gardening"
- Do the test "Test you knowledge" in fullscreen mode
- The information displayed about your answer is glued to the information icon

This fix the problem by adding space between the icon and the text.

Technical note: Although the html has not changed, the problem was not present
in previous version because the rendering process was not removing all spaces
which is now the case.

Task-3607117

closes odoo/odoo#144985

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-17 15:36:25 +00:00
Soukéina Bojabza 30ec9ffa2d [FIX] web_editor, website: improve grid image code
Commit [1] added the support for images with a link set on them in grid
mode.

As a follow up, this commit does the following:
- Removes the `!important` from the grid image anchor CSS rules, as they
were not really needed.
- Checks if the image has a closest `o_grid_item_image` column instead
of checking the parent in the `GridImage` options. Indeed, this class
already guarantees that the image is well a grid image; we can therefore
simplify the code.

It also removes a comment that was forgotten in commit [2].

[1]: https://github.com/odoo/odoo/commit/085d70cea571ea80c141ac6005e8bd8333bd269f
[2]: https://github.com/odoo/odoo/commit/d8c374e3e6b31bf88aa42952aadf3379936f7600

related to opw-3580128

closes odoo/odoo#149681

X-original-commit: 9244e85ebb9e1605292698fe31ad94da7709ab86
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-01-17 13:04:01 +00:00
Yolann Sabaux 0412f1006f [FIX] l10n_nl: display rubriek 5 with no total
Steps to reproduce:
- Open Tax report
- Define "current fiscal year"

Issue:
Dutch tax report should not display the totaal of `Rubriek 5: Voorbelasting, kleineondernemersregeling en totaal (BTW)`

opw-3446056

closes odoo/odoo#149671

X-original-commit: 1985a0564a527d4c4ae7c40212b5b799cbfad753
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2024-01-17 13:04:00 +00:00
sbel-odoo 0b705202dd [FIX] project_timesheet_holidays: enable selection of project in time off type
Curently when trying to select an existing/newly created project in the timesheet section of time off types, it will not recognise that the project exists and will suggest to create it.

Steps to reproduce:
-------------------
* Go to **Setting** -> Enable timesheets
* Go to **Time Off** App -> Configuration -> Time off types
* Create new type
* Go to **Project** App
* Create a new project
* Go back to the configuration of the new time off type
* Enable **developer mode**
* Under timesheet section, select project
* Try selection the new project created
* It suggests to create the project/does not recognise it is already created.

Why the fix:
------------
In multi-company this issue can be handled by going into the settings of the project and selecting the same company as the one in the time off type.

This issue is more problematic in case of single company because the field `company_id` is not available in neither the project form nor the time of type. As of currently, the `company_id` on time off type is by default the current company, while it is `False` by default for the project.

This PR introduced that behavior: https://github.com/odoo/odoo/commit/16a07ed1bfd33a193b363f3e87aab3f9bd6f8bd0

Since the `company_id` can now also be `False`, it makes sense to enlarge the filter domain on the time off type form. With that in place, the field `timesheet_task_id` also requires changes because a task created in a project with no `company_id` will not have a `company_id`.

opw-3644265

closes odoo/odoo#149620

X-original-commit: 57d5cf36e5a77ff249cf107dca41dfad89c1ed10
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Sarah Bellefroid (sbel) <sbel@odoo.com>
2024-01-17 13:03:59 +00:00
mano-odoo ac398e42cd [IMP] website_sale: categories scrollbar hover
Issue:

The eCommerce categories scrollbar is too small/ not easy to grab with
your mouse.

Fix:

The scrollbar height is increased on hover to increase the grabbing area

task-3371760

closes odoo/odoo#126502

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-01-17 11:38:02 +00:00
Benjamin Vray 18263b6805 [FIX] website: fix video in Image Gallery and Images Wall
Steps to reproduce:

    bug 1:
    - Enter edit mode.
    - Drag and drop an "Image Gallery" snippet onto the page.
    - Double-click on an image within the snippet.
    - In the media dialog, click the "Video" tab.
    - Copy-paste a YouTube video URL into the URL input.
    - Save the media dialog by clicking on the "Add" button.
    - Bug: The video is very small.

    bug 2:
    - Drag and drop an "Images Wall" snippet onto the page.
    - Double-click on an image within the snippet.
    - In the media dialog, click the "Video" tab.
    - Copy-paste a YouTube video URL into the URL input.
    - Save the media dialog by clicking on the "Add" button.
    - Bug: the spacing around the video is not correct and the "spacing"
    option does not work for the video.

Note that the "image gallery" snippet (also the "image wall" snippet)
was not initially designed to handle anything other than images. When
you click on the "Add" button of the snippet, you can only add images.

However, by following the steps described above, it's possible to work
around this limitation and add a video to the snippet. Since this was
not part of the original plan, several options do not function correctly
with a video.

Instead of preventing the addition of videos, we have chosen to allow it
and focus on fixing the main issues (the small size of the video and the
"spacing" option which does not work with videos). So, if someone
specifically wants to add a video, it's currently possible, though some
features may not work as intended.

task-3597156

closes odoo/odoo#149679

X-original-commit: 73f60e97a1b534b5f8dd3759bd631f9aac095426
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2024-01-17 09:15:34 +00:00
Andrea Grazioso (agr-odoo) e00c7a4359 [FIX] sale_coupon: no fixed tax discount
Have a product with percent tax and fixed tax
Have a promo program applying 50% on the order
Create a sale order
- Add the product
- Add the promo

Issue: The fixed tax is discounted
We should ignore fixed taxes when applying promotions.

opw-3580170

closes odoo/odoo#149165

X-original-commit: 2acce1c84586a0f91ac3a83570d574d0ec96f1f6
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2024-01-17 09:15:29 +00:00
kdeb@odoo.com 5e9918f845 [FIX] google_calendar: prevent google meet links when location is set
Issue
    When a location is set on an event, the google meet link is also
    generated, leading to confusion about the meeting format.

Steps to reproduce
    - Create an event with a location
    - Sync the Calendar with Google.
    - Observe that a Google Meet link is sent with the email.

Solution
    check if the loacation is set before generating a google meet link.

opw-3589379

closes odoo/odoo#149654

X-original-commit: 6aabe1b30598a8a616db01ae46dffece8f3f876c
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
2024-01-17 07:54:45 +00:00
OmarAbosamaha 72e123e8db [FIX] l10n_ar: add missing translations
Issue: spanish_ar translation is missing for some menu items and template names in the accounting app

Steps to reproduce:
1- install l10n_ar
2- switch language to Spanish(AR)
3- Open accounting app
4- check menu items

Solution:
Issue was that the translation file was called es.po and for spanish (AR) language it should fallback to es_419
As per the translation code found here in in 'translate.py' in odoo tools

https://github.com/odoo/odoo/blob/20a3998c3073af8a5d95f8303283107363caed85/odoo/tools/translate.py#L1565-L1574

opw-3601556

closes odoo/odoo#146742

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2024-01-17 07:54:44 +00:00
Khushi Vakil 574d95283f [IMP] l10n_in_pos: error on order from POS
Before commit:
If state is not set in the company,it gives error on order confirmation.

After commit:
If state is not set in the company, now it gives error when opening POS session.

task id: 3360161

closes odoo/odoo#149594

X-original-commit: 803b122585d93bf226edd40c3f184a0108e8d40a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Khushi Vakil (khva) <khva@odoo.com>
2024-01-17 06:25:12 +00:00
ilru-odoo 86accecf96 [FIX] project_account, project_hr_expense: prevent double counting in project upgrade report
Issue Description:
There is an issue in the project upgrade report where an expense with a related analytic account appears twice. This occurs once as "Expenses" and again as "Vendor Bills". This problem does not manifest on runbot with all apps installed, indicating a specific configuration issue.

The installation of the 'project_purchase' module resolves the issue, as the method "_get_already_included_profitability_invoice_line_ids" within both the "project_purchase" and "project_hr_expense" modules performs a check for an 'expense_sheet_id' in account moves. This check helps to exclude these entries from the profitability items, thereby preventing duplication. However, while this solution is effective, it leads to an undesirable addition of the Purchase app to the client's database, which is not acceptable for the client.
Relevant code sections: [project_hr_expense](https://github.com/odoo/odoo/blob/1fbcfdf69b503e77e1a931d23dd47df0daf8b2fe/addons/project_hr_expense/models/project_project.py#L70), [project_purchase](https://github.com/odoo/odoo/blob/1fbcfdf69b503e77e1a931d23dd47df0daf8b2fe/addons/project_purchase/models/project_project.py#L138C15-L138C15).

Steps to Reproduce:
1. Install Expense, Accounting, Project, Sales, Employees, Contacts apps on base runbot.
2. Create a service product with 'Prepaid/Fixed Price' and ensure 'Create an Order: Project & Task' is selected.
3. Create and confirm a sales order for the service product created in step 2.
4. In the Expenses app, create an employee-paid expense linked to the sales order's analytic account (e.g., Analytic Distribution: Departments > S00074).
5. Follow the process in the Expenses app by clicking on 'Create Report' > 'Submit to Manager' > 'Approve' > 'Post Journal Entries'.
6. Access Project Updates in the Projects app.
7. Observe that in the project profitability cost section, the same expense is listed twice under different labels: once as "Expenses" and once as "Vendor Bills".

Proposed Solution:
The proposed solution involves modifying the domain of the `_add_purchase_items` function within the `project_account` module, specifically at [this code section](https://github.com/odoo/odoo/blob/763f88e2d45cb7ba107db135eecd0365ba2b8c8b/addons/project_account/models/project_project.py#L14). The enhancement would entail adding a condition to the function's domain to exclude any IDs that are already present in the profitability report. This approach will efficiently prevent the double counting of expenses, ensuring that each expense is represented only once in the project profitability report, thereby maintaining accuracy and consistency in financial tracking. This solution focuses on enhancing the existing functionality with a targeted and efficient modification, ensuring minimal impact on other system components while effectively addressing the issue.

opw-3522293

closes odoo/odoo#149623

X-original-commit: 0902d57dd1653018d6ae72554b39e4e01fa4d6d7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Ilya Rudy (ilru) <ilru@odoo.com>
2024-01-17 00:00:48 +00:00
Wolfgang Taferner 5065f52392 [FIX] stock: add dedicated owner to move to avoid wrong quantity at date
As _compute_quantities_dict does use stock.move as a source of calculation
we need to make sure that the dedicated owner is set also on inventory
moves which was forgotten and resulted in wrongly computed quantities
in the past in case of such an use case.

closes odoo/odoo#149596

X-original-commit: 02d5c04e85e0bc1b9c0edf66969066ba4f2d769c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
2024-01-16 22:40:03 +00:00
Mathieu Walravens 5593159828 [IMP] base: neutralize webhooks
The user can define automated actions for sending data to a remote
server using a webhook.
To prevent this feature from sending unwanted data from a test database,
this commit neutralizes the field `webhook_url` to an invalid URL.
When the action is run, a warning is logged.

closes odoo/odoo#149592

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2024-01-16 22:40:02 +00:00
Alexandre Kühn 52d34b69d6 [REV] mail: revert fix line break in customer rating feedback
This reverts commit 185adf6fb487fa260bb6dfe985638bc545de7fa2.

The change was made to "fix" line breaks with rating feedback in
helpdesk. However, it's not ok to apply `inline` display layout
for all non-user made message body, as usual block display is
expected for html tags like `<div>` or `<p>`.

The correct fix should be to remove these unwanted `<br>` in the
feedback rating messages. We don't know how they appeared, but
this is a specific minor issue in helpdesk rating, so reverting
the fix is a higher priority.

closes odoo/odoo#149570

X-original-commit: 1ba04da76f391cd4543a8d3b1e6dbecf6a2cb558
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:40:02 +00:00
mano-odoo e0491c1a62 [FIX] web, mail: increase form view width
Currently the form sheet have a flex-grow-1, the chatter could use less
horizontal space to leave more space for the form sheet's content.

This commit widen the form_sheet by applying a flex-grow-2 and
reduces the chatter's top bar total width by removing the icons and
applying a sup tag on the micro information displayed aside the icons.

Since the icons are removed there is no need to test if the icon is
rendered with it's appropriate text anymore thus we can remove these
two lines. Additionally the `text-warning` on the span was unnecessary
since it's already applied on the button parent. 

task-3641988

closes odoo/odoo#147136

Related: odoo/enterprise#53208
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:39:58 +00:00
Antoine Boonen d0ed8cd287 [FIX] hr_expense: Fix auto-extraction of attachments.
Problem
---------
In the commit 24345812cb015e86f362f8c35176646239bfb803 (odoo), we
modified the extraction of attachment in such a way that mails coming in
a journal from aliases with several attachments create several invoices.
Due to the urgency of the task, the computation of whether an attachment
needs auto-extraction or not, has been skipped which failing some tests
that had been silenced. Linked PR #49816 (enterprise) fixes it. However,
as a comment on the said PR suggested, we should add a context key that
disable the auto-extraction.

Objective
---------
Add a context key that disable the auto-extraction and update commit
2bfe69be5c64743d0bf35793a427878170d0b3c6 (enterprise) to use the said
context key.

Solution
---------
1. Remove the override of the `_needs_auto_extract`
2. Manually set the main attachment of the created moves so that
`register_as_main_attachment` is not called when accessing the move.
This removes the auto-extraction without the need to use the key (we
still keep the context key as suggested by the OCR team).

closes odoo/odoo#149525

Related: odoo/enterprise#49816
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-01-16 22:39:56 +00:00
Shubham Patel 5b284d4176 [FIX] project: project name is overflowing on the project kanban card
Steps:
- Install project.
- Go to the project.
- Create or edit the project name to excessively long.
- Then go to Kanban view.
- The project name would overflow.

Issue:
-Before this commit, in the project's kanban view, if the project's name was
 excessively long, it would overflow.

Cause:
-When the name is excessively long it would overflow out of the div element.

Fix:
-After this commit the name is now shortened by applying the 'me-5' Bootstrap
 class.

task-3676094

closes odoo/odoo#149007

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-16 20:17:52 +00:00
sesn-odoo 5afc1af40e [FIX] l10n_es_pos: handle missing partner in the ReceiptHeader template
Currently, if you have Spanish POS installed and create a Cash In/Out,
you are met with an error.

Steps to reproduce
------------------
* install `l10n_es_pos`
* start a POS session
* click on the hamburger button in the top-right corner > Cash In/Out
* add any amount and confirm

You should be met with an error.

Fix
---
At first glance, the original condition:
```
partner?.id !== props.data.simplified_partner_id
```

and the revised condition:
```
partner && partner.id !== props.data.simplified_partner_id
```

might seem equivalent. However, they behave differently when `partner`
is `null` or `undefined`.

In the original condition, the optional chaining operator evaluates
to `undefined`, leading to the following `undefined !==
props.data.simplified_partner_id` (which is most likely true).

The revised condition will shorcircuit when `partner` is falsy, ensuring
that the code only executes when `partner` is a truthy object.

opw-3667287

closes odoo/odoo#148688

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2024-01-16 18:00:21 +00:00
Julien Castiaux 6597672736 [REV] base: use of PyOpenSSLContext in mail server
This reverts commit 6c59eea421.

smtplib is expecting the Context of ssl found in the stdlib and the
Context object of the pyOpenSSL lib isn't a drop in replacement. The
various `TLS_METHOD` constants are not the same and the Context object
of pyOpenSSL lack a `wrap_socket`-like method.

opw-3640374

closes odoo/odoo#149566

X-original-commit: 028277129897c7d49942a148a0ac295386cd2d89
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2024-01-16 16:42:06 +00:00
Louis (wil) aa523cf060 [I18N] stock: properly escape apostrophe in FR translation
Fix done directly on Github to not have to wait for the weekly sync.
Already corrected on Transifex.

closes odoo/odoo#149544

X-original-commit: 1a0bee8af2b28987a631c84311227ebd55ec632a
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2024-01-16 16:42:05 +00:00
Odoo's Mergebot 4bf781fcca [FW][IMP] web: update owl to 2.2.9
Update the OWL lib and adapt some tests/helpers.

Release notes:
https://github.com/odoo/owl/releases/tag/v2.2.8
https://github.com/odoo/owl/releases/tag/v2.2.9

These releases contain small improvements
2.2.8:
- [IMP] template set config: getTemplate function
- [IMP] parser: .trim modifier implies .lazy modifier
- [REF] parser, template_set: factor out parseXML function

2.2.9:
- [IMP] reactivity: replace sets with small arrays for performance

closes odoo/odoo#149507

Forward-port-of: odoo/odoo#149379
Forward-port-of: odoo/odoo#149170
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2024-01-16 13:15:22 +00:00
Mathieu Duckerts-Antoine 3abba287f7 [FIX] web: adapt editFavoriteName helper
With the last realease of owl, .trim now implies .lazy. This means that
if t-model.trim is used, the value will be updated in the state only when
the change event is triggered. Here we adapt the helper editFavoriteName
which was supposed to update the state value.

X-original-commit: 7a16b75a35a5bd60190ee5b437b925a2fa99fb70
Part-of: odoo/odoo#149507
2024-01-16 13:15:22 +00:00
Mathieu Duckerts-Antoine 2f934bc91f [IMP] web: update owl to 2.2.9
We update owl to 2.2.9. Our version was 2.2.7.

Release notes:
https://github.com/odoo/owl/releases/tag/v2.2.8
https://github.com/odoo/owl/releases/tag/v2.2.9

These releases contain small improvements
2.2.8:
    - [IMP] template set config: getTemplate function
    - [IMP] parser: .trim modifier implies .lazy modifier
    - [REF] parser, template_set: factor out parseXML function
2.2.9:
    - [IMP] reactivity: replace sets with small arrays for performance

X-original-commit: 91a1f495b260ab23df80d74faeae25a5883deda0
Part-of: odoo/odoo#149507
2024-01-16 13:15:22 +00:00
Florent de Labarre 05be66a416 [FIX] mail: time to unlink record is so long
In large database, the time to unlink a sale.order (or any record with mail.thread) can be take 1 seconde.

After it is so fast.

closes odoo/odoo#149296

X-original-commit: 6bd9f408a18c019416b5bd981de50b54432f5690
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-16 13:15:21 +00:00
Yannick Tivisse f18faee970 [FIX] hr_contract: Improve list view loading time
Hidden message_needaction fields was taking 2.1 over 2.2 seconds on odoo.com
(+- 5000 contracts in running state)

closes odoo/odoo#148581

X-original-commit: de983bdd038e19703f461d5e529455f957ff842a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-16 13:15:20 +00:00
Adrien Guilliams (adgu) 6cd9185b05 [IMP] pos*: book/release table in pos_restaurant
pos*: point_of_sale, pos_restaurant

The current approach to book/release a table isn't so intuitive,
knowing that when selecting an empty table from the floor plan:
- an empty order is created on that table, displaying it as booked
on the floor plan
- as long as the order remains empty, we display a "Release table"
button in order to delete the related empty order and display
the table as free on the floor plan

Here is the change brought by this commit:
- Change the "Release table" button to "Book table"
- Don't create an empty order on the table until User either:
  - hits "Book table"
  - starts adding products to the cart
- Table can be released by deleting the order
- Deleting the last order on the table, redirects User to the floor
- Control Buttons are not accessible with unbooked tables
plan

closes odoo/odoo#145896

Task-id: 3624323
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-16 13:15:19 +00:00
miad-odoo 2d5d178403 [FIX] web: fix invoice preview
Before this commit, the `report_invoice_wizard_preview` was rendered well in
html and in the preview (settings page) but not when downloading it ; the
"total" table was pushed all the way to the right.

opw-3648586

closes odoo/odoo#149509

X-original-commit: 232c257c1554f2f47b589a971cdf9f98227ef53c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
2024-01-16 11:40:03 +00:00
Pierre Paridans 763511d09d [FIX] iap_mail: enrichment tags illegible in dark mode
In the lead's enrichment, the fields containing tags have an hardcoded
background for some reason... which, in dark mode, makes the tags' label
illegible (as it is a light text on light background).

This commit fixes it by forcing a darker gray when rendered in dark mode
(where the dark mode's bundle is applied, like in the backend).

Steps to reproduce:
- Open CRM
- Create an opportunity using a well-known domain in the email address
  (for example)
- Click "Enrich"
- A card appears in the chatter containing the matching company's
  information
- Switch to dark mode
=> Sectors, Technologies Used... tags keep the light background

opw-3678598

closes odoo/odoo#149409

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2024-01-16 11:40:01 +00:00
Arthur Detroux (ard) 94cae965a4 [FIX] website: properly check if all snippets have their data-snippet
Commit [1] changed the class from .ui-draggable to .o_draggable in the
`snippet_version` test, specifically in the run function that checks
if all snippets have their `[data-snippet]` properly set.

Indeed, `.o_draggable` is set on the parents of draggable elements and
not on the elements which are draggable themselves. This lead to a
`.every` on an empty array which returns `true`, and therefore avoids
the `console.error` but did not properly check the snippets.

This commit changes the selector to all snippets which do not have
a [data-module-id] which should be all snippets that are draggable.

[1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76

Related to task-3079246

closes odoo/odoo#148824

Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2024-01-16 11:39:59 +00:00