Commit Graph
153137 Commits
Author SHA1 Message Date
Stefan-Calin Crainiciuc (stcc) df9c2967f0 [FIX] hr_contract: remove create button for contract history
Steps to reproduce:
- install hr and hr_contract apps
- go to Employees app > Employees > Contracts
- switch to Kanban view

There you can see a 'Create' button. If you click it, it creates a
contract history form view for the default employee, which is 'False'.

This view is not needed, since it doesn't make sense to create a contract
history by itself, as opposed to creating a contract history when a new
employee is added to the database.

This commit removes the contract history 'Create' button.

opw-2929424

closes odoo/odoo#97780

X-original-commit: 337400b00bcaced2f27417e7a925582b80b6a514
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-19 14:28:16 +02:00
Laura Schauer c1b41bcd08 [IMP] payment(_*): allow dynamic token name
Before this commit, tokens were prefixed with usually 12 X’s. To improve
readability, modernity and to shorten the length, this commit changes
token prefixes to a standard of •••• 1111.

task-2832669

closes odoo/odoo#94978

Related: odoo/upgrade#3738
Related: odoo/enterprise#29190
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-19 14:28:08 +02:00
Victor Feyens 4c185d4a3f [FIX] payment: correct message for validation transactions
The message returned by `_get_sent_message` for validation transaction
was wrong, refering to a token, but there is no token on validation transactions.

This doesn't have to be fixed in stable since validation transactions are not linked to
any specific document, so the wrong message was never posted anywhere.

Now that we improve the display logic of payment tokens and noticed the problem,
this commit fixes it (for code consistency, and if any custom code/... uses this
message as well.

Part-of: odoo/odoo#94978
2022-08-19 14:28:08 +02:00
Samuel Degueldre abe4a01303 [FIX] web: fix autocomplete width being set to that of the parent
Previously, the autocomplete's width was set manually to that of the
parent. This is useless because the width is already set by the left: 0
and right: 0 rules in css. These rules are also incorrect, as we don't
want the width of the autocomplete to depend on the size of the input,
it should be able to overflow past the end of the input if necessary to
show the full width of the autocomplete items.

This commit fixes that, and relies on the usePosition hook for position
instead (as the position used to be left: 0 and right: 0)

closes odoo/odoo#98443

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-08-19 11:53:14 +02:00
Sébastien Theys 34d775e873 [IMP] mail, *: remove explicit usage of insert-and-replace
* = calendar, im_livechat, rating, snailmail, test_discuss_full, test_mail,
    website_livechat

Distinction between "replace" and "insert-and-replace" can be guessed based on
the type of the provided data.

task-2957295

closes odoo/odoo#98404

Related: odoo/enterprise#30580
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-19 11:53:05 +02:00
luvi ffb8823c1f [FIX] crm,*: fix styling issues in settings
*: point_of_sale, website

This commit fixes the style of the settings affected
by changes during the conversion to Owl.

Because of the new DOM of fields, some elements displayed
using the 'row' class were not horizontally aligned
because of the changes made to the DOM of the field that
were used. As the layout have changed, it was needed to
adapt and add new styling class in the template.

closes odoo/odoo#98387

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-19 11:52:59 +02:00
luvi d08c2e4a03 [FIX] web: add spacing in the DomainField
This commit adds some spacing between the text and the
button in the DomainField. Since the rewrite of the
field, the button was too close to the text that
preceded it. A minor margin have been added to the
button to avoid that.

Part-of: odoo/odoo#98387
2022-08-19 11:52:59 +02:00
Romain Derie a462d87c4b [FIX] *: set correct type on html field in xml created records
When a record is created through xml data, its HTML fields should
receive a `type="html"` attribute, not a `type="xml"` attribute.

When important XML data with XML type instead of HTML type will have 2
differences:
- The field value will be prefixed by `<?xml version="1.0"/>`
- If the HTML contains multiple root nodes, the value will be wrapped in
  a `<data/>` tag.

See `_fix_multiple_roots()` and the `xml_import` class for more details.

closes odoo/odoo#98239

Related: odoo/enterprise#30491
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-19 11:52:49 +02:00
Romeo Fragomeli bff483f4a3 [FIX] payment,website: Deletes and migrates col-*-offset- BS3 class
This rule has no effect for a while!

In settings, we had to delete it because converting it would add
space in the first column.

In payment, it seems that this offset was used to center the content.
We prefer to convert it.

closes odoo/odoo#98438

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-19 10:31:24 +02:00
Stefan-Calin Crainiciuc (stcc) a2122ebce2 [FIX] notes: push new notes to top of the list
Steps to reproduce the issue:

- Notes app > Kanban view > Create a bunch of notes using
the + icon in the kanban view
- (optional) Modify the default order of the notes
- Add a new note using the quick add feature
- Don't modify the order of the notes and refresh the page
- The new note will be sent to the bottom of the note list
(off-screen if the list is long enough)

This happens because new notes have their sequence set to NULL, which
places them at the end of the list after ordering by sequence.

This commit sets the default sequence of a new note to 0, so that it
is placed at the top of the list and adds an additional sort on
'id desc' to consider the case where all notes have the same sequence.

opw-2924615

closes odoo/odoo#98427

X-original-commit: ec719b166635df9ed31c9c2b47fedadd2311765c
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-19 10:31:21 +02:00
Vikash Tiwari 8263d0b496 [FIX] mrp: set default Operation Type in picking
Purpose
======
When creating a specific Operation Type of type 'Manufacture' the default
operation type is not the correct one on object creation.

So in this commit, we set default `Operation Type` in picking when Type of
Operation is `Manufacture`.

taskID - 2939078

closes odoo/odoo#98145

X-original-commit: b28c44a38698018ebbbc420f6567c17b2b97c279
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-08-19 10:31:06 +02:00
Téo Goddet 62fa76a044 [IMP] l10n_ch: allow to use Creditor Reference in swiss payment QR-Bill
Creditor Reference is one of the 3 allowed references type in swiss QR-Bills (with None and QR-Reference)

    It is used with normal IBAN (QR-Reference must be used only with special QR-IBAN)

    Fixes #71578
    Closes #81269

closes odoo/odoo#95518

X-original-commit: 8e1d86dcb10aebc1be1a318126492573a4b74331
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-08-19 10:31:03 +02:00
Téo Goddet 27fac8bb7c [CLA] Add Individual TeoGoddet
X-original-commit: b43e8ba9f72f52a5ce3ba78ad192ae1783bd1e4e
Part-of: odoo/odoo#95518
2022-08-19 10:31:02 +02:00
Bruno Boi df52c0297f [FIX] web: click on ViewButton will close parent Dropdown
# Issue
A Dropdown is not closed when a child ViewButton is clicked.

# Solution
Make the ViewButton close the Dropdown.

# Note
Usually, a dropdown is closed by a DropdownItem component.
This is not the case here, because the clicks on view buttons are stopped
(see the view button template). Letting them bubble would close their
eventual parent dropdown, but it brings other issues (e.g. for a view button
in a list renderer's group row, or view buttons that could get interpreted
as action links under some conditions <a type="action" .../>).

Instead of looking in the env to close the parent dropdown if any,
an alternative solution would be to extend the ViewButton component,
wrap it in a DropdownItem component, and reroute its `onClick` handler
to the DropdownItem's `onSelected` prop.
But this requires some preparation at the form compiler level
(when compiling the status bar buttons), which we thought was overengineering
at the time of writing.

closes odoo/odoo#98399

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-19 09:12:51 +02:00
Dossogne Bertrand cffedb2ee9 [IMP] hr_contract: hr_contract_history_list to owl
taskID 2957257

closes odoo/odoo#98397

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-19 09:12:48 +02:00
Achraf (abz) cb05925d99 [FIX] mail, website_*,base: Update data-toggle to data-bs-toggle
in bootstrap 5.x the toggle attribute changed from `data-toggle` to
`data-bs-toggle`, so we have to change `data("toggle")` by
`data("bs-toggle")`

https://getbootstrap.com/docs/4.6/components/collapse/
https://getbootstrap.com/docs/5.1/components/collapse/
https://getbootstrap.com/docs/5.1/migration/#javascript

Also using `$el[0].dataset.bsToggle` instead of `$el.data("toggle")` is
better since `data()` can be confusing

```js
const a = document.createElement("a");
> <a></a>
a.setAttribute("data-bs-toggle", "dropdown")
> <a data-bs-toggle="dropdown"></a>
a.dataset
> DOMStringMap {bsToggle: 'dropdown'}
$(a).data()
> {}
```

*/

https://pad.odoo.com/p/wowl_views
[aju] https://watch.screencastify.com/v/XuuQTkKRFX3lJh1vnvt9 project.task
kanban view > schedule an activity > mark it as done > traceback
https://pastebin.com/i96Krxrb

closes odoo/odoo#98339

Enterprise: https://github.com/odoo/enterprise/pull/30558
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-19 09:12:42 +02:00
Andrea Grazioso (agr-odoo) d3df2b2c3a [FIX] account: cash basis entry date
Create an invoice in date1 with a tax due based on payment (cash basis)
Create a credit note in date2 for the invoice (with date2 > date1)
Set tax lock date in date3 (with today > date3 > date2 > date1)
In the invoice add the credit note as payment

The system will block the action, because the created cash basis
entry would use as date the most recent between invoice and credit note,
which is previous to the lock date.

opw-2730106

closes odoo/odoo#98425

X-original-commit: 087e967f6ebf6e5829ec1d72a672841f8d543d4a
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-18 21:09:21 +02:00
Mossaab BOUDCHICHA c7b5ca0d5f [CLA] Signature for Mossaab BOUDCHICHA
closes odoo/odoo#98416

X-original-commit: 42cb8ad0a31162d9d1b93e4eae0562c89685fe3c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-18 21:09:18 +02:00
Zelong Lin 7be59d6603 [IMP] mail: add group_public_id into mock setup
task-2957108

closes odoo/odoo#98378

Related: odoo/enterprise#30582
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-18 21:09:12 +02:00
Jeremy Kersten b9e4068e82 [IMP] web: view metadata - multi xmlids
In case several xml_ids target the same record, now we show an icon with
other xml_ids (not the first one) as tooltip.

task-2954293

closes odoo/odoo#98139

Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-08-18 21:09:03 +02:00
Ignacio Cainelli 7c8b51e091 [IMP] l10n_ar: change message error
The error message now shows that a VAT tax must be added to that line
and that if it is already added, it may be misconfigured. This improves
the functionality since previously it showed that there should only be
one VAT tax and that could generate confusion in some cases

[CLA] add new members to Adhoc CLA

closes odoo/odoo#97640

X-original-commit: 16200f80cd8ae7a471725833655a06fe049b5b4b
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-18 21:09:00 +02:00
Sébastien Theys 5b21f8b346 [IMP] mail: split localId and record indexing
Part of task-2741982

closes odoo/odoo#97026

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-18 21:08:56 +02:00
Thibault Delavallée edb4cb6f8c [REF][IMP] crm, event, test_mail(_full): make performance tests post-install
PURPOSE

Have more reliable tests.
Better spot side effects coming from sub addons.
Lessen non deterministic counters due to local db.

SPECIFICATIONS

Make crm, event and mail performance tests post install.

Update query counters with
  * local values (install module only with enterprise activated);
  * community / enterprise runbots (if value is different);
  * some notes on non deterministic issue if known;

Task-2925606

closes odoo/odoo#96446

Related: odoo/enterprise#29726
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-18 21:08:50 +02:00
David (dafr) 4c85ca43c1 [FIX] stock: Check move_id exist before using it.
Reproduce steps:
- Create P1: storable, tracked by SN, manufacture
- Create C1: storable, tracked by lot
- Add 100 unit of C1 in Stock location
- Add 2 unit of P1 in Production location
- Create BoM for P1 with C1 as component
- Create MO for 2 unit of P1 > Confirm > Mass Produce > Generate Serials > Apply
=> Traceback on ensure_one()

In mrp_production.py in _split_productions(), the 'move_id' field is removed before unlink() is called in order to avoid calling recompute_state().
As move_id is not guaranteed to exist, we need to check before using it.

OPW-2878461

closes odoo/odoo#98391

X-original-commit: 6f2b7af37468d97b8dd4eb6c8e4bdcbaf472a331
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: DavidFesquet <dafr@odoo.com>
2022-08-18 19:58:53 +02:00
tsm-odoo f02e532c76 [FIX] mail: fix traceback on rtc call
Since the PR hiding the screen sharing button on mobile [1], starting a
call result in tracebacks. The issue is that the code is using `env.device`
which is only available in the legacy env while discuss works with the wowlEnv.
In order to solve this issue, let's use `messaging.device` instead.

[1]: https://github.com/odoo/odoo/pull/97947

closes odoo/odoo#98400

X-original-commit: 5fb6ea52ef876939a316bfc289237b443089f37b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-08-18 18:25:43 +02:00
Romeo Fragomeli cf4f23d484 [FIX] web,*: adapt old BS4 classes
*: hr_org_chart,l10n_gcc_invoice_stock_account,mail,point_of_sale,
   purchase,website,website_sale,website_sale_autocomplete,
   website_slides_survey

Some commit have added old Bootstrap 4 classes after the merge of
Bootstrap 5.

Note that it's not possible anymore as the merge bot is now able to
detect it.

closes odoo/odoo#98349

Related: odoo/enterprise#30551
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-18 16:47:30 +02:00
Samuel Degueldre bdabc55280 [FIX] web: fix label with empty string rendering with default label
In legacy, when you have a label with a string attribute that is empty,
that label is rendered as empty. In the new form view, when the string
attribute was empty we would fall back to the default label for that
field, which is incorrect.

This commit fixes that by not rendering labels that have an empty string
at all.

closes odoo/odoo#98237

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-18 16:47:26 +02:00
Ipsita Borisagar 968c13103f [FIX] web_editor: error while changing background color of button
Before this commit:

When we want to change the background color of a button, clicking on that button
will occur traceback(dropdown is not a function).

After this commit:

Traceback will not occur by initializing the dropdown component as it has
converted into the OWL component.

Task-2916277

closes odoo/odoo#96508

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 16:47:24 +02:00
Andrea Grazioso (agr-odoo) b3fe75b2f3 [FIX] account: recursive computation with out-of-order bank statement
Have a sequence of bank statement out of order
i.e.
|id|  date  |
|--|--------|
|01|20/07/22|
|02|21/07/22|
|03|22/07/22|
|04|18/07/22|
|05|17/07/22|
|06|16/07/22|
|07|15/07/22|

Adding more out-of-order bank statement will trigger recomputation in
all the next (chronologically) statements.
As the records to recompute are ordered by id, it may occur that the
first statements to recompute have the highest date and cause a
recomputation recursion exceeding the limits

opw-2925984

closes odoo/odoo#98373

X-original-commit: f675222786a9f57199117d38fca529dd1b0c2104
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-08-18 15:08:10 +02:00
Michael (mcm) 162f783d34 [FIX] web: fix crash on list button cell click
This commit fixes an issue when clicking on a list button cell.

closes odoo/odoo#98358

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-08-18 15:08:04 +02:00
Florian Vranckx 14d1d46ced [FIX] hr_expense : mobile display quantity uom
Steps to reproduce:

	1. Install hr_expense,inventory
	2. Enable unit of measure in the invetory setting
	3. Create an expense product with a uom
	4. Switch to mobile display and refresh
	5. Try to create a new expense, the quantity field is not visible

Cause:

	In 15.0 it was decided in PR #68387 to switch from the selection widget to options. This changed the css of the element.

Solution:

	Checking the entire codebase with the following regex "<div.*class="o_row".*\n.*class="oe_inline".*\n.*class="oe_inline".*\n.*<\/div>"
	in order to find an other usage of o_row with two inline element yielded no result other than hr_expense. In order to minimise the amount of changes,
	a local fix of the styling is probably more appropriate.

opw-2924276

closes odoo/odoo#98336

X-original-commit: 0754f71b5e4760b1956f196f50bd6550e5fc41e0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-18 15:08:00 +02:00
Thibault Delavallée 7fb4d8f919 [FIX] mail: remove unnecessary getattr
We can access fields directly on a record, no need to have a getattr.

closes odoo/odoo#98287

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-18 15:07:57 +02:00
Thibault Delavallée 6942fd3e28 [IMP] (test_)mail: add composer fields in view
Some fields in composer model allows to control generated messages or emails
values. However they are not available in the form view. In this commit we
add them in form view as invisible, as a first step towards cleaning the
composer code and usage.

Next step will be to cleanup composer code to remove the onchange based on
template and have real computed fields. Those will require fields to be
available in views so adding them is a necessary first step.

Some tests are added to see the usage and purpose of some fields. This helps
having a better code coverage.

Query counters update when using the Form tool

  * adding subtype_id: 2 queries
  * adding author_id: 1 query

Task-2816845
Prepares Task-2088884

Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Thibault Delavallée 20a13cedea [LNT] mail: lint composer/template code for generating values
Purpose is to better spot field and classify them by usage. This code will
be modified soon and this prepares future modifications.

Task-2816845
Prepares Task-2088884

Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Renaud Thiry 00c04b7a8f [FW][FIX] mail: Give reply-to non-template value
When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.

This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'

On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.

This commit fixes that by correctly taking the rendered value of 'email_from'

Task-2816845

X-original-commit: e320b852e8f1958ac3dccaa5333420bb7b8d8f3d
Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Renaud Thiry fe0107803e [FW][IMP] test_mail: add test for from and reply-to computation in composer mass mode
FWD-PORT: updated to new test files, and tests are more in-depth since v14

When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.

This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'

On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.

Task-2816845

X-original-commit: b87df6664908615bdf57bf16e239a10c3f7bf89b
Part-of: odoo/odoo#98287
2022-08-18 15:07:55 +02:00
Michael (mcm) f20e3d13fc [FIX] web: fix state selection field position
Before this commit, the state selection field was positioned
on the left of the sheet, just above the title. Now, it is
positioned on the right of sheet.

This commit also fixes the text displayed by this field by
using the value of the fields (normal;blocked;done)_legend.

Finally, this commit removes the last uses of the deprecated
field `kanban_state_selection`.

closes odoo/odoo#97765

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-08-18 15:07:47 +02:00
Bruno Boi df05f8f91d [FIX] web: restore correct m2m_tags style
This commit completes the style of the tags of m2m_tags field.
Tags did not have correct colors and had border.
The commit also fixes the m2m_tags_avatar field for the same reason
as well as a traceback when clicking on the remove tag button.

closes odoo/odoo#96654

Related: odoo/enterprise#30012
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-08-18 15:07:43 +02:00
Nicolas Bayet 209cf112f1 [FIX] web_editor: properly remove image loading attribute
The fix that removed the loading attribute of images was targeting
the wrong method `_createWysiwygInstance`.
In 15.0, the method does have a typo (`_createWysiwygIntance`).

closes odoo/odoo#98363

X-original-commit: 7a352330094ee2e267f29d9f479b4e31e90dbec6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 13:47:00 +02:00
Louis Wicket (wil) 8537944b4b [IMP] mail: rewrite MessageReactionGroup/message to not use compute
closes odoo/odoo#98344

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-18 13:46:51 +02:00
Ivan Yelizariev 39d16f085f [FIX] website_sale: prevent changing name when invoiced are issued
/my/account controller blocks name/vat/company_name updating if there are issued invoices.

However Before this commit, user can change name via /shop/address page

STEPS

1/ install sales, eCommerce,inventory,Accounting
2/ create a sales order from the portal page, validate and create an invoice from SO and post it
3/ Try to change the name from the Portal > Account
Result - not possible = correct
4/ Place a new SO by the same portal user and edit the name on the address before proceeding to checkout

[1]: https://github.com/odoo/odoo/blob/1f49528a4b198e8912beb33be921d2855c694e2e/addons/account/controllers/portal.py#L111-L113

opw-2848251

closes odoo/odoo#98335

X-original-commit: 3c8337d17c23779ef265cb5037243b533725c494
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-18 13:46:48 +02:00
Nicolas Bayet 3dc3b6cc3c [FIX] web_editor: don't observe changes that cancel each others
Before this commit, if the mutation records would contain records that
would cancel each others, those change would be listened and considered.
For instance:
- Mutation 1: Adding ID on element A
- Mutation 2: Removing ID on element A
When processing the mutation records, it is useless to consider those
2 as the Id of the element A is the same before and after the mutation.

This led to multiple issues, especially in case where some elements have
the same branding (and are thus the same field/xpath).
In such cases, the editor is replicating the changes made on one of them
to the others to keep the "same" fields sync'd.
For instance, if you go on an event page and try to modify a date, the
change will be replicated at multiple place in the page which are
actually the same t-field.

When replicating those changes, somehow the jQuery Sizzle ID changes
were listened, leading to infinite loop of mutation observer.

Step to reproduce:
- Install website
- Go to any page and enter edit mode
- Click on the navbar and in the right panel select Vertical header
- Activate the CTA option in that navbar right panel (should already be)
- Click on the CTA button
- Try to edit the URL in the right panel or any link option (style etc)

The changes will be ignored as the button's section is being re-rendered
every 50ms infinitely.
On chrome you can easily see it by watching the DOM in the dev tool. The
section will blink again and again, hinting about DOM change.

opw-2893480

closes odoo/odoo#98331

X-original-commit: 97c712e81692661fc9bc65e0810abc4dc017ed87
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 13:46:45 +02:00
Josse Colpaert 7408eef971 [FIX] l10n_eg_edi_eta: avoid infinite loop by setting the blocking level to error
If you have only blocking level warning/info and
the batch is bigger than 25, then it will generate
an infinite loop.  In order to avoid that, when an invoice
is still to be signed we put it in error, also because
a manual intervention of the user is required anyways.

closes odoo/odoo#98322

X-original-commit: a707934ac0494b707975b96c18fddfd7b5ef8b9f
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-18 13:46:35 +02:00
Benjamin Vray bf5eabd03d [FIX] website: hide logo height scrolled option if no logo
Before this commit, the logo height scrolled option was displayed even
if there was no logo.

It was because the condition to display or not this option (in the
"_computeWidgetVisibility") had not been updated correctly when the DOM
of the navbar was refactored.

task-2800680

closes odoo/odoo#98321

X-original-commit: 2b2ff732914e6c491e48540958bec967a3acfe33
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-18 13:46:31 +02:00
Arnaud Joset 4525f14780 [FIX] rating: remove profiler in test
closes odoo/odoo#98319

X-original-commit: 2227cfb98d6ca3986e6344027690d8bb893e213c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-08-18 13:46:28 +02:00
Shawcker 747ac40b0d [FIX] stock_account: fix anglo saxon stockvaluationlayer tests
Currently the test in stock_account/tests/test_stockvaluationlayer.py for Anglo-Saxon accounting is slightly wrong as it uses a company that can change depending on which l10n is installed (mainly coming from the company's country_id and account_fiscalcountry_id). This means that the test might be running with different settings from one time to another (= non-deterministic) and fail in some circumstances.

This commit fixes this issue by making this test an AccountTestInvoicingCommon test instead. This allows for the use of a test company, always the same. Of course, a few items have to be re-created since they can't be inherited anymore.

closes odoo/odoo#96320

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-08-18 13:46:05 +02:00
Kevin Baptiste 1974f1a385 [FIX] hr_work_entry_holidays: bump query counter
odoo/odoo#96545 added an extra query - the query count needs to be bumped.

closes odoo/odoo#98348

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-18 12:24:46 +02:00
Romain Derie 35805108a7 [FIX] website: display website in ir.ui.view relation fields
Since [1], the ir.ui.view name_get can suffix the name with the website,
something like `Main Layout [Website 1]` instead of just `Main Layout`.
This is fundamental when managing a DB as with the multi website / COW
mechanism, views are duplicated, making it impossible to know which one
is coming from which website (or is the generic one) when selecting a
new record in a field input.

While it worked great for the autocomplete list, the default value when
loading the form/list views were still not displaying the website.
You thus have the same issue: you have to navigate to that view to
figure which one it is.
When managing multi website DBs, this is becoming tricky.

This commit also adds that behavior to the value shown when loading a
form/tree view.

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

closes odoo/odoo#98320

X-original-commit: d66f8649a8f18fc67a595dd5254d1aeb680c29c6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-18 00:23:43 +02:00
Philippe Wauthy d57aba65fa [FIX] hr_holidays: remove allocation_id on hr.leave
As part of hr_holidays B2B, the holidays allowances were moved from hr_leave_type to hr_leave_allocation.
This didn't allow to take a leave longer than the maximum duration of an allocation. Also, despite all the
allocations could have enough days for a certain leave, it was not possible to use all available days without
splitting the leaves across the different allocations.

This commit moves the holidays allowance to the hr_leave_type to remediate the issues described above.

task-2834887

closes odoo/odoo#98317

X-original-commit: 8c37d5c7cc397e517c43c1ec13a131b4b35e48b7
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-08-18 00:23:40 +02:00
Florian Charlier 992dfc4312 [FIX] mass_mailing_crm: fix link in demo data
So that the link works...

Task-2954531

closes odoo/odoo#98310

X-original-commit: 617a4b8245315cbd47f83bed3e2ad74b105b5975
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 22:52:17 +02:00