When taking a look at the definition of the many accounting forms / screens
etc. I think i found the right code:
<entity-condition entity-name="InvoiceItemType" list="invoiceItemTypes">
<order-by field-name="invoiceItemTypeId"/>
</entity-condition>
This seems to read all the InvoiceItemTypes and store it inside
"invoiceItemTypes" - a list which is used by the widget to populate the
dropdown.
Problem is, when checking the entity model, there are way too many entries
because the populated dropdown only shows 14 options.
*So the question is, where are the constraint conditions defined for this
specific case?*
On 12 March 2014 12:20, Adrian Stern <[email protected]> wrote:
> So i tried to deactivate some lines in AccountingTypeData.xml but the
> mapping i found there does not seem to have any influence on this specific
> dropdown.
>
> Where is the definition of which items are shown in this dropdown? The
> select statement above would exclude most of the anyway so it can't be the
> right one since not all contain a string matching 'INV_%'
>
>
> On 12 March 2014 11:25, Adrian Stern <[email protected]> wrote:
>
>> Hi
>>
>> Thanks for your answer.
>> So this would resolve in something like
>>
>> select * from InvoiceItemTypes where invoiceItemTypeId linke 'INV_%'
>>
>> Wich means i could also "just" remove the itemtypes i don't need from the
>> database.
>>
>> Right? Which of both would be the cleaner solution?
>>
>>
>> On 11 March 2014 17:35, Jeremy Olmstead <[email protected]> wrote:
>>
>>> You can do something like this (taken from GlSetupFroms.xml):
>>>
>>> <field name="invoiceItemTypeId">
>>> <drop-down allow-empty="false" >
>>> <entity-options description="${description}"
>>> entity-name="InvoiceItemType">
>>> <entity-constraint name="invoiceItemTypeId"
>>> operator="like" value="INV_%"/>
>>> <entity-order-by field-name="description"/>
>>> </entity-options>
>>> </drop-down>
>>> </field>
>>>
>>> Jeremy
>>>
>>>
>>> On Tue, Mar 11, 2014 at 10:53 AM, Adrian Stern <[email protected]>
>>> wrote:
>>>
>>> > Hi
>>> >
>>> > Since i only need a few of the available invoiceItemTypes i'm looking
>>> for a
>>> > way to hide the others from the user. Same goes for other DropDowns
>>> where i
>>> > wan't to reduce the entries.
>>> >
>>> > So lets say i create a new invoice and add an item to it. The item can
>>> have
>>> > one of many types and i want to limit the possible types available.
>>> >
>>> > Regards, Adrian
>>> >
>>>
>>
>>
>