Hi Todd, 
You extend database entities (database tables) in ofbiz using the 
entitymodel.xml files.   These are found in the entitydef folders of different 
components.  
You can either update the original xml files in your ofbiz installation, or if 
you are building a brand new component you can extend an existing entity as 
part of your new component.  I prefer the latter method as it leaves the 
original ofbiz untouched. Here is an example of extending the InventoryItem 
entity that I recently did in a project I am working on.
    <extend-entity entity-name="InventoryItem">        <field 
name="htgAssetTag" type="value"/>        <field name="htgType" type="value"/>   
     <field name="htgManufacturer" type="value"/>        <field 
name="htgModelNumber" type="value"/>        <field name="htgCondition" 
type="value"/>        <field name="htgDescription" type="value"/>        <field 
name="htgInfo1" type="value"/>        <field name="htgInfo2" type="value"/>     
   <field name="htgInfo3" type="value"/>        <field name="htgInfo4" 
type="value"/>        <field name="htgInfo5" type="value"/>        <field 
name="htgInfo6" type="value"/>        <field name="htgNotes" type="value"/>     
   <field name="htgHDD" type="value"/>        <field name="htgFormFactor" 
type="value"/>        <field name="htgLeaseReturn" type="indicator"/>        
<field name="htgRedeployable" type="indicator"/>    </extend-entity>    
When you restart ofbiz, it reads these files and automatically adds the new 
fields to the database tables for you.  Take a look in the 
applications/accounting/entitydef/entitymodel.xml.  If you do not have your own 
component that you are already working with you can update the FixedAsset 
entity here.
damon

> From: [email protected]
> Date: Mon, 10 Aug 2015 13:29:02 -0400
> To: [email protected]
> Subject: Re: Can I add custom fields to inventory items?
> 
> Hello,
> 
>       OK.
> 
>       How do I add additional fields to Fixed Assets?
> 
> Todd
> 
> --
> Todd Blum
> http://www.toddblum.org
> 
> 
> On Sat, 8 Aug 2015, Jacques Le Roux wrote:
> 
> > Hi,
> >
> > You are on the right way, facilities with fixed assets seems more 
> > appropriate 
> > to me. Look also at the assetmaint component...
> >
> > Jacques
> >
> >
> > Le 07/08/2015 22:27, Todd Blum a écrit :
> >> Hello,
> >>
> >>     OK, thanks.
> >>
> >>     Is there any other documentation on how to set this up also? Would the 
> >> client offices be set up as warehouses with products, or maybe as 
> >> facilities with fixed assets?
> >> 
> >> Thanks,
> >> 
> >> Todd
> >> 
> >> -- 
> >> Todd Blum
> >> http://www.toddblum.org
> >> 
> >> 
> >> On Mon, 3 Aug 2015, Todd Blum wrote:
> >> 
> >>> Hello,
> >>>
> >>>     I do outsourced IT where I support multiple clients.  Each device in 
> >>> each office (workstations, printers etc) has a monthly charge for support.
> >>>
> >>>     Besides serial numbers, I need to keep track of the following:
> >>> 
> >>> monthly support charge
> >>> install date
> >>> manufacturer warranty ID
> >>> manufacturer warranty expiration
> >>> manufacturer warranty type
> >>> upstream vendor
> >>> upstream vendor invoice number
> >>> PO number
> >>> receive date internal invoice and quote numbers
> >>>
> >>>     I'm assuming I would need to add custom fields in Ofbiz to keep track 
> >>> of all this?
> >>>
> >>>     Also, would there be a way to generate monthly invoices, based on the 
> >>> monthly support charges?
> >>> 
> >>> Thanks,
> >>> 
> >>> Todd
> >>> 
> >>> -- 
> >>> Todd Blum
> >>> http://www.toddblum.org
> >>> 
> >>> 
> >> 
> >
                                          

Reply via email to