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/111850closesodoo/odoo#122251
X-original-commit: 4909bdfbb0354310f3e6d21e1ecc7177b74b34bc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#122156
X-original-commit: 3e78316a51f2cb8d347af1b87abcdcb775107115
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
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
closesodoo/odoo#122133
X-original-commit: b7bc19e30afaf1e6374620b7a3bfbdf26c63e765
Signed-off-by: Laurent Smet <las@odoo.com>
The HeaderButton component is used once and is mostly presentational,
this commit inlines it into the navbar.
closesodoo/odoo#122035
Related: odoo/enterprise#41336
Signed-off-by: Monnom David (moda) <moda@odoo.com>
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
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
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
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
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
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
to return the response with correct status code as json-rpc returned status code 200 even if there was an error
task-2835711
closesodoo/odoo#117940
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#122206
X-original-commit: fa25206634e11ce1fd9030508772a1802ef86fa2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
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
closesodoo/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>
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 .
closesodoo/odoo#122185
X-original-commit: 616740e9d09b3d0376be43ed1489e390f6f5823e
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
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
closesodoo/odoo#122183
X-original-commit: 4a88945fb125716f4362252795e969f36b48391d
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
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
closesodoo/odoo#122011
X-original-commit: 946de52ea80e0cf5f1284cea2134c22ffda3aa5f
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
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
closesodoo/odoo#122224
X-original-commit: 27b729709e78855721111f6f8b34cd0532147ec8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Tommy Ng (tong) <tong@odoo.com>
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
Before this patch the naive dsn parser `_dsn_to_dict` would choke
on `application_name` containing spaces or the equal sign.
closesodoo/odoo#122212
X-original-commit: 3573fe0726f8dde1c5714b7d501f6c43d97ce731
Signed-off-by: Fabien Meghazi (fme) <fme@odoo.com>
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
closesodoo/odoo#122211
X-original-commit: 1f784652f9431c8716329f284133df215656c4b9
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
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
closesodoo/odoo#122200
X-original-commit: a5f566b57ace1d82e77f56f4c059eb595350e1cf
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
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.
closesodoo/odoo#122186
X-original-commit: c0039aa40a1274110906e45ba07a318fc6218267
Signed-off-by: Gvaladze Sopiko (sgv) <sgv@odoo.com>
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
closesodoo/odoo#122154
X-original-commit: 23022144cb1a338db05870b28f17360b92c46a9c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
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.
closesodoo/odoo#121472
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
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/58ca40b03215ef4c6c575267494dc8bccc30a033closesodoo/odoo#122214
X-original-commit: c2efa7f059c92298ae5fb22b83e812453e2eb8ea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
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
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
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
closesodoo/odoo#105696
Signed-off-by: Josse Colpaert <jco@odoo.com>
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.
closesodoo/odoo#122117
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Cannot correctly concatenate the value from the t-set and the number
closesodoo/odoo#122113
X-original-commit: 5af263fb987cc53d40f0f9ec54ac65336d533218
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit removes a non-used, and non-tested method that was
mistakenly left on the progress bar hook.
closesodoo/odoo#122112
X-original-commit: 04c105fa244ea0a335023393e560153d669a7f2e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
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.
closesodoo/odoo#122110
X-original-commit: a1056b1299f1edae736ea1ac00b6895e1c758104
Signed-off-by: Georis François (fge) <fge@odoo.com>
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/36c734ab37fdf1d6a245e0e29cfefe3cc46c6d92closesodoo/odoo#122108
X-original-commit: 6ab323a0eeafe7511db8dd893d8f398544ee08c2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#122107
X-original-commit: 79caedee3141d9882ffa54abe0302fc52ea6a9fe
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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)
closesodoo/odoo#122106
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
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
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
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
closesodoo/odoo#122103
X-original-commit: 7a12da836fa9926e12b15484aad77224cb75d3a3
Signed-off-by: William André (wan) <wan@odoo.com>
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#122098
X-original-commit: c4c72dcf50c1911b88947d6758dd6021f61db6b4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>