When creating a new record, the client calls `default_get()`, completes
the returned values with `False`, and calls `onchange()` to apply the
onchange to the defaults.
Optimize the double round-trip by integrating `default_get()` inside
`onchange()` for the first call. The method is called with an empty
list of fields, and usually no field values, except for records in a
one2many field. In this case, `onchange()` does both steps above.
Task 2261084
When ePOS couldn't connect to the configured printer, an error occured
right before showing the error message. The POS then showed a random
traceback instead of the clean error message.
closesodoo/odoo#56242
X-original-commit: 5ea25f753b55d52b5f1d9f41456577f58ada4465
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
When you hover on the "Start Typing" text in autocomplete dropdown,
it will not visible as its CSS overwrite with the rule and change the text color
as white.
With this commit, we have added the css rule for specifically "Start typing"
dropdown item and its looks consistent as other dropdown items.
Task : 2311983
closesodoo/odoo#56233
X-original-commit: ee8739361830981539127b269363a6fcbfcd840c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
PURPOSE
Allow users to display tracks that have not been scheduled yet. In tracks list
they should be displayed to allow generating much hype about those.
SPECIFICATIONS: NOT SCHEDULED TRACKS
Some customers announce their tracks before giving them a date.
As tracks pages are based on date, they are currently not displayed.
Add an 'Coming Soon' section in tracks list with tracks not having a
date. This is displayed below day-based tracks display.
Now that we support displaying tracks without date, various fixes
are also applied to various places where date is used.
UPDATE
* website_event_track_session.event_track_content
* website_event_track_session.tracks_display_list
* website_event_track_live.tracks_display_list
LINKS
Task ID-2323246
PR odoo/odoo#56180
X-original-commit: ab70df2670ed67929ee53af00a5dbc7d0b246589
Before this commit:
Once the push notifications have been blocked, click on 'My Profile' displaying
preferences warning twice with a different place inside the form after https://github.com/odoo/odoo/commit/328f6dbc984312049e94413fe9a46284cffcb3cb
After this commit:
A preferences warning will be displayed at the proper place by removing the
primary mode from inherited view and add priority to it.
LINKS
Task-2323263
closesodoo/odoo#56218
X-original-commit: 9983914e2ddc60f6bb55a97a6b6e15e1f9d940d4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit: if there are modifiers based on field which hides
one page and show another and if active page get invisible then instead
of first page second page gets focus, consider following example,
`<form>
<field name="boolean"/>
<page name="page1" attrs='{"invisible": [["bar", "=", false]]}'></page>
<page name="page2" attrs='{"invisible": [["bar", "=", true]]}'></page>
<page name="page3"></page>
</form>`
Consider the initial boolean value to be true; initially the first page
will be visible. But when "bar" is unchecked then page1 will be hidden
and page3 will get the focus as page2 is still not visible: it will be
after the computaion/application of all modifiers, which is currently
done after the rendering of a tab page.
Now: the first visible tab is focused on rendering (same as before) but
also after all modifiers have been updated.
closesodoo/odoo#56209
X-original-commit: 10365572aa3629e9b19d2b29726b351275de9f52
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Ipsita Borisagar <ibo@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
The cron to send the invoice to web-services is disabled until an edi.format that needs web services is created
closesodoo/odoo#56131
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
By adding a parameter `_table_query` on the Model, we can now have views
that depend on the context. The query is used instead of the table name
in ORM operations. This allows to pre-compute some values to improve
performance, instead of storing context values in the database.
Co-authored-by: william-andre <wan@odoo.com>
Co-authored-by: rco-odoo <rco@odoo.com>
The tooltip message on default_account in the journal is too obvious, and it has an issue
(There is no way to control the tooltip title when the field appears multiple times in the view,
it is always taking the label of the last time the field appears)
which is a limitation of the framework.
Thus, it is removed.
Fix the display of emails on the accounting dashboard, as they only should be
visible when properly set and on the purchase journal.
Improve the flow of the new bank account wizard to avoid forcing the user
to chose an existing journal when one of them exists without account.
This should still be a possibility, but the user should be able to decide
to create a new journal if wanted.
Task id #2322724closesodoo/odoo#56177
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
odoo/odoo#53938 improved the SQL linter and used psycopg2.sql to
silence the linter where that still made sense. However I forgot to
mark table names (pretty much exclusively) as `sql.Identifier` in a
few somewhat rare callsites, which consequently break when invoked as
a simple string is not a Composable and psycopg2 therefore rejects it
when composing the query.
odoo/odoo#54556 fixed a few mis-updated ones, but apparently I still
managed to miss one here.
closesodoo/odoo#56191
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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