speedata Publisher - how to insert a full size image - speedatapublisher

I use the speedata Publisher (the LuaTeX based database publishing software) and I'd like to insert a pdf file that covers the whole page. I have found the Image tag, but this gives me a margin at the top and the left and a blank page.
This is what I have now:
<Layout xmlns="urn:speedata.de:2009/publisher/en">
<Record element="data">
<PlaceObject>
<Image width="210mm" file="mypdf.pdf"/>
</PlaceObject>
</Record>
</Layout>
(I cannot create a new tag speedatapublisher and there is none yet here)

You should specify the position of the image in absolute terms (0mm):
<Layout xmlns="urn:speedata.de:2009/publisher/en">
<Record element="data">
<PlaceObject column="0mm" row="0mm">
<Image width="210mm" file="mypdf.pdf"/>
</PlaceObject>
</Record>
</Layout>
Hope this helps!

Related

PowerSchool Python API Plugin

I am attempting to connect to the PowerSchool SIS API via the Python PowerSchool library.
From the installation instructions here, I am stuck on the part where I need to create an XML file (including Oauth) for uploading as a plugin (via System > System Settings > Plugin Management Dashboard > {Your Plugin}). I am looking for an example showing how to do this in detail. I have tried looking at the information available in PowerSource here but this documentation does not show exactly what to do.
Thanks in advance for any help you can provide.
I think you must log in to the Powerschool system to install the plugin before you can connect to the API.
The plugin should look something like this...
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://plugin.powerschool.pearson.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation='http://plugin.powerschool.pearson.com plugin.xsd'
name="(Your Product Name)"
version="(Your Product Version)"
description="The plugin for PowerSchool integration with (Your Product Name)">
<oauth></oauth>
<publisher name="(Your Company Name)">
<contact email="(Your Email Address)" />
</publisher>
<access_request>
<field table="CodeSet" field="description" access="ViewOnly" />
<field table="CodeSet" field="codetype" access="ViewOnly" />
<field table="CodeSet" field="codesetid" access="ViewOnly" />
<field table="CodeSet" field="code" access="ViewOnly" />
<field table="STUDENTS" field="DCID" access="ViewOnly" />
<field table="STUDENTS" field="ID" access="ViewOnly" />
<field table="STUDENTS" field="first_name" access="ViewOnly" />
<field table="STUDENTS" field="last_name" access="ViewOnly" />
<field table="STUDENTS" field="grade_level" access="ViewOnly" />
<field table="TRANSPORTATION" field="DCID" access="FullAccess" />
<field table="TRANSPORTATION" field="ID" access="FullAccess" />
<field table="TRANSPORTATION" field="StudentId" access="FullAccess" />
<field table="TRANSPORTATION" field="Description" access="FullAccess" />
</access_request>
</plugin>
There are various places where you need to put your own information, like company name, product name, etc...
Then, you will need to put the tables and columns you want/need access to in the access_request node. Note, you must specify the type of access you require, such as ViewOnly or FullAccess.
This is a security measure. The Powerschool administrator for the school you are dealing with can then decide whether to allow the plugin or not. Once the plugin is installed, the Powerschool administrator should tell you the ClientId and the client secret to use for OAuth authentication.

How to restrict access to partners by create_uid

I need to limit user access only to partners added himself.
That's what I have made:
security.xml of my module:
<odoo>
<data noupdate="1">
<record model="ir.rule" id="partner_access_user_rule">
<field name="name">Parners only for editors</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="domain_force"> [('create_uid','=',user.id)] </field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
</data>
</odoo>
Update I have changed ref="base.model_res_partner" as Lucas told, and my module have installed, but the rule didn't uppear in settings > security>"record rules" and didn't apply. I've added record rule via web interface and it works. How I to export it to apply to my module? The record rule settings I've added to question.
Export file:
id,"perm_create","perm_unlink","perm_read","perm_write","domain_force","groups/id","name","model_id/id"
__export__.ir_rule_97,"True","True","True","True","[('create_uid','=',user.id)]","base.group_user","Partners only for editors","account.model_res_partner"
Your code is looking for the model res.partner on mail.partner.access, when it should look on base.
Try the following:
<field name="model_id" ref="base.model_res_partner"/>
If your row-level access rule doesn't work, create and test it using Odoo interface, export it to csv and change your original XML. Or create xml directly from CSV (look at attached picture). In my case I've found mistake: model_id should refer to base.model_res_partner

Limit the result from FetchXML query in CRM online 2015

I am using a service that gets data from CRM ONLINE and transfers it to SQL database for reporting purposes. I am using the following Fetch XML query to query CRM
string fetchXml = string.Format(#"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='new_studentinformation' enableprefiltering ='1' prefilterparametername='CRM_Filterednew_studentinformation'>
<attribute name='new_studentid' />
<attribute name='new_primaryhomeroom' />
<attribute name='new_lastname' />
<attribute name='new_firstname' />
<attribute name='new_busnumber' />
<attribute name='new_schoolname' />
<attribute name='new_gradecode' />
<attribute name='modifiedon' />
<attribute name='new_studentinformationid' />
<filter type='and'>
<condition attribute='modifiedon' value='{0}' operator='on-or-after'/>
</filter>
<order attribute='modifiedon' descending='true' />
<link-entity name='annotation' from='objectid' to='new_studentinformationid' alias='Notes' link-type='outer'>
<attribute name='documentbody'/>
<filter type='and'>
<condition attribute='createdon' value='{0}' operator='on-or-after'/>
</filter>
<order attribute='createdon' descending='true' />
</link-entity>
</entity>
</fetch>"
Every record has more than one image attached to it in Notes entity, however I want to transfer the latest picture ONLY. I have tried using the createdon in the order attribute but it keep bringing the images with the record till the oldest one. I only want it to bring the latest image and stop it there and move to the next record.
How can I limit it to querying only the latest image attached with the record?
Unfortunately <link-entity> doesn't allow it.
If you want a quick cheat around this limitation, you could do this (we do it all the time when specs go nuts):
Add a lookup to annotation to your new_studentinformation entity (keep it out of forms)
Register a plugin on new_studentinformation (Pre-Op, Sync, both for Retrieve and RetrieveMultiple) in which you fill the new attribute with the reference to the record you want in the report. I expect this to take 15 minutes tops.
Now switch the from attribute in the link-entity to the new one
BONUS: If your plugin is designed correctly, the reference in the custom attribute (and consequently your report) will automagically update itself.
I have a simple solution for your problem which will save you time and effort which you will put in making a plugin.
You should make a javascript resource , add a hidden field on your form.
Run that javascript on OnSave event. Store that document body in a text view.
Just query the document body text area while you are retrieving the image.
It may sound a hack! but it will increase the efficiency of your code.

Embed a video object in html

I have this assignement where I have to used export for web in quicktime pro 7. Then copy/paste the read me.html file into the body (exactly as it is), which I did.
However, I keep getting 3 errors when I run my .html through W3C and cannot figure out how to correct it.
I realized there are probably better way to embed object but this is how they want us to do it for this assignment. Can anyone help me correct these 3 errors please.
Many thanks in advance.
<object width="350" height="278">
<param name="src" value="swiss/swiss-poster.jpg" />
<param name="href" value="swiss/swiss.mov" />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="350" height="278" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
src="swiss/swiss-poster.jpg"
href="swiss/swiss.mov"
target="myself"
controller="false"
autoplay="false"
scale="aspect">
</embed>
</object>
Line 1 : Element object is missing one or more of the following attributes: data, type.
Line 14: Attribute href not allowed on element embed at this point.
scale="aspect">
Line 15: Stray end tag embed.
I just needed to embed a quicktime movie myself, and I looked to the Mozilla Developer Network for the syntax: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
I believe that the data attribute would take the place of href in your params:
param name="href" value="swiss/swiss.mov" />
would be:
<param name="data" value="swiss/swiss.mov" />
and the type in this case would be "video/quicktime":
<param name="type" value="video/quicktime" />
There is also an <embed> reference at MDN (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed), but it covers only the HTML5 version of the element, which doesn't require a closing </embed> tag.
The reference at sitepoint (http://reference.sitepoint.com/html/embed) addresses the earlier syntax, and also says:
"embed isn’t part of any currently recognized standard (it is included in HTML5 which is not yet finalized), so if you use it, your page can’t possibly validate".
That suggests that with <embed> you should probably focus more on actual behavior in the browser than the W3C's validation tool.

How can I embed windows media player without the visualizations

I enjoyed the late 90s just as much as the last guy, but I'd like to be able to play an audio file on a web page without having to look at the cheesy geometric visualizations that wmp shows. Is there a good way of doing this? Here's my code:
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="file.wav" />
<param name="autoStart" value="True" />
<embed type="application/x-mplayer2" src="file.wav" name="MediaPlayer">
</embed>
</object>
One temporary solution I've found is to set the height parameter to 45, which ends up showing just the controls at the bottom. As soon as Microsoft decides to change their layout though, this won't look right. Argh!

Resources