Commit Graph
31 Commits
Author SHA1 Message Date
Nicolas Malin 98814e5c03 Improved: Convert QuoteServices.xml mini lang to groovy - Deprecate Mini Lang
(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
2018-12-27 14:40:03 +00:00
Nicolas Malin c7d7b23144 Improved: Migrate from minilang to entity-auto createQuoteWorkEffort et deleteQuoteWorkEffort.
(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
2018-11-20 20:19:34 +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
Jacques Le Roux ec2f674a92 Improved: EntityListIterator closed but not in case of exception
(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
2017-06-02 11:25:17 +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 7188a6d2d6 Improved: No quick ship option with back ordered products
(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
2017-04-18 07:21:11 +00:00
Michael Brohl 2a93ef86a2 Fixed: Cancelled OrderItems are still included in orderGrandTotal.
(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
2017-02-07 09:42:41 +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
Divesh Dutta e1d31962be Improved: Convert search criteria on status into multi select pattern for Order Component
(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
2016-09-17 06:54:42 +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
Mridul Pathak e75b5ec66d [OFBIZ-7529] Part 3 of "Delete stale java files from applications and framework". Deleted files and references missed in r1754636.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754637 13f79535-47bb-0310-9956-ffa450edef68
2016-07-31 07:08:37 +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
Ashish Vijaywargiya fb6eecc298 Applied patch from jira issue - OFBIZ-7570 - Remove HtmlFormWrapper dependencies from Order Delivery Schedule Info screen.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750302 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 08:01:40 +00:00
Divesh Dutta 3305a7aad5 [OFBIZ-7386] Allowing user to select multiple options in Open Order Items report from basic search criterias while generating report. Thanks Mohammad Kathawala for your patch and thanks Swapnil Shah for suggesting the improvment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749104 13f79535-47bb-0310-9956-ffa450edef68
2016-06-18 23:02:14 +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