how to add an image icon to my openerp custom module - odoo

Hi I have made a custom module for my openerp-7 . Now I need to include an image icon as the other modules but I am lacking the setting to do this . What changes should I have to made to have this icon view available.
Hopes for suggesstion
Regards

save your icon as 'icon.png' and place it under your_module_directory/static/src/img
for example check account_voucher module. Its icon images path is in account_voucher/static/src/img/icon.png
Openerp will automatically selects the icon from the static/src/img path

for creating an icon to the custom module you have to override your default icon that exists in the base module
base/static/description/icon.png.
write your icon in the description folder.
your project name /static/description/icon.png.
I think this will help you to change the icon.

Related

Odoo - how to hide conversations icon in menu bar

I'm customizing odoo community v14 
We don't use the discuss module but it was installed by other modules we use, so I've removed the 'Discuss' menu item, but I can't find how to remove the conversions icon just at the left of were the the activity  icon  and  user name is shown.
I found a response for a similar question in odoo forum but I couldn't find the code of this icon in addons/mail/static/src/xml/systray.xml only the code of activity icon is present
I searched for some parts of the html code in entire odoo source code but with no result
Any help please?
I did it using css by adding li.o_MessagingMenu{display: none !important;} to addons/web/static/src/scss/navbar.scss

Image slider link to internal or external page on Sitefinity

(Sitefinity 6.x)
I am trying to create an image slider where each image in the page links to an internal or external page. I created a separate library for all the images that I want to show on the slider then using custom MVC widget I display the images in a slider.The problem that I have is there is no place in the image where I can link the image to open an existing internal page or external website.
Is there a way to add a properties to the original Image properties? so that users can select a page (using some sort of page selector just like in the navigation widget) or type in external page to link. If that is not possible, could you give me some ideas how to implement this?
I've been creating image rotators using Module Builder in Sitefinity. What you could do is go to Administration -> Module Builder -> Create a Module, call it Image Slider, call the content type Slide. Add a couple fields, for the first call it Image and select Media for the type, this will use an image selector for the interface, then add another field called Link and use Short text for the type, this will hold the url. Unfortunately, Sitefinity doesn't include a Page Selector control as an available field yet so a text field will have to do. Save and activate your module, it will show up under Content -> Types of Content. Go ahead and add a few slides. Sitefinity has created a couple of widgets when you created the module, so if you edit a page, you'll see them under the "Content" widget section, probably at the bottom. Drag it on the page and set it to use the list template. Now open up the Sitefinity Explorer window in their Thunder Visual Studio plugin, under Common Widget Templates, you'll see an Image Slider folder, you'll want to edit the list template since you'll be outputing all the slides into some carousel markup or something. From here you can use the default Sitefinity image control and bind the link to a hyperlink that wraps the image control, this will link each image to whatever is in that field.
Hope that helps.

Sugarcrm : modify actions on Dashlet quickEdit button

I have a very specific question on Sugarcrm.
I'm using version Enterprise 6.5.16, and i'm coming to a dead-end.
What i currently have :
When the user is on his homepage, he has a Dashlet called "My open Cases", which displays every open Cases assigned to/or created by him.
For each row of this dashlet, we have a quickEdit icon displayed. (you know, the little pen).
When the user clicks on that little icon, it opens the quickcreate (or quickedit?) popup.
What i want to achieve is :
I want, when the user clicks on the icon, that Sugar does not open a popup, but opens a new browser tab on EditView.
So basically, when on Home, when the user wants to edit "Case01--Issue" from the dashlet, instead of poping the quickcreate (or quickedit) form, i want to open a new browser tab with the complete edit view of "Case01 -- Issue".
What do i have to do? I did not see the definition of the icon in custom/modules/Cases/metadata/dashletviewdefs.php nor elsewhere.
Thanks by advance for your help and time!
Gaëlle
The "My Cases" dashlet, and most dashlets, extend the DashletGeneric class, found in /include/Dashlets/DashletGeneric.php. This uses the template file DashletGenericDisplay.tpl in the same directory, and this is the template that displays the quick edit button.
To remove or alter the quick edit button, you would extend My Cases and insist that it use a custom smarty template of your own creation. In /custom/modules/Cases/Dashlets/CustomMyCasesDashlet/CustomMyCasesDashlet.php you might have the following:
<?php
require_once('modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.php');
class CustomMyCasesDashlet extends MyCasesDashlet{
$displayTpl = 'custom/modules/Cases/Dashlets/CustomMyCasesDashlet/CustomMyCasesDashlet.tpl';
}
You would then copy the original template to the new file and location referenced by CustomMyCasesDashlet::displayTpl and adjust as desired.
For your Dashlet to register correctly with the system, you'll also need your CustomMyCasesDashlet.meta.php file. Copy the original to your custom directory and adjust labels as necessary -- the key is to replace references to MyCasesDashlet with CustomMyCasesDashlet.
You should create your own dashlet (with copying existing one in "custom" folder), replace all standart entries to your own. Add copy of DashletGenericDisplay.tpl too and name it like CustomMyCasesDashlet.tpl.
It's not necessary to extend MyCasesDashlet class. You can leave "extends DashletGeneric".
In constructor function CustomMyCasesDashlet() just add the line:
$this->displayTpl = 'custom/modules/Cases/Dashlets/CustomMyCasesDashlet/CustomMyCasesDashlet.tpl';
Pay attention to $this->. Its necessary to override DashletGeneric field.
Copy the file from modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet.php and paste it to custom/modules/Cases/Dashlets/MyCasesDashlet/MyCasesDashlet
If you don't have Cases folder inside the custom directory, create one.
After copying the file, add a property to load your custom TPL file.
Default DashletGenericDisplay.tpl file located at include/Dashlets/
class MyCasesDashlet extends DashletGeneric {
var $displayTpl = "custom/modules/Cases/Dashlets/DashletGenericDisplay.tpl";

Ektron PageBuilder - define default name for custom widget

I'm hoping this is a simple question. I have a custom widget. Let's say it is "SuperAwesomeWidget.ascx". When I'm editing a PageBuilder wireframe, I can see my widget in the little pulldown widget tray at the top of the screen. Thing is, the name under my icon is "SuperAwesomeWidget".
Now, I know that I can go to the widgets settings in the WorkArea and define a custom name, but what if I want Ektron to just "know" what the name should be? I'm hoping there is some config file somewhere that I can add my widget name to. I'd like to be able to drop this widget along with maybe a config file or something into a second Ektron install and not need to define the name via the workarea.
For anyone in the future googling this issue, there is a better answer than my previous one, particularly better than a workarea modification.
To update the display title of a widget in the widget bar:
Go to Workarea > Settings > Configuration > Personalization > Widgets
Find your widget in this list and click the edit icon to the left of its name
Modify the display title in the second text field in the modal that pops up.
Confirmed working in 8.6.1, likely works in all 8+ versions.
Edit: While this answer is still partially correct, I have discovered the actual way to do this. The correction has been marked as the accepted answer.
Set your IWidgethost's title property:
IWidgetHost _host;
...
_host.Title = "Hello World Widget";
From the esteemed eGandalf's tutorial on widget development:
http://www.ektron.com/Blogs/eGandalf/Break-it-down!-Widget-Development-How-To-(Part-1)/

Add custom bg color and logo option for a div in header from admin panel theme options - wp twenty eleven theme

I'm new to wordpress.. I have created a custom theme with files of twenty eleven theme in wordpress. But I'm not able to add custom background option and custom logo option. I'm trying to implement it in theme options page. I want to add a custom background color to a div in header section and also a logo in header.
Please give any suggestions for me to complete this theme creation.
Please give some idea about how to add new fields in theme options page and how to display it in pages..
I also want to add some custom text field for displaying address or some lines of text which can be updated from theme options.
Thanks in advance.
try wp codex (https://codex.wordpress.org/Theme_Customization_API), it'll help you with setting up the default wp customizer.
I personally use both the default customiser and the OptionTree plugin (http://wordpress.org/extend/plugins/option-tree/), the plugin is really easy to implement, I'd suggest you start with that.