Odoo 12 CE, Qweb-text report includes all HTML template code - text

As we know from Odoo 12 there is an option to define a report as Text, rather than PDF/HTML. I am testing with the native report Product Label (PDF), exactly as those guys https://www.youtube.com/watch?v=1kPlOWj2Zpk . The result I am getting is a txt file, with all the HTML code from the generated template.
A partial screenshot attached https://prnt.sc/qi90cg
The installation is fresh, no 3th party modules, only Invoicing from odoo 12 itself. Only difference i see between me and YouTube guys is that i am testing on Community Version and the YouTube video clearly shows an Enterprise version.
Any suggestions why I am getting the HTML code exported as well?
Thank you in advance...

They used a QWEB report which does not generate HTML tags.
Take for example the two following codes:
<strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'display_currency': product.company_id.currency_id}"/>
And :
<t t-esc="product.lst_price" t-options='{"widget": "float", "precision": 2}'/> <t t-esc="product.currency_id.symbol"/>
The first one will be rendred to
<strong><span class="oe_currency_value">68.00</span> €</strong>
And the second one will be rendred to
68.00 €
You can find an example at account_zebra

Related

Acumatica and notification template - strips html and other style tags - 2019 r1

We are seeing issues where style tags and other markup is being stripped and modified within Acumatica's Notification templates when we save the template.
We have an email template coder coding out responsive cross client templates, and when we paste the code directly into the html editor, it strips out a lot of the code and markup.
Does anyone have any idea if there are restrictions or specific syntax that is need to work with notification templates? I have searched and read all that i could find.
For reference, we are on 2019 r1.
Thanks in advance

ReactJS components for PDF export, Excel export and print

I´m building some ReactJS Table and Report components tha basically will contain <table> data, some graphics (d3) and some textual data. I need to provide 3 buttons:
Export to PDF
Export to Excel
Print
Are there any trustable packages available for the tasks above using ReactJS ? What is the approach to handle these requirements ?
I would use a combination of the following JavaScript libraries:
React Csv is my favourite JavaScript library for working with csv. It excels at dynamic generation.
PDF Make is my favourite JavaScript library for generating PDFs.
Note: I would attach the files to this post, but there is currently no facility for this in StackOverflow.
react-pdf (published 16 days ago - not tested)
react-export-excel (published 8 months ago - not tested)
For printing, put window.print() in your code
Example:
Copy and paste this as .html (in React, it would be onClick={window.print()} ... If I'm correct)
<!Doctype html>
<html>
<body>
<p>Use the button below to print</p>
<button id="print" onclick="window.print()">Print</button>
</body>
</html>
Old question, but since I was looking for something similar, I ended up using :
jspdf (see specific issue for reactjs)
react-excel-workbook
nothing yet, feel free to update the answer if you have.

how to get rid of MS Azure Media Services logo overlay (water mark)

How do you get rid of or replace the Microsoft Azure Media Services logo overlay (water mark) that is put onto dynamic packaged video? The following link shows the topic area:
https://azure.microsoft.com/en-us/documentation/articles/media-services-dynamic-packaging-overview/
My html contains embedded code taken from http://amsplayer.azurewebsites.net/azuremediaplayer.html
It seems that you are attempting to use the iframe embed code on the "get embed code" section of the player. Please note that this is currently under development, as it is listed on the site: "this embed code is for demo purposes only. Do not use in production."
For your player needs in production, especially if you want to use the large amounts of API's available, you should create your own player page following the instructions in the documentation and by using the samples provided.
Specifically for the question regarding the logo, there is an API available to remove to logo and can be found in the logo option section of the documentation. This is the correct way to remove to logo using the APIs provided.
It might be helpful to post some of the HTML that you are using when you say "My html contains embedded code taken from..."
It looks like the code on that page has the following div:
<div class="amp-logo" style="opacity: 0.5;"></div>
This appears to be what is placing the logo on the page you reference. Not know what HTML is actually in your page, I don't know if this is the HTML they are generating for you as embedded or whether you cut and paste the HTML from the given page.
You may be able to remove it from your HTML. If not, try creating a style that overrides the amp-logo class.

Use a Tag as Page Title in Kentico

I have a tag cloud on product listing pages on my site that goes to a tag results page which displays products that contain that chosen tag. I want to put a header at the top of that results page that says something like "Products Tagged As: (insert tag name here)"
Any advice? I can't seem to access the system variable that displays the currently chosen tag name. The page URL contains the tagID variable, if that helps:
Product-Features.aspx?tagid=36
I am using Portal Engine Kentico development, by the way. Thanks.
I know this question has been asked a while ago. But I am posting my answer just in case if anyone come across this question they can use this snippet.
Try using following macro
{%tag="";foreach(g IN SiteObjects.TagGroups){foreach(t IN g.Tags){if(t.TagID=ToInt(QueryString.tagid)){tag=t.TagName;}}}return tag;%}
Note: I am using Kentico Version 9.0
For some reason the macro doesnt work in page template directly, I put the above macro in a Static Text webpart its worked like a charm.
Hope it would help someone like myself.
Regards,
Gopala
Use following macro:
{% GlobalObjects.Tags.Where("TagID = " + ToInt(QueryString.GetValue("tagid", 0))) %}

IBM Connections 4.0 iWidget title attribute not working

I have added a new tab in my profile page of IBM Connections 4.0 by registering it in widgets-config.xml file the tab is successfully added and is working fine but the problem is i want to give some custom name to the tab like "Hello World" i tried adding title attribute to the iWidget xml file but its not working, the server is always picking the defId used in the widgets-config.xml as tab name instead of the title attribute,i also tried adding the name in widgets-config.xml file itself but the space is causing the problem. Any help in this regard is greatly appreciated.below is how the iWidget xml file looks like.
<iw:iwidget name="helloWorld" title="Hello World" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"
iScope="HelloWorldWidgetClass" supportedModes="view">
<iw:resource uri="helloworld.js" />
<iw:content mode="view">
<![CDATA[
<div id="frameHolder" style="width:678px;height:606px;">
<iframe id="testFrame" style="width:inherit;height:inherit;border:none;"></iframe>
</div>
]]>
</iw:content>
Thanks,
Vinay
The wording used in iWidgets 2.1 spec document suggests that the use of the title attribute is not mandatory by the container:
title: This attribute suggests a title that could be used in any decoration (e.g. titlebar) around the iWidget. This item can be set in both the iWidget definition and the microformat placing an iWidget instance on a page.
I suggest opening an IBM Connections PMR to bring this issue to the attention of the development team.
In Connections, the title and descriptions for iwidget are both defined in widget-config.xml by "defId" and "description". You could add NLV support for these 2 string by add "Customizing product strings" to Connections.
Here is a brief steps to do that:
in widget-config.xml
in LotusConnections-config.xml
put your strings file in
/strings/com.xxx.myWidget.properties
/strings/com.xxx.myWidget_en.properties
...
/strings/com.xxx.myWidget_zh.properties
in each of the property file:
myWidget=My widget title
myWidget.desc=My widget description
The detailed steps could be found in Connections product document, but the idea is same, to provide customize string support for 3rd party iwidget.

Resources