Commit Graph
156577 Commits
Author SHA1 Message Date
Dardenne Florent (dafl) edd296da29 [IMP] web: list: select range of records with shift
Before, in the list view, the user could not select a record range easily. He had to
check/uncheck manually each checkbox in the range.

Now, the user can select a range of records in list view by hitting its first record
and and its last record while holding SHIFT for the second.

It's also possible to do it with the keyboard:
- pressing <SPACE> to select a record and <SHIFT+SPACE> to select a range of records.
- pressing <SHIFT+ARROW> to extend to current checkbox

task-2039894

Part-of: odoo/odoo#99050
2022-11-30 15:06:00 +01:00
fdardenne 8414b797c3 [FIX] web: hotkey_service: replace by space
Pressing `<space>` in browsers results in a ` ` event key.
We don't want this event key as ` ` is not recognized and not
whitelisted in the hotkey service.

Instead we want to use `space` because it is more readable in the
codebase.

Part-of: odoo/odoo#99050
2022-11-30 15:06:00 +01:00
roen-odoo 80656a2672 [FIX] point_of_sale: recompute reward after pricelist change
Current behavior:
In the PoS if you apply a coupon on an order that contains 2 products
with different taxes, it will create 2 discount lines on the order.
If you change the pricelist, the discount lines won't have the correct
values.

Steps to reproduce:
- Create 2 different products with different taxes.
- Create a pricelist with a discount on the 2 products.
- Create a coupon that apply a 100% discount on the order.
- Start a PoS session
- Add the 2 products to the order and apply the coupon.
- The order total is now 0€.
- Change the pricelist to the one with the discount.
- The order total is different than 0€.

opw-3049098

closes odoo/odoo#106835

X-original-commit: 36dc1fce19403935770eaaaf5c1177fc8c1ef2bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-11-30 14:05:46 +01:00
niyasraphy 72aab77331 [FIX] base, hr_recruitment_skills: fix typo
closes odoo/odoo#106839

X-original-commit: 4e85ee767f9cc0781823c0bfb4c79df8da1c6c2e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-30 12:13:55 +01:00
niyasraphy c8f9a4ed6b [FIX] loyalty, pos_loyalty: fix typo in loyalty, pos_loyalty
closes odoo/odoo#106830

X-original-commit: 718fabf04247912df450974fad0da679007eb8e9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 12:13:52 +01:00
roen-odoo 728f41fb97 [FIX] pos_loyalty: fix typo in pos_loyalty
Current behavior:
If you create an empty Db and just create one coupon program for the PoS
, the `enter_code` button is not displayed. This happens because the
condition to show the button was looking for program type `coupon`
instead of `coupons`.

Steps to reproduce:
- Create an empty Db (Important)
- Install PoS and PoS Loyalty
- Create a coupon program for the PoS
- Open the PoS, the `enter_code` button is not displayed

opw-3078726

closes odoo/odoo#106824

X-original-commit: 1eaa36faf8447d6fbe80f4bcdb512dd4505827d8
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 12:13:50 +01:00
Fernanda Hernández f0790c63e9 [FIX] pos_restaurant: validate number of guest put by user
The user could make the mistake to put a large number in the `Guests`
input in the POS order and this is not validated, even an number more large
for the capacity of an integer, raising an uncontrolled error:

`psycopg2.errors.NumericValueOutOfRange: integer out of range`

this commit is adding a validation error in order to limit the number of `Guests`
with the maximum number for an integer:  2**31 - 1

closes odoo/odoo#106817

X-original-commit: 0ad071e5b132b8f24b8fccf1624ccf97778fe27b
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 11:09:01 +01:00
Dylan Kiss (dyki) b7e06b8c37 [FIX] l10n_be: translate Belgian tax report
The Belgian tax report was only available in French.
Now the tax report is available in English by default and there are official translations in Dutch and French.

Resources:
NL: https://financien.belgium.be/sites/default/files/downloads/165-625-formulier-2022.pdf
FR: https://finances.belgium.be/sites/default/files/downloads/165-625-formulaire-2022.pdf

[task-3074748](https://www.odoo.com/web#id=3074748&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106816

X-original-commit: cc3ab7609a20bd4ab61e8d929ce9050a85f69ca6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2022-11-30 11:08:58 +01:00
roen-odoo 5786d8adee [FIX] pos_restaurant: correctly save splitted order
Current behavior:
When splitting the order in a pos_restaurant session, the order was not
correctly saved in the backend. It resulted in an order that still had
all the product of the original order and another order with the
correctly splitted products.

Steps to reproduce:
- Start a pos_restaurant session.
- Go to table A and add 3 products to the table.
- Go back to the floor screen
- Go back to the table A
- Split the order in 2
- Click on payment, and go back to the product screen without paying
- Click on the ticket button, and click on the order that was splitted,
  it still contains all the products from the original order.

opw-3061569

closes odoo/odoo#106813

X-original-commit: bf8acd51ffb96048a7123d1abd2f6865d27a41f9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 11:08:56 +01:00
Arnold Moyaux f613ce968d [FIX] base, stock, delivery: replace support datamatrix barcode printing
This reverts commit 3ebe1185a4.

The code ECC200DataMatrix already exist in reportlab (that is already a dependance).
Some differences:
- ECC200DataMatrix only supports a Type 12 (44x44) C40 encoded data matrix.
  (214 alphanumeric characters and 14 to 27% of error correcting rate)
- pylibdmtx support more type and add a default to 24x24. So it means a
  (52 characters and 20 to 35% error correcting rate). It's also smaller
  to display.

We consider the gain too small compare to maintain an extra lib.

It also fix blured datamatrix in stock report if they contains too much
data.

*If you want to test 001234560000000018 is a valid sscc for package

closes odoo/odoo#106620

X-original-commit: 54ef19f41ffc4a6f715474b65a4183a7fa75feea
Related: odoo/enterprise#34422
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 10:05:27 +01:00
Tommy (tong) 81076aa514 [FIX] delivery: unit test
closes odoo/odoo#106717

X-original-commit: a1afad5a70e57444955223aa5c362d87cae37d6c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 09:07:52 +01:00
Julien Van Roy 5463c84669 [FIX] {l10n_}account_edi_ubl_cii{_tests}: handle price_include taxes
In Factur-X, there is no way to represent a tax "price_include" because
every amounts should be tax excluded.

Currently in Factur-X, a line with a tax price_include = True will be
incorrectly exported. Indeed, the Factur-X.xml is generated by setting the
GrossPriceProduct as the price_unit. In Factur-X, this amount (and the others
in the line details) should be tax excluded. Thus, it's wrong to set the
GrossPriceProduct as the price_unit.

To fix this, the GrossPriceProduct should be the price_unit if no tax
price_include = True is set, otherwise, the gross price = price_unit/(1+tax/100).

This way, the Factur-X file will be consistent with the norm.

Note that the import of a Factur-X xml will thus try to pick taxes with price_include = False,
and the price_unit will be tax excluded. If no matching tax with price_include = False is
retrieved, a tax with price_include = True is searched, if found, the price_unit is
recomputed accordingly. In both cases, the lines subtotals are the same.

opw-3032382

closes odoo/odoo#106718

X-original-commit: 7f93f72a4f874e7073c0fec8ab0a89ebbd13e029
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-11-29 17:22:56 +01:00
Antoine Vandevenne (anv) 78dee0874c [IMP] payment_demo: store a dummy provider reference on transactions
As provider references are included in the memo of `account.payment`
records, it makes sense to set one on demo transactions to mimic what
is done with other providers.

task-3063368

closes odoo/odoo#106486

X-original-commit: 73865f2bd03c7d224f0a64659652e8e40c4ba192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2022-11-29 17:22:54 +01:00
Horacio Tellez 376ad4a429 [IMP] account_payment: Better reference for account payment memos
The Memo field in the form view of the `account.payment` model
(the `ref` field) was a little cryptic and did not supplied a lot
of information about the payment.
After this commit the Memo will (if available) provide information
about the sales order, the partner and the payment transaction.

Task - 3063368

X-original-commit: 414fb09b718a100cb96857725523e7a9109135cf
Part-of: odoo/odoo#106486
2022-11-29 17:22:53 +01:00
Dylan Kiss (dyki) 3f38d903e9 [FIX] account,l10n_{au,in,gcc_invoice}: distinguish credit note titles
Currently we distinguish customer invoice titles based on the state they are in: draft, posted or cancelled.
For the customer credit notes we did not have this dinstinction.

This fix makes sure that the title of a credit note is also adapted based on its state.

[task-3067251](https://www.odoo.com/web#id=3067251&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106692

Related: odoo/enterprise#34464
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-29 16:19:46 +01:00
Dossogne Bertrand 228c6401d4 [IMP] hr_contract: ease contract navigation
Before this commit, the contract smartbutton on the
employee page redirected to the contract history page.
After this commit, the user will be redirected to the running
contract or any contract if there is some, or towards a new
contract form otherwise. To access the contract history view,
a new smartbutton has been added on the contract form.

Also added some hr_responsible_id to contract in demo datas
to avoid having empty required fields for employee contracts.

task-3056891

closes odoo/odoo#105416

Related: odoo/enterprise#33799
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-29 14:22:59 +01:00
niyasraphy ef7005f524 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

auto_install is Falsy by default
author is Odoo SA by default
summary & description are empty strings by default
application is False by default
test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content.

closes odoo/odoo#106686

Related: odoo/enterprise#34462
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-29 13:20:31 +01:00
Didier (did) c9ea3d0fa7 [IMP] web: expose immediate in useDebounced hook
Expose all debounced param in the hook.

closes odoo/odoo#106762

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-11-29 11:34:03 +01:00
qsm-odoo e18a4324d3 [FIX] website: stop showing CSS variable assertion tour step to users
Commit [1] introduced a website tour util to assert the value of a CSS
variable. This was used at the start of theme tours to check we are in
fact on the right theme before starting the tour.

While it's great for those tours when they are started as a test, it was
not meant to be shown to users following that tour. This commit fixes
that. Notice that theme tours are currently broken so the issue was
probably hidden. Those will be fixed at [2].

[1]: https://github.com/odoo/odoo/commit/b29e17765f4e912b2dd472493b5be500b3a32c87
[2]: https://github.com/odoo/odoo/pull/106703

Related to task-3084175

closes odoo/odoo#106756

X-original-commit: 696c45b4e5917d086f60fd960590328b878014f0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-29 11:34:00 +01:00
qsm-odoo 91435ba499 [FIX] website: properly flag website test tours as test tours
Commit [1] and [2] introduced test tours but did not mark them as test
tours properly, thus showing them to users (who are in debug=tests mode)
by mistake.

Note that [2] was silently fixed in the 16.0 forward-ported version...
that is why nothing shows up in this diff starting from 16.0.

[1]: https://github.com/odoo/odoo/commit/7655bface7f9e9bae8579e14e9a87b4f4801cc33
[2]: https://github.com/odoo/odoo/commit/a0c33c5f896718d1c03a6a50c981d6d75ce0d169

closes odoo/odoo#106755

X-original-commit: 101d83d483a329644d2d6afa8757a3e6d8a6bfb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-29 11:33:57 +01:00
Younn Olivier 99a6951f43 [FIX] web_tour: fix the tooltip content font-size
Before this commit, the tooltip content of a tour had a font-size set in
rem. As its container dimensions were computed using the root element
font-size, these dimensions were not correct if the tip was inserted in
a document with another root element font-size.

This was leading to a bug after [1] added an iframe to edit the website:
the backend and frontend root elements font-size are different and the
containers of tips targeting frontend elements were clipped.

This commit fixes the tooltip content font-size in px (with the
font-size used to compute the container dimensions), so that it can be
placed in iframes with a different root element font-size.

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

task-3035156

closes odoo/odoo#106746

X-original-commit: 8703c01d0c0c84331e4d4adb00c8def962635e17
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-29 11:33:55 +01:00
Younn Olivier c5bffd01cd [FIX] website_slides: fix slides_tour
Before this commit, the main website_slides tour, slides_tour, was
broken after [1] introduced the WebsitePreview client action.

This commit adapts it to work with an iframe.

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

task-3035156

X-original-commit: 4f463092c02bcf5201464b30d1d58b5c1b53cc70
Part-of: odoo/odoo#106746
2022-11-29 11:33:54 +01:00
Younn Olivierandqsm-odoo 3160e5d6e1 [FIX] website: fix the homepage tour
Before this commit, the website homepage tour was starting with an
unresolvable "Wait for the editor to be started", useful only for tests.

This commit removes that technical step for user tours.

task-3035156

X-original-commit: d45ce39b2904bcb4335f74fab3c42f3eebf477d5
Part-of: odoo/odoo#106746
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-11-29 11:33:54 +01:00
PNO 5527adc18e [FIX] stock: Fix quantity done on lots changing to 1
Issue:
At anypoint we should be able to call the method "_set_lot_ids" from stock.move on moves that are already done and the quantities should not change.
This is not the case for lots that get their quantity changes to 1 as if the product was tracked by serial number.

This commit should be seen a a complement to the commit: https://github.com/odoo/odoo/pull/79565

Fix:
Check the product is tracked by SN before trying to change the quantities to 1.

Related ticket: 2689724

closes odoo/odoo#91769

X-original-commit: b56f96d6d63435d629f0a8137a038dacaf0782fe
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-29 11:33:50 +01:00
Yash Pathak 203e10bdd5 [CLA] update OERP members
closes odoo/odoo#106752

X-original-commit: ad9dca99f266bc2612f6001382534ed05e11700e
Related: odoo/enterprise#34478
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-29 10:31:25 +01:00
Ivan Yelizariev 255e5c5804 [FIX] base,web: fix address widgets in reports for RTL
Address widget has `o_force_ltr` class [1] since Odoo 14 [2]. Somehow, it didn't
work in Sale Order report and everything was RTL. But since Odoo 16 address part
actually became LTR. It mixes things up, because partner name and phone number
in the billing/delivery sections is still RTL [0].

This commit fix it by forcing whole address block to LTR. Alternative solution
could be removing `o_force_ltr` class, but this approach looks more risky and
should be done in master instead.

[0]: opw-3053457

[1]: https://github.com/odoo/odoo/blob/1666ee5515996fab8a843b36b4fd93b776172f75/odoo/addons/base/views/ir_qweb_widget_templates.xml#L26

[2]: https://github.com/odoo/odoo/commit/5b7c3805a045d8824dd1b4fa0de07d90b17392c1

closes odoo/odoo#106750

X-original-commit: a63f616c280ff464e331e3ba97265a8c29a86871
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-11-29 10:31:22 +01:00
Kevin Baptiste 80576925e9 [FIX] hr_(holidays_)attendance: recompute overtime on leaves > 1 day
1/ When approving / refusing a leave spanning multiple days, the
   overtimes were only recomputed for the starting date and not the
   whole period.

2/ Overtimes should be computed whatever the kind of time off that's
   been taken (Absence or Other).

task-3073155

closes odoo/odoo#106751

X-original-commit: 116d7cb46132404354e00e67a2364b8239fcdce5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-29 09:32:48 +01:00
niyasraphy e5c792510a [FIX] sale_expense_margin: remove duplicated if condition
closes odoo/odoo#106748

X-original-commit: 63c85bf237eaa2262fa9abf7e63595b8465d5586
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-29 09:32:45 +01:00
Ricardo Gomes Rodrigues (rigr) 581da8ca32 [IMP] l10n_pt: refactor Portuguese localization
This commit completely refactors and updates the Portuguese localization to include the:
- Chart of Accounts (the accounts as well as the account groups)
- Fiscal positions
- Taxes (including the ones from the islands of Madeira and Azores)
- Tax groups
- Tax report according to the Governement template
- Translations files to have the official translations of the accounts, the tax report, ...

Links:
CoA: https://www.occ.pt/fotos/editor2/taxonomiasplanocontas_fev2019.pdf
EU reverse charge: https://europa.eu/youreurope/business/taxation/vat/cross-border-vat/index_en.htm
Tax report template: https://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/modelos_formularios/iva/Documents/declaracao_periodica_IVA.pdf
Information on how to complete the tax report: https://www.occ.pt/news/_manual/ColecaoIVA2019.pdf

Task id 2755518

closes odoo/odoo#87572

Signed-off-by: Laurent Smet <las@odoo.com>
2022-11-29 09:32:43 +01:00
Antoine Dupuis (andu) d76e3bb82e [IMP] account: Change 'Miscellaneous' menu to 'Journals'
In Odoo 16, we redesigned the `Accounting > Miscellaneous` menu to
provide a convenient interface for inspecting any journal entry or
journal item.

As such, it no longer makes sense to call it 'Miscellaneous'.

This commit aligns the name with the new functionality.

We also remove the default filter of the 'Journal Entries' view, which
restricted it to miscellaneous entries, and replace it with a filter
on posted entries, consistent with the purpose of conveniently
inspecting the accounting journals.

closes odoo/odoo#106749

Task: 3083921
X-original-commit: ee551d74557b889a463bd7dff234ff5f12539e4a
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2022-11-28 20:50:25 +01:00
Antoine Guenet 091dfca6fb [IMP] web_editor: align editor columns with editable bounds
Columns added with the "columns" Powerbox commands should be aligned
with the editable element's bounds.

task-3001988

closes odoo/odoo#106747

X-original-commit: fb55f688f6be2211ebeea4ba431a06230c40fb6b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-28 19:49:04 +01:00
qsm-odoo e16fef2380 [FIX] website: hide backend navbar tour tips when entering edit mode
When entering edit mode, the navbar is hidden. The problem is that since
the merge of the website-in-backend feature at [1], it is only not shown
via an animation (height 0 + out of screen) but not `display: none`. The
tour system thus thinks it is still shown and keeps showing the related
tour tips.

E.g. with website_sale installed (and no demo data, to have the tours),
go on the shop page, there is a tooltip pointing at "+ New", enter edit
mode => the tooltip is still there and it even prevents to click on
"Discard" to leave the edit mode.

This commit fixes the issue by making the navbar `display: none` once
the closing animations are finished.

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

task-3082439

closes odoo/odoo#106735

X-original-commit: cdc8d4c889b316664323afad0d848403960150d5
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-28 18:51:53 +01:00
qsm-odoo 1419655e16 [FIX] website: allow to exit fullscreen if not on website anymore
While showcasing your website inside the website application, there is
the possibility to hit the escape key to enter fullscreen (hiding the
backend navbar outside edit mode and the editor panel during edit mode).

There was a problem following this flow:

- Go to your website inside your website app
- Hit escape to enter fullscreen
- Press CTRL-K to switch to another part of the backend
=> You are now somewhere in the backend, without the navbar (fullscreen)
   and you cannot exit it.

As it was a one-line fix (except for the re-indentation), this commit
now allows to exit fullscreen mode wherever we are.

Discovered during task-3082439

X-original-commit: bd225ec782e26c87301e9e786ffd7250ad62ebfc
Part-of: odoo/odoo#106735
2022-11-28 18:51:52 +01:00
shsa-odoo bd1850d30f [FIX] mass_mailing: should not crash when loading snippets
Current behavior before fix:

In mobile view when we click invite button on events module which loads the
snippet, at that time there was a traceback.

Desired behavior after fix:

Now the snippet gets loaded without any traceback.

Task-2994261

closes odoo/odoo#106734

X-original-commit: 634f6ae4d4208f0551bc2b81c359915eb47316b5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-28 18:51:49 +01:00
Samuel Degueldre 2b33d2113e [FIX] web: make originalError the root of the error chain
Previously, when calling error handlers, we would give them a new error
created by the error service, as well as an `originalError` which is the
error that was caught by the error service. In some cases, this error is
part of an error chain, eg: errors that happen in the owl lifecycle are
wrapped in an `OwlError`, so that when an error occurs in a callback
passed to a lifecycle hook, the position where the hook was called to
register the offending callback is part of the stack trace.

In practice, most error handlers only care about the error that caused
the entire error chain (the root) when deciding whether they should
handle the error or not, eg: an RPCError should be handled by the rpc
error handler, regardless of whether it occured in an event handler or
in a component's willStart. It already reads the traceback to display on
the UncaughtError provided by the error service as this traceback
contains the entire error chain stack information and is annotated with
source maps by the error service.

This commit makes it so that the `originalError` passed to handlers is
now the root of the error chain, it also sets the `cause` of the
UncaughtError which is passed to handlers as the error that was caught
by the error service, so that if a handler needs to inspect the error
chain to know whether it can handle the error or not, it can still do
that.

related to OPW-3069633

closes odoo/odoo#106720

X-original-commit: dd6f103b1635868e03a7aa40eb7186861d22d377
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-11-28 18:51:47 +01:00
Romeo Fragomeli 755cb64b4a [FIX] web: titles are smaller in reports
Since the Bootstrap 5 migration the "headings" `<h1>`, `<h2>`, ... are
smaller than before.

This commit, restores the old CSS rules from Bootstrap 4 for reports.

Steps to reproduce:
* Open Sales
* Select a quotation
* Print the Quotation (using Print dropdown) => BUG title is smaller
  than the old version of Odoo (e.g. Odoo v15)

closes odoo/odoo#106721

X-original-commit: 76299a8d63e85249d30d864a777c2f142ea5daf5
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-11-28 17:54:03 +01:00
Kevin Baptiste 0a0c6917b5 [FIX] hr_holidays: take full day leaves on Day view
The default hours of a time off created from the Day view would be the
range of hours that was selected in the calendar view, thus resulting in
leaves of half an hour.

closes odoo/odoo#106719

X-original-commit: 1ea102d4a2d62308c6dfaa7c3a71fdc4c6c4db85
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-28 16:53:48 +01:00
Romeo Fragomeli 3dc6d81590 [FIX] web: kanban: quick create column text wrapped
In kanban view, the columns are in a flex container and as there is no
specific flex rules on the quick create column and is shrink by
default. So when the new column is above the edge of the viewport, it
starts to shrink.

To avoid this bug we have added the same flex rules has the kanban
column.

Steps to reproduce:
* Open Note
* Create many new column => BUG text wrapped when the new column reach
  the width of the viewport.

closes odoo/odoo#106683

X-original-commit: 62b692b6edd7d57ef14c02ecd5b731c8ba664b98
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-11-28 15:53:25 +01:00
Patrick Hoste 58fa3d1ece [FIX] mass_mailing: fix unsubscription_date when opt_out on create
Before this commit when creating a mailing contact with a mailing
list opt_out at creation the unsubscription_date wasn't set.
Indeed, from the mailing contact view the mailing list uses an
editable list that passes all the values at create even when not set
contrary to when one update the contact only the changed values are
passed. This commit fix this issue.

Task-3070852

closes odoo/odoo#106682

X-original-commit: e7c22094068ce5cdff7f30178cea6d4f39f09137
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Hoste Patrick (pko) <pko@odoo.com>
2022-11-28 15:53:23 +01:00
Florent de Labarre 44c407da3c [FIX] stock: impossible to search correctly location
Before this PR Odoo don't pre-search on location.

closes odoo/odoo#106680

X-original-commit: 55729e2bfb402e5af6569c8dd19ee8495fa244a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-28 15:53:20 +01:00
niyasraphy 4b04d2d7d3 [FIX] lunch: timezone field alignment in alert form view
closes odoo/odoo#106679

X-original-commit: 4b0efa700d045b6f8f8b7569d498137af4d09909
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-11-28 15:53:17 +01:00
Valentin Vallaeys (vava) 3e0c80270d [FIX] product,web: color_field fixes for product variant color
There was a typo in the color_field xml not allowing to disable the
pop-up in case of readonly. A test validates the feature is active.

The color_field now displays the transparent symbol (instead of black
color) in case the color is undefined.

The product configurator also displays the transparent symbol for
undefined non-custom colors.

task-3013110

closes odoo/odoo#106669

X-original-commit: c67c32c2dbe10b4885ec1177852839b3d18ecf05
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2022-11-28 15:53:11 +01:00
Odoo's Mergebot 70a6407d6c [MERGE][REF] account, mail, sale: properly locate code
PURPOSE

Purpose of this task is to cleanup attachment management done in composer overrides
in account modules and move it to model.

SPECIFICATIONS

Accounting holds code to handle attachments linked to their custom composer
(``account.invoice.send``) that uses through inheritance the mail composer
(``mail.compose.message``) that has a specific processing of attachments
to link pending composer attachments to the right records. Move it as a classic
model override for account.move

Account_edi and various l10n submodules hold some custom code to generate and
handle EDI attachments. It is used to add attachments linked using AccountMove
specific 'edi_document_ids' field when sending emails based on templates.
Move it as a classic model override for account.move and account.edi.document.

Move model-specific overrides of the mail composer directly at model level in
purchase and (website_)sale.

Update some naming and docstrings accordingly. See sub commits for more
details.

LINKS

Task-2710804 (Mail: Clean MailThread API)
Task-2792146 (Mail: Move model-dependent code from composer / template)

closes odoo/odoo#106658

Related: odoo/enterprise#34439
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-28 15:53:00 +01:00
Thibault Delavallée 04c1959456 [MOV] account, mail: move model-specific template code to model
PURPOSE

Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.

SPECIFICATIONS

Account_edi and various l10n submodules hold some custom code to generate and
handle EDI attachments. It is used to add attachments linked using AccountMove
specific 'edi_document_ids' field when sending emails based on templates.

Currently MailTemplate is overridden in accounting modules to hold code related
to AccountMove and AccountEdiDocument attachments manipulation. This is linked
to EDI and report naming, not mail specific. This should therefore not be
implemented at template level, but in those specific models.

For that purpose we introduce a method in MailThread that allow to handle
attachments when being in a template context. An override in account_edi
allows to implement its specific behavior.

By the way an old docstring in l10n_it_edi that was quite unrelated to the
override is also removed, as it was more confusing than helping.

Task-2792146 (Mail: Move model-dependent code from composer / template)
Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#106658
2022-11-28 15:52:59 +01:00
Thibault Delavallée 0be5b37008 [MOV] mail, loyalty, purchase, (website_)sale: move model-specific composer code to model
PURPOSE

Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.

SPECIFICATIONS

Update addons

  * in purchase and sale: context key update should be done at message_post
    level, especially this is not used in mass mailing mode;
  * in website_sale: code to update sale order to avoid sending recovery
    emails several times belongs to a "post hook" method on sale order model;
  * in loyalty: remove a deprecated / unsupported 'mark_coupon_as_sent' key;

Task-2792146 (Mail: Move model-dependent code from composer / template)

Part-of: odoo/odoo#106658
2022-11-28 15:52:59 +01:00
Thibault Delavallée 1c240f11df [IMP] mail: cleanup code bits in attachments processing
Purpose of this commit is to try to make code a bit easier to follow using
dicts, sets and tuples, as well as updating some variable names.

Also rename the method to be clearer. Tools methods may omit the namespacing
to avoid too much confusion in naming.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#106658
2022-11-28 15:52:59 +01:00
Thibault Delavallée 0ea4c3110a [MOV] account, mail: properly locate attachments management on model
PURPOSE

Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.

SPECIFICATIONS

Accounting holds code to handle attachments linked to their custom composer
(``account.invoice.send``) that uses through inheritance the mail composer
(``mail.compose.message``) that has a specific processing of attachments
to link pending composer attachments to the right records.

Indeed attachments linked to the composer are pending attachments, and are
linked to the record when posting the message. This allows to know which
attachments have been added by the user, have specific rules for access
rights, ...

However this code has been wrongly added directly at mixing level at
odoo/odoo@bdcc012004. Instead ``_message_post_process_attachments`` method
should always be called based on a record, allowing to locate the override
at model level.

Task-2792146 (Mail: Move model-dependent code from composer / template)
Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#106658
2022-11-28 15:52:58 +01:00
Thibault Delavallée f1bb452ce4 [MOV] mail: move method to process attachments
Purpose is to make a section that will cover pre- and post- process methods
for posting or mailing records.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#106658
2022-11-28 15:52:58 +01:00
Kartik Chavda 49977c1116 [FIX] hr_timesheet: fix searching on is_project_overtime field
Before this commit Projects in overtime filter does not return
project as expected after project has allocated hours to set
on then.

This commit fixes by taking allocated hours into account to
search for project that are in over time.

task-3000817

closes odoo/odoo#106657

X-original-commit: cbd091cb088fba44c14c27dbbc9e8ca098742da1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-28 15:52:49 +01:00
Jérôme Hellinckx 86ad480b72 [FIX] purchase_stock: avoid PO exception propagation to DONE receipts on less received quants
Before this commit:
1. Create PO with quantity 10, confirm (creates receipt-1)
2. Receive 2 quantities on first receipt (receipt-1), backorder (receipt-1 is 'done', creates receipt-2)
3. Receive 3 quantities on second receipt (receipt-2), backorder (receipt-2 is 'done', creates receipt-3)
4. Change quantity to 5 in PO
5. An exception is created on all receipts (1, 2 and 3)

In the scenario above, receipt-1 and receipt-2 are partial receipts that are set to 'done'.
It is not necessary to create an exception in these receipts when the quantity is changed to less than originally expected in the PO.
Since the system checks that the new quantity has to be equal or greater than the received quantities, the already received quantities cannot be impacted.

After this commit:
The exception is only propagated to the receipts that are not done.
e.g. in the example above, an exception appears only in receipt-3.

task-2648209

resolves #76297

closes odoo/odoo#106633

X-original-commit: d6fad232c3dd4a4f7cd54bd255b75314d54ed065
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-28 14:51:42 +01:00