Issue:
In finnish localization, partners have by default account payable "2700 Velat saman konsernin yrityksille, pitkäaikaiset" which is incorrect
Expected behaviour: The default account payable for finnich localization should be "2870 Ostovelat"
Solution:
In l1On_fi/data/l10n_fi_chart_post_data.xml, the "property_account_payable_id" is set to "account_2700". Just change it to "account_2870"
closesodoo/odoo#97212
X-original-commit: 4efb8928a4f000dab0b62f84d3a01ee2632f8b19
Signed-off-by: Josse Colpaert <jco@odoo.com>
In the QUnit test suite, we have cleanup code that runs after each
test to ensure that event listeners, setTimeouts... registered
during a test are removed. This is particularly useful for services,
as they do not have a "destroy" function to cleanup those handlers
they would have registered at startup. Side note: they don't
because it would only be useful for tests, as a service lives
forever in the prod environment.
Before this commit, that cleanup code didn't remove callbacks
registered with a setInterval. Moreover, we didn't remove event
handlers bound on document.body either. As a consequence, there
were memory leaks in the test suite (e.g. callbacks of the tooltip
service), and some crashes could occur if the user interacted with
the window after test completion.
closesodoo/odoo#97100
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There can be many accounts in self and the "search_read" is currently breaking because of self.company_id in the domain.
This commit addresses two problems:
- Creating accounts in a multi-company environment
- Setting a default account_type when there is no parent found.
Account codes should however be still limited to the current company even though for performance reason we batch the searching part.
closesodoo/odoo#96832
Signed-off-by: William André (wan) <wan@odoo.com>
This adds a series of tests for the editor's Powerbox and its
integration with the editor.
closesodoo/odoo#96287
Related: odoo/enterprise#29649
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The upgrade from Bootstrap 4 to 5 broke the display of the Powerbox when
the editor is in a modal. This adapts the Powerbox's z-index to make
sure it always displays above a modal.
task-2901697
Part-of: odoo/odoo#96287
Odoo Editor's styles were defined in CSS when it was all still part of
a separate repository. They can now be converted to SCSS, which will
allow us to use Odoo's SCSS variables in the future, and allows us now
to refactor the styles in the more readable SCSS format.
Part-of: odoo/odoo#96287
This introduces a new API for the Powerbox, which allows to order its
commands and categories. The order is based on the priority assigned to
the category or command. If two items have the same priority, they are
ordered alphabetically.
To order categories, pass said categories in the Powerbox's params, each
with its own priority. If a command declares itself as part of a
category that was not itself declared, said category will be added
automatically, with the lowest priority.
task-2901697
Part-of: odoo/odoo#96287
- Merge `_check_barcode_unique` and `_check_barcode_uniqueness`.
- Simplify the code and avoid costly read_group
- Add missing index on barcode of `product.product` (before there was an
unique constraint)
(Note that the constraints isn't transactional safe because it is not an
SQL contraints)
closesodoo/odoo#96043
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit improves the helper message in team member action
task- 2583755
closesodoo/odoo#92616
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When we open the 'CRM > Configuration > Team Members' menu, if there are no
members in any of the teams, we see the empty screen(no dummy data, no
action helper), which looks a bit ugly.
This commit improves the behavior by displaying all the (accessible) sales
teams, even if they are empty. So, even if there are no members available,
we will get to see the dummy data and action helper.
Note that in the data, we already have one sales team available, so this
should be okay. But if someone intentionally removes all the teams, it
will still lead to an empty ugly screen. Since this is a rare case, we
haven't considered it for now.
task-2583755
Part-of: odoo/odoo#92616
Before this commit field `visits` was not displayed on form view.
With this commit, Field is now readonly at model level and
added on form view.
closesodoo/odoo#74336
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The redirect field in website does not work properly in the new views.
With this commit, we just reimplement it to make it work with the new
code.
closesodoo/odoo#96865
Related: odoo/enterprise#30178
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the rules on oe_stat_button only applied if the stat
button was a direct child of the button box. However, this is a problem
with the way fields are now wrapped in a div, so it is no longer
possible for a field to be styled like a stat button.
With this commit, we simply make the rule less restrictive.
Part-of: odoo/odoo#96865
With the new views in owl, we wrapped every field in a div with the
class o_field_widget. This is a good thing in general, but it has the
issue that before this commit, the display property was set to
inline-block, in all cases.
With this commit, we set it to 'contents', which means that it will
simply get the correct display value from its content.
Part-of: odoo/odoo#96865
Before this commit, the isVisible helper would most of the time work as
expected, except if an element has display: contents. In that case, it
has no bounding box, but it may still be visible if one of its child
is visible.
This is particularly important since we want to set the display property
of all field components to "contents".
Part-of: odoo/odoo#96865
* Clean tests setups
* Use setUpClass instead of setUp
* remove useless test data or move it to the place(s) of use
* when possible, use existing test data instead of creating another custom setup for the current test
* remove unnecessary dependencies on accounting common
* make tests work without demo data (when not relying on accounting common)
* run base product/sale tests without triggering mail logic
* create records in batch to improve performance (reduced queries, batched operations, ...)
* Create the base of a clean test architecture for those modules (with dedicated commons in the right modules)
* Improve some tests (mainly prices/pricelist tests in sale)
* Add `mute_logger` contexts in some tests to reduce useless test logs
* Try to improve tests consistency (fixed test currency, archiving existing demo data to avoid side-effects, ...)
* Move most `product` tests `post_install` to benefit from the split of `post_install` tests on runbot.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#96791
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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