Administrator
|
Hi Bilgin,
This does not follow best practices http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-DeprecatingEntities Though, with the migrating service you provided, most is done :o) Thanks Jacques > Author: bibryam > Date: Sun Nov 22 20:17:38 2009 > New Revision: 883140 > > URL: http://svn.apache.org/viewvc?rev=883140&view=rev > Log: > Renamed AgreementWorkEffortAppl entity to AgreementWorkEffortApplic in order to change relation types so that assigning > WorkEfforts to Agreements is possible w/o specifying an agreementItemSeqId. > Added a migrateAgreementWorkEffortAppl service to migrate existing data to the new entity. > > Added: > ofbiz/trunk/applications/party/entitydef/entitymodel_old.xml > Modified: > ofbiz/trunk/applications/accounting/config/AccountingHelpUrls.xml > ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml > ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml > ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml > ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml > ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml > ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml > ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml > ofbiz/trunk/applications/accounting/widget/AgreementForms.xml > ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml > ofbiz/trunk/applications/party/entitydef/entitymodel.xml > ofbiz/trunk/applications/party/ofbiz-component.xml > ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml > ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml > ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml > ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml > > Modified: ofbiz/trunk/applications/accounting/config/AccountingHelpUrls.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingHelpUrls.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/config/AccountingHelpUrls.xml (original) > +++ ofbiz/trunk/applications/accounting/config/AccountingHelpUrls.xml Sun Nov 22 20:17:38 2009 > @@ -203,8 +203,8 @@ > <value xml:lang="en">09.3 Agreement Items</value> > <value xml:lang="zh">09.3 ååæ¡æ¬¾</value> > </property> > - <property key="ACCOUNTING_EditAgreementWorkEffortAppls"> > - <value xml:lang="en">09.4 Agreement Work Effort Appls</value> > + <property key="ACCOUNTING_EditAgreementWorkEffortApplics"> > + <value xml:lang="en">09.4 Agreement Work Effort Applics</value> > <value xml:lang="zh">09.4 åå人工æå¡ç¨é</value> > </property> > <property key="ACCOUNTING_EditAgreementRoles"> > > Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) > +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Sun Nov 22 20:17:38 2009 > @@ -215,11 +215,11 @@ > <value xml:lang="th">รหัสหà¸à¹à¸§à¸¢à¸§à¸±à¸à¸à¸³à¸à¸§à¸à¹à¸à¸´à¸</value> > <value xml:lang="zh">å®é éé¢è´§å¸åä½æ è¯</value> > </property> > - <property key="AccountingAddAgreementWorkEffortAppl"> > + <property key="AccountingAddAgreementWorkEffortApplic"> > <value xml:lang="de">Vereinbarung-Arbeitseinsatz hinzufügen</value> > - <value xml:lang="en">Add Agreement Work Effort Appl</value> > + <value xml:lang="en">Add Agreement Work Effort Applic</value> > <value xml:lang="fr">Ajouter une application de tâche d'accord commercial</value> > - <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§ à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤¯à¤¾à¤¸ > ठनà¥à¤ªà¥à¤°à¤¯à¥à¤(AgreementWorkEffortAppl) बनाà¤à¤</value> > + <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§ à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤¯à¤¾à¤¸ > ठनà¥à¤ªà¥à¤°à¤¯à¥à¤(AgreementWorkEffortApplic) बनाà¤à¤</value> > <value xml:lang="it">Aggiungi Applicazione Termine Impegno di Lavoro</value> > <value xml:lang="nl">Voeg Werkinzettoepassing van overeenkomt toe</value> > <value xml:lang="zh">æ·»å å议人工æå¡ç¨é</value> > @@ -647,16 +647,16 @@ > <value xml:lang="th">รหัสà¸à¸£à¸°à¹à¸ à¸à¸ªà¸±à¸à¸à¸²</value> > <value xml:lang="zh">ååç±»åæ è¯</value> > </property> > - <property key="AccountingAgreementWorkEffortApplAlreadyExists"> > - <value xml:lang="en">Agreement Work Effort Appl Already Exists</value> > + <property key="AccountingAgreementWorkEffortApplicAlreadyExists"> > + <value xml:lang="en">Agreement Work Effort Applic Already Exists</value> > <value xml:lang="fr">Cette tâche d'application d'accord commercial existe déjà </value> > <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§ - à¤à¤¾à¤® पà¥à¤°à¤¯à¤¾à¤¸ à¤à¤¾ ठनà¥à¤ªà¥à¤°à¤¯à¥à¤ पहलॠ> सॠहॠमà¥à¤à¥à¤¦ हà¥</value> > <value xml:lang="it">Applicazioni contratto impegno di labovo già esistente</value> > - <value xml:lang="nl">Overeenkomst Work Effort Appl bestaat al</value> > + <value xml:lang="nl">Overeenkomst Work Effort Applic bestaat al</value> > <value xml:lang="zh">åå人工æå¡ç¨éå·²åå¨</value> > </property> > - <property key="AccountingAgreementWorkEffortAppls"> > - <value xml:lang="en">Agreement Work Effort Appls</value> > + <property key="AccountingAgreementWorkEffortApplics"> > + <value xml:lang="en">Agreement Work Effort Applics</value> > <value xml:lang="fr">Applications de tâche d'accord commercial</value> > <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§- à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤¯à¤¾à¤¸ ठनà¥à¤ªà¥à¤°à¤¯à¥à¤</value> > <value xml:lang="it">Applicazioni Impegni di Lavoro</value> > @@ -5487,9 +5487,9 @@ > <value xml:lang="th">à¸à¸¥à¸£à¸§à¸¡à¹à¸à¸§</value> > <value xml:lang="zh">æ»è¡æ°</value> > </property> > - <property key="AccountingListAgreementWorkEffortAppls"> > + <property key="AccountingListAgreementWorkEffortApplics"> > <value xml:lang="de">Zugewiesene Arbeitseinsätze zu Vereinbarungen auflisten</value> > - <value xml:lang="en">List Agreement Work Effort Appls</value> > + <value xml:lang="en">List Agreement Work Effort Applics</value> > <value xml:lang="fr">Liste des applications d'accords commerciaux de service</value> > <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§- à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤¯à¤¾à¤¸ ठनà¥à¤ªà¥à¤°à¤¯à¥à¤ à¤à¥ > सà¥à¤à¥</value> > <value xml:lang="it">Lista applicazioni contratto impegno di lavoro</value> > @@ -12631,8 +12631,8 @@ > <value xml:lang="th">à¹à¸à¹à¹à¸à¸ªà¸±à¸à¸à¸²à¸à¸µà¹à¸à¸³à¸«à¸à¸</value> > <value xml:lang="zh">ç¼è¾ååæ¡ä»¶</value> > </property> > - <property key="PageTitleEditAgreementWorkEffortAppls"> > - <value xml:lang="en">Edit Agreement Work Effort Appls</value> > + <property key="PageTitleEditAgreementWorkEffortApplics"> > + <value xml:lang="en">Edit Agreement Work Effort Applics</value> > <value xml:lang="fr">Modifier les application d'accords commerciaux de service</value> > <value xml:lang="hi_IN">ठनà¥à¤¬à¤à¤§-à¤à¤¾à¤°à¥à¤¯ पà¥à¤°à¤¯à¤¾à¤¸ ठनà¥à¤ªà¥à¤°à¤¯à¥à¤ > सà¤à¤ªà¤¾à¤¦à¤¿à¤¤ à¤à¤°à¥à¤</value> > <value xml:lang="it">Aggiorna Applicazioni Impegno di Lavoro</value> > > Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml (original) > +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/UpgradeServices.xml Sun Nov 22 20:17:38 2009 > @@ -68,4 +68,14 @@ > </if-empty> > </iterate> > </simple-method> > + > + <simple-method method-name="migrateAgreementWorkEffortAppl" short-description="Copy AgreementWorkEffortAppl To > AgreementWorkEffortApplic"> > + <entity-condition list="agreementWorkEffortApplList" entity-name="OldAgreementWorkEffortAppl"/> > + <iterate list="agreementWorkEffortApplList" entry="agreementWorkEffortAppl"> > + <make-value value-field="newEntity" entity-name="AgreementWorkEffortApplic"/> > + <set-pk-fields map="agreementWorkEffortAppl" value-field="newEntity"/> > + <create-value value-field="newEntity"/> > + <check-errors/> > + </iterate> > + </simple-method> > </simple-methods> > \ No newline at end of file > > Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml (original) > +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml Sun Nov 22 20:17:38 2009 > @@ -308,23 +308,23 @@ > <remove-value value-field="agreementRole"/> > </simple-method> > > - <!--AgreementWorkEffortAppl--> > - <simple-method method-name="createAgreementWorkEffortAppl" short-description="Create a link between a WorkEffort and a > Agreement Appl"> > - <entity-one entity-name="AgreementWorkEffortAppl" value-field="agreementWorkEffortAppl"/> > - <if-not-empty field="agreementWorkEffortAppl"> > - <add-error><fail-property resource="AccountingUiLabels" > property="AccountingAgreementWorkEffortApplAlreadyExists"/></add-error> > + <!--AgreementWorkEffortApplic--> > + <simple-method method-name="createAgreementWorkEffortApplic" short-description="Create a link between a WorkEffort and a > Agreement Appl"> > + <entity-one entity-name="AgreementWorkEffortApplic" value-field="agreementWorkEffortApplic"/> > + <if-not-empty field="agreementWorkEffortApplic"> > + <add-error><fail-property resource="AccountingUiLabels" > property="AccountingAgreementWorkEffortApplicAlreadyExists"/></add-error> > <check-errors/> > <else> > - <make-value value-field="newEntity" entity-name="AgreementWorkEffortAppl"/> > + <make-value value-field="newEntity" entity-name="AgreementWorkEffortApplic"/> > <set-pk-fields map="parameters" value-field="newEntity"/> > <create-value value-field="newEntity"/> > </else> > </if-not-empty> > </simple-method> > > - <simple-method method-name="deleteAgreementWorkEffortAppl" short-description="Remove a link between a WorkEffort and a > Agreement Appl"> > - <entity-one entity-name="AgreementWorkEffortAppl" value-field="agreementWorkEffortAppl"/> > - <remove-value value-field="agreementWorkEffortAppl"/> > + <simple-method method-name="deleteAgreementWorkEffortApplic" short-description="Remove a link between a WorkEffort and a > Agreement Appl"> > + <entity-one entity-name="AgreementWorkEffortApplic" value-field="agreementWorkEffortApplic"/> > + <remove-value value-field="agreementWorkEffortApplic"/> > </simple-method> > > </simple-methods> > > Modified: ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml (original) > +++ ofbiz/trunk/applications/accounting/servicedef/services_agreement.xml Sun Nov 22 20:17:38 2009 > @@ -235,15 +235,16 @@ > <attribute name="commissions" type="List" mode="OUT" optional="false"/> > </service> > > - <!--AgrementWorkEffortAppl--> > - <service name="createAgreementWorkEffortAppl" engine="simple" default-entity-name="AgreementWorkEffortAppl" > - location="component://accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml" > invoke="createAgreementWorkEffortAppl"> > - <description> Create AgreementWorkEffortAppl </description> > + <!--AgrementWorkEffortApplic--> > + <service name="createAgreementWorkEffortApplic" engine="simple" default-entity-name="AgreementWorkEffortApplic" > + location="component://accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml" > invoke="createAgreementWorkEffortApplic"> > + <description> Create AgreementWorkEffortApplic </description> > <auto-attributes include="pk" mode="IN" optional="false"/> > + <override name="agreementItemSeqId" default-value="_NA_"></override> > </service> > - <service name="deleteAgreementWorkEffortAppl" engine="simple" default-entity-name="AgreementWorkEffortAppl" > - location="component://accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml" > invoke="deleteAgreementWorkEffortAppl"> > - <description>Delete AgreementWorkEffortAppl</description> > + <service name="deleteAgreementWorkEffortApplic" engine="simple" default-entity-name="AgreementWorkEffortApplic" > + location="component://accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml" > invoke="deleteAgreementWorkEffortApplic"> > + <description>Delete AgreementWorkEffortApplic</description> > <auto-attributes mode="IN" include="pk" optional="false"/> > </service> > > > Modified: ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml (original) > +++ ofbiz/trunk/applications/accounting/servicedef/services_upgrade.xml Sun Nov 22 20:17:38 2009 > @@ -48,4 +48,10 @@ > <description>Copy the FixedAssetMaintMeter entity to FixedAssetMeter. FixedAssetMeter.readingDate will be replaced with > FixedAssetMaintMeter.createdStamp.</description> > <permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/> > </service> > + > + <service name="migrateAgreementWorkEffortAppl" engine="simple" > + location="component://accounting/script/org/ofbiz/accounting/UpgradeServices.xml" > invoke="migrateAgreementWorkEffortAppl" auth="true"> > + <description>Copy the AgreementWorkEffortAppl entity to AgreementWorkEffortApplic</description> > + <permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/> > + </service> > </services> > \ No newline at end of file > > Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) > +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sun Nov 22 20:17:38 2009 > @@ -1308,21 +1308,21 @@ > </request-map> > > <!--WorkEffort Agreements--> > - <request-map uri="EditAgreementWorkEffortAppls"> > + <request-map uri="EditAgreementWorkEffortApplics"> > <security https="true" auth="true"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > - <request-map uri="createAgreementWorkEffortAppl"> > + <request-map uri="createAgreementWorkEffortApplic"> > <security https="true" auth="true"/> > - <event type="service" invoke="createAgreementWorkEffortAppl"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > - <response name="error" type="view" value="EditAgreementWorkEffortAppls"/> > + <event type="service" invoke="createAgreementWorkEffortApplic"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > + <response name="error" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > - <request-map uri="deleteAgreementWorkEffortAppl"> > + <request-map uri="deleteAgreementWorkEffortApplic"> > <security https="true" auth="true"/> > - <event type="service" invoke="deleteAgreementWorkEffortAppl"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > - <response name="error" type="view" value="EditAgreementWorkEffortAppls"/> > + <event type="service" invoke="deleteAgreementWorkEffortApplic"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > + <response name="error" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > > <!-- TaxAuthority Requests --> > @@ -2629,7 +2629,7 @@ > <view-map name="EditAgreementItemParty" type="screen" > page="component://accounting/widget/AgreementScreens.xml#EditAgreementItemParty"/> > <view-map name="ListAgreementGeographicalApplic" type="screen" > page="component://accounting/widget/AgreementScreens.xml#ListAgreementGeographicalApplic"/> > <view-map name="EditAgreementGeographicalApplic" type="screen" > page="component://accounting/widget/AgreementScreens.xml#EditAgreementGeographicalApplic"/> > - <view-map name="EditAgreementWorkEffortAppls" type="screen" > page="component://accounting/widget/AgreementScreens.xml#EditAgreementWorkEffortAppls"/> > + <view-map name="EditAgreementWorkEffortApplics" type="screen" > page="component://accounting/widget/AgreementScreens.xml#EditAgreementWorkEffortApplics"/> > > <!-- TaxAuthority --> > <view-map name="FindTaxAuthority" type="screen" > page="component://accounting/widget/TaxAuthorityScreens.xml#FindTaxAuthority"/> > > Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original) > +++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Sun Nov 22 20:17:38 2009 > @@ -991,8 +991,8 @@ > <parameter param-name="agreementId" from-field="agreement.agreementId"/> > </link> > </menu-item> > - <menu-item name="AgreementWorkEffortAppls" title="${uiLabelMap.AccountingAgreementWorkEffortAppls}"> > - <link target="EditAgreementWorkEffortAppls"> > + <menu-item name="AgreementWorkEffortApplics" title="${uiLabelMap.AccountingAgreementWorkEffortApplics}"> > + <link target="EditAgreementWorkEffortApplics"> > <parameter param-name="agreementId" from-field="agreement.agreementId"/> > </link> > </menu-item> > > Modified: ofbiz/trunk/applications/accounting/widget/AgreementForms.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AgreementForms.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/widget/AgreementForms.xml (original) > +++ ofbiz/trunk/applications/accounting/widget/AgreementForms.xml Sun Nov 22 20:17:38 2009 > @@ -556,12 +556,13 @@ > <submit button-type="button"/> > </field> > </form> > - <!-- Agreement WorkEffort Appl--> > - <form name="AddAgreementWorkEffortAppl" target="createAgreementWorkEffortAppl" title="" type="single" > + <!-- Agreement WorkEffort Applic--> > + <form name="AddAgreementWorkEffortApplic" target="createAgreementWorkEffortApplic" title="" type="single" > header-row-style="header-row" default-table-style="basic-table"> > <field name="agreementId"><hidden value="${agreementId}"/></field> > <field name="agreementItemSeqId"> > <drop-down allow-empty="false"> > + <option key="_NA_" description="${uiLabelMap.CommonNA}"/> > <entity-options entity-name="AgreementItem" description="${agreementItemSeqId}"> > <entity-constraint name="agreementId" operator="equals" env-name="agreementId"/> > <entity-order-by field-name="agreementItemSeqId"/> > @@ -573,17 +574,17 @@ > </field> > <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit > button-type="button"/></field> > </form> > - <form name="ListAgreementWorkEffortAppls" type="list" target="updateAgreementWorkEffortAppl" > list-name="agreementWorkEffortAppls" > + <form name="ListAgreementWorkEffortApplics" type="list" target="updateAgreementWorkEffortApplic" > list-name="agreementWorkEffortApplics" > odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> > <actions> > - <entity-and entity-name="AgreementWorkEffortAppl" use-cache="true" list="agreementWorkEffortAppls"> > + <entity-and entity-name="AgreementWorkEffortApplic" use-cache="true" list="agreementWorkEffortApplics"> > <field-map from-field="agreementId" field-name="agreementId"/> > </entity-and> > </actions> > <field name="agreementItemSeqId"><display/></field> > <field name="workEffortId"><display/></field> > <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> > - <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteAgreementWorkEffortAppl"> > + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteAgreementWorkEffortApplic"> > <parameter param-name="agreementId"/> > <parameter param-name="agreementItemSeqId"/> > <parameter param-name="workEffortId"/> > > Modified: ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml (original) > +++ ofbiz/trunk/applications/accounting/widget/AgreementScreens.xml Sun Nov 22 20:17:38 2009 > @@ -694,21 +694,21 @@ > </section> > </screen> > > - <screen name="EditAgreementWorkEffortAppls"> > + <screen name="EditAgreementWorkEffortApplics"> > <section> > <actions> > - <set field="titleProperty" value="PageTitleEditAgreementWorkEffortAppls"/> > - <set field="tabButtonItem" value="AgreementWorkEffortAppls"/> > + <set field="titleProperty" value="PageTitleEditAgreementWorkEffortApplics"/> > + <set field="tabButtonItem" value="AgreementWorkEffortApplics"/> > <set field="agreementId" from-field="parameters.agreementId"/> > <entity-one entity-name="Agreement" value-field="agreement" auto-field-map="true"/> > </actions> > <widgets> > <decorator-screen name="CommonAgreementDecorator" location="${parameters.agreementDecoratorLocation}"> > <decorator-section name="body"> > - <screenlet id="AgreementWorkEffortApplsPanel" title="${uiLabelMap.AccountingAddAgreementWorkEffortAppl}" > collapsible="true"> > - <include-form name="AddAgreementWorkEffortAppl" > location="component://accounting/widget/AgreementForms.xml"/> > + <screenlet id="AgreementWorkEffortApplicsPanel" > title="${uiLabelMap.AccountingAddAgreementWorkEffortApplic}" collapsible="true"> > + <include-form name="AddAgreementWorkEffortApplic" > location="component://accounting/widget/AgreementForms.xml"/> > </screenlet> > - <include-form name="ListAgreementWorkEffortAppls" > location="component://accounting/widget/AgreementForms.xml"/> > + <include-form name="ListAgreementWorkEffortApplics" > location="component://accounting/widget/AgreementForms.xml"/> > </decorator-section> > </decorator-screen> > </widgets> > > Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original) > +++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Sun Nov 22 20:17:38 2009 > @@ -379,21 +379,23 @@ > <key-map field-name="agreementTypeId"/> > </relation> > </entity> > - <entity entity-name="AgreementWorkEffortAppl" package-name="org.ofbiz.party.agreement" title="Agreement Product Application > Entity"> > + <entity entity-name="AgreementWorkEffortApplic" > + package-name="org.ofbiz.party.agreement" > + title="Agreement WorkEffort Application Entity"> > <field name="agreementId" type="id-ne"></field> > <field name="agreementItemSeqId" type="id-ne"></field> > <field name="workEffortId" type="id-ne"></field> > <prim-key field="agreementId"/> > <prim-key field="agreementItemSeqId"/> > <prim-key field="workEffortId"/> > - <relation type="one-nofk" rel-entity-name="Agreement"> > + <relation type="one" fk-name="AGRMNT_WEA_AGRMNT" rel-entity-name="Agreement"> > <key-map field-name="agreementId"/> > </relation> > - <relation type="one" fk-name="AGRMNT_WEA_AITM" rel-entity-name="AgreementItem"> > + <relation type="one-nofk" rel-entity-name="AgreementItem"> > <key-map field-name="agreementId"/> > <key-map field-name="agreementItemSeqId"/> > </relation> > - <relation type="one" fk-name="AGRMNT_WEA_WEFF" rel-entity-name="WorkEffort"> > + <relation type="one" fk-name="AGRMNT_WEA_WE" rel-entity-name="WorkEffort"> > <key-map field-name="workEffortId"/> > </relation> > </entity> > > Added: ofbiz/trunk/applications/party/entitydef/entitymodel_old.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel_old.xml?rev=883140&view=auto > ============================================================================== > --- ofbiz/trunk/applications/party/entitydef/entitymodel_old.xml (added) > +++ ofbiz/trunk/applications/party/entitydef/entitymodel_old.xml Sun Nov 22 20:17:38 2009 > @@ -0,0 +1,57 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<!-- > +Licensed to the Apache Software Foundation (ASF) under one > +or more contributor license agreements. See the NOTICE file > +distributed with this work for additional information > +regarding copyright ownership. The ASF licenses this file > +to you under the Apache License, Version 2.0 (the > +"License"); you may not use this file except in compliance > +with the License. You may obtain a copy of the License at > + > +http://www.apache.org/licenses/LICENSE-2.0 > + > +Unless required by applicable law or agreed to in writing, > +software distributed under the License is distributed on an > +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > +KIND, either express or implied. See the License for the > +specific language governing permissions and limitations > +under the License. > +--> > + > +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd"> > + <!-- ========================================================= --> > + <!-- ======================== Defaults ======================= --> > + <!-- ========================================================= --> > + <title>Entity of an Open For Business Project Component</title> > + <description>None</description> > + <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright> > + <author>None</author> > + <version>1.0</version> > + <!-- ========================================================= --> > + <!-- ======================== Data Model ===================== --> > + <!-- The modules in this file are as follows: --> > + <!-- org.ofbiz.party.agreement --> > + <!-- ========================================================= --> > + > + <entity entity-name="OldAgreementWorkEffortAppl" table-name="AGREEMENT_WORKEFFORT_APPL" > + package-name="org.ofbiz.party.agreement" title="Agreement WorkEffort Application Entity"> > + <description>NOTE: this entity is deprecated by AgreementWorkEffortApplic</description> > + <field name="agreementId" type="id-ne"></field> > + <field name="agreementItemSeqId" type="id-ne"></field> > + <field name="workEffortId" type="id-ne"></field> > + <prim-key field="agreementId"/> > + <prim-key field="agreementItemSeqId"/> > + <prim-key field="workEffortId"/> > + <relation type="one-nofk" rel-entity-name="Agreement"> > + <key-map field-name="agreementId"/> > + </relation> > + <relation type="one" fk-name="AGRMNT_WEA_AITM" rel-entity-name="AgreementItem"> > + <key-map field-name="agreementId"/> > + <key-map field-name="agreementItemSeqId"/> > + </relation> > + <relation type="one" fk-name="AGRMNT_WEA_WEFF" rel-entity-name="WorkEffort"> > + <key-map field-name="workEffortId"/> > + </relation> > + </entity> > +</entitymodel> > \ No newline at end of file > > Modified: ofbiz/trunk/applications/party/ofbiz-component.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/ofbiz-component.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/party/ofbiz-component.xml (original) > +++ ofbiz/trunk/applications/party/ofbiz-component.xml Sun Nov 22 20:17:38 2009 > @@ -26,6 +26,7 @@ > <classpath type="dir" location="config"/> > > <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> > + <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/> > <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyTypeData.xml"/> > <entity-resource type="data" reader-name="seed" loader="main" location="data/PartySecurityData.xml"/> > <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyGeoPointData.xml"/> > > Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original) > +++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Sun Nov 22 20:17:38 2009 > @@ -627,21 +627,21 @@ > <request-map uri="LookupAgreementItem"><security auth="true" https="true"/><response name="success" type="view" > value="LookupAgreementItem"/></request-map> > > <!--WorkEffort Agreements--> > - <request-map uri="EditAgreementWorkEffortAppls"> > + <request-map uri="EditAgreementWorkEffortApplics"> > <security https="true" auth="true"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > - <request-map uri="createAgreementWorkEffortAppl"> > + <request-map uri="createAgreementWorkEffortApplic"> > <security https="true" auth="true"/> > - <event type="service" invoke="createAgreementWorkEffortAppl"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > - <response name="error" type="view" value="EditAgreementWorkEffortAppls"/> > + <event type="service" invoke="createAgreementWorkEffortApplic"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > + <response name="error" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > - <request-map uri="deleteAgreementWorkEffortAppl"> > + <request-map uri="deleteAgreementWorkEffortApplic"> > <security https="true" auth="true"/> > - <event type="service" invoke="deleteAgreementWorkEffortAppl"/> > - <response name="success" type="view" value="EditAgreementWorkEffortAppls"/> > - <response name="error" type="view" value="EditAgreementWorkEffortAppls"/> > + <event type="service" invoke="deleteAgreementWorkEffortApplic"/> > + <response name="success" type="view" value="EditAgreementWorkEffortApplics"/> > + <response name="error" type="view" value="EditAgreementWorkEffortApplics"/> > </request-map> > > <!--WorkEffort Event Reminders --> > @@ -750,7 +750,7 @@ > <view-map name="LookupContactMech" type="screen" > page="component://party/widget/partymgr/LookupScreens.xml#LookupContactMech"/> > <view-map name="LookupPreferredContactMech" type="screen" > page="component://marketing/widget/ContactListScreens.xml#LookupPreferredContactMech"/> > > - <view-map name="EditAgreementWorkEffortAppls" type="screen" > page="component://workeffort/widget/WorkEffortScreens.xml#EditAgreementWorkEffortAppls"/> > + <view-map name="EditAgreementWorkEffortApplics" type="screen" > page="component://workeffort/widget/WorkEffortScreens.xml#EditAgreementWorkEffortApplics"/> > <view-map name="LookupAgreement" page="component://accounting/widget/LookupScreens.xml#LookupAgreement" type="screen"/> > <view-map name="LookupAgreementItem" page="component://accounting/widget/LookupScreens.xml#LookupAgreementItem" > type="screen"/> > <view-map name="newEvent" type="screen" page="component://workeffort/widget/WorkEffortScreens.xml#newCompanyEvent"/> > > Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml (original) > +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Sun Nov 22 20:17:38 2009 > @@ -1183,7 +1183,7 @@ > </field> > </form> > <!-- Agreement WorkEffort Appl--> > - <form name="AddAgreementWorkEffortAppl" target="createAgreementWorkEffortAppl" title="" type="single" > + <form name="AddAgreementWorkEffortApplic" target="createAgreementWorkEffortApplic" title="" type="single" > header-row-style="header-row" default-table-style="basic-table"> > <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> > <field name="agreementId"> > @@ -1194,10 +1194,10 @@ > </field> > <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit > button-type="button"/></field> > </form> > - <form name="ListAgreementWorkEffortAppls" type="list" target="updateAgreementWorkEffortAppl" > list-name="agreementWorkEffortAppls" > + <form name="ListAgreementWorkEffortApplics" type="list" target="updateAgreementWorkEffortApplic" > list-name="agreementWorkEffortApplics" > odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> > <actions> > - <entity-and entity-name="AgreementWorkEffortAppl" use-cache="true" list="agreementWorkEffortAppls"> > + <entity-and entity-name="AgreementWorkEffortApplic" use-cache="true" list="agreementWorkEffortApplics"> > <field-map from-field="workEffortId" field-name="workEffortId"/> > </entity-and> > </actions> > @@ -1211,7 +1211,7 @@ > <field name="agreementItemSeqId"><display/></field> > <field name="workEffortId"><display/></field> > <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> > - <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteAgreementWorkEffortAppl"> > + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteAgreementWorkEffortApplic"> > <parameter param-name="agreementId"/> > <parameter param-name="agreementItemSeqId"/> > <parameter param-name="workEffortId"/> > > Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml (original) > +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortMenus.xml Sun Nov 22 20:17:38 2009 > @@ -125,7 +125,7 @@ > </link> > </menu-item> > <menu-item name="WorkEffortAgreementAppls" title="${uiLabelMap.WorkEffortAgreementAppls}"> > - <link target="EditAgreementWorkEffortAppls"> > + <link target="EditAgreementWorkEffortApplics"> > <parameter param-name="workEffortId"/> > </link> > </menu-item> > > Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml?rev=883140&r1=883139&r2=883140&view=diff > ============================================================================== > --- ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml (original) > +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortScreens.xml Sun Nov 22 20:17:38 2009 > @@ -704,20 +704,20 @@ > </widgets> > </section> > </screen> > - <screen name="EditAgreementWorkEffortAppls"> > + <screen name="EditAgreementWorkEffortApplics"> > <section> > <actions> > - <set field="titleProperty" value="PageTitleEditAgreementWorkEffortAppls"/> > + <set field="titleProperty" value="PageTitleEditAgreementWorkEffortApplics"/> > <set field="tabButtonItem" value="WorkEffortAgreementAppls"/> > <set field="workEffortId" from-field="parameters.workEffortId"/> > </actions> > <widgets> > <decorator-screen name="CommonWorkEffortDecorator" location="${parameters.mainDecoratorLocation}"> > <decorator-section name="body"> > - <screenlet id="AddAccountingAgreementWorkEffortApplsPanel" > title="${uiLabelMap.AccountingAddAgreementWorkEffortAppl}" collapsible="true"> > - <include-form name="AddAgreementWorkEffortAppl" > location="component://workeffort/widget/WorkEffortForms.xml"/> > + <screenlet id="AddAccountingAgreementWorkEffortApplicsPanel" > title="${uiLabelMap.AccountingAddAgreementWorkEffortApplic}" collapsible="true"> > + <include-form name="AddAgreementWorkEffortApplic" > location="component://workeffort/widget/WorkEffortForms.xml"/> > </screenlet> > - <include-form name="ListAgreementWorkEffortAppls" > location="component://workeffort/widget/WorkEffortForms.xml"/> > + <include-form name="ListAgreementWorkEffortApplics" > location="component://workeffort/widget/WorkEffortForms.xml"/> > </decorator-section> > </decorator-screen> > </widgets> > > |
Hi Jacques,
could you tell me why it doesn't follow the best practice? If it is about the info that should be put in http://docs.ofbiz.org/display/OFBTECH/Revisions+Requiring+Data+Migration I did it with some delay, because yesterday I had difficulties accessing the page. If there is another reason, please indicate it, so I can fix that. Thanks Bilgin Jacques Le Roux wrote: > Hi Bilgin, > > This does not follow best practices > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-DeprecatingEntities > > Though, with the migrating service you provided, most is done :o) > > Thanks > > Jacques |
Administrator
|
From: "Bilgin Ibryam" <[hidden email]>
> Hi Jacques, > > could you tell me why it doesn't follow the best practice? Because you changed the name of an entity (AgreementWorkEffortAppl to AgreementWorkEffortApplic) you should provide a path to follow at http://docs.ofbiz.org/display/OFBTECH/Revisions+Requiring+Data+Migration (how to use your migrating service, think about people in 2 years ;o) Thanks Jacques > If it is about the info that should be put in http://docs.ofbiz.org/display/OFBTECH/Revisions+Requiring+Data+Migration > I did it with some delay, because yesterday I had difficulties accessing the page. > If there is another reason, please indicate it, so I can fix that. > > Thanks > Bilgin > > > > Jacques Le Roux wrote: >> Hi Bilgin, >> >> This does not follow best practices >> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-DeprecatingEntities >> Though, with the migrating service you provided, most is done :o) >> >> Thanks >> >> Jacques > |
Free forum by Nabble | Edit this page |