I am working in Ektron 8.6.
I am creating a Custom widget for the creation of XLIFF file for a corresponding content in workarea by passing it's Content ID.
I have referred the files in the workarea folder of my ektron website to get the Ektron API's to emulate this functionality(as this is already handled by ektron).I got some inputs form the following file:Workarea\controls\content\localization_uc.ascx.cs and tried the following code:
Localization temp = new Localization();
temp.StartExportContentForTranslation("36,12,50", "1031,1041");
I also tried:
Ektron.Cms.ContentAPI m_refContentApi = new Ektron.Cms.ContentAPI();
Ektron.Cms.BusinessObjects.Localization.L10nManager localizationManager = null;
localizationManager = new Ektron.Cms.BusinessObjects.Localization.L10nManager(m_refContentApi.RequestInformationRef);
localizationManager.StartExportContentForTranslation("30,35", "1078,1052");
localizationManager.StartImportTranslation();
But this code doesn't seems to work.
What i am i doing wrong here?
I found another SO question regarding the same issue.But that loop also is not having a solution to the issue.
Can someone help me in fixing this issue?
Related
I’m having several issues when trying to modify the default template of product labels. I need to add some new fields to the existing template that generates the document of product labels (and to design in with proper dimensions).
I am not able to find the xml template to modify it because I can’t find the file. This is a topic I have been researching deeply through the internet during the lasts days and all my attempts have been unsuccessful.
On the Internet, it is said that the product labels are generated using the product/report/product-label.xml and product_label.xsl:
https://www.odoo.com/es_ES/forum/ayuda-1/question/product-label-prints-only-one-variant-attribute-74684
The issue is that I can’t files these files in my Odoo installation folder (tested with both Windows and Ubuntu). These are my folder contents in Ubuntu usr/lib/python3/dist-packages/odoo/addons/product/report:
Should I create the xml and xsl files?
If so, how can I reference them? I have already tried to modify the xml file to try if the options for rendering the report change and nothing’s happens...
Here is the xml that I have been modifying (looks like it is an index of the different available reports but I haven’t found any official documentation regarding this) (note that I’ve added a number to each report title to see if something changes):
And the select options are still the same, as it can be seen in the following screenshot.
Am I’m missing something? It looks like these templates are located somewhere else and I’m editing these files without success (and restarting the Odoo server doesn’t work either...).
I'm using Odoo v12.
Thank you for your help!
<report> tag in odoo is actually shortcut of ir.action.report model record creation, qweb-pdf or qweb-html type of report needs a qweb template to render the report output, which is mentioned in name and file properties in the report tag.
After changing the files in a odoo module, if that module is already installed before change, you have to update the module. You can update from Apps menu of odoo web panel. For example, in this case, you are making change in product module which is named Products & Pricelists in odoo Apps. After making change, update that module and you will find the changes effective. Also, if you are adding new XML file, you have to add respective file name in __manifest.py__, or have to import in __init.py__ if you are adding new python file in the module.
Could any body let me know how to create custom widget in thingworx.
I don't have any idea how to create custom widget.
Please help me.
I have to build drag drop custom widget and we can use that custom widget with other widget. e.g with tree widget,... etc.
I would recommend reading the official Extension Package Development Guide:
However, the best way to start making a new widget is to take an existing widget that does something like you want, and modify it. Built in widgets exist at
TomcatRoot\webapps\Thingworx\Common\thingworx\widgets
Here's a very brief guide to getting started with that. If you were to want to copy Textbox:
Open the metadata.xml and change the "TextBox" to "MyWidget".
There are two sections in this file. The "ExtensionPackage" section holds metadata for the pacakge (version, vendor, etc.)
The second section , "Widgets" defines the widget files. Change the name of all these files to use your name e.g. MyWidget.ide.js Don’t forget to change name in the “Widget” xml tag too.
Rename all necessary folder and files, replacing "TextBox" with "MyWidget"
Open the both .js files and change the definition in each to reflect "MyWidget"
In the ide file, change the icon path "widgetIconUrl" and the "name" property.
Select the "ui" folder and the metadata.xml file and package them both into a new zip file. This file should import into Thingworx.
I would suggest searching for or asking this question in the PTC IoT Community, which is much more active for Thingworx developers than StackExchange.
UPDATE: The latest documentation for ThingWorx 9 Extension Package Development Guide can be found here
Am tryng to automatically generate pdfs using html2pdf class. I got the following code which is working fine, only that someone has to save the pdf manually. However, Whenever a new product is added, I would like to automatically save the pdf to some folder without user intervention, and store this value in a database for future reference.
How do I go about saving the pdf 'silently' i.e. in the background without showing any popups or requiring the user to intervene?
Thanks in advance.
include('pdf_content.php');
$content = ob_get_clean();
// convert to PDF
require_once('html2pdf/html2pdf.class.php');
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->setDefaultFont('Arial');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
//$html2pdf->Output($file_name.'_'.date("dmY").'.pdf');
$html2pdf->Output($product_id.'_'.$file_name.'_'.date("dmY").'.pdf');
You can try calling this script everytime a new product is added, although then you wouldn't really do it in the "background"...
For more information, please note the question "How can I run a PHP script in the background after a form is submitted?"
EDIT:
If you wish to save the file on the server instead of outputting it to the browser, you can use different parameters. See also the html2pdf-wiki. Be aware that you cannot save the file on the user's computer unnoticed!
$html2pdf->Output('directory/file_xxxx.pdf', 'F');
It doesn't appear that I can provide both HTML content and file content in the DataRequestedEvent handler.
If I provide HTML content (via args.Request.Data.SetHtmlFormat(xxx)) and file (via args.Request.Data.SetStorageItems(xxx)) the Share charm says "There's nothing to share".
Anyone got any ideas or is this by design?
var htmlExample = "<p>Here is our store logo: <img src='images/logo.png'>.</p>";
var htmlFormat = Windows.ApplicationModel.DataTransfer.HtmlFormatHelper.createHtmlFormat(htmlExample);
request.data.setHtmlFormat(htmlFormat);
full exemple here http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.datatransfer.datapackage.sethtmlformat
If time for generating the content is more that 200ms share charm says "There's nothing to share".
You can avoid this problem with DataProvider.
args.Request.Data.SetDataProvider(StandardDataFormats.Html,
new DataProviderHandler(this.OnDeferredHTMLRequestedHandler));
args.request.Data.SetDataProvider(StandardDataFormats.StorageItems,
new DataProviderHandler(this.OnDeferredStorageItemsRequestedHandler));
You can find more information here:
How to support pull operations (XAML)
I'm using Documentum Composer to create a new XML application. After importing an XML template for the content from WebTop, I noticed that the templates are missing the Documentum-Specific attributes such as these:
Expected:
<ArticleTemplate xmlns:dctm="http://www.documentum.com" dctm:obj_status="Read-Only" dctm:obj_id="0123456789ABCDEF" dctm:version_label="CURRENT">
Observed:
<ArticleTemplate>
Does anyone have an idea of which object I should look at within Documentum Composer? Is the problem in the type or in the XML Application?
I figured out what my issue was. When you import your dm_config_xml type, remember to remove the .xml extension from the NAME property during the import processs. DA isn't smart enough to remove the extension even if the file name is the same as the XML Application folder.