Before this commit, when we used a domain on many to many relational
fields, the `dataContext()` returned the context of the field, which
contained a command tuple.
This causes an error server side, when a domain [('id', 'in', [[6,
False, [3,4]]])] is provided to search available records to fill the x2m
field.
Now, it returns the `currentIds`, which correctly gives the id(s) of the
records.
Approved by SAD
X-original-commit: 5653e23a333262683257575d071575a63981ca33
Part-of: odoo/odoo#101352
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
used in product configurator logic
X-original-commit: 40cfbf35985422a9415e6ab225d037f7393d3842
Part-of: odoo/odoo#101352
Co-authored-by: Samuel Degueldre <sad@odoo.com>
This PR makes it so that the button to open emojis stays grey
when the emoji popover view is opened.
The focused behavior of the button is also disabled
Task-2998149
closesodoo/odoo#101348
X-original-commit: d022939ed1ed29d2e93a05c6c408ac65e8fb704e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
On windows, displayed emojis are bigger than the expected size
This commit removes the horizontal scrolbar that would appear
on Windows
Task-2991415
closesodoo/odoo#101347
X-original-commit: 578157fbbae92afa1581193df9173fd085fd9f09
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current behavior before Fix:
when we hit shift+enter the oShiftEnter doest not trigger
Desired behavior after Fix:
now when we hit shift+enter oShiftEnter gets triggered.
Task id-2991164
closesodoo/odoo#101345
X-original-commit: d1808c8d50372a5e7e0063634037e069aa7fc55a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This ports the `sms_widget` field to OWL.
closesodoo/odoo#101350
X-original-commit: 89109de6d3752388f0b2f976c8a32588f760ec48
Related: odoo/enterprise#31882
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This moves the emojis char and text fields to the new fields directory,
and renames them to follow the new naming conventions.
X-original-commit: 92488725a608a2e14297228ebccddc5cc2ee5d6d
Part-of: odoo/odoo#101350
Some payment terms with early payment cash discount weren't giving out the correct computation.
Example of a problematic set up :
Payment term with multiple lines (percentage X, percentage Y, balance)
Cash Discount tax computation : mixed
The journal items of the invoice and the total amount wouldn't correctly take into account the different discount percentages of the payment term lines.
Fixed it by applying the line percentage to the epd lines computation.
closesodoo/odoo#101341
X-original-commit: 4af4d0e3bc25a5f81eabd1c2068fd6bf6a25621d
Related: odoo/enterprise#31874
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
Make the choice of available stock effective
(previously the total quantity was always applied).
Show warehouses with the most available stock first.
Show quantity warning only when appropriate.
closesodoo/odoo#101010
Task: 2985735
X-original-commit: 483764412985163168333e2731bed359cc588bbb
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Jean-François Aubert <ajf@odoo.com>
Not only on hover - otherwise it makes it very difficult for users
to find what field is missing content.
closesodoo/odoo#101349
X-original-commit: b674e81b7ca7e553f593cef1bc1a9f94cd58e3d3
Signed-off-by: Luca Vitali <luvi@odoo.com>
Before this commit, if an invalid field was completed when editing
another field using an onchange, the field was always considered invalid.
It was not possible to save the record.
Why:
Fields modified by an onchange were not removed from the list of
invalid fields.
Solution:
Remove all fields modified by an onchange from the list of invalid fields.
How to reproduce:
- Create a new record in a form view with a required field
- Click on save (the required field appears as invalid)
- Edit another field that causes a change to the invalid field (onchange)
- Click on save
Before this commit:
The record is not saved and the required field is still invalid.
After this commit
The record is saved.
closesodoo/odoo#101343
X-original-commit: 46074244798d2e447f4e5cf174244ea263563b1d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
1. Link to payment not clickable since the owl migration, the click method in xml wasn't there anymore
2. In the past, the view given in the context was problematic, so now we let the orm pick the view
Also removed the function open_move and open_payment which was useless since action_open_business_doc_from_aml do the job. I also moved the function in account.move
closesodoo/odoo#101342
Task-id: 2988037
X-original-commit: 739ea262b821a71dcb9c7d61d6bd179a4996de0e
Related: odoo/enterprise#31876
Signed-off-by: William André (wan) <wan@odoo.com>
The default value of max_time_between_keys_in_ms in barcode is 55 ms.
The default value of 55 ms is too low and creates an issue for RFID readers.
The default value of max_time_between_keys_in_ms is increased to 100 ms.
task-2996072
closesodoo/odoo#101331
X-original-commit: 9eda9679bd51b63bbc7b796419b3efdec4ba99bb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
Issue :
- `account.move.state` has only 3 possible values cancel, draft, posted
- the wrong value was used
Fix:
- Use the correct value `posted`
OPW-2991389
closesodoo/odoo#101324
X-original-commit: e33acb06c90cf9cab93471e1019d092478db35d4
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Make it possible to override both before and after execute actions on
all view controllers using `useViewButtons`.
This avoids having to change a value in the env to override the function
being called when clicking on a button.
closesodoo/odoo#101310
X-original-commit: 9f6c2b8e969635f35786d58ee89ca767ff57144d
Related: odoo/enterprise#31860
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When creating an expense paid by the company, we want the expense
to be on a bank journal. This is currently incompatible with the
current constraint we have that force expense of type 'in_receip'
to be on a purchase journal. Since expense only behave like type
'in_receipt' we can ignore that constraint.
closesodoo/odoo#101307
X-original-commit: f95eb814166646ec3113d35b910a677b21737cd1
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, in a form view, discarding a record with an invalid
field containing an input does not restore the original value.
How to reproduce
- go to a form view with an integer field
- edit the integer field with an invalid value ("blabla")
- click outside the field (the field is displayed as invalid)
- click on the discard button
Before this commit:
The integer field always displays the invalid value.
After this commit:
The integer field displays the value before the edit.
closesodoo/odoo#101316
X-original-commit: f81e4019ca00953d9624557c98033aef46efc47a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
If a view with groups and pager, going next then previous (back to the 0
offset) doesn't work.
The pager offset and limit were used in an conditional expression.
If the value was 0, it was considered falsy and set to a default value
while the 0 was actually a valid and expected value.
closesodoo/odoo#101314
X-original-commit: 5c9173241dbe55007c3a84fe078d21ea733e9046
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
If an user modifies a theme value through the "Theme" tab of the website
builder, a custo of the related SCSS file is made. To make a SCSS custo,
the related python methods need to know for which bundle the custo is
made. This is to ensure that if a file appears in multiple bundles, the
custo targets the right one (amongst other things). For those automatic
SCSS custo made via the website builder, the given bundle does not
matter as those are custo made in variables SCSS files, which appear in
all bundles, more precisely in a sub-bundle included in all bundles. The
code should be more robust to leverage that fact.
When the "assets_frontend" received all "assets_common" files in order
to only use one unique bundle for main frontend pages with [1], it was
though smart to leave that given bundle to "assets_common" although
"assets_common" is not used on the frontend anymore as it would allow
to not care about migration of those automatically edit SCSS files and
it was also "not wrong" as you effectively cannot edit those files
without impacting all bundles.
It was although very wrong as editing those variables files via the SCSS
editor automatically considers them as part of "assets_frontend" and not
"assets_common". So editing them via the SCSS editor would create/update
the files relying on the fact the related bundle is "assets_frontend"
but the website builder would create/update them relying on the fact the
related bundle is "assets_common". This would lead to creating two
ir.asset records trying to replace the same file in the sub-bundle which
is used by both those assets... and thus to make the database crash.
The work done at [1] actually forgot about other things related to all
this. Those will of course be fixed but they are less urgent. This
commit here just fixes the SCSS edition issue described above for now.
[1]: https://github.com/odoo/odoo/commit/08dcbc8f1def06476d025b110049ee596e906816
task-2994071
closesodoo/odoo#101312
X-original-commit: 15e503a841d757e622c8ef2070043b766b28bfde
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
To reproduce:
Video: https://drive.google.com/file/d/1bAh7KA_5UhhIrr-qF5A5gOVWhk3_9clj/view
1. Have multi-language website
2. Event with one ticket
3. Reload page and click the "Register" button
-> in some cases there is a traceback
`/event/great-reno-ballon-race-2/registration/new: Function declared as capable of handling request of type 'json' but called with a request of type 'http'`
Reason of the issue:
As the button "Register" in the form is defined with `type="submit"` it will send the form as plain HTTP if clicked.
This behavior is modified in the JavaScript to prevent this default behavior.
However, if the button is clicked before the JS load, the HTTP behavior is used which does create the above traceback (as the `registration/new` route accept only `json` type).
Solution proposed:
Prevent the button default behavior and make it deactivated and let the JS activate it when it is ready
Note on stability:
As JS code and XML view is modified, this fix was thought so that the JS won't have an impact if the view isn't updated.
There is theoretically no way that the XML view would be updated without the JS being updated (except manual modification in the view or rollback on the version revision after performing a module update on odoo.sh). If it was the case then the button will be deactivated until the user change the number of ticket.
OPW-2946706
closesodoo/odoo#101311
X-original-commit: 5a8892497e2b0df5e1dc8085214687786954c878
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
The original goal here is to remove the warning of the google page
speed but it actually is really better to use 'pagehide' as it is fired
more reliably than the 'unload' event and does not prevent Chrome and
Firefox to use the bfcache (browser optimization that enables instant
back and forward navigation).
The persisted property of the pagehide event is checked before
disconnecting from the worker. As for the presence/multi_tab case, it
was chosen to also consider page freezing as it seems more accurate that
what was done before (the main tab could be throttled/frozen which was
an issue).
Some resources to explain why this is better:
- https://web.dev/bfcache/#never-use-the-unload-event
- https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_eventclosesodoo/odoo#101309
X-original-commit: e043891d5074ca04ee1bbed421ae5efe5f2f8b88
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
When an action was retrieved from session storage, the no content helper
content was not markuped. It would therefore display hmtl text on the
user screen.
closesodoo/odoo#101306
X-original-commit: 592b8016b8a44dc1775918e4ffbf572e9b02c50f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
*: website_event, website_forum, website_hr_recruitment,
website_sale, website_slides
The website content list views should act as a page manager (click on
a record redirects to iframe, "CREATE" and "Publish / Unpublish"
buttons, ...).
The goal of this commit is to add a kanban version of these views for
key app models ('website.page', 'blog.post',...) since the same code
can now be used for list and kanban controllers / renderers since [1].
It is especially important in mobile where the kanban views are nicer
than list views by default.
[1]: https://github.com/odoo/odoo/commit/ed09db19c372da8d8be541f365117d1ce8e965ba
task-2889981
closesodoo/odoo#101174
Related: odoo/enterprise#31821
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce:
- create and send a quotation
- make a failed payment (through cutomer preview)
- create and send a second quotation to the same customer
- make a succesful payment this time
- redirect takes to the wrong quotation (failed one)
Bug:
polling the processed payments initially returns both transaction
but the following polls only returns the rejected payment
(introduced in [1] processed transactions are filtered out)
since there's only a single transaction, redirect takes to it
Fix:
if there's only a single succesful transaction (regardless of the rest)
it means the current payment was successfull so we redirect to it
opw-2954162
[1]:https://github.com/odoo/odoo/pull/31741/commits/7612659565ee24f1c878b81e6c86b5780fbd5a3dclosesodoo/odoo#101252
X-original-commit: 6ea920d2573cf68c6a5cbaf1f6af31fd7de155ff
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Currently, there are severlar issues with the karma card, like:
1/ improve karma display
2/ images of the rank and badges are can be changed by user, but
after saving the changes are discarded
Apart from that, in the course navbar, the hard-coded white
text color is given, due to which in some themes the text
becomes invisible. And in the courses cards below navbar,
the course title is not editable.
This commit improves the following points:
1/ Makes the next rank card (on course home page) a bit bigger, adds a
tooltip on the progress bar that shows gained xp out of minimum xp
needed for next rank (ex: "2500/10000 xp") if there is next rank,
and improves the text below rank image that now shows xp to gain for
next rank or if there isn't next rank, simply displays the earned xp.
2/ Makes the images editable (in karma card as well as in the
user profile and in '/profile/ranks_badges' page)
3/ Makes the rank title editable
4/ Removes the hard-coded white text color from the course
navbar and make the course title editable
taskID-2853264
closesodoo/odoo#92871
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Debugging websockets is cumbersome, this commit adds debug
messages to the websocket worker in order to ease debugging.
closesodoo/odoo#101172
X-original-commit: 1abb6c45b06d83b602358a58f351e86b27f3f0c7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This merge removes the readonly mode of form view and revamps the layout of this same view.
More details about what implies the remove of the readonly mode:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when hovering the status text in control panel.
- The chatter now takes all the place on the right side of the view.
task id: 2822553
enterprise part: https://github.com/odoo/enterprise/pull/31733closesodoo/odoo#101118
Forward-port-of: odoo/odoo#100570
Related: odoo/enterprise#31778
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the editor was always updating the record even when
it's content was not modified or even focused.
X-original-commit: d067710220f6a528f251a44a51863f4f8fb12034
Part-of: odoo/odoo#101118
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except
if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
hovering the status text in control panel.
task id: 2822553
X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
This commit changes the layout of the form view to move the
control panel next to the chatter instead of being on top.
The chatter now takes all the place on the right side of the view.
task id: 2822553
X-original-commit: 7f36dd05b3238c3d27aab6e5af12233df27067e4
Part-of: odoo/odoo#101118
This commit adds an option to many2one field to open the record either
in target new (dialog) or target current (replace view) which is now
the default.
task id: 2822553
X-original-commit: abe26f6eebb450512b35c25094329f85b98c15d9
Part-of: odoo/odoo#101118
Steps to reproduce the bug:
- Install [l10n_it_ddt]
- Create a storable product “P1”
- Create a SO for “P1” with qty 3
- Deliver 1 unit and create a backorder
- Generate the invoice for the delivered qty: 1
- Post the invoice
- smart button with the link to DDT n°1 appears
- Deliver the remaining 2 units
- Create the second invoice
- Post the invoice
Problem:
The link to DDT appears but with the 2 pickings, whereas in this case
only the 2nd picking is linked to the invoice.
Before using the `account.move.line` records, we sorted them by date
in order to always use the first created one to link it with the first
picking created, however if two `account.move.line` were created in
the same days, they will be ordered randomly, so we also have to
sort them by id if the date is the same.
opw-2968401
closesodoo/odoo#100998
X-original-commit: e8e99c05696308422183516e68c0b9ed5495d7ca
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
In PR #81184, a typo was fixed,
however there was still one instance of the old typo that wasn't replaced.
This commit replaces it.
Related task-2704288
closesodoo/odoo#101231
X-original-commit: 9ba8e650078982a3c6d1546fad27ec39a3ccd2b9
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
*: website_blog, website_hr_recruitment
Add multi-edit on the remaining "pages" list views not using it:
- pages
- blog posts
The only remaining one would be "jobs" but editing the Department field
seems broken at the moment.
Related to task-2889981
closesodoo/odoo#101215
X-original-commit: be58687284884550cc4e6c2ac7255abee4eb1125
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The goal of this commit is to add a 'Publish' / 'Unpublish' button to
the additional actions of the 'website content' list views.
'Archive' / 'Unarchive' options are also removed for the 'website.page'
records.
task-2889981
X-original-commit: de02335b8db1396a24e10b78f8f78ed79fded421
Part-of: odoo/odoo#101215
*: website_blog
The goal of this commit is to update JS code to have the same behaviour
from the 'website content' list view (trigger the 'new content' dialogs
on "CREATE", add a website selector to filter content) on kanban views
too.
The blog post kanban view has been adapted to use this. Other "website
content" related records will receive a kanban view in a further update.
This is is also important so that the mobile UX is nicer.
task-2889981
X-original-commit: ed09db19c372da8d8be541f365117d1ce8e965ba
Part-of: odoo/odoo#101215
The 'addPage' code on website pages list view was duplicated from
'new_content.js'. The goal of this commit is to move this code to the
'AddPageDialog' component.
task-2889981
X-original-commit: 58698f848703395ff680bc7586ecc8eec4fb61ae
Part-of: odoo/odoo#101215
The goal of this commit is to:
- Tweak the website filter (on website pages list added at [1]) to make
it work for all website content records (page, blog, ...).
- Update the 'New Page' dialog to be able to select the website_id for
the new page.
- Tweak the '_compute_is_homepage()' method to set 'is_homepage = True'
on website's '/' page when 'homepage_url' is not set in settings.
[1]: https://github.com/odoo/odoo/commit/940f4ee875332dafa1f379970a7683be6b3ee606
task-2889981
X-original-commit: d6014c60acc4231a5e56d492d2a39deaf789cbe8
Part-of: odoo/odoo#101215
Method `_compute_reference` computes unique reference for a transaction. If
reference from `account.move`'s `payment_reference` was never used, the method
just returns that reference. Othwerwise it adds a counter. The latter requires
to make a regular expression to count records with the same prefix. However, if
the prefix has special regexp characters (e.g. `+++INV/2020/666+++`), then we
have to escape the characters first. This is what this commit does.
opw-2994126
closesodoo/odoo#101201
X-original-commit: 6c513d43eba8c58171b0fb632d0ac82b28aa9e7d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
Correctly set the border-color in case of invalid cell
task-2984169
closesodoo/odoo#101151
X-original-commit: fd355cc609cddc20e7c01a7ca12f93d6cd05c7ac
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
purpose:
Contract management is a prior thing on an employee profile;
Thus, Contract smartbutton should be in the second position,
after Documents smartbutton, in case documents_hr is installed.
task - 2984690
closesodoo/odoo#100532
Related: odoo/enterprise#31481
Signed-off-by: Kevin Baptiste <kba@odoo.com>