They make sense when the chat window is unfolded,
as it changes the content. But when folded, the buttons have no
visible affect. Better hide them in that case.
closesodoo/odoo#116242
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes a small issue in the survey invite modal layout.
The label and the associated field for the share link did not have a matching
attrs configuration, leading to an extra label which broke the form visually.
Oversight of 220e0271bf
Task-3203875
closesodoo/odoo#116234
X-original-commit: c68b56254005eb94ad90192e6cf8648866aca55d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Since the discuss refactoring, clicks are not disabled in the message delete dialog.
This commit fixes the issue.
closesodoo/odoo#116215
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In previous commit, we just copy/move the files.
In this commit, delete the part of each file
that is not related to its model, and some style.
task-3244226
closesodoo/odoo#116165
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In this commit, we just copy/move the files.
In next commit, delete the part of each file
that is not related to its model.
task-3244226
Part-of: odoo/odoo#116165
The last step of PaymentScreenTotalDueWithOverPayment tour is not
really needed and it randomly breaks in runbot. Better to remove it.
closesodoo/odoo#115802
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
When loading a view, the system will populate the related property field
with the values stored in the datapoint of the record. Currently, the
system does not do any safe check when reading those values. The system
can hence raise an error if the view does not load the record storing
the property definition of the current record.
This commit will fix that issue by adding a safe check when populating
the related property field with the values of the datapoint.
task-3218435
closesodoo/odoo#115100
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Split python files / model. It is easier to have a global view of a module
organization and content when looking at the models directory. Each model
now belongs to a single file.
Do the same with data, views.
Split templates by main usage. Files have been duplicated previously, they
are now cleaned to keep only content relevant to their usage. Split is done
according to
* base file: layouts for main actions not specifically managed in other
sub-files: display a forum, manage tags, post a new question or edit
a question;
* '_forum_all': 'all' page in multi-forum display, displaying the list of
available forum;
* '_layout': layouting templates. Modifications to global layout and forum
specific page header used through all main templates;
* '_moderation': moderation tools;
* '_post': display a forum post;
* '_tools': tooling and utility blocks, used as black boxes in various
main templates;
Rename other files according to guidelines.
Reorganize main content of python code
* group compute fields on top, order them following fields definition;
* add section separators, to separate compute methods / CRUD methods /
business methods / Mail methods / Tooling in file and have a way to
sort a bit the code out;
* rename compute methods to start with '_compute', to match guidelines
and be coherent with global odoo naming;
* perform some relining in fields definition, don't enforce any char
length but try to stay aligned with Odoo apps;
Finally, provide some fixes or code improvements (batch, performance,
poorly written or named code) that are quick-wins.
LINKS
Task-3240082 (Forum: Reorganize and lint module)
closesodoo/odoo#114841
Related: odoo/upgrade#4456
Related: odoo/enterprise#38469
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently 'forums_count' field on website is not correctly updated. Test
introduced recently show that
* at website create, counter is not computed;
* at forum create, counter is not computed;
Only updating a forum active flag, website value, or unlinking it recomputes
the counters.
Note that manually updating counters is required as forum with False website
are global forum, valid for all websites.
Finally rename 'forums_count' into 'forum_count'. Fields in Odoo are rarely
plural (more like 'forum_ids' / 'forum_count' for example, even if in our
case the 2many does not exist due to shared behavior).
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Add tests for website.forums_count field that should be synchronized manually
with the actual number of forum. Seems it is not working as expected, as
the manual update is not done at forum creation, and the default seems not
correctly computed.
Those tests are therefore red without the upcoming fix.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Gamification data used in some emails to add links and shortcuts is not
correctly translated. Let us fix it.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Instead of doing 1 search_count / user in the loop, use read_group to fetch
data in batch.
Also remove an unnecessary import.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Rename main views and actions according to guidelines. Having standardized
names eases process of finding and updating views.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Default value is currently not translated, which is sad. We therefore move
it into its own default method, use translation marks, and Markupize the
whole result.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Better have a correctly formatted content looking like all other HTML fields.
This is achieved by using sanitize parameter which cleans up html content
according to our standards.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
A strange manipulation is performed when trying to create tags. In this
commit we simply make styling happy by trying to first prepare data
(strip, content) then use it. Feature is untouched currently.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Mainly reorganize them alphabetically so that execution order matches the
definition order. It helps when debugging.
Also clean some tests from odoo/odoo@f9c2716b3e because they either test nothing
either are not understandable by standard humans. Other tests are left
untouched.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATION
Reorganize main content of python code
* group compute fields on top, order them following fields definition;
* add section separators, to separate compute methods / CRUD methods /
business methods / Mail methods / Tooling in file and have a way to
sort a bit the code out;
* rename compute methods to start with '_compute', to match guidelines
and be coherent with global odoo naming;
* perform some relining in fields definition, don't enforce any char
length but try to stay aligned with Odoo apps;
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Split templates by main usage. Files have been duplicated previously, they
are now cleaned to keep only content relevant to their usage. Split is done
according to
* base file: layouts for main actions not specifically managed in other
sub-files: display a forum, manage tags, post a new question or edit
a question;
* '_forum_all': 'all' page in multi-forum display, displaying the list of
available forum;
* '_layout': layouting templates. Modifications to global layout and forum
specific page header used through all main templates;
* '_moderation': moderation tools;
* '_post': display a forum post;
* '_tools': tooling and utility blocks, used as black boxes in various
main templates;
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Purpose is to try to keep history before splitting frontend templates into
separate files. We first copy the file, then remove extra content in each
of them. Let us see if this works.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Rename and split backend views / model. It allows an easier manipulation and
management.
Templates (frontend) files are renamed but not split. It requires a more
in-depth check of their content before splitting into sub-files (to have
tool templates separated from main templates notably). This will be done
in the next few commits.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Split data files / model. It is easier to have a global view of a module
organization and content. It also allows to see technical data impacted
by the module installation (like ir_actions, mail_message_subtypes, ...)
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Split python files / model. It is easier to have a global view of a module
organization and content when looking at the models directory. Each model
now belongs to a single file.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Purpose is to try to keep history before splitting models into separate files.
We first copy a file, then remove extra content in each of them. Let us see
if this works.
Task-3240082 (Forum: Reorganize and lint module)
Part-of: odoo/odoo#114841
Reproduction:
1. Go to settings -> Technical -> user-defined defaults, create a
default for sales type Journal for an account.move
2. Go to Accounting-> Customer -> payment, create a payment, and select
Bank for jounal
3. The payment method is not changed to Manual, in V15 it does
Reason: from Odoo 16.0, the method new is added to account_payment, and
we compute the journal id when it’s not set. However, this doesn’t
consider the case where we have a default value for journal_id.
Currently, when there’s a default value, we still compute the journal id
This causes the onchange, which uses record created by method new, is
not triggered when we select the journal id as the computed journal id,
e.g bank.
Fix: don’t compute journal id when there’s a default value for it
PR of adding the new method (big PR for 16): https://github.com/odoo/odoo/pull/96134
opw-3148919
closesodoo/odoo#116082
X-original-commit: 05aa0726529132df5733a3db61e4c3da1c037c1d
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
Fix applied to ease user experience after the user_id field removal
for performance in 509b4cad.
This is a simple fix to allow users to have ready filters available
instead of having to enter them. This is especially helpful because,
for performance reason, when no domain is selected, no user will be
added, even though the widget on the webclient shows that all user
records are matched and will be added.
This is why [("active", "=", True)] is also added, allowing to simply
remove the "internal user" rule to really have all users if desired.
Task-3214005
closesodoo/odoo#116044
X-original-commit: 5a6e585e3294430126a9da3c7392942c91a9fffd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
1. Inventory / Configuration / Warehouse Management / Warehouses
2. Need at least 2 warehouses
3. Inventory / Products / Products
4. Click forecasted quantity on a product that has some on hand
5. Click warehouse and select any option
6. Refresh the page
7. Error
Bug:
when refreshing the page the context gets cleared and productID lost
which leads to an error when looking for its bomIDS
Fix:
when refreshing the page get the productID from the url
also set the default title to "Forcasted Report"
opw-3217987
closesodoo/odoo#116198
X-original-commit: d49c73f95033472f1417ee05793d5f100f641dd0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Commit [1] adds some tests on Odoo 14.0 in a file named
`test_report`. However, from 15.0 on, the file has became
`test_sale_stock_report` but the tests of [1] have not been moved in
that new file . Instead, a new file `test_report` has been created
and did not have been added in `__init__` (see [2]). Therefore, the
tests are never executed
[1] 012e25f27ffc0bc51682c06896c9116944661011
[2] 15194cec233332e787b9f546e39c6127301ff9aa
closesodoo/odoo#116193
X-original-commit: 37f4e6fd596e9d180a1638e0b68b0393b7c817ff
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Before this commit, when in a call on another device
and then calling from another device, there might be
the following traceback:
```
TypeError: Cannot read properties of undefined (reading 'lastObservedRecords')
at ModelManager.removeListener
at RelationSet.delete
at RelationSet.clear
at ModelField._setRelationReplace
at ModelField.parseAndExecuteCommands
at ModelManager._update
at Listener.onChange
at ModelManager._notifyListenersInUpdateCycle
at ModelManager._flushUpdateCycle
at ModelManager.update
```
This is caused by removing a non-existent listener on a field, very
likely related to a relational field from the call being terminated.
This commit fixes the issue by silently skipping removal of listener
when it's undefined.
Task-3241562
closesodoo/odoo#116192
X-original-commit: 24af22187ce8401d925edb1dda02652f993c7394
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Bug
===
The session duration added in the KPI have the wrong
value because of a typo in the SQL query.
Task-2827996
closesodoo/odoo#116169
X-original-commit: 1709c82f33e77f7482f323c4f86b2a8c4b6c5c0d
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
When refactoring the SelectCashierMixin into a hook, the "exclusive"
parameter was hardcoded to true, this makes it so that when
multi-employee per session is active, the cashier selector button in the
navbar takes exclusive control of the barcode reader and prevents
scanning products. The exclusive mode should only be active in the login
screen.
This commit fixes that by making "exclusive" configurable in the
useCashierSelector hook and making it non-exclusive in the navbar's
cashier selector.
closesodoo/odoo#116159
X-original-commit: d78e0b840a3fbcbe43bf2a4938977a63fbeec1e9
Signed-off-by: Samuel Degueldre <sad@odoo.com>
.. to other deeper logic.
As spotted on the ticket, if there is an ARCHIVED outgoing
email server and an invoice is created after clicking
on the smart button of a Contact,
the active_test=False is propagated and the email is sent
using the archived outgoing mail server.
The propagation of this context key can impact a lot of
other logic and is even more risky in accounting.
Reverting fe9b460d29d6537e0c14af54ba31d935c746810b
is solving the issue.
The main error reported on 2853525 that led to this previous
commit seems also solved somewhere else (that I did not find)
opw-3217999
closesodoo/odoo#116136
X-original-commit: 3d82e5aa5bc5960f8fb04fa0b085f33547f05c27
Signed-off-by: William André (wan) <wan@odoo.com>
This commit removes the "new message" separator when posting a
message on a channel.
At the same time, this commit solves an issue that caused messages
to flicker when the message came from the bus before the answer of
the rpc.
In order to do so:
- messages are marked as read immediately after
`message_post` for the member of user that posted it.
- a temporary id is passed to `message_post` in order
to reconcialiate temporary/server messages.
task-3232911
closesodoo/odoo#116085
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In this commit, delete the part of each file
that is not related to its model.
task-3234479
closesodoo/odoo#115694
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>