- Add the following in a PDF report:
```html
<p>
<blockquote>
<ol class="loweralpha simple">
<li>Item that explain terms</li>
<li>Another item that explain something else</li>
</ol>
</blockquote>
</p>
```
- Print the report
Wkhtmltopdf crashes with the error:
Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum
file number of subprocess reached. Message : b''.
This is a known issue:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4115
Actually, since this CSS is only used for Wkhtmltopdf reports, we can
simply remove the CSS rule causing the problem.
Closes#37034Fixes#37033
opw-2073195
closesodoo/odoo#37155
X-original-commit: 8d08893172ae8c0f3ad1f1af6ab9514aa30bf843
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.
Mainly:
- JS refactoring and linting
- Conversion of .sass into .less split into multiple files
- Templates cleaning and DOM simplification
- Re-generation of web.pot, and update of .po files
This is a rather large change for developers: from this commit on, we
need to use debug=assets instead of just debug to split assets.
The About menu has been slightly improved as well (the link does not
appear when we are already in debug mode), and an option has been added
in the debugging menu to activate the assets debugging mode.
When editing a line, leave the buttons visible.
Also remove the 3px gap between fields so that readonly field texts
does not move when entering the edition mode.
In most backend views using CTRL+P to use browser printing would only
print an header without the content.
stumbled-uppon-when-checking: opw-659430 opw-660763
In most backend views using CTRL+P to use browser printing would only
print an header without the content.
stumbled-uppon-when-checking: opw-659430 opw-660763
Like view manager containers, client action containers needed the
overflow:auto property to compute their correct height inside their
flex context. This also allows client action as the reconcilation in
accounting to not care about their height.
Elements which are not displayed (display: none) cannot be positionned
correctly by jQueryUI in a listview editable. Therefore, the solution is
to make them visible (but opacity: 0) during the time their position is
being computed.
This was a problem because a listview editable field may become visible
under some conditions AFTER their position was already computed.
A 'display: none' rule on hover has been added for boolean buttons, on each
'o_stat_button o_stat_text' that hasn't classname o_hover. This applies on
every stat button that isn't a boolean button, so their content is always
hidden on hover.
The widget now provide labels that depend on widget option "terminology". For
each terminology, it provides four button labels that are shown depending on
the field's value and hover status on the button.
In internet explorer, writing direction can lead to wrong text direction
when combined with rotate.
A fix was already in place for IE up to version 9 but the issue also
happens in next versions which are more difficult to differentiate
(especially the current spartan/edge version).
So this fix use the same css property value for all browser and it doesn't
seem to have an impact (other than correcting the issue in IE).
closes#7955
opw-646430
The DOM structure and elements's classnames diverge in community and enterprise
editions. Tips must work perfectly with both editions, obviously.
This rev. updates some classnames in the community edition for the tips's selectors
to match in both editions.
The following classnames have been renamed/introduced:
- oe_form_buttons_view renamed to o_form_buttons_view
- oe_form_buttons_edit renamed to o_form_buttons_edit
- oe_form_invisible renamed to o_form_invisible
- oe_list now also has classname o_list_view
- header tag in form views now has classname o_form_statusbar_buttons
Other changes like these might be required later if other tips are introduced...
Buttons that are not stat buttons couldn't use font-awesome icons, as it
automatically fallbacked on the icons in /web/static/src/img/icons. This was
the case for several templates where the icon thus couldn't be found as it was
looking for a font-awesome icon in the icons folder (e.g. fa-cog.png).
Also cleans some unused less rules defined on the stat buttons in
enterprise_compatibility.less
Since rev. 16eb36ff, do_show() and do_hide() on widgets toggle the classname
o_hidden on which the rule 'display: none' is defined, instead of calling
jQuery's show() and hide().
The method do_toggle(), sharing the same logic, has been introduced in rev.
74c5f772.
From now on, every widgets should call do_toggle() instead of $el.toggle() as
it will have undesiderable effects (they should call do_show() and do_hide()
instead of $el.show() and $el.hide() as well, this as been done in 16eb36ff).
This rev. replaces all calls to $el.toggle() by do_toggle(). It also adds
an optional argument to do_toggle() to force hidding or showing the widget.
Refactoring of the DOM structure and classnames of the list view's action
buttons (in the control panel), for new design compatibility. This refactoring
was required as some addons shared between both editions (e.g. base_import)
define their own buttons and extend the ListView.buttons template to insert
them.
this way we can style the div and use the trick to have the child of a
flex-item filling 100% of its parent (flex item in relative position and
flex child in an absolute position). It is needed to have a consistent
look betwenn Odoo enterprise and Odoo community.
The problem of $el.show()/hide() is that calling show() on a jQuery element on which
there is no display rule in the stylesheet automatically sets 'display: block'.
However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet
applied, meaning that calling show() will set its display to block (in inline style),
even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the
priority over the stylesheet, the correct display won't be applied, even when the widget
will be appended in the DOM, resulting in a possibly broken layout.
Adapt the Favorites menu so that addons appending stuff in it are compliant with
the enterprise edition.
Mainly, creation of dashboard.less from of dashboard.sass so that we can use mixins
defined in the web addon.
Some changes as well in the dashboard view to make it compliant with the enterprise
edition.
Use correct naming convention: classnames with underscores, less mixins with hyphens.
If too many tags (or too long tags) where present in a many2many tags
widgets, it could go over the field and cover other thing in the UI.
Now the field size expands with the content (and in a way it is more
visually similar before and after 'Edit' so it is nice).
closes#7579
opw-644236
This rev. generalizes the notions of FieldOne2Many to FieldX2Many and of One2ManyViewManager
to X2ManyViewManager. The same logic is now applied both for One2Many and Many2Many fields.
This allows Many2Many list and kanban views to have a pager, as the pager is instanciated
by the view, on demand of the ViewManager.