Commit Graph
153151 Commits
Author SHA1 Message Date
Nicolas (vin) 42e9502ffc [FIX] account: improve demo data
Improve the demo data for bank statement in account by formatting the
payment_ref amounts using the company currency, and fixing the due
amount in one payment_ref to match the statement line amount.

Task id #2855485

closes odoo/odoo#98510

X-original-commit: 4b23d11184be9bac5ef9790cc7f38bc4d637b47a
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-08-22 08:57:47 +02:00
Xavier Morel c6a4332cf2 [IMP] core: update tests loader to correctly report syntax errors
Currently e.g. syntax errors during the import are logged as
exceptions but they don't fail the loading / testing.

Update the loading using more modern loading APIs, in order to not
catch them at all (let them bubble up normally), and instead just
find *IF* a module has a tests submodule before trying to load
in (LBYL).

Fixes #80198

closes odoo/odoo#97957

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-22 08:57:44 +02:00
Christophe Monniez 734debfb3a [FIX] web: increase clickbot click timeout
It happens that some pages are exceeding the click timeout of ten
seconds. Notably the settings, and as the settings are linked to
different menu's, it's difficult to black-list them.

closes odoo/odoo#98525

X-original-commit: 26665a5055842a40f3beb718bd63546758f190f4
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-08-20 13:40:36 +02:00
Hubert Van de Walle (huvw) e173961afb [FIX] web: mobile: highlight for selected record in list view
Steps to reproduce:

  - Load odoo on a mobile view
  - Go to Inventory > Products > Products Variants
  - Switch to the list view
  - Long press a record to enter the selection mode
  -> The selected records should be highlighted in blue

closes odoo/odoo#98186

Related: odoo/enterprise#30465
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-20 09:12:53 +02:00
Alexandre Kühn 4b275309b4 [IMP] im_livechat: introduce LivechatButtonView/isLastMessageFromCustomer
Task-2940469

closes odoo/odoo#97256

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-19 20:24:46 +02:00
Katherine Zaoral 00a88f5d98 [REF] l10n_ar: make more hederable _get_journal_codes
closes odoo/odoo#98509

X-original-commit: e4dbaa27e94a4a7667c751fa912ba49cc5907dce
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-19 19:10:57 +02:00
Nam Dao b041d377d1 [FIX] hr_expense: User with account permission but no employee permission can't register payment
- A user has accounting permission but no employee permission, when that user register payment in spending it gives an error that does not have access to the bank_account_id field
- This commit allows the user to read the bank_account_id field when register payment

Original PR: odoo/odoo#98432

closes odoo/odoo#98485

X-original-commit: 35e07de192dfeba0979170ba8421e4a61c5a483b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-19 19:10:54 +02:00
tsm-odoo 6167531d10 [FIX] mail: fix chatter attachment icon spacing
The attachment button on the chatter is way too close from its icon when
it has no attachment. This PR adds spacing between those items.

closes odoo/odoo#98471

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-19 19:10:48 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.

Before this revision,

in a back-end view:
 - In the Python model, if a field has the `groups` attribute set
   and the user is not part of
   the groups, the field is removed, completely, from the view.
 - In the view architecture, if a node has the `groups` attribute set
   and the user is not part of
   the groups, the node is made invisible (not completely removed, just
   made invisible).

in a front-end view:
 - if a node has a "groups" or "t-groups" set and the user
   is not part of the groups, the node is removed from the view.

So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.

In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
Adrien Widart 33f54c22c6 [FIX] website_sale_delivery: display the delivery price
Error introduced by [1], probably while fixing the merge conflict

[1] c9d7f8b0ed

closes odoo/odoo#98468

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-19 17:49:05 +02:00
Vincent Larcin 4bdd65d9c2 [FIX] project: force project active_id in view tasks action
Steps to reproduce
------------------

1. Install sale_project.
2. Create a product that creates a project on order.
3. Create a Sales Order with this project and confirm it.
4. Click on the 'Projects' stat button on the SO.
5. Try to click on one of the projects, you should get an error.

---

This commit fixes this error by properly using the id of the project
as `active_id` in the action to view its tasks.

Task-2957905

closes odoo/odoo#98464

Signed-off-by: Xavier <xbo@odoo.com>
2022-08-19 17:49:00 +02:00
Dossogne Bertrand 2b0521d91a [IMP] hr_expense: port expense form view to owl
taskID 2958013

closes odoo/odoo#98459

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-19 16:23:49 +02:00
Romeo Fragomeli 6ed6a512bf [FIX] web: restore order-* for some oe_stat_button
In BS4, the classes utilities order was set from `-1` (first) to
`13` (last). This commit restores the old behaviour.
In BS5, you only have a range from `-1` to `6`.

These classes are used in Odoo to order the `oe_stat_button`
particularly for UTM campaign. The order is set using CSS as there no
simple way to do it using `XPath` as there are many module (installed or
not) targeting the `oe_stat_button`.

closes odoo/odoo#98458

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-19 14:28:23 +02:00
Xavier ALT a91b53ed1d [FIX] base: fix qweb t-field with default value
Since 5913b7265e it was not possible
anymore to use default value with `t-field`, this commit restore the
previous behavior.

closes odoo/odoo#98453

X-original-commit: 12dc2353f572d097fc57ec723a11651a8471fdf5
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-08-19 14:28:19 +02:00
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