You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/01/05 09:50:36 UTC
svn commit: r1649482 [4/26] - in
/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/acc...
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy Mon Jan 5 08:50:30 2015
@@ -20,10 +20,7 @@
import org.ofbiz.entity.condition.*
import org.ofbiz.entity.util.*
-pplookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'PUBLISH_POINT'];
-webSiteContents = delegator.findList("WebSiteContent", EntityCondition.makeCondition(pplookupMap), null, ['-fromDate'], null, false);
-webSiteContents = EntityUtil.filterByDate(webSiteContents);
-webSiteContent = EntityUtil.getFirst(webSiteContents);
+webSiteContent = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "PUBLISH_POINT").orderBy("-fromDate").filterByDate().queryFirst();
if (webSiteContent) {
content = webSiteContent.getRelatedOne("Content", false);
contentRoot = content.contentId;
@@ -31,13 +28,11 @@ if (webSiteContent) {
context.contentRoot = contentRoot;
// get all sub content for the publish point
- subsites = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : contentRoot]), null, null, null, false);
+ subsites = from("ContentAssoc").where("contentId", contentRoot).queryList();
context.subsites = subsites;
}
-mnlookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'MENU_ROOT'];
-webSiteMenus = delegator.findList("WebSiteContent", EntityCondition.makeCondition(mnlookupMap), null, ['-fromDate'], null, false);
-webSiteMenu = EntityUtil.getFirst(webSiteMenus);
+webSiteMenu = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "MENU_ROOT").orderBy("-fromDate").queryFirst();
if (webSiteMenu) {
menu = webSiteMenu.getRelatedOne("Content", false);
menuRoot = menu.contentId;
@@ -45,13 +40,11 @@ if (webSiteMenu) {
context.menuRoot = menuRoot;
// get all sub content for the menu root
- menus = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : menuRoot]), null, null, null, false);
+ menus = from("ContentAssoc").where("contentId", menuRoot).queryList();
context.menus = menus;
}
-erlookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'ERROR_ROOT'];
-webSiteErrors = delegator.findList("WebSiteContent", EntityCondition.makeCondition(erlookupMap), null, ['-fromDate'], null, false);
-webSiteError = EntityUtil.getFirst(webSiteErrors);
+webSiteError = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "ERROR_ROOT").orderBy("-fromDate").queryFirst();
if (webSiteError) {
error = webSiteError.getRelatedOne("Content", false);
errorRoot = error.contentId;
@@ -59,6 +52,6 @@ if (webSiteError) {
context.errorRoot = errorRoot;
// get all sub content for the error root
- errors = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : errorRoot]), null, null, null, false);
+ errors = from("ContentAssoc").where("contentId", errorRoot).queryList();
context.errors = errors;
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl Mon Jan 5 08:50:30 2015
@@ -1302,17 +1302,281 @@ Courier
</fo:table-body>
</fo:table>
</fo:block>
-
- <fo:block font-family="Helvetica" font-size="12pt">
- Some special characters:
+
+
+ <fo:block font-family="Helvetica" font-size="14pt">
+NotoSans
</fo:block>
- <fo:block space-after.optimum="10pt" font-family="Helvetica">
-Euro ( dec 8364, hex 20AC): €
+ <fo:block space-after.optimum="10pt" font-family="NotoSans" font-size="10pt">
+<fo:table>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-body>
+<fo:table-row>
+<fo:table-cell>
+ <fo:block>
+&#x21; : !
+&#x22; : "
+&#x23; : #
+&#x24; : $
+&#x25; : %
+&#x26; : &
+&#x27; : '
+&#x28; : (
+&#x29; : )
+&#x2A; : *
+&#x2B; : +
+&#x2C; : ,
+&#x2D; : -
+&#x2E; : .
+&#x2F; : /
+&#x30; : 0
+&#x31; : 1
+&#x32; : 2
+&#x33; : 3
+&#x34; : 4
+&#x35; : 5
+&#x36; : 6
+&#x37; : 7
+&#x38; : 8
+&#x39; : 9
+&#x3A; : :
+&#x3B; : ;
+&#x3C; : <
+&#x3D; : =
+&#x3E; : >
+&#x3F; : ?
+&#x40; : @
+&#x41; : A
+&#x42; : B
+&#x43; : C
+&#x44; : D
+&#x45; : E
+&#x46; : F
+&#x47; : G
+&#x48; : H
+&#x49; : I
+&#x4A; : J
+&#x4B; : K
+&#x4C; : L
+&#x4D; : M
+&#x4E; : N
+&#x4F; : O
+&#x50; : P
+&#x51; : Q
+&#x52; : R
+&#x53; : S
+&#x54; : T
+&#x55; : U
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+&#x56; : V
+&#x57; : W
+&#x58; : X
+&#x59; : Y
+&#x5A; : Z
+&#x5B; : [
+&#x5C; : \
+&#x5D; : ]
+&#x5E; : ^
+&#x5F; : _
+&#x60; : `
+&#x61; : a
+&#x62; : b
+&#x63; : c
+&#x64; : d
+&#x65; : e
+&#x66; : f
+&#x67; : g
+&#x68; : h
+&#x69; : i
+&#x6A; : j
+&#x6B; : k
+&#x6C; : l
+&#x6D; : m
+&#x6E; : n
+&#x6F; : o
+&#x70; : p
+&#x71; : q
+&#x72; : r
+&#x73; : s
+&#x74; : t
+&#x75; : u
+&#x76; : v
+&#x77; : w
+&#x78; : x
+&#x79; : y
+&#x7A; : z
+&#x7B; : {
+&#x7C; : |
+&#x7D; : }
+&#x7E; : ~
+&#xA1; : ¡
+&#xA2; : ¢
+&#xA3; : £
+&#xA4; : ¤
+&#xA5; : ¥
+&#xA6; : ¦
+&#xA7; : §
+&#xA8; : ¨
+&#xA9; : ©
+&#xAA; : ª
+&#xAB; : «
+&#xAC; : ¬
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+&#xAE; : ®
+&#xAF; : ¯
+&#xB0; : °
+&#xB1; : ±
+&#xB2; : ²
+&#xB3; : ³
+&#xB4; : ´
+&#xB5; : µ
+&#xB6; : ¶
+&#xB7; : ·
+&#xB8; : ¸
+&#xB9; : ¹
+&#xBA; : º
+&#xBB; : »
+&#xBC; : ¼
+&#xBD; : ½
+&#xBE; : ¾
+&#xBF; : ¿
+&#xC0; : À
+&#xC1; : Á
+&#xC2; : Â
+&#xC3; : Ã
+&#xC4; : Ä
+&#xC5; : Å
+&#xC6; : Æ
+&#xC7; : Ç
+&#xC8; : È
+&#xC9; : É
+&#xCA; : Ê
+&#xCB; : Ë
+&#xCC; : Ì
+&#xCD; : Í
+&#xCE; : Î
+&#xCF; : Ï
+&#xD0; : Ð
+&#xD1; : Ñ
+&#xD2; : Ò
+&#xD3; : Ó
+&#xD4; : Ô
+&#xD5; : Õ
+&#xD6; : Ö
+&#xD7; : ×
+&#xD8; : Ø
+&#xD9; : Ù
+&#xDA; : Ú
+&#xDB; : Û
+&#xDC; : Ü
+&#xDD; : Ý
+&#xDE; : Þ
+&#xDF; : ß
+&#xE0; : à
+&#xE1; : á
+&#xE2; : â
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+ </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+ <fo:block>
+&#xE3; : ã
+&#xE4; : ä
+&#xE5; : å
+&#xE6; : æ
+&#xE7; : ç
+&#xE8; : è
+&#xE9; : é
+&#xEA; : ê
+&#xEB; : ë
+&#xEC; : ì
+&#xED; : í
+&#xEE; : î
+&#xEF; : ï
+&#xF0; : ð
+&#xF1; : ñ
+&#xF2; : ò
+&#xF3; : ó
+&#xF4; : ô
+&#xF5; : õ
+&#xF6; : ö
+&#xF7; : ÷
+&#xF8; : ø
+&#xF9; : ù
+&#xFA; : ú
+&#xFB; : û
+&#xFC; : ü
+&#xFD; : ý
+&#xFE; : þ
+&#xFF; : ÿ
+&#x0152; : Œ
+&#x0153; : œ
+&#x0160; : Š
+&#x0161; : š
+&#x0178; : Ÿ
+&#x017D; : Ž
+&#x017E; : ž
+&#x0192; : ƒ
+&#x02DC; : ˜
+&#x2013; : –
+&#x2014; : —
+&#x2018; : ‘
+&#x2019; : ’
+&#x201A; : ‚
+&#x201C; : “
+&#x201D; : ”
+&#x201E; : „
+&#x2020; : †
+&#x2021; : ‡
+&#x2022; : •
+&#x2026; : …
+&#x2030; : ‰
+&#x2039; : ‹
+&#x203A; : ›
+&#x2122; : ™
+ </fo:block>
+</fo:table-cell>
+</fo:table-row>
+</fo:table-body>
+</fo:table>
</fo:block>
+
- <fo:block space-after.optimum="10pt" font-family="Helvetica">
-
+ <fo:block font-family="Helvetica" font-size="12pt">
+Some special characters:
+ </fo:block>
+ <fo:block font-family="Helvetica" font-size="12pt">
+Euro symbol in Helvetica 12 ( dec 8364, hex 20AC): €
+ </fo:block>
+ <fo:block font-family="NotoSans" font-size="12pt">
+Ruppe symbol in NotoSans 12 (dec 8377, hex 20B9): ₹
+ </fo:block>
+ <fo:block font-family="NotoSans" font-size="12pt">
+I ♥ NotoSans!
</fo:block>
</fo:flow>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml Mon Jan 5 08:50:30 2015
@@ -38,7 +38,7 @@ under the License.
<form name="lookupDataResourceContent" default-entity-name="DataResourceContentView" target="LookupSubContent" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
<text-find/>
</field>
<field name="coContentId">
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml Mon Jan 5 08:50:30 2015
@@ -27,7 +27,7 @@ under the License.
<field name="caContentAssocTypeId"><text-find/></field>
<field name="caFromDate" title="${uiLabelMap.CommonFromDate}"><date-find/></field>
<field name="contentId"><text-find/></field>
- <field name="dataResourceId"><text-find/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text-find/></field>
<field name="contentName"><text-find/></field>
<field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -68,7 +68,7 @@ under the License.
<field name="caMapKey"><display/></field>
<field name="caFromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
<field name="contentId"><display/></field>
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="contentName"><display/></field>
</form>
@@ -77,7 +77,7 @@ under the License.
<field name="imageData" >
<file />
</field>
- <field name="dataResourceId" >
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" >
<drop-down allow-empty="false" no-current-selected-key="TEMPLATE_TEXT_ONLY">
<option key="TEMPLATE_TEXT_ONLY" description="${uiLabelMap.ContentTemplateTextOnly}"/>
<option key="TEMPLATE_IMAGE_CENTERED" description="${uiLabelMap.ContentTemplateImageCentered}"/>
@@ -498,7 +498,7 @@ under the License.
<field name="dataResourceTitle" title-style="h1" map-name="dummy">
<display description=""/>
</field>
- <field name="dataResourceId">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink use-when=""${currentValue.dataResourceId}".length()>0" link-style="buttontext" target-type="intra-app" target="gotoDataResource" description="${uiLabelMap.ContentGoToDataResource}">
<parameter param-name="dataResourceId" from-field="currentValue.dataResourceId"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml Mon Jan 5 08:50:30 2015
@@ -19,7 +19,7 @@ under the License.
-->
<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-tree.xsd">
- <tree name="CompDocTemplateTree" root-node-name="node-root"
+ <tree name="CompDocTemplateTree" entity-name="Content" root-node-name="node-root"
default-render-style="simple" default-wrap-style="treeWrapper">
<node name="node-root" wrap-style="treeWrapper">
<entity-one entity-name="Content" use-cache="false">
@@ -87,7 +87,7 @@ under the License.
</node>
</tree>
- <tree name="CompDocInstanceTree" root-node-name="node-root"
+ <tree name="CompDocInstanceTree" entity-name="Content" root-node-name="node-root"
default-render-style="simple" default-wrap-style="treeWrapper">
<node name="node-root">
<entity-one entity-name="Content" use-cache="false">
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml Mon Jan 5 08:50:30 2015
@@ -42,7 +42,7 @@ under the License.
</entity-options>
</drop-down>
</field>
- <field name="dataResourceId" position="1">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" position="1">
<lookup target-form-name="LookupDataResource"/>
</field>
<field name="ownerContentId" position="2">
@@ -95,8 +95,8 @@ under the License.
<field name="localeString" sort-field="true"><display-entity entity-name="CountryCode" key-field-name="countryCode" description="${countryName}[${countryCode}]"></display-entity></field>
<field name="contentTypeId" sort-field="true"><display-entity entity-name="ContentType"></display-entity></field>
<field name="mimeTypeId" sort-field="true"><display-entity entity-name="MimeType"></display-entity></field>
- <field name="dataResourceId" use-when="dataResourceId==null" sort-field="true"><display/></field>
- <field name="dataResourceId" use-when="dataResourceId!=null" sort-field="true">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId==null" sort-field="true"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId!=null" sort-field="true">
<display-entity entity-name="DataResource" description="${dataResourceName}">
<sub-hyperlink target="EditDataResource" link-style="buttontext" description="[${dataResourceId}]">
<parameter param-name="dataResourceId"/>
@@ -151,14 +151,14 @@ under the License.
</entity-options>
</drop-down>
</field>
- <field name="dataResourceId" use-when="dataResourceId != null">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId != null">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink link-style="buttontext" target="EditDataResource" description="${uiLabelMap.ContentGoToDataResource}">
<parameter param-name="dataResourceId" from-field="currentValue.dataResourceId"/>
</sub-hyperlink>
</lookup>
</field>
- <field name="dataResourceId" use-when="dataResourceId == null ">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId == null ">
<lookup target-form-name="LookupDataResource">
<sub-hyperlink link-style="buttontext" target="AddDataResourceFromContent" description="${uiLabelMap.FormFieldTitle_newDataResourceId}">
<parameter param-name="contentId" from-field="currentValue.contentId"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml Mon Jan 5 08:50:30 2015
@@ -24,7 +24,7 @@ under the License.
<form name="FindDataResource" target="findDataResource" type="single"
header-row-style="header-row" default-table-style="basic-table">
<field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
- <field name="dataResourceId"><text-find ignore-case="true"/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text-find ignore-case="true"/></field>
<field name="dataResourceName"><text-find ignore-case="true"/></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
@@ -140,7 +140,7 @@ under the License.
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
</actions>
- <field name="dataResourceId">
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
<hyperlink also-hidden="false" target-type="plain" description="${dataResourceId}" target="javascript:set_value('${dataResourceId}')"/>
</field>
<field name="dataResourceName"><display/></field>
@@ -238,7 +238,7 @@ under the License.
<form name="DataResourceMaster" target="createDataResource" title="" type="single" default-map-name="currentValue"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="DataResource" default-field-type="edit"/>
- <field name="dataResourceId"></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
@@ -287,14 +287,14 @@ under the License.
-->
<form name="AddDataResource" target="createDataResource" title="" type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
<field name="objectInfo" title="${uiLabelMap.ContentUrl}"/>
<field name="mode"><hidden value="CREATE"/></field>
</form>
<form name="AddDataResourceText" target="createDataResourceAndText" title="" type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="dataResourceTypeId"><hidden value="ELECTRONIC_TEXT"/></field>
<field name="dataResourceTypeIdDisplay" title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
<display description="ELECTRONIC_TEXT" also-hidden="false"/>
@@ -304,7 +304,7 @@ under the License.
</form>
<form name="AddDataResourceUrl" target="createDataResourceUrl" title="" type="single" extends="DataResourceMaster"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><text/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
<field name="objectInfo" title="${uiLabelMap.ContentUrl}"><text/></field>
<field name="dataResourceTypeId"><hidden value="URL_RESOURCE"/></field>
<field name="dataResourceTypeIdDisplay" title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
@@ -348,17 +348,17 @@ under the License.
</form>
<form name="ImageUpload" target="uploadImage" title="" type="upload" default-map-name="currentValue"
header-row-style="header-row" default-table-style="basic-table">
- <field name="dataResourceId"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><display/></field>
<field name="dataResourceTypeId" ><hidden/></field>
- <field name="objectInfo"><display /></field>
- <field name="imageData" entity-name="ImageDataResource"><file/></field>
+ <field name="objectInfo" title="${uiLabelMap.ContentUploadedFile}"><display /></field>
+ <field name="imageData" entity-name="ImageDataResource" title="${uiLabelMap.ContentFile}"><file/></field>
<field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<!-- DataResourceAttribute forms -->
<form name="AddDataResourceAttribute" target="addDataResourceAttribute" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createDataResourceAttribute"/>
- <field name="dataResourceId" title=" " map-name="currentValue"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="ListDataResourceAttribute" list-name="dataResourceAttribute" target="updateDataResourceAttribute" title="" type="list"
@@ -386,7 +386,7 @@ under the License.
<form name="AddDataResourceRole" target="addDataResourceRole" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="DataResourceRole"/>
- <field name="dataResourceId" title=" " map-name="currentValue"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
<field name="partyId" title=" "><lookup target-form-name="LookupPerson"/></field>
<field name="roleTypeId">
<drop-down allow-empty="true">
@@ -422,7 +422,7 @@ under the License.
<form name="AddDataResourceProductFeature" target="createDataResourceProductFeature" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createProductFeatureDataResource"/>
- <field name="dataResourceId" map-name="currentValue"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
<field name="productFeatureId" widget-style="buttontext"><lookup target-form-name="LookupProductFeature"/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -487,7 +487,7 @@ under the License.
<entity-one entity-name="ElectronicText" value-field="electronicText"/>
</actions>
<alt-target use-when="electronicText==null" target="addElectronicText"/>
- <field name="dataResourceId" title=" " widget-style="buttontext"><display also-hidden="true"/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"><display also-hidden="true"/></field>
<field name="textData" widget-style="buttontext"><textarea cols="120" rows="24"/></field>
<field name="submitButton" use-when="electronicText!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
<field name="submitButton" use-when="electronicText==null" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
@@ -497,7 +497,7 @@ under the License.
<form name="AddHtmlText" target="addHtmlText" title="" type="single"
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="ElectronicText"/>
- <field name="dataResourceId" title=" " widget-style="buttontext" map-name="currentValue"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext" map-name="currentValue"><display/></field>
<field name="textData" id-name="textData"><textarea rows="24" cols="120"/></field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -508,7 +508,7 @@ under the License.
</actions>
<alt-target use-when="electronicText==null" target="addHtmlText"/>
<auto-fields-entity entity-name="ElectronicText"/>
- <field name="dataResourceId" title=" " widget-style="buttontext"><display/></field>
+ <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"><display/></field>
<field name="textData" id-name="textData" encode-output="true"><textarea cols="120" rows="20" visual-editor-enable="true" /></field>
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml Mon Jan 5 08:50:30 2015
@@ -214,8 +214,15 @@ under the License.
<decorator-screen name="commonDataResourceDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ImageUpload" location="component://content/widget/content/DataResourceForms.xml"/>
- <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
- </decorator-section>
+ <!-- Commented out the following snippet because the behaviour is too random (does not depend on browser)-->
+<!-- <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
+ <horizontal-separator></horizontal-separator>
+ <label>${uiLabelMap.ContentContentShow}:</label>
+ <container>
+ <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
+ <horizontal-separator></horizontal-separator>
+ </container>
+--> </decorator-section>
</decorator-screen>
</widgets>
</section>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml Mon Jan 5 08:50:30 2015
@@ -23,7 +23,7 @@ under the License.
<!-- <tree name="MessageTree" root-node-name="node-root"
default-render-style="expand-collapse" expand-collapse-request="findForumThreads?forumId=${parameters.forumId}"> -->
- <tree name="MessageTree" root-node-name="node-root" default-render-style="simple">
+ <tree name="MessageTree" entity-name="Content" root-node-name="node-root" default-render-style="simple">
<node name="node-root">
<entity-one entity-name="Content" use-cache="false" value-field="rsp">
<field-map field-name="contentId" from-field="parameters.forumId"/>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml Mon Jan 5 08:50:30 2015
@@ -153,7 +153,7 @@ under the License.
<sort-field name="deleteLink"/>
</sort-order>
</form>
- <form name="CreateWebSiteContent" type="single" target="CreateWebSiteContent" title="" default-map-name="webSite"
+ <form name="CreateWebSiteContent" type="single" target="CreateWebSiteContent" title=""
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createWebSiteContent"/>
<field name="webSiteId" map-name="webSite"><display also-hidden="true"/></field>
@@ -291,4 +291,4 @@ under the License.
</hyperlink>
</field>
</form>
-</forms>
\ No newline at end of file
+</forms>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy Mon Jan 5 08:50:30 2015
@@ -23,6 +23,7 @@
*/
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.base.util.*;
+import org.ofbiz.party.party.PartyHelper;
import org.ofbiz.product.catalog.*;
import org.ofbiz.product.category.*;
import javolution.util.FastMap;
@@ -41,20 +42,19 @@ existParties = FastList.newInstance();
subtopLists = FastList.newInstance();
//internalOrg list
-partyRelationships = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", [partyIdFrom : partyId, partyRelationshipTypeId : "GROUP_ROLLUP"], null, false));
+partyRelationships = from("PartyRelationship").where("partyIdFrom", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP").filterByDate().queryList();
if (partyRelationships) {
//root
- partyRoot = delegator.findOne("PartyGroup", [partyId : partyId], false);
+ partyRoot = from("PartyGroup").where("partyId", partyId).queryOne();
partyRootMap = FastMap.newInstance();
partyRootMap.put("partyId", partyId);
partyRootMap.put("groupName", partyRoot.getString("groupName"));
//child
for(partyRelationship in partyRelationships) {
- partyGroup = delegator.findOne("PartyGroup", [partyId : partyRelationship.getString("partyIdTo")], false);
- partyGroupMap = FastMap.newInstance();
- partyGroupMap.put("partyId", partyGroup.getString("partyId"));
- partyGroupMap.put("groupName", partyGroup.getString("groupName"));
+ partyGroupMap = [:];
+ partyGroupMap.put("partyId", partyRelationship.getString("partyIdTo"));
+ partyGroupMap.put("groupName", PartyHelper.getPartyName(delegator, partyRelationship.getString("partyIdTo"), false));
completedTreeContext.add(partyGroupMap);
subtopLists.addAll(partyRelationship.getString("partyIdTo"));
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml Mon Jan 5 08:50:30 2015
@@ -139,7 +139,7 @@
<if-compare field="workEffort.currentStatusId" operator="not-equals" value="CAL_CANCELLED"/>
</and>
<if-empty field="workEffort"/>
- <if-has-permission permission="WORKEFFORTMGR" action="ADMIN"/>
+ <if-has-permission permission="WORKEFFORTMGR" action="_ADMIN"/>
</or>
<if-compare field="parameters.form" operator="equals" value="edit"/>
</and>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml Mon Jan 5 08:50:30 2015
@@ -1630,7 +1630,7 @@
<value xml:lang="de">Abhängige Produktionsaufträge</value>
<value xml:lang="en">Succeeding Production Run(s)</value>
<value xml:lang="es">Esfuerzos de trabajo dependientes</value>
- <value xml:lang="fr">Exécution de production dépendantes</value>
+ <value xml:lang="fr">Exécution d'ordre de fabrication/s suivant/s</value>
<value xml:lang="it">Ordini di produzione successivi</value>
<value xml:lang="ja">ä¾åããçç£å®è¡</value>
<value xml:lang="nl">Opvolgende productierun(s)</value>
@@ -2675,7 +2675,7 @@
<value xml:lang="de">Erforderliche Produktionsaufträge</value>
<value xml:lang="en">Preceding Production Run(s)</value>
<value xml:lang="es">Ãrdenes de producción obligatorias</value>
- <value xml:lang="fr">Cadences de production obligatoires</value>
+ <value xml:lang="fr">Exécution d'ordre de fabrication/s précédent/s</value>
<value xml:lang="it">Cicli Produzione Precedenti</value>
<value xml:lang="ja">çç£å¼·å¶å®è¡</value>
<value xml:lang="nl">Voorafgaande productierun(s)</value>
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy Mon Jan 5 08:50:30 2015
@@ -44,7 +44,7 @@ if (tree) {
try {
outMap = [:];
if (currencyUomId) {
- outMap = dispatcher.runSync("getProductCost", [productId : node.getProduct().productId,
+ outMap = runService('getProductCost', [productId : node.getProduct().productId,
currencyUomId : currencyUomId,
costComponentTypePrefix : "EST_STD",
userLogin : userLogin]);
@@ -53,7 +53,7 @@ if (tree) {
grandTotalCost = grandTotalCost + totalCost ?: 0;
}
if (facilityId) {
- outMap = dispatcher.runSync("getInventoryAvailableByFacility", [productId : node.getProduct().productId,
+ outMap = runService('getInventoryAvailableByFacility', [productId : node.getProduct().productId,
facilityId : facilityId,
userLogin : userLogin]);
qoh = outMap.quantityOnHandTotal;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy Mon Jan 5 08:50:30 2015
@@ -44,7 +44,7 @@ Timestamp fromDate = null;
if (fromDateStr) fromDate = Timestamp.valueOf(fromDateStr) ?: (Timestamp)request.getAttribute("ProductAssocCreateFromDate");;
context.fromDate = fromDate;
-productAssoc = delegator.findOne("ProductAssoc", [productId : productId, productIdTo : productIdTo, productAssocTypeId : productAssocTypeId, fromDate : fromDate], false);
+productAssoc = from("ProductAssoc").where("productId", productId, "productIdTo", productIdTo, "productAssocTypeId", productAssocTypeId, "fromDate", fromDate).queryOne();
if (updateMode) {
productAssoc = [:];
context.remove("productIdTo");
@@ -58,10 +58,10 @@ if (!productAssoc) useValues = false;
context.useValues = useValues;
-Collection assocTypes = delegator.findByAnd("ProductAssocType", [parentTypeId : "PRODUCT_COMPONENT"], ["productAssocTypeId", "description"], false);
+Collection assocTypes = from("ProductAssocType").where("parentTypeId", "PRODUCT_COMPONENT").orderBy("productAssocTypeId", "description").queryList();
context.assocTypes = assocTypes;
-Collection formulae = delegator.findByAnd("CustomMethod", [customMethodTypeId : "BOM_FORMULA"], ["customMethodId", "description"], false);
+Collection formulae = from("CustomMethod").where("customMethodTypeId", "BOM_FORMULA").orderBy("customMethodId", "description").queryList();
context.formulae = formulae;
if (product) {
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy Mon Jan 5 08:50:30 2015
@@ -20,9 +20,6 @@
import org.ofbiz.entity.util.*;
import org.ofbiz.entity.condition.*;
-fieldToSelect = ["productId", "internalName", "productAssocTypeId"] as Set;
-orderBy = ["productId", "productAssocTypeId"];
-
condList = [];
if (parameters.productId) {
cond = EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parameters.productId);
@@ -41,8 +38,12 @@ if (parameters.productAssocTypeId) {
], EntityOperator.OR);
condList.add(cond);
}
-cond = EntityCondition.makeCondition(condList, EntityOperator.AND);
-findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-bomListIterator = delegator.find("ProductAndAssoc", cond, null, fieldToSelect, orderBy, findOpts);
+bomListIterator = select("productId", "internalName", "productAssocTypeId")
+ .from("ProductAndAssoc")
+ .where(condList)
+ .orderBy("productId", "productAssocTypeId")
+ .cursorScrollInsensitive()
+ .cache(true)
+ .queryIterator();
context.ListProductBom = bomListIterator;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy Mon Jan 5 08:50:30 2015
@@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra
productionRunId = parameters.productionRunId ?: parameters.workEffortId;
taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
tasks.each { task ->
- records = delegator.findByAnd("InventoryItemDetail", [workEffortId : task.workEffortId], null, false);
+ records = from("InventoryItemDetail").where("workEffortId", task.workEffortId).queryList();
HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskActualComponents", request, response);
taskForm.putInContext("records", records);
taskInfos.add([task : task, taskForm : taskForm]);
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy Mon Jan 5 08:50:30 2015
@@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra
productionRunId = parameters.productionRunId ?: parameters.workEffortId;
taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
tasks.each { task ->
- records = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId], null, false);
+ records = from("WorkEffortGoodStandard").where("workEffortId", task.workEffortId).queryList();
HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskComponents", request, response);
taskForm.putInContext("records", records);
taskInfos.add([task : task, taskForm : taskForm]);
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy Mon Jan 5 08:50:30 2015
@@ -19,16 +19,17 @@
import org.ofbiz.content.content.ContentWorker;
import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.GenericValue;
productionRunId = parameters.productionRunId ?: parameters.workEffortId;
context.productionRunId = productionRunId;
-delivGoodStandard = EntityUtil.getFirst(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], ["-fromDate"], false));
+delivGoodStandard = from("WorkEffortGoodStandard").where("workEffortId", productionRunId, "workEffortGoodStdTypeId", "PRUN_PROD_DELIV", "statusId", "WEGS_CREATED").orderBy("-fromDate").queryFirst();
if (delivGoodStandard) {
context.delivProductId = delivGoodStandard.productId;
}
if (context.delivProductId && (parameters.partyId || parameters.contentLocale)) {
- delivProductContents = EntityUtil.filterByDate(delegator.findByAnd("ProductContentAndInfo", [productId : context.delivProductId], ["-fromDate"], false));
+ delivProductContents = from("ProductContentAndInfo").where("productId", context.delivProductId).orderBy("-fromDate").filterByDate().queryList();
context.delivProductContents = delivProductContents;
Locale contentLocale = null;
@@ -38,7 +39,7 @@ if (context.delivProductId && (parameter
delivProductContentsForLocaleAndUser = [];
delivProductContents.each { delivProductContent ->
GenericValue content = ContentWorker.findContentForRendering(delegator, delivProductContent.contentId, contentLocale, parameters.partyId, parameters.roleTypeId, true);
- delivProductContentsForLocaleAndUser.add(EntityUtil.getFirst(delegator.findByAnd("ContentDataResourceView", [contentId : content.contentId], null, false)));
+ delivProductContentsForLocaleAndUser.add(from("ContentDataResourceView").where("contentId", content.contentId).queryFirst());
}
context.delivProductContentsForLocaleAndUser = delivProductContentsForLocaleAndUser;
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy Mon Jan 5 08:50:30 2015
@@ -22,16 +22,16 @@ import org.ofbiz.widget.html.HtmlFormWra
productionRunId = parameters.productionRunId ?: parameters.workEffortId;
taskCosts = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
tasks.each { task ->
- costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : task.workEffortId], null, false));
+ costs = from("CostComponent").where("workEffortId", task.workEffortId).filterByDate().queryList();
HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response);
taskCostsForm.putInContext("taskCosts", costs);
taskCosts.add([task : task ,costsForm : taskCostsForm]);
}
// get the costs directly associated to the production run (e.g. overhead costs)
-productionRun = delegator.findOne("WorkEffort", [workEffortId: productionRunId], true);
-costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : productionRunId], null, false));
+productionRun = from("WorkEffort").where("workEffortId", productionRunId).cache(true).queryOne();
+costs = from("CostComponent").where("workEffortId", productionRunId).filterByDate().queryList();
HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response);
taskCostsForm.putInContext("taskCosts", costs);
taskCosts.add([task : productionRun ,costsForm : taskCostsForm]);
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Mon Jan 5 08:50:30 2015
@@ -36,7 +36,7 @@ if (productionRunId) {
context.productionRun = productionRun.getGenericValue();
// Find all the order items to which this production run is linked.
- orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false);
+ orderItems = from("WorkOrderItemFulfillment").where("workEffortId", productionRunId).queryList();
if (orderItems) {
context.orderItems = orderItems;
}
@@ -44,7 +44,7 @@ if (productionRunId) {
quantityToProduce = productionRun.getGenericValue().get("quantityToProduce") ?: 0.0;
// Find the inventory items produced
- inventoryItems = delegator.findByAnd("WorkEffortInventoryProduced", [workEffortId : productionRunId], null, false);
+ inventoryItems = from("WorkEffortInventoryProduced").where("workEffortId", productionRunId).queryList();
context.inventoryItems = inventoryItems;
if (inventoryItems) {
lastWorkEffortInventoryProduced = (GenericValue)inventoryItems.get(inventoryItems.size() - 1);
@@ -95,7 +95,7 @@ if (productionRunId) {
// routingTask update sub-screen
routingTaskId = parameters.routingTaskId;
if (routingTaskId && (actionForm.equals("UpdateRoutingTask") || actionForm.equals("EditRoutingTask"))) {
- routingTask = delegator.findOne("WorkEffort", [workEffortId : routingTaskId], false);
+ routingTask = from("WorkEffort").where("workEffortId", routingTaskId).queryOne();
Map routingTaskData = routingTask.getAllFields();
routingTaskData.estimatedSetupMillis = routingTask.getDouble("estimatedSetupMillis");
routingTaskData.estimatedMilliSeconds = routingTask.getDouble("estimatedMilliSeconds");
@@ -105,7 +105,7 @@ if (productionRunId) {
// Get the list of deliverable products, i.e. the WorkEffortGoodStandard entries
// with workEffortGoodStdTypeId = "PRUNT_PROD_DELIV":
// first of all we get the template task (the routing task)
- templateTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", [workEffortIdTo : routingTask.workEffortId, workEffortAssocTypeId : "WORK_EFF_TEMPLATE"], null, false)));
+ templateTaskAssoc = from("WorkEffortAssoc").where("workEffortIdTo", routingTask.workEffortId, "workEffortAssocTypeId", "WORK_EFF_TEMPLATE").filterByDate().queryFirst();
templateTask = [:];
if (templateTaskAssoc) {
templateTask = templateTaskAssoc.getRelatedOne("FromWorkEffort", false);
@@ -116,7 +116,7 @@ if (productionRunId) {
}
context.delivProducts = delivProducts;
// Get the list of delivered products, i.e. inventory items
- prunInventoryProduced = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : routingTaskId], null, false);
+ prunInventoryProduced = from("WorkEffortAndInventoryProduced").where("workEffortId", routingTaskId).queryList();
context.prunInventoryProduced = prunInventoryProduced;
}
@@ -130,9 +130,8 @@ if (productionRunId) {
if ("PRUN_RUNNING".equals(task.currentStatusId)) {
// Use WorkEffortGoodStandard to figure out if there are products which are needed for this task (PRUNT_PRODNEEDED) and which have not been issued (ie, WEGS_CREATED).
// If so this task should have products issued
- components = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId, workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false);
- List notIssued = EntityUtil.filterByAnd(components, [statusId : "WEGS_CREATED"]);
- if (components && notIssued) {
+ components = from("WorkEffortGoodStandard").where("workEffortId", task.workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", "statusId", "WEGS_CREATED").queryList();
+ if (components) {
issueTaskId = task.workEffortId;
}
if (!issueTaskId) {
@@ -170,7 +169,7 @@ if (productionRunId) {
componentData.internalName = componentName;
componentData.workEffortName = workEffortName;
componentData.facilityId = productionRunTask.facilityId;
- issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", [workEffortId : component.workEffortId, productId : product.productId], null, false);
+ issuances = from("WorkEffortAndInventoryAssign").where("workEffortId", component.workEffortId, "productId", product.productId).queryList();
totalIssued = 0.0;
issuances.each { issuance ->
issued = issuance.quantity;
@@ -178,10 +177,10 @@ if (productionRunId) {
totalIssued += issued;
}
}
- returns = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : component.workEffortId , productId : product.productId], null, false);
+ returns = from("WorkEffortAndInventoryProduced").where("workEffortId", component.workEffortId , "productId", product.productId).queryList();
totalReturned = 0.0;
returns.each { returned ->
- returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", [inventoryItemId : returned.inventoryItemId], ["inventoryItemDetailSeqId"], false));
+ returnDetail = from("InventoryItemDetail").where("inventoryItemId", returned.inventoryItemId).orderBy("inventoryItemDetailSeqId").queryFirst();
if (returnDetail) {
qtyReturned = returnDetail.quantityOnHandDiff;
if (qtyReturned) {
@@ -206,7 +205,7 @@ if (productionRunId) {
}
}
// Content
- productionRunContents = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortContentAndInfo", [workEffortId : productionRunId], ["-fromDate"], false));
+ productionRunContents = from("WorkEffortContentAndInfo").where("workEffortId", productionRunId).orderBy("-fromDate").filterByDate().queryList();
context.productionRunContents = productionRunContents;
context.productionRunComponentsData = productionRunComponentsData;
context.productionRunComponentsDataReadyForIssuance = productionRunComponentsDataReadyForIssuance;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy Mon Jan 5 08:50:30 2015
@@ -22,7 +22,7 @@ import org.ofbiz.widget.html.HtmlFormWra
productionRunId = parameters.productionRunId ?: parameters.workEffortId;
taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
tasks.each { task ->
records = task.getRelated("WorkEffortFixedAssetAssign", null, null, false);
HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskFixedAssets", request, response);
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy Mon Jan 5 08:50:30 2015
@@ -44,7 +44,7 @@ if (productionRunId) {
context.productionRunData = productionRunData;
// Find all the order items to which this production run is linked.
- orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false);
+ orderItems = from("WorkOrderItemFulfillment").where("workEffortId", productionRunId).queryList();
if (orderItems) {
context.orderItems = orderItems;
}
@@ -55,7 +55,7 @@ if (productionRunId) {
context.productionRunComponents = productionRun.getProductionRunComponents();;
// Find all the notes linked to this production run.
- productionRunNoteData = delegator.findByAnd("WorkEffortNoteAndData", [workEffortId : productionRunId], null, false);
+ productionRunNoteData = from("WorkEffortNoteAndData").where("workEffortId", productionRunId).queryList();
if (productionRunNoteData) {
context.productionRunNoteData = productionRunNoteData;
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy Mon Jan 5 08:50:30 2015
@@ -25,7 +25,7 @@ import org.ofbiz.manufacturing.jobshopmg
shipmentPlans = [];
rows = [];
if (shipment && shipment.shipmentId) {
- shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipment.shipmentId], null, false);
+ shipmentPlans = from("OrderShipment").where("shipmentId", shipment.shipmentId).queryList();
}
if (shipmentPlans) {
workInProgress = "false";
@@ -67,7 +67,7 @@ if (shipmentPlans) {
// Total quantity planned not issued
plannedQuantity = 0.0;
qtyPlannedInShipment = [:];
- plans = delegator.findByAnd("OrderShipment", [orderId : orderItem.orderId ,orderItemSeqId : orderItem.orderItemSeqId], null, false);
+ plans = from("OrderShipment").where("orderId", orderItem.orderId ,"orderItemSeqId", orderItem.orderItemSeqId).queryList();
plans.each { plan ->
if (plan.quantity) {
netPlanQty = plan.quantity;
@@ -120,7 +120,7 @@ if (shipmentPlans) {
}
oneRow.weight = weight;
if (product.weightUomId) {
- weightUom = delegator.findOne("Uom", [uomId : product.weightUomId], true);
+ weightUom = from("Uom").where("uomId", product.weightUomId).cache(true).queryOne();
oneRow.weightUom = weightUom.abbreviation;
}
volume = 0.0;
@@ -138,16 +138,16 @@ if (shipmentPlans) {
product.widthUomId &&
product.depthUomId) {
- heightUom = delegator.findOne("Uom", [uomId : product.heightUomId], true);
- widthUom = delegator.findOne("Uom", [uomId : product.widthUomId], true);
- depthUom = delegator.findOne("Uom", [uomId : product.depthUomId], true);
+ heightUom = from("Uom").where("uomId", product.heightUomId).cache(true).queryOne();
+ widthUom = from("Uom").where("uomId", product.widthUomId).cache(true).queryOne();
+ depthUom = from("Uom").where("uomId", product.depthUomId).cache(true).queryOne();
oneRow.volumeUom = heightUom.abbreviation + "x" +
widthUom.abbreviation + "x" +
depthUom.abbreviation;
}
rows.add(oneRow);
// Select the production runs, if available
- productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId, shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"], null, false); // TODO: add shipmentId
+ productionRuns = from("WorkOrderItemFulfillment").where("orderId", shipmentPlan.orderId, "orderItemSeqId", shipmentPlan.orderItemSeqId, "shipGroupSeqId", shipmentPlan.shipGroupSeqId).orderBy("workEffortId").queryList();
if (productionRuns) {
workInProgress = "true";
productionRunsId = "";
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy Mon Jan 5 08:50:30 2015
@@ -60,7 +60,7 @@ if (lookupFlag) {
if ( mainCond) {
// do the lookup
- inventoryList = delegator.findList("MrpEvent", mainCond, null, ["productId", "eventDate"], null, false);
+ inventoryList = from("MrpEvent").where(mainCond).orderBy("productId", "eventDate").queryList();
}
context.inventoryList = inventoryList;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy Mon Jan 5 08:50:30 2015
@@ -24,15 +24,15 @@ import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.product.category.CategoryWorker;
if (productCategoryIdPar) {
- category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+ category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
context.category = category;
}
if (productFeatureTypeIdPar) {
- featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : productFeatureTypeIdPar], false);
+ featureType = from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeIdPar).queryOne();
context.featureType = featureType;
}
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName],["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName).orderBy("productId").queryList();
productionRuns = [];
features = [:]; // each entry is a productFeatureId|{productFeature,products}
products = [:]; // each entry is a productId|{product,quantity}
@@ -43,15 +43,14 @@ if (!productFeatureTypeIdPar) {
if (allProductionRuns) {
allProductionRuns.each { productionRun ->
// select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
- productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
- productionRunTask = EntityUtil.getFirst(productionRunTasks);
+ productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
if (!productionRunTask) {
// the production run doesn't include the given task, skip it
return;
}
// select the task's components, if any
- allProductionRunComponents = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunTask.workEffortId,workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false);
+ allProductionRunComponents = from("WorkEffortGoodStandard").where("workEffortId", productionRunTask.workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED").queryList();
allProductionRunComponents.each { productionRunComponent ->
// verify if the product is a member of the given category (based on the report's parameter)
if (productCategoryIdPar) {
@@ -60,19 +59,16 @@ if (allProductionRuns) {
return;
}
}
- productionRunProduct = delegator.findOne("Product", [productId : productionRunComponent.productId], false);
+ productionRunProduct = from("Product").where("productId", productionRunComponent.productId).queryOne();
location = null;
if (productionRunProduct) {
- locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRunProduct.productId], null, false);
- location = EntityUtil.getFirst(locations);
+ location = from("ProductFacilityLocation").where("facilityId", productionRun.facilityId, "productId", productionRunProduct.productId).queryFirst();
}
// group by standard feature of type productFeatureTypeIdPar
if (productFeatureTypeIdPar) {
- standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRunComponent.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false);
- standardFeatures = EntityUtil.filterByDate(standardFeatures);
- standardFeature = EntityUtil.getFirst(standardFeatures);
+ standardFeature = from("ProductFeatureAndAppl").where("productFeatureTypeId", productFeatureTypeIdPar, "productId", productionRunComponent.productId, "productFeatureApplTypeId", "STANDARD_FEATURE").filterByDate().queryFirst();
standardFeatureId = null;
if (standardFeature) {
standardFeatureId = standardFeature.productFeatureId;
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy Mon Jan 5 08:50:30 2015
@@ -25,11 +25,11 @@ import org.ofbiz.manufacturing.jobshopmg
import org.ofbiz.order.order.OrderReadHelper;
if (productCategoryIdPar) {
- category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+ category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
context.category = category;
}
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUN_PROD_DELIV"], ["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV").orderBy("productId").queryList();
productionRuns = [];
if (allProductionRuns) {
@@ -41,16 +41,14 @@ if (allProductionRuns) {
return;
}
}
- productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+ productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId);
- productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false);
- productionRunOrder = EntityUtil.getFirst(productionRunOrders);
+ productionRunOrder = from("WorkOrderItemFulfillment").where("workEffortId", rootProductionRunId).queryFirst();
OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId);
// select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
- productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
- productionRunTask = EntityUtil.getFirst(productionRunTasks);
+ productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
if (!productionRunTask) {
// the production run doesn't include the given task, skip it
return;
@@ -62,12 +60,13 @@ if (allProductionRuns) {
productionRunOrder : productionRunOrder,
customer : orh.getPlacingParty(),
address : orh.getShippingAddress()];
- allProductionComponents = delegator.findByAnd("WorkEffortAndGoods", [workEffortId : productionRunTask.workEffortId, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], ["productId"], false);
+ allProductionComponents = from("WorkEffortAndGoods").where("workEffortId", productionRunTask.workEffortId, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED").orderBy("productId").queryList();
+
componentList = [];
if (allProductionComponents) {
allProductionComponents.each { productionComponent ->
- productionRunProductComp = delegator.findOne("Product", [productId : productionComponent.productId], false);
+ productionRunProductComp = from("Product").where("productId", productionComponent.productId).queryOne();
productionRunProductMap = [component : productionComponent,componentProduct : productionRunProductComp];
componentList.add(productionRunProductMap);
}
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy Mon Jan 5 08:50:30 2015
@@ -25,11 +25,11 @@ import org.ofbiz.manufacturing.jobshopmg
import org.ofbiz.order.order.OrderReadHelper;
if (productCategoryIdPar) {
- category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+ category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
context.category = category;
}
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", UtilMisc.toMap("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV"), UtilMisc.toList("productId"), false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV").orderBy("productId").queryList();
productionRuns = [];
if (allProductionRuns) {
@@ -41,14 +41,12 @@ if (allProductionRuns) {
return;
}
}
- productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+ productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId);
- productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false);
- productionRunOrder = EntityUtil.getFirst(productionRunOrders);
+ productionRunOrder = from("WorkOrderItemFulfillment").where("workEffortId", rootProductionRunId).queryFirst();
OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId);
- locations = delegator.findByAnd("ProductFacilityLocation", [productId : productionRun.productId, facilityId : productionRun.facilityId], null, false);
- location = EntityUtil.getFirst(locations);
+ location = from("ProductFacilityLocation").where("productId", productionRun.productId, "facilityId", productionRun.facilityId).queryFirst();
productionRunMap = [productionRun : productionRun,
product : productionRunProduct,
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy Mon Jan 5 08:50:30 2015
@@ -23,15 +23,15 @@
import org.ofbiz.entity.util.EntityUtil;
if (productCategoryIdPar) {
- category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+ category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
context.category = category;
}
if (productFeatureTypeIdPar) {
- featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : productFeatureTypeIdPar], false);
+ featureType = from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeIdPar).queryOne();
context.featureType = featureType;
}
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName).orderBy("productId").queryList();
productionRuns = [:];
features = [];
if (!productFeatureTypeIdPar) {
@@ -47,13 +47,11 @@ if (allProductionRuns) {
return;
}
}
- productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+ productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
// group by standard feature of type productFeatureTypeIdPar
if (productFeatureTypeIdPar) {
- standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRun.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false);
- standardFeatures = EntityUtil.filterByDate(standardFeatures);
- standardFeature = EntityUtil.getFirst(standardFeatures);
+ standardFeature = from("ProductFeatureAndAppl").where("productFeatureTypeId", productFeatureTypeIdPar, "productId", productionRun.productId, "productFeatureApplTypeId", "STANDARD_FEATURE").filterByDate().queryFirst();
standardFeatureId = null;
if (standardFeature) {
standardFeatureId = standardFeature.productFeatureId;
@@ -66,8 +64,7 @@ if (allProductionRuns) {
}
// select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
- productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
- productionRunTask = EntityUtil.getFirst(productionRunTasks);
+ productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
if (!productionRunTask) {
// the production run doesn't include the given task, skip it
return;