Commit Graph
168215 Commits
Author SHA1 Message Date
Xavier-Do 30db58e5e6 [FIX] base, website: don't cleanup invalid bundle
Before this commit the clean_assetbundle could unlink invalid
attachment, mostly when generating a no website assetbundle with
a different version than a website one, the website assetbundle will be
deleted.

Generating a new asset bundle attachment /web/assets/439-b4c80c3/1/web.assets_frontend.min.css (id:439)
Generating a new asset bundle attachment /web/assets/440-3723971/web.assets_frontend.min.css (id:440)
Deleting attachments [439] (matching /web/assets/%-%/web.assets_frontend.min.css) because it was replaced with /web/assets/%-3723971/%%%

The issue is that %-%/ will match 439-b4c80c3/1/ and not only
439-b4c80c3/

Note that it looks like this issue existed for a while but was invisible
because before 16.4 clean_attachment was invalidating the ormcache,
hiding the fact that a still valid asset was deleted and regenerated.

The proposed fix replaces the domain with %-_______/. The unique is
always 7 character long. Note that this change was already made in 17.0
when removing the id from the asset url so this doesn't need to be
completely forward-ported.

opw-3558552

closes odoo/odoo#145452

X-original-commit: 2ac466547e01bfd65415a53ae1efc9d45d9299fb
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-12-13 14:15:40 +00:00
Adrien Widart (awt) 448f36ec4d [REV] project: cancel view changes
Revert [1]

Changing `t` into `span` is not allowed in stable, in case some
customization already exist and have xpath that target `t`. The
change OE side [2] is problematic too: if a DB has the old XML version
(`t`) and the user tries to install `industry_fsm`, an error will be
raised:
`Element '<xpath expr="//span[@t-if=&#39;record.partner_id.value&#39;]">'`
`cannot be located in parent view`

[1] b3e3c92b52
[2] odoo/enterprise@094009669b

OPW-3629163
sentry-4700256130

closes odoo/odoo#146094

Related: odoo/enterprise#52682
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-13 11:57:10 +00:00
ilru-odoo a1588503c0 [FIX] point_of_sale: сorrect POS inventory valuation
Issue Description:
==================
Issue: Inability to validate transfers generated from the POS's "ship later" feature.

Steps to Reproduce:
===================
1. Create a new user or configure Marc Demo to have only User access in Sales, Inventory, and POS.
2. Create a storable product that can be sold in POS, where the product category uses automatic FIFO valuation.
3. In the POS configuration, enable the "Ship Later" feature.
4. Log in as the new user (e.g., Marc Demo).
5. Sell the new product in POS, choose "ship later," and confirm the order.
6. Go to Inventory and locate the created transfer (reference Shop/000X). You may need to disable all filters to find it.
7. Attempt to validate the transfer and encounter an access error because the User is not an Accounting or Purchase user.

Proposed Solution:
==================
The solution involves adding sudo privileges to the creation of account moves in the POS. This will allow the validation of transfers generated by the "ship later" feature, even for users who are not designated as Accounting or Purchase users. By implementing sudo, we can ensure that the inventory valuation and account moves are correctly processed, resolving the access issue that arises during transfer validation in the POS system.

opw-3572111

closes odoo/odoo#146059

X-original-commit: cf08cbfe46908380da510bf9e3994b34da798d76
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ilya Rudy (ilru) <ilru@odoo.com>
2023-12-13 11:57:09 +00:00
Pieter Claeys (clpi) bdf16d51d7 [FIX] mrp: detailed operations popup results in infinite recursion
To reproduce:
- Create and confirm MO with a tracked component (qty 1, in stock)
- Open the shop floor app and click on the move line for the component
- In the pop-up, change the quantity to 2 and click save

Current behavior:
Crash on an infinite recursion.
The issue was introduced in [1], as setting picked to True in the
stock.move write triggers another call to write on the stock.move,
resulting in the infinite recursion.

Expected behavior when this PR is merged:
The quantity on the stock.move is updated, and the popup closes.
By just updating the vals of the write, we do not trigger the write
method again and avoid the recursion while still maintaining the wanted
functionality from [1].

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

closes odoo/odoo#145922

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-12-13 10:20:43 +00:00
Anh Thao Pham (pta) 3ac60430c7 [FIX] l10n_fr: fix "Domestique France" fp for Monaco
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/odoo#146058

X-original-commit: 2515cdc65f30e29029bafeefed2c6c4b7a2b1ac1
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-12-13 08:24:11 +00:00
sesn-odoo 2b36c8abc3 [FIX] base_vat: allow tax IDs starting with 'EU' for non EU countries
Summary
-------
Foreign companies that trade with non-enterprises in the EU may have a
VATIN starting with "EU" instead of a country code. However, the tax ID
validation does not account for that.

Steps to reproduce
------------------
* install base_vat and contacts
* create a Canadian company with a tax with the format EU00000000

=> you should be met with a validation error.

opw-3551347

closes odoo/odoo#146049

X-original-commit: 6e11c34c660cecea7e8a0b56f7f8f3baba70b0c9
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-12-13 08:24:11 +00:00
Claire Bretton (clbr) 0b38d32e93 [FIX] l10n_ch: Fix account typo
Fix a typo in an account name.

closes odoo/odoo#146035

X-original-commit: 543dea1c2516aef4faa0e32947ca7c75ff48f212
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-12-13 08:24:10 +00:00
Mahdi Cheikh Rouhou (macr) c4eb6098da [FIX] calendar: Mark activity as done with text
Issue:
======
Marking an activity of calender event as marked with text raises an
error.

Steps to reproduce the issue:
=============================
-Go to any contact and create a meeting with him as an activity in the
chatter.
- Mark the actvity as done and add some text as feedback.
- An error showing that the record is deleted.

The issue already solved here , this commits only add the test.

opw-3623719

closes odoo/odoo#146045

X-original-commit: 787f2f44961b9b5283b7bdc944acc2e8284212cc
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-12-13 07:15:52 +00:00
Aurelien van Delft (avd) e3255ba857 [FIX] account: speedup _compute_tax_country_id
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/odoo#146032

X-original-commit: 9501cd4b5cd888c2aa16735f77d12d92618ea5fc
Signed-off-by: Aurélien van Delft (avd) <avd@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-12-13 00:32:25 +00:00
Thomas Becquevort (thbe) bd87344860 [FIX] l10n_sg: Singapore Tax ID label always applied
Description of the issue/feature this PR addresses:

When installing the Singaporean loca, the Tax ID label is renamed to
"GST No.". This is  global change meaning the label is changed for Singaporean
companies but also for any other company. This should not happen as the rename
should only be applied when using a Singaporean company and viewing any
company.

For example :
- Belgian company viewing Belgian company : GST No.
- Belgian company viewing Singaporean company : GST No.
- Singaporean company viewing Belgian company : GST No.
- Singaporean company viewing Singaporean company : GST No.

Desired behavior after the PR is merged:

This commit changes the way the Tax ID label is changed. The label is not
changed upon intallation of the Singaporean loca but is actually adapted on
each opening of a company view so that the tax id label of the company
being USED is applied instead of the default one.

For example :
- Belgian company viewing Belgian company : Tax ID
- Belgian company viewing Singaporean company : Tax ID
- Singaporean company viewing Belgian company : GST No.
- Singaporean company viewing Singaporean company : GST No.

task-3530802

closes odoo/odoo#146020

X-original-commit: e4594310d3dd06b2e2bc047317c90bffe30a57f0
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
2023-12-13 00:32:24 +00:00
aliya edc0eb2f6a [FIX] account: remove empty header in settings
An empty header was left in invoicing config settings after the refactoring of res_config_settings.
This commit removes the empty header that creates empty space in Customer Invoices section of the settings.

task-3619987

closes odoo/odoo#145989

X-original-commit: 1605c3287163dc35093a0e3e82e63407fcbedfa3
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-12-13 00:32:24 +00:00
Eteil Djoumatchoua(etdj) etdj@odoo.com 6c10418026 [FIX] portal: display avatar in portal chatter even if the user is not logged
Steps:
- Create a sale order
- Send it to the customer
- Go to the link in the mail

Issue:
The avatar of the sender is not displayed in the portal chatter but should be.

Reason:
Since 16.0 some rules have been added on ``sale.order`` Model, so you need to log in to get the read right

Solution:
After discussing with reth, we can create a new route in ``portal`` controller just for avatar to be showed
by bypassing record access rules but ensure token used is valid.

opw-3383983

closes odoo/odoo#145931

X-original-commit: 1e2811139215ad29d7e25641a541c3f4c152649e
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Eteil Junior Djoumatchoua (etdj) <etdj@odoo.com>
2023-12-12 23:08:59 +00:00
fdardenne 2ec26f9c3a [FIX] base: make the "New password" column visible in Safari
In a Safari or with GNOME web browser:
- Run a Odoo server without the password policy app
- Go to Settings->User->Select an user
- Click on the action menu and "Change Password"

Current Behaviour
-----------------
The "New password" column have a width of 0.

Expected Behaviour
------------------
The "New password" column is shown.

This commit sets a min width to the new password column to avoid this
weird shenanigan from Safari of setting the width to 0. After some
reverse engineering of understanding why Safari does that I was not able
to find why.

closes odoo/odoo#145930

Task-id: 3573558
X-original-commit: 0dbb0938a90ee0155684bd5bdc7f50f0a9434b9d
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
2023-12-12 23:08:58 +00:00
Julien Mougenot 803b4ac29a [FIX] web: do not apply same datetime picker value
Before this commit, the equality check performed by the datetime service
relied on a JSON-strigified version of the value on one end, and on an
array of ISO strings on the other end. This meant that the value was
never equal to itself and that the `onApply` callback would be called
even if the value remained unchanged.

This commit fixes that by ensuring that the compared values have the
same shape.

closes odoo/odoo#145929

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-12-12 23:08:57 +00:00
Julien Mougenot f0924e0b6f [REF] web: add missing types for datetime hook & service
This commit adds missing type definitions for both the datetime picker
hook and service.

Part-of: odoo/odoo#145929
2023-12-12 23:08:57 +00:00
vlst dfa49351c8 [FIX] pos_restaurant: fix category count display
In the commit 7675905 a t-for loop was introduced in the `ActionpadWidget`
override from `pos_restaurant` where the t-key value was undefined.

This commit fixes the issue by giving a proper value to the t-key.

closes odoo/odoo#145919

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-12 23:08:56 +00:00
Mahdi Cheikh Rouhou (macr) 020038af1c [FIX] website_sale_stock: solve access error product quick add
Issue:
======
When we have a product with `out of stock:continue selling` disabled,
accessing the shop page will give an access error.

Steps to reproduce the issue:
=============================
- Make sure to have a storable product with `out of stock: continue
  selling` disabled in the sales tab of the product.
- Log out and go to shop
- Access error related to warehouse records

Origin of the issue:
====================
The function `_website_show_quick_add` being called from the template in
odoo/addons/website_sale/views/templates.xml to display the shopping
card button in at the bottom of the product. Since the user is public he
doesn't have the right to access the record in warehouse to see if the
product is out of stock or not.

The test `test_back_in_stock_notification_product` already tests the fix
and doesn't work without this fix , so no need to add extra test.

opw-3620172

closes odoo/odoo#145916

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-12-12 23:08:55 +00:00
Victor Feyens 0753deb2ba [FIX] website_sale: missing translation
closes odoo/odoo#145903

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-12-12 23:08:53 +00:00
Gurupreet Singh 5b51757c59 [FIX] project: duplication remove
The issue of the start date appearing before the task name in the project task
list view is caused by a duplication of the company_id in the list view
definition. Consequently, this problem is linked to the task with ID 3213526.

task-3468392

closes odoo/odoo#145856

X-original-commit: ff384b259808f3106daea7de685f5501c13ebf2d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-12 23:08:51 +00:00
Gurupreet Singh dcac8730f9 [FIX] hr_timesheet: fix the traceback when group by date
Description of the issue/feature this PR addresses:
When selecting the "group by date" option in the timesheet portal view, a
traceback error occurs.

Fix:
This PR addresses the traceback error by improving the handling of recordsets
when grouping by date.

task:3468392

closes odoo/odoo#145854

X-original-commit: f244a0685ceeff24edd4b6ab4a2213298dbf8621
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-12 23:08:50 +00:00
Chauhan Aadil Riyazmohamed 5f22eed49c [FIX] hr_timesheet: hide WIP report in timesheet views
Before this commit, when `mrp_account` module is installed, a new report
to print is added in all views of `account.analytic.line`. the problem
is since timesheet model is `account.analytic.line` then that report
is available in the timesheets views and when the user chooses that
report to print in a timesheet view then he will get a traceback
because that report does not for the timesheet record.

This commit hides `WIP` report in the print menu when the view displayed
timesheets records only. That is all the views in the timesheets app.

task-3465424

closes odoo/odoo#145597

X-original-commit: https://github.com/odoo/odoo/pull/132005/commits/b293a6c9a5b2f7fb3a0c7624eccf5406c71521f1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-12 23:08:49 +00:00
Prakash Prajapati 882caa60a3 [FIX] mrp_account: fix traceback when we print WIP Report with multi lines
Steps:
- Install mrp_account and hr_timesheet modules
- Got to timesheet > my timesheet list view
- Select multi timesheet (AAL with different AA)
- Click on print action
- Print WIP report

Current behavior:

The WIP report currently assumed the AALs selected are linked to the same AA
and use the name of the AA to complete the title of that pdf report.
But since it is not really the case, all the time since it depends on the user
selection then the user could get a traceback without knowing why and could
think that report does not work when many AALs are selected.

Solution:

If many AA are contained then map the names and join the name with `, `
to display the name of each AA in the title of that report.

task-3465424

x-Original-commit=https://github.com/odoo/odoo/pull/132005/commits/4256ea305e1388ff6e39e936c2a864c6579e7e0d

Part-of: odoo/odoo#145597
2023-12-12 23:08:49 +00:00
Sven Fuehr 79c9a7741f [FIX] base: res_currency.rate cache issue
Currently there is the following issue with cached conversion rates
from the "from currency" to the "to currency".
When the rate of the res_currency_rate of the "to currency" changes the cache is not invalidated.
Thus the cached value may be used wrongly (leading to wrong results).

This commit simply invalidates all the cached rates in case we update or
create a res_currency_rate.

closes odoo/odoo#143847

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-12 23:08:47 +00:00
Achraf (abz) f91357f3cd [FIX] l10n_se: Adapt sweden address format
Steps:
  - Install `contacts` and `l10n_se`
  - Open swedish contact in `contacts`

Address are in this format
```
{street}
{street2}
{city} {state_code} {zip}
{country_name}
```
instead of
```
{street}
{street2}
{zip} {city}
{country_name}
```

opw-3393569

closes odoo/odoo#142832

X-original-commit: c49e6a97463945cdb449fad78253ed5e3c80cd11
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-12-12 21:49:50 +00:00
Pedram (PEBR) 3dbfa57c41 [FIX] pos_loyalty: fix discount reward on specific category
When using a loyalty program reward with a discount on a specific
product category in PoS, it was not being applied correctly.

The reward contained a discount_product_domain with the category ids.
However in PoS the many2one fields are replaced with the
corresponding values https://github.com/odoo/odoo/commit/e7632a3bcfa60fa416fff5e2e9daaf2571c5f7f1.

To fix this, I replace the ids in the discount_product_domain with
the category name values before sending to the PoS.

opw-3502703

closes odoo/odoo#145016

X-original-commit: 494a07251c23dd7e30980dd5a455f1b37daea16f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-12-12 19:23:56 +00:00
Romain Derie 8bfc6bcb3a [FIX] website: restore page dependencies tooltip in page property
See commit [1] for in-depth explanation and framework-js change but
basically, `renderToElement` do not allow multiple root nodes since
[2].

The fix is just about using the correct method to render multiple root
nodes. Without the fix, it just crashed when you click on the page
dependencies links.

Step to reproduce:
- Go to /
- Open Page Properties
- Edit / to /test
- A list of possible dependencies will be shown, it's a link that can be
  clicked to open a tooltip to have more details
- Clicking on it crash without this commit

[1]: https://github.com/odoo/odoo/commit/2cff7e4094ebb4b56ab17a1462ff358b4b3e7ffd
[2]: https://github.com/odoo/odoo/commit/6303a3eacdca012649a2ffda627b65c17a7217f1

closes odoo/odoo#145715

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-12-12 17:03:41 +00:00
Gauthier Wala (gawa) 480dfc1538 [FIX] base_import_module: fix test sql import
The test tries to import data from an sql file.
The problem is that it is trying to import partners, but when
the test is ran with the l10n_co localization, one of the required
field is not filled.

We just change the model to import to avoid the issue with the
missing required field.

Linked to runbot error 32740, 32742, 32745, 32738

closes odoo/odoo#145708

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-12 17:03:40 +00:00
Pedram (PEBR) fa3c7757e3 [FIX] pos_hr_mobile, point_of_sale: fix "Scan your badge" option
The "Scan your badge" login option was not working properly when trying
to log in to the POS shop.

The barcode scanner styles were missing which caused the issue.

opw-3608077

closes odoo/odoo#145627

X-original-commit: 075fd9f7408aaced3beb6b50b5bf5d28472956e7
Related: odoo/enterprise#52464
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-12-12 17:03:38 +00:00
roen-odoo 8df48f15e6 [FIX] point_of_sale: fix firefox customer display
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/odoo#145839

X-original-commit: 3bebc6caaccb08cc8f856b42bd635fafc9a1c4a2
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-12 14:05:10 +00:00
Julien Carion (juca) e124696722 [FIX] mail: replace overlapping shortcut in activity dialog
This commit simply replaces the shortcut for the action_done_schedule_next
buttons from alt+q to alt+z in the activity view dialog because the alt+q
shortcut is already used for the Save/Schedule buttons. This overlap was
introduced by mistake in https://github.com/odoo/odoo/commit/6c412be2ea7c0fb64677152db753a1007934f892

opw-3565747

closes odoo/odoo#145838

X-original-commit: c2a0db9ce18c00a17fd93f87434d3d3a7a2630fe
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-12-12 14:05:08 +00:00
Dhrumil Shah c2d92ecfc5 [FIX] product: use same default picture than product.template
Before this commit, the default picture (when no picture is set to a product) has been
changed for `product.template` but not for `product.product` in commit 0625434

This commit also applies the changes in `product.product` to have the same default
picture than `product.template` when there is no picture set on the product.

task-3484150

closes odoo/odoo#145831

X-original-commit: 40ee98e7b96bbd7d92f1bc085389e98fb43fd8d1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-12 14:05:07 +00:00
Abdelouahab (abla) 3947fb81fa [FIX] web: toggler button must remain visible
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/odoo#145784

X-original-commit: 6fb2619866893b47c8cb947a40f3457625960a5c
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-12-12 14:05:03 +00:00
Josse Colpaert bd3bb50e5a [FIX] l10n_ec: put back the Spanish names for Ecuador partners
As we send the name of those partners in the XML
for the EDI and in the XML and the correspondance
of that name with the VAT number (RUC) is checked,
we need to keep the original name.

See https://github.com/odoo/odoo/commit/10f9460d2b744a2a135969cd6703f89a3439b923#diff-c58ef9acd83f5647980e035ced040bd699ad3fdaf9a150ca48c4db7a95e86e5aR5
Also translating partners does not make any sense
as the field is not translatable.

See issue https://github.com/odoo/odoo/issues/145698

closes odoo/odoo#145780

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-12 14:05:02 +00:00
Antoine (ande) d3487fad36 [FIX] website_sale: sale ribbons disappearing
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 https://github.com/odoo/odoo/commit/5d13fa522e7d06b03a098ada5fa6be15ddc49618
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/odoo#145864

X-original-commit: 71bdf1f674d0340a726dba96c65af6fdff25822f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-12-12 10:34:48 +00:00
Mattis Megevand (mmeg) ae9efe2a17 [FIX] web: match preview of invoice and its report
Steps to reproduce:
- Make an invoice and setup the layout of the document
- A preview will be displayed
- Make the invoice and download it

Issues:
The layout of the preview and the invoice doesn't match the updated layout from commit 3764914c86.

Solution:
Correct the view of the report templates.

opw-3584286

closes odoo/odoo#145815

X-original-commit: 778cc239010f3bb8618824fdaf06cb19922d6498
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-12-12 10:34:47 +00:00
AH-Yussef 31c7a2ff90 [FIX] account: format transfer source containing %
Steps to reproduce:
- Install Accounting app
- Go to the Accounting app
- Go to Configuration > Chart of Accounts and create a New account with a name containing %
- Go to Accounting > Journal Items
- Select a Jounral item and from Actions, choose move to Account
- In the popup displayed, choose the new account created ealier in the To field, and choose a Journal
- Click `Create Journal Entries`, an error arises

Invistigation:
When the `account_target_name` contains a % literal (ex. "test %"), the `transfer_format` beccomes `"{amount} ({debit_credit}) from %s were transferred to <strong>test %</strong> by {link}"` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L429-

- You can notice that now the string has two % placeholders that need two be substituted, but only argument is provided which is `account.display_name` and so we get a the error `TypeError: not enough arguments for format string` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L433

opw-3601886

closes odoo/odoo#145762

X-original-commit: 1582a0ae28fec12175845dcfdebbb8d6b4bcde33
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-12 10:34:46 +00:00
AH-Yussef 230b680bf9 [FIX] website_sale: add message to translation
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/odoo#145755

X-original-commit: 9a595cd19fba3a68dacd5159d0b04102bc76cadf
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-12 07:31:11 +00:00
Benjamin Hanquin (beha) 642bd48f38 [PERF] account: Add index on partner_id in AM
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/odoo#145836

X-original-commit: 50ecb11320c739f734641cf912902f5620dd891d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Benjamin Hanquin (beha) <beha@odoo.com>
2023-12-11 18:30:48 +00:00
Brice bib Bartoletti 73a313a0fa [FIX] account_edi_ubl_cii: test_import_tax_prediction
The aim of this commit is to fix runbot build error.

Before the commit:
The test could fail if the EUR currency was inactive

After the commit:
The test activate the currency first

closes odoo/odoo#145817

Runbot-error-build: 51509
X-original-commit: 09808f2c91985263090cb9bd38b34d3443a2d7d7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-11 18:30:47 +00:00
Simone Rubino 23265db848 [FIX] product: Typo in min_quantity and min_qty accuracy
The accuracy "Product Unit Of Measure" does not exist, it is "Product Unit of Measure"

closes odoo/odoo#145805

X-original-commit: 8a8a3720bf2ed938dddc1c5889b4207562381234
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-12-11 18:30:46 +00:00
Bastien Fafchamps (bafa) d5986fb9d9 [FIX] web: Fix readonly modifier not working with clickable option on statusbar field
Before this commit:
The readonly readonly modifier of the statusbar field was not taken into
account when the "clickable" option was set.

After this commit:
Even if the "clickable" option is set to true, if a readonly modifier is
set, it will prevent (or not) changing the stage of a status bar.

closes odoo/odoo#145766

Opw: 3222998
X-original-commit: 9e1d01bc44e5e90ed2b809cfadbd05a5793b3c07
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-12-11 18:30:45 +00:00
Kartik Chavda (kcv) 6c7621a10b [FIX] hr_timesheet: fix creation options
Steps:
- Install timesheet_grid.
- Start the timer.
- Try to add new task without selecting project.

Issue:
- We can create a new task and afterwards the task would have the projects as
private.

Fix:
- We are taking the canCreateEdit option from props.

task-3378532

closes odoo/odoo#145760

X-original-commit: a92d7d5a92d84074e1d4b0511051c906953c5003
Related: odoo/enterprise#52518
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-11 17:21:21 +00:00
duongnguyen-viindoo 48633d2ceb [IMP] hr_expense: Team approver should not have full access to journal
Currently Team Expense Approver have full access to journal, we
shouldn't do that

closes odoo/odoo#145737

X-original-commit: 9078b6cf4770c8b3b42bde8e36c4eff5f924c7bd
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-11 17:21:17 +00:00
Walid 4bddcb8c92 [FIX] purchase: Average cost report rounding
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/odoo#145667

X-original-commit: d5a3430cecb673a06057673d0671228449fa3f60
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-11 17:21:15 +00:00
Pedram (PEBR) ca94faef82 [FIX] pos_loyalty: ensure customer name prints without points activity
Since the update in https://github.com/odoo/odoo/commit/d4b366f2d741f2087a947d61d7e0618492cc2bf1, 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/odoo#145629

X-original-commit: 57037253a472b4a25e2be6622c505a08b7f207ff
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-12-11 17:21:14 +00:00
Samuel Degueldre 07fd47ab0b [IMP] web: update owl from 2.2.6 to 2.2.7
Release notes:
https://github.com/odoo/owl/releases

Commits:
- [IMP] types: correctly support Function type for props-validation
- [IMP] app: allow to instantiate templates lazily
- [FIX] compiler: compile named slot in t-component in named slot
- [IMP] devtools: update the devtools documentation
- [IMP] owl-vision: syntax scripts, single quotes attributes and slot props highlight and switch below command
- [IMP] doc: improve documentation of useExternalListener
- [FIX] devtools: remove highlights when out of devtools
- [IMP] devtools: highlight component on select
- [ADD] owl-vision: vscode extension initial commit

closes odoo/odoo#145460

Forward-port-of: odoo/odoo#145342
Forward-port-of: odoo/odoo#145236
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-12-11 17:21:12 +00:00
Yosua Nicolaus 8f10363495 [FIX] account: unaccessible parent's account on product form
If the current company is a branch and we're in the product form, we
will not be able to access our parent's account in the following fields:

- `property_account_income_categ_id`
- `property_account_expense_categ_id`
- `property_account_income_id`
- `property_account_expense_id`

This commit aims to fix that behavior by updating the domain to consider
branch companies too

closes odoo/odoo#145355

Task-id: 3549961
Related: odoo/enterprise#52299
Signed-off-by: William André (wan) <wan@odoo.com>
2023-12-11 17:21:10 +00:00
Yosua Nicolaus 201371954d [IMP] web: string domain function handler
When getting a domain from activeFields in Owl, sometimes the value
passed is not a list or function.

When the field mentioned have a `check_company=True` in the
initialization, the domain passed will be in a form of string instead of
a list.

This commit aims to publicize the domain handler in Field so that it can
be used anywhere by calling the function, as getting field's domain is
getting increasingly common

Task-id: 3549961
Part-of: odoo/odoo#145355
2023-12-11 17:21:10 +00:00
Pedram (PEBR) a351b73b93 [FIX] point_of_sale: capture orders with the same reference
Before this commit, if a new order was created with an existing
pos_reference, it would not be captured even though it was a completely
new order. This occurred because pos_reference was assumed to be unique.

However, there have been several customer reports of orders not being
captured when the receipt contains a pos_reference that already exists.
Some bugs causing duplicate pos_references were found but the root cause
remains unclear.

With this commit, orders are now synced even if pos_reference matches a
previous order. This prevents lost orders and allows customers to access
all their receipts via pos_reference lookup.

An investigation into the cause of duplicate pos_references needs to
continue, but this change unblocks the more serious issue of missing
orders.

opw-3499011

closes odoo/odoo#139974

X-original-commit: 269702891980eb56ddc83e199a9673b1e146d348
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-12-11 17:21:07 +00:00
Serge Bayet (seba) c2ad20fc93 [FIX] web: support color functional CSS notation
This commit enables support for functional color notation in CSS
(https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color).

This new feature accommodates various color spaces utilized within the
'color()' CSS function, seamlessly converting them into an RGBA format
that is comprehensible to the right panel.

Steps to reproduce:
- Enter edit mode
- Add a snippet with a column
- Click on the column
- Set border-width to 5px, enter
=> A gray border appears but the option colorpicker shows no color

Since [this commit] the border has as default opacity of 15%. But now
the custom color in the colorpicker is correctly set.

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

task-3536051

closes odoo/odoo#137698

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-12-11 17:21:05 +00:00