Commit Graph
27 Commits
Author SHA1 Message Date
Jacques Le Roux 252c227ad0 Fixed: variant product selection trashes image (OFBIZ-12019)
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
2020-10-06 15:18:49 +02:00
Jacques Le Roux d04f777389 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Improve code for UOM dropdown of products like WG-9943

Thanks: Alex
2020-09-11 10:43:13 +02:00
Jacques Le Roux 9a957eb7a7 Fixed: display/selection of unit of measure is broken
(OFBIZ-11955)

This fixes in in order component

Thanks: Alex
2020-08-30 14:13:10 +02:00
Akash Jain 64b415e0d2 Improved: Expired product images showing on product detail page (OFBIZ-11982) 2020-08-25 21:41:31 +05:30
Jacques Le Roux 28e119027c Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(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
2019-05-26 10:36:16 +00:00
Jacques Le Roux 3190e0ff2e Improved: Create patch for removal of IDEAL code in framework
(OFBIZ-5444)

Removes all iDEAL specifics from the framework (actually only applications)

Thanks: Pierre Smits

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846227 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 10:20:10 +00:00
Nicolas Malin 5dff2f648a Implemented: Calculate estimated shipment delivery time
(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
2018-09-11 14:36:08 +00:00
Swapnil Mane 015304b9a0 Improved: Removed unused code
(OFBIZ-10384)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840355 13f79535-47bb-0310-9956-ffa450edef68
2018-09-08 11:54:54 +00:00
Jacques Le Roux 1c73989942 Implemented: 'Reserve After Date' for order items
(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
2018-09-03 08:15:08 +00:00
Jacques Le Roux 4b8d988563 Fixed: Search in Ecommerce no longer works
(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
2018-08-19 15:30:42 +00:00
Deepak Dixit ef0c694a46 Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Replace text/javascript with application/javascript in all the script tag

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836886 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 10:51:52 +00:00
Deepak Dixit 11901ea96e Improved: Remove use of deprecated language attribute from script tag
(OFBIZ-10491)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836550 13f79535-47bb-0310-9956-ffa450edef68
2018-07-24 12:41:50 +00:00
Nicolas Malin 7f8189de69 Implemented: Use agreement on drop shipment process (OFBIZ-10227)
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
2018-02-21 20:40:53 +00:00
Jacques Le Roux b2de2b84a1 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

Fixes few remaining swallowed "catch NumberFormatException" in Groovy files

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824157 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 16:34:12 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Deepak Dixit af784a0f20 Order : Remove unused imports from groovy files for code optimization. (OFBIZ-9509)
Thanks  Suraj Khurana and Pradeep Choudhary for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813612 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 11:55:36 +00:00
Nicolas Malin 40fdd2ca73 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step 
#9 Change all set screen and script that call widget.properties values replaced by call to modelTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806150 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 10:02:34 +00:00
Deepak Dixit 8895181ce5 Fixed: add gift certificate in purchase order cause exception (OFBIZ-9438)
Apply slightly modified patch from jira issue.
Thanks Wai and Pallavi for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801274 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 10:59:18 +00:00
Deepak Dixit d5bcaaedf8 Improved: Inconsistent String Comparisons, Applied application groovy patch from jira issue. (OFBIZ-9254)
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
2017-05-16 17:16:05 +00:00
Jacques Le Roux f0ae93810a Fixed: add item to order cause exception
(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
2017-01-15 07:37:35 +00:00
Jacques Le Roux 409d76ba07 Improved: Refactor ContentWorkerInterface methods signatures
(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
2017-01-04 12:48:11 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Ashish Vijaywargiya b15974a6f6 Applied patch from jira issue - OFBIZ-8074 - Clean up commented out code in Groovy for Order. Thanks Aman for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759147 13f79535-47bb-0310-9956-ffa450edef68
2016-09-04 06:41:20 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Deepak Dixit 5284cf4f95 (OFBIZ-7227) Relocate .groovy files in the order component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747769 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 18:36:39 +00:00