Posted by
David E Jones-2 on
URL: http://ofbiz.116.s1.nabble.com/Proposed-change-to-the-InventoryItem-entity-tp175562p175563.html
Jacopo,
I'm okay with the idea, but there may actually be cases where people
don't want to track such information or the information is implied
for how they use the system. In other words it isn't core information
for the entity, even though it is necessary for certain services to
do what they need to.
The way I look at it is that being able to leave out data makes the
system more flexible, unless that data is a core part of how the
entity is structured or something.
On the other side it denotes that the fields are important and people
getting started with OFBiz may have a better experience if they make
sure this data is in there.
Still, code relying on this data should behave reasonably (with an
error) when the data is missing. Just like the seed data didn't have
this by default, systems being upgraded commonly won't have it in
place either. As with most things it's fine if services that require
the data blow up, as long as everything else works okay.
So, I don't know... some feedback from people who might be affected
by this or who have run into such problems would be helpful...
-David
On Dec 17, 2006, at 6:30 AM, Jacopo Cappellato wrote:
> What about defining the following InventoryItem fields as id-ne
> instead of id (see attached patch)?
>
> currencyUomId
> ownerPartyId
> facilityId
>
> The "createInventoryItem" service already performs the checks and
> returns an error if it the values are not passed in and there is
> not a way to provide default values for them... so it is just to
> enforce an existing rule.
>
> Jacopo
> Index: applications/product/entitydef/entitymodel.xml
> ===================================================================
> --- applications/product/entitydef/entitymodel.xml (revision 487955)
> +++ applications/product/entitydef/entitymodel.xml (working copy)
> @@ -1009,11 +1009,11 @@
> <field name="inventoryItemTypeId" type="id"></field>
> <field name="productId" type="id"></field>
> <field name="partyId" type="id"></field>
> - <field name="ownerPartyId" type="id"><description>The owner
> of the inventory item.</description></field>
> + <field name="ownerPartyId" type="id-ne"><description>The
> owner of the inventory item.</description></field>
> <field name="statusId" type="id"></field>
> <field name="datetimeReceived" type="date-time"></field>
> <field name="expireDate" type="date-time"></field>
> - <field name="facilityId" type="id"></field>
> + <field name="facilityId" type="id-ne"></field>
> <field name="containerId" type="id"></field>
> <field name="lotId" type="id"></field>
> <field name="uomId" type="id"></field>
> @@ -1026,7 +1026,7 @@
> <field name="oldAvailableToPromise" col-
> name="AVAILABLE_TO_PROMISE" type="floating-point"></field>
> <field name="serialNumber" type="value"></field>
> <field name="unitCost" type="floating-
> point"><description>Higher precision in case it is a calculated
> number</description></field>
> - <field name="currencyUomId" type="id"><description>The
> currency Uom of the unit cost.</description></field>
> + <field name="currencyUomId" type="id-ne"><description>The
> currency Uom of the unit cost.</description></field>
> <prim-key field="inventoryItemId"/>
> <relation type="one" fk-name="INV_ITEM_TYPE" rel-entity-
> name="InventoryItemType">
> <key-map field-name="inventoryItemTypeId"/>