[
https://issues.apache.org/jira/browse/OFBIZ-10015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302354#comment-16302354 ]
Michael Brohl commented on OFBIZ-10015:
---------------------------------------
The service definition overrides the auto-attributes to set the inventoryItemLabelType as a mandatory field, whereas the entity definition allows the inventoryItemLabelType to be null.
{code:xml}
<service name="createInventoryItemLabel" default-entity-name="InventoryItemLabel" engine="entity-auto" invoke="create" auth="true">
<description>Create an InventoryItemLabel</description>
<permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="inventoryItemLabelTypeId" optional="false"/>
</service>
{code}
I think we can remove the override in the service definition.
Another solution would be to have at least one default inventoryItemLabelType entry in the database/load data.
I would be in favor of the first solution, if there are no objections.
> Unable to create inventory item label
> -------------------------------------
>
> Key: OFBIZ-10015
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10015> Project: OFBiz
> Issue Type: Bug
> Reporter: Priya Sharma
> Assignee: Michael Brohl
> Fix For: Trunk
>
> Attachments: Screenshot from 2017-11-25 15-03-57.png
>
>
> 1) Navigate to [
https://demo-trunk.ofbiz.apache.org/facility/control/createInventoryItemLabel]
> 2) Try to create a new record.
> 3) No value is shown in the drop-down for the inventory item label type field.
> thus an exception is thrown by the service.
> Info: There is no data in the InventoryItemLabelType entity, I believe that is the cause of this issue.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)