- RML Reports
- Webkit Reports (most part already removed by 13b9982c62)
- LocalService in netsvc.py
- rename attributes like rml_% to report_%
- rename ir.actions.report.xml to ir.actions.report
- allow rendering directly on an ir.actions.report by calling render method
- remove 'controller' report_type
- remove unused res.font stuff
- remove print_report method in models.py (not used)
- restore removed call to pdftotext process in test_reports
Problem: the update of custom models/fields is not fully transactional, and may
potentially lead to an inconsistent database. An other problem is creating two
custom fields by writing on a model: if the second one fails, the first one has
been committed without notice. Retrying the request will give an unexpected
error (duplicate field name).
Solution: never commit in the middle of a request. If the changes have an
impact on the registry, then mark it as invalid (with a new flag), and signal
registry invalidation after everything has been committed. If the request
fails, reset the registry. Both registry and cache invalidation are handled
the same way.
In Python 3, ``print`` becomes a builtin function. This is available
in Python 2 by importing the ``print_function`` feature from
``__future__``, the feature is conveniently still available in Python
3 (it just does nothing).
Fixers:
libfuturize.fixes.fix_print_with_import
#8530
* in P3, the iterator stepping method has become a dunder method (next
-> __next__), the protocol has not changed, add a __next__ alias to
the iterator-next definition (nota: ir.config also has a next method
but it's not part of an iterator, so don't alias it and don't
convert calls to it)
* since ~2.6, a builtin (next()) has been added to step an iterator &
allow for a default (in case of iterator end), convert all manual
stepping to the builtin
Fixers:
libfuturize.fixes.fix_next_call
#8530
Introspection attributes on function and methods were originally
prefixed with func_ or im_ e.g. im_class or func_name. For coherence with the
rest of the data model, Python 3 added dunder attributes (__func__,
__code__) and removed the old style, the dunder attributes were
backported to Python 2.6.
Use dunder attributes everywhere we're currently using func_* or im_*
attributes.
Fixers:
lib2to3.fixes.fix_funcattrs
lib2to3.fixes.fix_methodattrs
#8530
Most of the type aliases in the types modules are remnants from when
the corresponding builtins were just conversion functions and not
proper types (before type and class unification).
Python 3 removes them, and thus `types` essentially can't be used in
P3, it now only contains "interpreter" types which can't trivially be
obtained elsewhere (e.g. GeneratorType, CodeType, TracebackType) and
tooling to dynamically create new types (added in 3.3).
Convert a bunch of types usages in yaml_import to use the
corresponding builtin types.
fixers:
lib2to3.fixes.fix_types
#8530
Demoted to library in Python 3, see if uses can be replaced by more
specific construct, just import functools.reduce otherwise.
Futurize fixers:
* lib2to3.fixes.fix_reduce
This commit introduce a full redesign of all JS views. We started
basically from scratch. The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.
Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented
We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.
Work done by the framework team: mostly aab, ged, chm, dmo, qsm
For readability and coherence, in Python 3 the prefix for octal
literal becomes ``0o`` (rather than just ``0``). This new version was
also added to Python 2 as of 2.6.
Convert all octal literals in file-manipulation code (POSIX ACL), and
fix a few integers which were unwittingly octal.
(lib2to3.fixes.fix_numliterals)
Redundant with `in` and removed from Python 3.
Removed odd, old and long-unused UpdatableDict (which defines and uses
has_key) and UpdatableStr (which was nearby and caught in the blast),
validated with al.
(lib2to3.fixes.fix_has_key)
For the purpose of fighting spam, many abuse/spam-fighting
services provide redacted message IDs. Because we use a UNIX
timestamp as the prefix for all message IDs, a redacted
message ID of the form 1234XXXXX@domain.com is generally
useless to find a `flagged` message's origin, because it
matches most of the messages sent that day.
Narrowing it down with the help of the approximate time
of delivery does not help much, as there will still be
dozens/hundreds of possible matches on a busy server.
By swapping around the random token and the timestamp in
the message ID, we should improve the uniqueness and
"greppability" of our message IDs, once redacted.
Add a method to format a date in a given language. This appears to be
useful since formatting is not always done by QWeb, but also:
- in mail templates
- in formatted strings (error messages, pre-filled text fields)
Complements the patch in 8235f03f56
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.
1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
Store are safe. And it is a security risk to let end-users deploy Python
code on their Odoo servers without requiring any review/deployment by a
competent system administrator.
We will work on improving the validation process of the Store, but this
will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
non-technical users install Apps, as long as the feature has been
explicitly allowed by the system administrator. This is a common feature
in other software suites as well. So we'd like to keep it as an opt-in
feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
understandably expect to be able to turn off the feature for
security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
we keep it *discoverable* for users. The error message should be
helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
off the feature, we avoid introducing an extra server parameter.
The folder is still created (read-only) by default, for the sole purpose
of making it easier to locate.
Fixes#15225
The class `XMLTranslator` is replaced by a function `translate_xml_node` that
takes an XML node and returns the translated XML node. The translation process
is done by a recursive function on XML nodes that returns the untranslated node
if it can be translated inline, or the translated node otherwise.
lxml.html.clean module we are using to sanitize html takes either a
tree/element or string, and return us an element of the same type.
We are passing it an unicode string, and it gives us back an unicode
string and if it is possible convert entities to utf-8.
This lead to an issue in html inline fields containing an ` `
entity, the entity was converted by the sanitizer to its unicode
character (U+00A0).
Then, when the field value is loaded to be displayed, the internal
value contains U+00A0 characters, but when it is inserted in the page
the browser converts them to ` `. Hence in this instance, the
internal value is never equal to the displayed value and a write is
always triggered even without editing.
This commit simple modify the sanitizer so value saved in database
contain ` `.
closes#14569
opw-689274