The variant products' images are being saved in the variable IMG encoded as urls,
thus selecting the variant triggers an image override with an unsuitable file name.
Thanks: Alex Bodnaru
(OFBIZ-11064)
As we all know, Groovy is a powerful language with great built-in functions.
Groovy Truth[1] is one of them, which is not used properly in our code base.
We have used UtilValidate Class to validate arguments for Empty or NotEmpty,
which can easily be done in groovy with built-in functionality[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860051 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
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-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