New common based on new common infrastructure (base, uom, product, sales
team).
* Conversion of existing tests to use the common
* Remove invoicing tests common dependency when not needed (overkill
setup for most tests)
* Move tests to the correct test file.
* Rename test_sale_pricelist into test_sale_prices and add tests to
improve coverage of price computation.
* new file test_controllers to regroup all tests covering the routes.
* Speed up tests setup by creating records in batch
* Reduce tests setups and use more the common tests data.
Part-of: odoo/odoo#96791
* commons & setup refactoring:
* convert setUp to setUpClass
* move setups where needed (stock/mrp commons or specific test
classes)
* create test data in batch (faster, less sql queries & batched
operations)
* move most tests post-install to allow runbot splits
* by default, run tests without mail logic
* by default, run tests in a consistent environment (fixed currency
imposed in the BaseCommon)
* refactor existing tests to use new commons data (while trying to keep
diff reduced)
* add dedicated test file to test the common data
* use mute_logger to reduce useless test logs (less spam to scroll in
logs, less data on runbot builds, ...)
Part-of: odoo/odoo#96791
The unit price isn't supported/specified on sale order template line
anymore, no need to mention it in the constraint message (the check on
the field was removed along with the field)
Part-of: odoo/odoo#96791
Before this commit, when a snippet was moved, and dropped outside of a
dropzone, the nearest dropzone was not found and the snippet would
return to its initial position.
This commit fixes it by using the editable document instead of the
global one.
Related to https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#96401
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, clicking on the "anchor" icon from a snippet editor
would copy the client action's url (introduced in [1]).
This commit changes the snippet's path computation to use the target's
ownerDocument location instead of the global one.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
Before this commit, the editor shortcuts would not work.
Example: "alt+1", or "alt+2" switch tab of the editor.
This commit registers the editor as the active element, so that keyboard
shortcuts registered on that element are given priority at the hotkey
service level. The "escape" shortcut to go fullscreen is adapted with
the global option to be independent from the active element.
This commit also adds the "alt+p" keyboard shortcut on the publish
systray item.
Related to https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
Before this commit, the website context was configured with the params
of the client action, at all times. This was leading to weird
behaviours:
- Go to the website client action
- Install the "Blogs" module from the new content systray item
- Navigate on a blog post from the client action
- Click on the "Settings" systray item (last one from the right)
- Click on the "Website Preview" breadcrumb item
=> The "New Content" modal is displayed, again, when it should not.
Another flow, on enterprise:
- Start the client action with /@/?enable_editor=1
- Click on the top left icon to go back to the home screen
- Click on the top left icon to go back to the website
=> The editor is launched when it should not.
To prevent that, the action jsId key is registered at the website
service level. If the action is restored, the jsId will be the same, and
the params used to configure the context will be ignored.
Related to https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
After [1] was merged, the delete/move buttons of the snippets overlay
reduced in size, because of the font-size difference between the backend
and the frontend.
This commit fixes it by setting a fixed font-size of 16px (this restores
the same size as before, as the button was using 1rem on the frontend,
and most browsers use 16px as a default font size).
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
Before this commit, the Page Layout > Background option's widget of the
Theme section of the SnippetsMenu was not updated correctly after using
the option.
The #wrapwrap was queried in the global document when it should be
queried in the target's ownerDocument.
Related to https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
Before [1] was merged, for this flow:
- Drop a snippet in the page
- Click on some paragraph
- Click on a snippet option's widget
=> The text selection was lost on Chrome, but kept on Firefox.
With [1] instantiating the SnippetsMenu on a different document than the
snippets one, it was possible to keep the text selection (the snippets
document selection) when clicking on the snippets options (on the global
document).
Some code was added to preserve the Chrome behaviour and lose the text
selection. This code is reverted to keep the Firefox behaviour.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#96401
This commit gets rid of the iframefallback in test mode. It is not
helpful there and slows down the tests as it involves some HTTP
requests.
Its purpose is only for the end users to have a smoother UX during page
transition. It is irrelevant in tests. Note that it means the tests
wouldn't break if that iframe fallback was to be breaking something in
real use cases.
task-2687506
closesodoo/odoo#96229
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This PR is part of the whole migration of the sale javascript
code and related code to the owl framework.
Why: better developmet framework for javascript code in odoo.
This PR in particular targets the progressbar of sales team
appearing on the CRM app.
Task - 2918635
closesodoo/odoo#95565
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Purpose of the commit is to do the generic improvements for project.
So in this commit did the following changes:
- the 'upsell opportunity' activity should be generated even
if the service has already been invoiced
- project.task hide the 'create' button if the project in the
context is archived
- project.task portal form view: only the ref of the invoice
should be underlined on hover, not the empty space.
task-2857924
closesodoo/odoo#94776
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2865713
closesodoo/odoo#93049
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Remove exception initially introduced for 'o-btn-link-variant' mixin
when handling 'text-muted' links.
The opacity-change wasn't really needed and introduced inconsistencies
with other links designs and with the mixin logic.
In case of complex/custom scenarios that requires opacity-changes,
'o-opacity-x' utility-classes can be used to achieve the desired design.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2865713
Part-of: odoo/odoo#93049
In this commit done following change:
- Add 'Timesheets' report in sale order and invoice.
- Rename 'Timesheet Entries' report into 'Timesheets'.-
task-2826265
closesodoo/odoo#90744
Related: odoo/enterprise#27047
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit prevent user write on time off timesheets and create timesheet
on time off tasks and add test for this feature.
task-2826265
Part-of: odoo/odoo#90744
Small visual changes that should improve the user experience.
The loading demo data popup has been moved to the backend.
Created an Alert Popup that is less aggressive than an Error Popup
closesodoo/odoo#83780
Task-id: 2485062
Related: odoo/enterprise#26104
Signed-off-by: Masereel Pierre <pim@odoo.com>
The e-mail conversion process for Bootstrap cards stripped card-images
from their link when they had one. This corrects the process to preserve
the link.
task-2937123
closesodoo/odoo#97199
X-original-commit: 947ee6756b9e9d9ddf7380ecaf0beb27c271b231
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The mock of sendone/many was relying on the bus_service. Since owl.Component.env
is changing during tests setup, the bus_service was not always defined. In order
to make this more reliable, the longpolling/poll route is now mocked, returning a
promise that can be resolved by the sendone/many methods.
closesodoo/odoo#97298
Related: odoo/enterprise#30059
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
After inserting the 'calendar' or 'appointment' link in an article through the
'/appointment ' or '/calendar' command, removing the link shows the error.
After this commit:
Removing the link through the link editor will remove the link and only keep the
text.
Task-2894489
closesodoo/odoo#97210
X-original-commit: 8eda489a26a3d138c2e4c601e42b531e6bc719b6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Purpose
=======
Allow commands in the command palette to be opened in a new tab by
either CTRL+clicking on the command, CTRL+ENTER or right clicking and
copying the link/opening in new tab.
Specifications
=============
Add new slot `focusMessage` that displays the message (if device is not
a mobile device). The `href` value has then to be defined in the
registry.
Task-2710445
closesodoo/odoo#94241
Related: odoo/enterprise#29715
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Purpose
=======
Allow commands in the command palette to be opened in a new tab by
either CTRL+clicking on the command, CTRL+ENTER or right clicking and
copying the link/opening in new tab.
Specifications
=============
Add new slot `focusMessage` that displays the message (if device is not
a mobile device). The `href` value has then to be defined in the
registry.
Task-2710445
Part-of: odoo/odoo#94241
Purpose:
========
Knowledge's command palette layout is standardized so that its layout
matches the one of the standard command palette. Therefore,
"o_command_left" is not used anymore and its style is removed.
Fix a small typo: ".test-ellipsis" to ".text-ellipsis".
Task-2710445
Part-of: odoo/odoo#94241
- Less Overwhelming: reduces the hover zone to an icon. Tooltip
appearances are less intrusive as you move the mouse in the screen
- More discoverable: show an icon for the fields that have a tooltip
- better UX: max-width on the popup
closesodoo/odoo#97440
Note: commit 3363e55cac reduced help messages to useful ones.
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
A test introduced with https://github.com/odoo/odoo/pull/96432
revealed an issue with the level limits for the accrual plans.
The only applied limit was the one of the current level at the end of
the run, however if for whatever reason multiple levels had to be
processed at once (if the database was shut down for a long period of
time for example), the individual levels would not apply any limit logic
to their behaviour which meant that you could have a different behaviour
between running the cron each day and running it after a long period.
This commit aims to fix that issue by applying the said limit.
OPW-2868297
closesodoo/odoo#97540
X-original-commit: 09fa1020f42d641fc0011d482cdd08aea4f4085a
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior this fix, creating an action with (e.g.)
additional_context : {create: 0} wouldn't have any effect
on calendar view.
Now, if this context key is added, the user won't be able to create.
Also true for delete and write.
closesodoo/odoo#97538
X-original-commit: 8d108f32b8333f0698427f9a7f12765c8addd8ae
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
- Switch odoo language to french
- Create a client bill for Azure Interior of $1 000 000
- Confirm it
- Go to the accounting dashboard
- On the bank, click on reconcile
- Select Azure interior
- Click on the correct bill
- Switch to Manual operations
-> $1 000 000 is not a correct monetary field
Cause of the issue:
Recently in https://github.com/odoo/odoo/pull/94126 , `formatMonetary`
switched from joining the currency and symbol from ` ` to a non
breaking space, NBSP.
To parse monetary values, the behavior was to split around NBSP to
get the symbol on one side and the value on the other which is then
passed to `parseFloat`.
For the following examples, NBSP is replaced with an underscore.
So `$_1000` becomes `$, 1000`
But some languages such as french uses the same char as thousands
separator.
In that case, `$_1_000` becomes `$, 1, 000` and then the parse fails.
opw-2937403
closesodoo/odoo#97513
X-original-commit: 9d36722797669498dfd1ad4659e5f29347ba30f3
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Prior to this commit, if an user chose to fetch 16 elements, the snippet
would bug out and display 16 elements per row.
Steps to reproduce:
- Install website_sale
- Drop a product snippet
- Select 16 fetched elements
- Layout is broken
Some legacy code introduced in [1] could result in an infinite loading
animation locking the editor out. This commit removes the code as a
fix made at [2] makes it unneeded.
Steps to reproduce:
- Install website_sale
- Enable debug mode
- Drop a "Dynamic Snippet Carousel"
- Click on the Dynamic Snippet for edit
- Sometimes the editor hangs and the page needs to be refreshed
[1]: https://github.com/odoo/odoo/commit/3c0d98bcd8adf9325ee3497eb8d25ec7f904d6a5
[2]: https://github.com/odoo/odoo/commit/ac8d83cc124a6175a263e11795fda35eebe69324
Related to task-2677203
closesodoo/odoo#97502
X-original-commit: 5ef31db8599d5dbe7ed07c88ac1c703bd7287345
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit when the header scroll effect was happening, the
related DOM updates were recorded in the editor's history.
This commit deactivates the history during the updates of the header.
Steps to reproduce:
- Drop a "Text" block in the page.
- Drop 4 "Banner" blocks below the "Text" block to make the page
scrollable.
- Save.
- Edit page.
- DO NOT SCROLL until the last step.
- Select the Text block.
- Delete the Text block.
- Click undo => Text block reappears as expected.
- Click redo => Text block disappears as expected.
- Click undo.
- Scroll down until header vanishes and reappears.
=> Redo step is lost, undo tries to undo the header animation.
task-2930568
closesodoo/odoo#97488
X-original-commit: c710f73f84ce798b8363b7f8904f96b9eacd56dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When test are skipped, we don't have any information of why.
It seems important to log also the reason, it can help
developers to find the source of issues (example: when your chrome
doesn't the devtools active: you just know that test is skipped, but
don't know why)
closesodoo/odoo#97481
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit, when the autofocus is used on an input with
`type="number", the `selectionEnd` is not available because the input
element's type ('number') does not support selection.
This commit checks the input type is not a number:
- if it is the case then the selection is used to place the cursor at
the end of the input content,
- otherwise the selection properties are not used and the input is
simply focused.
closesodoo/odoo#97466
X-original-commit: 38a5de7b2962a47c29b23f12f2ea7599bdea11fd
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Currently, the project's analytic account and analytic tags are not set by
default in the task. Now it will be fixed.
Steps to reproduce:
1. Install project
2. Activate the analytic account and analytic tags in the user setting
3. Create a project with analytic account and analytic tags
4. Create a task from the kanban view
5. Check the analytic account and analytic tags in the task
Steps to reproduce:
1. Install sale_project
2. Activate the analytic account and analytic tags in the user setting
3. Create a project with analytic account and analytic tags
4. Create a product (Create on Order = task)
5. Create a sale order and confirm
6. Check the analytic account and analytic tags in the task
task-2930761
closesodoo/odoo#97455
X-original-commit: 0a5bc153cf682b29b1c86ac966d8164bd41acbdb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Issue: When using other languages, some expressions aren't translated.
Solution: Add the untranslated words in the .pot file of the module website_sale, which will
be translated later in transifex or directly in customer database.
opw-2938969
closesodoo/odoo#97454
X-original-commit: 56a3adf46b5b361c304075da7ceccb5d915befb0
Signed-off-by: Eteil Djoumatchoua (etdj) <etdj@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Purpose of this commit to improve generic usage of project app.
So in this commit done following changes:
- when deleting a project, delete all of its tasks in the process instead of
raising an error
- make the list view editable bottom
- add a 'view task' button to open the task form view
- the 'download' and 'print' buttons should be centred
- rename 'planned hours' into 'allocated hours' (or 'allocated days' if the
timesheet encoding unit is in days)
- when a project is linked to an SO manually, he should appear in the
'projects' stat button of the SO; same goes for tasks
- remove the 'profitability' setting
- display the SOL and the quantity in red as well if the milestone hasn't been
reached yet for update right side panel
- add a project field for quickcreate in kanban view
- 'fa-check-square-o x/y' in muted on the project kanban cards
task-2838372
closesodoo/odoo#92262
Related: odoo/enterprise#27758
Related: odoo/upgrade#3561
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit: if the "Limited Partners Loading" were enabled, the
partner wouldn't set when using the "Quotation/Order" functionality
for unsynced partners.
Steps to reproduce the issue on the runbot:
Enable developer mode.
Go to the Point of Sale.
Open the config of any pos.
Enable "Limited Partners Loading" and set "Number of Partners
Loaded" to a low number (like 5 or 10)
Disable "Load all remaining partners in the background."
Open a new PoS session for the configured PoS
Use the "Quotation/Order" functionality.
Select any order, for example, S00043.
The customer is not set for the current pos order.
Solution
The solution is to load the partner.
Also, there was an issue when using the limited number of partner loading
when it tried to load the cached and paid orders' partners. I added a function
to load missing partners.
opw-2883686
closesodoo/odoo#97442
X-original-commit: 4d7c05346e0c253c8b11736b9ee9f8426a87f2af
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit, in a list view with a record being edited, if you
click on the header of a column sortable and press a key then a
crash is displayed.
Solution:
We will unselect the record when we click on a column header
(sortable or not). It will be impossible to focus the header of a column
when a record is in edit mode. Either the record is in readonly mode,
or it is invalid and the invalid field is focused.
How to reproduce:
- Go to a list view
- Switch a record to edit mode
- Click on the header of an sortable column
- Press a key (for example "a")
Before:
Crash is displayed, the record is still in edition and the header
of the column is focused.
After:
When you click on the header, the record switches to readonly mode
and the header of the column is not focused.
closesodoo/odoo#97433
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
On the res.config.settings form view, click on button that will do an action
e.g. defined as some flavor of `<button type="object" name="myMethod" />`
Before this commit, this did not work as we never fully created the res.config.settings record in python
hence, when executing myMethod on the model res.config.settings, the ID was unset, pointing to no record.
After this commit, we "create" in python the transient res.config.settings record before doing anything.
closesodoo/odoo#97428
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Just a nice to have. It will prevent those errors to be replicated when
copy pasted and will help reading the files in the IDE.
closesodoo/odoo#97282
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Changed specialData (as in statusbar) were not discarded when clicking "Discard".
Now, when a form is Discarded, the specialData is restored.
Example: In project.task form view, there is a statusbar in which the domain depends on the project_id.
Edit a task, remove the project and the statusbar is updated. When discarding, the statusbar
is not restored to his initial state. Now it is restored to his initial state.
task_id: 2811530
closesodoo/odoo#97164
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>