ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Yong (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
Date Thu, 02 Apr 2020 09:19:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073544#comment-17073544
] 

James Yong commented on OFBIZ-11431:
------------------------------------

Hi [~hansbak],
{quote}isn't this uomId field not meant to tell more about the quantity? it is possible to
add a non-product item and then this field can be used to indicate if per piece, per kilo,
per gallon etc....
{quote}
As the *uomId* field is populated with currency info in the demo data and the field name is
generic, we can deprecate *uomId* field and add *quantityUomId* field to *InvoiceItem* entity.

We can create a file like
 datamodel/entitydef/deprecated-entitymodel.xml
 and add deprecated field i.e.
{code:xml}
<extend-entity entity-name="InvoiceItem">
        <field name="uomId" type="id"></field>
        <relation type="one" fk-name="INVCE_ITM_UOM" rel-entity-name="Uom">
            <key-map field-name="uomId"/>
        </relation>
    </extend-entity>
{code}
Users can have the option of not loading deprecated-entitymodel.xml by commenting it out from
ofbiz-component.xml

> InvoiceItem: uomID is wrongly defined
> -------------------------------------
>
>                 Key: OFBIZ-11431
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11431
>             Project: OFBiz
>          Issue Type: Bug
>          Components: datamodel
>    Affects Versions: Trunk
>            Reporter: Pierre Smits
>            Priority: Critical
>              Labels: refactoring
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently the InvoiceItem entity has the field uomId, per:
> {code:java}
>       <field name="uomId" type="id"></field>
> {code}
> per the demo data this field is used to capture the currency of the invoice item. This
is, however, wrong. The currency for invoice items is set in the invoice entity record (with
field currencyUomId. 
> The uomId in the invoice item is related to the quantity set, and must be correctly named:
'quantityUomId.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message