(OFBIZ-10553) (OFBIZ-9350)
Convert all QuoteServices.xml and their xml test
Thanks to Antoine Ouvrard, Leila Mekika, Gil Portenseigne and Mathieu Lirzin for this team work to convert all function and tests case
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849800 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10553)
But createQuoteWorkEffort is not a crud service on entity QuoteWorkEffort because it is linked to a seca to call createWorkeffort before if a workEffortId is not present in context.
<eca service="createQuoteWorkEffort" event="in-validate">
<condition field-name="workEffortId" operator="is-empty"/>
<action service="createWorkEffort" mode="sync"/>
</eca>
I converted this service createQuoteWorkEffort has a real Crud service and create an other ensureWorkEffortAndCreateQuoteWorkEffort to simulate the attendee process. Now we have a coherent service naming and not surprise for developer .
To manage the service createQuoteWorkEffort as deprecated, I define it twice
<service name="createQuoteWorkEffort" default-entity-name="QuoteWorkEffort" engine="entity-auto" invoke="create" auth="true">
<deprecated use-instead="ensureWorkEffortAndCreateQuoteWorkEffort" since="Upcoming Release">
use createQuoteWorkEffort to create a workeffort has been deprecated for best pratice naming reason, use ensureWorkEffortAndCreateQuoteWorkEffort instead.
Now createQuoteWorkEffort work as a crud service on QuoteWorkEffort
</deprecated>
</service>
<service name="createQuoteWorkEffort" default-entity-name="QuoteWorkEffort" engine="entity-auto" invoke="create" auth="true">
<description>Create a new QuoteWorkEffort</description>
<required-permissions join-type="AND">
<check-permission permission="ORDERMGR" action="_CREATE"/>
</required-permissions>
<auto-attributes mode="IN" include="pk"/>
</service>
First to alert on deprecation and second ensure that the definition work fine.
In log we will have an alert on the deprecation and an alert on the duplicated definition during the deprecation time.
Thanks to Antoine Ouvrard, Gil Portenseigne, Leila Mekika and Mathieu Lirzin for their review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847056 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10372)
Currently when you pass an order in ofbiz you can select the shipment method to delivery finish good and obtains an amount cost but you have nothing to indicate how the delivration will during.
We have a good example with ship by plane or boat and for road the time is different between the Portugal to Spain and Portugal to Slovenia.
With this information, we can planned the estimated delivery date with the estimated date to produce finish good and the time to delivery them
To fill this gap, we introduce a new entity ShipmentTimeEstimate modelled as ShipmentCostEstimate to define the estimated time for a shipment method, a carrier and two geo location.
During the entry order process, if you select a shipmentMethod, a carrier and geoIds that match a ShipmentTimeEstimate, when you create the order, OFBiz try to resolve the an estimated delivery date from estimatedShipDate, shipBeforeDate, shipAfterDate or now.
Thanks Leila Mekika for initialize this works, Gil Portenseigne for improve the solution and Suraj Khurana for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840579 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10534)
While creating orders from the backend, we have the option to set parameters
like 'Ship After Date' and 'Ship Before Date' to manage the fulfilment cycle
more efficiently.
Inventory gets reserved for the product based on a FIFO basis. Sometimes the
fulfilment time for the order is high and inventory unnecessarily gets locked
for some time period.
We can introduce a new parameter (at order item level) 'Reserve After Date'
which will indicate the date only after which reservation can happen.
In this way, we can manage the stock availability more efficiently.
This issue relates to OFBIZ-10518
Thanks: Deepak Nigam for the effort, Deepak Dixit for a review and suggestions
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839914 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10531)
I guess that when I worked on OFBIZ-9164 I broke that.
I found 3 occurences where the dispatcher was not in the session because the
session comes from the request and the request has not it in.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838381 13f79535-47bb-0310-9956-ffa450edef68
Extend the drop shipment process to manage an agreement for the supplier related to the order context.
For a supplier we have different agreements with same products but on different prices
Agreement A
GIZMO-1 100€
GIZMO-1 110$
Agreement B
GIZMO-1 90€
Agreement C
GIZMO-1 600¥
During sales order process we resolve the purchase agreement that match the case and put on OrderItemShipGroup related to the supplier. Like that when the drop shipment process run it to resolve the product price for the agreement present on the OrderItemShipGroup. With this implementation we have an adaptable system to manage complex case.
Properly this patch implemented :
an attribute on entity OrderItemShipGroup.supplierAgreementId
an attribute on entity OrderHeader.agreementId (necessary when you update the order to keep the price)
update the service caculatePurchasePrice for resolve the price from a agreement if it's present
update the shoppingCart to insert a purchase agreement
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825002 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9385)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.
I noticed Groovy has no try-with-ressources statement. I put a comment in
the description of OFBIZ-9296 "Update Gradle to 2.4.10" Maybe a solution would
be to use streams but really WTF! It seems Gradle 2.5 has autocloseable...
This contains also some refactoring and code cleaning
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797373 13f79535-47bb-0310-9956-ffa450edef68
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks Devanshu Vyas for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795341 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7220)
When an order contains back ordered products the quick ship option should not
be available
Thanks: Padmavati Rawat for report, Suraj Khurana for solution and patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791751 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9204)
Thanks: Maurice for reporting and providing the patch, Deepak and Jacques for their suggestions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781979 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9167)
-go to https://localhost:8443/ordermgr/control/orderentry
-create order for DemoCustomer
-add an item
console output...
java.lang.NullPointerException
at org.apache.ofbiz.content.content.ContentWorker.
renderContentAsText(ContentWorker.java:368) ~[ofbiz.jar:?]
[...]
While at it I also found issues with cartLine.getName() in ftl files. It was
also missing the dispatcher.
This was broken by OFBIZ-9164
Thanks: Wai
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1778889 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9164)
While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue
due to r1652852 where Adrian improved the cacheKey in
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants).
Actually I'm not even sure it was done at r1652852 because Adrian did not
maintain the FormFactory svn history.
Anyway, to make a long story short I had to introduce a DispatchContext
parameter when calling FormFactory.readFormDocument() when the code from
R13.07 only passed a null.
This had an impact in the hierarchy tree because FormFactory.readFormDocument()
was called in DataResourceWorker class, where the new code was called
from renderDataResourceAsText().
So I instead of only passing a Delegator I decided to pass only a
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the
Delegator from the LocalDispatcher. Doing so it had an impact on the
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface
and all related.
I finally decided to apply the same "Change Method Signature" refactoring
pattern (http://refactoring.com/catalog/addParameter.html) to all cases
related to ContentWorkerInterface. No need to pass a delegator when you have
LocalDispatcher!
Since last commit and revert I fixed 5 test failures and improved the code more,
mostly formatting, comments, etc.
There are very ugly method signatures out there which still need refactoring,
but it's so much work...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777297 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7542)
Added Check box for status fields on Find Orders, Find Quotes, Find Requirements, and Find Return forms.
Thanks: Mohammad Kathawala for providing the patch and Swapnil Shah for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761133 13f79535-47bb-0310-9956-ffa450edef68