Commit Graph
162123 Commits
Author SHA1 Message Date
Antoine Dupuis (andu) c31beb459d [FIX] tools: Improve docstring of load_xsd_files_from_url()
This is to clarify that the file_name param is not used if a ZIP is
downloaded: in that case, the filenames in the ZIP are used to save
the attachment.

See discussion in https://github.com/odoo/odoo/pull/115720#pullrequestreview-1392562860

closes odoo/odoo#124946

X-original-commit: ae94f14a844352f66490ec326fe2d1a716023891
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-06-14 10:54:47 +02:00
Benjamin Vray 059841d870 [FIX] website: fix the scrolling of table of content in website slides
Steps to reproduce the bug:

- Install the Website Slides module.
- Got to the /slides page.
- Click on a course.
- Click on the "Add Content" button.
- Choose "Web Page" in the modal.
- Once in edit mode, drag and drop a "Table of Content" snippet onto the
page.
- Save the page.
- Scroll the page and observe that the navbar items are updated as you
scroll.
- Click on the "Fullscreen" button.
- Bug: When scrolling the page, the navbar items are no longer updated
as you scroll.

This commit fixes the issue by detecting the scrolling element by
traversing up the ancestors from the 'table of content' snippet, instead
of using the 'getScrollingElement' function, which always returned the
'#wrapwrap' when a Website Slides page is in fullscreen.

opw-3302118

closes odoo/odoo#124935

X-original-commit: 1ac274c3cdddca3e6caf76d9b30b9efaa38bc09f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
2023-06-14 10:54:40 +02:00
Jay Savaliya 156625b86e [FIX] mail: arrow icon should be centered in join button
On the welcome page, in the join channel button, the arrow icon is not centered.

Technical reason:
Currently, fa-stack class is used with the oi class, that results in the
misalignment of the arrow icon, which prevents it from being centered.

After this commit icon will be centered.

Task-3355356

closes odoo/odoo#124910

X-original-commit: 60b0155ee17e74f7eadfa02c635b8b617c451be4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-14 10:54:33 +02:00
hupo-odoo a4583a1aa6 [IMP] l10n_{mx,ua,in,dz,ma}: activate default setting
For Mexican localization, activate by default the setting display_invoice_amount_total_words for the Mexican localization. As this localization uses its own amount to words function, the related commit enables an override of the generic function to use it correctly with Mexican localization.

For the other mentioned localizations (ua,in,dz,ma), the setting was already activated but overriding the create method was not a proper way of doing.

task - 3367243

closes odoo/odoo#124909

X-original-commit: 6ee9842764e0b1244927cb8ece1f6407ccec20d5
Related: odoo/enterprise#42510
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-06-14 10:54:24 +02:00
Guillaume (gdi) 609e25521e [FIX] web_editor: clear m2X cache
This commit clears the cache of we-many2X widgets. Since [the merge of
the backend into the frontend], the page is not refreshed when the user
goes to modify data in his backend. This means that if the data has been
changed between two editions of a page and the many2X widget has already
made the RPC call, it will not do it again and will still have the old
data. For example with website installed:
- Edit a page of your website
- Add the add to cart button
- Search for "ERP" product
- The product does not exist so save the page
- Create and publish a new product called "ERP"
- Edit the page again
- Search for the product "ERP"

=> It is not present because the query is in the cache which has not
been cleared. If you refresh the page, the product will be found.
This commit fixes this problem by clearing the cache after an edit.

Note that a similar implementation of caching clearing has been done
here: https://github.com/odoo/odoo/commit/3efb726575679f62f9ee2894193323bfe45d7938

[the merge of the backend into the frontend]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-3078137

closes odoo/odoo#124908

X-original-commit: ff0cfca420a434e6024654749ea316bbfc5e0772
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
2023-06-14 10:54:17 +02:00
Benoit Socias 4952ea3dcf [FIX] web,*: keep distinct cached translation bundles per front-end lang
*: website_sale_stock

When translations are loaded in a front-end page, the language is
initially deduced by the server. The `GET` that obtains them does not
have a language parameter set. Because of this, this initial result is
reused from the browser cache on subsequent page accesses.
This is a problem when the user toggles between languages because the
cached content is reused while it is related to a previously selected
language.

This commit avoids this problem by making the cache specific to the
current front-end language.

Steps to reproduce:
- Make sure "Disable cache" is not enabled in your browser.
- Install website_sale_stock.
- Add the French language and activate it on the first website.
- In the backend, go to a product (e.g. Office Lamp)'s Sales tab.
- Disable "Out-of-Stock: Continue selling".
- Enter an "Out-of-Stock Message" in both English and French.
- Open the product's website page in French.
- Copy the URL.
- Open a new browser private navigation window.
- Go to the copied URL.
- Switch to English.
- Switch to French.

=> The price is first displayed correctly in French with a "," decimal
separator then is replaced by using the English "." decimal separator
and the out-of-stock message is displayed in English.

opw-3293403
opw-3343614

closes odoo/odoo#124907

X-original-commit: a827de6fffedc9d952d0a4e888c7089896bdb44f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-14 10:54:10 +02:00
xO-Tx 410b4cddd6 [FIX] website: adapt browser URL on "edit translations" mode
Steps to reproduce:

- Go to a website page > Add a 'Form' block.
- Go to the page (in 'edit_translations' mode) > Reload the page > The
form won't be pre-filled with default values. [1]

The page reloading with `?edit_translations=1` leads to a misleading
situation where the form block is handled as on 'edit_translations'
mode (see: `data-edit_translations="1"` on the DOM) hence the behaviour
in [1].

The goal of this commit is to prevent this inconsistency by simply
adapting the browser URL once "edit_translations" mode is activated.

closes odoo/odoo#124889

X-original-commit: 8c7d096a09fe23ac7ef9b7bf54123592c52122dd
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-06-14 10:54:04 +02:00
vlst e82f75d66f [IMP] point_of_sale, *: Unify price type field
*: l10n_fr_pos_cert, pos_discount, pos_loyalty, pos_sale, pos_self_order

The `Orderline` model contains the fields: `price_manually_set` and `price_automatically_set`.
They are meant to signify what type of price the orderline has: `automatic`, `manual` or `original`.

It's very confusing to manage the two fields when in fact they only describe three types of setting the orderline price.

This PR replaces the 2 fields with a single one: `price_type`, which will take one of the 3 possible values.

closes odoo/odoo#124858

Task: 3358265
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-06-14 10:53:57 +02:00
Tejas Modi 280f3de900 [IMP] stock: print report in 4x7 layout for both the operations
Currently, Storage locations and Operations type barcode are printing in 8x3 layout.

So in this commit, I have changed Report of Storage locations and Operations type
barcode print into 4x7.

TaskID - 2579195

closes odoo/odoo#116844

Related: odoo/enterprise#38901
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-06-14 10:53:51 +02:00
Benoit Socias e6dd94aa21 [FIX] website: not fail in Firefox when leaving/entering website app
Since [1], navigating from the website application to another one
raises an error when using Firefox.

This commit avoids looking at the URL if the iframe is not available.

It seems that in Firefox the `pagehide` event is triggered after the
iframe is released.

Steps to reproduce:
- Use Firefox.
- Go to the Website app.
- Go to Discuss.

=> An error popup was displayed.

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

task-3302981
opw-3349388
opw-3357461
opw-3357511

closes odoo/odoo#124940

X-original-commit: 57c3ab3058d4e2eee581f5c35a7a9e1b9ac83593
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-14 09:39:16 +02:00
Thomas Beckers 364e13da96 [FIX] l10n_it_stock_ddt: trim NumeroDDT for complience
Based on the government documentation, NumeroDDT should be alphanumeric format
and max length 20 characters. Currently it's possible to NumeroDDT larger
than 20 characters which will fail if sent to the authorities.

Now this value will be trimmed to the last 20 characters to respect the
specifications.

opw-3343345

closes odoo/odoo#124873

X-original-commit: f6b4614b7b907a3f45190b0a3c864d458423b6d7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Thomas Beckers (tbs) <tbs@odoo.com>
2023-06-14 09:39:05 +02:00
Hugo Carlier (Huca) 40c99636c9 [IMP] sale_timesheet: initially set hours UoM for timesheet products
- product form view: set 'hours' as the UoM if the service is either
prepaid or invoice based on timesheets and if sale_timesheet is
installed.

- Details: Before this commit, the default UoM was the same for every
invoice policy or product type selected. With this commit the UoM is
automatically changed to 'Hours' when the product is of type service
and the invoice policy is either prepaid (A) or based on
timesheet (B). The value of the UoM can still be changed manually. The
following corner cases are managed:
    - The user edits (or creates) a product, changes its type to
    service then to storable/consumable without saving it. The UoM
    should then be set to its initial value (before change) or its
    default value.
    - The user edits (or creates) a product, changes its invoice
    policy to A or B then again to another one without saving it. The
    UoM should then be set to its initial value (before change) or its
    default value.
    - The user edits a product of type service with invoice policy set
    to A (or B) and UoM that has manually been changed to something
    else than 'Hours'. He then modifies the invoice policy to B (or A)
    and then again to A (or B) without saving the changes. The UoM should
    then be set back to its initial value.

Task-3072818

closes odoo/odoo#105951

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-14 09:38:59 +02:00
Jurgen (jugj) 45639a209c [IMP] hr_contract_salary, test_l10n_be_hr_payroll_account : Rework generate simulation link wizard
This task aims to rework the wizard that creates a salary configurator and pre-fills the applicant's name, phone and email
task - 3171707

closes odoo/odoo#124809

X-original-commit: ec2d0ad0bbe6098c8eedd4d913e84260cadd16cb
Related: odoo/enterprise#42460
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 08:26:24 +02:00
tsm-odoo 21c1000581 [FIX] website_livechat: fix im_status wrongly positionned
Before this PR, the `im_status` of a visitor was wrongly positionned
in the discuss app banner.

This commit fixes the issue.

closes odoo/odoo#124921

X-original-commit: 09109573814d5a83c4e5432ffe1b252f3e75e954
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-14 07:18:43 +02:00
Nicolas Viseur (vin) e575b66114 [FIX] l10n_sg: demo company vat number
The demo company vat number would fail the check in base_vat
and thus always cause the demo company to not be added when
installing l10n_sg.
So we replace it with a number that passes the check to ease
testing and avoid throwing errors in the face of our users if
they want to try that localisation.

Task id #3366323

closes odoo/odoo#124948

X-original-commit: c5bc8673b661e3ab6c17d6988e56a014a5b915cf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-14 04:46:54 +02:00
pedrambiria 01b42985f7 [FIX] point_of_sale: open session with no Distribution for invoices
Before this commit, if you used a tax that was using "Group of Taxes"
for the "Tax Computation" in PoS, it would crash because it doesn't
have Distribution for invoices. This issue also occurred for other taxes
that lacked a "Distribution for invoices" line.

opw-3341807

closes odoo/odoo#124904

X-original-commit: 03cb9ea055fff0a56d9cc9d3d87bff817bec9b9d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-13 22:58:13 +02:00
Mathieu (mano) 9da1f5c990 [FIX] web: set input background to transparent
Prior to this commit, the `input-bg` in enterprise and in community were
inconsistent. Some inputs such as the ones in list view were appearing
in community with a weird white background while being hovered on.
Meanwhile in enterprise, these inputs were having a transparent
background.

This commit sets the `input-bg` variable in `bootstrap_overridden`
to transparent for the inputs in community. Since the variable is now
the same in community and enterprise, this variable is now unnecessary
and was removed from the enterprise branch.

The boolean switch input is relying on the $form-switch-checked-color to
display its SVG white circle, therefore it should be set to $o-white in
community instead of $input-bg (its already the case in enterprise,
doing so, this line can be removed from enterprise as well).

The `form-switch-focus-color` is providing almost the same visual result
when mixed with transparent rather than gray, allowing to remove the
enterprise override. The form override in `review_backend` can be
removed as well.

$form-switch-circle-bg-color is not used anywhere in the code and can
be removed since we use $form-switch-checked-color instead.

Note: `form-control` relies on input-bg and could potentially cause
issues but I didn't find any yet since most of the time the background
is overridden or is on a white background.

Task-3094005

closes odoo/odoo#124906

X-original-commit: fd55732d23956c1069c605cfc086d2d2d824b905
Related: odoo/enterprise#42509
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-13 20:40:56 +02:00
Alexandre Kühn 1d42692cfd [IMP] mail: improve discuss counter style
To match the visual of the messaging menu badge for its counter.

Task-3345133

closes odoo/odoo#122946

Related: odoo/enterprise#42493
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-13 19:28:59 +02:00
Alexandre Kühn b90b64c6b5 [IMP] mail: improve new message separator visual
smaller and centered text

Part-of: odoo/odoo#122946
2023-06-13 19:28:58 +02:00
Walid fbcc33f3d3 [FIX] point_of_sale: apply quantity bracode nomenclature
Steps to reproduce:
1) Have Barcode Installed and have Barcode Nomenclature set
2) edit 1st rule(Price Barcodes 2 Decimals) to type Quantity
3) Create a product with barcode 2380201000008
4) Open POS and scan barcode 2380201010007

Bug:
error popup product not found because the callback for this rule
is not set

Fix:
apply same callback as weight (set product quantity)

opw-3213595

closes odoo/odoo#124886

X-original-commit: cd727b13b4ead39cd2b79ad0527e2912c8cf769b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-13 18:21:10 +02:00
Romeo Fragomeli 035355766b [FIX] web: QUnit Rerun in debug not working correctly
Since commit [1], we have added the "Rerun in debug" in QUnit.
This link forces a specific test to be run in debug mode.
This link doesn't work some time as it runs another test.

This commit fixes that by using the `testId` parameter to set the id of
the test like QUnit does, and we add `debugTest` to force the
`Debug Mode`.

Step to reproduce:
* Go to the QUnit test suite
* Wait to have some tests passed
* Uncheck `Hide passed tests`
* Select a `Rerun` on a valid test
  e.g. URL: `/web/tests/?testId=cb868a47`
* Click on "Rerun in debug"
  e.g. URL: `/web/tests/?testId=cb868a47&debugTestId=cb868a47`
* Delete from URL `testId=X` (where `X` = hash of the test)
  e.g. URL: `/web/tests/?debugTestId=cb868a47`
* BUG => The tested test will not be the selected one.
  e.g. in our case, it is MockServer: performRPC (037b6d96)

Note
Small table of tests:
| Hash     | Test Module         | Test Name                                 |
| -------- | ------------------- | ----------------------------------------- |
| cb868a47 | utils > makeContext | evaluate strings                          |
| 037b6d96 | MockServer          | performRPC: search with active_test=false |

Also, a minor fix, using URL constructor and adding search parameter
through `searchParams.set()` to avoid the missing `?` in some cases.
The url `http://127.0.0.1:8069/web/tests/mobile` works but not
`http://127.0.0.1:8069/web/tests/mobile&testId=0e3481e3&debugTest=true`
as there is no search in the first URL when we click to "Rerun in debug"
it adds `&testId=0e3481e3&debugTest=true` but now it's a new page and
not the QUnit mobile suite.

[1]: odoo/odoo@b7ce395a47

closes odoo/odoo#124882

X-original-commit: ee791847caa91e3c98fa4ca47b1cc18f29b37c13
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-13 18:21:04 +02:00
Guillaume (gdi) 9177076cae [IMP] iap, website: add IAP languages test
This commit adds a test to check that the IAP languages work as
expected for the website configurator. The test checks that the
industries are translated (different than other languages).

task-3343616

closes odoo/odoo#123722

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-13 18:20:52 +02:00
Bastien (bvdn) 1a44b84997 [IMP] project: improve various mark as done features
New features developed in this PR:

- Write Javascript tests for the project.task.state widget
  - Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
  - Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
  - Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
  - Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)

Task-3213526

closes odoo/odoo#117968

Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-13 18:20:44 +02:00
yhu-odoo fc61ea4acb [FIX] stock_account: valuation layer is zero when return dropshipping
To reproduce:
1. Create a Sales Order for a product whose product category is set to
   FIFO and automated. Use route "dropship".
2. Confirm the PO created.
3. Deliver the products (DS transfer)
4. Create the customer invoice
5. Return, for example, 1 unit of product
6. Add a credit note to the invoice for that 1 unit returned (reset to
   draft then change qty and post)
Issues:
The value on the valuation layers of the returned picking is 0, posted
entries for COGS and stock interim (delivered) account for credit note
is also 0.

Since #85751, When create valuation layer for return, we take all svls
of origin_returned_move_id into account to calculate the price unit.
However, then dropshiping, 2 svls are created for the original move, and
the sum of them is 0 since there is no impact of the stock when
dropshiping. So when return, the price unit will be calculated as 0.

To fix, when calculate price unit for return of dropshiping, we only
take non-negative svls into account. Note that we use non-negative ones
instead of positive ones because when subcontract dropshiping,
additional negative svls will be added for the cost of the components.

opw-3283436

closes odoo/odoo#124856

X-original-commit: 1c6c163f72301cab29c2f26021bb1ae6fb20dc7f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-06-13 16:58:51 +02:00
Karnav Sojitra b6deb79b81 [FIX] account: prevent keyerror by adding default value to tax_dest_id
This issue occurs when the value of tax_dest_id key is missing at the time of
getting fiscal localization data for  a respective package.

This commit will solve the issue by adding a get method with the default value
of an empty string to get the value of tax_dest_id key, if it does not exist.

sentry-4128326643

closes odoo/odoo#124855

X-original-commit: 4cf435e9aa3564bc1e12b38ce18a30885776c2f4
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 16:58:44 +02:00
Julien Carion (juca) 8c62c5e354 [IMP] web: add isEmpty to ImageField
This commit adds the isEmpty field descriptor to the image field.
This is linked to the changes made in enterprise:
https://github.com/odoo/enterprise/pull/40885

Task ID: 3259489

closes odoo/odoo#124668

Related: odoo/enterprise#40885
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-13 15:31:51 +02:00
MerlinGuillaume 23c43bd5cc [FIX] web: render reference fields as integer in pivot view
The value of the `order_reference` field introduced in [this PR] cannot
be displayed in pivot views
[this PR]:https://github.com/odoo/odoo/pull/116830

Solution:
Render `reference` fields like `many2one`

closes odoo/odoo#116830

Related: odoo/upgrade#4751
Related: odoo/enterprise#38895
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-13 14:07:28 +02:00
MerlinGuillaume 7bbec42f07 [IMP] pos,website(_sale): link sale.report to pos.order
It's currently not possible to know which `pos.order` is linked to a
`sale.report`

Solution:
Add a field `order_reference` on model `sale.report`. This field refers
to either a "sale.order" or a "pos.order" record.
The field `order_reference` is used to count the number of distinct
orders. We cannot simply use count_distinct on the `order_id` because
there can be multiple sale.report with the same `order_id` but related
to different models (sale or POS order).

Part-of: odoo/odoo#116830
2023-06-13 14:07:27 +02:00
Antoine Guenet 55837e14d7 [FIX] web_editor: prevent editor santizing root's ancestors
When sanitizing the content of the editor, we sometimes move up too far
and sanitize nodes that are not in the editor. This adds the proper
boundaries required to contain the sanitization.

closes odoo/odoo#124803

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-13 12:50:03 +02:00
Soumya M 54e40d100e [REM] spreadsheet: removing ads from template
This commit removes 'Try Odoo' ad from the spreadsheet template which is
visible when spreadsheet is shared with public.

Task-3347908

closes odoo/odoo#124779

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:55 +02:00
Saurabh Mishra 4759a8e1a2 [FIX] l10n_it_edi: preventing valuerror in 10n_it_edi
When we confirm an invoice without adding a product in it and then click on
process now then we will face the above valuerror.

Steps to produce:
1) Install 'l10n_it_edi'.
2) Change the company to 'IT Company'.
3) Now go to 'Invoicing' settings and then under 'Fattura Elettronica mode'
check  'Allow Odoo to process invoices' radio button.
4) Create an invoice by adding a partner.
5) While creating it click on 'Add a section' instead of 'Add a line'.
6) Click on confirm.
7) Now Click on 'Process now'.
By following the above steps you will be able to produce the above error.

Applying this commit will solve the valuerror issue.

Sentry- 4170737698

closes odoo/odoo#124771

X-original-commit: 8006e7ce618f98bd26a82cf9b64eaa9b6e9c9d2a
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 12:49:50 +02:00
Alexandre Kühn b399b1afe0 [FIX] mail: no crash on livechat close in mobile
Steps to reproduce:

- Create a chatbot
- Browse your website as a user in moble
- Start a conversation with your chatbot
- Go back to your website or close the window

There was a crash because some code in chat window service
makes sense only in `/web`.

Task-3367338

closes odoo/odoo#124716

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-13 12:49:39 +02:00
Lucas Lefèvre 66e875b031 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/251a52e98 [REL] 16.4.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/73409d7eb [FIX] formatting: round floats with leading zeroes Task: 3327899
https://github.com/odoo/o-spreadsheet/commit/b98383f20 [FIX] misc: type of isCloneable interface
https://github.com/odoo/o-spreadsheet/commit/08492ae06 [IMP] ColorPicker: Extend the custom color selection Task: 3272474
https://github.com/odoo/o-spreadsheet/commit/891d82d9d [REF] xlsx: remove useless exported check
tqhttps://github.com/odoo/o-spreadsheet/commit/6f0ca54f1 [IMP] plugins: remove activeSheet from CoreViews Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/2ac86cdaa [IMP] cf evaluation: make cf evaluation lazy Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/6957579fa [FIX] style: fix dependencies of getCellComputedStyle Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f035db27d [IMP] plugins: add Immutable type Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/735b3ced4 [IMP] plugins: add history to some CoreView plugins Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f08900e7c [IMP] plugin: make CoreView plugins more core Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/5fbde7277 [FIX] ColorPicker: fix `+` sign position
https://github.com/odoo/o-spreadsheet/commit/565740d89 [IMP] doc: connecting to external API
https://github.com/odoo/o-spreadsheet/commit/2a92e2dfb [IMP] sheet_actions: removed french spacing
https://github.com/odoo/o-spreadsheet/commit/fbf076535 [IMP] charts: dynamic errors in side panel
https://github.com/odoo/o-spreadsheet/commit/5a7435320 [FIX] demoData: fix XSLX demo data
https://github.com/odoo/o-spreadsheet/commit/8b9c9887c [FIX] clipboard: Do not update viewport on `paste`
https://github.com/odoo/o-spreadsheet/commit/1c4aa507f [REF] Selection: Let caller control selection visibilty Task: 3348042
https://github.com/odoo/o-spreadsheet/commit/c7b0d544f [IMP] config: enables type checking for binded functions

closes odoo/odoo#124697

Related: odoo/enterprise#42444
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:33 +02:00
Raphael Collet 7c17e2745a [FIX] base: onchange2() for res.users dealing with reified group fields
closes odoo/odoo#124612

Related: odoo/enterprise#42445
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-13 12:49:25 +02:00
Raphael Collet 578a6083e3 [FIX] core: enable read() on new records without origin, as it is used in onchange2
Part-of: odoo/odoo#124612
2023-06-13 12:49:24 +02:00
Raphael Collet 00e86b1552 [FIX] core: new record has one2many field with real records
Part-of: odoo/odoo#124612
2023-06-13 12:49:23 +02:00
Raphael Collet d30b5c0392 [FIX] web: onchange2() format of values in LINK commands
The LINK command must include the corresponding record data in the
web_read() format instead of the diff() format.  The real difference
shows up in x2many fields: web_read() returns them as lists of dicts (or
list of ids), while diff() returns them as lists of commands.

Part-of: odoo/odoo#124612
2023-06-13 12:49:22 +02:00
Raphael Collet 67a402edb5 [FIX] web: onchange2() copy of sub-x2many fields in cache
onchange2() reads the origin record from database, and copies its field
values in cache on the corresponding new records.  The copied x2many
fields must use NewId instead of their real id.

Part-of: odoo/odoo#124612
2023-06-13 12:49:21 +02:00
Raphael Collet 243a2e8d03 [FIX] web: make onchange2() apply x2many commands on existing record values
When doing an onchange on some existing record, the x2many commands must
be applied on the current x2many value of the record.  When doing an
onchange on a new record, the x2many commands must be applied on empty
x2many values.

Part-of: odoo/odoo#124612
2023-06-13 12:49:20 +02:00
Raphael Collet a980d58e48 [FIX] web: onchange2() did not return default value for x2many field
Make the parameter 'force' in method RecordSnapshot.diff() effective in
the case of x2many fields.

Part-of: odoo/odoo#124612
2023-06-13 12:49:19 +02:00
Maximilien (malb) cf00ac4be7 [IMP] l10n_es: default chart template
When you create a new Spanish DB, by default the installed localization package
is the one for non-profit localization. This is probably the most convenient,
as the most normal usage for standard Odoo is the PYMEs one. This PR modify the
demo data and also change the order of how they are displayed in the fiscal
position setting.

In the ir_module, the added line will get the order of module of the init file,
and will sort the template with that order so that we can prioritize some
template.

closes odoo/odoo#122254

Task-id: 3336598
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 12:48:58 +02:00
dane@odoo.com 2b10359e10 [FIX] mass_mailing: fix photo uploading
Images weren't shown when using predefined templates, the problem was
that returned  object wasn't assigned to anything, because sometimes
`filename` wasn't found in `imagesInfo` object,
which caused wierd behaviour.
bug happened: f4f0f78318

task-3328675

closes odoo/odoo#124786

X-original-commit: 0944db93f9d9ac895cf81401998aff7bd11a3c92
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-13 11:28:05 +02:00
Trịnh Ngọc Hưng aec840bb56 [FIX] account: sanitize vals, field explicitely empty other one is not
- Create invoice with default `invoice_line_ids`. In the Values both
fields `invoice_line_ids` and `line_ids`, field `line_ids` is empty,
filed `invoice_line_ids` not empty.
  function _sanitize_vals return vals with del `invoice_line_ids`, but
function `_add_missing_default_values` update value default of filed
`invoice_line_ids` in to values.
  And as a result, the invoice is generated with 2 duplicated lines.

closes odoo/odoo#124764

X-original-commit: 87f14b051ee5e7c8f1f86aaf758a98d7b2d2421e
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 11:28:00 +02:00
momegahed fb00c98a72 [FIX] product: product name overflow is hidden
Steps to reproduce:

1 - activate "Print GS1 Barcodes for Lots & Serial Numbers"
2 - create a product P tracked by lot
3 - print the "Lot/Serial Number (PDF)" from the stock.lot form/list
view

Bug:
contrary to previous versions, the current template doesn't allow the
field to overflow into multiple lines

Fix:
change the css class `o_label_4x12` as it is only used in usecases
where overflow show be allowed

OPW-3336476

closes odoo/odoo#124557

X-original-commit: a5924bfe11cd9324e2ba056e0ac1d449aed730c8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-06-13 11:27:54 +02:00
Ali Alfie (alal) 545ef195f2 [FIX] account dashboard graph data
closes odoo/odoo#124457

Before: in the accounting journal dashboard, for bank and cash graph data the date comparison was done with a date object and a formatted date object resulting in them never being equal and duplicating data.
Now: both dates are formatted in the same way
X-original-commit: 0e2594c88dadb91acb1470dbc55b8ab37f6166c1
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-06-13 11:27:48 +02:00
Ali Alfie (alal) 1794b2386c [FIX] account dashboard sample data
Before: in the accounting dashboard, the graph key was confusing for sample data in cash and bank journals

Now: if sample data is shown, the graph key is displayed as "Sample data"

Task-ID #327726333

X-original-commit: 7108277090fb7c7db788dfcc983ff021654c0876
Part-of: odoo/odoo#124457
2023-06-13 11:27:47 +02:00
Fabrice Henrion 3adf466c55 [IMP] sale: string consistency
closes odoo/odoo#124774

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-13 10:14:18 +02:00
Alexandre Kühn 8f38b5130c [FIX] bus, mail: message notif should not increment counter twice
Before this commit, a new unread message could contribute to unread
counter of conversation twice.

Steps to reproduce:

1. Log in as Demo and start a conversation with Mitchell Admin
2. Log in as Admin: if this is the first message in the conversation,
   counter is correct and shows (1)
3. Log out as Admin
4. Send another message to Admin
5. Log in as Admin and notice that the counter is doubled
6. If the conversation was still open, counter is correct!

This happens because some notification are pending dispatch before
fetching messaging state initially. The counter at init_messaging
fetch takes into account the notification. However, when handling
the message notifcation, it's wrongly considered as a new
notification, thus incrementing the counter when it shouldn't.

This commit fixes the issue by fetching the last bus notification
when fetching init_messaging. Doing so allow to determine whether
a notification is newer or older than init_messaging state.
This helps deciding whether the counter should be incremented or not.

Task-3357960

closes odoo/odoo#124767

X-original-commit: 081ab772dece86f1b5a5d4b3f6227b4b311d9206
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-13 10:14:06 +02:00
Alvaro Fuentes 30fd0071a2 [FIX] account: use more efficient method
Check accounting entries in a more effective way.

closes odoo/odoo#124755

X-original-commit: 316c1d9745af33d85bd94747b3d913d9c9db2342
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2023-06-13 10:13:58 +02:00
Alvaro Fuentes 8bcca1a267 [FIX] account: do not change company's currency on CoA load
If the company already has some accounting entries we shouldn't override
its currency. This is useful to avoids errors related to existing
journal items for the current company's currency.

Issue observed during upgrades for MX localization.

X-original-commit: 752a20596cf132d1641abed7eacb5d53a695869a
Part-of: odoo/odoo#124755
2023-06-13 10:13:57 +02:00