Commit Graph
143436 Commits
Author SHA1 Message Date
Richard deMeester a0887c6a48 [I18N] account_check_printing: translate in en_AU
Use Cheque instead of Check (American spelling)

closes odoo/odoo#70196

X-original-commit: 58966deb956ba87b3475cf3d359d732907331563
Related: odoo/enterprise#18079
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-04-30 15:26:07 +00:00
Nicolas (vin) 3973f766cc [IMP] account_reports: carryover improvements
Implements various small improvements in order to make the carryover
functionality a bit less hidden, with a cleaner UX.

Task id #2500684

closes odoo/odoo#69762

Related: odoo/enterprise#17908
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-30 15:37:35 +00:00
Jacky (trj) bb11164de0 [FIX] point_of_sale: create only one picking when validating order (if the option is activated)
closes odoo/odoo#70190

X-original-commit: 77267c265e6769cd90e8bc61d634b765e04a6829
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-04-30 14:34:18 +00:00
Nicolas Lempereur 849e0a5690 [FIX] im_livechat: 'Visitor' translated in livechat
Make translation work for "Visitor" that was appearing in livechat
session to the visitor.

opw-2504461

closes odoo/odoo#70175

X-original-commit: 3b199007bd5a472d57f823a63b2b77841b14c7fc
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-30 14:00:17 +00:00
Sébastien Theys 8f6603db45 [IMP] mail: compute messaging menu counter with dependencies
It was the last remaining usage of the deprecated `_updateAfter` which is
therefore removed too.

Part of task-2258617

closes odoo/odoo#70170

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-04-30 12:02:20 +00:00
Rémy Baranx (bar) 5a1905ee7d [FIX] gamification: apply res.users ir rules when retrieving badge owner info
When retreiving the list of badge owners in `_get_owners_info()`,
we should apply `res.users` ir rules to be sure to respect multi-company
rules.

upg-7081

closes odoo/odoo#70182

X-original-commit: d75deff4791702e1f085b2b16247d7f7c5335720
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-04-30 13:33:42 +00:00
Sébastien Geelen (sge) 86dbb2f4ae [FIX] web_editor: prevent linktool destroy on autocomplete click
closes odoo/odoo#70167

X-original-commit: 3acf90df2f70793554ff13e262cb4ad0e38308bd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 11:31:23 +00:00
Nicolas Lempereur 1f14a6b8ed [FIX] website{,_livechat}: 'Website Visitor' translated
Make translation works for "Website Visitor" that was appearing when a
logged-out user open a livechat session.

note: list comprehension has to be removed since translation only search
language in direct calling method closure.

opw-2504461

closes odoo/odoo#70146

X-original-commit: 7d28f32d9be1590764883f4621df04e04c4e1f12
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-30 08:45:00 +00:00
Adrien Widart c175652762 [FIX] point_of_sale: post journal entries of cash in/out
When closing a POS session, if there was no sale, the journal entries of
cash in/out will not be posted.

To reproduce the error:
(Need account_accountant)
1. In Point of Sale, open Shop's settings:
    - Enable "Advanced Cash Control"
2. Start a new session:
    - Open POS
    - Close, Confirm
3. Close session
4. Click on "End of Session"
5. Add a "Cash In/out"
    - +$10
6. Set Closing Cash
7. Close Session & Post Entries
8. Accounting > Cash

Error: The $10 line is present but its status is "New". It should be
"Processing".

Since there was no sale during the POS session, the module ignores all
the accounting part. When the session is closed, the accounting part is
ignored because there were no sales. As a result, it does not post the
cash in and out.

OPW-2456395

closes odoo/odoo#70160

X-original-commit: 985f1bf5b187513f71e65ab7d2b68e25ff1bfdf1
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-30 10:29:22 +00:00
Sébastien Geelen (sge) 0c5c4664f6 [FIX] web_editor: fix icon replacement when using toolbar replace button
closes odoo/odoo#70143

X-original-commit: b5ed6558185bb4686d6be6e8c1c4e8c4573c6e14
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 08:06:32 +00:00
Sébastien Geelen (sge) d54959bd9d [FIX] web_editor: fix icon link edition
X-original-commit: 8bb7610e8893cad692cf9ad2f5a89a503a6175ef
2021-04-30 08:06:31 +00:00
Olivier Dony d08db821bc [IMP] web: simplify font loading code
Can be simplified a bit by using the newer features of
`tools.file_open()` and `tools.file_path()`.

Let's do it since the PR is touching these lines anyway
for the change of resource paths.

closes odoo/odoo#69614

Related: odoo/enterprise#17855
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-29 07:34:40 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
fw-bot f6c03b7097 [FIX] calendar: improve calendar recurrency creation performances
Turn off calendar.attendees notification during synced_events creation
to improve performances. The calendar notification are only computed
once after all the synced events have been created.

Add a flag in google_calendar.js to avoid retriggering synchronization
while navigating the calendar view if the past synchronization is still
pending.

opw: 2450259 + fixes/adaptations to 14.3 branch

FW of https://github.com/odoo/odoo/pull/69619

closes odoo/odoo#70035

X-original-commit: 28ccb2b88a7793058c81aabffb43071165886f40
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-30 06:47:00 +00:00
Yannick Tivisse fa90f97627 [FIX] hr_holidays: Add method to allow inheritance
closes odoo/odoo#70125

X-original-commit: 12ba83ce60c74a8dcfb773a2c21bbf31b681ab30
Related: odoo/enterprise#18044
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-29 16:56:17 +00:00
david f27111e767 [FIX] mail: tracking_value_ids field group
Give a coherent group as otherwise we could have access errors. Simple
case: an Admin Rights user goes into a mail message form which is only
available in debug mode which sets `group.no_one` into such user. This
model is only readeable by `base.group_sytem` so an AccessError will
raise.

closes odoo/odoo#70119

X-original-commit: 8930e08213d0b6805e6fc91fa07561107ef43acc
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-29 15:05:12 +00:00
Romeo Fragomeli 7a40d528e7 [FIX] web: pdfjs: hide buttons that doesn't work in webviews
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.

Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.

Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.

Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).

Note that a refactoring is already in progress in order to
avoid to patch this library in master.

closes odoo/odoo#70110

Task-id: 2200168
X-original-commit: 39225827035efe11cdc90b2a7f1ae1f24a54b136
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2021-04-29 14:27:31 +00:00
dht-odoo f37e4f675f [IMP] website_mass_mailing: remove horizontal scrollbar in popup
Sometimes while dropping a newsletter popup (for ex in blogs, events etc),
there's a horizontal scroll-bar on the pop-up due to bootstrap gutters.

This commit improves the behavior by removing the gutters on the div causing
the horizontal scroll-bar on the popup.

Task-ID - 2312996

closes odoo/odoo#61855

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-22 09:02:01 +00:00
dht-odoo e3ccb454b9 [IMP] website_mass_mailing: improve 'Website popups' inline tree view
This commit improves the inline tree view for 'Website popups' for the
mailing lists with following changes:

- disables creation from the tree view as it should always be done with
  the fronend
- adds last updation date and create date in the tree view
- hide website popups page/menu in form view if no popup is there

TaskID - 2312996
2021-04-22 09:02:01 +00:00
Swapnesh Shahandsimongoffin f48ae97c2c [FIX] hr_recruitment: allow to restore Application
Steps to reproduce the bug:

- Create a Job Application without Applied Job
- Refuse/Archive it.
- Restore/Unarchive it

Bug:

- KeyError raised due to missing `False` in `default_stage`

Fix:

- Add `stage_id` if Applied Job is selected on the application.

opw:2513147

closes odoo/odoo#70077

X-original-commit: b0dc16e44d027bf27ec501d922459bf0f1db8550
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: simongoffin <sig@odoo.com>
2021-04-29 08:55:13 +00:00
Goffin Simonandsmetl 45710b17da [FIX] account: Wrong amount of tax with different currency
Steps to reproduce the bug:

Create an accounting entry AE with $ as default currency
Add a line L1 with 10 € and a tax of 15%
Bug:

The added tax line was 0.75€ instead of 1.5€

opw:2510338

closes odoo/odoo#69995

X-original-commit: 28e85cdbbd499b3fa826c15d4058aa4b83b993c9
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Co-authored-by: smetl <las@odoo.com>
2021-04-28 11:38:09 +00:00
Swapnesh Shah 394c5f9544 [FIX] hr_attendance: compute worked hours when needed
Steps to reproduce the bug:

- Go to Attendances > Manager > Attendances
- Remove Check in value of an hr.attendance record A
- Set Check out to A

Bug:

A traceback was raised

opw:2513143

closes odoo/odoo#70088

X-original-commit: c462782f66d720266e7e8e7f616fc26c23f009c8
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-04-29 09:45:16 +00:00
Goffin Simon b60be49a56 [FIX] hr_timesheet: Analytic account without company
Steps to reproduce the bug:

- Let's consider a project P set with analytic account AA and company C
- Allow timesheet on P
- Let's consider a task T belonging to P
- Set AA with comapny = False
- Try to encode a timesheet on T

Bug:

A UserError was raised because the field company_id on account.analytic.line is required

opw:2486034

closes odoo/odoo#70086

X-original-commit: b3dc922cb45bdd4c2778bea784b540b1723c8fc1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-04-29 09:40:05 +00:00
Odoo's Mergebot 6ee928bd30 [FW][FIX] *: AppStore Review compliance
The goal of this PR is to solve some issues with the last AppStore review.
Without these changes, we are no longer able to update the mobile app on iOS.

Here is a summary of the feeback we received:

> **Guideline 2.5.8 - Performance - Software Requirements**
> https://developer.apple.com/app-store/review/guidelines/#software-requirements
>
> Your app includes a dashboard view that presents multiple windows at once.
> The Apple iOS Human Interface Guidelines allow multiple screens in an app. However, access to these screens should always be sequential, not simultaneous.
>
> _Next Steps_
>
> To resolve this issue, please modify your app to provide an alternate way users can accomplish the same task in a single screen or sequence of screens.
>
> **Guideline 3.1.1 - Business - Payments - In-App Purchase**
> https://developer.apple.com/app-store/review/guidelines/#in-app-purchase
>
> We found in our review that your app or its metadata provides access to mechanisms other than in-app purchase for purchases or subscriptions to be used in the app, which does not comply with the App Store Review Guidelines. Specifically:
> Your app includes an account registration feature for businesses and organizations, which is considered access to external mechanisms for purchases or subscriptions to be used in the app.
>
> _Next Steps_
>
> To resolve this issue, please remove features, account registrations links, and any other fully qualified links to your site that could indirectly provide access to external purchase mechanisms.
> If you have any additional information to provide regarding the digital content and services in your app and how the guidelines apply to them, please reply to this message in Resolution Center and let us know. If there is information you'd like us to consider in our review of future submissions, please feel free to include it in the App Review Information section of App Store Connect.
>
> _Resources_
>
> Learn more about our policies for apps that offer paid digital content and services.

closes odoo/odoo#70093

Task-id: 2483253
Forward-port-of: odoo/odoo#70051
Forward-port-of: odoo/odoo#68351
Related: odoo/enterprise#18035
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-04-29 14:10:18 +02:00
Adrien Dieudonne e09608f929 [FIX] base: apps: hide learn more button on iOS
According to the app-store guidelines we are not allowed to sell from
the iOS app.

Our updates are currently blocked because of this.
In the rush, we have no choice but to hide the 'learn more' button
displayed on each app. This redirects the customer to the documentation
page where you can find subscription links.
And this is unfortunately not allowed by Apple...

Source: https://developer.apple.com/app-store/review/guidelines/#business

Related PR:
https://github.com/odoo/mobile-ios/pull/102
https://github.com/odoo/mobile-ios/pull/103

Task-id: 2483253
X-original-commit: a812660e284068802e24d9dd422e4dd15341e716
2021-04-29 10:07:36 +00:00
Adrien Dieudonne b13884fa7a [FIX] *: removal of any possibility of purchasing IAP credit in iOS
According to the app-store guidelines we are not allowed to sell from
the iOS app.

Our updates are currently blocked because of this.
In the rush, we have no choice but to hide certain elements related to
IAP services.

Source: https://developer.apple.com/app-store/review/guidelines/#business

Related PR:
https://github.com/odoo/mobile-ios/pull/102
https://github.com/odoo/mobile-ios/pull/103

Task-id: 2483253
X-original-commit: 657780cc7102c77cafe20998df0d7667cdc4c0df
2021-04-29 10:07:36 +00:00
Rémy Voet (ryv)andFeyensv eca2161f40 [IMP] sale: add populate
Add populate script for the `sale.order` and `sale.order.line`.

task-2446266
closes odoo/odoo#50566

closes odoo/odoo#68704

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2021-04-29 09:28:39 +00:00
Rémy Voet (ryv)andFeyensv 2c1823514c [IMP] product: product_* population
- Improve product.product & product category population: Add "random"
types, prices, and product categories to product. Specify some product
categories as children of others (populate the `parent_id` field).
- Provide product template and product attributes population
- product pricelist population

task-2446266

Co-authored-by: Feyensv <vfe@odoo.com>
2021-04-29 09:28:39 +00:00
Odoo's Mergebot 4213386b6e [IMP] deprecate server-side t-raw & remove occurrences
`t-raw` is a relatively regular source of issues, not just because it
gets misused (though that happens) but because it's a form of action
at a distance: a commit adds a `t-raw` with a checked input, this gets
validated and merged, then the *input* gets modified or overridden or
... and the devs & reviewers don't realize it will end up in a
`t-raw`... and we've got an injection vector.

The markupsafe package (on which we already have a hard dependency)
turns out to have a solution for that: if the parameter to
`markupsafe.escape` has a `__html__` method, it will just call that.

It also provides `markupsafe.Markup` which defines exactly one method,
and furthermore will automatically escape the parameters to its
methods (which can be a bit disconcerting for some) as well as
formatting parameters e.g.

    Markup("foo %s %s") % (a, b)

will automatically escape `a` and `b` before they're merged into the
format string, and will return a markup. Obviously that doesn't work
the other way around (because `str.__mod__` and `str.format` always
return a string). It does work for concatenation though.

This means if we can use `markupsafe.escape` as the standard escape
function (which is a good idea since werkzeug [is deprecating
`werkzeug.utils.escape`
anyway](https://github.com/pallets/werkzeug/issues/1758)) we can
leverage this property by requiring the *sources* to be properly
tagged for them to be directly injectible, this means in the scenario
above the payload will either be properly escaped OOTB or it will
break the existing system, but either way it should not be a
*security* risk. And we can easily flag mentions of `Markup` or
`__html__` for security review.

This PR updates `qweb` to use `markupsafe.escape` as its escaping
function, and adds a warning to `t-raw`. It also updates a number of
APIs to make them markup-safe by default:

* html_escape (that's actually what `markupsafe.escape` does on all of its own)
* html_sanitize
* the output of HTML fields
* scriptsafe JSON
* nl2br (which internally escapes its input if necessary)
* qweb markup bodies e.g. `<t t-set="thing">body</t>` the value is markup-safe
* qweb *output*, however `qweb._render` returns *binary data*, for the
  most part this is invisible because we keep using `to_text` and
  `ustr` everywhere and those decode bytes to text automatically, but
  `Markup` inherits from `str` so we can't just have qweb return a
  `Markup`, it generates garbage. Therefore it returns
  `MarkupSafeBytes`

`to_text` was also updated to let `Markup` instances pass through
unmolested. `ustr`, however, was not.

New wrapper types:

`MarkupSafeBytes` is used as the output of `qweb._render`. It extends
`bytes` as `Markup` extends `str`, though it doesn't redefine all the
utility escaping `Markup` does. For the most part:

* It decodes to a `Markup`.
* It defines an `__html__` which decodes to and returns a `Markup`.

`_ScriptSafe` is the new output of the scriptsafe JSON module. It
defines its own `__html__` which applies script-safe escaping at point
of use, it doesn't use the `Markup` wrapper to avoid issues of
unescaping and double-escaping related to attributes, with which
script-safe escaping is not compatible.

A few other notes:

* `to_text` was updated to let `Markup` objects pass through
  unmodified, `ustr` was not updated thus.
* The `Text` fields used through `t-raw` were converted to `Html(...,
  sanitized=False)` (at least when they could not be sanitized
  e.g. header contents and friends).
* Digest was completely untested, but the test I added is not entirely
  reliable, sometimes records go missing and I'm not really sure why.
* Running Odoo with `-b` might be a good idea: while Python 3 removed
  implicit conversions between text and bytes, this means
  `str(b'foo')` now generates the value `"b'foo'"`. Because `Markup`
  extends `str` it has essentially the same behaviour, and passing
  *bytes* to `Markup` is basically a garbage generator.

closes odoo/odoo#68072

Related: odoo/upgrade#2315
Related: odoo/enterprise#17228
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-04-29 14:09:54 +02:00
Xavier Morel 34fbed3639 [FIX] mass_mailing: str/bytes confusion thing
qweb returns bytes, which would be stored in a dict's `body_html`,
which would then be stringified *but not decoded*.

Running with `-b` this gets flagged, it's probably better to fill the
dict with what's actually expected (text).
2021-04-29 05:34:21 +00:00
Xavier Morel f9a1114792 [FIX] im_livechat: de-traw-ify
Mark computed field as Html (might not even be necessary as it's
computed by rendering a template but... can't hurt?)

Also update the template to use attf, seems dumb to format by hand.
2021-04-29 05:34:21 +00:00
Xavier Morel dd6e3e1190 [FIX] product_matrix: result of field rendering should be markup-safe 2021-04-29 05:34:21 +00:00
Xavier Morel 8d2a8ff2c3 [FIX] payment: de-t-raw-ify
The *_msg fields are HTML fields so there's no reason to do anything.

A few of the values are a bit more debatable though:

* Thanks_msg seems pretty much never used?
* The `message` value comes from `state_message`, looking at how
  that's set it doesn't seem like there's any reason for it to ever
  contain markup?
2021-04-29 05:34:21 +00:00
Xavier Morel c7002c7be7 [FIX] portal: de-t-raw-ify
As part of that, also mark one of the searchbar_inputs label as markup-safe.
2021-04-29 05:34:21 +00:00
Xavier Morel c778262da1 [FIX] website_partner: de-raw-ify
`left_column` and `right_column` would generally be rendered template
bodies and thus markup-safe by definition.
2021-04-29 05:34:21 +00:00
Xavier Morel 50f59471d6 [IMP] website_google_map: de-t-raw-ify
t-raw is used to inject safe-ified JSON into a script tag.

The scriptsafe json pseudo-module takes care of that, so remove
explicit escaping and use a script-safe JSON dump.
2021-04-29 05:34:21 +00:00
Xavier Morel b74e8740d8 [FIX] website_mail_channel: de-t-rawify
`message.body` is an HTML field so markup-safe.
2021-04-29 05:34:21 +00:00
Xavier Morel 50aabe7dec [FIX] website_sale: de-raw-ify
* The acquirer messages should be Html fields and thus working.
* The sort thing is the result of a template rendering, and hasn't had
  any need for raw rendering for a while anyway.
* Convert ribbon.html to an Html field, so qweb considers it
  markup-safe. Disable sanitisation otherwise the sanitiser wraps it
  in a `<p>`, and show the field as a char widget (same as currently),
  which requires adding an explicit view (though that lets us lay it
  out a bit better, it was weird to have the required `html` at the
  top left and the required `html_class` at the bottom right with the
  optiona color fields inbetween).

  Looked at the color picker widget for banner color selection, but
  that doesn't generate actual CSS colors so it's useless.
* Converted embed_code to HTML, needs to be unsanitized as it contains
  an `<iframe>` and those get stripped by sanitization (similar to the
  same field in website_slides).
2021-04-29 05:34:20 +00:00
Xavier Morel 369075fefb [FIX] website_slides: de-raw-ify
Convert `embed_code` to a computed HTML field so it's considered markup-safe.

It needs to be sanitize=False because we're putting <iframe> elements
in it. Those get stripped by sanitize.
2021-04-29 05:34:20 +00:00
Xavier Morel 25aeaecf85 [FIX] website_forum: de-raw-ify
`post_content` is rendered template content, so should be makup-safe.

`result_msg` is qweb template content, so it's markup-safe.
2021-04-29 05:34:20 +00:00
Xavier Morel 543df9b355 [FIX] website_event_meet: unnecessary t-raw.
Not sure why it's used here: summary is a text field, and other uses
use t-field.
2021-04-29 05:34:20 +00:00
Xavier Morel db02f776cb [FIX] website: de-raw-ify
Convert `custom_code_*` to `Html` with no sanitization, such that qweb
considers them markup-safe.

`base_popup_options` value comes from a rendered XML body so should
already be safe

raw -> out in the extended website info template, not sure why this
was even raw

Also mark robots_txt as an unsanitized Html field, that's
not *actually* true but it is true enough for our purposes, especially
since the field gets edited through a text-mode wizard.
2021-04-29 05:34:20 +00:00
Xavier Morel 7d1dcd1ec1 [FIX] portal: de-traw-ify 2021-04-29 05:34:20 +00:00
Xavier Morel 7c54acaebe [FIX] website: remove t-raw from main layout
One was always there, the other was apparently added due to a double
escaping issue.

Seems unnecessary either way:

- Additional_title should always be set via markup, meaning it's
  marked as safe (if necessary).
- The other one is less clear but neither website.name nor
  company.name should contain markup so...

  Trying to repro the issue reported at 1725212, still seems to work
  fine.
2021-04-29 05:34:20 +00:00
Xavier Morel 303c895a86 [FIX] link_tracker: markuping in link shortening
`href` is `href="...`, so if the input is a Markup object it will get
escaped on `html.replace`, which means it will not actually match the
text we're looking for.

Therefore mark it as `Markup`, because that's essentially what it
is. This should have no effect if `html` is an `str`.
2021-04-29 05:34:20 +00:00
Xavier Morel b9f016f6c6 [FIX] *: markupify python content
Will require a lot more conversions for this to work..
2021-04-29 05:34:20 +00:00
Xavier Morel a671b744b8 [FIX] *: raw -> out of mail values 2021-04-29 05:34:20 +00:00
Xavier Morel c6f744d7c3 [FIX] web: raw -> out of footer thing
Done this way so `_message` can be overridden with custom
markup. Should now work properly ootb: `final_message` should be a
`Markup` from qweb rendering, if `_message` also is such, the merge
should happen without further escaping of either value.

Note: needed to convert the str.__mod__ call to a concatenation as
otherwise the markupness information is lost. That's probably a
recurring issue.
2021-04-29 05:34:20 +00:00
Xavier Morel 9fadd925cb [FIX] reporting: fix rendering during PDF printing
The process of making HTML reports palatable to wkhtmltopdf is a bit
involved, including various renderings intersperded with
processing. This means bits of HTML are created, which are
processed (via lxml) before being fed into further templates.

On step 3, the previously processed bits need to be marked as Markup
lest they be escaped again and lead to... odd results.

Also explicitly provide encoding for one case where it's not entirely
necessary but can't hurt.

Also un-escape <base> in report templates, it seems completely
unnecessary. And try to move it to the correct location to the extent
that that's possible: per-spec, it should be in the head, not outside
the document entirely.
2021-04-29 05:34:20 +00:00
Xavier Morel 32fca57fcb [FIX] *: page['num'] is just an integer, no idea why it'd use t-raw 2021-04-29 05:34:20 +00:00