Commit Graph
152569 Commits
Author SHA1 Message Date
Michael (mcm) e181eb6dd6 [IMP] hr: convert field WorkPermitUpload
This commit rewrites WorkPermitUploadField using the new framework.

closes odoo/odoo#96783

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 13:26:34 +02:00
Romeo Fragomeli a1dbac0f9b [FIX] web: adapt checkbox and boolean_toggle for BS5
In the BS5 migration, the legacy `checkbox` and `boolean_toggle` widget
were adapted but not the OWL Component.

Also, we have tweaked the old widget and the component to have better
positioning and margins.

Note:
the CSS for the print is already done in BS5
```css
@media print {
  .form-check-input {
    color-adjust: exact;
  }
}
```

Also we change `offsetWidth` by `getBoundingClientRect().width` in
`list_renderer` to avoid inaccurate rounding in columns width's
calculation.

Lastly a `.o-checkbox` class is added to the Checkbox component for a
more universal and context independent targetting.

closes odoo/odoo#96185

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-01 13:26:31 +02:00
Jacky (trj) e49029406c [FIX] point_of_sale, pos_{loyalty,mercury}: restricting key to confirm or cancel popup
The "pressing a specific key to confirm/cancel a popup" behavior was added but the problem was that
some popups only had one button which was either confirm or cancel. It was thus possible to close
those popups by bypassing the default behavior (e.g. possible to "cancel" a popup which only
has one button linked to an overridden confirm method and vice-versa). Also, we normalize the use of
`confirm` and `cancel` methods in the popups so that when the specifics keys are pressed, the right
behavior is executed.

closes odoo/odoo#97069

X-original-commit: a14ade59744855a9dea8b16f23a3d61eb88678de
Related: odoo/enterprise#29957
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-08-01 12:12:17 +02:00
Simon Genin (ges) a63141bbd8 [REF] web: convert ribbon widget
closes odoo/odoo#96843

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 12:12:11 +02:00
Simon Genin (ges) 150f63c1b6 [IMP] web, *: add extract props for view widgets
To make cleaner code and keep a similar API than fields, the
extractProps static method is added to the the widgets.
extractProps allows making new props out of the attrs of the widget
node.

Part-of: odoo/odoo#96843
2022-08-01 12:12:11 +02:00
Ivàn Todorovich 46f9f0de87 [IMP] website_sale_delivery: Cleanup useless code around _remove_delivery_line.
No need to set carrier_id to False.
This is already taken care by `delivery` module since 448312173.

closes odoo/odoo#79231

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-01 12:12:03 +02:00
FrancoisGe 11d79784f6 [FIX] web: create a Record in a ListView with a context
Before this commit, in a ListView, the view context was not used when
creating a record.

This caused some problems:
- the record does not use "default_" to initialise its data
- server-side required fields that are not present in the arch and
 have a value given in the context return server errors

closes odoo/odoo#97165

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 10:55:56 +02:00
Guillaume (guva) 63d44ffd35 [FIX] account: keep statement line note
We keep the statement line note when changing
the partner in reconciliation widget

Steps:

- Create a Bank Statement, a Bank Statement
  Line BSL with a note (field narration)
- Save, edit, change partner on statement
  line and save.
-> The note on BSL is empty

With this commit we allow narration computation
only for sale documents.

opw-2832287

closes odoo/odoo#97125

X-original-commit: 19394d1971259933c5158139c56344c9c35bdaed
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-08-01 10:55:47 +02:00
Louis Wicket (wil) fc2118f5c3 [IMP] mail: remove Record/create
The way the code has evolved, `create` is now no more than an
unnecessary indirection for `insert`.

This PR removes `create` and replaces its uses with `insert` directly.

closes odoo/odoo#97058

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-01 10:55:44 +02:00
Jorge Pinna Puissant 52509f04eb [FIX] web: take into account invisible buttons
Before this commit, an error was raised when an invisible button was
found on a list view (for example, if it has a group).

Now, the invisible buttons are correctly managed.

closes odoo/odoo#96963

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 10:55:40 +02:00
jlzhou a04c2f134e [FIX] project, web_editor: fix user_id missing bug in this.getSession()
auth_totp module added user_id in session_info, but it's not in the depends of project and web_editor module.

To avoid traceback after uninstalling auth_totp module:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0'),

we should use uid instead of user_id in js code.

closes odoo/odoo#96880

X-original-commit: 81b92a61907028f71b1337b11d0d60ee98bb5775
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-01 10:55:37 +02:00
momegahed c004067287 [FIX] delivery: tax calculations are wrong on delivery products
Steps to reproduce:

1- install sale, accounting
2- create a fiscal position fp that maps
tax inc t1 to any other tax t2
3- create a delivery product dp with t1 and mark it "can be sold"
4- create a new delivery method with dp
5- in a new sales order, choose fp, click on add delivery
6- the unit_price is wrong, it hasn't mapped t1 to t2
7- try adding the delivery as a product in a new sales order line
8- the unit_price is correct and the taxes are correctly calculated

Bug:

 `_create_delivery_line` is not using the same logic used
 when normally adding a sales order line although technically
 delivery product is still a product

Fix:

use `_get_tax_included_unit_price` to get the correct unit_price

OPW-2806965

closes odoo/odoo#96874

X-original-commit: 03bb18d12606447faaed0de04bb83dde5de53b96
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-08-01 10:55:34 +02:00
Julien Castiaux ad71d6d3ee [REM] website_utm: website depends on utm already
`_post_dispatch` is a late addition to the httpocalypse. It can be used
to alter the response object e.g. to inject headers or cookies. The
function is automatically called for regular, fallback and error
responses. On the other hand, `_dispatch` is only called when an
endpoint is matched and might not return a response in case of error.

task-2839031

closes odoo/odoo#96651

Related: odoo/upgrade#3710
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-08-01 10:55:29 +02:00
Florian Damhaut 183a966ab5 [FIX] website_sale_wishlist: correct variant selection
Step to reproduce:
- Create variants for product without grid
- Go to website
- Try to add variant of created product to wishlist

Current behaviour:
- Product ID is not properly fetched
- Product template is added to wishlist

Behaviour after PR:
- Product ID is properly fetched
- Product is added to wishlist

opw-2705883

closes odoo/odoo#96274

X-original-commit: f7ce60511c64002b84d3b4dbd66a2f52becc46fc
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-01 10:55:25 +02:00
Ivan Yelizariev 31c45b321b [FIX] web: fix css issue with rtl in calendar view
This commit fixes following html block [1]

``` xml
<div class="fc-content">
            <span class="fc-time">08:00</span>
            <div class="o_event_title">Mitchel Admin - Administrator</div>
</div>
```

`rtlcss` lib changes `padding-right` to `padding-left`, which doesn't work if we
use `span` block next to `div` block, because position of the blocks are not
changed (time is still on the left side and title is on the right). Adding the
`ignore` directive solves the issue.

[1]: https://github.com/odoo/odoo/blob/4a996060e6b922fecb299eca32d6763dbb12b831/addons/web/static/src/legacy/xml/web_calendar.xml#L16-L17

opw-2925491

closes odoo/odoo#97129

X-original-commit: e6807b75e33ab3a083c84ace0b6c337e7566e64b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-08-01 09:34:39 +02:00
Xavier Morel 1a65d18ef7 [IMP] core: increase timeout in watch mode & tell client
Currently, when enabling watch mode on a tour the tour's timeout does
not change. This is usually an issue because:

- watch mode makes tours a bit slower, so they can timeout even
  without doing anything
- trying to diagnose what's wrong, it's common to add check steps with
  a long timeout or even a `debugger` statement, which trips the
  python-side timeout and kills the tour

To avoid needing to remember to update the timeouts (then revert them
afterwards), just bump the timeout to 1h by default, or 10x the
original time for very long tours (e.g. qweb test suite, which
currently has a 30mn timeout).

While at it, forward the watch mode status to the client via the QS,
so we can eventually make use of it for one reason or an other.

closes odoo/odoo#96994

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-01 07:32:39 +02:00
nni-odoo fe6782c6bc [FIX] l10n_id_efaktur: fix price when tax is not included
Columns involving price within the downloaded e-faktur document is supposed to report prices that does not include tax.
When taxes are configured to not be included in price (account.tax field: price_include), result would be correct.
However, if the tax configurations is "Included in Price", the price columns will not respect the official e-faktur guideline. Consequently, it will also result to the discount column to be incorrect due to the calculation.

2889400

closes odoo/odoo#97049

X-original-commit: 633c89bcc00cea674f2582c25dadafb2792d9945
Signed-off-by: William André (wan) <wan@odoo.com>
2022-07-31 18:00:13 +02:00
momegahed ab30b22210 [ADD] l10n_gcc_invoice_stock_account: SN/LN is not on invoice
Steps to reproduce:

1- create a company in saudi arabia
2- install l10n_sa and l10n_gcc_invoice
3- enable LN/SN on invoice from settings
4- configure a product with lot number
5- make a SO with that product
6- create an invoice and post it
7- print the invoice
8- Lot number information is missing on the invoice

Bug:

the implementation in
https://github.com/odoo/odoo/blob/15.0/addons/l10n_gcc_invoice/views/report_invoice.xml#L11-L16
is ignoring the inheritance in
https://github.com/odoo/odoo/blob/15.0/addons/stock_account/views/report_invoice.xml

so any view inheriting "account.report_invoice_document" will
not be called.

For stable, it can be solved with a bridge module.
For Master or for future versions, I think the implementation in
https://github.com/odoo/odoo/blob/15.0/addons/l10n_gcc_invoice/views/report_invoice.xml#L18

should be inheriting "account_report_invoice_document" instead
of overriding it. this will help eliminate the need for such
bridge modules in the future and reduce redundancy

Fix:
Create a bridge module between `l10n_gcc_invoice` and `stock_account`
OPW-2893130

closes odoo/odoo#96933

X-original-commit: 0d781b636f5fd19408e858323e83c223451adad6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-07-31 11:17:00 +02:00
rhe-odoo 08b3862a82 [FIX] pos_restaurant: delete table from ticket screen
When a table was deleted and the ticket screen was already loaded once with orders, if a table was deleted, the ticket screen cache would keep the tables recorded on the order.

Now, when a table is deleted, the ticketScreen cache is reseted.

This fix also delete the table from the list of the model.

closes odoo/odoo#97157

X-original-commit: 134c3228e02b3fbabdb411de872ff717a26a832e
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-30 14:51:51 +02:00
rhe-odoo 97517e8f01 [FIX] pos_restaurant: allow refund with no table selected
Before, when trying to do a refund from the floor plan, it was triggering an error.
Now we check if a table was set on the order. If the order was set on the order, then we make the refund on the same table.
If no table was set, then we take the first table available in the list.

X-original-commit: 53e2f382a18a7eda6e15934d36dfbe350b6a2e32
Part-of: odoo/odoo#97157
2022-07-30 14:51:51 +02:00
Yas-Elak 57512721b3 [FIX] pos_restaurant: avoid error when no tables
In the pos restaurant/bar the orders are linked to a table.
When a table is deleted, we try to load the table name to display it in
the order list. To avoid error, we only display the table name when a
table is set on an order.

OPW-2835603

X-original-commit: 974690616b953fc158a3cbcb49b12024258821e4
Part-of: odoo/odoo#97157
2022-07-30 14:51:50 +02:00
Andrew Chau d360b45737 [FIX] website_sale_comparison: Ensure product_data available
Check whether the product ID of the first item exists inside product_data
before trying to access it. Although it means the first item still does not
appear, both products will be present in the user's cookies.
When the user refreshes the page or navigates away, both products will be
visible in the comparison panel.

closes odoo/odoo#97152

X-original-commit: 5c6a92d0eb1e61cc2225a1b84ca1fb6c11365f2b
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-30 10:28:53 +02:00
dbkosky a15ecc8afa [FIX] l10n_it_edi: empty payment reference error
When the payment reference on an invoice is empty an error occurs when
trying to generate the edi xml. The error comes from trying to retrieve
a slice on a bool.

To solve this, a t-if has been added in this commit, such that the
function is not called when the field is empty.

closes odoo/odoo#97151

X-original-commit: 67616aac66a0b7895dfad80d825ecff7b4cd75b1
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-07-30 01:56:46 +02:00
Florian(flg) cf34b1e04a [FIX] account: Remove useless check on bank statement button post.
As we allow editing balances in processing state, we do not want
to check balances before the validation of the bank statement
(only in case of a bank journal).
Commit about editing balances: 03f83eb87da00938b9d2df78651c1e06cf8a6d58
This fix split the _check_balance_end_real_same_as_computed into
2 functions. One to check "bank" bank statement and one to check
"cash" bank statement. It allows to keep the same behavior for
a "cash" bank statement when we post the bank statement, and
having the right behavior for a "bank" bank statement.

opw-2835728

closes odoo/odoo#97153

X-original-commit: 2d97efb4c84f647be3eb03f249c52b236bf00d55
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-07-29 23:09:09 +02:00
Paolo (pgi) 1b8155aba5 [FIX] l10n_it_edi_*: ImportoTotaleDocumento must include ReverseCharge taxes
In the XML, on the field holds the untaxed amount but it should have the taxed amount.
The field inside the xml correctly takes the total amount of the
invoice, but on the invoice in Odoo when using a RC tax, the tax amount
is 0 in Odoo, so the total amount will be as it is untaxed on the XML.
That's because the repartition lines are +100%/-100% distributed, but in
the self-invoice they must be exported as +100%, so we re-add them to
the total.

Task link: https://www.odoo.com/web#id=2936967&model=project.task
opw-2936967

closes odoo/odoo#97147

X-original-commit: 83e41d6f1adc30e24cda95c5f4ab2a875e1bcaa0
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-07-29 21:31:12 +02:00
MerlinGuillaume fc58719d07 [FIX] web: edit radio and boolean widget fields
Fields with widget `radio` and `boolean` can't be edited

Steps to reproduce:
1. Install Discuss
2. Connect as demo and go to your preferences (top right)
3. You can't edit your notification type

Solution:
Use widgetOptions' mode along with hasReadonlyModifier to disable the
fields

Problem:
This PR https://github.com/odoo/odoo/pull/88223 modified the value of
hasReadonlyModifier which is used to disable radio and boolean fields

opw-2898464

closes odoo/odoo#97106

X-original-commit: 6befccd7c8ac22fe4da2a741efeecde2d036a7b9
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-07-29 18:34:23 +02:00
tsm-odoo c68c0f3400 [IMP] mail, *: remove create component methods in tests
*: sms, snailmail, hr_holidays.

task-2871066

closes odoo/odoo#97093

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-29 18:34:19 +02:00
Touati Djamel (otd) 2ab878aecb [FIX] mrp: do not confirm empty production with MTO rule
Steps to reproduce the bug:
- Create a storable product “P1”:
    - routes:
        - MTO
        - Manufacturing
- Create a SO:
    - Select the product “P1”
    - Confirm the SO

Problem:
The created MO is in confirmed state instead of draft.

This blocks the user, for example imagine that he has configured
the product with a first BOM without components and 2 others with
components. when the MO is created, the first bom will be selected,
and as the MO will be confirmed, the user will not be able to
select another BOM

Solution:
Since the MTO rule is not linked to an order point, we could be more
flexible, so the production created via `_run_manufacture()` without
bom or with a bom without component and operation via the MTO mechanism
will not be confirmed

opw-2897267

closes odoo/odoo#97099

X-original-commit: c623478aba040c0493e6da8a67c9742880572199
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-07-29 17:13:02 +02:00
Aaron Bohy d16ff3aa7c [FIX] web: actionService: consider "dialog_size" in context
In the context of an action, one can specify the "dialog_size" key
(only useful for actions in target="new"), which impacts the size
of the dialog. Before this commit, the corresponding bootstrap
classname wasn't applied. As a result, the dialog size was always
"large". This commit fixes that issue.

closes odoo/odoo#97085

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-29 17:12:56 +02:00
FrancoisGe a4df8804f4 [FIX] web: one2many contains at least 4 lines
An X2many always has at least 4 lines. If the X2many contains less
than 4 filled lines (Record or "Add a line") empty lines are added
to make up the difference.

For example, an X2many in edit mode containing only one record:
- Line containing a record
- Line containing "Add a line
- Empty line
- Empty line

closes odoo/odoo#97070

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 17:12:50 +02:00
Nicolas Lempereur 65a0eb7272 [FIX] base: fix autoresize and exclude gif
Odoo may resize attachment image with side larger than 1920 pixels.

But for animated gifs, this resizement seems to in general increase size
file which is not what we want (in some case making it grow from 3MB to
60 MB).

So with this change, we only resize and optimize images that are not
gifs.

Reasoning: pillow doesn't seem to resize GIF (and seems to only increase
their size, especially animated GIF, because each frame is not
optimized) so we should just not touch them.

Note:

- currently tiff were not resized (because of a mimetype typo)
- currently image dimensions were not resized (from our test, resizing
  on the dimension does not change the size much, quality is most
  important).

both of these issue have been solved in this commit.

opw-2897291

closes odoo/odoo#97083

X-original-commit: 6d903d61adba11c9e46009511fd4065dbc8a9e0c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-07-29 15:53:43 +02:00
qsm-odoo 1de5a22dfa [FIX] web: restore "auto more menu" feature ("+" button) post-BS5
Since the migration to BS5 at [1], the feature that makes a "+" button
appear at the end of the website menu was not properly working anymore
(the "+" button appeared while there were still enough spaces for more
menus).

This is because the logic uses regexes to match ml-auto and mr-auto
classes which do not exist in BS5 anymore, as they have been replaced by
ms-auto and me-auto classes (for "start" instead of "left" and "end"
instead of "right"). This also adds the new XXL breakpoint to the regex
(to match ms-xxl-auto and me-xxl-auto classes). This also adds a comment
so that if we were to grep searching for ms-auto or me-auto classes in
the future, we will find this code.

[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968

closes odoo/odoo#97081

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-29 15:53:40 +02:00
FrancoisGe 5419785092 [FIX] web: ListView invisible column base on context
Before this commit, in a ListView, a field containing an invisible
attribute using an expression to be evaluated was never displayed.

Example:
<tree>
    <field name="foo" invisible="context.get('notInvisible')"/>
</tree>
The foo column is never displayed.

The solution is to use the column_invisible modifier to know if the
column should be displayed or not. column_invisible contains the
evaluated expression of the invisible attribute by the server.

closes odoo/odoo#97066

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 15:53:34 +02:00
Laurent Smet fd764968b8 [FIX] base: Fix pdf generation for l10n_ch QR-bill
When printing the qr-bill for multiple records, we are no longer passing the code spliting the pdf for each record since 'attachment' is not checked on the qr-bill action report.

Bug introduced by:
https://github.com/odoo/odoo/commit/38e4a5fbc35b6089ec70b27e5ae74cc83c981a17

closes odoo/odoo#97050

X-original-commit: afaf7c1db4500c6115f119ff3592027e7b3b550d
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-07-29 15:53:31 +02:00
Pierre Paridans 7d9faadc5c [FIX] web,base: switch to newly installed lang button color
Steps to reproduce:
- Open Settings
- Add Languages
- Select a language
- Click Add
=> Text in the "Switch to..." button is miss-aligned and color is
unreadable.

This commit fixes the alignment by removing an exception to the dialog
footer's buttons alignment selector which is no longer needed and to
avoid confusion between inner-fields and buttons container.

Also, it fixes the color by rendering the language name as a readonly
text instead of a link inside a button (sic).

closes odoo/odoo#97007

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-29 15:53:24 +02:00
smdc-odoo 81720212e8 [FIX] account: fix cutoff percent display
Before this commit : When using the cutoff option (e.g. on journal
entries), the percentage in the wizard is displayed with 6 digits precision

After this commit : The percentage is displayed using only 2 digits precision

opw-2896143

closes odoo/odoo#96876

X-original-commit: d71e46dc8369b4d4c929321277a104f6db3fa7a8
Signed-off-by: Laurent Smet <las@odoo.com>
2022-07-29 15:53:21 +02:00
FrancoisGe be3163e608 [FIX] web: wait for onchanges to determine record validity
Before this commit, the checkValidity of a record did not wait for
the application of the current updates. This was causing crashes or
records being abandoned despite an update being in progress. It is
necessary to wait until all updates have been applied before checking
the validity of a record.

For an x2many in list mode:
- create a new line
- edit the line in a valid way
- click outside the x2many while the onchange is in progress.

Result before:
- display a crash

Result after:
- X2many correctly updated

For a list view:
- Create a new record
- edit a field of the record in a valid way
- click outside the list view

Result before:
- abandon the record

Result after:
- the record was saved

closes odoo/odoo#96725

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 15:53:18 +02:00
Joseph Caburnay 854b84b214 [IMP] pos_sale: show unpaid amounts in the sale order list
See PR description for more info: https://github.com/odoo/odoo/pull/95855

closes odoo/odoo#95855

Task-id: 2895483
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-29 15:53:15 +02:00
Younn Olivier cd2a649b8b [FIX] web, mass_mailing, website: remove frontend debug icon
After [1] moved the website edition in the backend, we feel that the
code required to make the additional debug icon in the footer of the
frontend still work is not worth it.

Before this commit, on a website page, it was not working: clicking on
it from the WebsitePreview client action would only remove the debug
mode of the frontend, and the backend would keep it.
The user can now leave the debug mode from the debug menu systray item
and we consider that leaving debug mode as a visitor (from the
frontend) is not a feature worth keeping.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#95499

Related: odoo/upgrade#3721
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-29 15:53:12 +02:00
Brieuc-brd f7469552a1 [IMP] mail, test_mail: TrackingValue, redesign
This commit redesigns the `TrackingValue` component.
Part of the ChatWindow/Discuss redesign

task-2823627

closes odoo/odoo#92872

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-29 15:53:06 +02:00
Brieuc-brd dc942516d4 [IMP] mail: MessageInReplyToView, redesign
This commit redesigns the `MessageInReplyToView` component.
Part of the ChatWindow/Discuss redesign

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd 9b995e5b7d [IMP] mail: Message, redesign
This commit redesigns the `Message` component for the ChatWindow,
Discuss and the Chatter. The purpose is to make the chats more
user-friendly.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd 15039761eb [IMP] mail: Adapt placeholder color
Prior to this commit the placeholder color was different when inputs
used the `.form-control` class.
This commit fixes this color difference.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd f169280275 [IMP] mail: increase the ChatWindow size
Following the redesign of ChatWindow, this commit increases its size.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:05 +02:00
Zelong Lin 1c1bcced26 [ADD] mail: compact message action list
task-2869932

Part-of: odoo/odoo#92872
2022-07-29 15:53:05 +02:00
Eleftherios Kritsotakis 0dd267a270 [FIX] point_of_sale: global discount taxes
In this commit we fix the tax calculation
when applying a global discount in PoS.

Before this commit, when applying a discount
tax was calculated properly only in the use
case where in one order we had:
- products with a single one tax

After this commit, the calculation of discount
and taxes is extendeted to include these additonal
use cases:
- products with more than one tax applied to them
ex. Product A -> 10% + 20%
- products with different taxes in the same order
ex. Product A -> 10%
      Product B -> 20%
- products with taxes that are included in prices
ex. Product A -> 10% (included in price) + 20%

Overall, we tried to follow a general approach
that will include as many use cases as possible
and every combination between them.

task-2421429

closes odoo/odoo#90505

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-29 15:52:53 +02:00
Horacio Tellez f8bebc407b [FIX] payment: do not add fee for validation transaction
When making transaction with 'validation' type and where fees
were active, fees were added to the amount.
This behaviour is problematic because
validation operations are used for tokenization for example where
no credit should charged to the customer.
Now validation operations have no fees even if fees are active
on the acquirer.

Task - 2784765

closes odoo/odoo#96712

X-original-commit: 69b04e753ab4e90e68b9d3e678ebea277586e7ac
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-29 14:31:49 +02:00
Touati Djamel (otd) d108db36ca [FIX] mrp: prevent the creation of component SN if option is disabled
Steps to reproduce the bug:
- Go to Inventory→ Configuration→ Warehouse Management →Operations Types
- Go inside “Manufacturing”, and disable the checkbox
“Create New Lots/Serial Numbers for Components” under the traceability
section
- create a MO with a traceable component
- Confirm the MO

Problem:
You can create a new SN for the component without any warning,
while the user is supposed to be blocked by a user error:
https://github.com/odoo/odoo/blob/master/addons/mrp/models/stock_lot.py#L11-L16

The solution:
We need to add the `active_mo_id` key in the context so that the user
error will be triggered

opw-2900256

closes odoo/odoo#96648

X-original-commit: 6d0ddc388d1c389e1911a6bb1c59c252870da1a7
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-07-29 13:11:04 +02:00
Florian Vranckxandnle-odoo f294079a89 [FIX] web : error when filter has empty selection
Steps to reproduce:
	- install approvals
	- in the approvals app go to filters>add custome filter> approval type
Issue:
	- traceback
Cause:
	- When no other module is installed, there is nothing to display under
	the approval type filter. Even if the field is not required,
	the javascript try to access the first element of the selection array
	to auto-fill the menu.
Solution:
	Add a check, if empty and not required, do not display it and leave the
	field empty

opw-2895516

closes odoo/odoo#96617

X-original-commit: 7fdbb1783ec65919a709e5fcac111994d0eb3cd5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: nle-odoo <nle@odoo.com>
2022-07-29 11:32:59 +02:00
Alexandre de Pape (alpa)andMorgane 2b29fc2dc8 [IMP] website_sale: add to cart button
This commit adds an 'Add To cart' snippet to the 'Web Editor'.

The snippet works as follow:

1. You choose the `product template` that you wish your users to buy.
2. If the product has more than 1 `variant`, a widget will offer you to either
let the visitor choose - this will open a modal for him to choose the variant
by himself - or select a variant yourself.
3. if `visitor choice` is not selected, a `buy_now` or `add_to_cart` action can
be configured; this will determine the behaviour of the button after the user
clicks it.

task-2824359

closes odoo/odoo#91882

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Co-authored-by: Morgane <morm@odoo.com>
2022-07-29 11:32:56 +02:00