`useRef()` hook should only be used in `setup()` of component.
The `add()` function of emoji picker can be used anywhere.
This commit fixes the issue by limiting use of `add()` to pass
Object whose `el` is an element. We should pass the ref immediately
rather than the refName.
closesodoo/odoo#118293
Related: odoo/enterprise#39626
Signed-off-by: Debondt Didier (did) <did@odoo.com>
Precommit hooks would stock data until a call to ``cr.flush`` was made.
Notably, this happens when the ``assertRaises`` method is called.
Functions were applied on records already cleared from the cache.
This change adds a cleanup call for `TransactionCase` as it keeps
the same cursor for all tests. Cursor precommits can now
be safely executed inside tests.
Task-2834304
Forward port of #117555closesodoo/odoo#118290
X-original-commit: ff5d0c75fcea5842c5236b1b3f7480ef5a3dc415
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
With this commit, messages can be pinned on a channel and
chat conversation. There's a new menu listing all pinned
messages on a conversation, and we can jump to these messages
in the current conversation.
As this feature incentives to see older messages, this commit
also adds a "Jump to Present" button when looking at old messages.
closesodoo/odoo#116666
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Adapt code of message fetch so that fetching of
(needaction) messages are controlled in a way to
keep continuous sequence of messages at all time.
This code design solves the "holes" problem in a message
list by not allowing holes. This fixes many scenario that
generated these holes, resulting in unfetchable messages.
Example of such a scenario:
- post 40 messages
- post a new message that is reply of the oldest message
- page reload and scroll up until load more
=> 10 messages are missing in-between replied message and
following message (that should have been 11 messages apart)
This code also prepares for allowing jumps in a conversation.
Part-of: odoo/odoo#116666
New module that would allow restaurant customers to see the menu on their own devices by scanning a qr code and navigating to the provided link.
Task id 3232765
closesodoo/odoo#114022
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit ensures that keys ending with _view_ref are properly
removed from context when using create and edit action
opw-3256019
closesodoo/odoo#117471
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Calendar popovers are now easier to read and navigate.
If an event contains a lot of information, its popover now grows tall
instead of wide.
In case of more than a few attendees, the widget shows a summary and
allows the user to expand the full list.
The displayed total number of attendees is now accurate, without the
default field limit.
task-2685440
closesodoo/odoo#112114
Signed-off-by: Arnaud Joset <arj@odoo.com>
In a previous PR, we changed the default value of the background loading
of the partners and products to false in 16.0 to saas-16.2
because the features were causing loss of performance in the pos
when clients had lot of products or partners.
We now remove completly this feature saas-16.3 and hardcode the number
of loaded products and partners at the opening of the PoS to respectively
20000 and 100.
closesodoo/odoo#118006
Related: odoo/upgrade#4531
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
- Remove dead code around now-unused categories
- lift `price` processing outside of `find` which complicates it
- use arrow functions, which obviates the need for aliasing `this`
- use slightly more expression-oriented code-style where applicable
Results in code which is noticeably shorter and (I hope) easier to follow.
closesodoo/odoo#117874
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Existing version uses a visually complicated chain of if/else and
double negations, this is much more readable as a simple chain of
AND-ed conditions checking for positive merge-ability factors.
Part-of: odoo/odoo#117874
Before this commit generating timesheet for time off doesn't have
clearer info after the recent change.
This commit update info according to recent changes to have better
understanding to end user.
task-3186664
closesodoo/odoo#115265
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Inactivate unused identification types: passport and unknown
- Fix website in the manifest to point to official documentation
- Fix data in some taxes
- Adds reimbursement taxes
closesodoo/odoo#114273
X-original-commit: 3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd
Related: odoo/enterprise#37747
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
Make the alignment proper between 'external sources' and 'additional resources'
by using the 'col' classes and add the spacing between them.
Task-3229139
closesodoo/odoo#116634
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Currently, there is only 1 plan view that is unreadable on mobile and sometimes also complicated in some cases.
This commit adds a new "Kanban" view used by default on mobile and available in desktop too. This commit also changes the edit bar of the FloorScreen: the design is changed and some features are added like the multiple selection of the tables or the adding and removing of floors directly from the frontend. It also changes the navbar of the PoS, moving the buttons in a navigation menu accessible thanks to a button.
Related Enterprise PR: odoo/enterprise#38699
Task-id: 3212032
closesodoo/odoo#116534
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
This commit slightly modifies the condition to be considered as a
"scored question" for questions of type simple/multi choice.
Now, to be scored, you need to have at least one correct answer.
This notably allows not showing "incorrect answer: 1" when displaying survey
statistics as there is no way to get it correctly.
Task-3224732
closesodoo/odoo#115322
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Before this commit:
It is not possible to add a popover in an iframe (with the popover
service of an app from outside the iframe).
After this commit:
The position hook now finds out the possible target's iframe element,
from which it can compute an offset so it could position properly the
popper element.
Known limitations:
The popover element is not attached inside the iframe's DOM, so there
may be some cases where the popover is shown outside of the iframe
(depends on scrolling).
closesodoo/odoo#116499
Taskid: 3184061
Related: odoo/enterprise#36168
Signed-off-by: Arnaud Joset <arj@odoo.com>
Co-authored-by: Leonardo Pavan Rocha <lpr@odoo.com>
**Before**
The "reference" argument of the usePosition hook is badly named as it
easily be confused with useRef's references.
**After**
The argument has been renamed "target",
which is a terminology used in other places, for example for popovers.
Part-of: odoo/odoo#116499
Before this commit,
There is no way to see the next lesson of attendee.
After this commit,
User/Manager can see the next lesson from backend.
Also added 'is_published' field into course's tree view.
Added search for responsible, tag and content, also added 'Archived' filter.
Task-2199207
closesodoo/odoo#79119
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit,
- Attendee was deleted on leaving the course.
- Remove from membership subtracts earned karma points.
After this commit,
- we will only archive the attendee on leaving the course.
- Joining course again will continue the progress of attendee.
- User inputs also archived on the leaving the course and can continue progress on
joining again.
- Added Archived filteres for the User Input and Attendee.
- Remove from membership will keep the earned karma points as it is and after
rejoining that course will not affect karma points.
- Added 'published' ribbon for only published courses in the kanban view of all
courses.
Task-2199207
Part-of: odoo/odoo#79119
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Move data creation of survey tests from setUp to setupClass as there is no reason
to completely re-create data in between every test and this increases the test
speed without drawbacks.
Task-2199207
Part-of: odoo/odoo#79119
Removing external links from localization manifests and redirect to our own documentation. Ensure that users can learn about our standard localization modules from a source of information that we have authorship on.
closesodoo/odoo#117005
Task-id: 3248632
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Currently, there is only 1 plan view that is unreadable on mobile
and sometimes also complicated in some cases.
This commit adds a new "Kanban" view used by default on mobile
and available in desktop too. This commit also changes the edit bar
of the FloorScreen: the design is changed and some features are added
like the multiple selection of the tables or the adding and removing
of floors directly from the frontend. It also changes the navbar
of the PoS, moving the buttons in a navigation menu accessible
thanks to a button.
Task-id: 3212032
Before this commit, if an user receives an increase or decrease in the XP,
both are currently shown with success badge (green).
After this commit, if there is decrease in user XP, it will be shown with
warning badge (orange).
closesodoo/odoo#118068
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue:
CSRF token was being cached and this caused issues when the session id was updated.
Post requests would continue to use the old CSRF token and it would not be able to be validated with the session id.
Solution:
Added the t-nocache attribute to every instance where csrf_token is called in the case that the session_id is different.
This is changed to behave the same as the csrf token input in the products_item template.
opw-3256880
closesodoo/odoo#117923
X-original-commit: 629d9cb15a6a6eb68756bad9da83cf0a81a3b5bd
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
If applied, this commit will solve the issue of the archived pos config issue
while session accessed from another tab, another device, or another user.
Steps to produce:
- Open the pos session.
- From another device or another tab archive the pos.config record.
- Refresh the opened session.
sentry - 4057306284
see - https://tinyurl.com/2opdugz4closesodoo/odoo#117707
X-original-commit: 75c0f1ca2767837f3e75698ceadeedf362110bd8
Signed-off-by: Achraf <abz@odoo.com>
m2o avater user widget
This commit's purpose is to prevent a traceback when the user click on
an empty avatar user icon.
task-3254564
closesodoo/odoo#117374
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Commit odoo/enterprise@4bbf70f was fixing a timezone issue. Datetimes coming
from lists inserted in a spreadsheet were always displayed in UTC.
However, this commit also changed the formatting behavior.
Before the fix: date/datetimes were dispalyed with the server format
After: they are displayed with the local format (FR if the user lang
is French)
This can lead to issues because spreadsheet only understands a
handfull of date(time) format.
For example, it doesn't understand dd/mm/yyyy format but only
the other way around (mm/dd/yyyy)
This commit restores the previous format (server format), while
preserving the timezone conversion.
opw-3251586
Manual forward-port of odoo/enterprise#39438closesodoo/odoo#118285
X-original-commit: bf84195bce4fbea55d1a4e6a6cd9f17d9be86b73
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Before this commit, when using chatbot on an external website,
the answers were not styled like buttons.
This happens because styling is using bootstrap classnames, which
are not available in the external lib.
This commit fixes the issue by putting SCSS equivalent style rules,
so that the answers are properly styled.
opw-3234872
closesodoo/odoo#118264
X-original-commit: c2c5eee10aa917852c942e1092c026746387e11a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit prevents pasting content inside a link when it is
empty (ZeroWidthSpace only) or its text content is fully selected,
making the pasted content replace the link.
task-3081254
closesodoo/odoo#118204
X-original-commit: 7d0da7f56904927f93ef3d678083f3219fadfdc9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit adds the following test cases that were missing in the
unit tests suite:
-Paste an image URL or a youtube URL as link
-Paste text containing a valid URL among other text fragments
-Paste text containing multiple URLs
-Test if the selection is properly restored after pasting content on a
non-collapsed range followed by an UNDO.
task-3099012
X-original-commit: 0167b031bc9238893c5b4f09bbda996ed0ee914f
Part-of: odoo/odoo#118204
Issue # 1: pasting image/video URL as text
This commit removes this command, because it was considered to be useless.
The category names "Embed" and "Paste" for the other two commands
("Paste as URL" and "Embed Image/Video") were ommited as it is no longer
relevant to group commands, as this would result into two categories with
one command each (the powerbox does not display the category name when all
the commands are under the same one - undefined in this case).
Issue # 2: pasting image/video URL + other text fragments
The powerbox commands are not compatible with an image/video URL + text
or multiple URLs. Choosing one of its commands will lead to loss of all
text fragments but the last valid URL.
This commit ensures the powerbox options are only offered when a single
image/video URL is pasted.
Issue # 3: pasting image URL inside an exisiting link
Even though the Editor's specs do not allow a URL to be transformed into
a link when pasting it inside an exisiting link, before this commit,
pasting an image URL inside a link would open the powerbox with 3 commands,
one of them allowing to transform the URL into a link.
This commit ensures the powerbox with the "Paste as URL" command is not
opened in such case. When pasting an image URL inside an existing link, the
image is directly embedded, and other URLs are pasted as text.
Issue # 4: unnecessary regex matching
Before this commit, every text fragment in "text URL text" was being
prepended with "https://" and a match with the URL regex was attempted.
Every fragment (text or URL) was also probed for a match with the
youtube video URL regex, but such matches would be discarded anyway in
modules like note and mass_mailing where the allowCommandVideo option
is set to false.
This commit avoids unnecessary searching with regular expressions by treating
pasting of a single URL (possibly an image or video URL that would lead
to powerbox commands) differently than URLs pasted among other text fragments
or other URLs (see issue # 2 above).
Issue # 5: `historyPauseSteps` with argument
This function takes no arguments. Yet, it was called with the string 'onPaste'
as argument. This commit removes it.
task-3099012
X-original-commit: 3fb93d7e9047a73a8e84f165e2ff52b9887d34a4
Part-of: odoo/odoo#118204
Powerbox commands are grouped under categories.
But this is not very usefull when:
- All commands are under of the same category
- Each command is under a different category
This commit hides the category name when all the commands passed to the
powebox are under the same category.
In order to avoid the second scenario, the commands array should be passed
to `Powerbox.open()` with all commands having the same category name (the name
does not matter), or even with `category` undefined.
X-original-commit: 93d632861996c78502b33538cc7ff06d8419602c
Part-of: odoo/odoo#118204
Before this commit, after pasting a valid URL on a non-collapsed selection
followed by UNDO, the selection was not restored to the original range.
This was due to not recording the selection in the current history step
before creating the link.
After pasting text composed of a valid URL between text fragments on a
non-collapsed selection followed by UNDO, the selection was again not
properly restored. This time, because each text fragment insertion was
done via execCommand, which calls _computeHistorySelection and thus
overwrites the current step's selection.
This commit:
- refactors code for link creation into a single function;
- wraps the link creation at `_onPaste` in a 'insertHTML' command called
via `_applyCommand`, which records the selection properly in the history
step;
- replaces `execCommand` by `_applyCommand` for text fragments
insertion.
task-3099012
X-original-commit: 20bb1a2090c90f87a819fdc1c3bbb332cae3720e
Part-of: odoo/odoo#118204
Steps to reproduce:
Go to Manufacturing App
Click on some MO
When pressing the 'ALT' shortcut key the Scrap and Cancel tabs offer the letter 'Z'.
According to this spreadsheet
the scrap action (line 79) should be assigned to shortkey 'Y'
OPW-3202893
closesodoo/odoo#118075
X-original-commit: 577a467ca757b1d0c02e13e0710f2c0216c1e6a0
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: malv-odoo <malv@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Tracked binary fields do not produce any message in the chatter
Steps to reproduce:
1. Install Sales and Studio
2. Open any quotation
3. Trigger Studio and add a signature field to the form
4. With debug mode enabled, edit the field (by clicking on MORE when the
field is selected) and set the Enable Ordered Tracking to 1
5. Close Studio
6. Edit the signature and save
7. No message appears in the chatter to track the value
Solution:
Remove the `tracking` field from binary fields to prevent the user from
trying to track it
Problem:
We shouldn't track binary data in the chatter and we cannot use the
filenames
opw-3055108
task-3255810
closesodoo/odoo#118278
X-original-commit: 4e309ce5eae282fd28e77bf46d3fdf6bb91bd92b
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This commit aims to improve usability of work entries by improving the form and adding a default start and end hour going from 9 to 17
task - 3062158
closesodoo/odoo#118252
X-original-commit: 36eca7e6b0ad6b3570ce2478b10ec4da1a157617
Related: odoo/enterprise#39592
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps to reproduce:
- set early_pay_discount_computation on company to mixed.
- create an expense with taxes
- try to post entries from the expense
> traceback
This commit adds the missing key in the needed_terms computed
on in hr_expense. We could have bypassed the computation in the
case of expenses but simply adding the key sounds like a more
future-proof solution.
opw-3244294
closesodoo/odoo#118250
X-original-commit: 7922a7db0d840a33a3db54da1a359ac95e61cb7b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
Replace matched filter by unmatched in payment view.
It makes more sense to find payments that are unmatched.
closesodoo/odoo#118249
Task-id: 3231191
X-original-commit: f1143800676dacce3956d207b778d82422b3005a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
Steps to reproduce:
- Create two sales journals
- Select the second journal
- Upload an invoice
- The invoice is in the first journal instead of the second
Fix:
We can simply use the context to retrieve the current selected journal
if it's given, otherwise we use the previous fallback (infering the
journal with the move type)
task-id 3258956
closesodoo/odoo#118258
X-original-commit: 12f22cd06a7b25fc4740a689aad63e0ebc357e4c
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
1-create a weight unit 'jm' bigger than reference
ratio 2.47541 rounding 0.001
2-create a stored product uom:'jm' / purchase_uom: 'kg'
3-set valuation method to automated (fifo)
4-create a replenishement for 200 (jm)
5-confirm and recieve the products
6-valuation for that stock move is null
Bug:
computations in the stock module are done with rounding method (half-up)
when computing the unit price the recieved quantity is computed with up
rounding which leads to a mismatch
Fix:
applied the same rounding method on all the Steps
opw-3213997
closesodoo/odoo#118251
X-original-commit: c305942958c73414def47ebd299227999841c6ed
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Before this commit, in white theme, chat window rounded borders
had some white color leak.
This comes from background color of chat window, which is white,
while the header background color is purple.
This commit fixes the issue by setting the chat window background
color to purple. The content now defines its own color, and the
header just inherit from the chat window background color.
This commit also fixes a bug where the chat window hidden menu
items were below visible chat windows.
closesodoo/odoo#118242
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The tax totals widget is formatting data using the old props instead of the new. When viewing an invoice the currency is correct, but when scrolling through records or changing currencies, the currency in the widget is not correct.
To replicate:
1. Create 2 invoices, one in EUR, one in USD, ideally both with tax
2. Scroll through the record form views using the next/previous pager buttons
3. Observe the currency is not correct (display USD instead of EUR, and EUR instead of USD)
This fix modifies the way the record data (props.value) is formatted, and ensures using the correct currency (nextProps) instead of the old one (props)
OPW-3244079
closesodoo/odoo#118241
X-original-commit: 15a610acddf4ea19082a88aaf1eee231aa1fe91f
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
Based on change from PR odoo@df74fb6,
the rule stated on the document attached has been reverted.
It should be using the customer's tax address rather
than the delivery address'.
3230742
closesodoo/odoo#118230
X-original-commit: 40399e570ca1b04af44e45a5305bc67c7fbf01e2
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Before this commit, when global height was below height
of a chat window, the chat window was overflowing.
This commit fixes the issue by ceiling the height of chat
window to the global height.
closesodoo/odoo#118229
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Make the res_partner_many2one behave similarly to the many2one field
during blur where a confirmation dialog is shown.
closesodoo/odoo#118008
Task-id: 3205625
X-original-commit: 198fdca401ff6b0062111f513138af76eeb68e23
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Install appointments
- Log in as Marc Demo
- Go to Calendar/Online appointments
- Click on a record in the availability x2many fields
Current behaviour:
It opens the record in a form modal.
Expected behaviour
It should not open the record since #110838 because the x2manyfield
is in `editable="bottom"`.
closesodoo/odoo#118225
X-original-commit: d4399a87f1ca59389d7e58754b67c3fc816cb25a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit, on clicking the picking calendar view, it allows the quick adding from the calendar view and entered value is going to the name field of stock.picking model.
after this commit, quick adding will be disabled and on clicking form will be opened with selected date.
closesodoo/odoo#118222
X-original-commit: c06f88c2535f959bc60416b6f32cb51ea1481c2a
Signed-off-by: Tiffany Chang <tic@odoo.com>
before this commit, in the website forum faq section,
it is shown, for each down vote it will reduce 10 xp,
but actually it is reducing 2 XP.
after this commit, the points shown in the faq
will be corrected to 2 xp from 10 xp.
closesodoo/odoo#118216
X-original-commit: 3168a39885ec8d4bdf3f9029ab0716beaee11ba1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>