can I edit the top right menu Odoo v8?
I want to remove "My Account odoo.com", "Help" and edit "about Odoo"
I used a module "Stop Phoning Home Feature from OpenERP" that does this, but it does not work with Odoo 8 : https://bitbucket.org/BizzAppDev/oerp_no_phoning_home
thank you
When I install "Stop Phoning Home Feature from OpenERP" used the module "Import module" : it doesn't work
But when I put the contents of the archive (the zip file) in the addons directory Odoo, Update the list of modules and then install the module "stop phoning" : that Works
Hello RAFMAN,
If you want to remove the menu-item of the top right corner main menu of the odoo so following step apply,
Extend the the BASE template of UserMenu.
In this two case posible,
2.1 If you want to remove base menu item so Replace base template and add your menu-item.
2.2 If you want to add the new menu item in existing base menu so give postion inner.
your question of answer for try below code,
2.1 The first thing it does is defining a qweb template to replace the UserMenu definition:
- First i create one file like inherit_base.xml and this file put on the static/src/xml/inherit_base.xml and this file also add in the 'qweb' section of your __openerp__.py file.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
<t t-extend="UserMenu" >
<t t-jquery="ul.dropdown-menu" t-operation="replace">
<li>Your Menu Name</li>
....
</t>
</t>
</templates>
Or If you want to remove any particular menu-item so use
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
<t t-extend="UserMenu" >
<!-- Remove My Odoo.com account Menu Item -->
<t t-jquery="UserMenu.account" t-operation="replace"></t>
<!-- Remove About Odoo Menu Item -->
<t t-jquery="UserMenu.about" t-operation="replace"></t>
<!-- Remove Help Menu Item -->
<t t-jquery="UserMenu.help" t-operation="replace"></t>
</t>
</templates>
2.2 Same as above but some diffrence, In tis case add the new menu-item in existing menu and also add the action of this new menu-item using js other wise click on new menu-item so not any action performed. So add the action anyone.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
<t t-extend="UserMenu" >
<t t-jquery="ul.dropdown-menu" t-operation="inner">
<li>Your Menu Name</li>
....
</t>
</t>
</templates>
Related
I added new configuration settings to my Liferay theme inside the file liferay-look-and-feel.xml
<setting configurable="true" key="show-navigation" type="checkbox" value="true" />
In the control panel I can see the setting with show-navigation label.
I want to translate it to Show the Main Navigation using Language.properties inside the theme.
Then to accomplish this in my theme I added this files (theme\docroot\WEB-INF\src\content):
Language.properties
Language_en.properties
Language_fr.properties
Which each file contains the translation as so:
show-navigation=Show the Main Navigation
then in theme\docroot\WEB-INF\ I added liferay-hook.xml
<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook>
<portal-properties>portal.properties</portal-properties>
<language-properties>content/Language*.properties</language-properties>
</hook>
But it doesn't work. If I perform the same procedure for a portlet it works.
Why?
It's the name: You don't use content/Language*.properties, but just content/Language.properties. Otherwise I believe you're on the correct way to solve the problem, it's just this little detail
How can I add a custom portlet to the Portal section of the Control Panel, as shown in the following figure:
Here is how to do it:
In your portlet's liferay-portlet.xml (you can check the DTD of this xml for more information on other tags) include two tags in your <portlet> tag as shown:
<portlet>
<portlet-name>MyCustomPortlet</portlet-name>
<icon>/mycustom.png</icon>
<!--
These are the two entries which are required for the portlet
to appear in the control panel
-->
<!--
Set the control-panel-entry-category value to "my", "content",
"portal" or "server" to make this portlet available in the
Control Panel under that category.
-->
<control-panel-entry-category>portal</control-panel-entry-category>
<!--
Set the control-panel-entry-weight value to a double number
to control the position of the entry within its Control Panel
category. Higher values mean that the entry will appear lower
in the Control Panel menu.
-->
<control-panel-entry-weight>100</control-panel-entry-weight>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>mycustomportlet-portlet</css-class-wrapper>
</portlet>
Also, if you don't want your portlet to appear in the Add Menu so that it is not put on other pages, then in your liferay-display.xml you can include:
<display>
<category name="category.hidden">
<!--
Adding your portlet to the hidden category would not display
the portlet in the ADD Menu on the top-left-hand corner
-->
<portlet id="MyCustomPortlet"></portlet>
</category>
</display>
Build and deploy your portlet and you are good to go.
Apart from the Answer by Prakash K, ajaxable and instanciable should be false.
I would like to add styling to the body tag, currently I end up with this code:
<body class="xspView tundra">
<div style="margin: 0px">
but I would like to achieve this:
<body class="xspView tundra" style="margin: 0px">
Is this possible without removing existing functionality (i.e. without removing dojo and default xpages functionality)?
Yes you can,
if you have for example one xpage called 'home'. You can add your style definitions to the tag in the xpage. For instance:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" styleClass="ddd" style="margin: 20px;">
// your content goes here
</xp:view>
If you have a multiple xpage design and you dont want to add these lines of code to every xpage you could use Themes to automaticaly add the styles to the body tag:
<control override="false">
<name>ViewRoot</name>
<property mode="concat">
<name>styleClass</name>
<value>xspView tundra</value>
</property>
<property mode="concat">
<name>style</name>
<value>margin: 20px</value>
</property>
</control>
You don't have to use a theme to add a style to the XPages body tag. You can do it right on the Page itself under the style property. The source looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
styleClass="myBodyStyle">
</xp:view>
Which renders to the browser as:
<body class="myBodyStyle">
Add a css file that has a BODY entry. Put your margin there. Add the css to a theme if u want to use it globally
Why don't you do it in a css file? Include this:
body {
margin: 0px;
}
Just like any HTML styling...
Or, maybe I don't exactly understand what do you mean...
I am having four external list "List1", "List2", "List3", "List4". I have added a custom ribbon button Like:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="ATEAgWorkOrderButton"
RegistrationType="List"
RegistrationId="600"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.ListItem.Actions.Controls._children">
<Button
Id="Ribbon.ListItem.Actions.ATEAgWorkOrderButton"
Alt="Click on this button to Add"
Sequence="3"
Image32by32="/_layouts/Images/Project/image.png"
Command="ATEAg_WorkOrder"
LabelText="Add Detail"
TemplateAlias="o2"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="ATEAg_WorkOrder"
CommandAction="javascript:alert("Hello Success");" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
The button is now visible in all the external lists. But I want to make it visible for only "List1" and "List2". How to do this?
You need to explore the Andrew Connell's Ribbon Customization Deep Dive.
http://www.andrewconnell.com/blog/archive/2011/04/16/sharepoint-2010-ribbon-customization-deep-dive.aspx
He goes into how to solve these problems. In short instead of binding a customization for all lists of a certain type, you can register a javascript function that gets called to determine if you button should be shown or hidden. In this function you can determine which list is currently active.
If all your lists are associated with a ContentType, you can set the registration id of the custom action to the ContentType id.
From MSDN:
RegistrationID: Optional Text. Specifies the identifier of the list or
item content type that this action is associated with, or the file
type or programmatic identifier (ProgID).
I was wondering if someone could help me out with Sharepoint 2007. What I want to do is to add a custom menu item to a context menu (the menu that opens when you click a document or another item).
Right now, the menu looks like this:
picture
I want to add an item, "Do stuff" for example, to this menu. Major problems:
I wish this item to appear only in menus for a certain file type (e.g. only for .html but not for .doc);
When I click this item ("Do stuff"), I want to call custom external code (written in C#, either an exe or a DLL), which accepts the name of the clicked file as an input parameter.
I understand the way to achieve this is by using Custom Actions (no javascript editing required in 2007, right?). But since I'm quite new to MOSS, I'm a bit lost and not sure what exactly to do and where to start, so any help is greatly appreciated.
You have to implement a CustomAction like this:
<CustomAction
Id="YourUniqueId"
Location="EditControlBlock"
RegistrationType="FileType"
RegistrationId="html"
Sequence="20"
Title="The text you want">
<UrlAction Url="~site/_layouts/company/ActionPage.aspx?List={ListId}&ID={ItemId}" />
</CustomAction>
What you put in the Url of UrlAction depends on what you want to do. It can be JavaScript or the url of a Page or Handler.
In my example it's a Page which gets the QueryParameters so that SPContext.Current.ListItem will contain the selected documents listitem.
<?xml version="1.0" encoding="utf-8"?>
<Elements Id="d0574a32-59ce-4561-9496-ccf17da37a35" xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="Test2"
Location="EditControlBlock"
RegistrationType="FileType"
//docx = documents, txt = text files, html = html files**
RegistrationId="docx" Sequence="10"
Title="View Item Properties">
<UrlAction Url="~site/_layouts/WSSHOL/ViewPageRedirect.aspx?listid={ListId}&itemid={ItemId}" />
</CustomAction>
</Elements>