Commit Graph
27737 Commits
Author SHA1 Message Date
Jacques Le Roux b6e860f6b7 Improved: [FB] Package org.apache.ofbiz.base.metrics
(OFBIZ-9567)

Changes a division with two long variables whose result was casted into a double
Now it performs a proper double division

Thanks: Dennis Balkir (and FB ;))

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804656 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 10:27:57 +00:00
Jacques Le Roux 6d67c194a0 Improved: [FB] Package org.apache.ofbiz.base.config
(OFBIZ-9566)

MainResourceHandler
 The protected fields were set to private since the class is not extended 
 anywhere. If they need to be accessed in the future, getter that return an 
 unmodifiable version should be implemented (Collections.unmodifiableXXX).

Refactor:
 Uses multi exceptions catch (explicitly to not catch, hence somehow swallow, 
 RuntimeException)
 Uses return instead of else when appropriate
 Extracts a getLoader() handy method
 Removes an useless thrown exception in invalidateDocument()
 Removes an useless Document cast
 Removes an useless ResourceLoader null initialisation 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804639 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 07:52:16 +00:00
Jacques Le Roux 98e89f33ff No functional trivial changes
When reviewing code, Eclipse complains: "Javadoc: Invalid param tag name"
when a param tag name "contains" a colon at end

Weirdly it does not complain about @return. Go figure! But I'll apply the same!

This removes all cases found in trunk. Another way could be to add a space 
between the tag and the colon. But that's not how it's recommended to write

http://www.oracle.com/technetwork/articles/java/index-137868.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804637 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 07:21:22 +00:00
Jacques Le Roux d0dd85d890 Improved: [FB] Package org.apache.ofbiz.base.container
(OFBIZ-9563)

Fixes some diamond operators

ComponentContainer.java
  deleted multiple unnecessary nullchecks
  added nullcheck, because sortedComponentNames could possibly be assigned as 
    null through the method list()

ContainerConfig.java
  deleted multiple unnecessary else-blocks
  deleted two initializations to shorten the code and return the value directly

Thanks: Dennis Balkir


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804636 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 07:10:55 +00:00
Jacques Le Roux 75c40fef71 No functional trivial changes
When reviewing code, Eclipse complains: "Javadoc: Invalid param tag name"
when a param tag name "contains" a colon at end

This removes all cases found in trunk. Another way could be to add a space 
between the tag and the colon. But that's not how it's recommended to write

http://www.oracle.com/technetwork/articles/java/index-137868.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804635 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 06:31:38 +00:00
Jacques Le Roux d34d77bde3 Improved: [FB] Package org.apache.ofbiz.base.concurrent
(OFBIZ-9562)

Fixes some diamond operators
Implementes equals method to fix potential problems
Implementes hashCode method because I implemented equals method
Implementes timeDiff method to keep the code DRY

Thanks: Dennis Balkir

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804634 13f79535-47bb-0310-9956-ffa450edef68
2017-08-10 06:11:26 +00:00
Jacques Le Roux 89eca637b8 Improved: [FB] Package org.apache.ofbiz.base.lang.test
(OFBIZ-9565)

Fixes some diamond operators

Thanks: Dennis Balkir

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804558 13f79535-47bb-0310-9956-ffa450edef68
2017-08-09 15:46:11 +00:00
Jacques Le Roux d232eae643 Improved: [FB] Package org.apache.ofbiz.base.lang
(OFBIZ-9564)

Implemented method hashCode() because method equals() was implemented
Changed Exception to RuntimeException because no exception was thrown and the 
only occurring exception could be a runtimeexception

Thanks: Dennis Balkir

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804556 13f79535-47bb-0310-9956-ffa450edef68
2017-08-09 15:44:00 +00:00
Jacques Le Roux 3dc4efff2c Improved: OEM Party Id field should have lookup on Edit Product page
(OFBIZ-9368)

As suggested by Jacques and Pierre, the patch includes removing all the traces 
of OEMPartyId (manufacturerPartyId) as it was some old approach.

Changes in Patch:
1. Removed manufacturerPartyId from Product entity
2. Removed its relations from view entities namely GoodIdentificationAndProduct
3. Removed it from forms EditProduct (Product), 
SearchInventoryItemsParams (EditFacilityInventoryItems screen in Facility) and 
SearchInventoryItemsDetailsParams (ViewFacilityInventoryItemsDetails screen in 
Facility)

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804408 13f79535-47bb-0310-9956-ffa450edef68
2017-08-08 12:33:33 +00:00
Jacques Le Roux f1fb12bd0b Improved: Refactor EntityListIterator
(OFBIZ-9549)

The EntityListIterator contains duplicate code and has need for refactoring in 
general.

Thanks: Tobias Laufkötter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804328 13f79535-47bb-0310-9956-ffa450edef68
2017-08-07 12:43:54 +00:00
Jacques Le Roux 82ce693f5a Fixed: Bug SQL Count Distinct command in GenericDAO.java
(OFBIZ-5701)

jleroux: Kieuanhvu's explanation was not totally clear. So I rather provide
Renuka Srishti's at OFBIZ-9428 "getResultsSizeAfterPartialList() return wrong 
count with distinct() for View Entity"

Here is the code sample to test the issue:

EntityListIterator productAssocListItr = null;
productAssocListItr = from("ProductAndAssoc").distinct().queryIterator();
productAssocListSize = productAssocListItr.getResultsSizeAfterPartialList();

productAssocListSize will differ from the actual distinct records in the 
ProductAndAssoc View Entity.
This issue exists because it gives distinct records on the basis of the 
first column in the table.

Thanks: Kieuanhvu for the patch, Renuka Srishti for a clear explanation and a 
simple way to test (in a groovy for me)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804319 13f79535-47bb-0310-9956-ffa450edef68
2017-08-07 10:40:32 +00:00
Jacques Le Roux f41feebf57 Completed: Remove the never implemented deleteParty (pre Apache era)
(OFBIZ-9556)

In dev ML in this thread https://s.apache.org/pc90 
I suggested to remove the never implemented deleteParty (pre Apache era)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804315 13f79535-47bb-0310-9956-ffa450edef68
2017-08-07 10:00:55 +00:00
Deepak Dixit ca74d2496a Improved: Remove unnecessary field types (OFBIZ-9351)
Applied patch from jira issue, also removed -ne field refereces from code.

Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804031 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 18:11:45 +00:00
Deepak Dixit a0d99ed40f Improved: Replace fields with id-ne, id-long-ne and id-vlong-ne by id, id-long and id-vlong respectively which are not primary keys (OFBIZ-9355)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804026 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 17:51:07 +00:00
Deepak Dixit fcb3ea53ae Improved: Removing Assignment between UserLogin and SecurtyGroup does not work, (OFBIZ-9543)
Updated label from remove to expire while removing security group from user login, also added new entity-auto service to expire user login security group record. 

Thanks S. Yazied for reporting the issue. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803561 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 18:34:18 +00:00
Nicolas Malin a697277bbf Fixed: no functional change, correct empty body on xml element hyperlink
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803538 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 13:38:10 +00:00
Deepak Dixit dbbc2cd936 Fixed: Can't Create a new PartyAcctgPreference in 16.11.03 (OFBIZ-9542)
- Added missing code to set organizationPartyId
 Thanks Sharan for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803525 13f79535-47bb-0310-9956-ffa450edef68
2017-07-31 12:17:55 +00:00
Jacques Le Roux a115d37998 Fixes a test issue introduced with r1802668
See https://ci.apache.org/builders/ofbiz-trunk-framework-plugins?numbuilds=30

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803406 13f79535-47bb-0310-9956-ffa450edef68
2017-07-30 08:36:35 +00:00
Nicolas Malin 6da5d7cf2e Fixed: Set first letter to upper case for xls macro library to keep the coherence with other macro library. This error was introduce by me so I repair :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803391 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 20:18:16 +00:00
Nicolas Malin 32c6473a1c Fixed: Correct the documentation to run an OFBiz suite test. The example gave the java class but to run a suite test we need to give the suite-name of test-suite element that we want to run each test-case.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803390 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 20:05:12 +00:00
Jacques Le Roux 11356ccd77 Improved: Sub-menu looks overlapping in Tomahawk theme
(OFBIZ-7722)

Actually it was only a CSS forced background-color. I checked other screens, in
party for instance and all is correct


Thanks: Ayushi Rathod 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803211 13f79535-47bb-0310-9956-ffa450edef68
2017-07-27 17:24:13 +00:00
Deepak Dixit 5f54acf159 Fixed: Corrected condition to ignore type check for datetime and time field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803025 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 08:14:17 +00:00
Pranay Pandey 8a58ea6b3e Improved: User should be notified with success message on Update Quote page.
(OFBIZ-9519)

Created a new UiLabel for success message and returned it from 'updateQuote' service.

Thanks Aditya Sharma for reporting and thanks Sonal Patwari providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802972 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 16:12:15 +00:00
Arun Patidar 98d5d599f9 Fixed typo of entity name and invoke attribute in service defination.(OFBIZ-8834)
Thanks Devanshu for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802883 13f79535-47bb-0310-9956-ffa450edef68
2017-07-25 05:57:23 +00:00
Nicolas Malin c8fd7699e4 Fixed: remove uneeded makeValidContext call with Groovy DSL improvement on run service at revision 1802798
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802811 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 13:07:52 +00:00
Nicolas Malin e193e14ccd Improved: Improve groovy DSL, runService call makeValidContext (OFBIZ-9523)
When you call run service with groovy, you need to be sure that all parametes are good for the service call.
This improvement simplify this dsl with an automatic parameters check so you can call directly like that
run service : createProduct, with: context

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802798 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 12:17:01 +00:00
Arun Patidar e8b73fbc18 Improvements in CommEventContentAssoc entity definition and services. (OFBIZ-8843)
Applied improved patch. thanks Devanshu for  your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802772 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 09:24:15 +00:00
Jacopo Cappellato 94bfda45e9 Fixed: MRP generates duplicate requirements when items are initially under
minimum quantity and have with pending approved purchase orders.
(OFBIZ-9526)

With this change the requirements to replenish the inventory up to the minimum 
stock quantity is generated, if needed, only when the first demand event is 
processed or at the end.

Thanks: Amit Gadaley for the help in recreating the issue and testing the fix.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802766 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 09:09:38 +00:00
Deepak Dixit a4f0e1d626 Fixed: Improvements in Lot entity definition and services,
Applied slightly modified patch from jira issue OFBIZ-8273.
productionruntests test was failing, this will fix the test case.  

Thanks Devanshu for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802755 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 06:47:08 +00:00
Deepak Dixit acbf92baff Improved: Used ModelService.IN_PARAM instead of hard coded "IN" in groovy file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802753 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 06:13:11 +00:00
Deepak Dixit cd94155947 Fixed: Fixed typo done at r#1802668, Corrected service name from filteredRatesList to filterRateAmountList
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802752 13f79535-47bb-0310-9956-ffa450edef68
2017-07-24 06:01:41 +00:00
Nicolas Malin 0c9a81f118 Improved: With new groovy DSL for query one, simplify groovy rate amount services
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802712 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 22:42:56 +00:00
Arun Patidar 1c9dd91b55 Improvements in Lot entity definition and services. (OFBIZ-8273)
Thanks Rishi Solanki and Devanshu Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802694 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 13:43:23 +00:00
Deepak Dixit bedad64f14 Fixed: Added check to avoid datetime and time field warning (OFBIZ-9496)
The warning message generated by OFBiz is a false positive caused by the fact that the way OFBiz performs the check is too simplistic: OFBiz parses for the content of the "()" in the fieldtype mapping and assumes that it is the column size.
However, in MySQL and possibly other database management systems, this is only true for varchar field definitions but not for datetime fields.
The column size for DATETIME(3) is not 3.
We should probably refactor the code in DatabaseUtil to compare the SQL field type from the JDBC driver, if possible to retrieve, (i.e. from the database) with the whole content (without any sting manipulation) of the attribute sql-type of the element field-type-def type (in fieldtype*.xml) i.e. "DATETIME(3)"; if they differ then a warning should be printed.
In this way we will have a more generic, simpler and more reliable tool to spot differences in the database

This is a workaround to fix the warning.
Thanks Jacopo.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802693 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 13:14:43 +00:00
Pranay Pandey e6f6490649 Fixed: Adding condition in price rule on 'Role Type' showing incorrect result.
(OFBIZ-7275)

The issue exists because in role type list there are multiple occurrences of substring "CUSTOMER". The existing check was just checking the occurrence of a substring in the string and found this value more than once in the list so the last option gets selected. Applied equality check to find the exact match.

Thanks Aditi Patidar for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802690 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 13:06:12 +00:00
Arun Patidar 028cafb30e Fixed issue due to incorrect comparision operation.(OFBIZ-9254)
Thanks Rohit Rai for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802685 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:38:44 +00:00
Nicolas Malin 7d3ad82758 Improved: for EntityQuery.findOne() with context,
Instead of iterating fields, used GenericPk class object to get the PK fileds from parameters/fieldMap.
Thanks Deepak for this nice improvement

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802684 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:23:59 +00:00
Ashish Vijaywargiya 32337fb3fa Improved: Order contact mechs are not copied over while re-ordering an order.(OFBIZ-9253)
Thanks Suraj for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802683 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:18:54 +00:00
Nicolas Malin 966b1755a0 Improved: set auto completion only in lookup field (OFBIZ-9378)
Add a new option presentation none for the lookup element to don't display the link for display the search form bu only use autocompletion.
In the initial path from Pierre Gaudin the presentation name was autocompletion-only but I prefer change it to none because the link is just not preent.
Thanks Pierre Gaudin for this proposal and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802682 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:14:59 +00:00
Ashish Vijaywargiya fcd08b891f Improved: Code Improvement on Product Config.(OFBIZ-9281)
Additional Details:
I noticed a couple of code improvements on product config current code. Here is the reference:

- In ProductConfigWorker.fillProductConfigWrapper() method, currently, we only check parameters map, while it is possible in a business environment that user can submit required fields values in request attributes as well. So here getCombinedMap method can be used to make it more efficient.

- While calling constructor of ConfigOption (ConfigOption(ConfigOption co)), some private members should also be copied, like componentOptions etc.

Thanks Suraj for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802681 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:10:06 +00:00
Ashish Vijaywargiya bc0223ec70 Improved: Use FlexibleLocation.resolveLocation() instead of hard-coded path.(OFBIZ-9479)
Thanks Devanshu for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802673 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 11:15:03 +00:00
Nicolas Malin 97f0363e2c Fixed: add forget label AccountingUpdateRateAmountAlreadyExist
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802671 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 10:43:38 +00:00
Nicolas Malin d74177348b Fixed: For service getRateAmount align the level variable on 'rateTypeId' by default and correct name workEffort to workEffortId for more coherence with other.
This escape a potential failure on groovy instanciation if the service found a rateList without dedicate service, Thanks Scott for this remark

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802670 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 10:37:56 +00:00
Deepak Dixit 13c9558881 Improved:Converted createPartyDataSource service to entity-auto (OFBIZ-9508)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802669 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 10:32:25 +00:00
Nicolas Malin 0e96e6daad Fixed: For service getRateAmount don't use parameters map to propage variable to ensure the isolation,
Thans Scott for this remark

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802668 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 10:26:15 +00:00
Ashish Vijaywargiya 1ce72c550d Improved: OFBIZ-7471: Improve all the service level error messages for missing required field for content component.(OFBIZ-8713)
Thanks Jagpreet and Shikha for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802667 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:59:31 +00:00
Nicolas Malin 8b96173d79 Fixed: For service getRateAmount move the periodTypeId default value from groovy to service definition,
Thans Scott for this remark

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802666 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:46:47 +00:00
Nicolas Malin 3cce62448a Fixed: Remove unnecessary UtilValidate.is(Not)Empty used in RateAmount groovy service,
Thans Scott for this remark

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802665 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:42:08 +00:00
Arun Patidar 0ec3db87e6 Create new Return page required fields validations are not working correctly. (OFBIZ-8457)
Thanks Aditya and Devanshu for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802664 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:29:10 +00:00
Ashish Vijaywargiya 2f39d01436 Improved: OFBIZ-7471: Improve all the service level error messages for missing required field for facility component(OFBIZ-8714)
Thanks Jagpreet and Lalit for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802663 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:20:33 +00:00