Product description

Hi, since we updated to 1.7, we have not been able to edit the product description (which we use to document things like which blood tubes the lab needs for particular samples, etc).  Is this still possible with 1.7?

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Product description

Winston - what has happened is that in 1.7 (or 1.6) you made a change to the product archetypes to change the description field from being read-only (its standard setting) to not read-only. When you did the 1.7.1 (or 1.7) install all the archetypes were set to their standard settings, and you have not applied any changes you made - hence you lost the 'can edit description field' facility.

Here is part of the standard product.medication.adl file

<archetypes>
    <archetype name="product.medication.1.0" latest="true"
               type="org.openvpms.component.business.domain.im.product.Product" displayName="Medication">
        <node name="id" path="/id"
              type="java.lang.Long" readOnly="true"/>
        <node name="name" path="/name" type="java.lang.String" minCardinality="1">
            <assertion name="propercase"/>
        </node>
        <node name="description" type="java.lang.String"
              path="/description" hidden="true" derived="true"
              derivedValue="/name"/>
        <node name="printedName" path="/details/printedName" type="java.lang.String"
              minCardinality="0"/>

Here is the version we use - note that the description field is no longer read-only, it is not a derived field, and its title is "Description/Notes"

<archetypes>
    <archetype name="product.medication.1.0" latest="true"
               type="org.openvpms.component.business.domain.im.product.Product" displayName="Medication">
        <node name="id" path="/id"
              type="java.lang.Long" readOnly="true"/>
        <node name="name" path="/name" type="java.lang.String" minCardinality="1">
            <assertion name="propercase"/>
        </node>
        <node name="description" type="java.lang.String" displayName="Description/Notes"
              path="/description" />
        <node name="printedName" path="/details/printedName" type="java.lang.String"
              minCardinality="0"/>

So the fix is for you to edit the product.xxx.adl files (where xxx is medication, merchandise, and service) [found in <OPENVPMS-HOME>\update\archetypes\org\openvpms\archetype\product ] as above, save the updated files somewhere, and then use Administration|Archetypes|Import to import them.

Note that when you install the next version (1.8), you will need to repeat the process. We have some 30 modified archetypes which I keep in a special folder. When a new version is installed, I compare these with the new standard archetypes and update our modified ones as necessary and then import all our modified ones.

The CSH text at http://www.openvpms.org/documentation/csh/1.7/admin/archetype is worth reading.

Regards, Tim G

Syndicate content