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 |
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 <[hidden email]> 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 > |
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 <[hidden email]> 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 <[hidden email]> 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 > > > |
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> >> 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 >> > >> > > |
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> >>> 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 >>> > >>> >> >> > |
Adrian,
There are no constraints defined for this dropdown to ensure maximum applicability across a diversity of needs and implementations. You, of course, can remove those unwanted definitions/records from your own setup to suit your particular needs. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com |
So i did not get i right. Because as i see it, without constraints the
dropdown would be 146 entries long since this much entries exist in the entity model for the entity "InvoiceItemType" On 12 March 2014 13:39, Pierre Smits <[hidden email]> wrote: > Adrian, > > There are no constraints defined for this dropdown to ensure maximum > applicability across a diversity of needs and implementations. > > You, of course, can remove those unwanted definitions/records from your own > setup to suit your particular needs. > > Regards, > > Pierre Smits > > *ORRTIZ.COM <http://www.orrtiz.com>* > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com > |
In reply to this post by Adrian Stern
Adrian,
Please also provide information in which form(s)/screen(s) did you find said code. This will assist other contributors to find the related aspects to help you solve your issue in stead of mucking around in guesswork and losing interest. Which doesn't benefit anybody. Regards, Pierre Smits *ORRTIZ.COM <http://www.orrtiz.com>* Services & Solutions for Cloud- Based Manufacturing, Professional Services and Retail & Trade http://www.orrtiz.com |
In the
file webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy there seem to be some constraints if only SALES_INVOICES are needed. It loads INVOICE_ITM_ADJ, INVOICE_ADJ and INV_PROD_ITEM witch sums up to 12 matching entries when looking them up in the entity engine and comparing them to those available in the dropdown. This leaves me with two items where i can't figure out where they are coming from: INVOICE_ADJ & INV_PROD_ITEM which both have not parent (in entety engine) and are used in the groovie file above. This are the options in the said dropdown: "COMM_INV_ADJ" Commission Invoice Adjustment "CRETURN_ADJ" *InvoiceItemType.description.CRETURN_ADJ * "INVOICE_HEAD_ADJ" *InvoiceItemType.description.INVOICE_HEAD_ADJ* "INVOICE_ITM_ADJ" Invoice Item Adjustment "SRETURN_ADJ" *InvoiceItemType.description.SRETURN_ADJ* "PINVOICE_ITM_ADJ" Invoice Item Adjustment "SINVOICE_ITM_ADJ" *InvoiceItemType.description.SINVOICE_ITM_ADJ* "INV_DPROD_ITEM" Invoice Digital Good Item (Sales) "INV_FDPROD_ITEM" Invoice Finished/Digital Good Item (Sales) "INV_FPROD_ITEM" Invoice Finished Good Item (Sales) "INV_PROD_FEATR_ITEM" Invoice Product-Feature Item (Sales) "INV_SPROD_ITEM" Invoice Service Product Item (Sales) "INVOICE_ADJ" Invoice Adjustment "INV_PROD_ITEM" Invoice Product Item (Sales) Some of the above don't even have a real description. They show some other string instead. Since nobody would roll this out to a customer like this, my question is *what is the simpelst/cleanest way to remove unneeded items*? As for the forms/screens i viewed: /home/adrian/projects/ofbiz/applications/accounting/widget InvoiceForms.xml InvoiceItemTypeForms.xml InvoiceItemTypeScreens.xml InvoiceScreens.xml On 12 March 2014 14:56, Pierre Smits <[hidden email]> wrote: > Adrian, > > Please also provide information in which form(s)/screen(s) did you find > said code. This will assist other contributors to find the related aspects > to help you solve your issue in stead of mucking around in guesswork and > losing interest. Which doesn't benefit anybody. > > Regards, > > Pierre Smits > > *ORRTIZ.COM <http://www.orrtiz.com>* > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com > |
When changing the groovy file i can rule most of the options out, which
leaves me with the items i wanted... but its not as flexible as i wished it to be. webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy if ("SALES_INVOICE".equals(invoice.invoiceTypeId)) { itemTypesCond = exprBldr.OR() { //EQUALS(invoiceItemTypeId: "INVOICE_ADJ") //EQUALS(parentTypeId: "INVOICE_ADJ") //EQUALS(invoiceItemTypeId: "INVOICE_ITM_ADJ") //EQUALS(parentTypeId: "INVOICE_ITM_ADJ") EQUALS(invoiceItemTypeId: "INV_PROD_ITEM") EQUALS(parentTypeId: "INV_PROD_ITEM") } invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond, null, ["parentTypeId", "invoiceItemTypeId"], null, false); glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId : invoice.partyIdFrom], null, false); On 12 March 2014 15:09, Adrian Stern <[hidden email]> wrote: > In the > file webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy > there seem to be some constraints if only SALES_INVOICES are needed. It > loads INVOICE_ITM_ADJ, INVOICE_ADJ and INV_PROD_ITEM witch sums up to 12 > matching entries when looking them up in the entity engine and comparing > them to those available in the dropdown. > > This leaves me with two items where i can't figure out where they are > coming from: INVOICE_ADJ & INV_PROD_ITEM which both have not parent (in > entety engine) and are used in the groovie file above. > > This are the options in the said dropdown: > "COMM_INV_ADJ" Commission Invoice Adjustment > "CRETURN_ADJ" *InvoiceItemType.description.CRETURN_ADJ * > > "INVOICE_HEAD_ADJ" *InvoiceItemType.description.INVOICE_HEAD_ADJ* > > "INVOICE_ITM_ADJ" Invoice Item Adjustment > "SRETURN_ADJ" *InvoiceItemType.description.SRETURN_ADJ* > > "PINVOICE_ITM_ADJ" Invoice Item Adjustment > "SINVOICE_ITM_ADJ" *InvoiceItemType.description.SINVOICE_ITM_ADJ* > > "INV_DPROD_ITEM" Invoice Digital Good Item (Sales) > "INV_FDPROD_ITEM" Invoice Finished/Digital Good Item (Sales) > > "INV_FPROD_ITEM" Invoice Finished Good Item (Sales) > "INV_PROD_FEATR_ITEM" Invoice Product-Feature Item (Sales) > "INV_SPROD_ITEM" Invoice Service Product Item (Sales) > "INVOICE_ADJ" Invoice Adjustment > "INV_PROD_ITEM" Invoice Product Item (Sales) > > Some of the above don't even have a real description. They show some other > string instead. Since nobody would roll this out to a customer like this, > my question is *what is the simpelst/cleanest way to remove unneeded > items*? > > As for the forms/screens i viewed: > /home/adrian/projects/ofbiz/applications/accounting/widget > InvoiceForms.xml > InvoiceItemTypeForms.xml > InvoiceItemTypeScreens.xml > InvoiceScreens.xml > > > > On 12 March 2014 14:56, Pierre Smits <[hidden email]> wrote: > >> Adrian, >> >> Please also provide information in which form(s)/screen(s) did you find >> said code. This will assist other contributors to find the related aspects >> to help you solve your issue in stead of mucking around in guesswork and >> losing interest. Which doesn't benefit anybody. >> >> Regards, >> >> Pierre Smits >> >> *ORRTIZ.COM <http://www.orrtiz.com>* >> Services & Solutions for Cloud- >> Based Manufacturing, Professional >> Services and Retail & Trade >> http://www.orrtiz.com >> > > |
Free forum by Nabble | Edit this page |