remove create button in kanban view partner view - odoo 9 - odoo-9

I need to remove the create button in kanban view which found in "Sales/Customers" as in below image

In your kanban declaration add create="false" just like you see below.
<kanban create="false">
You can just go into settings->user interface->views and edit this directly. You also may be able to activate developer mode by clicking on your username (in the top right of the screen v8 or he little question mark v9+) and select About Odoo then activate developer mode. From there you should also be able to edit the form view (if you have admin authority).
You can also create an addon which modifies this view using xpath. Similar to this.
<record model="ir.ui.view" id="modified_partner_form_view">
<field name="name">partner.modified</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="attributes">
<attribute name="create">false</attribute>
</xpath>
</field>
</record>
Note: setting create to false should work however using the webconsole did not allow me to add the attribute to the kanban tag. I am not sure why, it should work but in my installation would not. The xpath method should work, I have used it to modify other attributes however have not tested with this kanban create attribute. If someone knows why this might not work please comment. Thanks

Related

Url format for App Store and Google Play to install app with deep link

Prerequesits:
I've already implemented deep linking and universal linking, everything works great.
Here is what I need:
I'm sharing with you a url that looks like that:
https://play.google.com/store/apps/details?id=com.foo.bar&invite=asdf
You open this link on your Android device, navigate to the Google Play listing. Tapping "Install".
Now, I want the app to do the same thing, like if i would open installed app with this link
myfoobar://?invite=asdf
I also need the same for App Store.
Could you show me how do I format App Store/ Google Play url to achieve this?
I think this should fulfill your needs: https://firebase.google.com/docs/dynamic-links.
It also goes further and honors the initial deep link after the app is installed.
What I did in a previous app is to catch custom URIs, start a specific router activity which will redirect to the right URL depending on the caught URI.
Code is note the most important, you need to understand the idea.
You can't directly setup a magic logic that will allows you to link a custom URI to a custom URL. What you CAN do, is to make your app react to a specific/custom URI (myfoobar://) that will launch a specific and dedicated activity / view controller that will itself redirect to the URL of your choice.
For instance, on Android side:
<activity
android:name="com.example.android.RouterActivity"
android:label="#string/title_gizmos" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://gizmosā€ -->
<data android:scheme="myfoobar"
android:host="whatever" />
</intent-filter>
</activity>
And then, in your RouterActivity, launch your URL.
More information here
On iOS side, same idea, but instead you need to register your custom URI in your info.plist.
More information here and also here.
I hope it helped you. That is how I did in previous apps and it works like a charm.

Add element to Hub header

the hub design is builded in MSN's app, like sport, new, weather.
I want to use that, too.
I study textbook and found that tutorial.
but that only teach add header to hub
<Hub Header="this header"> </Hub>
not include element
in msn app, it has search icon in header.
How to do that?
Hub class has a content presenter in itself and can present HubSection which you can find detailed MSDN page by clicking here
I don't know which MSN app you are mentioning , but if you want to search icon in your Headers you must modify HeaderTemplate to achieve that.
<Hub Header="Text Your Header">
<Hub.HeaderTemplate>
<DataTemplate>
<!-- Put you element here -->
<!-- Below is example -->
<ListBox>
<ListBoxItem>No.1 </ListBoxItem>
<ListBoxItem>No.2 </ListBoxItem>
</ListBox>
</DataTemplate>
</Hub.HeaderTemplate>
</Hub>

How to override the event handlers of built-in controls and its visibility in VSTO Outlook addin 2010

I have created a custom group with a toggle button in built-in 'TabAppointment' tab, where clicking on the button will open a new winform.
Only after proceeding with that form, 'Save&Close' button should be enabled in the appointment screen.
But iam not able to disbale the built-in controls, i have tried as like below
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<ribbon>
<tabs>
<tab idMso="TabAppointment">
<group idMso ="GroupActions">
<button idMso="SaveAndClose" getEnabled="GetEnabled"/>
</group>
<group id="GroupRBS" insertBeforeMso="GroupActions" label="RBS">
<toggleButton id="btnBookRoom" label ="Add Room" supertip ="Room booking option for an appointment" imageMso="AddRoom" onAction="CallRBS" size="large" getEnabled="GetEnabled" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I have created 'GetEnabled' callback method in ribbon class, but it is firing only for custom group controls, cant we override builtin control attributes?
Iam able to hide builtin groups, but not able to hide a particular builtin control inside the builtin group, is there any way to do this?
Pls help me for getting ny solution
Unfortunately, you can not change the Enabled state on built-in ribbon buttons. Only on the Custom ribbon buttons you add yourself.
But there are a couple solutions you could try:
Display your WinForm dialog modally to ensure the user has to complete it before they can carry on
Handle the Microsoft.Office.Interop.Outlook.AppointmentItemClass.Write event. The ItemEvents_10_WriteEventHandler has a ref Cancel parameter which you can set to true to stop the Appointment being saved.
((ItemEvents_10_Event)appointmentItem).Write += AppointmentItem_Write;

"Advanced Options" module fieldset in Joomla 2.5 and 3.x

In my module's xml file, I have a fieldset for ADVANCED OPTIONS like this:
<fieldset name="advanced">
<field .... />
<field .... />
<field .... />
</fieldset>
In Joomla 2.5, the ADVANCED OPTIONS of my module correctly shows all the fields as described in the xml.
However in Joomla 3.x, the ADVANCED OPTIONS shows all the fields from the xml file plus some extra options. Even if I totally remove this fieldset, it still shows the ADVANCED OPTIONS with some default fields.
How do I make sure both Joomla 2.5 and 3.x have the same ADVANCED OPTIONS?

Specify Category specific layout updates without using Magento's administration dashboard

Is there a way to specify a layout update for a specific category (e.g. using category ID) without having to use the administration dashboard, and setting a [Custom Design > Custom Layout Update].
I am sure I can create a module that looks for a category ID and switches the layout based upon that, but I was curious if there was a naming or some other type of convention for layout files that allows for this type of granular control since Zend Framwork sometimes allows such naming conventions.
Also maybe within the catalog.xml file itself there are additional "layouts" that allow such granularity, something more specific than <catalog_category_layered />
In a standard Magento install (1.4.2, but it should apply to the rest), Magento issues the following Layout handles (handles tell Magento which Layout Update XML Fragments to load from the Package Layout)
<default />
<catalog_category_layered_nochildren />
<STORE_default />
<THEME_frontend_default_default />
<catalog_category_view />
<catalog_category_layered />
<CATEGORY_4 />
<customer_logged_out />
The following layout handle
<CATEGORY_4 />
is generated based on the ID for a category. This means you should be able to add something like the following to your local.xml, or to a custom layout XML file added via a custom module
<layouts>
<CATEGORY_4>
<!-- your UPDATE xml here -->
</CATEGORY_4>
</layouts>
When visiting a catalog category, Magento loads a handle for CATEGORY_${ID}, which you can use to do exactly what you are asking.

Resources