My co-worker overrode the Order Product's (OrderItem) Add Products related list button on the Order with a Visualforce page. He did this in the web UI without any issue. The Visualforce page is an Order standard controller with a controller extension. The UI lets him select this as the override even though the button definition is on the OrderItem. In fact, only VF pages with Order standard controllers can be selected.
Problem
The issue is that the metadata changes for an OrderItem Add Products button override are not able to be deployed to other environments and instead an error is generated. "addProduts does not exist or is not a valid override for action AddProduct."
The metadata in the OrderItem.object file is:
<actionOverrides>
<actionName>AddProduct</actionName>
<content>addProducts</content>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Visualforce</type>
</actionOverrides>
The VF Page has:
<apex:page showHeader="true" sidebar="true" standardController="Order" extensions="AddProductsControllerExt">
The package.xml does have the VF page. In fact, it already exists in the target org and isn't even being modified.
Am I missing something? I have lots of other button overrides with no issue. My suspicion is that, if I'm doing everything correctly, the cause is that the metadata API is incorrectly trying to validate that the VF override for the OrderItem's AddProduct is a page with an OrderItem standard controller, when for this particular button only Order standard controller's are allowed. Or, the UI is invalid and VF pages with OrderItem standard controllers should be allowed to be selected for the Add Products override and my co-worker never should have been able to select it.
Question
Is this an issue others are seeing? How can I deploy a VF override of the OrderItem's Add Products button using either ant or Mavens Mate save (metadata api). The way I'm deploying is the compile project with MM which deploys all components. I can see they are all deployed in the Monitor Deployments' Deployment instance detail in the Web UI.