The activity was incorrectly scheduled with a deadline as the now in UTC while
the state was computed using "today" in the user's timezone.
This made the nightly test fail (run at 23:30 UTC with the user in UTC+2).
Use context_today instead of today for all activity_schedule calls
To make it easier, use on the context_today default value instead of setting
context_today everywhere (which is more error prone in the future)
Never use datetime, only date objects
add a warning to detect potential errors when passing a datetime
Closes#26411
1. Odoobot shouldn't talk to admin when demo data are installed
Odoobot will talk to a user on it's first connection, meaning that
a dev will see this chat window a lot. The state disabled is not a
real state but is explicit, the odoobot wont be initialized in this
case. It is still possible to test odoobot flow with demo user.
2. remove old odoobot image and update link
3. small improvements in odoobot answers
example: <field name="product_id" options="{'no_open': True}" readonly="1"/>
This has been broken by rev. 43d21dd9c due to misplaced parentheses
(an empty object in javascript being truthy).
Before this commit, the method _document_check_access would succeed if it was called with a non-existing id.
Now it will raise a MissingError.
PR: none
Task: none
Sales Order report:
- fix Total table alignment (to the right)
- remove misplaced /> characters
- remove page-break before optional products
Sales assets:
- fix duplicate ID preventing assets files from being loaded
My Home:
- fix link to sales orders
Optional Products:
- renamed various strings
- made product_id required to prevent a traceback
PR: none
Task: 1838924, 1876864
The search view always instantiates a time range menu but hides it
when it is not used.
Now, when the time range menu is not used, every time the search view
facets are rendered, the time range menu is also rendered entirely
and becomes visible shortly before being hide again. This caused
a bad screen flickering.
This commit fixes that problem by avoidind the unnecessary rendering of
the time range menu.
Revision on https://github.com/odoo/odoo/commit/e0a51edd856b36bfdf1cacb4d7e8d70fad7884fa
In the commit above, we added an option to Discuss widget
to render threads specifically for PhantomJS. The reason
for this is that a test was failing, because it needs full
support of CSS flexbox to pass.
However, PhantomJS does not support flexbox very well. As
a result, it was messing with the rendering of threads.
We couldn't make the hack just in the test itself, because
it is already at the moment of rendering the thread that
PhantomJS messes the whole process of the test.
PhantomJS has been replaced with Chrome headless [1], So
the hack is no longer be necessary, as Chrome headless
fully supports CSS flexbox.
[1] https://github.com/odoo/odoo/commit/de84ad9c1f4853cb8a748ee1d0c880081dae9fe2
Revision on https://github.com/odoo/odoo/commit/10f43955d81ff3e7b5ab050656b312ec19f927c5
Commit above uses `testUtils.patch` in the test.
However, this utility function does not seem to work.
That sucks...
No advantage to group a search on purchase.order and another one on
account.invoice.
Avoid potential access errors if a user has access to one model but not the
other one.
Closes#25761
The most important part of building salary rules is having them in the right
sequence. Unsure all the rules are evaluated in a deterministic order.
This also makes it easier to know how the payslip will show the order of the
salary rules.
Closes#25756
The lib 'nvd3' renders graph when they are attached to the
DOM. However, widgets are rendered in fragments and
appended to the DOM when ready (to prevent flickering).
Before this commit, we used a `setTimeout(0)` and cross
fingers that the widget was attached to the DOM when the
`render` method was called.
With this commit, the render method is called when it is
attached to the DOM.
Task-ID 1868252
Closes#26410
The account module needs to import Form from "tests.common" causing a
traceback when websocket-client module is not installed.
As this module is only required for the tests, there is no reason to add
it to the "requirements.txt" file.
With this commit, Odoo account can be installed even when
websocket-client is not installed, in that case, the HttpCase tests that
needs to run Chrome headless will be skipped with a warning.
Closes: #26404
Usecase to reproduce:
- Check manufacture to resupply and manufacture in 2 or 3 steps
- Uncheck manufacture to resupply
pbm and sam rules in global route(mto/manufacture) are still active
It happens because the condition to archive the rules was not complete
the check on manufacture to resupply was missing
Some fields are required only when defining an activity-based server
action. Required domain was not correctly written leading to server
actions being blocked.
warning: Some modules could not be started
Missing dependencies: web.field_utils
Non loaded modules: web.dataComparisonUtils
This commit moves 'data_comparison_utils.js' from 'assets_common'
to 'assets_backend' because 'field_utils' is only defined in
'assets_backend'.
There were tooltips on period options in the submenus of
filters menu. With the switch to Bootstrap 4, the html
structure of filters menu has changed (no more 'ul') and has
altered the way the menu items are rendered causing the
disparition of tooltips. With this commit, the tooltips come
back.
As the phantomjs project was suspended[1], there was a need to change the js test
engine. Moreover, the engine was rather old and leading to non
deterministic crashes.
Chrome headless was choosen for simplicity and the long term vision of
the devtools protocol [2].
The 'phantom_js' method still exists but will be deprecated in
favor of 'browser_js' with the same parameters.
In order to communicate with the browser, the python websocket-client package
is needed.
[1] https://github.com/ariya/phantomjs/issues/15344
[2] https://chromedevtools.github.io/devtools-protocol/
#closes 25991
It used to work by chance with Bootstrap 3, but since we are now
using Bootstrap 4, the fake good appearance collapsed, revealing
the awful structure it used to have.
Adds a checkbox to import columns (in debug mode) allowing a user to
create records M2O and M2M records not found (via name_search).
Task ID: 1850633
* uses a context key to avoid altering basically all the import callstack
* attempted to lift the creation in the `_str_to_*` functions and create
m2m via commands, but that doesn't really work out
and use it to determine if the constraint definition was changed. This prevents
endless readding of constraints that are reformatted by postgresql in an
unrecognizable way (in which e.g. "CHECK (credit*debit=0)" becomes
"CHECK ((credit * debit) = 0::numeric)")
Before this commit, the error message was not very helpful as did not specify
which statement was problematic.
By giving the reconciled name/number, the users get's a chance to identify the
offending entry and correct it.
Closes#26356
It was already present in the accounting and purchase application but not in
sale menus.
Apply the same logic as in purchase and use a group_no_one
Closes#22862
Before this commit, there was a traceback when attempting to mark
all messages as read from the 'Inbox' of Discuss.
This is due to resetting the 'needaction' counter on threads that
do not not track 'needaction', such as the 'Starred' mailbox.
In fact, only channels do track them and handle a needaction counter,
so this should only be applied on channels.