Commit Graph
161467 Commits
Author SHA1 Message Date
tsm-odoo e2fbff5511 [FIX] im_livechat: fix chatbot restart message display
Markup usage has been enforced in the mail module since [1].

Since the `chatbot_restart` method doesn't make use of it,
the content is escaped and the whole html structure is
printed to the DOM.

This PR fixes this issue.

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

closes odoo/odoo#122251

X-original-commit: 4909bdfbb0354310f3e6d21e1ecc7177b74b34bc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-24 14:28:14 +02:00
Josse Colpaert bbf4fb625b [IMP] account_edi: refactor method to override mail attachments in localizations
closes odoo/odoo#122187

X-original-commit: 8d815adb0254256aa707d8c5568330adf25d83c1
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-24 14:28:12 +02:00
Arnold Moyaux a78bba1214 [FIX] stock: prevent the import of stock.move.line with reserved quantity
Use case: Create an import file for a picking with stock.move.line
directly in it and add some reserved quantity on the stock.move.line.

The import of stock.move.line is not possible directly via a
stock.move.line menu but it still possible on a picking or
mrp.production import. However the create does not expect that and never
reserve the quants. So it result with quant <-> sml inconcistencies in
the data and the error can not reserve more than you have in stock.

opw-3277938

closes odoo/odoo#122156

X-original-commit: 3e78316a51f2cb8d347af1b87abcdcb775107115
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-24 14:28:09 +02:00
Abdelouahab (abla) 90c94b0de1 [FIX] hr_expense: scrolling in tree view
To reproduce
============
create many Expenses records, go to expenses in List View
scrolling not working

Problem
=======
some style classes are not applied on the correct element, which leads to this behavior

Solution
========
apply the classes on the correct element

opw-3300041

closes odoo/odoo#122133

X-original-commit: b7bc19e30afaf1e6374620b7a3bfbdf26c63e765
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-24 14:28:06 +02:00
Samuel Degueldre c7ce04a8ed [REF] point_of_sale, pos_hr: remove HeaderButton
The HeaderButton component is used once and is mostly presentational,
this commit inlines it into the navbar.

closes odoo/odoo#122035

Related: odoo/enterprise#41336
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-24 14:27:59 +02:00
Samuel Degueldre 6f18cffb60 [REF] point_of_sale, pos*: remove BackendButton component
pos*: point_of_sale, pos_hr, pos_restaurant, pos_sale

This component is purely presentational and contains no code, it's also
only used once (it was actually used a second time in pos_hr only
because the way the xpath was written would replace the existing
instance with a new one with an added t-if, we can just use an attribute
xpath instead).

Existing xpaths have been adapted such that the burger menu's dropdown
structure is better semantically (an unordered list containing list
items, instead of containing list elements inside of random divs)

Part-of: odoo/odoo#122035
2023-05-24 14:27:59 +02:00
Samuel Degueldre ebe526241f [REF] point_of_sale, pos_restaurant, pos_sale: remove useless base class
The IndependentToOrderScreen base class is used when a main screen
should not be stored on the order (so that it can be restored when the
order is selected again). Its implementation is simply a class with a
static flag, and a super simple close method which just calls the
equivalent method on the pos store. It has been removed and the classes
extending it have been adapted.

Part-of: odoo/odoo#122035
2023-05-24 14:27:59 +02:00
Samuel Degueldre 190fefc9ca [REF] point_of_sale: remove MobileOrderWidget
It's a very short component with no oevrrides that contains almost no
logic and whose template is ~10 lines of code. It has been inlined into
the ProductScreen.

Part-of: odoo/odoo#122035
2023-05-24 14:27:58 +02:00
Samuel Degueldre 09db8c2775 [REF] point_of_sale, pos_sale: remove orderManagement context
Previously, the pos used singletons of reactive object to create shared
state between components that could be imported. This is an ugly
solution and this kind of "module level" object is difficult to patch or
mock during tests. It's also a non-standard way to manage shared state.

This commit simply adds this piece of shared state to the pos store,
which is meant to hold the shared state of the pos.

Part-of: odoo/odoo#122035
2023-05-24 14:27:58 +02:00
Samuel Degueldre d49476e0f8 [REF] pos_sale: remove unused mobile order management screen
The mobile order management screen has never worked. A previous commit
partially fixed it and caused it to now be rendered, but it's always
rendered in a way that makes it no different from the desktop order
management screen. The code has been dead for so long that allowing the
code to go through the dead path crashes and after fixing the crashes
the layout is broken. As such, this commit removes it entirely, and if
the flow needs improvement on mobile it will be done as part of a
separate task instead.

Part-of: odoo/odoo#122035
2023-05-24 14:27:58 +02:00
Samuel Degueldre cfcd25df39 [REF] point_of_sale: remove CurrencyAmount component
It's only used twice, in a single component, and it's used to do
different things, one of which is just handled by formatCurrency
already. It's been inlined to the only other use site.

Part-of: odoo/odoo#122035
2023-05-24 14:27:58 +02:00
Valeriya(vchu) 2173c252ad [IMP] payment_(adyen, stripe): webhooks transition from json-rpc to http
to return the response with correct status code as json-rpc returned status code 200 even if there was an error
task-2835711

closes odoo/odoo#117940

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-05-24 14:27:44 +02:00
Aurelien van Delft (avd) a55a08ef56 [FIX] purchase_stock: _compute_on_time_rate optimizations
Turn the call to filtered after the search on purchase.order.line
into a call to _search. This allows to remove filtered by adding
an additional leaf in the search domain.

Add read calls to fetch fields from db and store them in cache
on recordset batches.

Example speedup: partner with 136555 POL 6.33s -> 3.42s

opw-3277299

closes odoo/odoo#122218

X-original-commit: b3e81b092864c71a9d5d097fbfa965319acf4fba
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Van Delft Aurélien (avd) <avd@odoo.com>
2023-05-24 13:10:51 +02:00
Feyensv 9d6086186b [FIX] sale: show custom ptav in the right order
The value of custom ptavs is store on the sale order line.

Currently, they are ordered by ptav id but they are ordered by the ptav
sequence everywhere in Odoo.

Now, on the sale order line, custom ptav are ordered by ptav sequence.

opw-3234669

closes odoo/odoo#122206

X-original-commit: fa25206634e11ce1fd9030508772a1802ef86fa2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-05-24 13:10:46 +02:00
Mahdi Cheikh Rouhou (macr) 3267f4b46e [FIX] web : align number on right in rtl lang
Numbers should be alinged on the right in rtl langauge same as ltr langs

Steps to reproduce the isse :
1- Change the language to arabic
2- To to the list of invoices in accounting and you can see that the numbers are aligned to the left

The origin of the problem is that rtlcss reverse the alignment from right to left

opw-3295573

closes odoo/odoo#122196

X-original-commit: 180139cd9244b6d6c7fc3b22e37d691215790359
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-05-24 13:10:43 +02:00
Michele 724df8a570 [IMP] core: new neutralize flag on database restore and database duplicate dialog
Before this PR:
The only way to neutralize the database is running cli command neutralize

After this PR:
There is a new checkbox "neutralize database" in Duplicate database and Restore database dialog that neutralize the database after duplication/restore.
I also moved the neutralization code to the external module so it can be called also outside the cli .

closes odoo/odoo#122185

X-original-commit: 616740e9d09b3d0376be43ed1489e390f6f5823e
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-05-24 11:53:38 +02:00
Andrea Grazioso (agr-odoo) d95ef62181 [FIX] account: display invoice report in journal items view
Create an invoice
Send & Print
Go to Journal items
Select created invoice line

Issue: No preview is shown
This occurs because the attachment was created with res_field
'invoice_pdf_report_file'
When we search without res_field the method _search of
ir.attachment will add ('res_field', '=', False) to the domain
So we don't find the generated report

opw-3301344
opw-3271602

closes odoo/odoo#122183

X-original-commit: 4a88945fb125716f4362252795e969f36b48391d
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-24 11:53:36 +02:00
xO-Tx ad8e80c90a [FIX] website: correctly mark translatable attributes
Steps to reproduce:

- Go to a website page > Add a 'Form' block > Set an input "Placeholder"
value.
- Go to the page (in 'edit_translations' mode) > The translation of the
input "Placeholder" attribute doesn't mark the input as translated and
even after saving the translation, the input is still marked as
"to_translate".

The goal of this commit is to fix this issue by extending the same
behaviour on the translated `<select/>` options (using `.oe_translated`
class) and setting the right translation state on the input from the
linked attribute translation `<span/>`.

task-3323245

closes odoo/odoo#122011

X-original-commit: 946de52ea80e0cf5f1284cea2134c22ffda3aa5f
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-05-24 11:53:33 +02:00
Tommy (tong) 17ff8fa45c [IMP] account_qr_code_emv,l10n_hk: add reference to emv qr code
Impacted versions:

- saas-16.3

Changes:

This commit improve below features:

- Add additional data field into qr code vals
- Override the additional data field in l10n_hk to support the new field
- Update l10n_hk unit tests
- Change FPS Identifier label

closes odoo/odoo#122224

X-original-commit: 27b729709e78855721111f6f8b34cd0532147ec8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Tommy Ng (tong) <tong@odoo.com>
2023-05-24 09:49:19 +02:00
Tommy (tong) cd53618d5a [FIX] l10n_hk: Fix unit test for FPS QR code
Current behaviour:
The unit test doesn't run.

Expected behaviour:
The unit test should run.

Explanation:
File name is not prefix with test so the file doesn't run.

X-original-commit: daaec6d52a58994ada7eb11faab903cd447ef9bd
Part-of: odoo/odoo#122224
2023-05-24 09:49:19 +02:00
Fabien Meghazi 2e3109b8ef [FIX] sql_db: use psycopg2.extensions.parse_dsn for dsn parsing
Before this patch the naive dsn parser `_dsn_to_dict` would choke
on `application_name` containing spaces or the equal sign.

closes odoo/odoo#122212

X-original-commit: 3573fe0726f8dde1c5714b7d501f6c43d97ce731
Signed-off-by: Fabien Meghazi (fme) <fme@odoo.com>
2023-05-24 09:49:16 +02:00
abd-msyukyu-odoo 2753d07b50 [FIX] web: rework draggable_hook scrolling
In Knowledge, the scrollParent for the `Y` axis of an embedded ungrouped Kanban
view is the article body, which contains the draggable `container` (which is
itself contained in the scrollParent for the `X` axis).

This commit introduce 2 fixes related to the `draggable_hook_builder`:
- In `draggable_hook_builder`, `updateRects` was modifying values of the
  `containerRect` from values of the `scrollParent`. Then, the `containerRect`
  was used in `handleEdgeScrolling` to compute a scroll value to apply on the
  `scrollParent`, and when updating the dragged element position, to compute the
  boundaries for the dragged element. This commit stores values for
  `scrollParent` in `scrollParentRect` alongside the modified `containerRect`.
  `scrollParentRect` will be used to compute the scroll value based only on the
  dimensions of the scrollParent, and the modified `containerRect` will be used
  to compute the boundaries.
- The `scrollParent` in the `X` axis can be different from the `scrollParent` in
  the `Y` axis. This commit stores both of them individually so that one is not
  neglected when higher in the DOM than the other.

Task-3291771

closes odoo/odoo#122211

X-original-commit: 1f784652f9431c8716329f284133df215656c4b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
2023-05-24 09:49:13 +02:00
Adrien Widart (awt) 500e8b5854 [FIX] barcodes: prevent enter if barcode
To reproduce the issue:
(Need `stock_barcode` and a real barcode scanner)
1. Create two products P01 and P02, each one with a barcode
2. Barcode > Operations > Receipts, Create
3. Scan P01
4. Scan P02
5. Click on the `+1` button on the line of P01
6. Scan P02

Error: Both lines are incremented. Scanning P01 should not impact the
quantity of P01

Because of step 5, the focus is still on that button when scanning
again P02 (step 6). Moreover, the scanner ends the barcode transmission
of P02 with an `enter` -> it will generate an event on the `+1` button,
which explains why the quantity of P01 is also incremented.

OPW-3232437

closes odoo/odoo#122200

X-original-commit: a5f566b57ace1d82e77f56f4c059eb595350e1cf
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-05-24 09:49:10 +02:00
Dossogne Bertrand 17c6aa21d9 [FIX] hr_holidays: fix My Time Off access in multicompany
Before this commit, trying to access "My Time Off" was
not possible if connected on a company while some leaves
were created from another company.
This commit restricts that view to the leave created from
the companies the user is logged into.

closes odoo/odoo#122186

X-original-commit: c0039aa40a1274110906e45ba07a318fc6218267
Signed-off-by: Gvaladze Sopiko (sgv) <sgv@odoo.com>
2023-05-24 09:49:07 +02:00
Victor Piryns (pivi) 31a62e3d16 [FIX] sale_quotation_builder: checkout product w/ quote description
Current behaviour:
If we add a blockquote in the `website_description` of a product on
the e-shop, we cannot checkout the product. Silent HTTP 400 error
code, due to an exception raised by
https://github.com/odoo/odoo/blob/bf772181933ce5334da35c8368455963b2478399/odoo/fields.py#L1987-L1993

Expected behaviour:
You should be able to checkout products even if they have blockquote
in their `website_description`.

Steps to reproduce:
- Install eCommerce, sale_quotation_builder (issue is present only
  after installing sale_quotation_builder)
- On a product, with the website editor, add a `blockquote` to the
  description of the product > Save
- In a private browser window, as public user, visit the product on
  the e-shop and try to checkout with it.
- Observe there is no visible error, and we do not proceed in the
  checkout process.

Reason for the problem:
The exception mentioned above is triggered when there is a
difference between the html content that is saved in the DB and after
sanitization, meaning that someone with escalated privilege saved
the HTML content by overriding the sanitization with
`sanitize_overridable`. In our use case the only diff is the
presence of the attribute `data-o-mail-quote-node` which is removed
after the sanitization.

Fix:
This issue can be resolved two ways:
1) Adding `data-o-mail-quote-node` to the list of save attributes,
   meaning it will not be removed during the sanitization process.
   Since this is an attribute that we add on `<blockquote>` nodes,
   it can be considered safe, just like `data-o-mail-quote`.
2) Remove the attribute sanitization of the `website_description`,
   just like it is done in the website_sale module.
   Since the `website_description` and `quotation_description` are both
   computed from one-another, they should have the same sanitization
   level.
I am implementing both solutions, 1) because adding the attribute to
the safe list seems safe in general, and may prevent future
issues of this sort. 2) because it is the root cause of the issue,
since the bug is present only after installation of the
`sale_quotation_builder` module.

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master

opw-3297237

closes odoo/odoo#122154

X-original-commit: 23022144cb1a338db05870b28f17360b92c46a9c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-05-24 09:49:05 +02:00
niyasraphy 22114baacc [IMP] stock_account: searching with reference in valuation
before this commit, reference field is not added
in the search view of the stock valuation, which
contains the information like picking name, and
users need to use custom filters to filter
using this field.

after this commit, the reference field will be
added to the search view, and end users can
easily search using this field without using
custom filters.

closes odoo/odoo#121472

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-24 09:49:02 +02:00
Romain Estievenart 0ff71ab65f [FIX] web: crash in grouped kanban's progressbar with folded column
Steps to reproduce:

- Open Odoo on small screen
- Go to "Project" app
- Select project > Traceback

The Kanban progress bar's refactoring [1] didn't completely took into
account the fact that, on smaller screen, the "folded" columns aren't
actually folded (like on dekstop-like screen sizes) but instead their
records aren't loaded by default. As a result, in one case the progress
bar is shown (small screen) and in the other hidden.

As the progressbar's information is memoized in `getGroupInfo`, this
getter should have been called wherever those information are read.

This commit fixes the issue by properly calling the `getGroupInfo`
getter instead of using the "private" `_groupsInfo` object (which may
not yet have been populated, due to the memoization).

task-3336233

[1] https://github.com/odoo/odoo/commit/58ca40b03215ef4c6c575267494dc8bccc30a033

closes odoo/odoo#122214

X-original-commit: c2efa7f059c92298ae5fb22b83e812453e2eb8ea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-24 06:29:41 +02:00
Damien Bouvy ae6e5be25a [FIX] web: add description to search panel toggle hotkey
closes odoo/odoo#122111

X-original-commit: d21ceebf93e73fe57c6e6c6a803241cd6717ce0b
Related: odoo/enterprise#41355
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 22:32:46 +02:00
Damien Bouvy 3bbfad3a47 [FIX] web: fix an issue where an empty button box is displayed as 'null'
If the button box exists but contains nothing (or nothing visible), it
will be displayed as the string 'null' in the control panel

This commit changes this behaviour to show nothing and remove the
culprit view (an invisible button should simply not be there)

X-original-commit: 0089b302bf30efb324c80f74f058d6d64f686e4c
Part-of: odoo/odoo#122111
2023-05-23 22:32:46 +02:00
Damien Bouvy 5a51d7246d [FIX] survey: css issue with empty view helper
X-original-commit: cdd0989643c6b2bc8d03a577d07f0e8f7230029e
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Damien Bouvy fa50fb9277 [FIX] project: alignment issue
X-original-commit: 43cf1e63e757ffab84fd411a210281b49fd3a0d9
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Damien Bouvy 0066181f81 [FIX] hr_expense: misaligned icon
X-original-commit: c5a4f0532140d7bd429c1da787d461debda2b5a7
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Damien Bouvy 9894d6aa5d [FIX] google_calendar, microsoft_calendar: view issue
X-original-commit: 229d9bafc238d7eb4f3fb79622558ec52123996a
Part-of: odoo/odoo#122111
2023-05-23 22:32:45 +02:00
Damien Bouvy 4bff0c04bb [IMP] web: remove hover effect on list columns
The hover effect is rather strong and has low usefulness (the "chevron"
icon still appears) and can interfere with the current "sorting column"
decoration. We can safely remove it.

X-original-commit: f70fcbc8d1971c68546242c59caaae7f8481acf2
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Damien Bouvy 9d2d9cc504 [IMP] web: remove tooltips on x2many fields in list
These tooltips contain very little information ("0 record", "2 records",
etc.) but their content usually have their own tooltips or title
attributes that interfere with this tooltip.

Remove them completely.

X-original-commit: 226829653495294044c2b88008e89a9cd2edffac
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Damien Bouvy e9e1eb6e92 [FIX] web: missing kanban column title on mobile
X-original-commit: c3ff92dabb6ba479876c91e0f19cd94cf5830510
Part-of: odoo/odoo#122111
2023-05-23 22:32:44 +02:00
Paolo Gatti d99ad6ec01 [IMP] l10n_it_edi: partner functions refactor
Moved some logics belonging to the partner from the account_edi_format model to the res.partner model instead.

Functions:

_l10n_it_edi_get_values (normalized vat, country code, is_company, in_eu...)
_l10n_it_edi_normalized_codice_fiscale

Added `phone` and `email` fields to the EDI export tests.
Added a message on the export tests asserts to know what's the test file that generated an error.

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

closes odoo/odoo#105696

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-23 20:57:15 +02:00
Damien Bouvy f31dcf3432 [IMP] base: allow upgrading modules en masse
closes odoo/odoo#122120

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-05-23 18:02:24 +02:00
Xavier Morel 2b30be424f [FIX] core: content tab discovery in headful mode
It's not clear when and how this happened but apparently "headful"
chrome has a built-in background_page for hangouts which appears
before the `about:blank` page in the list of targets, and possibly
appears before the `about:blank` page has opened at all.

odoo/odoo#111422 was tested with chromium which apparently doesn't
have this feature either (or does it?), which probably contributes to
having no idea when it appears.

This feature also doesn't respond to `--disable-extensions`, despite
its url marking it as one:

    chrome-extension://nkeimhogjdpnpccoofpliimaahmaaome/background.html

The result was that the tour runner would hook onto the hangouts
target and try to load pages, which it would reject with
`net::ERR_ABORTED`, hence the tours just getting stuck.

Fix by improving the heuristic to find a content page: look for a
target of type `page`, and with the url `about:blank`, rather than
just take whichever tab target is listed first. Requires modifying
`stop` as it can now be called after we've started the browser, but
before we've created the websocket connection.

Also move `--no-first-run` from the headless to the default switches
to avoid Chrome's migration & default browser popup, apparently it
doesn't cause Chromium grief anymore (???). If this turns out to be a
concern, add a condition on the `executable` or something.

closes odoo/odoo#122117

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-05-23 18:02:21 +02:00
Pierre Masereel 1a3397e2ff [FIX] website_hr_recruitement: cannot render template
Cannot correctly concatenate the value from the t-set and the number

closes odoo/odoo#122113

X-original-commit: 5af263fb987cc53d40f0f9ec54ac65336d533218
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-23 18:02:19 +02:00
Jorge Pinna Puissant 135643f62c [FIX] web: remove unused code in kanban progress bar
This commit removes  a non-used, and non-tested method that was
mistakenly left on the progress bar hook.

closes odoo/odoo#122112

X-original-commit: 04c105fa244ea0a335023393e560153d669a7f2e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-05-23 18:02:15 +02:00
Audric Onockx (auon) 6feb1ff1f2 [REF] web: adapt uncorrect onchange test
In previous commit (https://github.com/odoo/odoo/pull/119214),
this line was added to make the block onchange and check
if the view was rerendered correctly,
but having `await nextTick()` inside an RPC doesn't make sense.
So we use `makeDeferrer()` which is the tool provided for that matter.

closes odoo/odoo#122110

X-original-commit: a1056b1299f1edae736ea1ac00b6895e1c758104
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-23 18:02:12 +02:00
niyasraphy 50c8807c3d [FIX] website_forum: missing parenthesis for function
before this commit, on clicking on Go To Website
smart button in forum is not redirecting to the
corresponding forum due to missing parenthesis
to the function.

after this commit, on clicking the Go To Website
smart button, user is redirected to the forum.

introduced in: https://github.com/odoo/odoo/commit/36c734ab37fdf1d6a245e0e29cfefe3cc46c6d92

closes odoo/odoo#122108

X-original-commit: 6ab323a0eeafe7511db8dd893d8f398544ee08c2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-23 18:02:09 +02:00
Florian Charlier def0e28fb9 [FIX] survey: fix and refactor tour session manage
Two problems were identified, causing intermittent tour failures.

1. Data not yet fetched
In this tour, we modify the SessionManager widget to trigger the
loading of participants input immediately after the widget's start.

This is however a chain of promises, and it sometimes happened that the
tour proceeded to the next step between these, i.e., before the question
results were fetched. The simplest fix is to use the progress bar
(`.o_survey_session_progress_small`) whose width is updated only once
records are loaded.

2. Click for next screen not yet handled
Likewise when triggering _onNext(), we sometimes checked the next tour
step before the DOM could be updated.
When going forward, we can rely on the "next button"'s tooltip which
is updated last.

We also take this opportunity to refactor the code to use more recent
JS syntax and Odoo tools.

Task-3284627

closes odoo/odoo#122107

X-original-commit: 79caedee3141d9882ffa54abe0302fc52ea6a9fe
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-23 18:02:06 +02:00
Thibault Delavallée 7b610957da [IMP] mass_mailing: make unsubscription_date computed
In this commit we remove overrides of create / write on subscription model to
make 'unsubscription_date' an editable computed field instead.

While being there, tracking on blacklist model is ordered, as a side dish
to prepare other mailing improvements.

Prepares Task-2150462 (Mass Mailing: Improve subscription management)

closes odoo/odoo#122106

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-23 18:02:04 +02:00
Thibault Delavallée cc7daf27c9 [MOV] (website_)mass_mailing: reorder, rename and link UI tests / tours
Rename tours, reorder tests and test files, perform a quick linting of UI
or tours related tests. Purpose is to prepare files to add some new tests
in mass mailing.

Each tour now belongs to a single file to ease maintenance and update as
well as seeing feature coverage. No real change should occur with this
commit except some test data (setup, test input).

Prepares Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#122106
2023-05-23 18:02:03 +02:00
Thibault Delavallée 5b760634ca [REM] mass_mailing: remove duplicated code
Oversight of odoo/odoo@e7c2209406 . A whole model was duplicated due to a
bad conflict resolution. Indeed 'mailing.contact.subscription' model has been
moved into its own file at odoo/odoo@4f39a80e76 but original code was
added back in the contact file when forwarding the bug fix.

As model was created / defined twice, the second definition was simply
overriding the first one, hence no issue arose.

Prepares Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#122106
2023-05-23 18:02:03 +02:00
Thibault Delavallée 4b3f0f4044 [FIX] mass_mailing: ensure correct computation of computed fields
Ensure computed fields are triggered on time and using the right values.
Add missing triggers and flush to ensure computed fields are computed when
necessary. Also fix some typos in comments of sub-methods used in those
computed fields.

Prepares Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#122106
2023-05-23 18:02:02 +02:00
Ayushi Gorai 174fce0c02 [FIX] account: prevent error will uploading empty text attachment in invoice
When the user uploads an empty text file in the invoice it generates an
attribute error with 'bool' object getting no attribute 'startswith'.

Steps to produce:-
- Install 'account'
- Go to 'Invoice'
- Create an invoice with an empty .txt attachment in the chatter section
- Click 'Send'
- Traceback is generated

Applying this commit will fix this issue.

sentry-4187919992

closes odoo/odoo#122103

X-original-commit: 7a12da836fa9926e12b15484aad77224cb75d3a3
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-23 18:01:57 +02:00
Anhjean - The Bean Family 5be459655c [CLA] signature for Anhjean
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#122098

X-original-commit: c4c72dcf50c1911b88947d6758dd6021f61db6b4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-23 18:01:54 +02:00