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>
Currently, transfer barcode is not available in reception report.
So in this commit, I have added transfer barcodes. Also, align the barcode and
transfer name according to the report.
TaskID - 3081077
closesodoo/odoo#112773
Signed-off-by: Steve Van Essche <svs@odoo.com>
Before [this other commit], it was possible to add a wrong video on a
page of its website. If the user did this and saved the page, it was no
longer possible for him to enter edit mode. To solve this, two
improvements have been made:
1. We now prevent the user from putting a wrong video on his page when
he goes through the media dialog (see [this other commit]).
2. Since there are probably websites that have a bad video (it was
possible before [this other commit]), this commit allows users to edit
the pages that have these wrong videos.
Steps to reproduce before [this other commit]:
- Edit a page.
- Via the media dialog add a video with the following URL: 'google.com'.
- Save the page.
=> It is no longer possible to enter edit mode.
Note that part 1 was merged from 14.0 but part 2 was merged from 16.0
because the media dialog adds `iframe` without `src` attribute since
[the refactor of the media dialog] and we cannot edit a page containing
this code `<div class="media_iframe_video"><iframe/></div>` since the
merge of the frontend into the backend.
[this other commit]: https://github.com/odoo/odoo/commit/fbab1bffa033638553750d49fcde89a9a2fc5e6c
[the refactor of the media dialog]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344
opw-3167707
closesodoo/odoo#116128
X-original-commit: 242d6f2e1dc35c3d22314a4c92c2420f69eb9970
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
Before this commit, error messages appeared when a user tried to put an
unsupported video on a page of his website, but the user could still add
this bad video on his page, which broke it.
Steps to reproduce the bug fixed by this commit:
- On a page of a website in edit mode, double-click on an image.
- Go to the video tab and type an unsupported URL like google.com.
=> An error message appears but the user can still add the media on his
page which will break it.
opw-3167707
X-original-commit: 32cd18895ffcf40e4fec4c5674fa97f6663c7f0d
Part-of: odoo/odoo#116128
is_transpiled is only needed when generating a asset bundle while
JavascriptAsset can be generated to compute the version hash.
is_transpiled needs to read the content to be defined which is quite
slow. Transforming is_transpiled into a lazy property will speedup the
cold loading of generate_assets_node, especially when attachment already
exists.
Locally:
- /web with all modules in debug=assets goes from ~350 to ~150 ms
- generate_assets_nodes part goes from ~230 to ~55 ms
closesodoo/odoo#116123
X-original-commit: 47b44e1ae61583a881bb2ede06cc02f4b9423cbc
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
In the Accounting app, on the Dashboard in the 'Customer Invoices' card, the indicator 'to check' has incorrect amount when multi currency is activated.
Step to reproduce the issue:
- create an invoice in another currency than the one of the company
- check the dashboard of Accounting
Result: the amount displayed is the one on the invoice but we want the converted amount.
Original feedback: https://www.odoo.com/web#id=3212264&menu_id=4720&cids=1&action=333&active_id=809&model=project.task&view_type=form
task: 3215921
closesodoo/odoo#116103
X-original-commit: 45fac8ac231cc8f07fd9181045d6432825c8330c
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
By default the reminder for tax report is set to 7 days after period (date is correct). On the Accounting Dashboard, we should therefore not see the reminder on the dashboard of the Miscellaneous journal if the deadline of the tax report is not due.
For example, we are the 16th of March, we do not want to see the reminder for the Tax Report for March. We only want to see it from the 7th of April.
closesodoo/odoo#116051
Task: 3231957
X-original-commit: 66672cf7f63548638ad218d5cae44cde5868b318
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
This commits makes some improvement on the chatter visuals
-Spacing/styling of various elements
-Missing borders around chatter
closesodoo/odoo#116039
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This update contains the following commits:
[IMP] implement .alike suffix on props
[IMP] release: add version number on App
[IMP] app: add name as a config option
[FIX] runtime, compiler: fix refs getting set or unset incorrectly
[FIX] compiler: call translate function with correct string
[FIX] compiler: properly handle readonly attribute/readOnly property
[REF] blockdom,compiler: implement properties
[REF] tests: move properties tests in own file
[FIX] compiler: dynamic value on inputs doesn't turn 0 into empty string
[FIX] components: do not crash when binding anonymous function
More details at: https://github.com/odoo/owl/releases/tag/v2.0.9
Note that this owl update required a few adaptations in Odoo code. The
main problem was that some code would access references after the
component was unmounted. However, Owl is now stricter and properly
remove the reference.
closesodoo/odoo#115991
X-original-commit: a2952026f23858a8d34dcdab4ec8b467f7fc9bcf
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
Previously:
The displaying of the technical menu email would be cut
if you had a zoom of > than 100% on your browser
Currently:
It allows to see the whole content of the message without scrolling.
closesodoo/odoo#116124
X-original-commit: 5055b374c3bac0126f441dad61afd7e0b68b1370
Signed-off-by: Dalcq Jordan (joda) <joda@odoo.com>
Steps:
- Enable `Worder orders` in Manufacturing settings
- Create a manufacturing order with a bill of materials and workorder operation set and confirm
- Go to the workorder tab and start, then finish after few seconds
- Update the real duration
- Try to save
Issue:
User Error
Cause:
When writing on a `mrp.production` object we check if the production is still planned and if, it try
to plan all the workorders which are not done or cancelled. But in our case all the workorders are done
so it try to write to an empty object.
opw-3230310
closesodoo/odoo#116122
X-original-commit: 674f37fbbaa4a0d7f34f8d75d16dd11373815932
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
There is an issue with the search panel categories that has a limit=20;
It means it will only display the categories matching the expense
reports in the view if they are in the 20 first records fetched.
As this search field isn't really useful, it was decided to remove
it completely.
Task id # 3224719
closesodoo/odoo#116074
X-original-commit: 376e6aac2854f291c0b919451c34595b2c2d3060
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
So fat, the default sale and purchase taxes were so on the
account.accounts depending on the user type id.
These taxes were meant to be used as default taxes on products
and not accounts, so this is not right.
It also is an issue since the default tax isn't visible
on the COA list until the user add it from the optional fields.
Task id # 3223731
closesodoo/odoo#116111
X-original-commit: f1a9414f3cbe83bfde7e401e90b641668bd0ca14
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, trying to share screen while using the user video
(webcam) wouldn't work because the old stream was kept instead of
trying to obtain a new one.
This commit fixes this issue, does a small cleanup of `rtc_service.js`
and adds tests related to streams.
closesodoo/odoo#116042
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when a user moved its mouse from only a few pixels,
a kanban record could not be clicked on it, or an item in a sortable list
couldn't handle the click, since the dragging state was immediatly applied
to the element.
Now, there is a 10 pixels tolerance, meaning that the dragging sequence is
only applied once the user has moved the cursor from at least 10px horizontally,
or vertically from the original point where the mouse button was pressed and
remains down. This reduces frustation when the user didn't intended to move the
kanban card with the mouse moving by mistake.
A test has been added to verify the behavior when dragging an element in a sortable
list, from at least 10 pixels.
Finally, a test had to be modified, since the triggered mousemove didn't had any
clientX value to enable the dragging sequence.
task-3233698
closesodoo/odoo#116113
X-original-commit: 7e7c950f07b6455118902c15f4354e6ff45ce509
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
==== Purpose ====
There is an issue with the `/@/` symbol website is using to display a
page in the backend: if someone copy paste a link with `/@/` in it and
send it in an email, some mail client will block those mails.
It was reported by our internal team, after feedback from some sales
persons.
Office 365 was incriminated (not the outlook.com web platform). While we
couldn't reproduce the issue, it was decided by the hierarchy to get rid
of it as it was judged impossible to educate our sales to not send such
links.
It's probably a good decision as:
- `@` in URL are usually used for HTTP Authorization:
`http://username:password@example.com`
Link [1] seems to mention that some mail client will not implement
correctly the URL check to see if the `@` is problematic and will
simply block mails having links containing `@`.
- The tradeoff of removing it is impacting dev/tech people, not the end
user (except for F5, see below).
==== Technical ====
Before this commit and since commit [2] the following behaviors were
introduced:
1. a `/@/` prefix was added visually in the URL bar of the browser when
accessing the website app (previewing your website in the backend) to
differentiate it from the regular website/frontend URL
2. the possibility to type yourself `/@/` in the URL to access a website
page in the backend app
It was improving the following pain point:
A. On page refresh (F5 or browser button), the user would land on the
frontend version of the website instead of remaining in the backend.
B. When the user edited the URL (Like removing `/shop` and typing
`/jobs` instead, he would land on the frontend version too.
C. Impossible to directly go to the backend version of the website.
This commit is now reverting point 1. while keeping the possibility of
point 2.
It means that while you can still reach directly your page in the
backend, the backend URL part `/@/` won't be kept.
About the mentioned point above:
A. This pain point will be back
B. This one too but workaround possible: need to edit the URL but also
need to now add the `/@/`
C. This one will still be "fixed" as `/@/` still reachable.
While it seems to be decreasing the UX, it actually is an acceptable
tradeoff as:
- It mostly impacts dev/tech people, lambda end user don't play with
URLs (low risk)
- It will prevent their mail to be blocked (high value)
--------------
Finally, note that in the meantime commit [3] was introduced which
relied on this `/@/` presence. This had to be adapted.
[1]: https://www.malwarebytes.com/blog/news/2022/05/long-lost-symbol-gets-new-life-obscuring-malicious-urls
[2]: https://github.com/odoo/odoo/commit/030d3cb10ee79aa1f010134578f4bcf65a1cfcde
[3]: https://github.com/odoo/odoo/commit/a0b3499d348d252c3abd48154e1fd8dd545c7504closesodoo/odoo#116100
X-original-commit: b01337710b5fde995a184e442f48b687cd17967a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
…cost
Before this commit, the employee form view had a label 'per hour' for field
'hourly cost'.
So in this commit, 'per hour' label is removed from employee form view.
task-3000757
closesodoo/odoo#116063
X-original-commit: c4d0f0993efb8c8c3fd7f322c54bc81c97aaee2b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Current behavior:
When using FIFO/AVCO and automated valuation, the accounting entries for
PoS orders where not correct if the ship later function was used and the
order was not invoiced. The COGS entries were created with an amount of
0. But when the shipping was done nothing was done to correct the
entries.
Steps to reproduce:
- Make sure you are using anglo saxon accounting
- Create a product with automated valuation and FIFO/AVCO
- Create a PoS order with the product
- Validate the order using the ship later option but do not invoice it
- The accounting entries for the expense are created with an amount of 0
(wich makes sense because the product is not shipped yet)
- Validate the picking
- The accounting entries is still the same.
opw-3027579
closesodoo/odoo#116045
X-original-commit: 513c32b04aa6c06d58125ec8c4fb1b818f4a52e9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
In RTL mode, sub dropdown carret are inverted so when a item menu in a
dropdown is checked, the carret and the check icon are on the same
pseudo-element (e.g. `::befor`).
In this commit, when the carret of a sub dropdown is on the left we set the check
icon on the `::after` pseudo-element to avoid CSS rules collision.
Steps to reproduce:
* Select/configure a RTL language in Odoo for the current user
* Open the Sales app
* Filter by the Create Date and select a sub option
=> BUG the check icon and the carret are on the same pseudo-element `::before`
Task ID: 3234638
closesodoo/odoo#116036
X-original-commit: c96ef2f258a5714d2285042da2f823e50b9b3049
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
* Correct file & class names
* Code simplification
* Imports cleanup
* privatize method not meant to be called in rpc
* wrong view inheritance target (not containing the targeted hook)
* ...
closesodoo/odoo#116026
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit:
If the ePos printer is reachable but is
configured incorrectly (change of Device ID, etc.)
or have an issue (missing paper, etc.),
a generic error message will be given:
"Please check if the printer has enough paper
and is ready to print."
This is too generic considering the amount of issue
that can happen and the fact that the printer itself
does send to us a `code` which give good indication
on the origin of the issue.
The list of these codes can be seen at:
https://files.support.epson.com/pdf/pos/bulk/server_direct_print_um_en_revk.pdf#page=52
In version 14 this code was given in the error message.
But this feature was lost in the versions above
&
Trying to print a receipt from the PoS with
a wrongly configured ePoS printer will just pop
the confirmation popup:
'Do you want to print using the web printer?'
Without giving any details regarding the errors
causing the issue
After this commit:
A more precise error message is given:
- Containing the printer error code
- Giving recommendation on how to search
online to solve the issue
- On the specific case of the `Device ID`
setting changed, give more details on the
value to use
&
The error pop-up with the error details
is displayed first. Then the confirmation one
opw-3188576
opw-3071709
closesodoo/odoo#116020
X-original-commit: 1f753d31c925e479e8243a6427a24b3da99bfc31
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
This commit fixes the name_search traceback on project tags when the
`project_id` in context is set to `False`.
Prior to commit odoo/odoo@05855b6b this check was still relevant since
the implementation used the ORM search method. Since this commit,
project_id must be an integer to be used in the SQL query.
Steps to reproduce:
- Open Project menu;
- Go to My Tasks menu;
- Create a new task;
- Open task;
- Click on Tags field.
Current Behavior:
```
File "/home/src/odoo/odoo/models.py", line 1605, in name_search
ids = self._name_search(name, args, operator, limit=limit)
File "/home/src/odoo/addons/project/models/project.py", line 2756, in
_name_search
self.env.cr.execute(query, params)
File "/home/src/odoo/odoo/sql_db.py", line 313, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedFunction: operator does not exist: integer =
boolean
LINE 9: ON task.project_id = false
^
HINT: No operator matches the given name and argument types. You might
need to add explicit type casts.
```
Expected Behavior:
- No traceback and standard name_search behavior.
closesodoo/odoo#116006
X-original-commit: f21bd6f47a75f5d6cbd442f30ef7df221e6fec7d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
OSError: cannot read from timed out object while evaluating a
"model._fetch_mails()", it occurs because when we try to quit a POP server
of incoming mail using the "pop_server.quit()" method, sometimes it is not
able to reach the remote server to quit the pop server, so it throws an OSError.
We added the try block for POP and IMAP.
if it fails then we display the os error.
sentry-3932133536
closesodoo/odoo#116004
X-original-commit: 0c30529cc9256c0b2483c2fcbbc599b87c1f8577
Signed-off-by: Anh Thao PHAM <pta@odoo.com>