I need to add new field to the Soap Service. This field can add unbounded operations (contain name, description, example xml).For example, is this possible?
In the Artifact Source i tried inside a but it is not possible and I cant see how to make something similar like the image.
Thanks!
You can add a new field which can add unbounded operations as displayed in the image attached through the below code segment. Hope this helps.
<table name="WebServiceOperations" columns="3" maxoccurs="unbounded">
<subheading>
<heading>Name</heading>
<heading>Description</heading>
<heading>XML</heading>
</subheading>
<field type="text">
<name label="Name">name</name>
</field>
<field type="text-area">
<name label="Description">description</name>
</field>
<field type="text-area">
<name label="xml">xml</name>
</field>
</table>
Note: If you want to get the exact view you have to create or update the GC extension points. For that please refer this question.
Related
I want to replace purchase order form id purchase.purchase_order_form to own custom id in Odoo 10 using
replace id priority or X path or other method using xml please sort out my problem and send some demo.
you can try with this:
<record id="purchase.purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="arch" type="xml">
<form string="Purchase Order">
<header>
</header>
</form>
</field>
</record>
don`t forget add depends for purchase at manifest.py
maybe this can help you
I'm trying to hide the edit and more button in user form if the connected user is not the admin.
Here is my code
<xpath expr='//form[#string="Users"]' position='attributes'>
<attribute name="edit" >{'false':[('id', '!=', '1')]}</attribute>
<attribute name="more">{'false':[('id', '!=', '1')]}</attribute>
</xpath>
i get the following error:
SyntaxError: JSON.parse: expected property name or '}' at line 1 column 2 of the JSON data
Unfortunately, what you trying achive is not possible using expression, rather I would advise to user "Customized Views"
Make out of user form edit="false" this will make edit button go away for all users (res.users.form).
Now go to Customized Views under Settings/Technical/User Interface/Customized Views, you need to be in debug mode to be able to see this menu.
Under Customized Views create a new record and choose User : Admin and in original view choose : res.users.form and in View Architecture
copy and pare original view View Architecture and just remove edit='false'
This should help, I believe.
Bests
Expanding #shodowsjedi's answer, To achieve what you want you have to create two views (They're essentially the same just that one is attached to a specific group and will be displayed for a user that belongs to that group)
This is a mockup of how your xml file should look
<!--original form view-->
<record id="model_form_view" model="ir.ui.view">
<field name="name">your.model</field>
<field name="model">your.model</field>
<field name="arch" type="xml">
<form string="Users">
<!--whatever is in your form -->
</field>
</record>
<!--inherited formview to hide edit option -->
<record id="model_form_view_noedit" model="ir.ui.view">
<field name="name">your.model</field>
<field name="model">your.model</field>
<field name="inherit_id" ref="model_form_view"/>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user') ])]"/>
<field name="arch" type="xml">
<xpath expr='//form[#string="Users"]' position='attributes'>
<attribute name="edit">false</attribute>
</xpath>
</field>
</record>
It's always better to know how things work from the backend in Odoo
I am using Lucene.NET with Sitecore for searching. I have created a custom Lucene index. Normally it is a one-to-one mapping between Sitecore fields and Lucene index fields. I would like to be able to take 2 fields and combine them in the Lucene index. Below is an example of my custom index definition. You will see a field called Activity and a field called Board. Then below it is an example of what I am trying to do - combine Activity and Board in to one field in the index. I just am not sure if this is possible and if so, what the syntax is for defining a combined field like this. Any ideas?
<index id="reportsIndex" singleInstance="true" type="IOM.library.CustomIndexer, IOM">
<param desc="name">$(id)</param>
<template hint="list:AddTemplate">
<template>{79EBE484-BAD6-4173-B80A-29AC7D734565}</template>
</template>
<fields hint="raw:AddField">
<field target="Title">Title</field>
<field target="SortTitle" storage="keyword">Title</field>
<field target="ShortDescription">ShortDescription</field>
<field target="FullDescription">FullDescription</field>
<field target="Topic">Topic</field>
<field target="Type">Type</field>
<field target="ReleaseDate">ReleaseDate</field>
<field target="Series">Series</field>
<field target="Activity">Activity</field>
<field target="Board">Board</field>
<field target="MyCombinedField">??Activity, Board??</field>
</fields>
</index>
UPDATE: I tried to do what people have suggested and map 2 different Sitecore fields to the same Lucene field. However that doesn't seem to work. I tried the following:
<index id="reportsIndex" singleInstance="true" type="IOM.library.CustomIndexer, IOM">
<param desc="name">$(id)</param>
<template hint="list:AddTemplate">
<template>{79EBE484-BAD6-4173-B80A-29AC7D734565}</template>
</template>
<fields hint="raw:AddField">
<field target="Title">Title</field>
<field target="Activity">Activity</field>
<field target="Board">Board</field>
<field target="MyCombinedField">Activity</field>
<field target="MyCombinedField">Board</field>
</fields>
</index>
When I look in IndexViewer this is what I see. If the content item has content for the Activity field then that will get populated in the "MyCombinedField" (since it is first). If the Activity field has no content then Lucene will populate the "MyCombinedField" with the Board content. But it never puts both field's content in to the MyCombinedField field. Am I doing something wrong?
You must be using the old data indexes. Are you running pre Sitecore 6.5? You might consider rewriting your code to use Sitecore.Search.
Anyway you can index multiple Sitecore Fields in the same Lucene field by something similar to this:
<index id="system" singleInstance="true" type="Sitecore.Data.Indexing.Index, Sitecore.Kernel">
<param desc="name">$(id)</param>
<fields hint="raw:AddField">
<field target="name">#name</field>
<field target="name">__created</field>
<field target="name">#tid</field>
In this case both the name of the item, the created date field and the template id is indexed in the same field.
So in short: Just create multiple field elements with the same target attribute
I'm creating a custom list definition in Visual Studio for SharePoint 2010. In the list definition elements file, I've provided some default values for the list instance as below:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="News"
OnQuickLaunch="FALSE"
TemplateType="10000"
Url="Lists/News"
Description="Contains news articles related to happenings at Corporate.">
<Data>
<Rows>
<Row>
<!-- Default list data -->
<Field Name="Photo">http://myserver/sites/foobar/Style%20Library/Images/Custom/myimage.png</Field>
<Field Name="Title">My Title</Field>
<Field Name="Body">My article.</Field>
<Field Name="Modified">12-21-2012</Field>
<Field Name="Author">99;#mydomain\bsmith</Field>
<Field Name="Expires">01-22-2013</Field>
</Row>
</Rows>
</Data>
The default list is successfully created with the values above, except that the Photo and Author columns are displaying as blank. Any ideas on how I can populate those columns correctly? I know the photo URL is valid as I can browse to it. And another posting pointed me to the "99;#" prefix for the author column--without the prefix, every column in the list displays as blank.
Also, here are the list schema fields, if it matters:
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc17}"
Name="Photo" ShowInNewForm="TRUE" ShowInEditForm="TRUE"
Type="Image" DisplayName="Photo"
Required="TRUE"></Field>
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc11}"
Name="Title"
Type="Text" DisplayName="Title"
Required="TRUE"></Field>
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc16}"
Name="Body"
Type="Note" DisplayName="Body"
Required="TRUE" NumLines="100"></Field>
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc13}"
Name="Modified"
Type="DateTime" DisplayName="Modified"
Required="TRUE"></Field>
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc14}"
Name="Author"
Type="Text" DisplayName="Author"
Required="FALSE"></Field>
<Field ID="{d3a92d97-2b77-4a25-9698-3ab54874bc15}"
Name="Expires"
Type="DateTime" DisplayName="Expires"
Required="FALSE"></Field>
Try provisioning your field data like this in your list instance.
<Field Name="Photo"><![CDATA[<IMG SRC="/sites/foobar/Style%20Library/Images/Custom/myimage.png"></IMG>]]></Field>
We're testing G-Reg for use of a SOA repository. The default types are Services, WSDL's, Schemas and WS Policies, we're triying to add a new type (Persons for example).
Once added, we want to create a xml to specify the fields that needs to be filled to upload a new resource of the "Persons" type, (like the Services type actual funcionality).
We've followed the guide on http://docs.wso2.org/wiki/display/Governance411/Configurable+Governance+Artifacts, but with no success of creating the example named "Events", because there exists contradictory information, the path "/_system/governance/repository/components/org.wso2.carbon.governance/types", doesn't exists on GREG 4.1.1, so where is supposed the content to be uploaded?
And, the guide explains about a "registry extension file" and a "content", which is the difference between them?, they need a name?, content.xml and extfile.xml perhaps?
Any orientation will be greatly appreciated
Thanks,
Gabriel.
Here is a sample server.rxt file I have created.
<artifactType type="application/vnd.wso2-server+xml" shortName="server" singularLabel="Server" pluralLabel="Servers" hasNamespace="false" iconSet="5">
<storagePath>/servers/#{overview_name}/</storagePath>
<ui>
<list>
<column name="Name">
<data type="path" value="overview_name" href="#{storagePath}"/>
</column>
</list>
</ui>
<content>
<table name="Overview">
<field type="text" required="true">
<name label="name">Name</name>
</field>
<field type="text" required="true">
<name label="url">url</name>
</field>
<field type="text" required="true">
<name label="username">username</name>
</field>
<field type="text" required="true">
<name label="password">password</name>
</field>
</table>
</content>
</artifactType>
you need to save this under the directory you have mentioned.
/_system/governance/repository/components/org.wso2.carbon.governance/types
this location is not exits. But you need to create this directory and save.
After restart you should see the new type under meta data list