Implemented: Add new party while placing quotes (OFBIZ-7456) (#294)
Introduce the option to create a new party group while placing the quotes in the system.
diff --git a/applications/order/webapp/ordermgr/WEB-INF/controller.xml b/applications/order/webapp/ordermgr/WEB-INF/controller.xml
index 1240087..633b50e 100644
--- a/applications/order/webapp/ordermgr/WEB-INF/controller.xml
+++ b/applications/order/webapp/ordermgr/WEB-INF/controller.xml
@@ -2005,6 +2005,16 @@
<security auth="true" https="true"/>
<response name="success" type="view" value="CreateNewOrderMessage"/>
</request-map>
+
+ <request-map uri="createPartyGroup">
+ <security https="true" auth="true"/>
+ <event type="service" path="" invoke="createPartyGroup"/>
+ <response name="success" type="request-redirect" value="EditQuote">
+ <redirect-parameter name="partyId"/>
+ </response>
+ <response name="error" type="view" value="EditQuote"/>
+ </request-map>
+
<!-- end of request mappings -->
<!-- View Mappings -->
diff --git a/applications/order/widget/ordermgr/QuoteScreens.xml b/applications/order/widget/ordermgr/QuoteScreens.xml
index 64361e9..a5ee85c 100644
--- a/applications/order/widget/ordermgr/QuoteScreens.xml
+++ b/applications/order/widget/ordermgr/QuoteScreens.xml
@@ -249,6 +249,9 @@
<screenlet title="${groovy: parameters.quoteId ? uiLabelMap.OrderOrderQuoteEdit : uiLabelMap.OrderNewQuote}">
<include-form name="EditQuote" location="component://order/widget/ordermgr/QuoteForms.xml"/>
</screenlet>
+ <screenlet title="${uiLabelMap.PartyCreateNewPartyGroup}">
+ <include-form name="EditPartyGroup2" location="component://party/widget/partymgr/PartyForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
diff --git a/applications/party/widget/partymgr/PartyForms.xml b/applications/party/widget/partymgr/PartyForms.xml
index ce4e743..cf94f82 100644
--- a/applications/party/widget/partymgr/PartyForms.xml
+++ b/applications/party/widget/partymgr/PartyForms.xml
@@ -300,6 +300,12 @@
</field>
</form>
+ <form name="EditPartyGroup2" type="single" target="createPartyGroup" default-map-name="partyGroup"
+ header-row-style="header-row" default-table-style="basic-table">
+ <field name="groupName"><text size="6" maxlength="10"/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
+ </form>
+
<form name="ViewPartyGroup" type="single" default-map-name="lookupGroup">
<auto-fields-entity entity-name="PartyGroup" default-field-type="display"/>
<field name="logo" use-when="partyGroupLogoLinkUrl!=null" title="${uiLabelMap.CommonOrganizationLogo}"><image alternate="${uiLabelMap.CommonOrganizationLogo}" value="${partyGroupLogoLinkUrl}" style="cssImgStandard"/></field>