Commit Graph
163350 Commits
Author SHA1 Message Date
Vincent Larcin b12ebdfd4e [IMP] sale_{project,timesheet}: Add SO stat button to projects
This commit adds a "Sales Order" stat button in the project form view to ease the creation of a SO from a project.
This stat button is displayed if the project is billable and has a partner.

Task-3278895
2023-07-20 07:58:41 +02:00
Vincent Larcin 647b9de23b [IMP] sale_project: hide SO stat button when no partner or not billable
This commit hides the "Sales Order" stat button in project update when the project
is not billable or has no partner set.

Task-3278895
2023-07-20 07:58:40 +02:00
Vincent Larcin 74e710d70d [IMP] sale: refactor SOL form view
This commit refactors the readonly sol form view so that it can
easily be overriden to be made editable.

Task-3278895
2023-07-20 07:57:23 +02:00
Vincent Larcin 58fd5414e2 [IMP] sale_{*}: change label when grouping records without SOL in portal
* = project,timesheet

This commit changes the label when grouping tasks and timesheets by sol in the
portal for records without sol from "No Sales Order Item" to "Not Billed",
which conveys more clearly to the user that the records are not billed.

Task-3278895
2023-07-20 07:57:23 +02:00
tong-odoo 14221a596b [IMP] l10n_vn: add Vietnam Bank QR code payment for invoice
Impacted Version:

- saas-16.4 and above

This commit improve below features:

- Add Vietnam Bank QR code payment for invoice based on below github repository
https://github.com/anhjean/vietqr

task-3344654

closes odoo/odoo#127689

Related: odoo/documentation#5043
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-07-20 06:40:43 +02:00
Hugo Carlier (Huca) 5aa9a69b56 [FIX] project_todo: avoid evaluation of equivalent ir.rule
Since the introduction of project_todo, access to the model project.task
for interal users has been extended to read/write/create/unlink. The
basic record rule for task visibility does in consequence need to manage
only the read access. A new record rule was introduced to manage
write/create/unlink access for project users. However, the read access
for this group was also managed by this new rule, which led to
evaluation of both ir.rule for project user.

related-https://github.com/odoo/odoo/pull/115390

closes odoo/odoo#129058

X-original-commit: 0808286feb463f7618fdc2e72f010d151db8c9a3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-20 05:03:05 +02:00
lejeune quentin 3d15c2fe05 [FIX] hw_drivers: Update windows printer driver
Fix version of GHostscript

closes odoo/odoo#129051

X-original-commit: 97b8edef9750fa00f1c5d5e4cfcd5141471270ec
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-07-20 05:03:02 +02:00
Raphael Collet fef1ce7eda [IMP] test_new_api: add more tests about _check_company()
The tests did not cover the cases where:
 - the main record has no company;
 - the linked record has no company.

closes odoo/odoo#129044

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-07-20 05:02:58 +02:00
Brieuc-brd 9efcdd707e [FIX] web: CP: long and clipped breadcrumb
=== ISSUE 1 ===

When the Control Panel breadcrumb was not displayed (eg. after reloading
the page), the name of the last element was used. In this case, the name
was not truncated and could create a layout issue if it was too long.

=== ISSUE 2 ===

The breadcrumb was clipped on Firefox, letters such as "p", "j" or "y"
where partially hidden. This was due to the combination of a too small
line-height and the `overflow: hidden` applied on `breadcrumb-item > a`.

This commit fixes these issues.

task-3420194
Part of task-3326263

closes odoo/odoo#128582

X-original-commit: abbbaee7bd591285cef98275da931fd8a8f073cd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 05:02:49 +02:00
Antoine (anso) 200da4b7fa [FIX] web: arrow button's arrow color on hover
Prior this commit, `.o_arrow_button`'s arrow didn't have the same
transition as the button itself which created a glitch on hover

task-3419220
part of task-3326263

closes odoo/odoo#128581

X-original-commit: 81adc9a1769171a8f1c3e59e0841186904fc7ebd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-20 03:56:39 +02:00
tsm-odoo 6f8f0d2f8c [IMP] mail: move shortcut search view to mail module
Before this commit the `mail.shortcut` search view was
only available when installing `website_livechat_helpdesk`.
This search view focuses on classical `mail.shortcut` field
and could be used accross the different modules that use
this view.

This commit moves the search view to the mail module in order
to do so.

closes odoo/odoo#128120

Related: odoo/enterprise#43976
Related: odoo/upgrade#4925
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-20 03:56:29 +02:00
Yolann Sabauxandflvr-odoo 7cc4b6cfe8 [FIX] l10n_ch_sale: create correct payment reference for swiss loca
Steps to reproduce:
- Install website_sale, contact, l10n_ch
- make sure your company is in Switzerland and has all the address information
- in settings, activate QR
- in Accounting/Journals/Bank:add a bank account (iban: CH4431999123000889012; qr-iban: CH11 3000 5228 1308 3501 F)
- install and enable the provider "Wire Transfer"
- From the Website, create an order and make sure the customer set an Invoicing address in Switzerland (address + Country)
- Validate the order
- In Website/unpaid orders: select your order and Confirm the order
- Create and confirm the invoice
- Print the invoice

Issue:
User Error is raised

Cause:
With Swiss QR code you need to have a valid payment reference. That is, an ISR reference such as in
https://github.com/odoo/odoo/blob/c6631df1c5b0b6d4c2268a826ca150edd0ca653e/addons/l10n_ch/models/account_invoice.py#L90

But when you create an order from the website, it creates an automatic reference "SO0001" which, when converted to an invoice, stays the same.
Since the reference is prepoluted, the `_compute_l10n_ch_isr_number` will not be triggered and therefore will raise an error when trying to print the invoice.

Solution:
Check if the Customer Invoice Journal uses the swiss reference model, then we know that the swiss loca is installed and can call the correct function to compute the reference/

Note:
In the test we check that `payment_custom` is installed. It is because the `_set_pending` method checks taht the payment_provider.code is "custom"="wire_transfer" in which case the sale order reference is computed
https://github.com/odoo/odoo/blob/b4ed9537895ecee48ed146add4257af0aebeb3f4/addons/sale/models/payment_transaction.py#L54-L56

opw-3334534

closes odoo/odoo#127338

X-original-commit: dfa4844e57b67d16b181e1e58813cdbbc7efa956
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Co-authored-by: flvr-odoo <flvr@odoo.com>
2023-07-20 03:56:26 +02:00
Victor Feyens fd2fb212c5 [IMP] payment: allow custom providers to follow standard payment logic
* Generate account payments (and require a journal)
* Be displayed as their custom mode instead of always 'Custom'
...

Commit also includes some side bugfixes/cleanup

task-3347338

closes odoo/odoo#126929

Related: odoo/enterprise#43418
Related: odoo/upgrade#4944
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-20 03:56:19 +02:00
Ipsita Borisagar 8ffca9da77 [IMP] base: add module category for appointment
Purpose is to introduce Appointment as a real app, meaning it now uses its own
module category.

Task-3280730

closes odoo/odoo#128976

Related: odoo/enterprise#43219
Related: odoo/upgrade#4946
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-20 03:56:04 +02:00
damr 16a07ed1bf [IMP] project: make the field company_id of projects non required
This commit's purpose is to allow the user to set the company_id of a project to False, meaning the project is no longer restricted for the user who does not have access to the company of the project. This change induces a lot of other small behavior changes/approximation. Since some fields (currency_id, resource_calendar_id, etc) were company dependent, we had to updates some use cases.

task-3084819

closes odoo/odoo#122144

Related: odoo/enterprise#41363
Related: odoo/upgrade#4947
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-19 23:17:53 +02:00
Odoo's MergebotandElisabeth Dickinson d21f6c29d9 [IMP] mass_mailing_themes: add new themes
5 new mail templates have been created :

2 designed templates ("Graphic" (now "Training") and "Coffeebreak")
3 text-heavy templates

XML added in mass_mailing_themes/views/mass_mailing_themes_templates.xml
Images added in mass_mailing_themes/static/src/img

Some templates names were adapted :

Newsletter -> Event
Tech -> Blogging
VIP -> Coupon
Bold -> Magazine
Solar -> Promotion

Task-2714386

closes odoo/odoo#99311

Related: odoo/upgrade#4035
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-07-19 21:59:58 +02:00
Antoine (anso) 1fdb9aa896 [IMP] mass_mailing_themes: use title snippets in Event template
Use snippets instead of raw H3 to add more dropouts for the user

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:57 +02:00
Antoine (anso) d3e226057e [IMP] mass_mailing_themes: reorder template list
Purpose is to give a more natural ordering in themes instead of looking like
a random ordering.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:57 +02:00
Antoine (anso) dfa715ec62 [IMP] mass_mailing_themes: add training theme
Add 'training' theme, which is absolutely not something to use to train
yourself writing themes, but actually to sell trainings, like software
trainings to learn to write themes.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:57 +02:00
Antoine (anso) e9f5189444 [IMP] mass_mailing_themes: add roadshows theme
Add a theme about roadshows followup & roadshow schedule, used notably by
rock stars.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:56 +02:00
Antoine (anso) 6d4b684263 [IMP] mass_mailing_themes: add newsletter theme
Add a 'newsletter' theme that contains notably a photo of Fgi and Al, which
is probably the best motivational to use it.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:56 +02:00
Antoine (anso) a2f5c7f1bf [IMP] mass_mailing_themes: add coffeebreak theme
Add a new theme: 'coffeebreak' which, as it name implies, is about coffee.
And blocks.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:56 +02:00
Antoine (anso) 9e689fc642 [REF] mass_mailing_themes: rename themes
Some mail themes had to be renamed to fix inconsistencies and prepare future
changes

  * Newsletter -> Event
  * Tech -> Blogging
  * VIP -> Coupon
  * Bold -> Magazine
  * Solar -> Promotion

Also bump version, as new themes imply quite a bit change for this module.

Task-2714386

Part-of: odoo/odoo#99311
2023-07-19 21:59:56 +02:00
Mathieu Walravens 1a85bb6f5e [FIX] stock_account: correct value for returns
Before this commit:
When returning a transfer in AVCO/FIFO, the return's value is not always
the same as the original delivery. The unit cost for the return was
rounded, which introduced rounding errors.

After this commit:
When returning a transfer in AVCO/FIFO, the return's unit cost is not
rounded, allowing the correct value to be set.

Steps to reproduce:
1. Create a product and change its category costing method to AVCO
2. Purchase the product qty: 1 price: 13.13
3. Purchase the product qty: 1 price: 12.20
4. Sell the 2 product and deliver it
5. Create a return for the delivery
6. The value on the delivery is 25.33, but 25.34 on the return

opw-3358531

closes odoo/odoo#129025

X-original-commit: 5043b4b5099dc395234c1d5d8422b8fa7f1d94c8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-19 20:45:12 +02:00
Ipsita Borisagar bb432c2893 [FIX] website_slides: prevent content overflow outside the window
When the user adds the "Title" or "Certificate" in a large number of
characters, the content goes beyond the window.

Technical:
By using this class it applies width 100%, which resolves the issue.

Now, the content stays within the sheet.

Task-3368902

closes odoo/odoo#129014

X-original-commit: 44720aa6e7080ce849af329d8c92681489e093fb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-19 20:45:09 +02:00
MerlinGuillaume 641206cd82 [FIX] sale_product_configurator: use product with archived variant
In a sale order, an error is raised when selecting a product
(`product.template`) that has an archived variant if the product has a
single active attribute

Steps to reproduce:
1. Install Sales
2. Create a new product 'TEST'
3. Add the attribute 'Legs' with values 'Steel' and 'Aluminium'
4. Create a new sale order for any customer with product 'TEST' and
   variant 'Steel' and confirm it
5. Open the form of product 'TEST', remove the attribute 'Legs' and add
   the attribute 'Color' with values 'White' and 'Black'
6. Create a new sale order and try to add the product 'TEST', an error
   is raised

Solution:
Exclude `product.template.attribute.value` from the ptavList only if it
is present in the ptavList

Problem:
If a product has an archived variant that uses the same attributes than
an existing active variants except one, we will try to exclude the
different attribute but because it has been archived, it is not present
and cannot be excluded.

opw-3420616

closes odoo/odoo#129012

X-original-commit: 907aba0f54f65788c78c1370a573fbe9b69be8c5
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-07-19 20:45:07 +02:00
std-odoo b3d2004bfc [FIX] mail_plugin: emails are escaped when we log them on the records
Bug
===
Since 69f911d994 , the body needs to be a
Markup object if we don't want to escape it. So, when we log an email
from the mail plugin, because we just log the string, it gets escaped.

Task-3387100

closes odoo/odoo#128984

X-original-commit: ef068b3b0d7df9f2e064889c62623b34f31e156b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-19 19:37:55 +02:00
David Monnom (moda) 3afb21cc81 [IMP] pos_self_order: cancel order button
Previously, users could not cancel/delete their order once it had begun.
Only order lines not sent to the server could be deleted one by one.

Now, a "cancel" button has been added to the self shopping cart screen.
This button only appears when the order has not yet been sent to the
server. If the order has already been sent, it can only be cancelled
from a PoS.

closes odoo/odoo#128044

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-07-19 19:37:52 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Romeo Fragomeli 73e7c20573 [IMP] *,test_mail,test_mail_full: update query count
* = crm,hr_work_entry_holidays

This commit changes the value of the "QueryCount" as `mail_enterprise`
executes a new query to search for devices associated with the partner.

Task ID: 3123678

closes odoo/odoo#127198

Related: odoo/enterprise#43577
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-07-19 18:24:10 +02:00
Julien Carion (juca) 731db3d459 [IMP] web, mass_mailing: make domain field foldable
This commit allows the domain field to become foldable such that it will
display its domain in the form of facets (similar to the search bar's
ones) when it is folded. Also applies this functionality directly to the
mass_mailing form view.

task-3339512

closes odoo/odoo#126789

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:07 +02:00
Xavier Morel f96988cbe5 [IMP] core: improve test request blocker
Better tag selection
====================

The block was originally hooked onto the `external` tag under the
assumption that this was the tag used to allow external requests.

It's not, it's the tag for the "external" test suite, which is only
one of the test suites allowed to perform external calls. Hook again
onto `standard`, this might have some false positives (allow requests
which we'd rather block), but it should have a lot less false
negatives (block requests we want to allow).

Make Overrides Easier
=====================

Currently `_request_handler` raises a regular `ConnectionError`, this
is an issue because it passes some requests through, which could
themselves trigger genuine `ConnectionError`.

When overriding `_request_handler` to implement fallbacks for bespoke
URL mocks, these two cases need to be distinguishable as overrides
likely want to handle blocked requests, not actual failures.

Therefore `_request_handler` should a dedicated exception. This
exception should be a subclass of `ConnectionError`, so that blocked
requests are treated as regular connection failures by normal Odoo
code.

Class-scope
===========

Originally `_request_handler` was scoped on the instance with the idea
that it'd be a `mock` object, which individual tests could
`configure_mock`. This turned out not to work correctly, because
`Mock.side_effect` does not receive a `self`, hence the `Session` was
inaccessible and it was not possible to passthrough local requests.

While I moved to a regular `lambda` (because a direct method didn't
work either), I forgot to remove the `request_mock` attribute, and
didn't think that the block could now be lifted up to the class
scope. Doing this, requests performed during a "standard" test case's
`setUpClass` are now also blocked, which they very much should be.

closes odoo/odoo#128977

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-07-19 13:13:32 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Valentin Chevalier ac90aa077d [IMP] payment stripe: migrate to a direct payment flow
The Reserve Bank of India (RBI) issued a directive (amended subsequently
in December 2020 and March 2021) that introduces additional security
measures for recurring payments on India-issued cards. These measures
include:
    - Banks must register cardholders and create an e-mandate through a
      one-time process, using additional factor authentication (AFA)
      like 3D Secure (3DS).
    - Banks must alert cardholders at least 24 hours before charges take
      place and give them the ability to opt out of transactions.
    - Recurring transactions over 15,000 INR (or equivalent in other
      currencies) must go through AFA each time.

Stripe has worked with a partner platform to support that, but we must
manipulate the PaymentIntent and SetupIntent objects directly through
their dedicated API, which the Checkout API does not allow. Therefore,
we must now integrate with the Elements API and implement a direct
payment flow instead of the current payment with a redirection flow
powered by the Checkout API.

After this commit, Stripe will create an e-Mandate for every
Indian-based card newly saved in Odoo.

task-3322020

closes odoo/odoo#123573

Related: odoo/documentation#4719
Related: odoo/upgrade#4748
Related: odoo/enterprise#42196
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-19 13:13:13 +02:00
Robin Lejeune (role) ab6564be94 [IMP] website: improve UX of the WebsiteLoader
When the loader takes a long time before having a website ready to be
shown (due to many features selected), it is confusing for users who
think the page stopped working. They tend to refresh the page, provoking
bugs. To improve the UX, this commit adds:

- a browser warning to prevent the user from closing the tab/refreshing
- several waiting sentences, depending on the features chosen by the
user (the screen switches between them every 10 seconds)
- a loading bar whose progression shows the number of installed modules
- a solid background instead of a transparent one as there is no value
in seeing the preceding background at that point

This commit also removes the secondary loader, once the website has been
created, to avoid the bad UX of having one long loading, then a refresh,
then another loading with the same look.

task-3100223

closes odoo/odoo#118525

Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-07-19 13:13:02 +02:00
Benoit Socias 567e5b58d5 [IMP] base, tools, web_editor, *: use original image if size increases
*: web_tour, website

When no transformation is applied on an image, changing the quality
sometimes increases its storage size.

This commit makes sure that the original image remains used if only the
image quality is modified and if this makes its storage size bigger.

Fixes #61619
task-2835144

closes odoo/odoo#103398

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-19 13:12:51 +02:00
Benoit Socias c512f098a7 [IMP] web_editor: introduce a tool method to compute size of data URL
This commit extracts the calculation of the number of bytes within a
base64 data URL to a method named `getDataURLBinarySize`.

task-2835144

Part-of: odoo/odoo#103398
2023-07-19 13:12:50 +02:00
niyasraphy 2945ebc79b [FIX] point_of_sale: update pos pot file
before this commit, the warning message is not
added to the pot file.

warning added in this commit: https://github.com/odoo/odoo/commit/52631ac88c1ec8f6f5fd6542d6b38a200f83372c

after this commit, the pot file is updated
to its latest.

closes odoo/odoo#128970

X-original-commit: f13a21041e36eabd08ea0eaadc5be9e0c4719492
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-19 11:40:27 +02:00
Mathieu Duckerts-Antoine 4e70ca384d [FIX] web: domain selector dialog: validate domain on confirm
With ab4f45b, the domain validation done
on confirmation in the domain selector dialog was removed. Now that we
have a new route /web/domain/validate (see previous commit) that allows
us to quickly check the validity of a domain, we can reintroduce the
validation.

closes odoo/odoo#128913

X-original-commit: fa7788fac3c48e95dcbe78abb66ac5c284d27c56
Related: odoo/enterprise#44291
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 11:40:10 +02:00
Mathieu Duckerts-AntoineandOliver Dony afdb546e44 [FIX] web: domain field: quick save after debug edit
When a domain field value is edited via the debug textarea, no
search_count is done for performance reasons. A single exception is done
when saving the record. Then we check the validity of the domain created
in the debug textarea in order to avoid to save an invalid domain in db
(and get tracebacks,..). The problem is that a search_count can take a
very long time to be executed if the domain is valid. Here we introduce
a route /web/domain/validate in order to quickly check the validity of a
domain and use it in domain field in order to fix the above mentionned
performance issue. Note that the search_count is still done if it useful
but does not have to be waited anymore.

X-original-commit: 40288221c39ff8fba41cd6ac231ab33600dc0cd4
Part-of: odoo/odoo#128913
Co-authored-by: Oliver Dony <odo@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-07-19 11:40:09 +02:00
aliya 88eaa7362a [FIX] account_peppol: add option to deregister
Currently, users cannot deregister from Peppol.
There is an option to migrate away (i.e. request a migration key) but not every provider supports migration.
It is not straightforward to deregister from Peppol once a participant is marked as "prepared for migration",
so the users really should deregister instead.

Also, it is important to run the cron one last time for the user to fetch new documents/message status updates
they've received since the last time the cron ran.

closes odoo/odoo#128867

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-07-19 11:40:06 +02:00
Tejas Modi 1586274912 [FIX] mrp: quantity done becoming 0 when click on Continue button
Step to produce:
=================
- Create MO of serial tracking product.
- Start workorder.
- Click on continue consumption button.
- Enter quantity to consume then click on validate button.
- Then when we click on Continue button quantity become zero or negative.

Issue:
========
If the product tracking is serial and quantity is already set to 1 in this case
it write the same 1 value in serial tracking order because of that it calls
'_update_component_quantity' method again it will make the quantity zero.

After this commit:
=====================
Prevent the quantity becoming zero.

Task id: 3212121

closes odoo/odoo#128665

X-original-commit: 907129be7efba2a0b68f9bef14c6a22c1be8861a
Related: odoo/enterprise#44183
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-19 11:39:56 +02:00
Odoo's Mergebot 76d4f9811b [IMP] web_editor,*: convert wysiwyg to owl
The goal of this PR is to remove all dependency to legacy assets in the wysiwyg because the wysiwyg is loaded on a lot of form view through the html_field, thus defeating the purpose of the legacy assets being lazy loaded.

To remove the dependencies, all the legacy widget that the wysiwyg uses had to
be converted to owl. In order to finish the PR faster, only a partial conversion
of the widgets is done, changing only the part of the code that was necessary
for it to work instead of rewriting the whole widget from scratch. Another pass
should be done to convert all those widgets to fully embrace the owl paradigm.

task-3175256

closes odoo/odoo#118966

Related: odoo/upgrade#4750
Related: odoo/enterprise#42141
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-07-19 11:39:45 +02:00
Nicolas Bayet d7245d2abf [REF] web_editor,*: convert wysiwyg to owl
The goal of this commit is to remove all dependency to legacy in the
wysiwyg because the wysiwyg has to be loaded on a lot of form view
(through the html_field).

To remove the dependencies, all the legacy widget that the wysiwyg
uses had to be converted to owl. In order to finish the PR faster,
only a partial conversion of the widgets is done, changing only the
part of the code that was necessary for it to work instead of
rewriting the whole widget from scratch. Another pass should be done
to convert all those widgets to fully embrace the owl paradigm.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet a2dab27700 [REF] web_editor,*: move media_dialog_wrapper to its own file
For organisation purpose, move the media_dialog_wrapper to its own file.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet dddba97927 [REF] web_editor: rename image_crop_widget.js to image_crop.js
In a subsequent commit, the ImageCropWidget will be converted into
an Owl component called ImageCrop. To match the new name, this commit
rename the file.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet cb4c2091b6 [REF] web: move colorpicker.xml
Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Nicolas Bayet 230a9429bb [REF] web: finish split of colorpicker.js
Part-of: odoo/odoo#118966
2023-07-19 11:39:43 +02:00
Nicolas Bayet 82ae32665c [REF] web: move history of colorpicker.js to split the file
Part-of: odoo/odoo#118966
2023-07-19 11:39:43 +02:00
Nicolas Bayet 03fc3a268d [REF] mass_mailing: rename wysiwyg.js to mass_mailing_wysiwyg.js
In order to match the filename with the only classname of that file,
this commit rename `wysiwyg.js` to `MassMailingWysiwyg.js`.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:43 +02:00