In https://github.com/odoo/odoo/commit/4fb0933986534e31337aa1dce3478a67deea72de, we faced an owl error when changing the tour:
"Component is destroyed"
This is due to the tour leaving the kanban view right after clicking on the "Validate" button.
After the validation, the kanban view is reloaded that is triggering a call to "web_search_read".
For some reason, the 'web_search_read' was triggered right after the component is destroyed.
To fix that issue, some additional steps have been added to the tour but this was just making the tour failing in a not determinist way.
Since the root cause of the issue has been fixed since, such additional steps are no longer needed.
closesodoo/odoo#105332
X-original-commit: 6a35a1f5f694a1bf6448ace8b43a8e99e07cfb90
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The rpc service has a protection (when used via useService) that
prevents the returned promise from being resolved/rejected if the
component has been destroyed meanwhile.
However, as the FormView still uses the legacy BasicModel, all rpcs
done by its model do not go through our new rpc service. As a
consequence, before this commit, they did not benefit from the
protection. This caused a non deterministic issue in the main flow
tour.
This commit implements a similar protection as the rpc service, but
specialized for the BasicRelationalModel, which redirects all RPCs
done by the BasicModel.
This change highlighted two scenarios where we sometimes performed
RPCs (or could perform RPCs) on a destroyed component. This commit
fixes those as well.
X-original-commit: f613e916d5e8b465fc360e340094c09037450ff1
Part-of: odoo/odoo#105332
In the quick create form views in CRM, the 'recurring_plan' field is missing
(or rather invisible). It is a required field so it prevents the use
of the quick create.
The purpose of this commit is to let it be visible again to users.
Task-3007756
closesodoo/odoo#105311
X-original-commit: d0deb895bba8deeddb95fc8919ded29b80a869f9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit, when compiling a form group, the scope class is
added to the elements of the outer group. It was added on the element
class attribute. The issue is that FormLabel don't have a class
attribute but a className attribute. So the class wasn't shown on the
DOM.
Now, the class is added on the FormLabel className attribute and shown
in the DOM.
closesodoo/odoo#105315
X-original-commit: 214beb39d7c1a315255f0a5a842e60f73e7900cc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the labels tags that were after the fields losses
their attributes (i.e. classes) after the compilation of the form view
arch.
Now, the attributes are correctly copied after the compilation.
similar to : 873790f802
X-original-commit: 395bdf8880c5929652838a93351596b045708905
Part-of: odoo/odoo#105315
Co-authored-by: Patrick Hoste <pko@odoo.com>
**Issue**
Login as an ordinary user (demo) and open Apps to make a request
access to a module. A wizard will appear asking for the admin users
to request to and the reason for request. Input elements are not
properly shown.
This is because inside an inner group, as we remove the label (cf.
nolabel=1), the input field is put in the first column which is supposed
to be the location of the (non-existing) label.
**Solution**
Make the field take both columns (label + field) as it has no label.
closesodoo/odoo#105314
X-original-commit: 5ab8b9fb6273ebed3f89e8f7a20b8238ea1963ab
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps to reproduce:
- select a language where thousands separator is not (e.g. portugese)
- try editing any number input field
Bug:
error when parsing the new value when thousands separator is not defined
Fix:
fixed default value (only fallback to commas if it's not the decimal
Point separator)
opw-3041135
closesodoo/odoo#105312
X-original-commit: 71712acdf259aca7745a8a0b41a022d3abdcb047
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Field indexed by trigram cannot become translated because the
`convert_column_translatable` is based on the old index naming convention
(changed in https://github.com/odoo/odoo/pull/100736).
Then it generates a PostgreSQL error:
`psycopg2.errors.DatatypeMismatch: operator class "gin_trgm_ops" does not accept data type jsonb`
closesodoo/odoo#105295
Signed-off-by: Raphael Collet <rco@odoo.com>
The confirmation dialog to delete a token from a portal user is the
same whatever the linked records. This part of the code is now moved to
a separate function `_buildConfirmationDialog` in order to allow
overrides of the method in particular cases (e.g. Subscriptions).
task-3048269
closesodoo/odoo#105289
X-original-commit: 51d6b724f061af44bc07c342dfa9a34b4d1a2101
Related: odoo/enterprise#33741
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Taxes on self-invoices for non-EU export actually have amount > 0,
l10n_it_has-exoneration = False but they must have the law reference
field filled out, so we're taking the "invisible" clause
out of the view.
Task: https://www.odoo.com/web#id=3010849&model=project.task
opw-3010849
closesodoo/odoo#105238
X-original-commit: cdb90133ae463f62ade82f67ac89293e09b69740
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
Before this commit, if two or more lines in sale_report had the same value as price_total, they were group together in _compute_kpi_sale_total_value and included in output sum only once. That leads to incorrect values in digest mail.
This commit fixes that issue by changing grouping column from price_total to company_id.
Steps to reproduce the issue:
----------------------------
1. Send Digest Mail for database and check values in it (assume we have both All Sales KPI and PoS KPI).
2. Create several sale_order_line and/or pos_order_line with exactly the same price_total (for example: 5 PoS transaction, each one for one product of value 10000).
2. Send Digest Mail again and check values in it.
Current behavior:
-----------------
The All Sales KPI will increase by value of only one of lines (in our example: PoS KPI will increase by 50000 = 5*10000, All Sales KPI will increase by 10000)
Expected behavior:
-----------------
All Sales KPI should include all transactions from sale_report in given period of time (all sale_order_line and pos_order_line).
opw-2938952
closesodoo/odoo#105248
X-original-commit: 804c485f6afe98c5d63cfe91ce65e0a8352fc92e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Those tags should only be created by the tax reports; creating them manually makes no sense.
closesodoo/odoo#105227
X-original-commit: 116c8090da9d900c04c9257269b42c462ec77f98
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Prior to this commit, when we clicked on an article, it would flicker on
mobile.
This commit fixes this issue.
task-3058162
closesodoo/odoo#105200
X-original-commit: ec41980851fb98da25a06de3ef79cfcb152ab5dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
Since this balance column is used for different things (e.g. total due),
adding a label allows to properly differentiate what is what.
closesodoo/odoo#105139
X-original-commit: 4aeeceea50ca41ce3ad18950632744bee9ce1a6e
Related: odoo/enterprise#33696
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Tests for `deleteBackward` with a non-collapsed selection should always
be repeated using `deleteForward` to ensure the behavior is indeed the
same for both. This was not the case for some of the tests.
task-3032817
closesodoo/odoo#105217
X-original-commit: 183246102406ccb4730ee2e11c8d42ccca6dce6b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Tables have their own custom selection in Odoo Editor, so rectangular
cell selection is supported. Selecting a whole row/column/table then
pressing delete/backspace removes the whole row/column/table. But just
selecting some cells should only empty them, which we failed to do,
resulting sometimes in broken tables.
The code to remove selected rows/columns/table was triggered when
pressing backspace/delete, which failed to account for cases where we
need to delete the range without pressing those keys (for instance when
typing a character). This moves that code to `deleteRange` so as to make
it the standard behavior when deleting a range that includes table
cells.
task-3032817
X-original-commit: fad5d2d7e241e22382a2f3dc0fd68eca741e59a7
Part-of: odoo/odoo#105217
deleteBackward and deleteForward tests were just directly calling the
editor's implementation, without triggering events that are sometimes
crucial to the behavior. This is at least preventable in cases where the
selection isn't collapsed, by triggering the keydown event and calling
the document's `execCommand` function with the "delete" command.
task-3032817
X-original-commit: cd7c647f45487e8d8a763875a30e327422af4e68
Part-of: odoo/odoo#105217
Following odoo/odoo#103743
Changes the xpath adding the `batch_id` in the picking list view from
before `company_id` to after `picking_type_id` because the linked commit
added an invisible `company_id` at the start of the list, so the
`batch_id` was wrongly placed.
closesodoo/odoo#104981
X-original-commit: d3f6bd6f12048233b57566cdedf6f2b22a45dd93
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
To stay consistent with other option layout, we show the sub email server
configurations, Gmail and Outlook server, not nested to the custom server
option but as standard options.
Task-3033042
closesodoo/odoo#104015
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Steps to reproduce:
1-set language to an LTR language (arabic / hebrew...)
2-select any field with the date-time range widget (eg: planning>add)
3-the hour and the minute selection is reversed.
Bug:
the hours and minutes order depends on the language orientation where
they should always follow this format HH:MM
Fix:
force the time to be displayed Left To Right regardless of language
opw-2953221
closesodoo/odoo#105255
X-original-commit: 8d396fd8800baf29a9242987b610e3bb7b9da265
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this fix, the constraint did not prevent changing the company to a bad one on an existing field.
We also remove the GROUP BY clause as it is useless.
Another query was also useless in `analytic_account.py` and has been removed.
closesodoo/odoo#105259
Forward-port-of: odoo/odoo#105129
Signed-off-by: William André (wan) <wan@odoo.com>
Before this fix, the constraint did not prevent changing the company to a bad one on an existing field.
We also remove the GROUP BY clause as it is useless.
X-original-commit: 2d5879cd8d84edcc16c55622b86c724f70055b03
Part-of: odoo/odoo#105259
The code removed by this revision was added at a time any user
could access the `res.config.settings` model, including non-admins.
odoo/odoo@a468aee518
So, it made sense at the time to make the module installation checkboxes
readonly for non-admin users accessing the settings.
However, since revision
https://github.com/odoo/odoo/commit/65530dfd6a0486f44134917f5cc42a2c30b95762#diff-e275aaa5de11da2815c2f0cc18bc046f967df5e4eba94999ee55ffe8926c87bdR109
the `res.config.settings` model is restricted to admins only,
who have the write access the `ir.module.module` model.
This override is therefore pointless,
as since then it's impossible for non-admins to access
the settings.
closesodoo/odoo#105254
X-original-commit: d43896c0bb88310ec2bbb87c4dc355d2bd7faad9
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
This commit fixes missing hover style on the buttons in the composer.
Task-3050035
closesodoo/odoo#105242
X-original-commit: 2c1d09be03ff9d76d2c3e8189ce89f4a37d45859
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The accounts shown in the widget could be shown while being in the wrong company.
Previously, only the plans were limited by the company.
closesodoo/odoo#105241
X-original-commit: 97d1afb9ff0ca88dfb0b6a8ed152e39d3db77279
Signed-off-by: William André (wan) <wan@odoo.com>
Issue :
- When sending an sms reminder by cron user, `_get_display_time` is
used which always uses Odoobot (cron user) timezone regardless of the
partner timezone
Fix:
- use `partner_id.tz` instead of Odoobot
OPW-2991624
closesodoo/odoo#105243
X-original-commit: 23d39f6de7ee656773f3e8f2515adfefc137c866
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
For a trigram indexed translated field field_x,
domain leaf ('field_x', '=', value) and ('field_x', 'ilike', pattern)
will miss records if the pattern contains accent characters
This commit set ensure_ascii=False for json.dumps to avoid escaping special
characters
opw-3048182
closesodoo/odoo#105240
X-original-commit: 26b5c8c2baeaee9fcd5384aafa5f9b39543d6903
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
We have internal utils that will use a wanted format in a localized way.
We should use those utils rather than hardcoding a format, otherwise
that format will be used for all languages which is weird.
So, passing a `short` / `medium` etc format directly to babel will avoid
that issue. On top of that, the `value_to_html` of our
`ir.qweb.field.datetime` also provided options like `date_only`,
`hide_seconds` etc.
This commit simply gets rid of those hardcoded format and achieve the
same thing using utils & tools, which will be localized on top of that.
The "error" was report by our translator: `MMM d, yyyy` in french leads
to `oct. 18, 2022` which is not ideal. It should be `18 oct. 2022`.
closesodoo/odoo#105197
X-original-commit: 4a443736523547fb516c70f45e7e70df32b13147
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Currently entering custom urls will be missing characters if they
contain unicode.
Steps to reproduce:
1. Open Promote dialog
2. Enter a custom url that contains unicode (e.g. `Nội dung có Dấu`)
3. Output: `n-i-dung-c-d-u`
Expected output after this commit: `noi-dung-co-dau`
closesodoo/odoo#105195
X-original-commit: 3c1cd65e2eb44c5d2cb695afad19c58f24bde8b1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Part of [1] was lost during the frontend>backend merge [2].
The SEO name field was not "slugified" anymore in JS, it led to 2
issues:
- Bad UX, one could type something and it would end up after save with
something completely different
- 404/crash: as the generated URL in js (based on the seo name value)
would not be slugified, it would redirect to that URL, which would not
be found as the record URL in python would be slugified. There would
be an URL mismatch between the python route and the JS redirect value.
This could still somehow happen as the JS and PY slug are not doing
the exact same things but at least this will restore what we had
before and mitigate the issue.
Step to reproduce:
- Go to a blog post and open the SEO dialog
- In the custom URL input, type "créé"
- You will be redirected to `/@/blog/travel-1/créé-1`
This will be a 404 page, as the correct URL is now
`/@/blog/travel-1/cree-1`.
[1]: https://github.com/odoo/odoo/commit/c387ec19b4648ae52bf3210253febd7825745627
[2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
X-original-commit: 3c266751c41ab0a96494ccd6cd1a1fff3a6a7058
Part-of: odoo/odoo#105195
Before this commit, the highest number warning was displayed on multiple lines.
This commit fixes this by inlining the name of the invoice with the highest number.
closesodoo/odoo#105194
X-original-commit: 9938389734110474a6356654a01990d774a832b8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
With commit [1] the "load more" button of the media dialog went from a
btn-primary style to a btn-secondary style, which is displayed a link.
It was done in an Odoo global effort of making each and every screen
having only one (sometimes two at most) primary action to help the UX,
as explained at [2].
But in this case, it seems to more misses with the UX than helping the
user as that button really becomes invisible without it. We already were
afraid of that but still merge it, see [2] again.
Indeed, in secondary style this button is barely visible due to the
unsplash and undraw image results which have an "author" text like on
top of the image which looks like the "load more" style.
This commit is using the `btn-odoo` class to show it as a button and not
a link to avoid people not seeing it.
`btn-odoo` is chosen instead of `btn-primary` as this is how "secondary
important actions" are designed now in Odoo.
Note that in community, it looks like a btn-primary but that's not
related to this PR.
[1]: https://github.com/odoo/odoo/commit/ff0b2d441252560a076a3609d81c369f0ce42d19
[2]: https://github.com/odoo/odoo/pull/98706#issuecomment-1236804203closesodoo/odoo#105193
X-original-commit: f204d3a6ed5b5de08c7921a0bcd5188d78b0cf8b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This is more efficient than calling it record by record.
closesodoo/odoo#105143
X-original-commit: 9bbcee2bca8a69e8388097e2e5070ed620dcebe2
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Before this commit there is no clean/easy way to do nice xpath's on the divs.
By giving them a name we can do a xpath expr with @name=''] which is not as errorprone.
closesodoo/odoo#105142
X-original-commit: f37251ff76359a4b8c05facc1f7449a2e1eea7fb
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
There are two issues with the index naming convention used by the ORM:
Problem 1: it is possible to have naming conflict for indexes. For
instance, the name 'slide_channel_tag_group_sequence_index' is used for
both fields slide.channel.tag.group.sequence and
slide.channel.tag.group_sequence. Only the first index will be created.
Solution 1: we separate the model and field names with a double
underscore instead of a single one, which is the same strategy as with
LEFT JOIN aliases. This is correct because model names don't contain
such double underscores or underscores as prefix or suffix (it is not
forbiden but model name should follow the 'dot notation'.)
Problem 2: index names can be longer than 63 chars, but PostgreSQL
silently truncates it. This doesn't actually break anything (PostgreSQL
also truncates values when we check the existence of indexes) but it can
lead to using the same name twice. There is hopefully not any example
in our code.
Solution 2: if the name is too large, we truncate it and pad it with a
hash of the complete name to match 63 characters, which is also the
strategy used for LEFT JOIN aliases.
task-2984730
closesodoo/odoo#100736
Related: odoo/upgrade#3957
Signed-off-by: Raphael Collet <rco@odoo.com>