Both language and country are displayed in the channel member list. Before this
commit, this was displayed in one line when available which looked bad. This
commit allow those items to wrap for a better display.
closesodoo/odoo#130220
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit aims to minimize a very annoying issue that comes up
frequently: it is often necessary to go in debug mode to configure odoo
for a demo. Then, if we don't explicitely remove debug mode, it will
persist (because it is stored in the session). As a result, technical
tooltips will be visible during the demo, which may be distracting and
give a bad impression, because these tooltips are designed to provide a
lot of technical information.
It is not clear how we could solve the problem. Many questions arise
when discussing the issue:
- splitting technical and debug mode
- removing debug mode from the session
- but still making sure tests works
- what information should be displayed in ui?
- if debug mode is not persistant, find a way to make it temporarily
active
There are a lot of different opinions and needs that are not easily
solved. This commit does not pretend to solve them, it is just a quick
way to reduce the issue mentioned above, by changing the JS code to only
use debug mode if it is explicitely set from the url.
Concretely, it means that the "js" specific debug features are
configured only with the debug parameter in the url:
- technical tooltips
- owl props validation
- displaying the debug menu
The rest will keep working as before:
- debug=assets
- debug=tests
- additional menu items/fields
Again, this commit is just a quick fix, until someone can find a spec
that get enough traction.
closes odoo/odoo#130060
Taskid: #3255925
X-original-commit: 59f49d6a8c856a5d8ca28dcfd7840baaa1c7672f
Related: odoo/enterprise#44783
Signed-off-by: Géry Debongnie <ged@odoo.com>
When the mechanism that synchronise odoo fields contained an
unremovable, even though no unremovable got removed, the Odoo editor
would rollback as the syncing mechanism would set innerHTML to the
synced nodes, which would remove the unremovable. To prevent the
rollback in that kind of circumstance, this commit introduce a new
method on the OdooEditor `withoutRollback`.
task-3436834
closesodoo/odoo#129320
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Purpose:
To make the marker of a ordered list different at each level.
- Numbers for first level.
- Alphabets for second level.
- Roman numbers for the third level.
looping back to numbers if nested further.
To make the marker of a unordered list different at each
level.
- Disc for first level.
- Circle for second level.
- Square for the third level.
looping back to disc if nested further.
task-3412826
closesodoo/odoo#128532
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In this commit*, the forward-ported test was not moved with the fix on
stock.picking from delivery to stock_delivery, although the test relies
on real invoicing, which is defined in stock_delivery.
Fixes build error 22434
* e1e04f3a176e15fdce81ce3036093d3951401f52
closesodoo/odoo#130217
X-original-commit: 5518daae14aa91e3c2c6723c6059f337c6ee0914
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
The tour was using a payment provider that was not installed. This
commit makes sure the test only runs when the payment provider is
installed.
Fixes build error 19829
closesodoo/odoo#130214
X-original-commit: ba75b1c023988e17852821ddaf32163c2e2f9d6e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Commit [1] introduced an option in the Wysiwyg widget to save pasted
and dropped images as attachments instead of keeping them as inline
base64-encoded sources.
In order to prevent records from having excessively large sizes in their
html field content, this commit makes such option the default one for
the Wysiwyg class.
task-3289061
[1]: https://github.com/odoo/odoo/commit/b8e7fb4a5ec8c75deff37dc1737b6a3d3b123cc3closesodoo/odoo#130213
X-original-commit: 7e06b40ea58f58069729f881f7d4559d17778fe7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since the refactor done in [1], the default Wysiwyg options is not
applied to the final options object when the website's
WysiwygAdapterComponent is instantiated. This happened because the
`_getEditorOptions` method is overriden without calling `super`.
As a result, before this commit, commands like "video" or "image" were
no longer available when editing text in website, as the options that
enable such commands were missing.
This commit fixes it by calling super in the overriding method.
[1]: https://github.com/odoo/odoo/pull/118966/commits/fed6569c9671c61269ed7ffa3bfcdb919a0daf14
X-original-commit: 9f2ebb7ffa3742d7da369f5020d57317c5a1794a
Part-of: odoo/odoo#130213
The test verifying the values of the sale report in a multi-comp & multi-curr
environment relies on the fact that the main company is by default in USD.
Nevertheless, the test fails when a localization is installed (if it changes
the currency of the main company).
This commit makes sure the tests always works, and resurrects the right tool
for that, which was dropped in commit 3752b3166e.
Cf runbot build error 22351
closesodoo/odoo#130201
X-original-commit: a73b5fce4fb02eefc681c55eab8f57cd35105226
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().
task-3292454
closesodoo/odoo#130179
Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit removes a function from the Record datapoint, and
replaces it by an option to checkValidity, as we want Record to
have a few public methods as possible.
Part of task~3179751
closesodoo/odoo#130170
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
When on helpdesk app (or any app with an activity view), if you go on the
activity view while having activities due on a previous year it will
cause a traceback "TypeError: date.toLocaleDateString is not a function"
This happens because the function tries to call toLocaleDateString on a
datetime variable, not a date one.
opw-3432005
closesodoo/odoo#130090
X-original-commit: 81ec723b3956f198d5de99a5a4214359f67b8327
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since the relational model was rewritten (PR 114024), the record id is
no longer present in data by default. The correct way to access the id of
a record is to do record.resId.
closesodoo/odoo#130061
Related: odoo/enterprise#44785
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes a traceback when trying to install demo data from the UI.
Steps to reproduce:
- create a database with website_event_track_live installed and without demo data
- load demo data from the UI (settings)
- odoo.exceptions.AccessError: You are not allowed to create 'Website Visitor'
(website.visitor) records.
There is a traceback because the installer can't create `website_visitor`
records because there are no groups that have create access rights for that
model.
This is because xml_import used to get an environment with root privileges, that
can bypass access rights, but now the environment is a parameter passed to the
function and doesn't necessarily have sudo
This change was introduced in
5bf1207#diff-8e4705d5ab335a8dfc2c70eeedc502a92695989f97c4f19184b49634c2c4ad55L583-R583
; with this commit, the environment used by xml_import doesn't necessarily have
sudo, so we simply make sure `load_demo` loads data with sudo.
Task-3202914
closesodoo/odoo#129946
X-original-commit: 85834371e0eede05858cb2dc33412396c6e5c5bf
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
Based on the SII documentation, DescripcionOperacion should have max 500
characters. Since it's based on invoice_origin field it can exceed this limit.
Now this value will be trimmed to the first 500 characters.
opw-3421094
closesodoo/odoo#130184
X-original-commit: 876d1a216eda4eb9ea1b3eb15a94cea10c4f25f9
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, when editing a message in chatter and
typing `@` to display mention suggestions, the list changed
position between `top` and `bottom` based on content size of
suggestion list.
This happens because by default suggestion list in composer are
positioned `top`, as most composers are at the bottom of screen,
and message to be edited are recent messages, which are usually
at the bottom of screen.
Chatter is special in that composer is at the top of the screen,
and recent messages are shown at the top of screen too. The better
position in this configuration is `bottom`.
Condition was on composer being linked to chatter thread, which is
the case when posting a message for the 1st time. While editing a
message however, the composer is linked to a message and not a
thread, therefore the condition `thread?.type === 'chatter'` was
falsy and default position `top` was chosen. Due to position being
a recommendation and placement of composer at the top of screen,
with many mentions it was displayed at `bottom`, and with few
suggestions it changed to `top`.
This commit fixes the issue by relying on the context of the
composer with `env.inChatter`, which covers all chatter used in the
displaying of chatter with composer at the top, including when
editing a message.
closesodoo/odoo#130106
X-original-commit: a03705d0f55e887ec05cb41d7cf86db748f77955
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
When having a python format in the ref (or memo) of a payment, going to journal
items, select the move and doing an automatic entries, when changing the account
a traceback appears.
In the _format_new_transfer_move_log, we create a format that will be put in
the chatter. In this message we use python format without considering the
possibility that we can have one in the link of the move.
By putting the python format before formatting the link, the issues is solved.
task: 3434131
closesodoo/odoo#130091
X-original-commit: 12e0e6a492a010d61a8a1f763c72e25765654511
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
Since the relational model was rewritten (PR 114024), it is now reactive,
so it is no longer necessary to use model.notify() to render the view.
closesodoo/odoo#130058
Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: bus, crm_livechat, crm_mail_plugin, im_livechat, payment, payment_demo,
pos_online_payment, test_discuss_full, test_mail_full, tests, website_livechat,
website_sale.
Several python tests have their own way to make jsonrpc requests. This PR adds a
generic `make_jsonrpc_request` method to the `HttpCase` in order to provide a
generic way to do so.
At the same time, calls to `_open_livechat_channel` are removed in favor of
jsonrpc request to `get_session`. This makes the tests more realistics (some
incoherences were present like passing `country_id` to the open channel method
while the user country id is not set...)
Finally, this will ease the diff in the PR introducing livechat visitors as mail
guests.
part of task-3332628
closesodoo/odoo#130036
Related: odoo/enterprise#44840
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Previously, we have accidentally made some core modules depend on some
modules outside of the core folder (eg views), this is undesirable as it
can make assets bundle hard to write using globs, and can make it easy
to introduce circular dependencies, it also doesn't make sense from a
code-organisation perspective.
This commit introduces a QUnit test that checks the modules in some
folders only depend on other whitelisted folders.
closesodoo/odoo#129982
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
On the hr.expense.tree view the create report button
raises an error since some recent framework refactor
This applies the related changes missed during the refactoring
related commit: 8723f020c3closesodoo/odoo#129910
Task-id: None
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
luxon and moment are both used in the solution,
but these two libraries facilitate the manipulation
of dates. It was decided to replace all uses of
moment with luxon so we can then remove
moment.js from the code and lighten the assets.
task-3391739
closesodoo/odoo#128752
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
This merge commits contains 2 improvements aiming to simplify the ordering of
selection options for property fields:
- Correctly insert the new element at the right position when pressing enter
- Allow to drag & drop property values
See underlying commits for details.
Task-3338157
closesodoo/odoo#123216
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Purpose
=======
Currently, when we want to add a properties selection option, we need
to focus another option and press enter. This will add the new option
at the end, but we want to add it just after the focused option.
Task-3338157
Part-of: odoo/odoo#123216
Currently, errors occur when the 'Send invoices automatically' cron
is run this is because the related invoice is deleted and we receive an
empty record in move_to_lock when executing the query.
Step to produce an error:
- Install 'Invoicing'
- Create an invoice e.g. 'INV/2023/00001'
- Click on confirm > Click send & print
- Now in wizard don't click 'Send & print'
- Now go to home screen or close current window
- Open 'INV/2023/00001' invoice and click 'Reset to draft' and delete it
- Go to scheduled action and open 'Send invoices automatically'
- Click on 'Run Manually' >> error occur
This commit fixed the above issue by not the query
from executing when move_to_lock has an empty record.
sentry-4291237277
closesodoo/odoo#130021
X-original-commit: a2c855970ab56f5ef7acf08eeaf8ff45c1eca8c9
Signed-off-by: Laurent Smet (las) <las@odoo.com>
This commit allows the correct activeFields to be used depending on the
view used to open an x2many field.
Before this commit, if we had an x2many field with a list view and a form
inline view with the same field containing a different context depending
on the view. The context of the form view will always be used.
This is a problem:
If we have an inline form view with fields common to the list view,
the context of the activeFields in the form view will always be used
and we will try to combine the different modifiers (required, readonly, etc.).
We don't want to do this, we want to use the activeFields of the list view
when we open the record in the list and the activeFields of the form view
when we open the record in the form view.
Solution:
When we create the activeFields, we'll use the activeFields from the
list view and complete them with those from the form view. We will
therefore no longer replace or merge them.
Then, when we open a record in form view, we'll use the activeFields
from the form view and when the form view closes, we'll restore the
activeFields from the list view.
closesodoo/odoo#129989
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a form view with an x2many that contains an
invisible x2many, if an onchange returns a create command for the
invisible x2many field, a crash is displayed.
Problem:
The getCommands function for processing CREATE commands needs the
activeField of the x2many to be present with activeFields and fields.
Currently, the activeField of an invisible x2many has no related fields.
Solution:
All x2many fields have "related" in the activeField by default.
Part-of: odoo/odoo#129989
Steps to reproduce:
- Install `website_slides` module
- Create a course and add a slide of type `Article`
- Go to frontend and edit the slide
- Add a text element and edit conditional visibility
(e.g. visible only if user logged in)
- Save and open the slide in fullscreen mode (with any logged user)
Issue:
The text block is missing.
Cause:
The slide is rendered in lazy load after that the code that unhide
conditional elements is already executed (on event `DOMContentLoaded`)
Solution:
Extract the concerned code so it can be called and re-executed after
the slide is rendered also in fullscreen.
opw-3225444
closesodoo/odoo#129646
X-original-commit: 553702c99cbd90edfb509ca9e7ab0c99c73a96e6
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
- open a grouped kanban view with progressbar;
- select a progressbar;
- the records are filtered and the count/aggregate is updated;
- change the filter/domain that will reduce/increase the filtered
records.
Before this commit, the records are correctly update but the
count/aggregate is not update.
Now, the count/aggregate of a selected progressbar is updated if the
domain changes.
task-3422009
X-original-commit: 95a94e0d928729bbbc80a627f816f9e575121f8d
This PR fixes an issue were link previews could overflow
the chat window.
closesodoo/odoo#129829
X-original-commit: 24de4e1adc9ad427daa7319480fc8004cde626dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, chat windows state (open/close/folded) was not
syncing between browser tabs. This lack of feature makes using chat
in crosstab quite inconvenient.
This feature exist in 16.2 and was mistakenly removed from rewritting
of Discuss code in 16.3. This commit reimplements as it was in 16.2.
Task-3435120
closesodoo/odoo#129812
X-original-commit: 8f27d1f254e79becf6886cdb90a1af14b28e9946
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Steps to reproduce:
1. Create an invoice with an Invoice Date in the past
2. Confirm the invoice
3. In Journal Items tab, click cut-off and then create journal entries
4. Traceback
opw-3369709
closesodoo/odoo#129689
X-original-commit: 219f9f929bb18f60a85e7fa3eb6868f954931f55
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Some test may perform a request without being in test_mode
In this case, a check signaling could be called and since the sequence
was incremented the registry may be reloaded.
This is a simple fix to avoid this issue waiting for a stronger check.
closesodoo/odoo#129814
X-original-commit: 41bb17b3046e8f1605d6f893ca1807d77ed21173
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
We are currently able to open the send & print for a vendor bill.
It doesn't make any sense to ask to a vendor to pay its own invoice.
closesodoo/odoo#129793
X-original-commit: b3e8229d16be074a719fa07e3b2d5488ace66492
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
The current default is "consumable". This is at odds with the nature of
replenishable products, as "consumable" does not keep track of stock
numbers.
task-3439196
closesodoo/odoo#129775
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
As of Owl 2.2, it is now possible to use iterable directly in t-foreach
without having to convert it to array first.
This commit takes advantage of this new feature to remove the
unnecessary array conversions from the Discuss code.
closesodoo/odoo#129765
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Before this commit, when `sale_project` module is installed and not
`sale_timesheet` module, `allow_billable` field is displayed in
Settings tab in form view of project but not in the form view
simplified. In the simplified one, `allow_billable` field is only
displayed when `sale_timesheet` is installed.
This commit displays `allow_billable` field in form view simplified
of `project.project` when `sale_project` is installed to be coherent
with the main form view.
closesodoo/odoo#129584
X-original-commit: ae203aa3cccc1187197ff0be98a884ca8ce6d6d1
Related: odoo/enterprise#44566
Related: odoo/upgrade#4975
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, the `project_enterprise_tour` has a step to
check `allow_billable` field in project to make the new project
billable to get partner field visible. The problem is this step
cannot be achieved if `sale_project` module is not installed.
This commit moves `project_enterprise_tour` is project module
to easily override it in `sale_project` and `project_enterprise`
modules to be sure the tour works when `sale_project` is not installed
and also when that module is installed.
X-original-commit: f09245f4dae4c3503630c9cd92b9d9ab5bfb6e78
Part-of: odoo/odoo#129584
In this PR we introduce the ability to create product combos.
Now any product can be turned into a combo meal by defining
the different combo choices it contains.
In this PR, we add the backend logic and the backoffice views
needed for this feature. Afterwards, different modules will be
able to use the platform provided by this PR in order to integrate
`product combos` in their flows. Such modules are the `point_of_sale`
and `pos_self_order`.
closesodoo/odoo#128857
Task: 3430635
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>