Leftover from testing a post-load report of all test failures.
Intent was to provide test failure details either during or after
loading, but feature was not actually developed and I forgot to remove
this bit before merging.
closesodoo/odoo#56186
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Refactor `order_finished_lot_ids` compute, to be linked to the `lot_producing_id`
the the related production (less boiler plate). We can't remove it because
it is used in mrp_subcontracting, and keep the Many2Many, for the tag widget.
Remove the second field compute by this method, `finished_lots_exist` (never used).
- Remove unused field `needs_lots` (also it is a duplication
with `has_tracking` info) from `stock.move` (mrp)
- Remove unused field `done_move` from `stock.move.line` (mrp).
- Remove unused methods `_strict_consumption_check` and `_update_raw_move`.
- Remove unused variables.
odoo/upgrade#1594closesodoo/odoo#54996
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Issue: when we created a new operation from the MO form,
the default of the expected_duration wasn't take in account and
override to 0.0.
Fix: in `_get_duration_expected` If there isn't workcenter is set,
instead of return False, return the `duration_expected`
closesodoo/odoo#56127
Related: odoo/enterprise#12517
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
It was impossible to add a workorder after a finished one
due to a constraint in the write (can't change next_work_order_id).
Remove this obselete constraint.
task-2278147
Split completely 'non billable' from 'task rate' for more clarity.
Simplify the task form view of non-billable projects.
TaskID 2032048
closesodoo/odoo#55972
Related: odoo/enterprise#12441
Related: odoo/upgrade#1662
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In edit mode, the list_activity widget popover is not fully visible
(most of it is cut). The reason is that at some point the rule
specifying that the containing list cell should have the property
'overflow: visible' became less important than another global
rule imposing the property 'overflow: hidden'.
The present commit makes sure that 'overflow: visible' is applied on all
list cells containing a list_activity widget.
Task ID: 2305805
closesodoo/odoo#56166
X-original-commit: 115fedf30da2ca016a2e435949a18561a389d37f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit adds the prefetch of the current page's children (cf. under
the same scope) to be available for offline use.
For performance reason, only the first-level children are added to the
cache to avoid a huge amount of requests and/or resources used by simply
loading the event website's pages. Also, for the same reason, this
process is delegated to the ServiceWorker to avoid cluttering the Main
Thread.
Note: due to some security restriction introduced in the Fetch spec,
some redirects may prevent offline-requests from being properly
fulfilled from the cache. See references for further details.
References:
- https://github.com/whatwg/fetch/issues/763
- https://github.com/GoogleChromeLabs/sw-precache/issues/220
- https://fetch.spec.whatwg.org/#concept-request-redirect-modeclosesodoo/odoo#56159
X-original-commit: bc9a306bc8b373daeaaf593ed0a0e6bc944279b8
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
This commit convert ES6 syntax (mainly Arrow Functions & String
Templates) to ES5 for compatibility with older browsers on the frontend.
Also some linting for consistency.
X-original-commit: 177860e50544700cd42b3efc288723f464931228
Since record creation is faster when done from a CSV file,
hence, we move account tags definitions into CSV file.
Also, there was a tag with XMLid 'account_tag_174' defined
twice in XML file, which has been removed.
Total 1082 records of account.account.tag will be created
after removing one duplicated tag.
closesodoo/odoo#56153
Task: 2150637
X-original-commit: 5eef487f194b10ec2a1c0eb452eb22eac6098fc7
Signed-off-by: Josse Colpaert <jco@openerp.com>
Back2Basics of the timesheet module. Add helpers/dummy data to improve
the onboarding of the module.
Rename some roles/menus.
Add a QR Code client action when clicking on the timesheet app icons in
settings to allow users to directly download the app on their phone.
closesodoo/odoo#55565
Taskid: 2303955
Related: odoo/enterprise#12273
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Some network Zebra printer are not detected because
the protocol 'socket' is not supported.
Now we add this protocol in the 'supported' function
closesodoo/odoo#56146
X-original-commit: f7fa40bdbbd765caf8fe528fff949b4dccf3d8c2
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
* Prior to this commit, the server side rendering of all the element
was sent to the webclient as a block which is splitted there into
several elements.
* After this commit, the server side rendering sends an array of elements
to the web client.
closesodoo/odoo#56141
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The execute method of res_config settings must not be overridden. set_values() must be overridden because the uninstall must be done at the end of transaction.
closesodoo/odoo#56101
Taskid: 2282427
X-original-commit: 6d6227915539c7af10e7e2b23565baea602a1d82
Related: odoo/enterprise#12504
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Odoo provides basic handling of CORS preflight requests: if an
endpoint is marked as `cors=<truthy value>` then it'll automatically
reply allowing the request.
*However* this is performed in `HttpRequest.dispatch` (likely in order
to correctly handle the nodb case), which means it's executed after
the auth handler has run... which means custom auth handlers will be
called on preflight requests.
This is a problem because they are missing relevant
information (e.g. which endpoint they're invoked for), plus having to
deal with preflight requests in every custom auth handler is annoying,
and simply allowing preflights could cause issues if the decision
diverges between the auth handler and the automatic
handling.
To fix this issue, extract the preflight *decision* into a separate
method so we get the same decision-making process everywhere, and in
case of CORS preflight set the auth to none to limit the eventual
capacity for nuisance in the span between the bypassed auth and the
automated preflight handling.
Also change the signature of IrHttp._authenticate so it's clearer if a
callsite was forgotten somehow (and this makes for less changes and
duplication at the callsites).
closesodoo/odoo#56029
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Steps to reproduce:
- Let's consider a product.template TP with a kit
- Let's consider the variants V1, the only variant of TP with a kit
- The virtual_availalbe of V1 is 100 (smart button Forecasted in the form view)
Bug:
The virtual_available of TP was 0 instead of 100
The virtaul_available of a product.template must be the sum of virtual_available of all its
variants with kit
PS: This commit changes the available quantity of product_product_table_kit in demo data.
As this quantity was not equal to 0, the type of the product could not be changed.
opw:2297226
closesodoo/odoo#55707
X-original-commit: 4df4ad023b9dd24edf75e8993d1d31c73ce26bc0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
* remove useless OdooTestRunner
* don't log results & time per-file, log a module-level tally instead
* add number of tests to post-test results
* generate a single test suite per module (see note)
* use the previous item to split out the at_install test-running in
two steps: generating the suite for the module then running that
suite, this way for modules which have no test, or for
which all tests have been deselected by test tags, we can avoid some
of the setup necessary to prepare for running tests but possibly
quite expensive (e.g. `setup_models`)
Note: single test suite per module
I wanted to stop creating a test result for (essentially) every file
in the module, however because of the class-level ``addCleanup``, a
TestResult can't be reused by independent suites:
In order to run class-level cleanup, the test suite checks between
tests if the test it's *preparing* to run is in the same class as the
last test it ran, and if not applies the class-level cleanup.
The problem is that the "previous test class" is stored on the result
object, which is never cleaned up, and the "between tests" check is
really performed *before each test*.
This means when reusing results across suites it will run the
class-level cleanup at the end of one suite and immediately at the
start of the next, which will cause issues if class-level cleanups are
not idempotent (thankfully ``TestTestCursor`` has a non-idempotent
``tearDownClass` which let me discover the error).
Possible fixes are:
* don't reuse results
* clear the relevant states / attributes between suites
* put individual suites in a Big Suite for running
The latter seems simpler: just create a single suite for the entire
odoo-level module instead of creating one suite per test module.
Note to the note: the case of nested suite is taken in account, the
"end of suite" cleanup only runs at the end of the top-level suite, so
technically we don't have to unwrap suites for *that* purpose, we're
doing so in order to filter the test cases inside the suites. But
maybe we could integrate this feature to the suites themselves...
closesodoo/odoo#55185
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
That's a not-very-useful subset of OdooTestResult, so:
* make results merge-able (aka add ability to update a result with the
contents of another)
* remove support for test data files, and transmission of the
assertion report thing through the data-files loading
* replace "legitimate" uses of assertion report by test result
* have run_unit_tests manipulate and return a result instead of weird
flags & ternaries
Before this commit some of the <p> elements had no id or name.
This means you need to do uglier or more risky xpath expressions.
By adding names on the elements we can easily xpath to the element itself which results in less changes of breaking or having issues.
closesodoo/odoo#56096
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Since commit 11857adec0 the invisible form
widgets are not rendered at all. This caused an issue in the document
layout designer where the "custom_colors" field was invisible but still
referenced by a label with a "for" attribute.
Now, said field is not completely invisible anymore; it is set with
"display:none" instead to be rendered invisible and interactive as
before.
closesodoo/odoo#55970
Task: 2320982
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Those are already present in another file.
closesodoo/odoo#56133
X-original-commit: 9a0f9e926a40bb594b6a10336a22ade463f1d5e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Improve tracks list display at current solution does not scale well with lots
of tracks.
SPECIFICATIONS
Introduce a lighter reminder design: use standard bootstrap btn classes and
let colors be the standard one. This allows to simplify reminder CSS notably.
Display speaker and duration below track name, giving more space for the track
name itself. Display tags and sub information (hours, reminder / wishlist
widgets) on the right. This allows to simplify DOM and mobile management.
To be coherent with track list display tweak, add margins in pages using the
same kind of layouting.
Add tags under track name in track page view. Indeed they are displayed in
list view but not on page view. Also fix mobile display: move buttons under
name/tags in mobile to avoid strange display. We can now also use the full
reminder widget as buttons (quiz included) are on another line. Put location
and hours into a single line to avoid loosing space. Finally tweak a bit mobile
margins to gain space.
UDPATE
* website_event_track_online.track_widget_reminder
* website_event_track_session.tracks_session
* website_event_track_session.tracks_display_list
* website_event_track_session.event_track_content
* website_event_track_exhibitor.event_exhibitors
* website_event_meet.event_meet
LINKS
Task ID-2322408
PR #56095closesodoo/odoo#56128
Forward-port-of: odoo/odoo#56095
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Improve tracks list display at current solution does not scale well with lots
of tracks.
SPECIFICATIONS
Add tags under track name in track page view. Indeed they are displayed in
list view but not on page view. We think they are part of track description.
Also fix mobile display: move buttons under name/tags in mobile to avoid
strange display. We can now also use the full reminder widget as buttons
(quiz included) are on another line. Put location and hours into a single
line to avoid loosing space. Finally tweak a bit mobile margins to gain
space.
UDPATE
* website_event_track_session.event_track_content
LINKS
Task ID-2322408
PR #56095
X-original-commit: ce2ffe189f59bccb1d0b806fb8bdf722a6611bed
PURPOSE
Improve tracks list display at current solution does not scale well with lots
of tracks.
SPECIFICATIONS
To be coherent with track list display tweak, add margins in pages using the
same kind of layouting.
UDPATE
* website_event_meet.event_meet
* website_event_track_exhibitor.event_exhibitors
LINKS
Task ID-2322408
PR #56095
X-original-commit: eddf8ad1602b8c92b67c5fec0146d3822642ba6c
PURPOSE
Improve tracks list display at current solution does not scale well with lots
of tracks.
SPECIFICATIONS
Display speaker and duration below track name, giving more space for the track
name itself. Display tags and sub information (hours, reminder / wishlist
widgets) on the right.
This allows to simplify DOM and mobile management.
UDPATE
* website_event_track_session.tracks_session
* website_event_track_session.tracks_display_list
LINKS
Task ID-2322408
PR #56095
Co-Authored-By Thibault Delavallée <tde@odoo.com>
X-original-commit: 38df744ab1a8786ceedffc65b993b035eb27f66e
PURPOSE
Improve tracks list display at current solution does not scale well with lots
of tracks.
SPECIFICATIONS
Introduce a lighter reminder design: use standard bootstrap btn classes and
let colors be the standard one. This allows to simplify reminder CSS notably.
UDPATE
* website_event_track_online.track_widget_reminder
LINKS
Task ID-2322408
PR #56095
Co-Authored-By Thibault Delavallée <tde@odoo.com>
X-original-commit: 471ac3d9f0cf918c2318fb74ddfeab39e5046383
The commit 79132f6 allowed multiple level for the subtasks, but a
remnant from the ancient time was left.
closesodoo/odoo#56104
Taskid: 2317929
X-original-commit: ace68ceceb92f8d7c16155fd72acd469424accd0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In this commit, we make sure that the selectedTable doesn't change
even during the popup is shown to the user. During testing, there might
be rouge clicks that click the .floor-map element which deselects the
selected floor, making the value of this.selectedTable to be false,
causing runtime error.
Every time we select an item in the selection popup, the item corresponding
the selected item is computed immediately. Instead, we defer this computation
during confirmation (when getPayload is called).
This implementation is lighter than previous because the component doesn't
need to listen to changes in an array, rather in a single number state.
Before this commit, mode value can be different to what is shown in the screen
because of async rendering. To make sure that the mode value is properly synced
with with view, we couple the numpad mode value to the component.
Currently timesheeting on a project without specifying the task does not
increase the delivered_qty of the related sale order line.
This could potentially lead to issues with the Helpdesk module for instance.
When a project is allow_billable = false, the user is not required to specify
the task_id on the helpdesk's ticket. This means that hours timesheeted while
working on this ticket will not be added to the delivered_qty of the related
SOL.
This commit "fixes" this by allowing to timesheet on project without specifying
the task_id. So now, even if an helpdesk's ticket has no task_id, the timesheeted
hours will be added to the related SOL delivered_qty.
Because it was initially impossible to timesheet on project without setting
the task_id, some tests had to be rewritten.
closesodoo/odoo#53172
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit adds webgl image filter to the existing image options,
including a custom filter that lets the user access color-correction
options (saturation, brightness, contrast, sepia, ...) as well as
blending modes for color filters.
Part of https://github.com/odoo/odoo/pull/53114
task-2279190
closesodoo/odoo#53114
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When compositing filters, it is often the case that you only want to
partially apply a filter. This commit adds an optional "amount"
parameter to the colorMatrix filter, and computes a weighted average
between the identity matrix and the passed in colorMatrix. This
parameter defaults to 1, meaning the effect is applied in full if no
amount is specified.
This is a change in the webgl-image-filter library, currently awaiting
merge into upstream at https://github.com/phoboslab/WebGLImageFilter/pull/25
Part of https://github.com/odoo/odoo/pull/53114
task-2279190
This doesn't make sense anymore: when we record production on a WO, in
any cases everything is processed as we make backorders.
Part of: https://github.com/odoo/odoo/pull/54283
task-2278147
Missed while merging the 2FA: in a mono-db scenario, the request is
bound to a database more or less immediately; however in a multi-db
scenario the current request *may* not be bound to a database by the
time we reach session authentication, this binding is performed *by*
the authentication step[0].
By trying to access an environment (requiring a db) before this
binding is performed, the authentication procedure broke.
We could create the environment by hand, but it seems completely
unnecessary: while there is a bundle of operations to perform in all
cases and a bundle to perform during finalization, they don't seem to
strictly depend on one another (and indeed this separation is already
a reordering of the operations from before), so the finalization can
be performed *after* having bound the current session to a database.
In fact that is closer to the older order: in the pre-totp iteration,
only the binding of the uid was performed before that of the login,
and even it was done after binding the database.
[0] this really is mostly a concern when using this step
programmatically, as interactively the database selector should
require selecting (and binding) a database before it's possible
to log-in
closesodoo/odoo#56093
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>