480 Commits
Author SHA1 Message Date
Deepak Dixit 8a4a68e9f9 Fixed: Used the jdk 8 compatible version for gradle-svntools-plugin
(OFBIZ-11601)
build.grale using latest.release of gradle-svntools-plugin, and gradle-svntools-plugin release its latest release on 19th with jdk11 compatible. So this is causing build failure
2020-04-20 11:37:27 +05:30
Jacques Le Roux 4b43b0c639 Fixed: Error removing an uploaded party content
(OFBIZ-11597)

When you try to remove an uploaded party content you get this error:

ControlServlet                |E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException:
Unknown request [removePartyContent/viewprofile];
this request does not exist or cannot be called directly.

While at it I also fixed the similar case for payment methods
2020-04-17 17:33:24 +02:00
Jacques Le Roux 9f5ebc48fd Fixed: Error in uploading very large files, ie >2MB
(OFBIZ-11534)

This was not supposed to be committed, actually (wrong) part of OFBIZ-11597

Fixed: Error in uploading very large files, ie >2MB

(OFBIZ-11534)

There is an issue in uploading large files, I am able to upload files up to 2 GB
successfully but getting an error when trying to upload a file larger than 2GB.

Example -
1. Go to party profile -
https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin
2. Try to create a party content with a file larger than 2 GB
3. Error on console

jleroux:
For a 2GB+ file you need to set Xmx to more than the double of the file size,
eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M"

You then get another small issue (only in log) when redirecting to send the
partyId parameter.

This is because, DiskFileItem is a temporary Object with a null value contained
in "fileItems" attribute. It can't be detected by UtilMisc::makeMapSerializable
and that makes "fileItems" not serializable. So it must be removed from
reqAttrMap.

Thanks: Chandan Khandelwal for report, Michael for suggesting a very large file
to upload
2020-04-16 16:16:14 +02:00
Jacques Le Roux 9530d4b441 Documented: Adds the CSRF defense documentation (missed the add last time) 2020-04-15 19:44:03 +02:00
Jacques Le Roux 242e62d6f3 Documented: Adds the CSRF defense documentation 2020-04-15 19:44:01 +02:00
Jacques Le Roux 1e8ffb4906 Improved: Adds the download-the-gradle-wrapper section 2020-04-07 15:29:55 +02:00
Jacques Le Roux b14516202d Improved: Removes deprecated README.md file 2020-04-07 12:24:40 +02:00
Ulrich Heidfeld 5b5029312a Improved: Decodes AjaxAutocompleteOptions return value
(OFBIZ-11475)
2020-04-05 14:01:16 +02:00
Jacques Le Roux 42ad34f0b6 Fixed: removes a wrong import due to CSRF token backport trying 2020-04-05 12:02:06 +02:00
Jacques Le Roux 793628bb15 Fixed: Prevent Host Header Injection (CVE-2019-12425)
(OFBIZ-11583)

Conflicts handled by hand
  framework/security/config/security.properties
  framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
2020-04-05 11:40:48 +02:00
Jacques Le Roux 84e102a6a1 Revert "Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk"
This reverts commit 27e57522b1.
2020-04-05 10:05:16 +02:00
Jacques Le Roux 27e57522b1 Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk
Because of GitHub message on PR56:
This branch cannot be rebased due to conflicts

Much Conflicts, but that should be OK
2020-04-04 18:41:14 +02:00
Jacques Le Roux cf936d6c5e Fixed: The createTaskContent request does not work
(OFBIZ-11246)

It seems that same request can not be parsed multiple times if it has multi part
object in it as the parse method remove it after that.

Found one stackoverflow link around the same:

https://stackoverflow.com/questions/13881272/
servletfileuploadparserequestrequest-returns-an-empty-list

I believe that all places/uploads using this workflow should resulting the same
issue.

One possible solution I could think of without going with new approach is to set
list of file Items into the request attribute and use it if parse method remove
it and unable to retrieve on 2nd call.

Thanks: Ankush Upadhyay for the analysis and initial patch. I only slightly
modified it.
2020-03-27 11:09:36 +01:00
Jacques Le Roux 7e03082d92 Improved: Improve Web Content Caching
(OFBIZ-11477)

According to OWASP OFBiz Web Content Caching is weak:

Independently of the cache policy defined by the web application, if caching web
application contents is allowed, the session IDs must never be cached, so it is
highly recommended to use the Cache-Control: no-cache="Set-Cookie, Set-Cookie2"
directive, to allow web clients to cache everything except the session ID

I though noticed that Set-Cookie2 is deprecated for a long time now. And we new
browsers policies it to often updated. So no need to use Set-Cookie2.
2020-03-27 10:11:53 +01:00
Jacques Le Roux 1617226897 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

It's better to allow users to change from strict to lax, at least for all
cookies. Some could want to change it by cookie type. I let the exercise for
them :)
See:https://blog.mozilla.org/security/2018/04/24/same-site-cookies-in-firefox-60

Conflicts handled by hand
	framework/security/config/security.properties
2020-03-21 11:59:46 +01:00
Jacques Le Roux bb26cc1c62 Improved: no functional change
Adds "Content-Security-Policy" frame-ancestors="self" in ErrorPage.ftl
Because this page is used as a HTTP 500 error it's more susceptible to
clickjacking

Quoting OWASP ZAP:
This problem still applies to error-type pages (401, 403, 500, etc.), as these
pages are still often affected by injection problems, in which case it is still
possible that browsers may interpret pages differently from their actual content
type.

I tried to work on other file types that were also reported but it's complicated
adn I believe it's not worth it
2020-03-20 20:21:27 +01:00
Jacques Le Roux 09270a1c34 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

Forgot to add UtilHttp::SameSiteFilter
2020-03-20 18:05:39 +01:00
Jacques Le Roux 82ef7a5871 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:52:21 +01:00
Jacques Le Roux a16271e5c3 Improved: no functional change
Follows the "How to apply the Apache License to your work" section at
https://www.apache.org/licenses/LICENSE-2.0

Removes the references to products only used in plugins
2020-03-14 12:36:49 +01:00
Dennis Balkir 0c7be39acb Fixed: Potential Nullpointer in ErrorPage.ftl
(OFBIZ-11448)

Inserted nullcheck for request-attribute
2020-03-10 16:04:52 +01:00
Daniel Watford 0355006c62 Improved: Add 2020 version of Incoterms
(OFBIZ-11437)

Alter the parent type and descriptions of existing Incoterm TermTypes to
indicate the version of Incoterms they relate to.

Added new Incoterm TermTypes and descriptions correspoding to the
Incoterms 2020 set.

Conflicts handled by hand:
	applications/datamodel/data/seed/PartySeedData.xml
	applications/party/config/PartyEntityLabels.xml
2020-03-06 08:48:13 +01:00
Jacques Le Roux b571234062 Fixed: createMissingCategoryAndProductAltUrls service misses a transaction
(OFBIZ-11441)

Not sure why it had use-transaction="false", makes no sens to me, too old to
check, not a big deal I guess
2020-03-05 10:17:10 +01:00
Jacques Le Roux 3d9b551d65 Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement
OFBIZ-11437: Improved: Added 2020 version of Incoterms
(cherry picked from commit 7a34e9cda8)
2020-03-04 15:10:23 +01:00
Jacques Le Roux 8ff603476a Improved: Put the TOCs on left in generated AsciiDoc documentation
(OFBIZ-11423)
Following discussions

* AsciiDoc generated online documentation and releases
* New Online Help, need some ideas
threads on dev ML

I propose as suggested Oliver to put TOCs at the left. If I refer to
https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/119
toc: 'left@'
should be put in the main build.gradle

Thanks: Olivier Heintz for the suggestion
2020-02-27 08:42:49 +01:00
Suraj Khurana 545be00576 Fixed: Picklist is in Input status even after order is completed.
(OFBIZ-10883)

Thanks Rashi Dhagat for reporting, Shikha Jaiswal for the patch and Pawan Verma for review.
2020-02-26 19:26:43 +05:30
Jacques Le Roux 87c0907f88 Fixed: DatabaseUtil.getColumnInfo(...) does not retrieve primary keys due to
connection-locks
(OFBIZ-11312)

The method DatabaseUtil.getColumnInfo(...) uses an elaborate algorithm using a
List<Future<AbstractCountingCallable>> object. This does not work properly as it
runs into connection-locks. When debugging the error does not occur. I assume
that the slower pace of debugging prevents the error.

jleroux: backport conflict handled by hand

Thanks: Benjamin Jugl
2020-02-26 08:50:56 +01:00
Michael Brohl 651231d041 Fixed: Fluent API Bug in getFieldList().
(OFBIZ-10298)

Thanks Benjamin Jugl for reporting and providing the patch.
2020-02-25 21:15:44 +01:00
Michael Brohl aeff5b75ec Documented: Upgrades the documentation references in
catalina/ofbiz-component.xml to the 9.0 documentation.
2020-02-25 15:50:49 +01:00
Michael Brohl 0ea9173e8d Upgrade Tomcat from 9.0.29 to 9.0.31
(OFBIZ-11407)

Overriding the new default property secretRequired to be not required
and added the default property "secret" in the commented out section.
2020-02-25 15:50:47 +01:00
Jacques Le Roux fee85b4a42 Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
Improved: no functional change
(OFBIZ-)
Explanation
Thanks:
2020-02-25 15:50:19 +01:00
Pawan Verma 6b5d4fb565 Fixed: Issue in which Agreement Item can't be removed from Agreement
(OFBIZ-11410)

Reason for the issue was incorrect use of service IN parameters for entity-auto delete invoke.

Thanks, Pierre Smits for the report.
2020-02-24 19:06:34 +05:30
Jacques Le Roux 356be25ad2 Fixed: Improve ObjectInputStream class (CVE-2019-0189)
Improved: no functional change
(OFBIZ-10837) (OFBIZ-11398)

I missed to update the refactored UtilObject class
2020-02-24 12:55:28 +01:00
Jacques Le Roux d31e137293 Fixed: Improve ObjectInputStream class (CVE-2019-0189)
Improved: no functional change
(OFBIZ-10837) (OFBIZ-11398)

Steps to generate:
1. Navigate to - catalog/control/EditProdCatalog?prodCatalogId=TestCatalog
2. Click on - CREATE SEO CATEGORY/PRODUCTS
3. The broken page will be displayed

The issue is due to the use of a GString in
createMissingCategoryAndProductAltUrls().

This:
    result.successMessageList = [
        "Categories updated: ${categoriesUpdated}",
        "Products updated: ${productsUpdated}"

As it's common to use such expressions I have added the necessary
org.codehaus.groovy.runtime.GStringImpl groovy.lang.GString
to the white list of classes in listOfSafeObjectsForInputStream in
SafeObjectInputStream.properties

I finally have also decided to use this property as default and commented for
committers to be aware that it should be also put in DEFAULT_WHITELIST_PATTERN
in SafeObjectInputStream class. Because if, for a reason,
listOfSafeObjectsForInputStream is empty OFBiz will still be protected

Note: cherry picking did not work at all. The change was completely handled by
hand. Fortunately, it was just about copyin 2 files from trunk

Thanks: Dikpal Kanungo for reporting
2020-02-24 11:55:52 +01:00
Deepak Dixit 1a8903e1d5 Fix build failure for release17.12 2020-02-23 16:56:57 +05:30
Deepak Dixit f5c92c053c Added missing ErrorPage.ftl file
(OFBIZ-10753)
2020-02-23 16:10:22 +05:30
Michael Brohl 0dd0264d7d Provide a FileItem entry in UtilHttp.getMultiPartParameterMap.
(OFBIZ-11346)
2020-02-22 12:01:04 +01:00
Suraj Khurana b694b38960 Fixed: Product Price set based on 'Purchase Price Agreement' isn't honoured while same is used during ordering.
(OFBIZ-7610)

Thanks Ankush Upadhyay for the patch and Swapnil Shah for reporting the ticket.
2020-02-22 14:41:18 +05:30
Jacques Le Roux 250991a517 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 09:43:44 +01:00
akash e0ec691cbf Fixed: Issue while redirecting to Request Detail Screen from View Communication Event
(OFBIZ-9658)

Thanks, Ankit Joshi for your contribution.
2020-02-22 13:33:48 +05:30
Deepak Dixit 5776818efb Added missing GeoAssoc data for Ladakh geo
(OFBIZ-11399)
2020-02-22 13:03:41 +05:30
Deepak Dixit c315244900 Update India Geo information according to ISO notifications 2019-11-22
(OFBIZ-11399)

Change of subdivision category from state to Union territory for IN-JK; Addition of Union territory IN-LA;
2020-02-22 12:56:11 +05:30
Suraj Khurana c175337b84 Fixed: UserLoginPasswordHistory is not maintaining password as present in UserLogin.
(OFBIZ-10802)
Thanks Rohit Koushal for the patch. Thanks Jacques Le Roux and Gil Portenseigne for the review.
2020-02-22 12:53:28 +05:30
Jacques Le Roux afae70b71a Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 07:30:46 +01:00
Jacques Le Roux 872c329618 Fixed: The "stream" request-map in ecommerce and commonext controllers
requires authentication
(OFBIZ-11349)

Thanks: Michael for reporting a possible issue when only commenting the "stream"
request-map in commonext controller. And Jacopo to suggest to require
authentication (after suggesting to comment out)

It should be also noted that when the CSRF defense implementation will be in
place, all XSS vulnerabilities w/o authentication will not longer be possible.
Because then all requests shall contains a CSRF token.
2020-02-19 13:50:05 +01:00
Jacques Le Roux 3d85b1ca1e Fixed: Temporarily comment out the "stream" request-map in commonext controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to require
(maybe only temporarily) the "stream" request-map in commonext controller
to need authentication.

We will later check that this has no impact and if necessary remove the
mandatory authentication, see OFBIZ-11349
2020-02-19 09:43:35 +01:00
Michael Brohl b318f00d05 Fixed: CMS add content not working.
(OFBIZ-10833)

This fixes the mission content association and wrong update of the
parent content reported by Ingo Wolfmayr. Thanks Sebastian Berg for
providing the patch.
2020-02-18 21:29:26 +01:00
Michael Brohl 32ce2ad006 Fixed: Alternate KeyWord Thesaurus functionality does not work properly.
(OFBIZ-11291)

Thanks Pawan Verma for reporting and Wiebke Pätzold for providing the
patch.
2020-02-18 10:10:24 +01:00
Jacques Le Roux 5684b49453 Fixed: Temporarily comment out the "stream" request-map in ecommerce controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to
temporarily comment out the "stream" request-map in commonext controller.
We will later fix the specific issue to put back the functionalities allowed by
the "stream" request-map in this controller, see OFBIZ-11349
2020-02-14 10:20:15 +01:00
Gil Portenseigne cf1612644e Revert "Fixed: Error in user impersonation with sub permission (OFBIZ-11342)"
This reverts commit 73b7abbd
2020-02-12 12:22:59 +01:00
Gil Portenseigne 73b7abbdd0 Fixed: Error in user impersonation with sub permission
(OFBIZ-11342)

Add unit tests for permission control feature.
Add new method to manage multilevel permission control.
This allowing an user with PARTYMGR_ADMIN permission to impersonate
another user with PARTYMGR_PCM_CREATE permission.
2020-02-12 09:55:00 +01:00
Michael Brohl ec3dd184d9 Revert "Multi Part Input Parameters not Available in Groovy Event (OFBIZ-5048)"
This reverts commit 832217135a.
2020-02-11 21:50:21 +01:00
Michael Brohl df460fc680 Revert "Improved: Remove unused services from party/services_view.xml and PartyServices.java/.xml. (OFBIZ-9988)"
This reverts commit 00a5d3413a.
2020-02-09 15:47:59 +01:00
Michael Brohl 732172787e Fixed: Form widget field with input-method="time-dropdown" unable to
understand the default time.
(OFBIZ-11150)

Thanks Wiebke Pätzold for reporting and providing the patch.
2020-02-07 16:45:57 +01:00
Jacques Le Roux 2f479d56ce Fixed: Unable to continue to Step 3 in One Page Checkout
(OFBIZ-11318)

The following error is returned when trying to continue to Step3 when checking
out using One Page Checkout.

Could not create new purpose, a purpose with that type already exists.:
[GenericEntity:PartyContactWithPurpose][contactFromDate,2020-01-05 19:48:18.29
(java.sql.Timestamp)][contactMechId,10020(java.lang.String)]
[contactMechPurposeTypeId,SHIPPING_LOCATION(java.lang.String)]
[partyId,admin(java.lang.String)][purposeFromDate,2020-01-05 19:48:18.332
(java.sql.Timestamp)

It does not happen with DemoCustomer but at least with admin user

It was caused by OFBIZ-10588. I checked for similar issues and found that, in
unlike in createUpdateBillingAddress, in createUpdateShippingAddress and
createUpdateCreditCard partyId was used without a prior setting from
parameters.partyId

Thanks: James Young for proposing a solution. I rather fixed otherwise this and
another similar case in createUpdateCreditCard
2020-02-07 14:44:27 +01:00
akash 8de770f701 Fixed: Unnecessary ship groups in orders.
(OFBIZ-10489)

Thanks, Oleg Andreyev and Mohammad Kathawala for your contribution.
2020-02-07 18:49:54 +05:30
Nicolas Malin 7c8fc080f3 Fixed: Crashed Scheduled jobs are not getting rescheduled with temporal expression
(OFBIZ-11340)

When a OFBiz server are stopped or crashed with job on queued state,
at the start, they are restarted but without information on tempExprId and recurrenceInfoId

This causes a break for recurrence jobs to their planning

Thanks to Mohammed Rehan Khan for this issue and Scott Gray for the review.
2020-02-06 17:14:53 +01:00
Michael Brohl 69bdef1058 Fixed: Prevent possible NullPointerException in FinAccountServices.
(OFBIZ-11341)
2020-02-06 09:01:03 +01:00
Jacques Le Roux 6ce10278a3 Fixed: setUserTimeZone should ran only once based on error
(OFBIZ-11329)

This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:

SetTimeZoneFromBrowser when starting gives a  RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.

Thanks: James Yong for review
(cherry picked from commit 350c71f4df)

# Conflicts:
#	framework/common/groovyScripts/SetLocaleFromBrowser.groovy
#	themes/common-theme/webapp/common/js/util/setUserTimeZone.js replaced
by setUserLocale.js modified by hand

I can compile locally but I can see a reason why and certainly not related to
these changes
2020-02-05 11:28:45 +01:00
Jacques Le Roux b2e3cc717d Fixed: impersonateLogin
(OFBIZ-5409)

I reopended this old issue because, while working on  OFBIZ-11329, I found that
userLogin and impersonateLogin should be removed from
jsonResponseFromRequestAttributes

Thanks: James Yong for pointing that out

# Conflicts:
#	framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java
2020-02-04 15:48:46 +01:00
Michael Brohl 77f7acebe8 Improvement: German translation improvements in HumanResUiLabels
(OFBIZ-11134)

Thanks Ulrich Heidfeld for reporting and providing the patch.
2020-02-03 08:53:04 +01:00
Nicolas Malin 9b9db9e511 Improved: Improve error message page to support Theming
(OFBIZ-10753)

When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it

On controler.xml we can now use :
    <errorpage>/error/error.jsp</errorpage>
or
    <errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)

On your theme you can add your own error page :
    <template>
      ...
      <template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
    + <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
    </template>

The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.

Thanks to Marine Desmarchelier for the error page design

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68

# Conflicts:
#	framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlServlet.java
#	themes/common/template/ErrorPage.ftl
2020-02-01 11:08:21 +01:00
Michael Brohl 832217135a Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

This change provides easier access to the FileItem by not wrapping it
into a buffer.
2020-01-31 15:51:51 +01:00
Michael Brohl b0aff701d0 Improved: ‘EntityOperator#getId()’ is not used in the framework
(OFBIZ-10607)

Thanks Mathieu Lirzin for reporting and providing the patch.
2020-01-30 20:57:16 +01:00
Michael Brohl 1fd85aa4f9 Fixed: German translation typo in PartyUiLabels
(OFBIZ-11308)

Thanks: Ingo Könemann for reporting and providing the patch.
2020-01-30 18:38:34 +01:00
Pawan Verma a273531823 Revert "Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field"
(OFBIZ-10879)

This reverts commit 9706acf064.
2020-01-29 12:59:59 +05:30
Jacques Le Roux 092988eb05 Fixed: Fixed the issue on party page that will upload the data each time after
refreshing the page.
(OFBIZ-11325)

Earlier 'view' response type is used on the request that cause the issue.
We need to use request-redirect response type along with the required
redirect-parameter instead of view response type, i.e. We need to
request-redirect on viewProfile along with partyId as redirect-parameter.

Thanks: Humera Khan
2020-01-26 06:20:30 +01:00
Pawan Verma 9706acf064 Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field
(OFBIZ-10879)

CommunicationEventServices#updateCommEventAfterEmail could generate wrong result. If general.properties value 'mail.notifications.redirectTo' is used, it is possible that the subject string has more than 255 character.

Thanks, Ulrich Heidfeld for your contribution.
2020-01-25 15:56:04 +05:30
Pawan Verma a06bf80855 Fixed: Same content uploaded twice, if refresh the page after uploading the content
(OFBIZ-11171)

Thanks, Humera Khan and Shubham Goswami for your contribution.
2020-01-25 13:10:45 +05:30
Pawan Verma 6c75966c90 Fixed: Order Status History section broken for anonymous order
(OFBIZ-11231)

Reason for the issue: Anonymous orders doen't have associated User login record, so shown statusUserLogin in that case.
2020-01-25 12:04:05 +05:30
Pawan Verma e52860356f Fixed: updatePassword does not save optional parameter requirePasswordChange
(OFBIZ-11320)

When changing the password of a User Login through the Party Manager the Require Password Change dropdown menu selection does not save the selected value. The corresponding process is missing from the LoginMapProcs.xml.

Thanks: Ingo Könemann for your contribution.
2020-01-16 12:43:05 +05:30
Jacques Le Roux 2c727bed21 Fixed: Bug when order contains adjustments with NULL amount
(OFBIZ-11316)

The issue was introduced by OFBIZ-7012 where adding isTaxIncludedInPrice was
missing at line 565. Because the compared amount in this line (in the adjustment)
is different from 0 and equals to amountAlreadyIncluded only if
the tax is included in price

Thanks: Amine Azzi
2020-01-11 11:26:50 +01:00
Deepak Dixit d26e2568d4 Fixed: Fix typo 2020-01-06 00:54:41 +05:30
Jacopo Cappellato 1dd8d5e757 Fixed: Update budget demo data to reflect recent changes to the demo
finacial period data.
2020-01-03 17:32:18 +01:00
Jacopo Cappellato 1e73375bbb Fixed: Extend the thru date of the demo financial period (and simplify
some related demo data for easier future maintenance) in order to fix
some tests that are failing in the new year.
2020-01-03 17:17:18 +01:00
Jacques Le Roux e707e94839 Improved: Equivalent of svn:auto-props properties on the server
(OFBIZ-OFBIZ-11279)

We should have an equivalent of svn:auto-props properties on the server:
https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings
2019-12-19 13:38:22 +01:00
Samuel Trégouët 6facc0e73d Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files
(OFBIZ-6993)

# Conflict handled by hand in:
#	framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
2019-12-19 08:47:13 +01:00
Mathieu Lirzin 3cd7a3e9e9 Fixed: Display file name in XML parsing errors
(OFBIZ-6993)
2019-12-19 06:52:55 +01:00
Jacques Le Roux adceb71a39 Normalize all the line endings 2019-12-19 06:46:36 +01:00
Jacques Le Roux c071fb0ee9 Saving files before refreshing line endings 2019-12-19 06:45:58 +01:00
Pawan Verma 2e87ed1065 Fixed: Add button for 'Gift Message is shown on completed order
(OFBIZ-11160)

Thanks: Pierre Smits for report and Shivanand Chhatre for the fix.
2019-12-12 16:09:31 +05:30
Jacques Le Roux 055d1251b8 Fixed: https://github.com/apache/ofbiz-framework/pull/3
Just fixes a typo I guess people from Indonesia and Yogyakarta did not see
it yet, so I did not create a Jira
2019-12-01 12:36:47 +01:00
Mathieu Lirzin 2ba7a849dd Reverted: "Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)"
This reverts commit d1c037dca1.
2019-11-27 21:31:06 +01:00
Samuel Trégouët d1c037dca1 Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)
these declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile
2019-11-27 17:47:42 +01:00
Jacques Le Roux 9e8db09466 Fixed: Number problem cancelling order item
(OFBIZ-11283)

If an order item has a quantity greater then 1000, cancelling the order item via
the order form in backend does not work.

In the Demo (trunk) environment: the quantity of 1200 to cancel is displayed as
"1,200" in the quantity input field.
--> an error is displayed

On my local installation I use a different locale and it is displayed as "1.200".
--> interprets the dot as a comma and the quantity of 1,2 is cancelled

Create Order: Order Mgt --> Order Entry --> Sales Order (Customer: DemoCustomer)
--> ProductId: GZ-2644, Quantity 1200 --> Finalize order
On order: Edit Items --> click checkbox next to quantity -->cancel selected items

jleroux: I have applied the same in ReceiveInventory.ftl

Thanks: Ingo Wolfmayr for report and test. Ankush Upadhyay for the fix
2019-11-25 10:34:35 +01:00
Pawan Verma 3d05f5ae28 Fixed: liniting issues introduced by commit d00208c
(OFBIZ-10585)

Thanks: Mathieu Lirzin for report
2019-11-25 12:57:34 +05:30
Pawan Verma f249f27382 Fixed: Corrected variable name. Nothing functional.
(OFBIZ-10585)
2019-11-23 12:37:45 +05:30
Pawan Verma 59079010a1 Fixed: Production run not created for marketing package auto type product if component inventory is not available
(OFBIZ-10585)

When we create an order for marketing package auto, the system checks the component inventory and if found then it creates the production run job and produce marketing package inventory, but if component quantity not available then it does not create the job. So if we don't have an inventory item of component then production run should be created with created status.

Thanks: Yashwant Dhakad for report and Ankush Upadhyay for the patch.
2019-11-23 12:18:10 +05:30
Pawan Verma 32dcdd744c Fixed: Error while CSR creates a return
(OFBIZ-11068)

Added check to validate Payment Method passed from UI while creating return. If not available in system, throw an error.

Thanks: Dikpal Kanungo for report and Rohit Hukkeri for the patch.
2019-11-23 11:13:19 +05:30
Nicolas Malin 3a5175ff45 Fixed: Usage of 'include-form' instead of 'include-grid' in PartyScreens.xml for grid elements
(OFBIZ-11286)

In PartyScreens.xml there were 'ListInvoicesApplPayments', 'ListUnAppliedInvoices' and 'ListUnAppliedPayments' include as form instead of grid but in PartyForms.xml they are defined as grids.

Thanks to Ulrich Heidfeld to raise and solve this issue
2019-11-22 15:32:40 +01:00
Jacques Le Roux 773722e30e No functional change
Removes new line added to test Buildbot config after INFRA-19443
2019-11-21 08:32:29 +01:00
Jacques Le Roux 97744a4cc7 No functional change
Just a new line added to test Buildbot config after INFRA-19443
2019-11-21 08:31:37 +01:00
Jacopo Cappellato f90829fb8b Fixed: Add missing view permissions checks to various screens. 2019-11-16 08:25:33 +01:00
Jacques Le Roux 8ea3cd2385 Fixed: We have build problems in branches with plugins
(OFBIZ-11284)

Replaces trunk link by branch link
2019-11-15 17:38:04 +01:00
Nicolas Malin 372e68a5e4 Fixed: Possible NPE in StringUtil#strToMap
(OFBIZ-11281)

StringUtil#strToMap(String, String, boolean, String) throws Nullpointer for StringUtil.strToMap("", false).

Thanks to Ulrich Heidfeld for this fix
2019-11-14 09:16:47 +01:00
Jacques Le Roux 53faf82d46 Improved: SeoContextFilter.java is not able to handle query strings
(OFBIZ-11278)

Removes a trailing blank and uses empty to check request::getParameterMap result

Thanks: Mathieu to spot "empty to check request::getParameterMap result"
2019-11-10 10:49:05 +01:00
Jacques Le Roux 0d6bfb2ca8 Fixed: SeoContextFilter.java is not able to handle query strings
(OFBIZ-11278)

While working on OFBIZ-9804 (verification email for Newsletter) I was confronted
with misc. issues. One of them was that SeoContextFilter.java was not handling
query strings.

This fixes it
2019-11-09 22:08:45 +01:00
Jacques Le Roux 38fd13edbe Fixed: baseEcommerceSecureUrl does not work in ecomseo.
(OFBIZ-11267)

This fixes it by introducing a new pattern in SeoConfig.xml

(cherry picked from commit 8f4cfeb951)
2019-11-07 17:52:19 +01:00
Jacques Le Roux 6c3f5ad3f5 Fixed: Getting policy error while editing html text data using cms
(OFBIZ-11265)

Service parameter with allow-html="safe" does not check the OWASP sanitizer flag
ie. enabled or not and perform sanitization which causing policy error while
editing text data

getting following exception error:
"In field [textData] by our input policy, your input has not been accepted for
security reason. Please check and modify accordingly, thanks."

Thanks: Pradeep Choudhary for report and suggestion
(cherry picked from commit 8aea160e04)
2019-11-07 17:39:08 +01:00
Jacques Le Roux edcbc204a7 Fixed: Update the SvnCheckout Gradle task to used Github svn repo
(OFBIZ-11276)

Relies on a Github specific feature which allows to use and automated
mirrored svn repo.
2019-11-06 19:09:24 +01:00
Jacques Le Roux dbccb05c16 "Applied fix from trunk for revision: 1869001"
------------------------------------------------------------------------
r1869001 | mthl | 2019-10-26 16:42:02 +0200 (sam. 26 oct. 2019) | 9 lignes

Fixed: Handle whitelist of serializable classes from properties
(OFBIZ-11261)

There was a bug regarding the way the ‘ListOfSafeObjectsForInputStream’ value
defined in the “SafeObjectInputStream.properties” file was handled.  Mistakenly
only one class identifier was allowed.

Some unit tests have been added to check that the identified bug is fixed.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1869032 13f79535-47bb-0310-9956-ffa450edef68
2019-10-27 09:35:29 +00:00
Jacques Le Roux bf2644babd "Applied fix from trunk for revision: 1868611"
------------------------------------------------------------------------
r1868611 | jleroux | 2019-10-19 08:42:07 +0200 (sam. 19 oct. 2019) | 11 lignes

Improved: Handling tenant in XmlRpcEventHandler
(OFBIZ-10284)

The XMLRPC service does not support tenants. Even if the tenant domain is 
included in the HTTP request the call does not affect the correct tenant. 
The issue and fix has been discussed in  in the thread
https://markmail.org/message/bz4dofrxqp6i7ove

jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. 

Thanks: Rajesh Kumar Mallah
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868613 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 06:58:10 +00:00
Jacques Le Roux c67a31aec7 "Applied fix from trunk for revision: 1868553"
------------------------------------------------------------------------
r1868553 | jleroux | 2019-10-17 16:26:42 +0200 (jeu. 17 oct. 2019) | 14 lignes

Fixed: FTL error for purchase order with Bulk Item Type
(OFBIZ-11252)

Steps to regenerate:
1. Login into the ordermgr application and click on Order Entry tab
2. Create PO with any supplier
3. Fill details and click on Continue
4. Now select Product Category with Item type Bulk and add the description and 
   Click on add to order
5.  Finalize order with Finalize Order button
6. Add Term type, ship group option, etc details and create Order.
7. Scroll down to Order Items section and See the FTL error on the screen.

Thanks: Devanshu Vyas
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868555 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 14:27:42 +00:00
Jacques Le Roux 9ea1bf3b79 "Applied fix from trunk for revision: 1868545"
------------------------------------------------------------------------
r1868545 | jleroux | 2019-10-17 14:19:33 +0200 (jeu. 17 oct. 2019) | 16 lignes

Fixed: EditExample always update status, because current Status not shown
(OFBIZ-11230)

In the EditExample Form, the drop-down is populates with the Valid change status 
only. So current status is not in the list and the status print in the drop-down 
is the next authorized. I want to modify exampleName or exampleType, I go to 
editExample and change what I want and validate. The problem is status is also 
changed!

There are 12 other same or similar cases. For the first of them (in FinAccount) 
there is the same bug: when I change FinAccount Name, status change too. If I 
add current="first-in-list" in the tag drop-down it works 

jleroux: Quote is a peculiar case due to OFBIZ-7337 which was a wrong fix
 
Thanks: Oliver for the analysis and the fix 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868548 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 12:20:28 +00:00
Jacques Le Roux 2c5452b2f9 Improved: no functional change
Just better English in message

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868424 13f79535-47bb-0310-9956-ffa450edef68
2019-10-14 07:20:56 +00:00
Jacques Le Roux 52f5360b51 "Applied fix from trunk for revision: 1868395"
------------------------------------------------------------------------
r1868395 | jleroux | 2019-10-13 12:37:08 +0200 (dim. 13 oct. 2019) | 8 lignes

Fixed: Merge UrlRegexpTransform and OfbizUrlTransform classes
(OFBIZ-11229)

OFBIZ-4361 depends on this issue. Here is a first version, the main identified 
point was when the request isn't present (email send, service call) the website 
isn't pull from context. This solves this aspect

Thanks: Nicolas for the patch
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868397 13f79535-47bb-0310-9956-ffa450edef68
2019-10-13 10:40:16 +00:00
Jacques Le Roux 12d96cebe9 "Applied fix from trunk for revision: 1868298"
------------------------------------------------------------------------
r1868298 | jleroux | 2019-10-11 18:45:16 +0200 (ven. 11 oct. 2019) | 20 lignes

Fixed: NotSerializableException after uploading images to an order
(OFBIZ-11123)

I found that using in r1866259 the same fix than Si Chen used in OFBIZ-750 was 
wrong. The code just above this fix is

{code:java}
if (obj instanceof Serializable) {
    reqAttrMap.put(name, obj);
}
{code}

The problem with this code is that if does not handle inner Maps which may 
contain a non Serializable Object. So the solution is rather to get one level
deeper and apply the same. We can then remove the harcoded lines with 
"uploadedFile" and "_REQUEST_HANDLER_" below. Then all possible cases are handled
as long as we have not inner-inner-Maps



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868300 13f79535-47bb-0310-9956-ffa450edef68
2019-10-11 16:45:58 +00:00
Jacques Le Roux 8f6dde8d45 Improved: no functional change
As reported by Ethan Vos on user ML, sometimes the alias between wget and 
Invoke-WebRequest is not present on Windows 7, better keep it simple!

Also removes the comment:
  Anyway I believe this should be only used in dev environment
which is no longer true

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1868000 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 08:10:03 +00:00
Pawan Verma 30bc63b676 Applied fix from trunk for revision: 1867972
===

Reverted: User is unable to update the review of product
(OFBIZ-10799)

Reverted rev 1867904

Thanks: Deepak Dixit for reporting the issue.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867974 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 10:16:40 +00:00
Pawan Verma 9a3054c842 Applied fix from trunk for revision: 1867937
===

'At least one phone number is required below' message should be uneditable while creating new customer using partymgr
(OFBIZ-11113)

Thanks: Arpit Mor for report and Saurabh Dixit for the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867940 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 12:37:57 +00:00
Pawan Verma 6cf23e4c4c Applied fix from trunk for revision: 1867930
===

Fixed: Check run payment(A/P) transactions not getting available for reconciliation
(OFBIZ-10796)

Check run payment group transactions don't get available for Financial Account reconciliation. Though the financial account balance gets updated during the A/P check run process, the system must allow the user with an additional step of reconciling the transactions.

The cause of this is that the financial account transaction doesn't get created in the 'Created' status and has an 'Approved' status. An approved status financial transaction directly updates the financial account balance and thus don't appear in the list of the transactions to be reconciled.

Thanks: Chinmay Patidar for your contribution and Pierre Smits for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867932 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 12:06:41 +00:00
Pawan Verma 6ace63f0d6 Applied fix from trunk for revision: 1867910
===

Fixed: Sales By Store Report not working
(OFBIZ-11119)

Added Null check to avoid Exception.

Thanks: Chandan Khandelwal for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867912 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 07:35:14 +00:00
Pawan Verma 69482b7acc Applied fix from trunk for revision: 1867904
===

Fixed: User is unable to update the review of product
(OFBIZ-10799)

Redirected request with eligible parameters so that If the user had a search using any parameter result should persist after the update.

Thanks: Ashish Sharma for report and Pierre Smits and Jacques Le Roux for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867906 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 07:23:03 +00:00
Aditya Sharma f6db33b35b Applied fix from trunk for revision: 1867745
===

Fixed: redundant license text


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867747 13f79535-47bb-0310-9956-ffa450edef68
2019-09-30 06:51:12 +00:00
Jacques Le Roux da148eb593 "Applied fix from trunk for revision: 1867585"
------------------------------------------------------------------------
r1867585 | jleroux | 2019-09-26 17:38:52 +0200 (jeu. 26 sept. 2019) | 9 lignes

Fixed: Error in log when looking for parties at partymgr/control/main
(OFBIZ-11201)

These are similar issues in Minilang than the one fixed initially for
<set field="userLoginSize" value="${util:size(logins)}" type="Integer"/>
Fixed by replacing by 
<set field="userLoginSize" value="${groovy:logins.size()}"/>


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867587 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:39:55 +00:00
Nicolas Malin 571666c737 Fixed: Default option for ModelFormField.DateFindField doesn't work
(OFBIZ-11212)
When you use a date-find element on form, the defaut option are in code like to greater_than and less _than

        public DateFindField(int fieldSource, String type) {
            super(fieldSource, type);
            this.defaultOptionFrom = greaterThanEqualTo;
            this.defaultOptionThru = lessThanEqualTo;
        }

but on macro

<#macro renderDateFindField ...
      <option value=greaterThan<#if defaultOptionFrom==greaterThan> selected=selected</#if>></option><#rt/>
      ...
      <option value=opLessThan<#if defaultOptionThru==opLessThan> selected=selected</#if>></option><#rt/>
      ...
</#macro>

So the value java isn't correct with ftl values and default value never used.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867584 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:36:18 +00:00
Jacques Le Roux b50412efe4 "Applied fix from trunk for revision: 1867577" (by hand)
------------------------------------------------------------------------
r1867577 | jleroux | 2019-09-26 16:41:50 +0200 (jeu. 26 sept. 2019) | 8 lignes

Fixed: Fix multi modal opening
(OFBIZ-11211)

The issue is that when closing the modal the div inside html dom is not removed. 
Then opening a second time create another identical div. Since a lookup is based 
on an unique id, this id is no more unique...

Thanks: Carl Demus
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867579 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 14:47:47 +00:00
Nicolas Malin 4cb79d704c Fixed: Send upload form with even-update-area doesn't work (Backport from trunk)
(OFBIZ-11207)
When you create a xml form with upload as type, you can't use on-event-update-area element to submit it by ajax.
Otherwise, OFBiz return an error message on 'uploadFile is empty.
To solve it, we analyze the enctype's form before submit it to move on FormData instead a direct serialize [1]

example form where the problem has been present
****
    <form name='AddNicelyFile' type='upload' target='CreateNicelyFile'>
        <field name='uploadedFile' title='File'><file/></field>
        <field name='addButton'><submit/></field>
        <on-event-update-area event-type='submit' area-id='window' area-target='FileDisplaying'/>
    </form>
****

Thanks to Samuel Tregouet for this fix

[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867438 13f79535-47bb-0310-9956-ffa450edef68
2019-09-24 09:00:35 +00:00
Jacques Le Roux e85f3ded7f "Applied fix from trunk for revision: 1867099"
------------------------------------------------------------------------
r1867099 | jleroux | 2019-09-18 09:29:18 +0200 (mer. 18 sept. 2019) | 17 lignes

Fixed: Error in log when looking for parties at partymgr/control/main
(OFBIZ-11201)

There is this a (long stack trace) error in log (only), mostly

java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
at org.apache.ofbiz.base.util.string.UelFunctions.getSize(UelFunctions.java:318)

I did not notice any other effect, so the fix only cleans the log.

It's actually an issue in ListParty grid with this line:
<set field="userLoginSize" value="${util:size(logins)}" type="Integer"/>

This fixes it by replacing by 
<set field="userLoginSize" value="${groovy:logins.size()}"/>


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867101 13f79535-47bb-0310-9956-ffa450edef68
2019-09-18 07:30:04 +00:00
Jacques Le Roux 091d21517f "Applied fix from trunk for revision: 1867038"
------------------------------------------------------------------------
r1867038 | jleroux | 2019-09-17 08:32:20 +0200 (mar. 17 sept. 2019) | 11 lignes

Documented: 
Got this error with Eclipse Asciidoctor editor plugin

>> rendering:-273312131_hidden-editorfile_developer-manual.adoc
asciidoctor: WARNING: C:/projectsASF/ofbiz/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc: line 473: unterminated listing block
asciidoctor: WARNING: C:/projectsASF/ofbiz/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc: line 511: unterminated listing block

This fixes it



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1867040 13f79535-47bb-0310-9956-ffa450edef68
2019-09-17 06:34:26 +00:00
Jacques Le Roux 2b921e958a "Applied fix from trunk for revision: 1866986"
------------------------------------------------------------------------
r1866986 | jleroux | 2019-09-16 10:20:46 +0200 (lun. 16 sept. 2019) | 4 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

Fixes a typo which was crashing webtools/control/LogView
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866988 13f79535-47bb-0310-9956-ffa450edef68
2019-09-16 08:21:35 +00:00
Jacques Le Roux 9c0ccd7afa Improved: Document how to store the JWT secret key
(OFBIZ-10751)

Copy manually all files from trunk because of weird conflicts

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866939 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 11:37:39 +00:00
Jacques Le Roux bb2f56a0d0 "Applied fix from trunk for revision: 1866920"
------------------------------------------------------------------------
r1866920 | jleroux | 2019-09-14 10:19:18 +0200 (sam. 14 sept. 2019) | 18 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

These are not really path traversal issues. 

We can't solve them using the traditional way to fix path traversal issues 
(ie normalising path). Because Fetchlogs and ViewFile are actually reading 
files and if you have the right to read these files then nothing will prevent 
you to read them. 

The problem is more what those requests are supposed to do. 
Fetchlogs is supposed to read a log in the log dir 
and ViewFile is supposed to read a file containing labels 
(ie either an XML or Properties file).

So the solution is to allow these requests to only do what they are supposed to 
do. This is what is done in ViewFile and FetLogs Groovy files.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866922 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 08:21:23 +00:00
Jacques Le Roux 358378f74f "Applied fix from trunk for revision: 1866890"
------------------------------------------------------------------------
r1866890 | jleroux | 2019-09-13 12:15:03 +0200 (ven. 13 sept. 2019) | 8 lignes

Improved: FindArInvoices request needs performance improvement regarding use of 
EntityListIterator::hasNext method
(OFBIZ-11198)

FindAPInvoices request  does not suffer from this issue nor findInvoice request.

This was due to <screen name="FindArInvoices"> definition
Using something similar than <screen name="FindApInvoices"> fixes the issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866892 13f79535-47bb-0310-9956-ffa450edef68
2019-09-13 10:16:17 +00:00
Jacques Le Roux 85d87fbe4a "Applied fix from trunk for revision: 1866834"
------------------------------------------------------------------------
r1866834 | jleroux | 2019-09-12 09:49:41 +0200 (jeu. 12 sept. 2019) | 8 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Allows users to easily override the list of accepted objects by using the
listOfSafeObjectsForInputStream property

CVE-2019-0189

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866836 13f79535-47bb-0310-9956-ffa450edef68
2019-09-12 07:50:56 +00:00
Jacques Le Roux 52e7476022 "Applied fix from trunk for revision: 1865852"
------------------------------------------------------------------------
r1865852 | pawan | 2019-08-24 16:28:57 +0200 (sam. 24 août 2019) | 8 lignes

Fixed: Issue of unable to view a PartyContent on view profile page of a party
(OFBIZ-11038)

When click on view button img request will be hit along with contentName and imgId as a parameter. This request invokes serveImage event(DataEvents.java) which is deprecated now.
Instead of img request we can call stream request with contentId as a parameter that invokes serveObjectData event.
This will work as per the value of content-disposition-type (requestHandler.properties) i.e. attachement or inline

Thanks: Devanshu Vyas for reporting the issue and Humera Khan for the patch and Prachi Shastri for testing of the bug.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866591 13f79535-47bb-0310-9956-ffa450edef68
2019-09-08 07:55:15 +00:00
Gil Portenseigne 7966128772 Fix parenthesis syntax error in groovy
(OFBIZ-11186)

Thanks Samuel Trégouët for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866516 13f79535-47bb-0310-9956-ffa450edef68
2019-09-06 15:04:04 +00:00
Jacques Le Roux f421e7ced4 "Applied fix from trunk for revision: 1866259"
------------------------------------------------------------------------
r1866259 | jleroux | 2019-09-02 09:32:48 +0200 (lun. 02 sept. 2019) | 10 lignes

Fixed: NotSerializableException after uploading images to an order
(OFBIZ-11123)

In a lot of services we use the ByteBuffer object to upload files. 
When a such service is used with the redirect-parameter in a controller the 
ByteBuffer needs to be serialized. Unfortunately ByteBuffer (in our case its
subclass HeapByteBuffer) is not serializable. So that can't work.

Fortunately no redirect-parameter concerns uploadedFile so we can safely remove
it from reqAttrMap in RequestHandler
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866261 13f79535-47bb-0310-9956-ffa450edef68
2019-09-02 07:34:03 +00:00
Nicolas Malin 6af9a7719a Improved: update init-gradle-wrapper.sh to load gradlew script
(OFBIZ-10145)
When you run 'sh gradle/init-gradle-wrapper.sh', if the script gradlew at the OFBiz root isn't present we download it from bintray.
Improvements to comments and messages in the init-gradle-wrapper.sh script do on r1865605 by Jacopo

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1866122 13f79535-47bb-0310-9956-ffa450edef68
2019-08-30 07:15:09 +00:00
Jacques Le Roux 1e80b7503f "Applied fix from trunk for revision: 1865924 "
------------------------------------------------------------------------
r1865924 | nmalin | 2019-08-26 11:54:55 +0200 (lun. 26 août 2019) | 6 lignes

Fixed: CategoryServices returns null when opening Product main page
(OFBIZ-11175)
Increase parsing control to don't realize it on null value for viewSizeString
when call service getProductCategoryAndLimitedMembers.

Thanks Jacques Leroux for raise this issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865928 13f79535-47bb-0310-9956-ffa450edef68
2019-08-26 11:27:12 +00:00
Jacques Le Roux 0bfb6cdb0a "Applied fix from trunk for revision: 1865891"
------------------------------------------------------------------------
r1865891 | jleroux | 2019-08-25 15:24:10 +0200 (dim. 25 août 2019) | 5 lignes

Improved: Use Labels in themes names
(OFBIZ-9863)

Remove duplicated block that I forgot to remove
This had no effects but I found an XML error in log
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865893 13f79535-47bb-0310-9956-ffa450edef68
2019-08-25 13:27:34 +00:00
Jacques Le Roux f0e2c56aee "Applied fix from trunk for revision: 1865883"
------------------------------------------------------------------------
r1865883 | jleroux | 2019-08-25 11:48:31 +0200 (dim. 25 août 2019) | 8 lignes

Fixed: UiLabel is missing for Web Analytics Type on content  component
(OFBIZ-11170)

Steps to reproduce
content/control/EditWebAnalyticsConfig?webSiteId=WebStoreClone
On that Web Analytics Type UiLabel is missing.

Thanks: Rahul Marjiwe
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865885 13f79535-47bb-0310-9956-ffa450edef68
2019-08-25 09:49:21 +00:00
Pawan Verma cd39cf1d06 Applied fix from trunk for revision: 1865811
===

Fixed: Order status history should show party id instead of user login id
(OFBIZ-11121)
Thanks: Ashish Kumar Pandey for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865814 13f79535-47bb-0310-9956-ffa450edef68
2019-08-24 05:17:16 +00:00
Jacques Le Roux 56729c4b30 Implemented: Remove the Gradle wrapper from our release packages and add a step
to our build notes
(OFBIZ-10145)

Removes weird characters

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865397 13f79535-47bb-0310-9956-ffa450edef68
2019-08-18 15:12:00 +00:00
Jacques Le Roux f179238e97 "Applied fix from trunk for revision: 1865370" (labels fixed by hand)
------------------------------------------------------------------------
r1865370 | jleroux | 2019-08-17 20:26:42 +0200 (sam. 17 août 2019) | 7 lignes

Improved: Use Labels in themes names
(OFBIZ-9863)

Adds labels and necessary calls in Theme.xml

While at it, improves other backend themes labels by removing redundancy, at
least in French and English.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865372 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 18:29:09 +00:00
Jacques Le Roux e153a1625b "Applied fix from trunk for revision: 1865367"
------------------------------------------------------------------------
r1865367 | jleroux | 2019-08-17 20:08:14 +0200 (sam. 17 août 2019) | 4 lignes

Fixed: <description> of <visual-theme> in Theme.xml does not work
(OFBIZ-9867)

There is no str:label in UelFunctions class but util:label
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865369 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 18:08:56 +00:00
Jacques Le Roux 964a439b91 "Applied fix from trunk for revision: 1865347"
------------------------------------------------------------------------
r1865347 | jleroux | 2019-08-17 13:34:01 +0200 (sam. 17 août 2019) | 9 lignes

Fixed: Issue loading solr component (JNDI timeout)
(OFBIZ-11156)

We need to provide a JNDI environment property for Solr to load faster

Fixes previous commit where I hastily harcoded in jndi.properties file

Used a system property which can be used to define a JNDI environment 
property
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865349 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 11:35:01 +00:00
Jacques Le Roux 06a8a9ec22 "Applied fix from trunk for revision: 1865344"
------------------------------------------------------------------------
r1865344 | jleroux | 2019-08-17 13:07:01 +0200 (sam. 17 août 2019) | 4 lignes

Fixed: Issue loading solr component (JNDI timeout)
(OFBIZ-11156)

We need to provide a JNDI environment Property for Solr to load faster
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865346 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 11:07:40 +00:00
Aditya Sharma 32b54769ed Applied fix from trunk for revision: 1838074
===
Improved: Change the uggly favicon with the new one ! | Using new OFBiz logo
(OFBIZ-10522)

The unreleased branch 17.12 uses new logo, but old favicon icon. Backported the changes from trunk.

Additional change: 
1. Fixed broken logo image URL for flatgrey theme along with some custom css to fix its height and width
2. Replaced new logo with old in tomahawk theme along with some custom css to fix its height and width

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1865034 13f79535-47bb-0310-9956-ffa450edef68
2019-08-13 12:26:54 +00:00
Jacques Le Roux 305a04f627 "Applied fix from trunk for revision: 1864930"
------------------------------------------------------------------------
r1864930 | jleroux | 2019-08-11 15:23:19 +0200 (dim. 11 août 2019) | 4 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

As suggested by Mathieu on dev ML factorises the use of Path::normalize
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864932 13f79535-47bb-0310-9956-ffa450edef68
2019-08-11 13:28:21 +00:00
Jacques Le Roux 345e16e343 Implemented: Remove the Gradle wrapper from our release packages and add a step
to our build notes
(OFBIZ-10145)

Adds the Windows init-gradle-wrapper scripts (both .bat et .ps1) in all 
concerned branch (trunk, R18, R17)

These are very simple because I believe (almost?) nobody is using a Windows 
server to deploy OFBiz in production. So they will be only used in development 
environment. In case deployment in production is needed they supply a base to 
work on...

The init-gradle-wrapper.ps1 scripts use only HTTP and not HTTPS because it's 
very difficult to handle all the issues related with different versions of 
Powershell and .net in different versions of Windows. Better to let that to
deployment in case it's really needed...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864927 13f79535-47bb-0310-9956-ffa450edef68
2019-08-11 12:56:38 +00:00
Jacques Le Roux b870222561 "Applied fix from trunk for revision: 1864891"
------------------------------------------------------------------------
r1864891 | jleroux | 2019-08-10 19:02:12 +0200 (sam. 10 août 2019) | 6 lignes

Fixed: In Product Image Management Uploading file fails due to missing 
StatusValidChange
(OFBIZ-11148)

With last commit I introduced a dependency from ProductSeedData to 
ContentSeedData. The loadAll tasks failed because of that, this fixes it.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864893 13f79535-47bb-0310-9956-ffa450edef68
2019-08-10 17:22:54 +00:00
Jacques Le Roux e913ce054d "Applied fix from trunk for revision: 1864881"
------------------------------------------------------------------------
r1864881 | jleroux | 2019-08-10 17:51:19 +0200 (sam. 10 août 2019) | 7 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

This fixes an issue in FrameImage::uploadFrame which was reported by Man Yue Mo
as described in OFBIZ-9973

I finally decided to follow OWASP advice about using normalize()
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864883 13f79535-47bb-0310-9956-ffa450edef68
2019-08-10 15:52:15 +00:00
Nicolas Malin 15c95144c2 Implemented: Helper script to download the gradle wrapper
(OFBIZ-10145)
Add a helper script to download gradle-wrapper.jar and gradle-wrapper.properties 
at version 3.2.1 from bintray [1] when gradle/wrapper/gradle-wrapper.jar isn't present.

To use it just run at the OFBiz root :
    $ sh gradle/init-gradle-wrapper.sh

Tagged gradle version from the gradle community [2] contains an error on the gradle-wrapper.properties
(distribution url -> https://services.gradle.org/distributions-snapshots/gradle-3.2.1-20161121174103+0000-bin.zip seems to not exist)
that break the wrapper init. So use own version to correct this.

[1] https://dl.bintray.com/apacheofbiz/GradleWrapper/
[2] https://github.com/gradle/gradle/blob/v3.2.1/gradle/wrapper/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864812 13f79535-47bb-0310-9956-ffa450edef68
2019-08-09 15:05:33 +00:00
Jacques Le Roux 9cda9fd038 "Applied fix from trunk for revision: 1864721"
------------------------------------------------------------------------
r1864721 | jleroux | 2019-08-08 17:52:04 +0200 (jeu. 08 août 2019) | 9 lignes

Fixed: In Product Image Management Uploading file fails due to missing 
StatusValidChange
(OFBIZ-11148)
The error is
java.lang.Exception: Error in Service [updateContent]: Error: 
status change from [CTNT_IN_PROGRESS] to [IM_PENDING] is not allowed.

The issue does not exist in R16. So I guess it's because of OFBIZ-9907.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864723 13f79535-47bb-0310-9956-ffa450edef68
2019-08-08 15:52:44 +00:00
Jacques Le Roux 70ad90cafa "Applied fix from trunk for revision: 1864716"
------------------------------------------------------------------------
r1864716 | jleroux | 2019-08-08 17:28:45 +0200 (jeu. 08 août 2019) | 15 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

FindBugs is now deprecated and replaced by Spotbugs

Last time I forgot to encode productId as reported by Man Yue Mo from Semmle

This eventually fixes the "Relative path traversal" issue reported by Spotbugs
by encoding the whole file name.

Nevertheless Spotbugs continues to report the same issue in trunk but not in R16
I have not ideas why and I see no other possible issue. 

I will backport and check again.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864718 13f79535-47bb-0310-9956-ffa450edef68
2019-08-08 15:29:34 +00:00
Aditya Sharma 398084c7fe Fixed: favicon.ico missing for LookupDecorator
(OFBIZ-11146)
The ListVisualTheme page uses LookupDecorator and in the absence of any shortcut icon the browser hits favicon.ico file by default. 
Additional change: Fixed path for title.gif specific to Flatgrey theme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1864221 13f79535-47bb-0310-9956-ffa450edef68
2019-08-02 12:51:48 +00:00
Aditya Sharma 86e44f2ad5 Applied fix from trunk for revision: 1863838
===

Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-10678)
1. For solving CVE-2019-11358, upgraded jQuery to 3.4.1
2. Replaced library Fancybox with Featherlight. Added custom css so that cursor for links becomes pointer
Thanks Jacques Le Roux for the reviews

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1863853 13f79535-47bb-0310-9956-ffa450edef68
2019-07-27 12:30:49 +00:00
Jacques Le Roux 6c72cfd534 "Applied fix from trunk for revision: 1863560 BY HAND"
------------------------------------------------------------------------
r1863560 | jleroux | 2019-07-22 17:21:14 +0200 (lun. 22 juil. 2019) | 37 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

Today Olivier reported directly to me that there was an issue in HR:
<<If you go to humanres, at the level of the tree that appears the icons to expand 
the tree no longer appear (but you can click...)
This is due to the path of the d.png image which is wrong in the css file 
(there is too much image in the path)>>

I should have seen it because the d.png file is, with other related image files,
in the same directory than style.css. And there was an inconsistency in the
style.css files regarding the d.png file path.

We should note that we have still this error in log:
2019-07-22 16:25:26,275 |jsse-nio-8443-exec-7 |ControlServlet                
|E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [d.png]; 
this request does not exist or cannot be called directly.
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest
(RequestHandler.java:277) ~[ofbiz.jar:?]

As I wrote in my last commit for OFBIZ-10895:
The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log.

Some error appears before the user is logged in, as I wrote in the Jira:
<<I noticed that this error message often appears before login. A 404 can be 
seen in the access log and then once logged the issue no longer exists 
(ie we get a 200). I have no yet investigated why...>>

Nevertheless, I want to remove this misleading error message. I hope I'll do 
that before forgetting.

Thanks: Olivier Heintz 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1863563 13f79535-47bb-0310-9956-ffa450edef68
2019-07-22 15:26:22 +00:00
Jacques Le Roux a5581641fb "Applied fix from trunk for revision: 1835871"
------------------------------------------------------------------------
r1835871 | surajk | 2018-07-14 07:35:44 +0200 (sam. 14 juil. 2018) | 10 lignes

Improved: All existing party contact mechs should be deleted before creating new one.
(OFBIZ-10396)

Currently, everywhere in code base, before creating new party contact mech record, we use 

deletePartyContactMechPurposeIfExists service to delete old records. But, problem is 

<first-from-list is used everywhere which only deletes first fetched record.

All previous records should also gets deleted before creating new party contact mech purpose for a specific purpose type.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1863473 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 11:12:09 +00:00
Jacques Le Roux 8a68ff0027 "Applied fix from trunk for revision: 1862648"
------------------------------------------------------------------------
r1862648 | jleroux | 2019-07-06 11:42:46 +0200 (sam. 06 juil. 2019) | 14 lignes

Fixed: Error message is displayed when user having space in username logs 
in at ecommerce
(OFBIZ-10671)

Pierre pointed out that the NotValidUserName label NL translation was wrong and 
proposed a right one.

Looking at it closer EN and FR were not totally right either. I have fixed them.
Before committing, I wondered if we should remove all other languages, then 
English would be used. Or if we let it as is for users of these languages to 
propose a fix, as Pierre did. I'm more for the later, then end users who don't 
speak English would at least have something they can read and possibly amend.

Thanks: Pierre Smits
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862650 13f79535-47bb-0310-9956-ffa450edef68
2019-07-06 09:44:17 +00:00
Jacques Le Roux fe932a5531 "Applied fix from trunk for revision: 1862466 "
------------------------------------------------------------------------
r1862466 | jleroux | 2019-07-03 15:30:28 +0200 (mer. 03 juil. 2019) | 20 lignes

Fixed: Error message is displayed when user having space in username logs 
in at ecommerce
(OFBIZ-10671)

Steps to regenerate:
 # Open URL: [https://demo-trunk.ofbiz.apache.org/ecommerce/control/main]
 # Click on register in header section
 # Provide all the mandatory information but provide a user name such that is 
    contains a space (like: Walter White or Jesse Pinkman)
 # Click on save button

Actual: When user clicks on save button then he is redirected to main page of 
ecommerce and an error message is displayed. 
Similarly when user with space in username tries to login, error message is 
displayed. 

Praven: Added standard regex for username allowed alphabets, numbers, and _-
jleroux: actually "-" was  missing in the regepx definition.

Thanks: Arpit Mor for report and Praveen Sharma for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862472 13f79535-47bb-0310-9956-ffa450edef68
2019-07-03 13:33:17 +00:00
Jacques Le Roux 69f4dcbbb3 "Applied fix from trunk for revision: 1862278"
------------------------------------------------------------------------
r1862278 | jleroux | 2019-06-28 13:53:55 +0200 (ven. 28 juin 2019) | 17 lignes

Fixed: User should be notified with success message on MRP run in manufacturing component
(OFBIZ-9533)

Steps to regenerate:
1. Go to Manufacturing component (manufacturing/control/main)
2. Click on Mrp sub menu (manufacturing/control/FindInventoryEventPlan)
3. Click on Run Mrp button.(manufacturing/control/RunMrp)
4. Select Facility/Facility Group and Click Submit button.
On success, the user should be notified with success message like 
"Mrp run is scheduled".

jleroux: despite being a sub-task of an improvement I decided to backport. 
It works well and nothing could go wrong, only UI changes.

Thanks: Aditya Sharma for report, Humera Khan for the fix, Prachi Shastri for
testing and Pierre Smits for noticing this could be backported (despite being
a sub-task of an improvement)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862280 13f79535-47bb-0310-9956-ffa450edef68
2019-06-28 11:55:11 +00:00
Jacques Le Roux 43ee4ab771 "Applied fix from trunk for revision: 1862271"
------------------------------------------------------------------------
r1862271 | jleroux | 2019-06-28 11:39:44 +0200 (ven. 28 juin 2019) | 11 lignes

fixed: supplierProductId Should Have Consistent Types Across Entities.
(OFBIZ-10150)

During some data migration I hit an issue where my data for supplierProductId 
was too long. So I looked up the fields and noticed that the order item entity 
had a different type for the field than the supplier product entity.

jleroux: we should do it for all cases
 

Thanks: jesse thomas for report and Rohit Hukkeri for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862273 13f79535-47bb-0310-9956-ffa450edef68
2019-06-28 09:40:29 +00:00
Jacques Le Roux e3b8ec5e84 "Applied fix from trunk for revision: 1862207"
------------------------------------------------------------------------
r1862207 | jleroux | 2019-06-27 14:03:21 +0200 (jeu. 27 juin 2019) | 8 lignes

Fixed: Export XML data, ,o proper error message displayed if user misses to 
select entities 
(OFBIZ-11125)

No Proper error message is displayed if user misses to select entities from the 
list, and throw error message

Thanks: Jayansh Shinde
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862209 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:55 +00:00
Jacques Le Roux 319d7f7626 "Applied fix from trunk for revision: 1862046"
------------------------------------------------------------------------
r1862046 | jleroux | 2019-06-25 11:44:54 +0200 (mar. 25 juin 2019) | 1 ligne

Reverted: it was not supposed to be committed, "wrong button" while backporting
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862048 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:48:29 +00:00
Jacques Le Roux 7c256a12be "Applied fix from trunk for revision: 1861869"
------------------------------------------------------------------------
r1861869 | jleroux | 2019-06-22 16:19:09 +0200 (sam. 22 juin 2019) | 15 lignes

Fixed: Logo image not showing on party profile 
(OFBIZ-9299)

Logo image not displayed until we press in content component

Logo image was not showing on party profile page because we were using Ajax 
request to add party content on the party profile screen. 
So due to ajax request screen was not getting refreshed. 

To display logo image we did the following changes:
1) Removed ajax request and rendered profile view screen after submit
2) Used ofbizUrl macro to show an image instead of /content/control/stream URL


Thanks: Moatasim Al Masri for reporting, Mohammed Rehan Khan for fixing
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861871 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 14:25:40 +00:00
Pawan Verma c2a3e58ca5 Applied fix from trunk for revision: 1861859
===

Fixed: Issue in which Ecommerce anonymous contactus was having wrong fromAddress.
(OFBIZ-10844)
As per my understanding, sendFrom email cannot be the customer's email address.

Email settings for this email are maintained at ProductStoreEmailSetting with CONT_NOTI_EMAIL as emailType and like other notifications, we should use ProductStoreEmailSetting.fromAddress to send this email which is configurable.
Thanks: Schumann Ye for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861861 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 12:18:40 +00:00
Pawan Verma aa340cbd48 Applied fix from trunk for revision: 1861849
===

Fixed: Issue of agreement overview does not show names of parties.
(OFBIZ-10900)
Thanks Pierre Smits for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861851 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 11:53:06 +00:00
Mridul Pathak f9cff7745d Applied fix from trunk r1861838.
Fixed: Getting an error while creating event from SFA without providing event name.
(OFBIZ-11109)
				
Thanks Harman Kaur Matharu for reporting and Aditi Patidar for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861843 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:46:35 +00:00
Suraj Khurana 54add658c7 Applied fix from trunk for revision: 1861837
===

Fixed: Issue with Status of invoice.
(OFBIZ-10310)
Cause: Missing statusId in parameters.
Thanks Aayush Jain for reporting and Devanshu Vyas for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861840 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:36:55 +00:00
Aditya Sharma a8b00ee90a Applied fix from trunk for revision: 1861615
===

Fixed: typo in the NOTICE file content


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1861617 13f79535-47bb-0310-9956-ffa450edef68
2019-06-19 11:38:05 +00:00
Suraj Khurana af72fb8d2e Applied fix from trunk for revision: 1860797
===

Fixed: Profile of contact person not shown on quick add of contact in SFA.
(OFBIZ-7816)
Issue occurred due to missing redirect parameter.
Thanks Rohit Hukkeri for providing the updated patch and everyone else for their contribution in this ticket.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860799 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 05:24:10 +00:00
Jacopo Cappellato 758d9a2169 Applied fix from trunk for revision: 1860613
===

Fixed: fine tuned the sanitization of user input by allowing "safe" content; 
thanks to Jacques for the suggestion.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860615 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 13:23:16 +00:00
Deepak Dixit a64869dddb Applied fix from trunk for revision: 1860597
===

Fixed: Html escaping missing for renderLink parameters
(OFBIZ-11090)
Parameters vlaue should be escaped to avoid any kind of corss site scripting issue.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860599 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 10:54:31 +00:00
Jacopo Cappellato 4e0f5edc1e Applied fix from trunk for revision: 1860592
===

Fixed: removed override directives to let the system perform proper validation 
of user input.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860594 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 09:17:25 +00:00
Jacques Le Roux 0c5b2805e7 "Applied fix from trunk for revision: 1860526 "
------------------------------------------------------------------------
r1860526 | jleroux | 2019-06-02 15:10:36 +0200 (dim. 02 juin 2019) | 11 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

I was wrong doing massive changes w/o close control. 
I decided to revert the r1859576 and r1859807 commits and to backport the revert

The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log/
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860528 13f79535-47bb-0310-9956-ffa450edef68
2019-06-02 13:13:32 +00:00
Nicolas Malin f855ca77bf Fixed: Backport: Decrypt a field on embedded entity-view failed
(OFBIZ-11078)

When you tried to decrypt a field present on embedded entity-view, key use is the view name and not the final entity who contains this field.

You currently have the problem on PartyContactMechDetail where if you want to displaying the ftpPassword for a FtpAddress, the view failed and tried to use ContactMechDetail to decrypt instead of FtpAddress

To solve it, we iterate on the entity contains the field in the view while is an entity-view :

    PartyContactMechDetail.ftpPassword
         -> ContactMechDetail.ftpPassword
              -> FtpAddress.ftpPassword
                   -> key found FtpAddress

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860367 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 18:59:39 +00:00
Jacques Le Roux 05067278bf "Applied fix from trunk for revision: 1860357"
------------------------------------------------------------------------
r1860357 | jleroux | 2019-05-29 18:29:31 +0200 (mer. 29 mai 2019) | 14 lignes

Fixed: Gradle eclipse task - classpath modification (Add exclusion for 
<OFBiz>/framework/base/config and <OFBiz>/framework/base/dtd)
(OFBIZ-11071)

Eclipse task removes all classpath entries that affects following entries also -
 * <OFBiz>/framework/base/config
 * <OFBiz>/framework/base/dtd

These two entries are essential to start OFBiz successfully. 
Developer has to manually add these entries back to start OFBiz from IDE.

Following this discussion: https://s.apache.org/baoT

Thanks: Girish Vasmatkar
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860359 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 16:30:41 +00:00
Swapnil Mane bc7fe0f53f Applied fix from trunk for revision: 1860274
===

Fixed: Corrected the navigation of 'To Facility ID' on the inventory transfer screen
(OFBIZ-10992)

Steps to regenerate:

1.) Go to Facilities.
2.) Select Inventory Xfers option.
3.) Create Transfer Inventory Item from any Warehouse.
4.) Navigate to Transfer Inventory overview screen
https://localhost:8443/facility/control/TransferInventoryItem?inventoryTransferId=10001
5.) 'Facility Id To' link is not redirecting to correct facility

Thanks:  Pawan Verma and Aishwary Shrivastava for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860276 13f79535-47bb-0310-9956-ffa450edef68
2019-05-28 14:06:36 +00:00
Jacques Le Roux 276976d6ed "Applied fix from trunk for revision: 1860141"
------------------------------------------------------------------------
r1860141 | jleroux | 2019-05-27 18:28:32 +0200 (lun. 27 mai 2019) | 13 lignes

Fixed: Edit WebSite Path Alias is not working
(OFBIZ-11022)

Steps to regenerate:
    Login into content
    Select any website(Preferably CmsSite as it has pathAlias)
    Click on pathAlias tab
    Select any pathAlias to edit

See edit option is not available on screen, Create option is available which 
is creating new pathAlias instead of edit.

Thanks: Pawan Verma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860143 13f79535-47bb-0310-9956-ffa450edef68
2019-05-27 16:29:26 +00:00
Suraj Khurana 5fc71a4430 Applied fix from trunk for revision: 1860082
===

Fixed: CSS Styling for Party Content progress bar is wrong in multiple theme.
(OFBIZ-10797)
Thanks Ayushi Rathod for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1860084 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 16:12:44 +00:00
Jacques Le Roux d0b58cdc54 "Applied fix from trunk for revision: 1859981"
------------------------------------------------------------------------
r1859981 | jleroux | 2019-05-25 16:24:30 +0200 (sam. 25 mai 2019) | 14 lignes

Fixed: Runtime error exceptions at Leads page
(OFBIZ-11059)

Step to recreate issue -

    Login to https://demo-trunk.ofbiz.apache.org/ordermgr/control/main
    Application > SFA
    SFA > Lead Manager 
    Leads > Click on All Leads button

Application throw Runtime error exception in My Leads section.

Thanks: Sanjay Yadav for report, Kumar Rahul for the fix and Pierre Smits
for help on Jira issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859986 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:32:24 +00:00
Jacques Le Roux 01125fef2b "Applied fix from trunk for revision: 1859972"
------------------------------------------------------------------------
r1859972 | jleroux | 2019-05-25 16:08:48 +0200 (sam. 25 mai 2019) | 12 lignes

Fixed: Duplicate entries in paramWithSuffix
(OFBIZ-11056)

when using string-list-suffix attribute for service definition, invoke method 
(from associated event handler) will try to parse parameters from both request 
variable and rawParameterMap which was also built from request. 
So we end up with duplicates in resulting list.

This behaviour seems to be introduced with OFBIZ-5048.


Thanks: Samuel Trégouët for report and fix 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859974 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:10:49 +00:00
Jacques Le Roux 0fe7b2eefc "Applied fix from trunk for revision: 1859968"
------------------------------------------------------------------------
r1859968 | jleroux | 2019-05-25 15:25:34 +0200 (sam. 25 mai 2019) | 16 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

The testCreateNewRequest was failing due to escaped single quotes in related
data in OrderTypeData.xml:
subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"

This was a peculiar case that could be generalised to all escapable characters.
The general solution is to compare the original value with the filtered value 
unescaped in UtilCodec::checkStringForHtmlSafe.
BTW, weirdly enough StringEscapeUtils::escapeHtml4 does not escape single quote.

Another weirdness is the test was passing with plugins data loaded. This is due
to duplicated demo data in scrumTypeData.xml (which is actually not only type
data, as ever the scrum component is a mess, that's not new and always wonder
if we should not get rid of it!)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859970 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 13:34:47 +00:00
Swapnil Mane ece26726e4 Applied fix from trunk for revision: 1859931
===

Fixed: Error on deleting the survey associated with the task
(OFBIZ-7594)

The following error is generated on deleting the survey associated with the task.

Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems getting the service model (Cannot locate service by name (deleteWorkEffortSurveyAppl))

On exploration I found, In the refactoring work done under OFBIZ-8408, the deleteWorkEffortSurveyAppl service was removed.

Added the deleteWorkEffortSurveyAppl service, previously it was in written in the simple engine, converted it to entity-auto.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859935 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:31:15 +00:00
Suraj Khurana 8ae9012031 Applied fix from trunk for revision: 1859915
===

Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859917 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:28:36 +00:00
Nicolas Malin 25e36243d4 Reverted: uneeded bad formatting push
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859890 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 15:16:39 +00:00
Nicolas Malin eb737fb5d4 Fixed: Backport: Manage EECAs on delegator.removeBy
(OFBIZ-11040)
When you delete some entities through removeByAnd or removeByCondition, eeca aren't enable and the remove is quite as regard implemented rules.
With
        <eca entity=GoodIndentification operation=create-store-remove event=return>
             <action service=indexProductKeywords mode=sync/>
        </eca>
And
        delegator.removeByAnd('GoodIdentification', [productId: 'WG-1111'])

The service indexProductKeywords wasn't call for the productId WG-1111

To solve this situation, the idea would be delegator.removeValue for each element to delete when an eeca is present otherwise call the standard helper.removeByCondition.

Thanks to Leila Mekika for raise and fix this issue, Jacques Leroux and Mathieu Lirzin for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859889 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 15:12:45 +00:00
Jacques Le Roux bdb25b67ff "Applied fix from trunk for revision: 1859882"
------------------------------------------------------------------------
r1859882 | jleroux | 2019-05-24 16:16:39 +0200 (ven. 24 mai 2019) | 5 lignes

Improved: no functional change

Javadoc was unhappy: 
CustomPermissivePolicy.java:13: error: element not closed: blockquote

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859884 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 14:17:07 +00:00
Jacques Le Roux bd600b6f14 "Applied fix from trunk for revision: 1859877"
------------------------------------------------------------------------
r1859877 | jleroux | 2019-05-24 15:47:08 +0200 (ven. 24 mai 2019) | 10 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

This was reopened after discussion at 
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with OFBIZ-6669 and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859879 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:52:11 +00:00
Jacques Le Roux a5b8f71147 Fixed: no functional changes
Revert changes from r1859873 which inadvertently slipped in


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859875 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:40:19 +00:00
Jacques Le Roux add8fd7eaf "Applied fix from trunk for revision: 1859871"
------------------------------------------------------------------------
r1859871 | jleroux | 2019-05-24 15:24:31 +0200 (ven. 24 mai 2019) | 14 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

After a discussion with Dennis, I checked and the pattern ONSITE_URL would be 
useless without 

.allowAttributes("background").matching(ONSITE_URL)
.onElements("table")
.allowAttributes("background").matching(ONSITE_URL)
.onElements("td", "th", "tr")

So here they are

Thanks: Dennis Balkir for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859873 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:27:38 +00:00
Jacques Le Roux 1a9943bc4c "Applied fix from trunk for revision: 1859807"
Some handled by hand
------------------------------------------------------------------------
r1859807 | jleroux | 2019-05-23 18:41:59 +0200 (jeu. 23 mai 2019) | 5 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be called 
directly.
(OFBIZ-10895)

This should be the last commit, but I can't be sure. So I'll continue to 
monitor the demos logs...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859810 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:59:31 +00:00
Jacques Le Roux 6750a3de4a "Applied fix from trunk for revision: 1859800"
------------------------------------------------------------------------
r1859800 | jleroux | 2019-05-23 18:36:37 +0200 (jeu. 23 mai 2019) | 8 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Reverts all the rest from r1816180, and, after reading carefully the code used 
for "request-redirect" in RequestHandler (and downward), fixes the documentation 
in site-conf.xsd

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859802 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:37:38 +00:00
Jacques Le Roux 4b95de99b5 "Applied fix from trunk for revision: 1859796"
------------------------------------------------------------------------
r1859796 | jleroux | 2019-05-23 18:33:26 +0200 (jeu. 23 mai 2019) | 5 lignes

Fixed: Mass actions in FindOrders.ftl don't keep parameters
(OFBIZ-11052)

This adds a missing ampersand  after requestParameters.hideFields?default("N") 
when needed 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859798 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:34:32 +00:00
Jacques Le Roux 110fa15cdb "Applied fix from trunk for revision: 1859735 "
------------------------------------------------------------------------
r1859735 | jleroux | 2019-05-22 18:41:04 +0200 (mer. 22 mai 2019) | 12 lignes

Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859738 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:42:37 +00:00
Jacques Le Roux f8fc5272fc "Applied fix from trunk for revision: 1859708"
------------------------------------------------------------------------
r1859708 | jleroux | 2019-05-22 11:33:46 +0200 (mer. 22 mai 2019) | 8 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Getting to navigateContent in content component is better when using view.
You then get into the node you were working on (adding, updating or deleting)

Still WIP for the rest...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859710 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:34:35 +00:00
Jacques Le Roux 8476e68504 "Applied fix from trunk for revision: 1859704"
------------------------------------------------------------------------
r1859704 | jleroux | 2019-05-22 10:59:45 +0200 (mer. 22 mai 2019) | 8 lignes

Fixed: When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list
(OFBIZ-11048)

When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list

This was due to a wrong usage of auto-fields-service, from pre Apache era
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859706 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:00:22 +00:00
Jacques Le Roux 7aef75589f "Applied fix from trunk for revision: 1859698"
------------------------------------------------------------------------
r1859698 | jleroux | 2019-05-22 10:12:51 +0200 (mer. 22 mai 2019) | 10 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Reverts r1859694 request-redirect-noparam is required else the deleted 
ProductManufacturingRule is shown in the edit/update screen with the deleted
ruleId.

I was misleaded because this screen is not standard at all. I guess it's not
much used since it's like that for ages
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859700 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 08:13:39 +00:00
Jacques Le Roux bb548e73a9 "Applied fix from trunk for revision: 1859694"
------------------------------------------------------------------------
r1859694 | jleroux | 2019-05-22 09:44:55 +0200 (mer. 22 mai 2019) | 5 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

No problems using view here, KISS!
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859697 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:48:24 +00:00
Jacques Le Roux 4c16c754ee "Applied fix from trunk for revision: 1859691"
------------------------------------------------------------------------
r1859691 | jleroux | 2019-05-22 09:39:08 +0200 (mer. 22 mai 2019) | 15 lignes

Fixed: It's impossible to create more than 1 ProductManufacturingRule
(OFBIZ-11047)

In a previous commit for OFBIZ-9997 I wrote:
>DeleteProductManufacturingRule seems weird to me because I don't understand how
>to create several Manufacturing Rules. I'll check Sharan's book :)

I checked Sharan's book and there is nothing about it

It also shows ManufacturingMachineGroupIdAlreadyExist ("Fixed Asset Group ID 
doesn't exist") when you try to create one using manually the 
AddProductManufacturingRule service which makes no sense.

This fixes it by adding the necessary in BomForms.xml and fixing 
addProductManufacturingRule which was wrong from start (pre Apache era)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859693 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:39:54 +00:00
Jacques Le Roux 1afd4538d4 "Applied fix from trunk for revision: 1859576"
------------------------------------------------------------------------
r1859576 | jleroux | 2019-05-20 20:02:09 +0200 (lun. 20 mai 2019) | 15 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

I finally decided to do a whole change, here it is
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859578 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 18:03:05 +00:00
Jacques Le Roux c293746af5 "Applied fix from trunk for revision: 1859571"
------------------------------------------------------------------------
r1859571 | jleroux | 2019-05-20 19:14:43 +0200 (lun. 20 mai 2019) | 22 lignes

Fixed: field emplFromDate is forgot in PayHistory entity
(OFBIZ-11028)

Arpit Mor: steps to regenerate:
    Login to the URL: https://demo-trunk.ofbiz.apache.org/humanres/control/main
    Click on Employments
    Click on New Employments
    Click on Create
Actual: Error message is displayed.

Olivier Heintz: employment is associated with PayHistory, and there is a problem 
in PayHistory entity definition in OFBiz,
In PayHistory, the field fromDate from Employment is confused with fromDate 
about the current record.
A Employment can have multiple PayHistories and should have multiple
because PayHistory should show history of Pay  for a employment  !
It's necessary to have a field emplFromDate (to have the complete employment 
primaryKey).
When modifying a PayRecord the current should be expire and a new one should 
be created.

Thanks: Arpit Mor for report at OFBIZ-10969 and Olivier Heintz for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859573 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 17:16:27 +00:00
Jacques Le Roux 89c5e33fbc "Applied fix from trunk for revision: 1859543"
------------------------------------------------------------------------
r1859543 | jleroux | 2019-05-20 12:10:34 +0200 (lun. 20 mai 2019) | 24 lignes

Fixed: Redirection of pathAlias to aliasTo does not work properly
(OFBIZ-11018)

Link of discussion: https://markmail.org/message/s37whdteejqdzkha

In CMS, we can redirect the user to different path alias using 'aliasTo' field 
of WebSitePathAlias entity.

As per my observation, the content for  "newDemoHome" is rendered properly 
(as expected) but the URL of the page (in browser) doesn't change.
We should also update the URL also, i.e. change browser URL from

Example - 
<WebSitePathAlias aliasTo="demoPage2" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoHome2" webSiteId="CmsSite"/>
<WebSitePathAlias contentId="CMSS_DEMO_PAGE1" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoPage2" webSiteId="CmsSite"/>

Based on the above data, if the user hit the 
URL https://localhost:8443/cmssite/cms/demoHome2 
the CMS should internally render the content for 'DemoHome2' at
https://localhost:8443/cmssite/cms/demoPage2

Thanks: Pawan Verma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859545 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 10:12:43 +00:00
Nicolas Malin 7a2a61f7e8 Fixed: Backport: Incorrect findByCount on DynamicView with groupBy and selected fields
(OFBIZ-11041)

When you create a DynamicView with 'group by' agreggate function and you perform a delegator.findCountByCondition() with selected fields, the result is different from the count of each element returned by delegator.findList().

The problem come from when the 'group by' closure is populated with all grouped by fields from on the DV and not only those from selected fields.

Thanks to Leila Mekika to raise and solve this issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859440 13f79535-47bb-0310-9956-ffa450edef68
2019-05-17 15:50:12 +00:00
Aditya Sharma f4d08a04b5 Applied fix from trunk for revision: 1859255
===

Fixed: Issue in function getVariantSelectionFeatures of ProductWorker.java
(OFBIZ-11029)
Check should be isVirtual instead of productId. Also handled a NullPointerException for variantProduct.
Thanks Denglong Zhou for reporting the issue, Pawan Verma for the patch and Suraj Khurana & Jacques Le Roux for the review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859257 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 05:12:52 +00:00
Mathieu Lirzin d837b65d69 Fixed: Fix javadoc build for OpenJDK 11
(OFBIZ-10757)

This removes HTML5 deprecated stuff such as ‘<tt>’ elements, and
‘cellpadding’ table attributes which were breaking the ‘:javadoc’
Gradle task when using OpenJDK 11.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859125 13f79535-47bb-0310-9956-ffa450edef68
2019-05-11 20:44:17 +00:00
Jacques Le Roux 7c132521a0 "Applied fix from trunk for revision: 1859087"
------------------------------------------------------------------------
r1859087 | jleroux | 2019-05-10 19:01:12 +0200 (ven. 10 mai 2019) | 16 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

At least importContactListParties in marketing component needs 
request-redirect instead of request-redirect-noparam
This reverts it. 

Others still needs to be checked. 
It seems getting to navigateContent in content component is OK, but not totally
sure yet

DeleteProductManufacturingRule seems weird to me because I don't understand how
to create several Manufacturing Rules. I'll check Sharan's book :)

WIP...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859089 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 17:02:12 +00:00
Jacques Le Roux 7bdde700d0 "Applied fix from trunk for revision: 1859055 "
------------------------------------------------------------------------
r1859055 | jleroux | 2019-05-10 07:15:28 +0200 (ven. 10 mai 2019) | 4 lignes

Fixed: no functional changes

Fixes typos

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859057 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 05:15:58 +00:00
Jacques Le Roux c8cd459002 "Applied fix from trunk for revision: 1859033"
------------------------------------------------------------------------
r1859033 | jleroux | 2019-05-09 21:46:07 +0200 (jeu. 09 mai 2019) | 21 lignes

Fixed: Update invoice item looses invoice context
(OFBIZ-11009)

When clicking  the "update" button on an invoice item the context to the 
invoice (invoiceId) is lost. The result is an empty form to add a new invoice 
item without invoice context.

Go to /accounting/control/listInvoiceItems?invoiceId=demo10001
Click on "update" below the existing items. 
You will then be redirect to /accounting/control/listInvoiceItems 
(without invoiceId). You will not see the invoice items as the context to the 
invoice is gone.

jleroux: the same existed for budget items. As Ingo mentioned:
<<It was broken by OFBIZ-9997:
Replace request-redirect w/ no redirect-param attribute 
by request-redirect-noparam>>

Now we need to check all changes done for OFBIZ-9997

Thanks: Ingo Wolfmayr for report and fix proposition
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859035 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 19:47:02 +00:00
Jacques Le Roux d97e01d80d "Applied fix from trunk for revision: 1858980 "
------------------------------------------------------------------------
r1858980 | jleroux | 2019-05-09 11:17:08 +0200 (jeu. 09 mai 2019) | 4 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

By default we now use a permissive sanitizer policy
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858982 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:21:23 +00:00
Jacques Le Roux caef7b7627 "Applied fix from trunk for revision: 1858965"
------------------------------------------------------------------------
r1858965 | jleroux | 2019-05-09 08:05:05 +0200 (jeu. 09 mai 2019) | 18 lignes

Fixed: Product content management screen doesn't validate trusted users' input
(OFBIZ-10054)

Steps to recreate:
1) go to (authenticate with admin/ofbiz):
https://localhost:8443/catalog/control/EditProductContent?productId=WG-1111

2) set the content of the field labeled "Large Image" to:
non_existent.foo" onerror="alert('Hi!');

3) visit the url:
https://localhost:8443/ecommerce/control/product?product_id=WG-1111

A popup message will appear with the "Hi!".

jleroux: This is fixed by preventing any js event to be passed 

Thanks: Loris Nardo for report, Jacopo and Gregory for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858967 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 06:05:58 +00:00
Mathieu Lirzin 6a3ad303ef Improved: Rewrite ‘CustomPermissivePolicy#matchesEither’ static method
(OFBIZ-10187)

It now uses a lambda expression instead of an anonymous class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858935 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 17:12:40 +00:00
Mathieu Lirzin d8ad8e559d Improved: Add missing ‘synchronized’ modifier
(OFBIZ-11004)

Overriding a synchronized method with a non-synchronized one can
introduce potential runtime concurrency bugs. Since
‘ExtendedProperties#loadFromXML’ is overridding
‘Properties#loadFromXML’ which is synchronized, it is safer to mark it
as synchonized.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858929 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 15:20:24 +00:00
Jacques Le Roux 8d79e5cf72 "Applied fix from trunk for revision: 1857088"
------------------------------------------------------------------------
r1857088 | mthl | 2019-04-08 00:11:53 +0200 (lun. 08 avr. 2019) | 6 lignes

Fixed: Remove redundant interface declaration (OFBIZ-10910)

‘java.io.ObjectInputStream’ already implements the ‘AutoCloseable’
interface, so there is no need to declare it in
‘SafeObjectInputStream’ which extends this class.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858867 13f79535-47bb-0310-9956-ffa450edef68
2019-05-07 15:00:38 +00:00
Jacopo Cappellato f4cd236867 Applied fix from trunk for revision: 1858539
===

Improved: Replaced permission-service with required-permissions in order to 
perform permission checks in a way that is more consistent with the screen 
permissions set in the ecommerce blog/forum screens.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858541 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 13:43:02 +00:00
Jacques Le Roux 77ad05c627 "Applied fix from trunk for revision: 1858523"
------------------------------------------------------------------------
r1858523 | lektran | 2019-05-02 10:59:11 +0200 (jeu. 02 mai 2019) | 1 ligne

Fixed: Ensure the story field in ordermgr's EditCustRequest form is html encoded (OFBIZ-11006)

Fixes CVE-2019-10074
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858532 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 11:53:14 +00:00
Jacques Le Roux 63846f3b78 "Applied fix from trunk for revision: 1858444 "
------------------------------------------------------------------------
r1858444 | jleroux | 2019-04-30 18:23:56 +0200 (mar. 30 avr. 2019) | 34 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions:
Inside another request (eg LookupProduct)
Of after a request (eg login)

It shows only in log and have no effect on UI. Notably the new feature normally 
showing an error message in trunk (OFBIZ-10753) does not shows

It happens in all supported releases. IIRW it always happened, only URLs like 
https://demo-trunk.ofbiz.apache.org/images/defaultImage.jpg work. 
But here it's different because we don't need to call 
https://demo-trunk.ofbiz.apache.org/images by hand to get the issue in log.

So it's not very bad since it's has no side effects, just weird and annoying. 
Because it might hide something undetected yet...

This issue does not appear in R15, a good place to test is for instance 
ordermgr/control/request. 
There cal.gif is called by /images/cal.gif and it works (the images appears) 
but in more recent versions the call is also done to 
/ordermgr/control/images/cal.gif where it fails. 
This 1st appears in ControlFilter in the stack trace.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a 1st commit for the errors I already reported and I'm sure about
Common-theme does not exist here so some have been handled by hand

Thanks: Deepak 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858447 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 16:30:44 +00:00
Jacopo Cappellato 2ddc95ea52 Applied fix from trunk for revision: 1858432
===

[Fixed]: Added permission checks to three blog/forum services; improved the 
configuration for the "add article forum" form (the source tab is not needed in 
the ecommerce application).

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858437 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 14:48:59 +00:00
Michael Brohl 0ee8973ea4 Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

This makes the sanitizing enabled/disabled by configuration and enhances
the functionality to support custom sanitizer policies. A reasonable 
example policy class is also included.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858354 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:42:55 +00:00
Michael Brohl 67620983e5 Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The default host is now retrieved using the API instead of simply
retrieving the 1st host through Tomcat.getHost().

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858349 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:01:52 +00:00
Swapnil Mane 900afc674d Applied fix from trunk for revision: 1858319
===

Fixed: createProductFeature service ignoring passed productFeatureId parameter
(OFBIZ-10958)

In the change, used override tag instead of attribute.
And set the optional true in INOUT mode for productFeatureId.
But since we are using entity-auto productFeatureId will be always available (either user provide it and if not passed by the user,  system will autogenerate it), thus it will be always OUT.

Additional Notes:

Here we can't make a changes mentioned below, because, for *optional* field's value, invokeCreate method (internally calling isIn and IsOut methods of ModelParam) of EntityAutoEngine.java consider the attribute (override) defined at last for parameters with the same name.

i.e. for below example,  optional value for productFeatureId for mode IN  will be false (but it is defined true)

{code}
<override name=productFeatureId type=String mode=IN optional=true/>
<override name=productFeatureId type=String mode=OUT optional=false/>
{code}

Due to this, isSinglePkIn (in invokeCreate method) field got false value, and the system will auto-generate the productFeatureId and ignore the user's input.

Similarly, we can't write in this way
{code}
<override name=productFeatureId type=String mode=OUT optional=false/>
<override name=productFeatureId type=String mode=IN optional=true/>
{code}

Because in this case, isSinglePkOut (in invokeCreate method) field got false value, and again the system will auto-generate the productFeatureId and ignore the user's input. 

Thanks:  Ulrich Heidfeld for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858321 13f79535-47bb-0310-9956-ffa450edef68
2019-04-28 11:58:14 +00:00
Jacques Le Roux b3d408555b "Applied fix from trunk for revision: 1858275 "
------------------------------------------------------------------------
r1858275 | jleroux | 2019-04-27 15:33:44 +0200 (sam. 27 avr. 2019) | 18 lignes

Fixed: Display of entities in text input field for Product Name
(OFBIZ-10356)

In the url:  catalog/control/EditProductContent?productId=GZ-1006-1
the "Product Name" under "Override Simple Fields" is unnecessarily
expressed in entity format . The string displayed in product name
field is:

"Open Gizmo &#x28;LGPL&#x29;" 

it could have been a
simple "Open Gizmo (LGPL)"

jleroux: this was due to OFBIZ-248 when StringUtil.wrapString() was not yet 
available (IIRW)

Thanks: Rajesh Kumar Mallah for report, Swapnil M Mane for discussion, and
Ankit Joshi for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858277 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 13:34:34 +00:00
Suraj Khurana 098375e2d6 Applied fix from trunk for revision: 1858256
===

Fixed: Unable to add survey product to cart in order entry form.
(OFBIZ-10735)
It was due to incorrect usage of param map, used UtilHttp.getCombinedMap instead with some code improvements.
Thanks Amit Gadaley for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858257 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 09:00:03 +00:00
Suraj Khurana 38af5a476c Applied fix from trunk for revision: 1858250
===

Fixed: Customer Party getting set as 'organizationPartyId' in one the Account transaction for Customer return invoice.
(OFBIZ-10856)
Thanks Chinmay Patidar for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858252 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 07:18:38 +00:00
Swapnil Mane 12943e0abb Applied fix from trunk for revision: 1858035
===

Fixed: Parameters are not available to the next response type when form of enctype=multipart/form-data type is submitted
(OFBIZ-10833)

Reason: The UtilHttp.getMultiPartParameterMap method is used to get the parameters in case of multipart/form-data type.
The getMultiPartParameterMap parse the request to get the parameters.

{code}
uploadedItems = UtilGenerics.<FileItem>checkList(upload.parseRequest(request));
{code}

As per the Apache commons-fileupload guideline, a request can only be parsed once [1]. So, for the next response, again the same getMultiPartParameterMap method is executed (with the same request object), and no parameters are found, since, the request is already parsed.

Also, have a look at the StackOverflow question [2], it also contains related information.

Fix for the issue:
Set the consumed parameters (except uploaded file(s)) in the request attribute so that it will be available to the next response.
The uploaded file(s) are not set in request attribute again to avoid unnecessary memory consumption, also it makes no sense to traverse the uploaded file in the request.

[1] http://commons.apache.org/proper/commons-fileupload/faq.html#empty-parse

[2] https://stackoverflow.com/questions/13881272/servletfileuploadparserequestrequest-returns-an-empty-list

Thanks: Ingo Wolfmayr for reporting issue and Jacques Le Roux for review.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1858037 13f79535-47bb-0310-9956-ffa450edef68
2019-04-24 10:06:21 +00:00
Swapnil Mane 8d9a8eb021 Applied fix from trunk for revision: 1857813
===

Fixed: If the picklist cancelation process failed, the picklist item shouldn't be marked as cancel
(OFBIZ-4690)

When a transaction is running in which Picklist entity is updated (i.e. canceled), now if the transaction is rollback the picklist status will not be changed but as per previous code, the picklist item's status will get updated i.e. marked as cancel because we called the cancelPicklistAndItems service in async mode

So the situation here was the Picklist is not canceled, but the Picklist items were marked as cancel.

Thus to fix it, call the cancelPicklistAndItems service in sync mode.

Thanks:  Jacques Le Roux for your thoughts.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857815 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 14:09:02 +00:00
Paul Foxworthy 9b9b12266f Fixed: Updating an OrderItem loses supplierProductId
(OFBIZ-10932)

When you edit on order item, the details are reloaded into a shopping cart
and after editing the order is updated from the cart. The supplierProductId
for the order item is now read into the cart so won't be lost.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857783 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 05:49:46 +00:00
Jacques Le Roux 84c968b578 "Applied fix from trunk for revision: 1857692"
------------------------------------------------------------------------
r1857692 | jleroux | 2019-04-17 18:19:00 +0200 (mer. 17 avr. 2019) | 5 lignes

Fixed: Stores can't be modified at ofbizsetup/control/updateProductStore
(OFBIZ-10930)

Same than parent issue (OFBIZ-10567) but in ofbizsetup component (which should 
have been names setup BTW, I created a setup component for that in Jira)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857694 13f79535-47bb-0310-9956-ffa450edef68
2019-04-17 16:19:29 +00:00
Nicolas Malin 2e70b652bb Fixed: Backport, Duplicate a ShoppingCartItem didn't propage OrderItemAttributes
(OFBIZ-10929)

When you clone a ShoppingCartItem by constructor :
    ShoppingCartItem sci = new ShoppingCartItem(ShoppingCartItem item)

The ShoppingCartItem.orderItemAttributes wasn't propage from origin.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857659 13f79535-47bb-0310-9956-ffa450edef68
2019-04-16 19:30:43 +00:00
Deepak Dixit 353afa22d8 Applied fix from trunk for revision: 1857617
===

Fixed: Wrong permission check in ProductScreens#FindProduct
(OFBIZ-10925)
Thanks Dennis Balkir for your contribution

The permission service acctgAgreementPermissionCheck is used in the screen FindProduct in ProductScreens.xml. 
This doesn't really make sense, since there is no connection to the accounting application here.
There was the service productGenericPermission which could have been used instead, 
but this one calls the simple-method checkProductRelatedPermission, 
which then check for the CATALOG permission. Since this is already done in the CommonProductDecorator before, it would not make any sense to do this a second time.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857620 13f79535-47bb-0310-9956-ffa450edef68
2019-04-16 06:04:19 +00:00
Nicolas Malin 0fd5c7e92b Fixed: Backport Update an order linked to an other order lost relation applications/order/
(OFBIZ-10926)
When you edit an order linked to an other order like drop shipment process, shopping cart lost the connexion.
The problem came from ShoppingCart.makeAllOrderItemAssociations() function that prepared all generic value OrderItemAssoc without toOrderId.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857607 13f79535-47bb-0310-9956-ffa450edef68
2019-04-15 22:14:57 +00:00
Jacques Le Roux 0e224ed88f Fixed: Update Tomcat to 9.0.18 due to CVE-2019-0232
(OFBIZ-10920)

CVE-2019-0232 Apache Tomcat Remote Code Execution on Windows

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.17
Apache Tomcat 8.5.0 to 8.5.39
Apache Tomcat 7.0.0 to 7.0.93

Description:
When running on Windows with enableCmdLineArguments enabled, the CGI
Servlet is vulnerable to Remote Code Execution due to a bug in the way
the JRE passes command line arguments to Windows. The CGI Servlet is
disabled by default. The CGI option enableCmdLineArguments is disabled
by default in Tomcat 9.0.x (and will be disabled by default in all
versions in response to this vulnerability). For a detailed explanation
of the JRE behaviour, see Markus Wulftange's blog [1] and this archived
MSDN blog [2].

Mitigation:
Users of affected versions should apply one of the following mitigations:
- Ensure the CGI Servlet initialisation parameter enableCmdLineArguments
    is set to false
- Upgrade to Apache Tomcat 9.0.18 or later when released
- Upgrade to Apache Tomcat 8.5.40 or later when released
- Upgrade to Apache Tomcat 7.0.93 or later when released
This announcement is being made before the releases are available as the
change to fix this issue is obviously security related.

Credit:
This issue was identified by an external security researcher and
reported to the Apache Tomcat security team via the bug bounty program
sponsored by the EU FOSSA-2 project.


jleroux: actually Tomcat 9.0.19 was released, here it is

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857588 13f79535-47bb-0310-9956-ffa450edef68
2019-04-15 14:42:44 +00:00
Jacques Le Roux 69a46f08f4 "Applied fix from trunk for revision: 1857099"
------------------------------------------------------------------------
r1857099 | jleroux | 2019-04-08 11:17:55 +0200 (lun. 08 avr. 2019) | 12 lignes

Improved: Using try-with-resources with File IO Objects.
(OFBIZ-9855)

Uses try with resources for File IO objects like ObjectInputStream and other 
objects. File classes have the AutoCloseable interface.

jleroux: this is only a part of the 2nd patch. The 1st patch will be committed
soon too...

All tests pass

Thanks: Pradhan Yash Sharma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857487 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 17:50:42 +00:00
Jacques Le Roux bf73437f27 "Applied fix from trunk for revision: 1849165"
------------------------------------------------------------------------
r1849165 | jleroux | 2018-12-18 12:20:28 +0100 (mar. 18 déc. 2018) | 16 lignes

Fixed: Date-find error when used in two forms of a same screen
(OFBIZ-10722)

When we have more than one form, in a screen, that use a date-find field, 
the second date-find picker is not working.

To reproduce, you can add a new form with a date-find and call it below 
FindInvoices in FindInvoices screen

Then load page [https://localhost:8443/accounting/control/findInvoices] . 
You should see  that there is no picker on the second date-find

The patch adds an id that allow renderDateFindField macro script to work for 
both fields

Thanks: Leila Mekika
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857484 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 17:35:05 +00:00
Rishi Solanki c8d51cf2d6 [Fixed] Incorrect decorator being used over view all promotions and view promotion details screen causing back navigation. Change the decorator name on the showAllPromotions and showPromotionDetails screens. Now user can go back after navigating to both screens.
Merge from trunk revision 1856627.
(OFBIZ-10859)
Thanks to Ratnesh Upadhyay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857479 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 13:22:58 +00:00
Nicolas Malin fa353ccded Fixed: Backport, Escape potential NPE when call DataEvents.serverImage by mocked request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857458 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 09:29:43 +00:00
Jacques Le Roux 134d7b31cf Fixed: ‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0
(OFBIZ-10693)

Reverts 1857431, better stay as is. It works in trunk but not here.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857432 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 20:42:38 +00:00
Jacques Le Roux 035103c3a2 Fixed: ‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0
(OFBIZ-10693)

We were still waiting for a definitive solution and fortunately it works with 
version 2.0.0 of asciidoctor-gradle-plugin

Thanks: Mathieu for discussion and Jinghai for the fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857431 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 20:16:46 +00:00
Jacques Le Roux a3b983e54c "Applied fix from trunk for revision: 1857392 "
------------------------------------------------------------------------
r1857392 | jleroux | 2019-04-12 11:29:03 +0200 (ven. 12 avr. 2019) | 14 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Cleans and simplifies things in UtilObject.java and also handles patterns. 
That's what we missed most when needing to update.

Fixes typos in SafeObjectInputStream class and add a commented line for a WIP in
resolveProxyClass method

Also includes work done in UtilObject.java for OFBIZ-9855 
"Using try-with-resources with File IO Objects."



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857394 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 09:29:49 +00:00
Jacques Le Roux 96c5aef9f3 Documented:
(OFBIZ-10757)

As discussed on dev ML (https://markmail.org/message/wgy6cjzhv5auy52q) 
we need to inform users about the consequences of keeping on using Oracle Java.
We also suggest to use adoptopenjdk instead of Oracle JDK

Thanks to all who discussed on dev ML 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857381 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 08:43:01 +00:00
Jacques Le Roux a920e54f7e "Applied fix from trunk for revision: 1857213"
------------------------------------------------------------------------
r1857213 | jleroux | 2019-04-09 17:31:50 +0200 (mar. 09 avr. 2019) | 4 lignes

Fixed: Quick Add button for shopping list on Orderentry screen is not working
(OFBIZ-9908)

Fixes typos introduced with previous commit
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857215 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 15:33:07 +00:00
Jacques Le Roux 3a74ffe9f1 "Applied fix from trunk for revision: 1857180"
------------------------------------------------------------------------
r1857180 | jleroux | 2019-04-09 13:58:22 +0200 (mar. 09 avr. 2019) | 19 lignes

Fixed: Quick Add button for shopping list on Orderentry screen is not working
(OFBIZ-9908)

Steps to generate
1. Navigate to https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderentry
2. Press continue on sales order screen.
3. Add any finished good product to the sales order
4. In 'Add Order Items to Shopping List' section, select 'new shopping list' 
   from the drop down and click on 'Add to shopping list' button
5. you navigate to 'addBulkToShoppingList' screen, click on 'Quick Add' button.
Issue: The quick add button is not working.

jleroux: as suggested by Ankush: "One of possible workaround is calling 
createShoppingList with new transaction to resolve this deadlock issue."

This just does that for every calls.

Thanks: Garima jain for report, Rohit Hukkeri for discussion and Ankush Upadhyay 
for fix suggestion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857182 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 12:00:01 +00:00
Jacques Le Roux 3d88ba78c5 "Applied fix from trunk for revision: 1857173 "
------------------------------------------------------------------------
r1857173 | jleroux | 2019-04-09 13:49:10 +0200 (mar. 09 avr. 2019) | 8 lignes

Fixed: Error message is displayed while click on create new quotes.
(OFBIZ-10882)

This feature has been removed with OFBIZ-10882, 

This removes the "Create New Quote" link, the redundant "Save" link (there is a 
Save button) and the OrderCreateQuoteFromShoppingList label which was only used 
there
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1857176 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 11:51:39 +00:00
Jacques Le Roux c339325d30 "Applied fix from trunk for revision: 1856667 "
------------------------------------------------------------------------
r1856667 | jleroux | 2019-03-31 11:14:16 +0200 (dim. 31 mars 2019) | 10 lignes

Fixed: EmailServices.sendMail causes a NPE, when sendFrom is missing
(OFBIZ-10706)

I tried to find the history for why the service does not take the 
defaultFromEmailAddress property from general.properties and I found that It was 
last modified in revision r418498 on 02/07/2006, I think it was always broken.

This uses defaultFromEmailAddress property in sendMail if sendFrom is missing

Thanks: Benjanmin Jugl reported, Pawan Verma fixed and others for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856669 13f79535-47bb-0310-9956-ffa450edef68
2019-03-31 09:17:06 +00:00
Suraj Khurana beabbbd75d Applied fix from trunk for revision: 1856617
===

Fixed: Error message is populating while clicking on product barcode.
(OFBIZ-10743)
Used code128 to generate product barcode.
Thanks Ashish Sharma for reporting, everyone who participated in discussion and Pawan Verma for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856620 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 12:46:14 +00:00
Swapnil Mane 911125af28 Applied fix from trunk for revision: 1856598
===

Fixed: Missing oldStatusId in error when no status valid change record found
(OFBIZ-10377)

In the case of entity auto service, when an invalid status change is performed, the error message doesn't show the current status of the item from which the user is changing the status.

Thanks:  Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856600 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 05:48:35 +00:00
Jacques Le Roux 362e3a27a4 "Applied fix from trunk for revision: 1856484"
------------------------------------------------------------------------
r1856484 | jleroux | 2019-03-28 16:36:13 +0100 (jeu. 28 mars 2019) | 13 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds 
org.apache.ofbiz.widget.model.ModelTheme
java.util.Collections 
java.util.LinkedList 
java.util.ArrayList
java.util.TimeZonz


Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856486 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 15:37:09 +00:00
Jacques Le Roux 9589dfad9f "Applied fix from trunk for revision: 1856460"
------------------------------------------------------------------------
r1856460 | jleroux | 2019-03-28 09:30:21 +0100 (jeu. 28 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

There was a recurring typo in previous commit.
For arrays of primitives it should be 
"\\[Z","\\[B","\\[S","\\[I","\\[J","\\[F","\\[D","\\[C"
and not 
"[Z","[B","[S","[I","[J","[F","[D","[C"
It shows how tired I'm :/

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856462 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 08:30:59 +00:00
Jacques Le Roux 46550af3cb "Applied fix from trunk for revision: 1856455"
------------------------------------------------------------------------
r1856455 | jleroux | 2019-03-28 08:50:32 +0100 (jeu. 28 mars 2019) | 7 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds all arrays of primitives and java.math.BigDecimal 

Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856457 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 07:52:08 +00:00
Jacques Le Roux daeab8d9b0 "Applied fix from trunk for revision: 1856405"
------------------------------------------------------------------------
r1856405 | jleroux | 2019-03-27 15:16:24 +0100 (mer. 27 mars 2019) | 12 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.math.BigDecimal and "[B" (ie [B == byte[] and I don't understand
why in this case "byte[]" does not work)

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Ingo Wolfmayr at OFBIZ-10870
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856407 13f79535-47bb-0310-9956-ffa450edef68
2019-03-27 14:25:03 +00:00
Jacques Le Roux 3244738784 Fixed: Update Tomcat to 9.0.16 due to CVE-2019-0199
(OFBIZ-10873)

The HTTP/2 implementation accepted streams with excessive numbers of
SETTINGS frames and also permitted clients to keep streams open without
reading/writing request/response data. By keeping streams open for
requests that utilised the Servlet API's blocking I/O, clients were able
to cause server-side threads to block eventually leading to thread
exhaustion and a DoS.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1856215 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 17:51:52 +00:00
Swapnil Mane abaddb9baa Applied fix from trunk for revision: 1855898
===

Improved: Moved the nodeType check after node.getTextContent() method call
(OFBIZ-10832)

Since most nodes will contain text then it will be more efficient to do a null check after retrieving nodeValue.

Thanks: Scott for your valuable inputs.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855900 13f79535-47bb-0310-9956-ffa450edef68
2019-03-20 12:19:05 +00:00
Deepak Dixit b84008fbdf Applied fix from trunk for revision: 1855501
===

Improved: Added line separator while while generating svn/git info footer.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855503 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 09:34:48 +00:00
Deepak Dixit beaa4b418c Applied fix from trunk for revision: 1855497
===

Reverted: Changes done at r#1854306, Removed the extra space from CommonBranch uiLabel values


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855499 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 09:28:03 +00:00
Jacques Le Roux e4d53d9184 "Applied fix from trunk for revision: 1855492"
------------------------------------------------------------------------
r1855492 | jleroux | 2019-03-14 09:28:27 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.util.Date

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855494 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 08:28:49 +00:00
Jacques Le Roux 5cd62a82b8 "Applied fix from trunk for revision: 1855488"
------------------------------------------------------------------------
r1855488 | jleroux | 2019-03-14 08:42:17 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.sql.Timestamp

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855490 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 07:43:18 +00:00
Swapnil Mane f958cc6cdd Applied fix from trunk for revision: 1855403
===

Fixed: simpleTypeConvert always returns Null for Document, Document Type and Notation Node 
(OFBIZ-10832)

As per the code, getTextContent() method is used get text content of the node and its descendants but the node.getTextContent() always return Null for the following Node type
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE [1]

Since we can't get the text value of Document, Document Type and Notation Node, thus simply return the same object.

[1] https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html#getTextContent()

Thanks: Deepak Dixit for reviewing the code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855410 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 12:39:06 +00:00
Jacques Le Roux 4d3bef9c25 "Applied fix from trunk for revision: 1855371"
------------------------------------------------------------------------
r1855371 | jleroux | 2019-03-13 09:19:32 +0100 (mer. 13 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Deepak at OFBIZ-10837
This adds sun.util.calendar.ZoneInfo

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Deepak Dexit
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855373 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 08:20:04 +00:00
Jacques Le Roux d55a0a9676 "Applied fix from trunk for revision: 1855287"
------------------------------------------------------------------------
r1855287 | jleroux | 2019-03-12 09:29:37 +0100 (mar. 12 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Rohit at OFBIZ-10573
This adds FlexibleStringExpander

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Rohit Koushal
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855289 13f79535-47bb-0310-9956-ffa450edef68
2019-03-12 08:30:04 +00:00
Suraj Khurana 460b7d1aa9 Applied fix from trunk for revision: 1855078
===

Fixed: Service failed to mark expired authorized payments of Authorize.net as void.
(OFBIZ-10727)
Thanks Amit Gadaley for reporting the issue and providing the patch, thanks Jacopo for discussion and feedback.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1855079 13f79535-47bb-0310-9956-ffa450edef68
2019-03-09 05:27:51 +00:00
Jacques Le Roux ea8ababf42 "Applied fix from trunk for revision: 1854457"
------------------------------------------------------------------------
r1854457 | jleroux | 2019-02-27 14:01:59 +0100 (mer. 27 févr. 2019) | 9 lignes

Fixed: No userLogin given in calculateProductPrice service call context
(OFBIZ-10842)

The call context for calculateProductPrice doesn't contain the userLogin
This is needed in the customPriceCalcService
So currently there's no chance to get the user information in a custom price 
calc service.

Thanks: Danny Trunk for the proposition (I changed the code myself)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1854459 13f79535-47bb-0310-9956-ffa450edef68
2019-02-27 13:08:25 +00:00
Jacques Le Roux 4f1fc43856 "Applied fix from trunk for revision: 1854306"
------------------------------------------------------------------------
r1854306 | jleroux | 2019-02-25 11:33:53 +0100 (lun. 25 févr. 2019) | 6 lignes

Improved: no functional change

A missing space before CommonBranch label made the word trunkbranch instead of
trunk branch.

I'll backport this
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1854308 13f79535-47bb-0310-9956-ffa450edef68
2019-02-25 10:40:48 +00:00
Jacques Le Roux 19eb89fb1b "Applied fix from trunk for revision: 1853750 "
------------------------------------------------------------------------
r1853750 | jleroux | 2019-02-17 13:46:56 +0100 (dim. 17 févr. 2019) | 15 lignes

Fixed: Add To Order button not working on shopping list screen
(OFBIZ-10836)
Steps to generate:

1.Navigate to https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderentry
2.Add any finished good to the order.
3.Select New Shopping List from Add Order Items To Shopping List section.
4.Click on Add To Shopping List.
5.Now Click on Add To Order button ahead of any product in that shopping list.
6.Error message displays on the screen

Thanks: Rohit Hukkeri

jleroux: note that there is another issue popping up when testing this issue.
It's related with  OFBIZ-10418 and maybe OFBIZ-5157
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1853752 13f79535-47bb-0310-9956-ffa450edef68
2019-02-17 12:48:05 +00:00
Jacques Le Roux 5a558c85d4 "Applied fix from trunk for revision: 1853745 "
------------------------------------------------------------------------
r1853745 | jleroux | 2019-02-17 13:38:06 +0100 (dim. 17 févr. 2019) | 8 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list I used was not complete.
This adds "java.util.HashMap", "Boolean", "Number", "Integer" which are the ones
missing I found so far. 
Maybe other classes could still miss OOTB. So I added a warning in 
SafeObjectInputStream::resolveClass
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1853747 13f79535-47bb-0310-9956-ffa450edef68
2019-02-17 12:39:57 +00:00
Jacques Le Roux 224a68f063 "Applied fix from trunk for revision: 1853691 "
------------------------------------------------------------------------
r1853691 | jleroux | 2019-02-16 10:42:03 +0100 (sam. 16 févr. 2019) | 9 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

As reported by FindBugs and Sonar, it's troubling (a Bad practice in Sonar[1], 
a code smell in Findbugs[2]) when extending to use the same name than the 
extended Object

[1] https://sbforge.org/sonar/rules/show/findbugs:NM_SAME_SIMPLE_NAME_AS_SUPERCLASS?layout=false
[2] https://logging.apache.org/log4j/log4j-2.2/log4j-jul/findbugs.html
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1853694 13f79535-47bb-0310-9956-ffa450edef68
2019-02-16 09:46:03 +00:00
Swapnil Mane 97baf0ab58 Applied fix from trunk for revision: 1853109
===

Improved: Made the ecomThemeId field optional, since it is not the part of PK 
(OFBIZ-10567)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1853112 13f79535-47bb-0310-9956-ffa450edef68
2019-02-07 04:21:14 +00:00
Jacques Le Roux 073ea9d7a8 "Applied fix from trunk for revision: 1853070"
------------------------------------------------------------------------
r1853070 | jleroux | 2019-02-06 13:52:20 +0100 (mer. 06 févr. 2019) | 13 lignes

Fixed: URL not encoding in FTL 
(OFBIZ-10816)

I have created Product as TEST#01 in demo site and attached the Same to category 
101. In the category master searched for category 101 went to product tab, when 
I am trying to open a product master, link is generated like and asking for 
creating new product. But in product search and menu click is working fine 
problem is from ftl url are not getting encoded...Don`t know whats happening on 
FTL printing.... 

jleroux: fixes also catalog/control/EditProduct?productId=test%2301 (for test#1)

Thanks: Murugeswari for report and Pawan Verma for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1853074 13f79535-47bb-0310-9956-ffa450edef68
2019-02-06 12:53:58 +00:00
Deepak Dixit 281a3c74ce Applied fix from trunk for revision: 1852818
===

Fixed: Html escaping missing for portalPageId parameter of Help button
(OFBIZ-10828)
 Thanks, Niels Heinen of the Google security team for reporting the issue. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852820 13f79535-47bb-0310-9956-ffa450edef68
2019-02-03 09:38:03 +00:00
Arun Patidar b565513d87 Applied fix from trunk for revision: 1852587
===

Fixed: Services of EntitySync Push and Pull functionalities
(OFBIZ-10818)

Set transaction timeout of 2hrs for the actual data transmission services.
Removed unwanted service updateEntitySyncRunning
Called the tracking and status update services in new transaction so that record can be maintain after current transaction rollback


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852684 13f79535-47bb-0310-9956-ffa450edef68
2019-02-01 09:09:43 +00:00
Nicolas Malin 1036f65934 Fixed: Disable widget verbose property on context doesn't works for rendering ftl template
Backport from trunk

When OFBiz render a platform specific with a ftl template file, the widget verbosity throw function ModelWidget.widgetBoundary() was called with parameters as context. However this function control if a parameters is already present, so if you set a context.widgetVerbose = false, it was ignored and widget verbosity was present for ftl rendering. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852575 13f79535-47bb-0310-9956-ffa450edef68
2019-01-31 07:51:20 +00:00
Deepak Dixit 0fb3d533a6 Manually applied fix from trunk for revision: 1852503
===
Fixed: Upgrade Apache Tika to 1.20 (CVE-2018-8017/CVE-2018-17197)
In Apache Tika 1.2 to 1.18, a carefully crafted file can trigger an infinite loop in the IptcAnpaParser. 
A carefully crafted or corrupt sqlite file can cause an infinite loop in Apache Tika's SQLite3Parser in versions 1.8-1.19.1 of Apache Tika. 
===


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852517 13f79535-47bb-0310-9956-ffa450edef68
2019-01-30 11:32:51 +00:00
Deepak Dixit 631abf1f3d Applied fix from trunk for revision: 1813640
============
Fixed: Corrected wrong import introduced in 1813640.

Thanks Scott Gray for reporting.

============


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852508 13f79535-47bb-0310-9956-ffa450edef68
2019-01-30 09:13:20 +00:00
Deepak Dixit b552ddbc29 Applied fix from trunk for revision: 1813640
============
Fixed: Corrected wrong import introduced in 1813640.

Thanks Scott Gray for reporting.

============


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852507 13f79535-47bb-0310-9956-ffa450edef68
2019-01-30 09:12:04 +00:00
Jacques Le Roux b27ded6971 "Applied fix from trunk for revision: 1851998"
------------------------------------------------------------------------
r1851998 | jleroux | 2019-01-24 09:17:38 +0100 (jeu. 24 janv. 2019) | 11 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

Deepak Nigam reported on dev ML:
When there is one web app with the empty mount point (i.e. deployed on root), 
the auto-login cookie will not work for that particular webapp due to the change 
in the path of the cookie from "/" to "/" + applicationName. Because the system 
will try to find the cookie at the "/" but it is actually at "/" + applicationName.

Thanks Deepak for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852000 13f79535-47bb-0310-9956-ffa450edef68
2019-01-24 08:19:56 +00:00
Arun Patidar b887dff7cd Applied fix from trunk for revision: 1851805
===

Fixed: EntitySync Push and Pull functionalities
(OFBIZ-10818)

Removed unneccessary service implementation and used entity-auto
Fixed some create/update code block in the flow


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851812 13f79535-47bb-0310-9956-ffa450edef68
2019-01-22 13:14:49 +00:00
Paul Foxworthy 57ea5b8878 Fixed: In packing, only use reservations with stock on hand
(OFBIZ-9677)

During packing, OFBiz looks for reservations (OrderItemShipGrpInvRes)
for the order item. Some reservations are for back ordered items not on hand.
These reservations should not be used during packing, but they are.

Fixed bug in r1850914 when a single reservation's quantity exactly matches
the quantity to pack.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851359 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 14:09:16 +00:00
Jacques Le Roux e9a3dd7ea2 "Applied fix from trunk for revision: 1851350"
------------------------------------------------------------------------
r1851350 | jleroux | 2019-01-15 14:48:33 +0100 (mar. 15 janv. 2019) | 7 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

As reported by Deepak Nigam on dev ML there was a risk of NPE with userLogin w/
my last commit at r1851074  

Thanks Deepak for the report and proposed fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851352 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 13:48:58 +00:00
Jacques Le Roux bdd64b1433 "Applied fix from trunk for revision: 1851319"
------------------------------------------------------------------------
r1851319 | jleroux | 2019-01-15 08:43:36 +0100 (mar. 15 janv. 2019) | 12 lignes

Fixed: partyId misses in EditEftAccount.ftl (party) when you create an EFT 
account from the quick finalize page
(OFBIZ-10680)

If you split the payment and want to create an EFT account you get an error in 
EditEftAccount.ftl (party) at line 40 colum 50: the partyId is missing.

Adds the patch to add the partyId field that was missing while creating an EFT 
account or credit card in split payment mode. Added proper checks to avoid the 
broken screen in case the parameter is missing.

Thanks: Ankit Joshi for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851321 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 07:44:33 +00:00
Michael Brohl 0627b5873c Fixed: Blank page is displayed on ecommerce
(OFBIZ-10741)

Fixed recursions in hashCode methods introduced wth OFBIZ-9774.

Thanks Arpit Mor for reporting, Jacques Le Roux amd Priya Sharma for
review and helpful hints.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851258 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 14:32:22 +00:00
Jacques Le Roux 12292fb990 "Applied fix from trunk for revision: 1851247"
------------------------------------------------------------------------
r1851247 | jleroux | 2019-01-14 14:53:18 +0100 (lun. 14 janv. 2019) | 13 lignes

Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

On further investigation, I found that cookie path and domain are different 
in the methods of creating the auto-login cookie i.e. LoginWorker.autoLoginSet() 
and removing the auto-login cookie i.e. LoginWorker.autoLoginRemove().

After following changes the issue seems to be fixed:
1. Removed getMaxAge() check from the condition used in 
   LoginWorker.getAutoUserLoginId() method.
2. Corrected the path and domain in the method LoginWorker.autoLoginRemove().

Thanks: Deepak Nigam for discussion and fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851249 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 13:54:42 +00:00
Jacques Le Roux cc97e3b633 "Applied fix from trunk for revision: 1851200"
------------------------------------------------------------------------
r1851200 | jleroux | 2019-01-13 14:31:13 +0100 (dim. 13 janv. 2019) | 11 lignes

Reverted: Impossible secure and autologin cookie names when mountpoint contains 
a slash inside its name
(OFBIZ-10766)

In my previous commit I reverted the initial change. As I said in the Jira
I had a second look and it's better to fix the problem at the root as I did 
initially. 

I wrote in my previous commit: "This method is used in other places where the 
name should not be changed." I checked there are no issues changing slashes to
underscores in the cookies names anywhere.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851203 13f79535-47bb-0310-9956-ffa450edef68
2019-01-13 13:43:44 +00:00
Jacques Le Roux d6218b293d "Applied fix from trunk for revision: 1850914"
------------------------------------------------------------------------
r1850914 | paulfoxworthy | 2019-01-10 04:32:33 +0100 (jeu. 10 janv. 2019) | 7 lignes

Fixed: In packing, only use reservations with stock on hand
(OFBIZ-9677)

During packing, OFBiz looks for reservations (OrderItemShipGrpInvRes)
for the order item. Some reservations are for back ordered items not on hand.
These reservations should not be used during packing, but they are.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851164 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 12:57:57 +00:00
Michael Brohl 9b1a54fefb Applied fix from trunk for revision: 1851158
===

Fixed: Errors and warnings in webtools' ArtifactInfo
(OFBIZ-10760)

This fixes an engine declaration mistake introduced in OFBIZ-9111, 
removes an unused service which should have been deleted in OFBIZ-8722
and removes unused services which should have been deleted in 
OFBIZ-10146.

Thanks Mathieu Lirzin for reporting and providing the patches.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851160 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 11:28:43 +00:00
Ashish Vijaywargiya 3dac28dbc5 Applied fix from trunk for revision: 1851147
===========================
Fixed:Product tags section displays 'Update' button, despite of having no results 
(OFBIZ-9642)
Thanks Jagpreet for reporting and Anushi for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851150 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 08:25:07 +00:00
Suraj Khurana a691af5e66 Applied fix from trunk for revision: 1851130
===

Fixed:Invoice date is not displayed on findInvoice screen.
(OFBIZ-10620)
When an invoice is created, current date is set as invoice date which can be viewed on FindInvoice screen, it was not rendering due to incorrect xml tag used.
Thanks Arpit Mor for reporting and Deepak Nigam for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851132 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 05:34:42 +00:00
Jacques Le Roux 826977b857 "Applied fix from trunk for revision: 1851074 "
------------------------------------------------------------------------
r1851074 | jleroux | 2019-01-11 17:26:13 +0100 (ven. 11 janv. 2019) | 17 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

In the method to set the autoLogin cookie, LoginWorker::autoLoginSet,
system fetches the webAppInfo by using the
method ComponentConfig::getWebappInfo. In this method, serverId and
applicationName are passed as arguments.

*WebappInfo webappInfo = ComponentConfig.getWebappInfo((String)
context.getAttribute("_serverId"), UtilHttp.getApplicationName(request));*

If the mount-point of the web app is set as an empty string, then 'root'
will be used as the application name, due to which the object webAppInfo
will come null. If the webAppInfo is null then the autoLogin cookie will
not be created and added to the response object by the system.

Thanks: Aditya for report and Mathieu Lirzin for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851076 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:27:11 +00:00
Jacques Le Roux c69fa05bd1 "Applied fix from trunk for revision: 1851068 "
------------------------------------------------------------------------
r1851068 | jleroux | 2019-01-11 17:12:01 +0100 (ven. 11 janv. 2019) | 12 lignes

Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851071 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:13:29 +00:00
Deepak Dixit a45169ebd8 Applied fix from trunk for revision: 1851006
===

Fixed: Page dropdown list on categorydetail page broken
(OFBIZ-10787)
Thanks Sebastian Wachinger for reporting the issue.
Corrected the condition to display pagination options for ordermgr template as well.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1851008 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 06:09:35 +00:00
Michael Brohl 110d13a4ea Applied fix from trunk for revision: 1850953
===

Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The name is now registered with the webbapp name prior to the context.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850955 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:08:19 +00:00
Michael Brohl d2a3d710d7 Applied fix from trunk for revision: 1850948
===

Improved: Wrong German translation in PartyUiLabels
(OFBIZ-10786)

Thanks Dennis Balkir for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850949 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 15:54:30 +00:00
Deepak Dixit 1d90a487a2 Applied fix from trunk for revision: 1850918
===

Fixed: Unable to add additional product images from catalog
(OFBIZ-10673)
Removed code that was unused after r1081272, as logic to prepare the fileLocation was modified at r1081272
Thanks Rohit Koushal and Ingo Wolfmayr for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850919 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 06:08:03 +00:00
Jacques Le Roux cce92d2a46 "Applied fix from trunk for revision: 1850694"
------------------------------------------------------------------------
r1850694 | jleroux | 2019-01-07 22:58:01 +0100 (lun. 07 janv. 2019) | 13 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Michael spotted that I used "default-server" in r1845558:

Quoting him:

    It only works for webapps using "default-server". This name is configurable 
    in the ofbiz-component.xml and and should not be hard-coded in the code. 

This fixes it

Thanks: Michael Brohl
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850696 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 21:59:34 +00:00
Jacques Le Roux 5298601fa9 "Applied fix from trunk for revision: 1850685"
------------------------------------------------------------------------
r1850685 | jleroux | 2019-01-07 21:37:10 +0100 (lun. 07 janv. 2019) | 8 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

My previous commit was wrong this one fixes it.
I made a mistake trying to generalise changing UtilHttp::getApplicationName. 
This method is used in other places where the name should not be changed. 
Only cookies are concerned.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850687 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 20:41:58 +00:00
Jacques Le Roux c0904e1cc9 "Applied fix from trunk for revision: 1850647"
------------------------------------------------------------------------
r1850647 | jleroux | 2019-01-07 15:46:50 +0100 (lun. 07 janv. 2019) | 11 lignes

Improved: Update Apache commons-fileupload to last version
(OFBIZ-10770)

Fixes CVE-2019-0189

This is an easy doing, we just need to add

    compile 'commons-fileupload:commons-fileupload:1.3-3'

to the build.gradle file.

So far the dependency was not given directly but by other dependencies

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850649 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 14:48:20 +00:00
Jacques Le Roux 7a8e3eb583 "Applied fix from trunk for revision: 1850530"
------------------------------------------------------------------------
r1850530 | jleroux | 2019-01-06 09:40:38 +0100 (dim. 06 janv. 2019) | 8 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

When you set a mountpoint which contains a slash inside its name 
(ie not only a slash as a trailer, which is possible), as it's needed with 
OFBIZ-10765, OFBiz tries to create a cookie with a slash in its name and 
that's impossible
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850532 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 08:41:21 +00:00
Jacques Le Roux cfd88952d8 "Applied fix from trunk for revision: 1850023 "
------------------------------------------------------------------------
r1850023 | jleroux | 2018-12-31 10:09:33 +0100 (lun. 31 déc. 2018) | 12 lignes

Improved: Product Promo Worker description patch
(OFBIZ-3907)

Completes initial work from Sascha Rodekamp

Returns promoName then promoText if promoName absent then and 
"No promotion name nor text" if either are present.

We lose the information in promoText but at least it's correctly rendered in 
invoices PDF and accounting component.

Thanks: Scott for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850025 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:10:20 +00:00
Jacques Le Roux ec763d3196 "Applied fix from trunk for revision: 1850015 "
------------------------------------------------------------------------
r1850015 | jleroux | 2018-12-31 07:38:36 +0100 (lun. 31 déc. 2018) | 16 lignes

Improved: Prepare the migration to XStream 1.5
(OFBIZ-10756)

Fixes CVE-2018-17200

We currently use the UnsupportedClassConverter method in UtilXml class. 
When the 1.5 version of XStream will be available another way to handle this 
kind of things will be available and used by default. It's already possible to 
use the same with the 1.4 version of XStream with its setupDefaultSecurity method.

So this replaces the UnsupportedClassConverter in UtilXml class by 
XStream::setupDefaultSecurity method.

It's an improvement but better to backport it as much as possible

The UtilXmlTests class and its use is removed and the UnsupportedClassConverter 
method deprecated (no use OOTB)


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1850016 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 06:39:23 +00:00
Jacques Le Roux 6df5f511e8 "Applied fix from trunk for revision: 1849693 "
------------------------------------------------------------------------
r1849693 | jleroux | 2018-12-24 15:57:08 +0100 (lun. 24 déc. 2018) | 13 lignes

Fixed: Having condition is ignored on queryList() and queryFirst() calls in 
EntityQuery
(OFBIZ-9890)

queryList() and queryFirst() both call internal private query() method. 
This method calls delegator.findList if a normal Entity/ViewEntity is used 
(not a DVE). 

DVE has no option to include a having condition and so must opt to use 
queryIterator(). Even queryCount() can use a having condition.

Thanks: Rupert Howell and Gareth Carter for report,  Prakhar Kumar for discussion
 and Gareth Carter for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849694 13f79535-47bb-0310-9956-ffa450edef68
2018-12-24 14:58:24 +00:00
Jacques Le Roux 62233b8f7f "Applied fix from trunk for revision: 1849567"
------------------------------------------------------------------------
r1849567 | jleroux | 2018-12-22 20:18:49 +0100 (sam. 22 déc. 2018) | 10 lignes

Fixed: Dependent dropdowns should be used in createPostalAddress and 
Set Billing screens of ordermgr.
(OFBIZ-10681)

If you create an EFT account from the quick finalyse page, at 
ordermgr/control/createPostalAddress the US states which are proposed by default 
are not the US states but all states. 
You still can pick one US state, but it's counter intuitive.

Thanks: Aman Mishra for the fix and finding of Set Billing screen
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849569 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 19:23:43 +00:00
Akash Jain d788a1b6a3 Fixed: Date format does not change on change of locale.
(OFBIZ-10736)
Length of date in any formate will always be 10 (2(DD)+1(/)+2(MM)+1(/)+4(YYYY))
Thanks, Aditi Patidar for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849543 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 11:40:38 +00:00
Akash Jain 2dcfa46773 Applied fix from trunk for revision: 1849528
===

Fixed: The child event added is not listed in the Child Work Efforts. While if we add an existing event it is listed in the WorkEffort component, applied patch from jira issue (OFBIZ-10111)
Thanks, Rubia Elza Joshep and Pradeep Choudhary for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849529 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 09:23:58 +00:00
Suraj Khurana f1e833ea23 Fixed: Wrong title in table header of Config Option List.
(OFBIZ-10713)
Thanks Sebastian Wachinger for reporting and Anushi Gupta for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849523 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 07:05:40 +00:00
Suraj Khurana e5ab43d483 Fixed: Classification group filter not working on find party screen.
(OFBIZ-10580)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849519 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 05:45:58 +00:00
Suraj Khurana d7df6e5cae Fixed: Incorrect PartyContactMechPurpose created while calling createUpdateBillingAddress service.
(OFBIZ-10588)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849515 13f79535-47bb-0310-9956-ffa450edef68
2018-12-22 05:00:31 +00:00
Deepak Dixit ca74b49697 Applied fix from trunk for revision: 1826780
===

Improved: no functional change removes a duplicate getAssociatedStateList 
request map already present in the common-controller.xml


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849469 13f79535-47bb-0310-9956-ffa450edef68
2018-12-21 12:51:52 +00:00
Deepak Dixit d6a20ccebe Applied fix from trunk for revision: 1849467
===

Removed: Duplicate request getAssociatedStateList, committed at r#1848469. We have getAssociatedStateList request in common-controller and common-controller included in humanres controller.xml.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849468 13f79535-47bb-0310-9956-ffa450edef68
2018-12-21 12:49:54 +00:00
Deepak Dixit 057567e23a Applied fix from trunk for revision: 1819947
===

Reverted: Revision #1816270 not able to add a option with empty key in drop-down, (OFBIZ-9759)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849291 13f79535-47bb-0310-9956-ffa450edef68
2018-12-19 11:34:01 +00:00
Aditya Sharma e5f863e422 Applied fix from trunk for revision: 1849275
===

Improved: Remove all the fk dependencies from stats entities to the business entities
(OFBIZ-10721)
stats related entities foreign key relation has been removed by Jacopo at r#1647271 and new group org.apache.ofbiz.stats introduced for stats related entity. Some remnants were still left in stats entities. 
Removed relations of Party, ContactMech and Content from ServerHit entity.
Removed relations of Content from ServerHitBin entity.
Removed relations of UserLogin from Visitor entity.
Thanks Jacques Le Roux and Deepak Dixit for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849288 13f79535-47bb-0310-9956-ffa450edef68
2018-12-19 10:33:30 +00:00
Deepak Dixit 4b86c4d0b3 Applied fix from trunk for revision: 1849191
===

Improved: EntityUtilProperties.getProperties method should use cache.
(OFBIZ-10717)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849197 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 17:12:08 +00:00
Deepak Dixit 8e7b288ebe Applied fix from trunk for revision: 1849193
===

Fixed: Inconsistent behaviour of ServiceDispatcher.checkAuth 
(OFBIZ-10712)


We have checkAuth method in service dispatcher class, this method performs multiple auth related check.

if all checks passed it call the modelService.makeValid method to prepare service context (line#960) but this code executed only when service definition has a permission service call.

If service does not have any permission service call then it does not call the modelService.makeValid and this may cause the service validation issue unknown parameter found.

Ideally modelService.makeValid should call irrespective to permission service check.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849194 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 16:48:10 +00:00
Deepak Dixit 06e7bff4f3 Applied fix from trunk for revision: 1849021
===

Improved: request map to create party content in controller.xml exists twice
(OFBIZ-10699)
Renamed ambiguous controller request CreatePartyContent to EditPartyContent as per OOTB pattern.
Thanks Pierre Smits for reporting the issue and Jacques Le Roux for the the details and discussion


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1849022 13f79535-47bb-0310-9956-ffa450edef68
2018-12-16 11:38:42 +00:00
Jacques Le Roux 729bab1c7b "Applied fix from trunk for revision: 1848849"
------------------------------------------------------------------------
r1848849 | jleroux | 2018-12-13 15:39:17 +0100 (jeu. 13 déc. 2018) | 5 lignes

Improved: Plugins Asciidoc documentation must be standalone
(OFBIZ-10658)

Use ":toclevels: 3" after discussion ion dev ML

Thanks to all who participated
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848853 13f79535-47bb-0310-9956-ffa450edef68
2018-12-13 14:54:09 +00:00
Jacques Le Roux 62d16c2b5b "Applied fix from trunk for revision: 1848850"
------------------------------------------------------------------------
r1848850 | jleroux | 2018-12-13 15:52:12 +0100 (jeu. 13 déc. 2018) | 9 lignes

Fixed: ‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0
(OFBIZ-10693)

Downgrades AsciiDoc Gradle Plugin 1.5.9.1 to 1.5.8.1 to fix the issue. 
I have deduced from the stacktrace that the 
org.asciidoctor.gradle.backported.AsciidoctorJavaExec class was causing the 
issue and since it was introduced in 1.5.9 as stated in the comment at the 
top of its source file I have tried the latest version before this release.

Thanks: Mathieu for the fix and Jinghai for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848851 13f79535-47bb-0310-9956-ffa450edef68
2018-12-13 14:53:01 +00:00
Jacques Le Roux 5283ed488a "Applied fix from trunk for revision: 1848745 "
------------------------------------------------------------------------
r1848745 | jleroux | 2018-12-12 12:41:25 +0100 (mer. 12 déc. 2018) | 6 lignes

Improved: Convert Minilang to Groovy Guide into asciidoc 
(OFBIZ-10300)

Convert Dennis Balkirs Minilang to Groovy Guide into AsciiDoc.

Thanks: Benjamin Jugl
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848746 13f79535-47bb-0310-9956-ffa450edef68
2018-12-12 11:42:46 +00:00
Michael Brohl 7b791f22f6 Applied fix from trunk for revision: 1848469
===

Improved: Implement dependency from "State/Province" Field to "Country" 
in New Employee Form.
(OFBIZ-10326)

Thanks Benjamin Jugl and Julian Leichert for reporting and providing 
the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848472 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 13:46:02 +00:00
Michael Brohl 346f618c57 Applied fix from trunk for revision: 1848467
===

Improved: ControlEventListener - Change Log-Level
(OFBIZ-10330)

The Log-Level of the Message "Could not find visit value object in 
session..." is changed from "warning" to "info".

Thanks Benjamin Jugl for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848468 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 12:53:09 +00:00
Michael Brohl 8336ac5795 Applied fix from trunk for revision: 1848449
===

Seed data sequence bug regarding "MIDNIGHT_DAILY" TemporalExpression.
(OFBIZ-10533)

The TemporalExpression for "MIDNIGHT_DAILY" has to be loaded as seed 
data instead of initial-seed data to be available for other seed-initial
usages of this TemporalExpression.
The fix moves this TemporalExpression to the other TemporalExpression 
seed data in ServiceSeedData.xml.

Thanks Martin Becker for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848450 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 09:50:15 +00:00
Michael Brohl 6fa22aa6cc Applied fix from trunk for revision: 1848447
===

Fallthrough in switch-case of eway/GatewayResponse.java
(OFBIZ-10642)

There were breaks missing in the switch case.

Thanks Benjamin Jugl for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848448 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 09:41:42 +00:00
Michael Brohl 3d0ade3001 Applied fix from trunk for revision: 1848444
===

Fixed: Missing nullcheck in service createContactListParty.
(OFBIZ-10653)

This fix adds a nullcheck for the partyEmail and provides a better 
errorMessage for the in-request service call. In addition the failing 
partyID will be logged for the admin to see.

Thanks Dennis Balkir for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848445 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 09:28:55 +00:00
Michael Brohl e483e37a7a Applied fix from trunk for revision: 1848441
===

Fixed: UI bug in scrum component
(OFBIZ-10676)

When editing product backlog items, inserted javascript code was
executed on the client side. The confirmational blinking of the newly 
added or changed value was implemented using the .html(value) function 
of jQuery. This causes the html to be interpreted and the script to be
executed. But the data is stored, converting it into html, so not 
considered to be a vulnerability.
The fix changes the call to .text. This prevents the html to be 
interpreted.

Thanks Benjamin Jugl for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848442 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 08:58:52 +00:00
Michael Brohl 5e026126c6 Fixed: Update and fix openstreetmap.org integration.
(OFBIZ-10553)

Manual backport because of the renamed paths.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848436 13f79535-47bb-0310-9956-ffa450edef68
2018-12-08 08:05:52 +00:00
Jacques Le Roux 9e831df166 "Applied fix from trunk for revision: 1848398 "
------------------------------------------------------------------------
r1848398 | jleroux | 2018-12-07 14:14:48 +0100 (ven. 07 déc. 2018) | 17 lignes

Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

Steps to regenerate:
Open URL: https://demo-trunk.ofbiz.apache.org/ecommerce/control/main. 
  Welcome is displayed and user's name is not displayed when URL is opened.
Login at ecommerce, username will be displayed after user logs in.
Logout of ecommerce by clicking on logout. User will be logged out and login 
  link will be displayed in place of logout link, but the name of user is still 
  displayed.

Actual: Username is still displayed after user logs out
Expected: Username should not be displayed after the user logs out

Note: Similar issue also exists when the user clicks on (Not You?) link.

Thanks: Arpit Mor for detailled report, Deepak Dixit for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848399 13f79535-47bb-0310-9956-ffa450edef68
2018-12-07 13:16:46 +00:00
Jacques Le Roux 8aa4a5d85f "Applied fix from trunk for revision: 1848386 "
------------------------------------------------------------------------
r1848386 | jleroux | 2018-12-07 10:30:28 +0100 (ven. 07 déc. 2018) | 5 lignes

Fixed: Standalone Asciidoc plugins documents can't render logo correctly in PDF
(OFBIZ-10677)

Modifies the generatePluginDocumentation and generateAllPluginsDocumentation 
tasks by temporary copying the OFBiz-Logo.svg in plugin/s
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848387 13f79535-47bb-0310-9956-ffa450edef68
2018-12-07 09:30:55 +00:00
Jacques Le Roux 4a0e1cae4e "Applied fix from trunk for revision: 1848336 "
------------------------------------------------------------------------
r1848336 | jleroux | 2018-12-06 17:15:54 +0100 (jeu. 06 déc. 2018) | 7 lignes

Fixed: ConcurrentModificationException in ShoppingCart.cleanUpShipGroups
(OFBIZ-10696)

There's a for-loop over shipInfo and a call to clear inside this loop which 
leads to a ConcurrentModificationException

Thanks: Danny Trunk
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848337 13f79535-47bb-0310-9956-ffa450edef68
2018-12-06 16:16:38 +00:00
Jacques Le Roux 9a17edc2e3 "Applied fix from trunk for revision: 1848263 "
------------------------------------------------------------------------
r1848263 | jleroux | 2018-12-06 08:24:13 +0100 (jeu. 06 déc. 2018) | 13 lignes

Fixed: Error on createShoppingListItem when adding item to cart as anonymous
(OFBIZ-5157)

It can be reproduced by setting the product_store field autoSaveCart to 'Y' 
(In Store 9000 for the demo-data). Then the error occurs upon the first visit of 
the ecommerce-site, provided the user is not logged in.

    First Visit: no userLogin
    OFBiz wants to autosave list
    saving list requires userLogin (forsecuritycheck)
    result: error

Thanks: Mirko Vogelsmeier for report, Benjamin Jugl for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1848266 13f79535-47bb-0310-9956-ffa450edef68
2018-12-06 07:50:22 +00:00
Jacques Le Roux 512560e335 "Applied fix from trunk for revision: 1847478"
------------------------------------------------------------------------
r1847478 | jleroux | 2018-11-26 17:41:52 +0100 (lun. 26 nov. 2018) | 21 lignes

Improved: Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

If a form is of type enctype="multipart/form-data" and we are handling its 
submission through Groovy Event then in the parameters Map Ofbiz does not set 
the multipart input parameters from request parameters.

The same are available when multipart form submission is handled through service.

The reason being the code that sets the multipart parameters in request 
attribute is only available in ServiceEventHandler.java and in 
GroovyEventHandler the multipart are never set.

So I have created a method getMultiPartParameterMap in the class UtilHttp.java 
and put the common logic in that method so that when getCombinedMap method is 
called from the GroovEventHandler the method also call getMultiPartParameterMap 
and in the ServiceEventHandler I have written a call for 
getMultiPartParameterMap method.

Thanks: Vikramjit Singh for report and initial patch, Rohit Koushal for updated
and revised patch with some minor changes.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847955 13f79535-47bb-0310-9956-ffa450edef68
2018-12-02 10:36:09 +00:00
Jacques Le Roux 5afdd847c7 "Applied fix from trunk for revision: 1847890"
------------------------------------------------------------------------
r1847890 | jleroux | 2018-12-01 13:30:50 +0100 (sam. 01 déc. 2018) | 18 lignes

Fixed: Create a PoC for a documentation system for OFBiz based on Asciidoc
(OFBIZ-9873)

At r1831619 we committed a workaround to "turn off PDF in windows for now"

I have found a real solution for this bug which prevents to check PDF results in 
Windows because the PDF were not generated there.

I found this solution at 
https://github.com/asciidoctor/asciidoctorj-pdf/issues/8. 
After reading https://github.com/asciidoctor/asciidoctor-pdf/issues/850 
I checked it also works on Linux.

It uses the last version of jruby-complete.

I guess the gradle-versions-plugin should be able to warn us when an upgrade of 
jruby-complete is available like it does for junitReport.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847892 13f79535-47bb-0310-9956-ffa450edef68
2018-12-01 12:36:27 +00:00
Jacques Le Roux 099353dd1f "Applied fix from trunk for revision: 1847715 "
------------------------------------------------------------------------
r1847715 | jleroux | 2018-11-29 14:09:53 +0100 (jeu. 29 nov. 2018) | 6 lignes

Fixed: Tax not added for order shipping or promotion
(OFBIZ-4160)

Removes AccountingTaxAuthorityCategoryAdvice and usage, now useless

Fixes possible "BigInteger divide by zero" in rateProductTaxCalc
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847716 13f79535-47bb-0310-9956-ffa450edef68
2018-11-29 13:10:40 +00:00
Jacques Le Roux 8bff1a5720 "Applied fix from trunk for revision: 1847670 "
------------------------------------------------------------------------
r1847670 | jleroux | 2018-11-28 20:29:04 +0100 (mer. 28 nov. 2018) | 20 lignes

Fixed: Tax not added for order shipping or promotion
(OFBIZ-4160)

The r1070830 commit works fine. Except when there are shippings and promotions 
to calculate. Then the algorithm searches for all entries in 
TAX_AUTHORITY_RATE_PRODUCT that are available for the PRODUCT_STORE and 
TAX_AUTH (and apply to shipping/promotions). So all taxes (regular and reduced) 
are applied to the shipping costs, which naturally leads to a higher 
amount overall.

The correct procedure (at least in some countries in Europe) is to apply the 
tax for shipping  according to the shipped items. So, if regular tax applies 
to the good, regular tax is applied to the shipping-costs. If multiple items are 
shipped and they  have mixed taxes (some regular, some reduced) the calculation 
of the tax for shipping is weighted accordingly. 

jleroux: there are other ways to calculate VAT on shipping depending on 
countries and situations. This will be addressed by OFBIZ-10679

Thanks: Benjamin Jugl 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847671 13f79535-47bb-0310-9956-ffa450edef68
2018-11-28 19:29:54 +00:00
Jacques Le Roux dec72028e4 "Applied fix from trunk for revision: 1847402"
------------------------------------------------------------------------
r1847402 | jleroux | 2018-11-25 10:16:28 +0100 (dim. 25 nov. 2018) | 9 lignes

Fixed: Mime Type not supported Error while generating a Composite Pdf
(OFBIZ-9840)

When generating a Composite Pdf in the Content Manager an Error occurs :
 Mime Type not Supported
 Steps to recreate the Error Message:
Content Manager->CompDoc->Tree->View Instances->Tree-> Generate Composite Pdf

Thanks: Thanks Julian Leichert for report, Aman Mishra for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847403 13f79535-47bb-0310-9956-ffa450edef68
2018-11-25 09:25:46 +00:00
Jacques Le Roux 5075b6f85a "Applied fix from trunk for revision: 1847398 "
------------------------------------------------------------------------
r1847398 | jleroux | 2018-11-25 09:40:23 +0100 (dim. 25 nov. 2018) | 15 lignes

Fixed: Instructions for Configurable PC don't work
(OFBIZ-10542)

This concerns only R16, R17 and the trunk. The "Instructions" button was not 
present in R13.

This kind of message shows:
Trunk:
<a href="javascript:showErrorAlert('The following errors occurred','');"
R16:
<a href="javascript:showErrorAlert(" the="" following="" errors="" occurred","")

The same exists for all configurable products, notably Gold Pizza

Thanks: Priya Sharma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847399 13f79535-47bb-0310-9956-ffa450edef68
2018-11-25 08:41:34 +00:00
Suraj Khurana 54b0dcaf16 Fixed: Update Contact Mech ID with Billing Account not working.
> (OFBIZ-10315)
> Thanks Shikha Jaiswal for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847361 13f79535-47bb-0310-9956-ffa450edef68
2018-11-24 12:43:28 +00:00
Suraj Khurana 11fa711dbf Fixed: Force complete Purchase Order button throws error.
> (OFBIZ-9912)
> Thanks Priya Sharma for reporting and Amit Gadaley for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847353 13f79535-47bb-0310-9956-ffa450edef68
2018-11-24 09:52:22 +00:00
Suraj Khurana cd8459d0b3 Fixed: Typo in shipmentTypeId. It should be INCOMING_SHIPMENT instead of INGOING_SHIPMENT.
> (OFBIZ-6958)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847339 13f79535-47bb-0310-9956-ffa450edef68
2018-11-24 06:03:57 +00:00
Jacques Le Roux ac70b60e1c Documented: Backport the Asciidoc documentation and means to generate it to
R17 branch
(OFBIZ-10657)
Convert Birt component doc from Markdown to AsciiDoc 
(OFBIZ-10647)

As discussed in https://markmail.org/message/x7sv2mpvtytr4vl4 we decided to 
backport the Asciidoc documentation, and means to generate it, to R17 branch

This is related with OFBIZ-10651 and OFBIZ-10652 tasks. 
So 2 parts are impacted: code in framework and plugins and Buildbot script. 
It's only a copy from the trunk to the R17 branch, including *.adoc files, 
related images and the build.gradle script.

I previous commit I missed to remove security-impersonation.adoc now replaced 
by sy-impersonation.adoc
Forgot to commit the plugins part. Including replacing Birt Markdown 
documentation by Asciidoc  (OFBIZ-10647)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847253 13f79535-47bb-0310-9956-ffa450edef68
2018-11-23 12:16:52 +00:00
Jacques Le Roux fad06400e2 Documented: Backport the Asciidoc documentation and means to generate it to
R17 branch
(OFBIZ-10657)

As discussed in https://markmail.org/message/x7sv2mpvtytr4vl4 we decided to 
backport the Asciidoc documentation, and means to generate it, to R17 branch

This is related with OFBIZ-10651 and OFBIZ-10652 tasks. 
So 2 parts are impacted: code in framework and plusing and Buildbot script. 
It's only a copy from the trunk to the R17 branch, including *.adoc files, 
related images and the build.gradle script.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1847248 13f79535-47bb-0310-9956-ffa450edef68
2018-11-23 12:00:10 +00:00
Aditya Sharma 359fb39788 Applied fix from trunk for revision: 1846632
===

Fixed: Missing Security and Cache Headers in CMS Events
(OFBIZ-10597)
Instead of having multiple null checks for viewMap separately for each security header we can have a single combined null check at the top in setResponseBrowserDefaultSecurityHeaders() method.

With increasing security headers these may become expensive.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1846633 13f79535-47bb-0310-9956-ffa450edef68
2018-11-15 10:44:00 +00:00
Jacques Le Roux 2d4fa571d3 "Applied fix from trunk for revision: 1846594 "
------------------------------------------------------------------------
r1846594 | jleroux | 2018-11-14 18:31:27 +0100 (mer. 14 nov. 2018) | 17 lignes

Fixed: Manufacturing BOM search returning duplicate entries in search results
(OFBIZ-10648)

Bill of Materials search returning duplicate entries in search results.

Test Steps:
1. Login to Manufacturing application.
2. Navigate to Bill of Materials tab.
3. Observe the issue in Search results.

Expected Result:
Unique products should be displayed on Bill of Materials search results.
Actual Result:
Bill of Materials search returning duplicate entries in search results. 
The distinct constraint is missing in FindProductBom.groovy find query.

Thanks: Aditya Barve
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1846595 13f79535-47bb-0310-9956-ffa450edef68
2018-11-14 17:32:33 +00:00
Jacques Le Roux 61a2d71238 "Applied fix from trunk for revision: 1846214"
------------------------------------------------------------------------
r1846214 | jleroux | 2018-11-09 09:11:46 +0100 (ven. 09 nov. 2018) | 20 lignes

Fixed: Content - Able to add empty Forum Group
(OFBIZ-10615)

Steps to Regenerate issue:
 # Login to demo-trunk or demo-stable instance with details:
URL - [https://demo-trunk.ofbiz.apache.org/content/control/findForumGroups] 
admin/ ofbiz  OR
URl - [https://demo-stable.ofbiz.apache.org/content/control/createForumGroup]
admin/ ofbiz
 # Go to Content > Forum and try to create new forum group.
 # do not enter Forum Group Name and Description.
 # Click on the Submit button.

Actual - System allowed the user to enter an empty forum group. 
This issue is occurring at demo-trunk and demo-stable instance. 

Expected - Empty Forum group should not be added. If the user tries to do this
s/he should not be allowed and proper validation error message should display.

Thanks: Sanjay Yadav
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1846215 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 08:12:42 +00:00
Jacques Le Roux 33e6c072fd "Applied fix from trunk for revision: 1846107 "
------------------------------------------------------------------------
r1846107 | jleroux | 2018-11-08 10:17:37 +0100 (jeu. 08 nov. 2018) | 6 lignes

Fixed: Stores can't be modified at catalog/control/updateProductStore
(OFBIZ-10567)

I forgot the label, here it is.
I kept the old one, could be useful elsewhere. 
I amended the English version.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1846108 13f79535-47bb-0310-9956-ffa450edef68
2018-11-08 09:19:53 +00:00
Jacques Le Roux cbdfadfba1 "Applied fix from trunk for revision: 1846097"
------------------------------------------------------------------------
r1846097 | jleroux | 2018-11-08 08:18:43 +0100 (jeu. 08 nov. 2018) | 22 lignes

Fixed: Stores can't be modified at catalog/control/updateProductStore
(OFBIZ-10567)

This is related with the common-theme introduction.

There are 2 fields named visualThemeId in the data model. The one in 
ProductStore entity existed before the common-theme introduction with the new 
entity VisualTheme. When the theme is initialised with InitTheme.groovy it sets 
the context.visualThemeId value if it does not exist yet with 
parameters.visualThemeId. At this point things get confused and the 
backend theme used is replaced by the ecommerce theme defined for the 
productStore.

I think it would overwhelming to change the data model when only the 
EditProductStore form and updateProductStore service are concerned. 

So here is a very simple workaround where visualThemeId is replaced by 
ecomThemeId in the EditProductStore form and updateProductStore service.

If someone prefers to change the data model and related code feel free to revert, 
reopen the Jira and do.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1846098 13f79535-47bb-0310-9956-ffa450edef68
2018-11-08 07:19:20 +00:00
Jacques Le Roux 82b0fc150c "Applied fix from trunk for revision: 1845995"
------------------------------------------------------------------------
r1845995 | jleroux | 2018-11-07 10:36:50 +0100 (mer. 07 nov. 2018) | 6 lignes

Fixed: Stores can't be modified at catalog/control/updateProductStore
(OFBIZ-10567)

Removes a hidden duplicate productStoreId field introduced with  OFBIZ-6924

This does not completely fixes the issue but allow to get ahead
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845996 13f79535-47bb-0310-9956-ffa450edef68
2018-11-07 09:37:13 +00:00
Jacques Le Roux 31c0e14f48 "Applied fix from trunk for revision: 1845933"
------------------------------------------------------------------------
r1845933 | jleroux | 2018-11-06 17:33:11 +0100 (mar. 06 nov. 2018) | 16 lignes

Fixed: Error in GetLocaleListTests.java 
(OFBIZ-10641)

A test error related to GetLocaleListTests.java seems to happen only on a fresh 
trunk install when running unit tests. It's no stopping tests. 

I'm not sure yet if R17 is concerned. I did not try, but will 1st confirm with
this commit with trunk demo error.loç

Mathieu suggested to  replace the location 
component://base/config/GroovyInit.groovy 
with ofbizhome://framework/base/config/GroovyInit.groovy
because GroovyUtil [should not] depend on the component container in the 
1st place, and it seems to work.

Thanks: Mathieu for the idea.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845989 13f79535-47bb-0310-9956-ffa450edef68
2018-11-07 08:05:02 +00:00
Jacques Le Roux 48db7b0306 "Applied fix from trunk for revision: 1845558 "
------------------------------------------------------------------------
r1845558 | jleroux | 2018-11-02 10:46:42 +0100 (ven. 02 nov. 2018) | 15 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845568 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 10:38:33 +00:00
Jacques Le Roux d4f56344e1 "Applied fix from trunk for revision: 1845552 "
------------------------------------------------------------------------
r1845552 | jleroux | 2018-11-02 09:48:31 +0100 (ven. 02 nov. 2018) | 9 lignes

Fixed: ComponentConfig::getAppBarWebInfos creates infos only for components 
without <<app-bar-display="false">>
(OFBIZ-10637)

LoginWorked::getAppBarWebInfos is used to define the apps menus in themes so we
need to also check that no menuName is passed to 
ComponentConfig::getAppBarWebInfos. Else all menus appears in the secondary menu
bars

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845553 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 08:49:11 +00:00
Jacques Le Roux 19a3348c27 "Applied fix from trunk for revision: 1845544"
------------------------------------------------------------------------
r1845544 | jleroux | 2018-11-02 08:59:16 +0100 (ven. 02 nov. 2018) | 5 lignes

Fixed: ComponentConfig::getAppBarWebInfos creates infos only for components 
without <<app-bar-display="false">>
(OFBIZ-10637)

It makes no sense since if the menuName var is empty the infos are returned.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845545 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 08:00:09 +00:00
Jacques Le Roux bee23f5f83 "Applied fix from trunk for revision: 1845466"
------------------------------------------------------------------------
r1845466 | jleroux | 2018-11-01 13:55:26 +0100 (jeu. 01 nov. 2018) | 3 lignes

Improved: no functional change, just some formatting 

Thanks: Taher for review
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845467 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 12:55:52 +00:00
Jacques Le Roux fc94661783 "Applied fix from trunk for revision: 1845420"
------------------------------------------------------------------------
r1845420 | jleroux | 2018-11-01 10:39:17 +0100 (jeu. 01 nov. 2018) | 20 lignes

Fixed: Missing Security and Cache Headers in CMS Events
Fixed:
(OFBIZ-10597)

While rendering the view through the controller request we set the important 
security headers like x-frame-options, strict-transport-security, 
x-content-type-options, X-XSS-Protection and Referrer-Policy etc. in the 
response object. (Please see the 'rendervView' method of RequestHandler class.) 
 
In the similar line, we set the cache related headers like Expires, 
Last-Modified, Cache-Control, Pragma.
 
But these security headers are missing in the pages rendered through CMS. 
(Please visit the CmsEvents class).
 
These headers are very crucial for the security of the application as they help 
to prevent various security threats like cross-site scripting, 
cross-site request forgery, clickjacking etc. 

Thanks: Deepak Nigam for initial patch and review
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845421 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 09:40:01 +00:00
Jacques Le Roux 642d871210 "Applied fix from trunk for revision: 1845418"
------------------------------------------------------------------------
r1845418 | jleroux | 2018-11-01 10:36:35 +0100 (jeu. 01 nov. 2018) | 20 lignes

Fixed: Missing Security and Cache Headers in CMS Events
Fixed:
(OFBIZ-10597)

While rendering the view through the controller request we set the important 
security headers like x-frame-options, strict-transport-security, 
x-content-type-options, X-XSS-Protection and Referrer-Policy etc. in the 
response object. (Please see the 'rendervView' method of RequestHandler class.) 
 
In the similar line, we set the cache related headers like Expires, 
Last-Modified, Cache-Control, Pragma.
 
But these security headers are missing in the pages rendered through CMS. 
(Please visit the CmsEvents class).
 
These headers are very crucial for the security of the application as they help 
to prevent various security threats like cross-site scripting, 
cross-site request forgery, clickjacking etc. 

Thanks: Deepak Nigam for initial patch and review
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1845419 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 09:37:06 +00:00
Aditya Sharma b528df23a7 Fixed: updateContent service does not return an error/success message
(OFBIZ-9743)
Additional change:
Added success message to createContent and removeContent service too.
Thanks Rohit Rai for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1844954 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 11:39:45 +00:00
Deepak Dixit 4c577b5a7d Applied fix from trunk for revision: 1844943
===

Improved: Updated google libphonenumber to v8.9.16 
(OFBIZ-10618)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1844944 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 07:56:40 +00:00
Jacques Le Roux 6bd3532cf9 "Applied fix from trunk for revision: 1843893"
------------------------------------------------------------------------
r1843893 | jleroux | 2018-10-15 12:06:04 +0200 (lun. 15 oct. 2018) | 4 lignes

Fixed: Creating Javadoc on Windows fails
(OFBIZ-10605)

This is due to the lack of UTF-8 encoding
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1843894 13f79535-47bb-0310-9956-ffa450edef68
2018-10-15 10:08:25 +00:00
Jacques Le Roux 758db9b5f5 "Applied fix from trunk for revision: 1843225 "
------------------------------------------------------------------------
r1843225 | jleroux | 2018-10-09 10:16:01 +0200 (mar. 09 oct. 2018) | 6 lignes

Documented: Wrong handling of response type "cross-redirect"
(OFBIZ-10569)

The documentation was wrong, this fixes it

Thanks: Dennis Balkir for the report and discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1843226 13f79535-47bb-0310-9956-ffa450edef68
2018-10-09 08:17:12 +00:00
Jacques Le Roux c15ad95d26 "Applied fix from trunk for revision: 1842921"
------------------------------------------------------------------------
r1842921 | jleroux | 2018-10-05 16:22:15 +0200 (ven. 05 oct. 2018) | 11 lignes

Fixed: The query iCalendar/CALENDAR_PUB_DEMO/ no longer work
(OFBIZ-10595)

ControlFilter does not allow the untypical iCalendar/CALENDAR_PUB_DEMO/ query 
to pass.
I have not checked deep, but since R13 works I believe it's due to OFBIZ-6760 
where ControlFilter was added. Then CALENDAR_PUB_DEMO/ is considered a 
[Filtered request] and the whole iCalendar process in Thunderbird Calendar is 
broken

Thanks:  Jyri Sillanpaa for the detailled report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1842922 13f79535-47bb-0310-9956-ffa450edef68
2018-10-05 14:22:36 +00:00
Jacques Le Roux e51a26f3c4 "Applied fix from trunk for revision: 1842372 "
------------------------------------------------------------------------
r1842372 | jleroux | 2018-09-30 15:49:30 +0200 (dim. 30 sept. 2018) | 11 lignes

Fixed: Service Log screen is broken
(OFBIZ-10342)

Steps to regenerate

    Navigate to Logging menu under webtools
    https://demo-trunk.ofbiz.apache.org/webtools/control/LogView

    Select Service Log menu, see NPE error

Thanks: Swapnil M Mane for report and Swapnil and Rishi Solanki for reviews
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1842373 13f79535-47bb-0310-9956-ffa450edef68
2018-09-30 13:55:13 +00:00
Aditya Sharma cbc4d7097c Applied fix from trunk for revision: 1841662
===

Fixed: Broken page renders while click on Submit button
(OFBIZ-7535)
Submit button on ListEmploymentApps form has no check to hide when no record in List due to which button always appears and shows broken screen when submitting empty list.
Thanks Ankush Upadhyay for reporting the issue


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1841663 13f79535-47bb-0310-9956-ffa450edef68
2018-09-22 08:46:49 +00:00
Suraj Khurana f40fab2954 Applied fix from trunk for revision: 1841657
===

Fixed: Search operation on 'AssocRevisionItemView' entity causing exception.
(OFBIZ-8842)
Thanks Humera Khan for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1841658 13f79535-47bb-0310-9956-ffa450edef68
2018-09-22 07:16:02 +00:00
Jacopo Cappellato db343122f7 Applied fix from trunk for revision: 1840828
===

Improved: Upgraded Freemarker to the latest stable version (from 
2.3.27-incubating to 2.3.28).



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1840895 13f79535-47bb-0310-9956-ffa450edef68
2018-09-14 07:49:50 +00:00
Jacques Le Roux 2d74cb07d0 "Applied fix from trunk for revision: 1840199"
------------------------------------------------------------------------
r1840199 | jleroux | 2018-09-06 11:53:23 +0200 (jeu. 06 sept. 2018) | 7 lignes

Fixed: Action (find) button not visible in LabelManager search screen
(OFBIZ-10549)

When a user executes a search/find action in the Label Manager, and there are 
duplicated labels the 'Find' button is not visible anymore.

Thanks: Pierre Smits
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1840200 13f79535-47bb-0310-9956-ffa450edef68
2018-09-06 09:54:23 +00:00
Jacques Le Roux 5adfc2c434 "Applied fix from trunk for revision: 1840189"
------------------------------------------------------------------------
r1840189 | jleroux | 2018-09-06 09:50:54 +0200 (jeu. 06 sept. 2018) | 9 lignes

Improved: Display From address in send confirmation email form
(OFBIZ-10493)

Open any sales order and press "Send a confirmation email" button. 
Note that header From is read-only and empty. No problem with read-only mode as 
the address has been taken from ProductStoreEmailSetting but I think it would 
be better to display this address.

Thanks: Oleg Andreyev
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1840190 13f79535-47bb-0310-9956-ffa450edef68
2018-09-06 07:53:22 +00:00
Deepak Dixit 6407bae517 Improved: Use of layered-modal with parameter does not work
(OFBIZ-10511)
Thanks Arsalane Arrach for your contribution. Use &quot; to escape the double quotation marks

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1840094 13f79535-47bb-0310-9956-ffa450edef68
2018-09-05 07:19:13 +00:00
Jacques Le Roux 3350c11513 "Applied fix from trunk for revision: 1838381 "
------------------------------------------------------------------------
r1838381 | jleroux | 2018-08-19 17:30:42 +0200 (dim. 19 août 2018) | 8 lignes

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/branches/release17.12@1838382 13f79535-47bb-0310-9956-ffa450edef68
2018-08-19 15:31:26 +00:00
Aditya Sharma 79ef78445e Reverted: Unwanted changes from AccountingScheduledServiceData.xml done at r1838257
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1838261 13f79535-47bb-0310-9956-ffa450edef68
2018-08-17 13:05:19 +00:00
Aditya Sharma efb9ecbeaa Applied fix from trunk for revision: 1838256
===

Improved: Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()
(OFBIZ-10508)
When the code was committed the 'URL' field type had a size of 255 characters only which was later changed to 2000 characters. So, the above code logic to restrict no of characters can be removed now. 
Removed null pointer check for initialRequest and initialReferrer as it is already handled while setting the values in UtilHttp.setInitialRequestInfo() method.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1838257 13f79535-47bb-0310-9956-ffa450edef68
2018-08-17 12:53:32 +00:00
Jacques Le Roux f71734ffac Improved: no functional change
Removes io.jsonwebtoken:jjwt, this was not supposed to be part of OFBIZ-10523

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1838059 13f79535-47bb-0310-9956-ffa450edef68
2018-08-14 22:28:28 +00:00
Jacques Le Roux e0b076d76f "Applied fix from trunk for revision: 1838032"
------------------------------------------------------------------------
r1838032 | jleroux | 2018-08-14 18:44:17 +0200 (mar. 14 août 2018) | 4 lignes

Fixed: You can't create a New Payment Group
(OFBIZ-10523)

There is a duplicated paymentGroupTypeId, it should a string not a list.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1838033 13f79535-47bb-0310-9956-ffa450edef68
2018-08-14 16:45:09 +00:00
Jacques Le Roux a6f4438e9b Improved: no functional change
Removes io.jsonwebtoken:jjwt, this was not supposed to be part of OFBIZ-10517

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1837863 13f79535-47bb-0310-9956-ffa450edef68
2018-08-11 10:49:10 +00:00
Jacques Le Roux 6fb3531f64 "Applied fix from trunk for revision: 1837857"
------------------------------------------------------------------------
r1837857 | jleroux | 2018-08-11 12:37:40 +0200 (sam. 11 août 2018) | 10 lignes

Fixed: Update Apache Tomcat to 9.0.10 because of CVE-2018-8037
(OFBIZ-10517)

If an async request was completed by the application at the same time as the 
container triggered the async timeout, a race condition existed that could 
result in a user seeing a response intended for a different user. 
An additional issue was present in the NIO and NIO2 connectors that did not 
correctly track the closure of the connection when an async request was 
completed by the application and timed out by the container at the same time.
This could also result in a user seeing a response intended for another user. 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1837860 13f79535-47bb-0310-9956-ffa450edef68
2018-08-11 10:40:18 +00:00
Gil Portenseigne 2a7de2a39e Fixed: Use of layered-modal with parameter does not work
(OFBIZ-10511)

Thanks Deepak and Aditya for the review and providing a better patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1837807 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 14:12:52 +00:00
Taher A. Alkhateeb b82c52b234 Backported fix from trunk for revision: 1837697
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1837707 13f79535-47bb-0310-9956-ffa450edef68
2018-08-09 09:57:26 +00:00
Gil Portenseigne dc1864f983 Fixed: Initial set of hasLoggedOut flag when logging in
(OFBIZ-10506)

Thanks Dennis for your patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1837585 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 09:35:23 +00:00
Deepak Dixit a4b50a46b1 Applied fix from trunk for revision: 1836871
===

Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Updated compressibleMimeType list and use application/javascript in place of text/javascript


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1836872 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 06:28:05 +00:00
Deepak Dixit 826d7e6bd7 Applied fix from trunk for revision: 1836144
===

Fixed: compressableMimeType is not a valid attribute of apache http connector 
(OFBIZ-10487)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1836145 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:42:52 +00:00
Taher A. Alkhateeb e8e2791fd8 Backported fix from trunk for revision: 1836141
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1836142 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:32:46 +00:00
Deepak Dixit d0e1a957e5 Applied fix from trunk for revision: 1835964
===

Fixed: Not able to delete PartyRate 
(OFBIZ-10483)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835965 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 10:48:39 +00:00
Deepak Dixit 1777b217c9 Applied fix from trunk for revision: 1835953
===

Fixed: Missing Import in CmsEditAddPrep.groovy 
(OFBIZ-10475)

Applied slightly modified patch, Thanks Dennis Balkir for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835955 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 08:48:00 +00:00
Jacques Le Roux d698865837 "Applied fix from trunk for revision: 1835891 "
------------------------------------------------------------------------
r1835891 | jleroux | 2018-07-14 11:52:26 +0200 (sam. 14 juil. 2018) | 35 lignes

Fixed: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164)

If you go at: catalog/control/main then open the lookup on the left for category
 id, click the first category (20111) and then click on search, you will be 
prompted with this:
java.lang.IllegalArgumentException: Error running script at location 
[component://product/groovyScripts/catalog/find/KeywordSearch.groovy]: 
java.lang.NullPointerException

This is the result of the changes I made for this issue 1.5 years ago.

I missed the case where a null is passed instead of a dispatcher in
getProductCategoryContentAsText()
which is then used inside of getProductCategoryContentAsText:
ContentWorker.renderContentAsText()
The problem is, that the method renderContentAsText as a result of my changes 
uses the dispatcher to get the delegator.
Because the dispatcher is a given a null value at this point, this results in a 
null pointer.

The solution was to introduce and abstract prettyPrintConstraint method with a 
LocalDispatcher as argument and to implement it in CategoryConstraint class. 

Other implementations don't use getProductCategoryContentAsText so can simply 
return null.

CatalogConstraint.prettyPrintConstraint with a delegator is now not
used OOTB but I prefer to keep its implementation for custom projects which 
might use it in other circumstances. I though put a TODO to possibly simply
return null.

Also while at it remove a unused requestParams variable in ProductSearchSession

Thanks: Dennis Balkir for the detailed reporting
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835892 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 09:53:00 +00:00
Akash Jain 5f35bd4387 Applied fix from trunk for revision: 1835887
===

Fixed: Not able to expire the rate amount and an error is displayed in Workeffort (OFBIZ-10114)

Thanks, Rubia Elza Joshep and Chandrashekhar Dhakad for your contibution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835888 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 09:11:44 +00:00
Jacques Le Roux 907445c6e4 Reverted: setLocaleFromBrowser requires authentification
(OFBIZ-10460)

The setLocaleFromBrowser request map defined in common-controller.xml has an 
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml 
has an attribute of auth=true.

jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
    "it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere

Thanks: as reported by Deepak in OFBIZ-10460 there is a problem with that.
So we need keep the inconsistence and the service protected.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835616 13f79535-47bb-0310-9956-ffa450edef68
2018-07-11 08:14:29 +00:00
Jacques Le Roux 073c3f71e5 "Applied fix from trunk for revision: 1835586"
------------------------------------------------------------------------
r1835586 | jleroux | 2018-07-10 19:31:50 +0200 (mar. 10 juil. 2018) | 13 lignes

Fixed: setLocaleFromBrowser requires authentification
(OFBIZ-10460)

The setLocaleFromBrowser request map defined in common-controller.xml has an 
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml 
has an attribute of auth=true.

jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
    "it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere

Thanks: Mathieu Lirzin for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835587 13f79535-47bb-0310-9956-ffa450edef68
2018-07-10 17:33:59 +00:00
Gil Portenseigne a0df9e164a Fixed: GetLocaleList call can provide duplicate results
(OFBIZ-10458)

A new Junit test is implemented to validate that no duplicates are present.
Groovy service has been refactored to use a more functional style

Thanks Mathieu Lirzin for reporting and providing the patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835283 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 21:10:50 +00:00
Deepak Dixit daae6ed07e Applied fix from trunk for revision: 1835235
===

Fixed: Framework webapp freemarkerTransform.properties has dependency on proudct component
(OFBIZ-10463)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835238 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 11:51:24 +00:00
Jacques Le Roux ac3c0debd4 "Applied fix from trunk for revision: 1834736"
------------------------------------------------------------------------
r1834736 | jleroux | 2018-06-30 16:00:16 +0200 (sam. 30 juin 2018) | 16 lignes

Fixed: Put back the com.lowagie:itext license from 4.2.0 to 2.1.7
(OFBIZ-10455)

At r1812161 for OFBIZ-9674 we updated com.lowagie:itext license from 2.1.7 to 
4.2.0. Scott mentionned at https://s.apache.org/ixHW:

<<I just noticed that the iText maven bundle is a bit tricksy and includes iText
 5.6.6 as a dependency, with the latter being GPL licensed.>>

Actually Scott meant itextpdf (was clear in his message), and it turned out that 
not only itextpdf was a problem but the 4.2.0 version in its entirety as 
discovered in the thread.

The solution is to get back to the 2.1.7 version which is still MPL licensed.

Thanks: Scott for discovering the issue and others for the discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1834737 13f79535-47bb-0310-9956-ffa450edef68
2018-06-30 14:00:39 +00:00
Akash Jain 86aa890ef4 Applied fix from trunk for revision: 1834191
===

Fixed: Values are not aligned with column over EditShoppingList Screen, applied patch from jira issue. (OFBIZ-10210)

Thanks, Yogesh Naroliya for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1834196 13f79535-47bb-0310-9956-ffa450edef68
2018-06-23 12:22:06 +00:00
Arun Patidar 26b319052b Applied fix from trunk for revision: 1834181
===

FIXED:Incorrect succes mesage after creating customer.
(OFBIZ-9898)

Thanks Anushi Gupta for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1834182 13f79535-47bb-0310-9956-ffa450edef68
2018-06-23 06:28:48 +00:00
Taher A. Alkhateeb 38f7330f88 Applied trunk fix on revision r1833708 (OFBIZ-10435)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1833709 13f79535-47bb-0310-9956-ffa450edef68
2018-06-18 12:26:14 +00:00
Jacques Le Roux 0279d8f99f "Applied fix from trunk for revision: 1833211 "
------------------------------------------------------------------------
r1833211 | jleroux | 2018-06-08 22:37:32 +0200 (ven. 08 juin 2018) | 8 lignes

Fixed: streaming large content cause out of memory exception.
(OFBIZ-10133)

With r1821036 DataResourceWorker.getDataResourceStream() may return an 
InputStream (if the data resource is a file) instead of a ByteArrayInputStream 
which was expected in few places.

This fixes it
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1833212 13f79535-47bb-0310-9956-ffa450edef68
2018-06-08 20:38:19 +00:00
Michael Brohl 2d83f1962d Applied fix from trunk for revision: 1833173
===

Improved: Add a VERSION file in root dir.
(OFBIZ-10141)

This adds a VERSION file to store the release version information
and changes the footer of the themes to show the release version.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1833174 13f79535-47bb-0310-9956-ffa450edef68
2018-06-08 14:46:12 +00:00
Jacques Le Roux a03229ea99 "Applied fix from trunk for revision: 1832944 "
------------------------------------------------------------------------
r1832944 | jleroux | 2018-06-05 15:56:29 +0200 (mar. 05 juin 2018) | 17 lignes

Fixed: The first visit event are not executed in case of CMS
(OFBIZ-10389)

Execution of the first visit events depends on the trackVisit function

In RequestHandler.java file

if (this.trackVisit(request) && session.getAttribute("_FIRST_VISIT_EVENTS_") == null) {
    // execute first visit event
}

trackVisit function does not honor the default controller request 
(in this case, cms) So, we should improve the code of trackVisit to honor 
default controller request.


Thanks: Swapnil M Mane
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1832945 13f79535-47bb-0310-9956-ffa450edef68
2018-06-05 13:57:18 +00:00
Jacques Le Roux bac7aeb9ef "Applied fix from trunk for revision: 1832756"
------------------------------------------------------------------------
r1832756 | jleroux | 2018-06-03 10:33:09 +0200 (dim. 03 juin 2018) | 21 lignes

Fixed: Session fixation issue
(OFBIZ-10420)

Prevents the session fixation by making Tomcat generate a new jsessionId 
(ultimately put in cookie). Only do when really signing in to avoid unnecessary 
calls

This improves the way it's done by using request.changeSessionId() instead of 
creating a brand new session. So there is no possible side effects on client and
no need to set initial request info (using setInitialRequestInfo)

Thanks: Taher for asking about it









------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1832757 13f79535-47bb-0310-9956-ffa450edef68
2018-06-03 08:34:32 +00:00
Jacques Le Roux c9c60234ad "Applied fix from trunk for revision: 1832662 "
------------------------------------------------------------------------
r1832662 | jleroux | 2018-06-01 09:37:27 +0200 (ven. 01 juin 2018) | 12 lignes

Fixed: Session fixation issue
(OFBIZ-10420)

Fixes a session fixation security issue discovered by a client with the security
 audit tool "IBM Security AppScan Enterprise , Version : 9.0.3.7"

Prevents the session fixation by making Tomcat generate a new jsessionId 
(ultimately put in cookie). 

Only do when really signing in to avoid unnecessary calls
Though if the client has disabled the use of cookies, then a session will be 
new on each request, not a good choice on client side!

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1832663 13f79535-47bb-0310-9956-ffa450edef68
2018-06-01 07:38:09 +00:00
Jacques Le Roux 8a40cc383f "Applied fix from trunk for revision: 1832577"
------------------------------------------------------------------------
r1832577 | zhangwei | 2018-05-31 03:20:54 +0200 (jeu. 31 mai 2018) | 1 ligne

Fixed: Incorrect data type conversion of variable serviceEndTime in CoreEvents.java
(OFBIZ-10419)

A minor fix for serviceEndTime conversion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1832659 13f79535-47bb-0310-9956-ffa450edef68
2018-06-01 06:27:03 +00:00
Jacques Le Roux df14817adf "Applied fix from trunk for revision: 1831831"
------------------------------------------------------------------------
r1831831 | jleroux | 2018-05-18 10:11:55 +0200 (ven. 18 mai 2018) | 11 lignes

Fixed:: Dynamic values not rendering properly in property tag of fail-property 
attribute
(OFBIZ-10406)

While calling checkProductRelatedPermission, if permission is failed ten 
fail-property tag uses ${checkActionLabel} which is not handled properly in 
MessageElement.java.
There are 2-3 other occurrences as well of such type but not in working 
condition.

Thanks: Suraj
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831832 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 08:13:40 +00:00
Gil Portenseigne 44e48e5824 Fixed : change OFBiz always log level to OFF log4j level, instead of using FATAL log4j level
(OFBIZ-6206)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831789 13f79535-47bb-0310-9956-ffa450edef68
2018-05-17 15:03:51 +00:00
Deepak Dixit 8f8628effe Applied fix from trunk for revision: 1831608
===

Fixed: Wrong permission action leads to error
(OFBIZ-10405)
Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831609 13f79535-47bb-0310-9956-ffa450edef68
2018-05-15 06:21:47 +00:00
Jacques Le Roux 3e6c7b40eb "Applied fix from trunk for revision: 1831234 "
------------------------------------------------------------------------
r1831234 | jleroux | 2018-05-09 10:26:44 +0200 (mer. 09 mai 2018) | 4 lignes

Fixed: Sending mail button from viewProfile doesn't work
(OFBIZ-7075)

There was a quote error in the Montalbano Florian's patch, this fix it
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831236 13f79535-47bb-0310-9956-ffa450edef68
2018-05-09 08:27:59 +00:00
Rishi Solanki 22c6ec51ad Fixed: Existing BILLING_LOCATION record of party should expire while creating a new one. Now service will first expires all the billing location against party and create new one. Applied fix from trunk revision 1831183.
(OFBIZ-10374)
Thank you Suraj Khuran for reporting the issue and providing patch for the same.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831185 13f79535-47bb-0310-9956-ffa450edef68
2018-05-08 13:36:37 +00:00
Jacques Le Roux 240eea1adf "Applied fix from trunk for revision: 1831078"
------------------------------------------------------------------------
r1831078 | jleroux | 2018-05-07 09:48:57 +0200 (lun. 07 mai 2018) | 6 lignes

Fixed: The "request" attribute type of the userLogin service is wrong
(OFBIZ-10304)

Now that we use Tomcat 9 this problem is over

Thanks: Jacopo for upgrading to Tomcat 9 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831080 13f79535-47bb-0310-9956-ffa450edef68
2018-05-07 08:27:05 +00:00
Jacopo Cappellato 9f94f97b03 Applied fix from trunk for revision: 1831074
===

Implemented: Upgraded to latest Tomcat (9.0.7).
(OFBIZ-10036)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1831076 13f79535-47bb-0310-9956-ffa450edef68
2018-05-07 07:24:53 +00:00
Deepak Dixit d81197e3be Applied fix from trunk for revision: 1830936
===

Fixed: Fix typo 'paramters' => 'parameters'
(OFBIZ-10394)
Thanks Mathieu Lirzin for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1830938 13f79535-47bb-0310-9956-ffa450edef68
2018-05-04 19:35:37 +00:00
Nicolas Malin 5b347ad958 Fixed: Backport from trunk, ConfigXMLReader - Events are not executed in the order defined
(OFBIZ-10369)
The events contained in the controller configuration for first-visit, pre-post processor and before-after login are executed in arbitrary order rather than the defined order.
If we define an event configuration as follow:

    <after-login>
        <event name=keepCartUpdated type=java path=org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents invoke=keepCartUpdated/>
        <event name=restoreAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=restoreAutoSaveList/>
        <event name=saveCartToAutoSaveList type=java path=org.apache.ofbiz.order.shoppinglist.ShoppingListEvents invoke=saveCartToAutoSaveList/>
    </after-login>

We wait that OFBIz run keepCartUpdated, restoreAutoSaveList and after saveCartToAutoSaveList event but the HashMap who organise them return arbitrary order and can return saveCartToAutoSaveList, keepCartUpdated and restoreAutoSaveList. Convert the HashMap to LinkedHashMap help to keep the loaded order.

Thanks to Vikas Mayur for solve this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1830305 13f79535-47bb-0310-9956-ffa450edef68
2018-04-27 07:40:28 +00:00
Deepak Dixit eaa434b1e8 Applied fix from trunk for revision: 1829690
===

Improved: Update Currency UOM data as per iso amendment 164, 165 and 166
(OFBIZ-10364)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1829692 13f79535-47bb-0310-9956-ffa450edef68
2018-04-21 05:27:56 +00:00
Michael Brohl b083eb03d1 Applied fix from trunk for revision: 1828514
===

Improved: removed outdated, empty folders.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828515 13f79535-47bb-0310-9956-ffa450edef68
2018-04-06 12:29:43 +00:00
Michael Brohl 22861cab08 Applied fix from trunk for revision: 1828512
===

Improved: removed outdated, empty folders.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828513 13f79535-47bb-0310-9956-ffa450edef68
2018-04-06 12:22:49 +00:00
Michael Brohl 5d9464d242 Applied fix from trunk for revision: 1828424
===

Improved: removed outdated, empty folder.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828425 13f79535-47bb-0310-9956-ffa450edef68
2018-04-05 12:36:00 +00:00
Michael Brohl 3d78334bd3 Applied fix from trunk for revision: 1828346
===

Improved: removed outdated, empty folder.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828347 13f79535-47bb-0310-9956-ffa450edef68
2018-04-04 13:59:22 +00:00
Michael Brohl 338900028f Applied fix from trunk for revision: 1828316
===

Improved: removed outdated script folder.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828317 13f79535-47bb-0310-9956-ffa450edef68
2018-04-04 10:23:35 +00:00
Jacques Le Roux 33fc0fff1c "Applied fix from trunk for revision: 1828255"
------------------------------------------------------------------------
r1828255 | jleroux | 2018-04-03 18:37:09 +0200 (mar., 03 avr. 2018) | 7 lines

Fixed: Required parameters are optional for createWorkRequirementFulfillment service
(OFBIZ-8622)

As per entity def, required parameter should be  requirementId instead of 
requirementTypeId.

Thanks: Suraj for the last patch
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1828306 13f79535-47bb-0310-9956-ffa450edef68
2018-04-04 07:27:56 +00:00
Rishi Solanki 268cdab7e5 Fixed: loadCartFromOrder changes order date even when updating order items. It should only set orderDate as nowTimeStamp only if createAsNewOrder flag is true other wise it should set orderDate from existing orderHeader. Also, removed setting of redundant orderName on cart. Applied fix from trunk revision 1827827.
(OFBIZ-10301)
Thanks Suraj Khurana for reporting the issue and providing fix for the same.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827828 13f79535-47bb-0310-9956-ffa450edef68
2018-03-27 10:40:18 +00:00
Jacques Le Roux 61f2257f69 Improved: Logout do not remove autoLogin
(OFBIZ-4959)

No functional change: formatting

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827533 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 21:39:58 +00:00
Jacques Le Roux 28bc3fba9b Reverted: Token Based Authentication
(OFBIZ-9833)

Completes r1827528, I saw it but forgot to put it back: 
login.secret_key_string=Secret Key

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827532 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 21:36:33 +00:00
Jacques Le Roux 9d42de74dd Reverted: Token Based Authentication
(OFBIZ-9833)

This was a new feature committed the 2017-10-29 and has completely changed since.
It should not stay as is in R17.12



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827528 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 20:57:26 +00:00
Jacques Le Roux cf996f24a3 "Applied fix from trunk for revision: 1827441 "
------------------------------------------------------------------------
r1827441 | jleroux | 2018-03-21 21:59:49 +0100 (mer., 21 mars 2018) | 4 lines

Fixed: Token Based Authentication
(OFBIZ-9833)

Reverts change in ContextFilter.java committed with 1813679, was wrong
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827442 13f79535-47bb-0310-9956-ffa450edef68
2018-03-21 21:00:50 +00:00
Jacques Le Roux be4ad8b7ee "Applied fix from trunk for revision: 1827439 "
------------------------------------------------------------------------
r1827439 | jleroux | 2018-03-21 21:53:41 +0100 (mer., 21 mars 2018) | 5 lines

Fixed: The "request" attribute type of the userLogin service is wrong
(OFBIZ-10304)

It should have been org.apache.catalina.connector.RequestFacade"
instead of javax.servlet.http.HttpServletRequest see the Jira for details
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827440 13f79535-47bb-0310-9956-ffa450edef68
2018-03-21 20:54:36 +00:00
Jacques Le Roux 7381c43f89 "Applied fix from trunk for revision: 1826997 "
------------------------------------------------------------------------
r1826997 | jleroux | 2018-03-16 16:39:18 +0100 (ven., 16 mars 2018) | 7 lines

Fixed: The server hour normally shown in the jobs list is no longer showing
(OFBIZ-10278)

With FTL formatting in OFBIZ-7636, the commented single line got broken into 3 
lines making it an invalid js code.

Thanks: Aditya
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1827000 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 15:45:00 +00:00
Jacques Le Roux 1c7ef515a6 "Applied fix from trunk for revision: 1826938 "
------------------------------------------------------------------------
r1826938 | jleroux | 2018-03-16 10:35:06 +0100 (ven., 16 mars 2018) | 12 lines

Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

I used the only available (and I must say confusing) WebappInfo.getName() when
I needed the webAppName not the WebappInfoName. So this put in a new 
WebappInfo.getMountPoint() and use it in getWebappInfo

Also use LoginWorker.autoLoginSet() in different places where I missed it. In 
other words all autoUserLogin coockies are deleted on login and logout, and
an autoUserLogin cookie is created when going locally from a webapp to another,
with checkExternalLoginKey

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826939 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 09:36:18 +00:00
Michael Brohl db6c508d0a Applied fix from trunk for revision: 1826805
===

Fixed: Removing Birt dependencies in ReportScreens.xml.
(OFBIZ-10283)

Thanks Dennis Balkir for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826806 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 12:32:32 +00:00
Jacques Le Roux c247b795d1 "Applied fix from trunk for revision: 1826797"
------------------------------------------------------------------------
r1826797 | jleroux | Thu Mar 15 11:29:59 2018 | 5 lines

Fixed: The getJSONuiLabel javascript function is no longer working
(OFBIZ-10277)

The data were well retrieve, but the syntax used to extract them was not working
 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826798 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 11:33:59 +00:00
Michael Brohl 08b6dea931 Fixed: Theme screens do not load properly
(OFBIZ-10276)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826681 13f79535-47bb-0310-9956-ffa450edef68
2018-03-13 20:33:28 +00:00
Michael Brohl e697cde814 Applied fix from trunk for revision: 1826674
===

Fixed: EmailServices.sendMailFromScreen attachment rendering broken.
(OFBIZ-10246)

Thanks Martin for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826675 13f79535-47bb-0310-9956-ffa450edef68
2018-03-13 19:47:09 +00:00
Michael Brohl de532baccd Applied fix from trunk for revision: 1826671
===

Fixed: Wrong locale/fallbackLocale logic in CategoryContentWrapper leads 
to unavailable alternate locale content.
(OFBIZ-10274)

Thanks Martin Becker for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826673 13f79535-47bb-0310-9956-ffa450edef68
2018-03-13 19:39:33 +00:00
Michael Brohl 9ff8084577 Applied fix from trunk for revision: 1826592
===

Fixed: UtilCodec URL decoding breaks values with german umlauts.
(OFBIZ-10275)

Thanks Martin Becker for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826594 13f79535-47bb-0310-9956-ffa450edef68
2018-03-12 21:45:38 +00:00
Deepak Dixit b369039080 Applied fix from trunk for revision: 1826502
===

Improved: Update postgres datasource name in entityengine file for consistency
OFBIZ-10273



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826503 13f79535-47bb-0310-9956-ffa450edef68
2018-03-12 06:41:16 +00:00
Michael Brohl 24801b533e Applied fix from trunk for revision: 1826374
===

Improved: Pass JVM options to OFBiz when using Gradle.
(OFBIZ-10253)

This enables passing JVM options like memory, garbage collection or JMX
configurations to the OFBiz VM. Falls back to the previously hard coded
default if not set.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1826377 13f79535-47bb-0310-9956-ffa450edef68
2018-03-09 20:53:14 +00:00
Gil Portenseigne 93ab772386 Applied fix from trunk for revision: 1825450
===

Fixed: Error in service definition for deleteOrderHeaderWorkEffort
(OFBIZ-10243)

Thanks Pierre Gaudin for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825451 13f79535-47bb-0310-9956-ffa450edef68
2018-02-27 13:58:19 +00:00
Gil Portenseigne a128eab035 Applied fix from trunk for revision: 1825444
===

Fixed: French typo fix
(OFBIZ-10244)

Thanks Pierre Gaudin for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825447 13f79535-47bb-0310-9956-ffa450edef68
2018-02-27 13:36:30 +00:00
Arun Patidar cff199183c Applied fix from trunk for revision: 1825233
===

Fixed: Incorrect Party profile view redirection in SFA due to missing roleType.
(OFBIZ-10121)
Thanks Ankit Joshi for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825234 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 12:42:30 +00:00
Arun Patidar ff3653ed11 Applied fix from trunk for revision: 1825216
===

Improved:Update regex used for validating credit cards.
(OFBIZ-9761)
Thanks Amit Gadaley for your contribution and Michael Brohl for reviewing patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825217 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 11:33:31 +00:00
Deepak Dixit a4d80a95e0 Applied fix from trunk for revision: 1825211
===

Fixed: Found element binding issue related to lookup work done at r#1825205
(OFBIZ-10012)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825212 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 10:57:33 +00:00
Deepak Dixit dbcb375a61 Fixed: Alert message : Developer: for lookups to work you must provide a form name! appears when try to select contentId from Lookup.
(OFBIZ-10012)
Applied slightly modified patch
Thanks  Sonal for reporting and Aditya Sharma for providing patch for the issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825210 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 10:48:51 +00:00
Arun Patidar bc0b95c889 Applied fix from trunk for revision: 1825192
===

Fixed: Survey response data lost on loadCartFromOrder service. (OFBIZ-10232)
Thanks Suraj Khurana for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1825193 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 07:54:20 +00:00
Jacques Le Roux 007d5a08d9 "Applied fix from trunk for revision: 1824855"
------------------------------------------------------------------------
r1824855 | jleroux | 2018-02-20 12:59:07 +0100 (mar., 20 févr. 2018) | 7 lines

Reverted: Secure the login.secret_key_string
(OFBIZ-9966)

I forgot to revert this part; I guess got conflict issues and then forgot.

I'll also revert in R16 and R17 and close as won't fix, I gave my arguments
that's enough for me.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824856 13f79535-47bb-0310-9956-ffa450edef68
2018-02-20 12:00:03 +00:00
Jacques Le Roux ff93d6f84d "Applied fix from trunk for revision: 1824847"
------------------------------------------------------------------------
r1824847 | jleroux | 2018-02-20 12:04:15 +0100 (mar., 20 févr. 2018) | 6 lines

Fixed:Access the online help in Rainbow themes
(OFBIZ-10222)

The help icon did not render well on IE11. It's now OK on all major browsers

Thanks: Julien for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824848 13f79535-47bb-0310-9956-ffa450edef68
2018-02-20 11:06:09 +00:00
Jacques Le Roux d0735d2181 "Applied fix from trunk for revision: 1824803 "
------------------------------------------------------------------------
r1824803 | jleroux | 2018-02-19 20:23:36 +0100 (lun., 19 févr. 2018) | 18 lines

Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824804 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:24:14 +00:00
Paul Foxworthy 904bf98788 Applied fix from trunk for revision: 1824740 === Fixed: The invoiceTaxTotal value is missing from createAcctgTransForPurchaseInvoice service (OFBIZ-6330)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824743 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 11:58:56 +00:00
Jacques Le Roux 6d9e9e5161 "Applied fix from trunk for revision: 1824732"
------------------------------------------------------------------------
r1824732 | jleroux | 2018-02-19 11:49:25 +0100 (lun., 19 févr. 2018) | 6 lines

Fixed:Access the online help in Rainbow themes
(OFBIZ-10222)

As reported by Dmitriy Tsyganok on GitHub we missed the Help Icon

Thanks: Dmitriy Tsyganok 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824733 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 10:50:13 +00:00
Jacques Le Roux 685890eb61 "Applied fix from trunk for revision: 1824314"
------------------------------------------------------------------------
r1824314 | jnicolas | 2018-02-15 15:31:21 +0100 (jeu., 15 févr. 2018) | 3 lines

Fixed:Access the online help in Rainbow themes
(OFBIZ-10222)
Thanks to Jacques LEROUX to find this missing button
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824319 13f79535-47bb-0310-9956-ffa450edef68
2018-02-15 14:52:38 +00:00
Jacques Le Roux 07c205da74 "Applied fix from trunk for revision: 1824316 "
------------------------------------------------------------------------
r1824316 | jleroux | 2018-02-15 15:38:51 +0100 (jeu., 15 févr. 2018) | 7 lines

Improved: Use Tomcat default ciphers
(OFBIZ-10223)

Tomcat provides a default ciphers definition better to use it and let Tomcat 
handles that for us, we know Tomcat security is strong

Thanks: Paul Foxworthy for the help understanding the syntax :)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824317 13f79535-47bb-0310-9956-ffa450edef68
2018-02-15 14:39:49 +00:00
Jacques Le Roux 54ae17d54f "Applied fix from trunk for revision: 1824260 "
------------------------------------------------------------------------
r1824260 | jleroux | 2018-02-14 17:40:19 +0100 (mer., 14 févr. 2018) | 1 line

Improved: Token Based Authentication
(OFBIZ-9833)

No functional change, removes TODOs that I recently 
(1 week ago in r1823324) put to myself to quickly check. 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1824261 13f79535-47bb-0310-9956-ffa450edef68
2018-02-14 16:40:45 +00:00
Jacques Le Roux 45f5c24ed0 "Applied fix from trunk for revision: 1823876"
------------------------------------------------------------------------
r1823876 | jleroux | 2018-02-11 19:51:07 +0100 (dim., 11 févr. 2018) | 9 lines

Fixed: UtilNumber.getBigDecimalRoundingMode() returns a wrong value
(OFBIZ-10218)

While working on OFBIZ-9571 I found that getBigDecimalRoundingMode() returns  
DEFAULT_BD_SCALE when the passed value for the file parameter is emtpy. 
This has certainly be C/P from getBigDecimalScale() and never found before.

While at it I refactored a bit getBigDecimalRoundingMode()  and 
getBigDecimalScale() 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823877 13f79535-47bb-0310-9956-ffa450edef68
2018-02-11 18:51:37 +00:00
Jacques Le Roux bfff6c8922 "Applied fix from trunk for revision: 1823562"
------------------------------------------------------------------------
r1823562 | jleroux | 2018-02-08 16:01:54 +0100 (jeu., 08 févr. 2018) | 1 line

Completed: Security issue in Token Based Authentication
(OFBIZ-10206)

No functional change, just better syntax
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823563 13f79535-47bb-0310-9956-ffa450edef68
2018-02-08 15:04:24 +00:00
Jacques Le Roux baee9bb1ca "Applied fix from trunk for revision: 1823467"
------------------------------------------------------------------------
r1823467 | jleroux | 2018-02-07 15:17:51 +0100 (mer., 07 févr. 2018) | 7 lines

Completed:: Security issue in Token Based Authentication
(OFBIZ-10206)

Updates the security.properties content related to JWT
 Refers to the last up to date external-server-test-example.patch at OFBIZ-10206
 Makes demo-trunk.ofbiz.apache.org default external-server-name so that anybody
 can try the feature from own machine. The use-external-server=Y was already set
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823469 13f79535-47bb-0310-9956-ffa450edef68
2018-02-07 14:20:49 +00:00
Jacques Le Roux 10ba1cb803 "Applied fix from trunk for revision: 1823324 "
------------------------------------------------------------------------
r1823324 | jleroux | 2018-02-06 14:17:57 +0100 (mar., 06 févr. 2018) | 26 lines

Fixed: Security issue in Token Based Authentication
(OFBIZ-10206)

The version I committed so far in OFBIZ-9833 has a small security issue.
See the Jira description for all details

To test I have attached a OFBIZ-10206-external-server-test-example.patch to 
the Jira

This removes the external-server-query property now useless

In  ContextFilter the getHeader (wrapper) now uses an autoLoginCookie to get 
the userLoginId passed in the JWT instead of externalServerUserLogin parameter.
A sourceServerWebappName parameter must be passed from the client request to
allow reading the autoLoginCookie.

This userLoginId is then retrieved on the target server from the JWT in the 
externalServerLoginCheck which is simplified.

In LoginWorker
  getAutoLoginCookieName() has now 2 versions to allow to pass a webappname

  A new autoLogoutFromAllBackendSessions() method has been added but for now 
  commented out. Decommenting it out will be submitted as a patch in OFBIZ-4959.

Thanks: Leila Mekika for reporting the security issue directly to me
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823325 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 13:21:34 +00:00
Jacques Le Roux 9968581f08 "Applied fix from trunk for revision: 1822882"
------------------------------------------------------------------------
r1822882 | jleroux | 2018-02-01 16:27:17 +0100 (jeu., 01 févr. 2018) | 7 lines

Improved: Token Based Authentication
(OFBIZ-9833)

I just thought that for security it's best to have both the source and 
target server using the use-external-server property.

Also default to N when requesting this property
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823316 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 12:18:15 +00:00
Jacques Le Roux 369dd2b1e5 "Applied fix from trunk for revision: 1821600"
------------------------------------------------------------------------
r1821600 | jleroux | 2018-01-19 09:39:05 +0100 (ven., 19 janv. 2018) | 11 lines

Improved: Token Based Authentication
(OFBIZ-9833)

No functional change

As reported by Jinghai on dev ML we should better use "Authorization" than
 "Authorisation" when retrieving the JWT token, even if both are accepted
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
Also improves the comment on token ttl

Thanks: Jinghai for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823311 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 12:12:55 +00:00
Arun Patidar 75547c972b Applied fix from trunk for revision: 1822393
===

Improved: Completed Service Order Items are being allowed to be received along with finished goods over Approved PO. (OFBIZ-7183)
Thanks Ankush Upadhyay and Swapnil Shah for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822394 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 11:45:26 +00:00
Arun Patidar 6dfac86887 Applied fix from trunk for revision: 1822377
===



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822387 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 10:42:24 +00:00
Jacques Le Roux c6918b670e "Applied fix from trunk for revision: 1822383"
------------------------------------------------------------------------
r1822383 | jleroux | 2018-01-27 11:27:31 +0100 (sam., 27 janv. 2018) | 7 lines

Fixed: EntitySaxReader mostly-insert (store after create-error) Fix
(OFBIZ-1032)

This changes the label for more clarity. Actually there is not only inserts but
no replacements. Because you can also create and delete. This has been defined
after this label was created with OFBIZ-4949. So we have EntitySaxReader Action
enum and it's used in this this context.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822384 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 10:27:58 +00:00
Rishi Solanki 052c47ec8b Fixed: Add/Modify Calender Event Screen is Broken. The issue was due to screen expect the list and script is fetching single value. Change from queryFirst to queryList in the script. Applied fix from trunk revision 1822375.
(OFBIZ-10173)
Thanks Ratnesh Upadhyay for reporting the issue.
Thanks Yogesh Noaroliya for providing fix for the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822376 13f79535-47bb-0310-9956-ffa450edef68
2018-01-27 08:40:47 +00:00
Jacques Le Roux d8e24334e9 "Applied fix from trunk for revision: 1822310 "
------------------------------------------------------------------------
r1822310 | jleroux | 2018-01-26 16:13:42 +0100 (ven., 26 janv. 2018) | 29 lines

Fixed: EntitySaxReader mostly-insert (store after create-error) Fix
(OFBIZ-1032)

Karl:
Avoids rollback on create error to be able to store the entity instead 
(previous mostly-inserts feature).

Matin:
I think, the data load with "mostly inserts" activated should fail on a 
create-failure (what it does indeed already), so I see no need for a working 
solution of a fallback store attempt. Consistently the Feature should be renamed 
in the frontend from "mostly inserts" to "only inserts".

Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified 
classname of org.xml.sax.SAXException in method signatures to the simple name.

This incorperates the changes that Martin has mentioned above. 
The unnecessary call to store() is removed, simplifying the process of creating 
and deleting entities. (These changes were already in Martins old patch but had 
the wrong format.) This means that the flag "mostly Inserts?" is not accurately 
worded since as long as there is only create fail, all operations are rolled 
back. So the second patch renames the flag and all appropriate parameters to 
"onlyInserts". 

jleroux: I made few no functional changes, apart not swallowing an exception

Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to 
complete the whole with a final touch and help to quickly test
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822311 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:14:54 +00:00
Deepak Dixit 14b5abd4bd Applied fix from trunk for revision: 1822125
===

Improved:Removed unused import.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1822128 13f79535-47bb-0310-9956-ffa450edef68
2018-01-24 17:29:55 +00:00
Jacques Le Roux 04cc94f28d "Applied fix from trunk for revision: 1821965 "
------------------------------------------------------------------------
r1821965 | jleroux | 2018-01-23 09:34:04 +0100 (mar., 23 janv. 2018) | 6 lines

Fixed: Rainbow theme: bug in avatar.ftl when the last name does not exist
(OFBIZ-10177)

Both 1st and last names must be present else it's confusing and better to show 
the username

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821966 13f79535-47bb-0310-9956-ffa450edef68
2018-01-23 08:36:01 +00:00
Deepak Dixit 897ff1f508 Applied fix from trunk for revision: 1821628
===

Fixed: GeoAssoc data is missing for Telangana state of India (OFBIZ-10172)
Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821634 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 12:24:34 +00:00
Jacques Le Roux c4d188f83b "Applied fix from trunk for revision: 1821613 "
------------------------------------------------------------------------
r1821613 | jleroux | 2018-01-19 11:33:05 +0100 (ven., 19 janv. 2018) | 15 lines

Fixed: Not able to add the requirement,broken screen with the error message in 
workeffort component
(OFBIZ-10122)

Steps to regenerate:
1) Open URL https://demo-trunk.ofbiz.apache.org/sfa/control/Events
2) Click on the event created.
3) To add the requirements of events, click on the "Requirements" button.
4) Add the existing requirement Id or add a new requirement. Click on Save.

Actual: Not able to add the requirement. Broken screen with the error message.

Note: Refer the screenshot attached. 

Thanks: Rubia Elza Joshep for report and Yogesh Naroliya for the patch
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821615 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 10:34:38 +00:00
Jacques Le Roux fead503827 "Applied fix from trunk for revision: 1821386"
------------------------------------------------------------------------
r1821386 | jleroux | 2018-01-17 16:28:51 +0100 (mer., 17 janv. 2018) | 9 lines

Improved: Make xssi prefix configurable
(OFBIZ-9169)

In OFBIZ-5409 a prefix was added for GET ajax requests.
It would be beneficial if the prefix could be configured instead of hard coded

jleroux: at r1777942 I missed the general.properties change

Thanks: Michael Brohl for reporting the issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821387 13f79535-47bb-0310-9956-ffa450edef68
2018-01-17 15:30:07 +00:00
Jacques Le Roux 7fb2e126f5 "Applied fix from trunk for revision: 1821230"
------------------------------------------------------------------------
r1821230 | jleroux | 2018-01-16 12:02:17 +0100 (mar., 16 janv. 2018) | 9 lines

Fixed: Fix the HttpServletRequestWrapper in ContextFilter.doFilter()
(OFBIZ-10167)

As reported by Deepak on dev ML the returned name should be a parameter and not 
enforced to "Authorisation"

This removes a wrong comment (no functional change)

Thanks: Deepak for bug report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821231 13f79535-47bb-0310-9956-ffa450edef68
2018-01-16 11:03:42 +00:00
Jacques Le Roux 57ec71a008 "Applied fix from trunk for revision: 1821226"
------------------------------------------------------------------------
r1821226 | jleroux | 2018-01-16 11:25:41 +0100 (mar., 16 janv. 2018) | 1 line

Fixed: Fix the HttpServletRequestWrapper in ContextFilter.doFilter()
(OFBIZ-10167)

As reported by Deepak on dev ML the returned name should be a parameter and not 
enforced to "Authorisation"

Thanks: Deepak for bug report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821229 13f79535-47bb-0310-9956-ffa450edef68
2018-01-16 10:56:09 +00:00
Jacques Le Roux eab9d75122 "Applied fix from trunk for revision: 1821219 "
------------------------------------------------------------------------
r1821219 | jleroux | 2018-01-16 08:58:49 +0100 (mar., 16 janv. 2018) | 8 lines

Improved: Update Geo information according to ISO notifications, Mali
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15836 and INFRA-15842,
so will be backported

Thanks: Kyra Pritzel-Hentley 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821220 13f79535-47bb-0310-9956-ffa450edef68
2018-01-16 07:59:33 +00:00
Jacques Le Roux dd4272ed15 "Applied fix from trunk for revision: 1821186 "
------------------------------------------------------------------------
r1821186 | jleroux | 2018-01-15 18:47:05 +0100 (lun., 15 janv. 2018) | 9 lines

Improved: Update Geo information according to ISO notifications, Moldova 
(the Republic of)/
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15836, so will be backported

Thanks: Kyra Pritzel-Hentley 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821187 13f79535-47bb-0310-9956-ffa450edef68
2018-01-15 17:47:56 +00:00
Jacques Le Roux 0e1f1ccae8 "Applied fix from trunk for revision: 1821144"
------------------------------------------------------------------------
r1821144 | jleroux | 2018-01-15 11:45:33 +0100 (lun., 15 janv. 2018) | 9 lines

Improved: Update Geo information according to ISO notifications, Lao People's 
Democratic Republic (the)
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15836, so will be backported

Thanks: Kyra Pritzel-Hentley 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821149 13f79535-47bb-0310-9956-ffa450edef68
2018-01-15 12:30:14 +00:00
Jacques Le Roux 784a9a6d64 "Applied fix from trunk for revision: 1821115 "
------------------------------------------------------------------------
r1821115 | jleroux | 2018-01-14 19:43:49 +0100 (dim., 14 janv. 2018) | 16 lines

Fixed: Error on updating sub content of CMS webSIte
(OFBIZ-10096)

Steps to reproduce:
Get to 
https://demo-trunk.ofbiz.apache.org/content/control/WebSiteCms?webSiteId=CmsSite
4. From WebSIteNav, click on Cms Site Demo Home page
Edit content in editor and click save button (available in editor)
It gives error:
The Following Errors Occurred:
The following required parameter is missing: 
  [IN] [updateContentAssoc.contentIdTo]

jleroux: the elrte internal button works but not the widget Save button

Thanks: Aditya
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821116 13f79535-47bb-0310-9956-ffa450edef68
2018-01-14 18:44:38 +00:00
Jacques Le Roux b23b164e56 "Applied fix from trunk for revision: 1821112"
------------------------------------------------------------------------
r1821112 | jleroux | 2018-01-14 19:23:57 +0100 (dim., 14 janv. 2018) | 9 lines

Improved: Update Geo information according to ISO notifications, Korea 
(the Democratic People's Republic of)
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15836, so will be backported

Thanks: Kyra Pritzel-Hentley 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821113 13f79535-47bb-0310-9956-ffa450edef68
2018-01-14 18:24:16 +00:00
Jacques Le Roux ce7094e6e6 "Applied fix from trunk for revision: 1821036 "
------------------------------------------------------------------------
r1821036 | jleroux | 2018-01-12 22:59:22 +0100 (ven., 12 janv. 2018) | 11 lines

Fixed: streaming large content cause out of memory exception.
(OFBIZ-10133)

When ofbiz streams a large content (eg. video file), get out of memory exception.

To reproduce the issue see the Jira

jleroux: I just removed final for bufferSize, I see no needs for that local
variable

Thanks: Wai for the patch Michael for the discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821037 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 22:00:22 +00:00
Jacques Le Roux a740eb687a "Applied fix from trunk for revision: 1821012"
------------------------------------------------------------------------
r1821012 | jleroux | 2018-01-12 19:21:38 +0100 (ven., 12 janv. 2018) | 8 lines

Fixed: pagination errors in "KeywordSearch.ftl" and "ProductSearchSession.java"
(OFBIZ-10154)

To recreate the bug go to
Order->OrderEntry-> Search in the catalog for "g" -> check the amount of shown 
pages and press "Next" -> press "back" -> note how many results you now have

Thanks: Karsten Tymann
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1821013 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 18:23:22 +00:00
Jacques Le Roux 833f86a958 Improved: Clean images, among them logos, in all locations used
(OFBIZ-10128)

No functional change, but better to keep things consistent

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820995 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 14:29:51 +00:00
Jacques Le Roux 8fc89f41de Revert r1820867 from ofbiz/ofbiz-framework/branches/release17.12:
"Applied fix from trunk for revision: 1820862" 
------------------------------------------------------------------------
r1820862 | jleroux | 2018-01-11 12:05:26 +0100 (jeu., 11 janv. 2018) | 11 lines

Improved: Clean images, among them logos, in all locations used
(OFBIZ-10128)

The ofbiz_logo.png is now in theme. This is only the framework part. 
I have also made change in theme but I need to review again and perhaps create 
a patch for others to review...
Note: testUpdatePartyGroup is OK

Then I'll also rename the logo in site to use the same name before maybe
referring to svn trunk repo to use only 1 file everywhere, same for the .ico
file
------------------------------------------------------------------------

This was totally wrong and useless :/ the url is at images not themes, sorry

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820993 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 14:12:56 +00:00
Jacques Le Roux 615001dda6 "Applied fix from trunk for revision: 1820966 "
------------------------------------------------------------------------
r1820966 | jleroux | 2018-01-12 12:24:48 +0100 (ven., 12 janv. 2018) | 9 lines

Fixed: Correcting findOne() in OfbizDslDescriptorForEclipse.dsld
(OFBIZ-10159)

The method findOne() which is set in the OfbizDslDescriptorForEclipse.dsld is 
wrong, since there is no implementation for this method, which only has a String 
and a List as parameters. I changed it to the correct method, so it can be used 
within groovy properly, also I put an implementation in the GroovyBaseScriptFile

Thanks: Dennis Balkir
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820967 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 11:27:34 +00:00
Jacques Le Roux 9bd9312a23 "Applied fix from trunk for revision: 1820949"
------------------------------------------------------------------------
r1820949 | paulfoxworthy | 2018-01-12 07:50:17 +0100 (ven., 12 janv. 2018) | 8 lines

Fixed: Find Employee Position does not allow "don't care" for boolean fields (OFBIZ-10158)

In the demo app, go to https://demo-stable.ofbiz.apache.org/humanres/control/FindEmplPositions, click on New Employee Position, and toggle one of the four flags, e.g. set Temporary Flag to N.

Now on the Find screen, there is no way to find all employee positions: it insists on a Yes or No for the flags. This patch allows a blank "don't care" option.

Thanks: Larissa Zanoni at Blockfreight for discovering this issue.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820956 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 08:41:52 +00:00
Jacques Le Roux 99ef3c852d "Applied fix from trunk for revision: 1820862"
------------------------------------------------------------------------
r1820862 | jleroux | 2018-01-11 12:05:26 +0100 (jeu., 11 janv. 2018) | 11 lines

Improved: Clean images, among them logos, in all locations used
(OFBIZ-10128)

The ofbiz_logo.png is now in theme. This is only the framework part. 
I have also made change in theme but I need to review again and perhaps create 
a patch for others to review...
Note: testUpdatePartyGroup is OK

Then I'll also rename the logo in site to use the same name before maybe
referring to svn trunk repo to use only 1 file everywhere, same for the .ico
file
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820867 13f79535-47bb-0310-9956-ffa450edef68
2018-01-11 12:13:22 +00:00
Deepak Dixit 7736e3c49e Applied fix from trunk for revision: 1820823
===

Fixed: Shipping Label printing not working (OFBIZ-10153)
Added viewShipmentLabel in http-request map so that pdf will be able to print the shipping lable.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820824 13f79535-47bb-0310-9956-ffa450edef68
2018-01-11 05:51:10 +00:00
Jacques Le Roux 35129079a2 "Applied fix from trunk for revision: 1820790"
------------------------------------------------------------------------
r1820790 | jleroux | 2018-01-10 22:03:12 +0100 (mer., 10 janv. 2018) | 1 line

No functional change, this should be 8 not 12 (that I use locally)

This is mostly to run tests on BuilBot where they failed when it works locally
(on Windows!)

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820791 13f79535-47bb-0310-9956-ffa450edef68
2018-01-10 21:03:59 +00:00
Jacques Le Roux 6e0d067457 "Applied fix from trunk for revision: 1820457"
------------------------------------------------------------------------
r1820457 | jleroux | 2018-01-07 14:26:22 +0100 (dim., 07 janv. 2018) | 7 lines

Improved: ID should be the abbreviation for identity in English
(OFBIZ-100131)

Completes r1820451

Thanks: James Yong for the Jira and r1820451 commit

This is mostly to check WIP at INFRA-15394

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820762 13f79535-47bb-0310-9956-ffa450edef68
2018-01-10 16:17:57 +00:00
Jacques Le Roux 43d1953102 "Applied fix from trunk for revision: 1820658"
------------------------------------------------------------------------
r1820658 | jleroux | 2018-01-09 14:11:31 +0100 (mar., 09 janv. 2018) | 1 line

No functional change, forgot to put the license and a comment
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820740 13f79535-47bb-0310-9956-ffa450edef68
2018-01-10 11:56:45 +00:00
Jacques Le Roux cabf3d9001 "Applied fix from trunk for revision: 1820644"
------------------------------------------------------------------------
r1820644 | jleroux | 2018-01-09 12:30:39 +0100 (mar., 09 janv. 2018) | 8 lines

Improved: Update Geo information according to ISO notifications
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

Here are China, Germany, Hungary and Indonesia

This is mostly to check WIP at INFRA-15394, INFRA-15785 and OFBIZ-10147

Thanks: Kyra Pritzel-Hentley
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820726 13f79535-47bb-0310-9956-ffa450edef68
2018-01-10 08:44:29 +00:00
Jacques Le Roux ee632a6795 "Applied fix from trunk for revision: 1820441 "
------------------------------------------------------------------------
r1820441 | jleroux | 2018-01-07 11:51:39 +0100 (dim., 07 janv. 2018) | 8 lines

Improved: Update Geo information according to ISO notifications, Ecuador
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15394, INFRA-15785 and OFBIZ-10147

Thanks: Kyra Pritzel-Hentley 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820443 13f79535-47bb-0310-9956-ffa450edef68
2018-01-07 10:52:51 +00:00
Nicolas Malin eddf38d9b2 Fixed: ProductPriceRuleCondition 'is Product' (enum:PRIP_PRODUCT_ID) don't check the virtual product (OFBIZ-10149).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820410 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 15:40:00 +00:00
Nicolas Malin 7c86e707f5 Fixed: Display the included vat amount on order item detail instead of 0 (OFBIZ-10148)
When you use a product price with included vat tax, the orderAdjustment created have an amount to 0 but amount already included with the vat.

When we display the order adjustment detail for an order item we use only amount (so 0).

Now if the orderAdjustment have an amountAlreadyIncluded not empty, we display it instead.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820404 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 14:58:39 +00:00
Jacques Le Roux 5d1a48fc10 "Applied fix from trunk for revision: 1820375 "
------------------------------------------------------------------------
r1820375 | jleroux | 2018-01-06 08:13:44 +0100 (sam., 06 janv. 2018) | 8 lines

Improved: Update Geo information according to ISO notifications, Iceland
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

This is mostly to check WIP at INFRA-15394, INFRA-15785 and OFBIZ-10147

Thanks: Kyra Pritzel-Hentley

Note: I backport this simple and harmless commit in order to test the new
ofbizBranch17Framework builder AGAIN!!!
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820402 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 14:01:12 +00:00
Jacques Le Roux 7435767b1f "Applied fix from trunk for revision: 1820374 "
------------------------------------------------------------------------
r1820374 | jleroux | 2018-01-06 07:01:15 +0100 (sam., 06 janv. 2018) | 6 lines

Improved: Update Geo information according to ISO notifications, Cyprus
(OFBIZ-10028)

This follows this discussion http://markmail.org/message/xn7f552qvtpua2uq

Thanks: Kyra Pritzel-Hentley

Note: I backport this simple and harmless commit in order to test the new
ofbizBranch17Framework builder
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820386 13f79535-47bb-0310-9956-ffa450edef68
2018-01-06 12:07:08 +00:00
Deepak Dixit ee333b9d5f Applied fix from trunk for revision: 1820262
===

Fixed: Hardcoded String in PaymentGatewayServices#processCaptureResult (OFBIZ-10143)
In this patch a hard coded String is replaced with a String variable, trailing whitespace is deleted and a small typo is fixed.
Thanks Kyra Pritzel-Hentley for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820263 13f79535-47bb-0310-9956-ffa450edef68
2018-01-05 07:08:48 +00:00
Deepak Dixit 6a3997db44 Applied fix from trunk for revision: 1820038
===

Fixed: Trailing fraction are not entertained by formatCurrency method of UtilFormatOut (OFBIZ-10142)
Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1820039 13f79535-47bb-0310-9956-ffa450edef68
2018-01-04 07:56:36 +00:00
Jacques Le Roux f85c2d66c9 "Applied fix from trunk for revision: 1819811"
------------------------------------------------------------------------
r1819811 | jleroux | 2018-01-02 13:22:17 +0100 (mar., 02 janv. 2018) | 6 lines

Fixed: Add WebSocket support in OFBiz
(OFBIZ-7073)

This was my bad at OFBIZ-7776

Thanks: Deepak for help on dev ML (good remembering)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819812 13f79535-47bb-0310-9956-ffa450edef68
2018-01-02 12:23:23 +00:00
Jacques Le Roux b6fd5f7faa "Applied fix from trunk for revision: 1819805"
------------------------------------------------------------------------
r1819805 | jleroux | 2018-01-02 13:07:51 +0100 (mar., 02 janv. 2018) | 7 lines

Improved: Make the number of initially visible applications in main menu a 
(OFBIZ-10132)

Currently the number of initially visible applications is hardcoded to 8 in 
TopAppBar.ftl

Completes r1819800 thankd to Deepak on dev ML
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819806 13f79535-47bb-0310-9956-ffa450edef68
2018-01-02 12:09:49 +00:00
Jacques Le Roux 9ffebd02bc "Applied fix from trunk for revision: 1819499"
------------------------------------------------------------------------
r1819499 | taher | 2017-12-29 18:29:52 +0100 (ven., 29 déc. 2017) | 2 lines

Fixed: apply correct RTL on tab bar items in flatgrey and rainbowstone themes

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819686 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 22:00:54 +00:00
Jacques Le Roux 271ff70f82 "Applied fix from trunk for revision: 1819598 "
------------------------------------------------------------------------
r1819598 | jleroux | 2017-12-30 14:51:20 +0100 (sam., 30 déc. 2017) | 12 lines

Fixed: Encoding issue while exporting CSV
(OFBIZ-10109)

While migrating widget.properties values in ThemeData.xml, "xml" encoder is 
added for template "screencsv" which was not persent in the properties file. 
By this, special character are not supported in CSV file.

Steps to generate: accounting/control/TrialBalance?organizationPartyId=Company
Click on Inventory Valuation report.
Export report as CSV.

Thanks: Aman Agrawal
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819599 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 13:58:36 +00:00
Rishi Solanki f3b30d7597 Fixed: Order Process Broken - Due to Missing Service Defination. Error was due to missing service defintion and checked that implementation exists for the service. So adding the service definition back.
(OFBIZ-10129)
Apllied patch from trunk revision 1819587. Thanks to Ratnesh Upadhyay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819588 13f79535-47bb-0310-9956-ffa450edef68
2017-12-30 10:34:26 +00:00
Rishi Solanki d4f62ebe10 Fixed: Unable to remove selected item from cart. Get the value for further removed item processing instead of key to fix the conversion exception coming on UI. Applied fix from trunk -r1819470.
(OFBIZ-10120)
Thanks to Yogesh Naroliya for reporting the issue and providing patch to fix the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819471 13f79535-47bb-0310-9956-ffa450edef68
2017-12-29 09:14:27 +00:00
Deepak Dixit 4c65b791a0 Improved: Updated plugins url in release17.12
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819413 13f79535-47bb-0310-9956-ffa450edef68
2017-12-28 10:11:00 +00:00
Jacopo Cappellato 69a73232b2 Created feature branch 17.12 for the ofbiz-framework.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1819407 13f79535-47bb-0310-9956-ffa450edef68
2017-12-28 09:02:17 +00:00
728 changed files with 36986 additions and 35931 deletions
+41
View File
@@ -0,0 +1,41 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files to always be normalized and converted
# to native line endings on checkout.
*.java text
*.groovy text
*.jsp text
*.ftl text
*.js text
*.sql text
*.txt text
*.properties text
*.xml text
*.xsl text
*.xsd text
*.html text
*.htm text
*.css text
*.gradle text
*.md text
Makefile text
README text
NOTICE text
LICENSE text
rc.ofbiz.* text
*.less text
*.adoc text
*.sh text
# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.tif binary
*.zip binary
*.jks binary
*.ttf binary
+11 -53
View File
@@ -186,24 +186,19 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2001-2008 The Apache Software Foundation
Copyright [yyyy] [name of copyright owner]
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=========================================================================
@@ -219,42 +214,5 @@ For details, see themes/common/webapp/common/js/plugins/date/timezones.
=========================================================================
This product bundles "Date Format 1.2.3", which is available
under the "MIT" license.
under the "MIT" license.
For details, see themes/common/webapp/common/js/plugins/date/date.format-1.2.3*
=========================================================================
This product bundles "jQuery" and "jQuery" plugins and extensions, which are available
under the "MIT" license. For details, see:
themes/common/webapp/common/js/jquery
plugins/webpos/webapp/webpos/images/js/jquery.hotkeys-0.7.9.min.js
plugins/webpos/webapp/webpos/images/js/WebPosHotkeys.js
=========================================================================
This product bundles files from the "Birt" technology platform (www.eclipse.org/birt/)
which are available under the "Eclipse Public License - v 1.0".
For details, see plugins/birt/webapp/birt/webcontent/birt/
=========================================================================
This product bundles "Webhelp for DocBook", which is available
under the "MIT" License. For details, see plugins/cmssite/template/docbook/webhelp/
=========================================================================
This product bundles "DocBook XSL Stylesheets 1.77.1", which is available
under the "MIT" license.
For details, see plugins/cmssite/template/docbook/
=========================================================================
This product bundles "Openlayers", which is available
under the "FreeBSD" license.
For details, see themes/common/webapp/images/OpenLayers-2.13.1-modified-for-CSP-.js
=========================================================================
This product bundles "Bootstrap", which is available
under the "MIT" license.
For details, see:
plugins/ecommerce/webapp/ecommerce/js
plugins/ecommerce/webapp/ecommerce/css
+1 -1
View File
@@ -1,7 +1,7 @@
Apache OFBiz
Copyright 2001-2017 The Apache Software Foundation
This product includes software developed by
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
=========================================================================
+838
View File
@@ -0,0 +1,838 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
[[apache-ofbiz]]
= Apache OFBiz®
Welcome to *Apache OFBiz*! A powerful top level Apache software project. OFBiz
is an Enterprise Resource Planning (ERP) System written in Java and houses a
large set of libraries, entities, services and features to run all aspects of
your business.
For more details about OFBiz please visit the OFBiz Documentation page:
http://ofbiz.apache.org/documentation.html[OFBiz documentation]
http://www.apache.org/licenses/LICENSE-2.0[OFBiz License]
____________________________________________________________________________________________________
_Note_: If you want to use Eclipse, read the "Setup eclipse project for OFBiz"
section to set it up.
____________________________________________________________________________________________________
_____________________________________________________________________________________________________________________________________
_Note_: If you want to use an external database like MySQL or PostgreSQL, read
the "Setup an external database" section to set it up.
_____________________________________________________________________________________________________________________________________
________________________________________________________________________________________________________________________________________
_Note_: If you want to run OFBiz without an internet connection, read the
"Running gradle tasks without an internet connection" section.
________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________
_Note_: The directory structure and repositories have changed. For more
information read the "Repository and directory structure" section.
__________________________________________________________________________________________________________________________________________
[[system-requirements]]
== System requirements
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
version 8 installed on your system (not just the JRE, but the full JDK) which
you can download from the below link. Make sure of setting the $JAVA_HOME
environment variable.
https://adoptopenjdk.net/[JDK download]
https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
[[quick-start]]
// tag::quickstart[]
== Quick start
To quickly install and fire-up OFBiz, please follow the below instructions from
the command line at the OFBiz top level directory (folder).
[[download-the-gradle-wrapper]]
=== Download the Gradle wrapper:
MS Windows: `init-gradle-wrapper`
Unix-like OS: `./gradle/init-gradle-wrapper`
[[prepare-ofbiz]]
=== Prepare OFBiz:
_________________________________________________________________________________________________________________________________________________________________________________________________________________
_Note_: Depending on your Internet connection speed it might take a long time
for this step to complete if you are using OFBiz for the first time as it needs
to download all dependencies. So please be patient!
_________________________________________________________________________________________________________________________________________________________________________________________________________________
MS Windows: `gradlew cleanAll loadAll`
Unix-like OS: `./gradlew cleanAll loadAll`
[[start-ofbiz]]
=== Start OFBiz:
MS Windows: `gradlew ofbiz`
Unix-like OS: `./gradlew ofbiz`
___________________________________________________________________________________________________
_Note_: Ignore the % progress indicator because this task does not end as long
as OFBiz is running.
___________________________________________________________________________________________________
[[visit-ofbiz-through-your-browser]]
=== Visit OFBiz through your browser:
https://localhost:8443/ordermgr[Order Back Office]
https://localhost:8443/accounting[Accounting Back Office]
https://localhost:8443/webtools[Administrator interface]
You can log in with the user *admin* and password *ofbiz*.
// end::quickstart[]
[NOTE]
In case of problems visit our link:#further-reading[Further reading section].
[[security]]
== Security
If you find a security issue, please report it to: security @ ofbiz.apache.org.
Once proper mitigations to the security issues are complete the OFBiz team will
disclose this information to the public mailing list.
You can find more information about security in OFBiz at
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure[Keeping
OFBiz secure]
[[build-system-syntax]]
== Build system syntax
All build tasks are executed using the *Gradle* build system which is embedded
in OFBiz. To execute build tasks go to OFBiz top-level directory (folder) and
execute tasks from there.
[[operating-system-syntax]]
=== Operating System Syntax
The syntax for tasks differ slightly between windows and Unix-like systems
* *Windows*: `gradlew <tasks-in-here>`
* *Unix-like*: `./gradlew <tasks-in-here>`
For the rest of this document, we will use the windows syntax, if you are on a
Unix-like system, you need to add the `./` to gradlew
[[types-of-tasks-in-gradle]]
=== Types of tasks in Gradle
There are two types of tasks designed for OFBiz in Gradle:
* *Standard tasks*: To execute general standard Gradle tasks
* *OFBiz server tasks*: To execute OFBiz startup commands. These tasks start
with one of the following words:
* *ofbiz* : standard server commands
* *ofbizDebug* : server commands running in remote debug mode
* *ofbizBackground* ; server commands running in a background forked process
Tips:
* OFBiz *server commands* require *"quoting"* the commands. For example:
`gradlew "ofbiz --help"`
* Shortcuts to task names can be used by writing the first letter of every word
in a task name. However, you cannot use the shortcut form for OFBiz server
tasks. Example: `gradlew loadAdminUserLogin -PuserLoginId=myadmin` =
`gradlew lAUL -PuserLoginId=myadmin`
* Dependent tasks can be skipped with the -x switch. Example:
`gradlew build -x test` does not run the tests within the build.
[[example-standard-tasks]]
==== Example standard tasks
`gradlew build`
`gradlew cleanAll loadAll testIntegration`
[[example-ofbiz-server-tasks]]
==== Example OFBiz server tasks
`gradlew "ofbiz --help"`
`gradlew "ofbizDebug --test"`
`gradlew "ofbizBackground --start --portoffset 10000"`
`gradlew "ofbiz --shutdown --portoffset 10000"`
`gradlew ofbiz` (default is --start)
[[example-mixed-tasks-standard-and-ofbiz-server]]
==== Example mixed tasks (standard and OFBiz server)
`gradlew cleanAll loadAll "ofbiz --start --portoffset 10000"`
[[quick-reference]]
== Quick reference
You can use the below common list of tasks as a quick reference for controlling
the system. This document uses the windows task syntax, if you are on a
Unix-like system, you need to add the `./` to gradlew i.e. `./gradlew`
[[help-tasks]]
=== Help tasks
[[list-ofbiz-server-commands]]
==== List OFBiz server commands
List all available commands to control the OFBiz server
`gradlew "ofbiz --help"`
[[list-build-tasks]]
==== List build tasks
List all available tasks from the build system
`gradlew tasks`
[[list-build-projects]]
==== List build projects
List all available projects in the build system
`gradlew projects`
[[gradle-build-system-help]]
==== Gradle build system help
Show usage and options for the Gradle build system
`gradlew --help`
[[server-command-tasks]]
=== Server command tasks
[[start-ofbiz-1]]
==== Start OFBiz
`gradlew "ofbiz --start"`
start is the default server task so this also works:
`gradlew ofbiz`
[[shutdown-ofbiz]]
==== Shutdown OFBiz
`gradlew "ofbiz --shutdown"`
[[get-ofbiz-status]]
==== Get OFBiz status
`gradlew "ofbiz --status"`
[[force-ofbiz-shutdown]]
==== Force OFBiz shutdown
Terminate all running OFBiz server instances by calling the appropriate
operating system kill command. Use this command to force OFBiz termination if
the --shutdown command does not work. Usually this is needed when in the middle
of data loading or testing in OFBiz.
Warning: Be careful in using this command as force termination might lead to
inconsistent state / data
`gradlew terminateOfbiz`
[[start-ofbiz-in-remote-debug-mode]]
==== Start OFBiz in remote debug mode
Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on
port *5005*
`gradlew "ofbizDebug --start"`
OR
`gradlew ofbizDebug`
[[start-ofbiz-on-a-different-port]]
==== Start OFBiz on a different port
Start OFBiz of the network port offsetted by the range provided in the argument
to --portoffset
`gradlew "ofbiz --start --portoffset 10000"`
[[start-ofbiz-in-the-background]]
==== Start OFBiz in the background
Start OFBiz in the background by forking it to a new process and redirecting the
output to *runtime/logs/console.log*
`gradlew "ofbizBackground --start"`
OR
`gradlew ofbizBackground`
You can also offset the port, for example:
`gradlew "ofbizBackground --start --portoffset 10000"`
[[passing-jvm-runtime-options-to-ofbiz]]
==== Passing JVM runtime options to OFBiz
You can pass JVM runtime options by specifying the project property `-PjvmArgs`.
`gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx2048M" -Dsome.parameter=hello`
If you do not specify `jvmArgs`, a default of `-Xms128M -Xmx1024M` is set.
[[data-loading-tasks]]
=== Data loading tasks
OFBiz contains the following data reader types:
* *seed*: OFBiz and External Seed Data - to be maintained along with source and
updated whenever a system deployment is updated
* *seed-initial*: OFBiz and External Seed Data - to be maintained along with
source like other seed data, but only loaded initially and not updated when a
system is updated except manually reviewing each line
* *demo*: OFBiz Only Demo Data
* *ext*: External General Data (custom)
* *ext-test*: External Test Data (custom)
* *ext-demo*: External Demo Data (custom)
* *tenant*: Data to load into the master tenants database "ofbiztenant". This
data is required to identify where a tenant's database is located. For more
information you can review the relevant
https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support[tenant
documentation]
Available options for the --load-data server command are the following:
* *readers=[name]*: only load data from certain readers separated by comma. e.g.
seed,seed-initial,ext
* *file=[path]*: load a single file from location or several files separated by
commas. e.g. /my/file/1,/my/file/2
* *dir=[path]*: load all data files found in directory
* *component=[name]*: only load data from a specific component. e.g. base
* *delegator=[name]*: use the defined delegator. Default is "default". If the
value passed is *"all-tenants"* then OFBiz will load the data for all defined
tenants in the system.
* *group=[name]*: override the entity group (org.apache.ofbiz). e.g.
com.example.something
* *timeout=[millis]*: timeout in milliseconds
* *create-pks*: create primary keys
* *drop-pks*: drop primary keys
* *create-constraints*: create indexes and foreign keys after loading
* *drop-constraints*: drop indexes and foreign keys before loading
* *create-fks*: create dummy (placeholder) foreign keys
* *maintain-txs*: maintain timestamps in data file
* *try-inserts*: use mostly inserts
* *repair-columns*: repair column sizes (default is true w/ drop-constraints)
* *continue-on-failure*: By default OFBiz will fail and stop if it is unable to
load any of the files it is attempting to load. By passing this property OFBiz
will ignore failures and continue loading all files
[[load-specific-ofbiz-data]]
==== Load specific OFBiz data
you can choose which data readers to pass in the following syntax:
`gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"`
Example:
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"`
Beware that copying this command in Microsoft Word will automatically transform
the double dash in en dashes (Unicode 0x2013: –) Other cases not related to Word
were also reported.So when this command does not work check that you are using
dash! text
[[load-all-ofbiz-data]]
==== Load all OFBiz data
Loads all data sets; meant for initial loading of generic OFBiz data. Can be
applied for development, testing, demonstration, etc. purposes. Be aware that
executing this task can result in your data being overwritten in your database
of choice. Use with caution in production environments.
`gradlew loadAll`
OR
`gradlew "ofbiz --load-data"`
[[load-seed-data]]
==== Load seed data
Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant
for use after an update of the code to reload the seed data as it is generally
maintained along with the code and needs to be in sync for operation
`gradlew "ofbiz --load-data readers=seed"`
[[load-ext-data]]
==== load ext data
Load seed, seed-initial and ext data; meant for manual/generic testing,
development, or going into production with a derived system based on stock OFBiz
where the ext data basically replaces the demo data
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext"`
[[load-ext-test-data]]
==== load ext test data
Load seed, seed-initial, ext and ext-test data; meant for automated testing with
a derived system based on stock OFBiz
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"`
[[load-data-from-an-entity-file]]
==== load data from an entity file
Load data from an XML file holding entity data.
`gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"`
[[create-a-new-tenant]]
==== create a new tenant
Create a new tenant in your environment, create the delegator, load initial data
with admin-user and password (needs multitenant=Y in general.properties). The
following project parameters are passed:
* tenantId: mandatory
* tenantName: optional, default is value of tenantId
* domainName: optional, default is org.apache.ofbiz
* tenantReaders: optional, default value is seed,seed-initial,demo
* dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
* dbIp: optional, ip address of the database
* dbUser: optional, username of the database
* dbPassword: optional, password of the database
`gradlew createTenant -PtenantId=mytenant`
`gradlew createTenant -PtenantId=mytenant -PtenantName="My Name" -PdomainName=com.example -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M -PdbIp=127.0.0.1 -PdbUser=mydbuser -PdbPassword=mydbpass`
If run successfully, the system creates a new tenant having:
* delegator: default#$\{tenandId} (e.g. default#mytenant)
* admin user: $\{tenantId}-admin (e.g. mytenant-admin)
* admin user password: ofbiz
[[load-data-for-a-specific-tenant]]
==== load data for a specific tenant
Load data for one specific tenant in a multitenant environment. Note that you
must set multitenant=Y in general.properties and the following project
parameters are passed:
* tenantId (mandatory)
* tenantReaders (optional)
* tenantComponent (optional)
`gradlew loadTenant -PtenantId=mytenant`
`gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base`
[[testing-tasks]]
=== Testing tasks
[[execute-all-unit-tests]]
==== Execute all unit tests
`gradlew test`
[[execute-all-integration-tests]]
==== Execute all integration tests
`gradlew testIntegration`
OR
`gradlew 'ofbiz --test'`
[[execute-integration-tests-with-a-different-log-level]]
==== Execute integration tests with a different log level
It is possible to start integration tests with a log level different from the
default one. The log levels allowed are listed below from most verbose to least
verbose:
* always
* verbose
* timing
* info
* important
* warning
* error
* fatal
`gradlew "ofbiz --test loglevel=fatal"`
[[execute-an-integration-test-case]]
==== Execute an integration test case
run a test case, in this example the component is "entity" and the case name is
"entity-tests"
`gradlew "ofbiz --test component=entity --test suitename=entitytests --test case=entity-query-tests"`
[[execute-an-integration-test-case-in-debug-mode-with-verbose-log]]
==== Execute an integration test case in debug mode with verbose log
listens on port *5005*
`gradlew "ofbizDebug --test component=entity --test loglevel=verbose"`
[[execute-an-integration-test-suite]]
==== Execute an integration test suite
`gradlew "ofbiz --test component=entity --test suitename=entitytests"`
[[execute-an-integration-test-suite-in-debug-mode]]
==== Execute an integration test suite in debug mode
listens on port *5005*
`gradlew "ofbizDebug --test component=entity --test suitename=entitytests"`
[[miscellaneous-tasks]]
=== Miscellaneous tasks
[[run-all-tests-on-a-clean-system]]
==== Run all tests on a clean system
`gradlew cleanAll loadAll testIntegration`
[[clean-all-generated-artifacts]]
==== Clean all generated artifacts
`gradlew cleanAll`
[[refresh-the-generated-artifacts]]
==== Refresh the generated artifacts
`gradlew clean build`
[[create-an-admin-user-account]]
==== Create an admin user account
Create an admin user with login name MyUserName and default password with value
"ofbiz". Upon first login OFBiz will request changing the default password
`gradlew loadAdminUserLogin -PuserLoginId=MyUserName`
[[compile-java-using-xlint-output]]
==== Compile Java using Xlint output
Xlint prints output of all warnings detected by the compiler
`gradlew -PXlint build`
[[run-owasp-tool-to-identify-dependency-vulnerabilities-cves]]
==== Run OWASP tool to identify dependency vulnerabilities (CVEs)
The below command activates a gradle plugin (OWASP) and Identifies and reports
known vulnerabilities (CVEs) in OFBiz library dependencies. The task takes time
to complete, and once done, a report will be generated in
$OFBIZ_HOME/build/reports/dependency-check-report.html
`gradlew -PenableOwasp dependencyCheckAnalyze`
[[setup-eclipse-project-for-ofbiz]]
==== Setup eclipse project for OFBiz
Setting up OFBiz on eclipse is done by simply running the below command and then
importing the project to eclipse. This command will generate the necessary
*.classpath* and *.project* files for eclipse and it will also make the source
code for external libraries available in eclipse (i.e. you can view source
through Ctrl + Click)
The first time you run this command it will take a long time to execute because
it will download source packages available for project dependencies.
`gradlew eclipse`
[[ofbiz-plugin-system]]
== OFBiz plugin system
OFBiz provides an extension mechanism through plugins. Plugins are standard
OFBiz components that reside in the plugins directory. Plugins can be added
manually or fetched from a maven repository. The standard tasks for managing
plugins are listed below.
__________________________________________________________________________________
_Note_: OFBiz plugin versions follow http://semver.org/[Semantic Versioning
2.0.0]
__________________________________________________________________________________
[[pull-download-and-install-a-plugin-automatically]]
=== Pull (download and install) a plugin automatically
Download a plugin with all its dependencies (plugins) and install them
one-by-one starting with the dependencies and ending with the plugin itself.
`gradlew pullPlugin -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
If the plugin resides in a custom maven repository (not jcenter or localhost)
then you can use specify the repository using below command:
`gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
If you need username and password to access the custom repository:
`gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PrepoUser=myuser -PrepoPassword=mypassword -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
[[pull-an-official-plugin-from-source-control]]
=== Pull an official plugin from source control
Download an official plugin from source control (currently subversion) and place
it in the plugins directory. In addition, this task also executes the "install"
task if it is defined for the plugin being downloaded.
This task is mostly useful when working on the trunk branch as it pulls in the
latest version of a plugin.
`gradlew pullPluginSource -PpluginId=ecommerce`
________________________________________________________________________________________
_Note_: This plugin will have its own .svn directory placed inside the plugin
directory.
________________________________________________________________________________________
[[pull-all-official-plugins-from-source-control]]
=== Pull all official plugins from source control
Download all officially supported plugins from source control (currently
subversion) and place them inclusive of their ".svn" directory in /plugins.
WARNING! This task deletes the /plugins directory and replaces it with the
official plugins.
`gradlew pullAllPluginsSource`
This task makes it easy to download and develop officially supported plugins. It
is mostly used by developers or individuals working on the trunk branch. We do
not recommend using this task on releases of OFBiz, instead consider using the
"pullPlugin" task to get the correct version of a plugin compatible with your
release.
____________________________________________________________________________________
_Note_: All the plugins will share a .svn directory placed in the plugins
directory.
____________________________________________________________________________________
[[install-a-plugin]]
=== Install a plugin
If you have a plugin called mycustomplugin and want to install it in OFBiz
follow the below instructions:
* Extract the plugin if it is compressed
* Place the extracted directory into /plugins
* Run the below command
`gradlew installPlugin -PpluginId=myplugin`
The above commands executes the task "install" in the plugin's build.gradle file
if it exists
[[uninstall-a-plugin]]
=== Uninstall a plugin
If you have an existing plugin called mycustomplugin and you wish to uninstall
run the below command
`gradlew uninstallPlugin -PpluginId=myplugin`
The above command executes the task "uninstall" in the plugin's build.gradle
file if it exists
[[remove-a-plugin]]
=== Remove a plugin
Calls *uninstallPlugin* on an existing plugin and then delete it from the
file-system
`gradlew removePlugin -PpluginId=myplugin`
[[create-a-new-plugin]]
=== Create a new plugin
Create a new plugin. The following project parameters are passed:
* pluginId: mandatory
* pluginResourceName: optional, default is the Capitalized value of pluginId
* webappName: optional, default is the value of pluginId
* basePermission: optional, default is the UPPERCASE value of pluginId
`gradlew createPlugin -PpluginId=myplugin`
`gradlew createPlugin -PpluginId=myplugin -PpluginResourceName=MyPlugin -PwebappName=mypluginweb -PbasePermission=MYSECURITY`
The above command creates a new plugin in /plugins/myplugin
[[push-a-plugin-to-a-repository]]
=== Push a plugin to a repository
This task publishes an OFBiz plugin into a maven package and then uploads it to
a maven repository. Currently, pushing is limited to localhost maven repository
(work in progress). To push a plugin the following parameters are passed:
* pluginId: mandatory
* groupId: optional, defaults to org.apache.ofbiz.plugin
* pluginVersion: optional, defaults to 0.1.0-SNAPSHOT
* pluginDescription: optional, defaults to "Publication of OFBiz plugin
$\{pluginId}"
`gradlew pushPlugin -PpluginId=myplugin`
`gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin -PpluginVersion=1.2.3 -PpluginDescription="Introduce special functionality X"`
[[miscellaneous-documentation]]
== Miscellaneous Documentation
[[further-reading]]
=== Further reading
* https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Knownissues[Known
issues]
[[repository-and-directory-structure]]
=== Repository and directory structure
OFBiz is split into two repositories:
* *ofbiz-framework*: Contains the core framework and main applications in the
system like accounting, party, order, etc
* *ofbiz-plugins*: Renamed from "special-purpose" and contains optional
components that are officially supported by the community
Furthermore, the hot-deploy directory is removed as the plugins directory works
as a replacement for both "special-purpose" and "hot-deploy".
If you need to load the components in the plugins directory in a specific order
place a component-load.xml file in the plugins directory listing the order.
To check out a plugin from source control use the *pullPluginSource* Gradle
task. To check out all plugins from source control use the
*pullAllPluginsSource*. *Beware* this deletes a previously existing plugins
directory.
[[running-gradle-tasks-without-an-internet-connection]]
=== Running gradle tasks without an internet connection
OFBiz must run with an internet connection the *first time* it is prepared on
the system because it needs to download all the required dependencies.
After preparing OFBiz the first time correctly, it is possible to run OFBiz
without an internet connection by using the `--offline` command line switch
which tells Gradle to fetch its dependencies from the cache.
If any dependencies are missing from the cache and you pass `--offline` switch
then the build execution will fail.
[[setup-an-external-database-like-mysql-postgresql-etc]]
=== Setup an external database like MySQL, PostgreSQL, etc
To setup an external database instead of the default embedded Apache Derby, you
will need to follow the following instructions:
1. Find the JDBC driver suitable for your database using one of the following
options:
* Search for the JDBC driver in https://bintray.com/bintray/jcenter[jcenter] and
place it in build.gradle dependencies e.g.
`runtime 'mysql:mysql-connector-java:5.1.36'`
+
OR
* Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib
sub-directory of any component
2. Modify the entityengine.xml file located in
$OFBIZ_HOME/framework/entity/config to switch the default database to the one
you selected. For more details you can read the relevant section in the
https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide[technical
setup guide]
[[setup-gradle-tab-completion-on-unix-like-systems]]
=== Setup gradle tab-completion on Unix-like systems:
To get tab completion (auto complete gradle commands by pressing tab) you can
download the script from the below link and place it in the appropriate location
for your system.
https://edub.me/gradle-completion-bash[Gradle tab completion]
For example, on debian based systems, you can use the following command:
`sudo curl -L -s https://edub.me/gradle-completion-bash -o /etc/bash_completion.d/gradle-tab-completion.bash`
[[crypto-notice]]
== Crypto notice
This distribution includes cryptographic software. The country in which you
currently reside may have restrictions on the import, possession, use, and/or
re-export to another country, of encryption software. BEFORE using any
encryption software, please check your country's laws, regulations and policies
concerning the import, possession, or use, and re-export of encryption software,
to see if this is permitted. See http://www.wassenaar.org/ for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security
(BIS), has classified this software as Export Commodity Control Number (ECCN)
5D002.C.1, which includes information security software using or performing
cryptographic functions with asymmetric algorithms. The form and manner of this
Apache Software Foundation distribution makes it eligible for export under the
License Exception ENC Technology Software Unrestricted (TSU) exception (see the
BIS Export Administration Regulations, Section 740.13) for both object code and
source code.
The following provides more details on the included cryptographic software:
* Various classes in OFBiz, including DesCrypt, HashCrypt, and BlowFishCrypt use
libraries from the Sun Java JDK API including java.security.* and javax.crypto.*
(the JCE, Java Cryptography Extensions API)
* Other classes such as HttpClient and various related ones use the JSSE (Java
Secure Sockets Extension) API
-752
View File
@@ -1,752 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Apache OFBiz®
=============
Welcome to __Apache OFBiz__! A powerful top level Apache software project.
OFBiz is an Enterprise Resource Planning (ERP) System written in Java and
houses a large set of libraries, entities, services and features to run
all aspects of your business.
For more details about OFBiz please visit the OFBiz Documentation page:
[OFBiz documentation](http://ofbiz.apache.org/documentation.html)
[OFBiz License](http://www.apache.org/licenses/LICENSE-2.0)
>_Note_: If you want to use Eclipse, read the "Setup eclipse project for OFBiz"
section to set it up.
>_Note_: If you want to use an external database like MySQL or PostgreSQL, read
the "Setup an external database" section to set it up.
>_Note_: If you want to run OFBiz without an internet connection, read the
"Running gradle tasks without an internet connection" section.
>_Note_: The directory structure and repositories have changed. For more
information read the "Repository and directory structure" section.
System requirements
-------------------
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
version 8 installed on your system (not just the JRE, but the full JDK) which
you can download from the below link. Make sure of setting the $JAVA_HOME
environment variable.
[JDK download](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Quick start
-----------
To quickly install and fire-up OFBiz, please follow the below instructions
from the command line at the OFBiz top level directory (folder)
In case of problems visit our [Further reading section](#further-reading)
### Prepare OFBiz:
>_Note_: Depending on your Internet connection speed it might take a long
time for this step to complete if you are using OFBiz for the first time
as it needs to download all dependencies. So please be patient!
MS Windows:
`gradlew cleanAll loadAll`
Unix-like OS:
`./gradlew cleanAll loadAll`
### Start OFBiz:
MS Windows:
`gradlew ofbiz`
Unix-like OS:
`./gradlew ofbiz`
>_Note_: Ignore the % progress indicator because this task does not end as
long as OFBiz is running.
### Visit OFBiz through your browser:
[Order Back Office](https://localhost:8443/ordermgr)
[Accounting Back Office](https://localhost:8443/accounting)
[Administrator interface](https://localhost:8443/webtools)
You can log in with the user __admin__ and password __ofbiz__.
Security
--------
If you find a security issue, please report it to: security @ ofbiz.apache.org.
Once proper mitigations to the security issues are complete the OFBiz team will
disclose this information to the public mailing list.
You can find more information about security in OFBiz at
[Keeping OFBiz secure](https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure)
* * * * * * * * * * * *
Build system syntax
-------------------
All build tasks are executed using the __Gradle__ build system which
is embedded in OFBiz. To execute build tasks go to OFBiz top-level
directory (folder) and execute tasks from there.
### Operating System Syntax
The syntax for tasks differ slightly between windows and Unix-like systems
- __Windows__: `gradlew <tasks-in-here>`
- __Unix-like__: `./gradlew <tasks-in-here>`
For the rest of this document, we will use the windows syntax, if you are on
a Unix-like system, you need to add the `./` to gradlew
### Types of tasks in Gradle
There are two types of tasks designed for OFBiz in Gradle:
- __Standard tasks__: To execute general standard Gradle tasks
- __OFBiz server tasks__: To execute OFBiz startup commands. These
tasks start with one of the following words:
- __ofbiz__ : standard server commands
- __ofbizDebug__ : server commands running in remote debug mode
- __ofbizBackground__ ; server commands running in a background forked process
Tips:
- OFBiz __server commands__ require __"quoting"__ the
commands. For example: `gradlew "ofbiz --help"`
- Shortcuts to task names can be used by writing the
first letter of every word in a task name. However, you
cannot use the shortcut form for OFBiz server tasks.
Example: `gradlew loadAdminUserLogin -PuserLoginId=myadmin` = `gradlew lAUL -PuserLoginId=myadmin`
- Dependent tasks can be skipped with the -x switch.
Example: `gradlew build -x test` does not run the tests within the build.
#### Example standard tasks
`gradlew build`
`gradlew cleanAll loadAll testIntegration`
#### Example OFBiz server tasks
`gradlew "ofbiz --help"`
`gradlew "ofbizDebug --test"`
`gradlew "ofbizBackground --start --portoffset 10000"`
`gradlew "ofbiz --shutdown --portoffset 10000"`
`gradlew ofbiz` (default is --start)
#### Example mixed tasks (standard and OFBiz server)
`gradlew cleanAll loadAll "ofbiz --start --portoffset 10000"`
* * * * * * * * * * * *
Quick reference
---------------
You can use the below common list of tasks as a quick reference
for controlling the system. This document uses the windows task
syntax, if you are on a Unix-like system, you need to add the
`./` to gradlew i.e. `./gradlew`
* * * * * * * * * * * *
### Help tasks
#### List OFBiz server commands
List all available commands to control the OFBiz server
`gradlew "ofbiz --help"`
#### List build tasks
List all available tasks from the build system
`gradlew tasks`
#### List build projects
List all available projects in the build system
`gradlew projects`
#### Gradle build system help
Show usage and options for the Gradle build system
`gradlew --help`
* * * * * * * * * * * *
### Server command tasks
#### Start OFBiz
`gradlew "ofbiz --start"`
start is the default server task so this also works:
`gradlew ofbiz`
#### Shutdown OFBiz
`gradlew "ofbiz --shutdown"`
#### Get OFBiz status
`gradlew "ofbiz --status"`
#### Force OFBiz shutdown
Terminate all running OFBiz server instances by calling
the appropriate operating system kill command. Use this
command to force OFBiz termination if the --shutdown
command does not work. Usually this is needed when in the
middle of data loading or testing in OFBiz.
Warning: Be careful in using this command as force termination
might lead to inconsistent state / data
`gradlew terminateOfbiz`
#### Start OFBiz in remote debug mode
Starts OFBiz in remote debug mode and waits for debugger
or IDEs to connect on port __5005__
`gradlew "ofbizDebug --start"`
OR
`gradlew ofbizDebug`
#### Start OFBiz on a different port
Start OFBiz of the network port offsetted by the range
provided in the argument to --portoffset
`gradlew "ofbiz --start --portoffset 10000"`
#### Start OFBiz in the background
Start OFBiz in the background by forking it to a new
process and redirecting the output to __runtime/logs/console.log__
`gradlew "ofbizBackground --start"`
OR
`gradlew ofbizBackground`
You can also offset the port, for example:
`gradlew "ofbizBackground --start --portoffset 10000"`
* * * * * * * * * * * *
### Data loading tasks
OFBiz contains the following data reader types:
- __seed__: OFBiz and External Seed Data - to be maintained along with source and
updated whenever a system deployment is updated
- __seed-initial__: OFBiz and External Seed Data - to be maintained along with
source like other seed data, but only loaded initially and not updated
when a system is updated except manually reviewing each line
- __demo__: OFBiz Only Demo Data
- __ext__: External General Data (custom)
- __ext-test__: External Test Data (custom)
- __ext-demo__: External Demo Data (custom)
- __tenant__: Data to load into the master tenants database "ofbiztenant". This
data is required to identify where a tenant's database is located. For more
information you can review the relevant
[tenant documentation](https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support)
Available options for the --load-data server command are the following:
- **readers=[name]**: only load data from certain readers separated by comma.
e.g. seed,seed-initial,ext
- **file=[path]**: load a single file from location or several files separated
by commas. e.g. /my/file/1,/my/file/2
- **dir=[path]**: load all data files found in directory
- **component=[name]**: only load data from a specific component. e.g. base
- **delegator=[name]**: use the defined delegator. Default is "default". If the
value passed is **"all-tenants"** then OFBiz will load the data for all defined
tenants in the system.
- **group=[name]**: override the entity group (org.apache.ofbiz).
e.g. com.example.something
- **timeout=[millis]**: timeout in milliseconds
- **create-pks**: create primary keys
- **drop-pks**: drop primary keys
- **create-constraints**: create indexes and foreign keys after loading
- **drop-constraints**: drop indexes and foreign keys before loading
- **create-fks**: create dummy (placeholder) foreign keys
- **maintain-txs**: maintain timestamps in data file
- **try-inserts**: use mostly inserts
- **repair-columns**: repair column sizes
(default is true w/ drop-constraints)
- **continue-on-failure**: By default OFBiz will fail and stop if it is unable
to load any of the files it is attempting to load. By passing this property
OFBiz will ignore failures and continue loading all files
#### Load specific OFBiz data
you can choose which data readers to pass in the following syntax:
`gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"`
Example:
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"`
<span style="color:red">
Beware that copying this command in Microsoft Word will automatically transform the double dash in en dashes (Unicode 0x2013: –)
Other cases not related to Word were also reported.So when this command does not work check that you are using dash!
text</span>
#### Load all OFBiz data
Loads all data sets; meant for initial loading of generic OFBiz data.
Can be applied for development, testing, demonstration, etc. purposes.
Be aware that executing this task can result in your data being overwritten
in your database of choice. Use with caution in production environments.
`gradlew loadAll`
OR
`gradlew "ofbiz --load-data"`
#### Load seed data
Load ONLY the seed data (not seed-initial, demo, ext* or anything else);
meant for use after an update of the code to reload the seed data
as it is generally maintained along with the code and needs to be
in sync for operation
`gradlew "ofbiz --load-data readers=seed"`
#### load ext data
Load seed, seed-initial and ext data; meant for manual/generic
testing, development, or going into production with a derived
system based on stock OFBiz where the ext data basically
replaces the demo data
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext"`
#### load ext test data
Load seed, seed-initial, ext and ext-test data; meant for
automated testing with a derived system based on stock OFBiz
`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"`
#### load data from an entity file
Load data from an XML file holding entity data.
`gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"`
#### create a new tenant
Create a new tenant in your environment, create the delegator, load
initial data with admin-user and password (needs multitenant=Y in
general.properties). The following project parameters are passed:
- tenantId: mandatory
- tenantName: optional, default is value of tenantId
- domainName: optional, default is org.apache.ofbiz
- tenantReaders: optional, default value is seed,seed-initial,demo
- dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
- dbIp: optional, ip address of the database
- dbUser: optional, username of the database
- dbPassword: optional, password of the database
`gradlew createTenant -PtenantId=mytenant`
`gradlew createTenant -PtenantId=mytenant -PtenantName="My Name" -PdomainName=com.example -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M -PdbIp=127.0.0.1 -PdbUser=mydbuser -PdbPassword=mydbpass`
If run successfully, the system creates a new tenant having:
- delegator: default#${tenandId} (e.g. default#mytenant)
- admin user: ${tenantId}-admin (e.g. mytenant-admin)
- admin user password: ofbiz
#### load data for a specific tenant
Load data for one specific tenant in a multitenant environment. Note
that you must set multitenant=Y in general.properties and the
following project parameters are passed:
- tenantId (mandatory)
- tenantReaders (optional)
- tenantComponent (optional)
`gradlew loadTenant -PtenantId=mytenant`
`gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base`
* * * * * * * * * * * *
### Testing tasks
#### Execute all unit tests
`gradlew test`
#### Execute all integration tests
`gradlew testIntegration`
OR
`gradlew 'ofbiz --test'`
#### Execute integration tests with a different log level
It is possible to start integration tests with a log level different from the
default one. The log levels allowed are listed below from most verbose to
least verbose:
- always
- verbose
- timing
- info
- important
- warning
- error
- fatal
`gradlew "ofbiz --test loglevel=fatal"`
#### Execute an integration test case
run a test case, in this example the component is "entity" and the case
name is "entity-tests"
`gradlew "ofbiz --test component=entity --test suitename=entitytests --test case=entity-query-tests"`
#### Execute an integration test case in debug mode with verbose log
listens on port __5005__
`gradlew "ofbizDebug --test component=entity --test loglevel=verbose"`
#### Execute an integration test suite
`gradlew "ofbiz --test component=entity --test suitename=entitytests"`
#### Execute an integration test suite in debug mode
listens on port __5005__
`gradlew "ofbizDebug --test component=entity --test suitename=entitytests"`
* * * * * * * * * * * *
### Miscellaneous tasks
#### Run all tests on a clean system
`gradlew cleanAll loadAll testIntegration`
#### Clean all generated artifacts
`gradlew cleanAll`
#### Refresh the generated artifacts
`gradlew clean build`
#### Create an admin user account
Create an admin user with login name MyUserName and default password
with value "ofbiz". Upon first login OFBiz will request changing the
default password
`gradlew loadAdminUserLogin -PuserLoginId=MyUserName`
#### Compile Java using Xlint output
Xlint prints output of all warnings detected by the compiler
`gradlew -PXlint build`
#### Run OWASP tool to identify dependency vulnerabilities (CVEs)
The below command activates a gradle plugin (OWASP) and Identifies
and reports known vulnerabilities (CVEs) in OFBiz library dependencies.
The task takes time to complete, and once done, a report will be generated in
$OFBIZ_HOME/build/reports/dependency-check-report.html
`gradlew -PenableOwasp dependencyCheckAnalyze`
#### Setup eclipse project for OFBiz
Setting up OFBiz on eclipse is done by simply running the below command
and then importing the project to eclipse. This command will generate
the necessary __.classpath__ and __.project__ files for eclipse and it
will also make the source code for external libraries available in
eclipse (i.e. you can view source through Ctrl + Click)
The first time you run this command it will take a long time to execute
because it will download source packages available for project
dependencies.
`gradlew eclipse`
* * * * * * * * * * *
OFBiz plugin system
-------------------
OFBiz provides an extension mechanism through plugins. Plugins are standard
OFBiz components that reside in the plugins directory. Plugins can be
added manually or fetched from a maven repository. The standard tasks for
managing plugins are listed below.
>_Note_: OFBiz plugin versions follow [Semantic Versioning 2.0.0](http://semver.org/)
### Pull (download and install) a plugin automatically
Download a plugin with all its dependencies (plugins) and install them one-by-one
starting with the dependencies and ending with the plugin itself.
`gradlew pullPlugin -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
If the plugin resides in a custom maven repository (not jcenter or localhost) then
you can use specify the repository using below command:
`gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
If you need username and password to access the custom repository:
`gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PrepoUser=myuser -PrepoPassword=mypassword -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"`
### Pull an official plugin from source control
Download an official plugin from source control (currently subversion) and place
it in the plugins directory. In addition, this task also executes the "install"
task if it is defined for the plugin being downloaded.
This task is mostly useful when working on the trunk branch
as it pulls in the latest version of a plugin.
`gradlew pullPluginSource -PpluginId=ecommerce`
>_Note_: This plugin will have its own .svn directory placed inside the plugin directory.
### Pull all official plugins from source control
Download all officially supported plugins from source control (currently subversion)
and place them inclusive of their ".svn" directory in /plugins. WARNING! This task
deletes the /plugins directory and replaces it with the official plugins.
`gradlew pullAllPluginsSource`
This task makes it easy to download and develop officially supported plugins. It is
mostly used by developers or individuals working on the trunk branch. We do not
recommend using this task on releases of OFBiz, instead consider using the "pullPlugin"
task to get the correct version of a plugin compatible with your release.
>_Note_: All the plugins will share a .svn directory placed in the plugins directory.
### Install a plugin
If you have a plugin called mycustomplugin and want to install it in OFBiz follow the
below instructions:
- Extract the plugin if it is compressed
- Place the extracted directory into /plugins
- Run the below command
`gradlew installPlugin -PpluginId=myplugin`
The above commands executes the task "install" in the plugin's build.gradle
file if it exists
### Uninstall a plugin
If you have an existing plugin called mycustomplugin and you wish to uninstall
run the below command
`gradlew uninstallPlugin -PpluginId=myplugin`
The above command executes the task "uninstall" in the plugin's build.gradle
file if it exists
### Remove a plugin
Calls __uninstallPlugin__ on an existing plugin and then delete it from the file-system
`gradlew removePlugin -PpluginId=myplugin`
### Create a new plugin
Create a new plugin. The following project parameters are passed:
- pluginId: mandatory
- pluginResourceName: optional, default is the Capitalized value of pluginId
- webappName: optional, default is the value of pluginId
- basePermission: optional, default is the UPPERCASE value of pluginId
`gradlew createPlugin -PpluginId=myplugin`
`gradlew createPlugin -PpluginId=myplugin -PpluginResourceName=MyPlugin -PwebappName=mypluginweb -PbasePermission=MYSECURITY`
The above command creates a new plugin in /plugins/myplugin
### Push a plugin to a repository
This task publishes an OFBiz plugin into a maven package and then uploads it to
a maven repository. Currently, pushing is limited to localhost maven repository
(work in progress). To push a plugin the following parameters are passed:
- pluginId: mandatory
- groupId: optional, defaults to org.apache.ofbiz.plugin
- pluginVersion: optional, defaults to 0.1.0-SNAPSHOT
- pluginDescription: optional, defaults to "Publication of OFBiz plugin ${pluginId}"
`gradlew pushPlugin -PpluginId=myplugin`
`gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin -PpluginVersion=1.2.3 -PpluginDescription="Introduce special functionality X"`
* * * * * * * * * * * *
Miscellaneous Documentation
---------------------------
### Further reading
* [Known issues](https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Knownissues "Known issues")
### Repository and directory structure
OFBiz is split into two repositories:
- **ofbiz-framework**: Contains the core framework and main applications in
the system like accounting, party, order, etc
- **ofbiz-plugins**: Renamed from "special-purpose" and contains optional
components that are officially supported by the community
Furthermore, the hot-deploy directory is removed as the plugins directory works
as a replacement for both "special-purpose" and "hot-deploy".
If you need to load the components in the plugins directory in a specific order
place a component-load.xml file in the plugins directory listing the order.
To check out a plugin from source control use the **pullPluginSource** Gradle task.
To check out all plugins from source control use the **pullAllPluginsSource**.
**Beware** this deletes a previously existing plugins directory.
### Running gradle tasks without an internet connection
OFBiz must run with an internet connection the **first time** it is prepared on
the system because it needs to download all the required dependencies.
After preparing OFBiz the first time correctly, it is possible to run OFBiz
without an internet connection by using the `--offline` command line switch
which tells Gradle to fetch its dependencies from the cache.
If any dependencies are missing from the cache and you pass `--offline` switch
then the build execution will fail.
### Setup an external database like MySQL, PostgreSQL, etc
To setup an external database instead of the default embedded Apache Derby, you
will need to follow the following instructions:
1. Find the JDBC driver suitable for your database using one of the following
options:
* Search for the JDBC driver in [jcenter](https://bintray.com/bintray/jcenter)
and place it in build.gradle dependencies e.g.
`runtime 'mysql:mysql-connector-java:5.1.36'`
OR
* Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib
sub-directory of any component
2. Modify the entityengine.xml file located in $OFBIZ_HOME/framework/entity/config
to switch the default database to the one you selected. For more details you
can read the relevant section in the
[technical setup guide](https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide)
### Setup gradle tab-completion on Unix-like systems:
To get tab completion (auto complete gradle commands by pressing tab)
you can download the script from the below link and place it in the
appropriate location for your system.
[Gradle tab completion](https://edub.me/gradle-completion-bash)
For example, on debian based systems, you can use the following command:
`sudo curl -L -s https://edub.me/gradle-completion-bash -o /etc/bash_completion.d/gradle-tab-completion.bash`
* * * * * * * * * * * *
Crypto notice
-------------
This distribution includes cryptographic software. The country in
which you currently reside may have restrictions on the import,
possession, use, and/or re-export to another country, of
encryption software. BEFORE using any encryption software, please
check your country's laws, regulations and policies concerning the
import, possession, or use, and re-export of encryption software, to
see if this is permitted. See <http://www.wassenaar.org/> for more
information.
The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms. The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see the BIS
Export Administration Regulations, Section 740.13) for both object
code and source code.
The following provides more details on the included cryptographic
software:
- Various classes in OFBiz, including DesCrypt, HashCrypt, and
BlowFishCrypt use libraries from the Sun Java JDK API including
java.security.* and javax.crypto.* (the JCE, Java Cryptography
Extensions API)
- Other classes such as HttpClient and various related ones use
the JSSE (Java Secure Sockets Extension) API
+1
View File
@@ -0,0 +1 @@
17.12.01
@@ -980,11 +980,11 @@
<value xml:lang="zh-TW">獲取認證使用者時出錯</value>
</property>
<property key="worldPayEvents.problemsGettingInstId">
<value xml:lang="de">Probleme beim Ermitteln der Inst Id</value>
<value xml:lang="en">Problems Getting Inst Id</value>
<value xml:lang="de">Probleme beim Ermitteln der Inst ID</value>
<value xml:lang="en">Problems Getting Inst ID</value>
<value xml:lang="fr">Problème de récupération de l'Inst Id</value>
<value xml:lang="hi-IN">Inst Id में समस्याएँ हो रही</value>
<value xml:lang="it">Problema nel ricavare il parametro Inst Id</value>
<value xml:lang="it">Problema nel ricavare il parametro Inst ID</value>
<value xml:lang="ja">導入IDの取得に問題があります。</value>
<value xml:lang="pt">Problemas ao obter ID de inst</value>
<value xml:lang="zh">获取实例标识时出错</value>
@@ -14828,16 +14828,6 @@
<value xml:lang="zh">税务机关</value>
<value xml:lang="zh-TW">稅務機關</value>
</property>
<property key="AccountingTaxAuthorityCategoryAdvice">
<value xml:lang="ar">أنتبه: لا تستخدم أكثر من سطر واحد في "شحن الضرائب" و/أو "عروض الضرائب" بالقيمة = "ص"</value>
<value xml:lang="de">Achtung: verwenden Sie nicht mehr als eine Zeile mit "Steuer Lieferung" und/oder "Steuer Promotions" Wert = "Y"</value>
<value xml:lang="en">Beware: don't use more than one line with "Tax Shipping" and/or "Tax Promotions" value = "Y"</value>
<value xml:lang="fr">Attention: n'utilisez pas plus d'une ligne avec "Taxes sur livraison" et/ou "Taxes sur promotions" = "Y"</value>
<value xml:lang="ja">注意: "発送税"および/または"プロモーション税"に値="Y"の行を複数使用しないでください</value>
<value xml:lang="vi">Lưu ý: bạn không sử dụng nhiều hơn một dòng với "Thuế chuyển hàng" và/hoặc "Thuế khuyến mãi giá trị"= "Y"</value>
<value xml:lang="zh">注意:"航运税"不能多于一行,且/或"业务推广税"的值 = "Y"</value>
<value xml:lang="zh-TW">注意:"航運稅"不能多於一行,且/或"業務推廣稅"的值 = "Y"</value>
</property>
<property key="AccountingTaxAuthorityGeo">
<value xml:lang="ar">جيوغرافية مصلحة الضرائب</value>
<value xml:lang="de">Steuerbehörde Geo</value>
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<entity-engine-xml>
<Budget budgetId="DemoBudget001" budgetTypeId="CAPITAL_BUDGET" customTimePeriodId="6016" comments="Demo for budget 001"/>
<Budget budgetId="DemoBudget001" budgetTypeId="CAPITAL_BUDGET" customTimePeriodId="6015" comments="Demo for budget 001"/>
<Budget budgetId="DemoBudget002" budgetTypeId="OPERATING_BUDGET" customTimePeriodId="6010" comments="Demo for budget 002"/>
<BudgetStatus budgetId="DemoBudget001" statusId="BG_CREATED" statusDate="2009-01-09 00:00:00.000"/>
@@ -397,11 +397,7 @@ under the License.
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6012" periodTypeId="FISCAL_QUARTER" fromDate="2010-04-01 00:00:00.000" thruDate="2010-07-01 23:59:59.000" isClosed="N" periodNum="3" periodName="2010/Q2" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6013" periodTypeId="FISCAL_QUARTER" fromDate="2010-07-01 00:00:00.000" thruDate="2010-10-01 23:59:59.000" isClosed="N" periodNum="4" periodName="2010/Q3" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6014" periodTypeId="FISCAL_QUARTER" fromDate="2010-10-01 00:00:00.000" thruDate="2011-01-01 23:59:59.000" isClosed="N" periodNum="5" periodName="2010/Q4" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01 00:00:00.000" thruDate="2020-01-01 23:59:59.000" isClosed="N" periodNum="1" periodName="2011-2020"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6016" periodTypeId="FISCAL_QUARTER" fromDate="2011-01-01 00:00:00.000" thruDate="2011-04-01 23:59:59.000" isClosed="N" periodNum="2" periodName="2011/Q1" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6017" periodTypeId="FISCAL_QUARTER" fromDate="2011-04-01 00:00:00.000" thruDate="2011-07-01 23:59:59.000" isClosed="N" periodNum="3" periodName="2011/Q2" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6018" periodTypeId="FISCAL_QUARTER" fromDate="2011-07-01 00:00:00.000" thruDate="2011-10-01 23:59:59.000" isClosed="N" periodNum="4" periodName="2011/Q3" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6019" periodTypeId="FISCAL_QUARTER" fromDate="2011-10-01 00:00:00.000" thruDate="2012-01-01 23:59:59.000" isClosed="N" periodNum="5" periodName="2011/Q4" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01 00:00:00.000" thruDate="2030-01-01 23:59:59.000" isClosed="N" periodNum="1" periodName="2011-2030"/>
<!-- to convert demo invoice -->
<UomConversionDated uomId="USD" uomIdTo="EUR" fromDate="2001-01-01 00:00:00.0" conversionFactor="0.7"/>
@@ -196,7 +196,7 @@ under the License.
<!-- An Enterprise Internal Organization -->
<Party partyId="Enterprise" partyTypeId="PARTY_GROUP" statusId="PARTY_ENABLED"/>
<PartyGroup partyId="Enterprise" groupName="Large Enterprise, Inc." logoImageUrl="http://ofbiz.apache.org/images/ofbiz_logo.png"/>
<PartyGroup partyId="Enterprise" groupName="Large Enterprise, Inc." logoImageUrl="/images/ofbiz_logo.png"/>
<PartyRole partyId="Enterprise" roleTypeId="INTERNAL_ORGANIZATIO"/>
<PartyRole partyId="Enterprise" roleTypeId="PARENT_ORGANIZATION"/>
<PartyStatus partyId="Enterprise" statusId="PARTY_ENABLED" statusDate="2001-01-01 12:00:00.0"/>
@@ -11,20 +11,7 @@
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* 'License'); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
partyIdFrom = parameters.partyIdFrom
partyIdTo = parameters.partyIdTo
if (partyIdFrom) {
context.partyNameResultFrom = runService("getPartyNameForDate", [partyId: partyIdFrom, compareDate: agreementDate, lastNameFirst: "Y"])
}
@@ -34,7 +34,7 @@ def updateRateAmount() {
if (!newEntity.rateCurrencyUomId) {
newEntity.rateCurrencyUomId = UtilProperties.getPropertyValue('general.properties', 'currency.uom.id.default')
}
if (!newEntity.fromDate) newEntity.fromDate = UtilDateTime.getDayStart(UtilDateTime.nowTimestamp())
if (!newEntity.fromDate) newEntity.fromDate = UtilDateTime.nowTimestamp()
newEntity.thruDate = null
//Check if the entry is already exist with a different rate else expire the older to create the new one
@@ -48,7 +48,7 @@ def updateRateAmount() {
if (rateAmountLookedUpValue) {
updating = (rateAmountLookedUpValue.fromDate.compareTo(newEntity.fromDate) == 0)
if (rateAmountLookedUpValue.rateAmount != rateAmount) {
result = run service: 'expireRateAmount', with: rateAmountLookedUpValue
result = run service: 'expireRateAmount', with: rateAmountLookedUpValue.getAllFields()
if (ServiceUtil.isError(result)) return result
} else {
return error(UtilProperties.getMessage('AccountingErrorUiLabels', 'AccountingUpdateRateAmountAlreadyExist', locale))
@@ -119,9 +119,11 @@ def expirePartyRate() {
lookedUpValue.store()
//expire related rate amount
if (parameters.rateAmountFromDate) {
parameters.fromDate = parameters.rateAmountFromDate;
result = run service: 'expireRateAmount', with: parameters
if (ServiceUtil.isError(result)) return result
}
}
return success()
}
@@ -186,7 +186,7 @@ under the License.
</entity-condition>
<set field="listSize" value="0" type="Long"/>
<if-not-empty field="maintList">
<set field="listSize" value="${util:size(maintList)}" type="Long"/>
<set field="listSize" value="${groovy:maintList.size()}" type="Long"/>
</if-not-empty>
<set field="maxIntervalQty" value="0" type="BigDecimal"/>
<iterate list="maintList" entry="maintValue">
@@ -263,7 +263,7 @@ under the License.
<if-not-empty field="compareDate">
<set field="listSize" value="0" type="Long"/>
<if-not-empty field="maintList">
<set field="listSize" value="${util:size(maintList)}" type="Long"/>
<set field="listSize" value="${groovy:maintList.size()}" type="Long"/>
</if-not-empty>
<set field="lastSvcLong" value="0" type="Long"/>
<set field="lastSvcDate" from-field="lastSvcLong" type="Timestamp"/>
@@ -1856,23 +1856,29 @@ under the License.
<set field="debitEntry.partyId" from-field="invoice.partyIdFrom"/>
<set field="debitEntry.roleTypeId" from-field="transPartyRoleTypeId"/>
<set field="debitEntry.productId" from-field="invoiceItem.productId"/>
<!-- glAccountTypeId is overloaded. For sales and purchase invoices, it has the invoiceItemTypeId,
and the getGlAccountFromAccountType service knows that -->
<set field="debitEntry.glAccountTypeId" from-field="invoiceItem.invoiceItemTypeId"/>
<set field="debitEntry.glAccountId" from-field="invoiceItem.overrideGlAccountId"/>
<set field="debitEntry.origAmount" from-field="amountFromInvoice"/>
<set field="debitEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
</iterate>
<!-- debit entry for SALES_TAX-->
<set field="invoiceTaxTotal" type="BigDecimal" value="0"/>
<call-class-method method-name="getInvoiceTaxAuthPartyAndGeos" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAuthPartyAndGeos">
<field field="invoice" type="org.apache.ofbiz.entity.GenericValue"/>
</call-class-method>
<iterate-map key="taxAuthPartyId" value="taxAuthGeoIds" map="taxAuthPartyAndGeos">
<iterate list="taxAuthGeoIds" entry="taxAuthGeoId">
<clear-field field="debitEntry"/>
<make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
<set field="debitEntry.debitCreditFlag" value="D"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyIdTo"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyId"/>
<call-class-method method-name="getInvoiceTaxTotalForTaxAuthPartyAndGeo" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAmount">
<field field="invoice" type="GenericValue"/>
@@ -1883,21 +1889,37 @@ under the License.
<set field="debitEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="debitEntry.partyId" from-field="taxAuthPartyId"/>
<set field="debitEntry.roleTypeId" value="TAX_AUTHORITY"/>
<set field="debitEntry.glAccountTypeId" from-field="TAX_ACCOUNT"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
</iterate>
</iterate-map>
<!-- Another entry for tax not attributed to a taxAuthPartyId -->
<clear-field field="debitEntry"/>
<make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
<set field="debitEntry.debitCreditFlag" value="D"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyIdFrom"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyId"/>
<call-class-method method-name="getInvoiceUnattributedTaxTotal" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAmount">
<field field="invoice" type="GenericValue"/>
</call-class-method>
<set field="debitEntry.origAmount" from-field="taxAmount"/>
<set field="debitEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="debitEntry.glAccountTypeId" value="TAX_ACCOUNT"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
<!-- Credit -->
<make-value entity-name="AcctgTransEntry" value-field="creditEntry"/>
@@ -2017,6 +2039,8 @@ under the License.
<set field="debitEntry.partyId" from-field="invoice.partyIdFrom"/>
<set field="debitEntry.roleTypeId" value="BILL_FROM_VENDOR"/>
<set field="debitEntry.productId" from-field="invoiceItem.productId"/>
<!-- glAccountTypeId is overloaded. For sales and purchase invoices, it has the invoiceItemTypeId,
and the getGlAccountFromAccountType service knows that -->
<set field="debitEntry.glAccountTypeId" from-field="invoiceItem.invoiceItemTypeId"/>
<set field="debitEntry.glAccountId" from-field="invoiceItem.overrideGlAccountId"/>
<if-compare field="amountFromOrder" operator="greater" value="0" type="BigDecimal">
@@ -2030,6 +2054,7 @@ under the License.
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
</iterate>
<!-- debit entry for SALES_TAX-->
<set field="invoiceTaxTotal" type="BigDecimal" value="0"/>
<call-class-method method-name="getInvoiceTaxAuthPartyAndGeos" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAuthPartyAndGeos">
<field field="invoice" type="org.apache.ofbiz.entity.GenericValue"/>
@@ -2050,7 +2075,14 @@ under the License.
<set field="debitEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="debitEntry.partyId" from-field="taxAuthPartyId"/>
<set field="debitEntry.roleTypeId" value="TAX_AUTHORITY"/>
<set field="debitEntry.glAccountTypeId" value="TAX_ACCOUNT"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
</iterate>
</iterate-map>
<!-- Another entry for tax not attributed to a taxAuthPartyId -->
@@ -2071,9 +2103,16 @@ under the License.
<set field="debitEntry.organizationPartyId" from-field="invoice.partyId"/>
<set field="debitEntry.origAmount" from-field="taxAmount"/>
<set field="debitEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="debitEntry.glAccountTypeId" value="TAX_ACCOUNT"/>
<set field="acctgTransEntries[]" from-field="debitEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
</then>
</if>
</if>
<!-- Credit -->
<make-value entity-name="AcctgTransEntry" value-field="creditEntry"/>
<set field="creditEntry.debitCreditFlag" value="C"/>
@@ -2171,6 +2210,8 @@ under the License.
<!-- Credit -->
<make-value entity-name="AcctgTransEntry" value-field="creditEntry"/>
<set field="creditEntry.debitCreditFlag" value="C"/>
<!-- glAccountTypeId is overloaded. For sales and purchase invoices, it has the invoiceItemTypeId,
and the getGlAccountFromAccountType service knows that -->
<set field="creditEntry.glAccountTypeId" from-field="invoiceItem.invoiceItemTypeId"/>
<set field="creditEntry.organizationPartyId" from-field="invoice.partyIdFrom"/>
<set field="creditEntry.productId" from-field="invoiceItem.productId"/>
@@ -2185,6 +2226,7 @@ under the License.
</iterate>
<!-- credit entry for SALES_TAX-->
<set field="invoiceTaxTotal" type="BigDecimal" value="0"/>
<call-class-method method-name="getInvoiceTaxAuthPartyAndGeos" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAuthPartyAndGeos">
<field field="invoice" type="org.apache.ofbiz.entity.GenericValue"/>
@@ -2218,6 +2260,12 @@ under the License.
</else>
</if-not-empty>
<set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
</iterate>
</iterate-map>
<!-- Another entry for tax not attributed to a taxAuthPartyId -->
@@ -2234,6 +2282,12 @@ under the License.
<set field="creditEntry.origCurrencyUomId" from-field="invoice.currencyUomId"/>
<set field="creditEntry.glAccountTypeId" value="TAX_ACCOUNT"/>
<set field="acctgTransEntries[]" from-field="creditEntry" type="Object"/>
<calculate field="invoiceTaxTotal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="invoiceTaxTotal"/>
<calcop operator="get" field="taxAmount"/>
</calcop>
</calculate>
</if-compare>
<!-- Debit -->
@@ -2241,10 +2295,6 @@ under the License.
<set field="debitEntry.debitCreditFlag" value="D"/>
<set field="debitEntry.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyIdFrom"/>
<call-class-method method-name="getInvoiceTaxTotal" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="invoiceTaxTotal">
<field field="invoice" type="GenericValue"/>
</call-class-method>
<calculate field="totalOrigAmount" type="BigDecimal" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="add">
<calcop operator="get" field="totalOrigAmount"/>
@@ -742,7 +742,7 @@ under the License.
<set field="createFinAccountTransMap.partyId" from-field="parameters.organizationPartyId"/>
<now-timestamp field="createFinAccountTransMap.transactionDate"/>
<now-timestamp field="createFinAccountTransMap.entryDate"/>
<!-- set field="createFinAccountTransMap.statusId" value="CREATE"/>--><!-- TODO: It will uncomment when status Id field will add in FinAccountTrans Entity. -->
<set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/>
<set field="createFinAccountTransMap.comments" value="Pay to ${parameters.partyId} for invoice Ids - ${parameters.invoiceIds}"/>
<call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap">
<result-to-field result-name="finAccountTransId"/>
@@ -29,14 +29,14 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes include="pk" mode="OUT" optional="true"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="updateAgreement" default-entity-name="Agreement" engine="entity-auto" invoke="update" auth="true">
<description>Update an Agreement</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="expireAgreement" engine="entity-auto" default-entity-name="Agreement" invoke="expire" auth="true">
<description>Expire an Agreement</description>
@@ -60,7 +60,7 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="agreementText" allow-html="any"/>
<override name="agreementText" allow-html="safe"/>
<override name="agreementItemSeqId" optional="true"></override>
</service>
<service name="updateAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="update" auth="true">
@@ -68,13 +68,12 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="agreementText" allow-html="any"/>
<override name="agreementText" allow-html="safe"/>
</service>
<service name="removeAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="delete" auth="true">
<description>Remove an AgreementItem</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="DELETE"/>
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<!-- AgreementItemAttribute -->
@@ -102,14 +101,14 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="pk" mode="INOUT" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textValue" allow-html="any"/>
<override name="textValue" allow-html="safe"/>
</service>
<service name="updateAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="update" auth="true">
<description>Update an AgreementTerm</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textValue" allow-html="any"/>
<override name="textValue" allow-html="safe"/>
</service>
<service name="deleteAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="delete" auth="true">
<description>Delete an AgreementTerm</description>
@@ -56,8 +56,8 @@ under the License.
<override name="invoiceTypeId" mode="IN" optional="false"/>
<override name="partyIdFrom" mode = "IN" optional="false"/>
<override name="partyId" mode = "IN" optional="false"/>
<override name="description" allow-html="any"/>
<override name="invoiceMessage" allow-html="any"/>
<override name="description" allow-html="safe"/>
<override name="invoiceMessage" allow-html="safe"/>
</service>
<service name="copyInvoice" engine="simple" default-entity-name="Invoice"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="copyInvoice">
@@ -80,8 +80,8 @@ under the License.
<permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="description" allow-html="any"/>
<override name="invoiceMessage" allow-html="any"/>
<override name="description" allow-html="safe"/>
<override name="invoiceMessage" allow-html="safe"/>
</service>
<service name="setInvoiceStatus" engine="simple"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="setInvoiceStatus">
@@ -117,7 +117,7 @@ under the License.
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="invoiceItemSeqId" mode="INOUT" optional="true"/><!-- will optionally be assigned by the system -->
<override name="description" allow-html="any"/>
<override name="description" allow-html="safe"/>
</service>
<service name="updateInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="updateInvoiceItem">
@@ -125,7 +125,7 @@ under the License.
<permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
<auto-attributes mode="INOUT" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="description" allow-html="any"/>
<override name="description" allow-html="safe"/>
</service>
<service name="removeInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="removeInvoiceItem">
@@ -429,7 +429,7 @@ under the License.
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="false" allow-html="any"/>
<attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
<override name="contentId" optional="true"/>
<override name="fromDate" optional="true"/>
</service>
@@ -439,7 +439,7 @@ under the License.
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes mode="IN" entity-name="Content" optional="true"/>
<attribute name="textDataResourceId" type="String" mode="IN" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="any"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="safe"/>
</service>
<service name="isInvoiceInForeignCurrency" engine="simple"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="isInvoiceInForeignCurrency" auth="true">
@@ -0,0 +1,69 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Agreements
An “agreement” is a way of recording a business arrangement or contract that your
business makes with other companies or individuals. Some common examples of
agreements include Payment Terms (where you allow a customer up to 30
days to pay you) or Prompt Payment Discounts (where you offer a reduction on the
amount owing if your customer pays you before a certain date)
At the time of writing, OFBiz allows you to create the following type of agreements
* Product
* Purchase
* Sales
* Employee
* Commission
* End User Licence
The most common agreements you will use will be Sales Agreements (for your
Customers), Purchase Agreements (for your Suppliers) and Commission Agreements
(for your Sales Representatives).
== Sales Agreement
A “Sales Agreement” is an agreement between you and your customers. A customer
can also be another business. You can create a range of conditions for your
customer including giving them such as payment discounts or special payment terms
and credit limits.
If you have installed OFBiz with the demo data then there are already examples
of Sales Agreements created for you.
== Purchase Agreement
A “Purchase Agreement” is an agreement between your business and a supplier. You
may have negotiated special conditions such as delivery, volume pricing and
invoice terms.
If you have installed OFBiz with the demo data then there are already examples
of Purchase Agreements created for you.
== Commission Agreement
A “Commission Agreement” is an agreement that is used to calculate how much money
a Sales Representative will get when products they have promoted or marketed are
sold to customers. The rate paid to the Sales Representative is can be based on a
fixed or variable on a percentage of each sale they make. These amounts can be
quite small amounts so it can be easier to consolidate multiple commission
payments into one large payment that is paid monthly.
If you have installed OFBiz with the demo data then there are already two example
Commission Agreements created for you.
@@ -0,0 +1,75 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Financial Accounts
A "Financial Account" is a tool (similar to bank account statement) that is used for monitoring monetary transactions.
Normally it will be linked to a party and the various transactions details (e.g. payments or receipts) will be shown as entries.
At the time of writing, OFBiz allows you to create the following type of financial accounts
* Bank Account
* Credit Card Account
* Deposit Account
* Equity Line Account
* Gift Certificate
* Investment Account
* Loan Account
* Replenish Account
* Service Credit Account
* Store Credit Account
== Bank Account
A "Bank Account" is a financial account between a bank and their customer.
By default this type of financial account will post to 213500 CUSTOMER DEPOSIT ACCOUNTS.
If you have installed OFBiz with the demo data then there are already examples
of Bank Accounts created for you.
== Credit Card Account
== Deposit Account
A "Deposit Account" is a financial account which allows money to be deposited and withdrawn by the account holder.
By default this type of financial account will post to 213500 CUSTOMER DEPOSIT ACCOUNTS.
== Equity Line Account
== Gift Certificate
A "Gift Certificate" is something that entitles the recipient to select merchandise up to a specified value from a store. It is usually presented as a gift.
By default this type of financial account will post to 213200 GIFT CERTIFICATES UNREDEEMED.
== Investment Account
An "Investment Account" is a financial account that contains deposits of funds and/or securities that are held at a at a bank, stock exchange or other financial Institution.
By default this type of financial account will post to 213500 CUSTOMER DEPOSIT ACCOUNTS.
== Loan Account
== Replenish Account
== Service Credit Account
== Store Credit Account
A "Store Credit Account" is a financial account that is used to to maintain the refund amount
Specify the type (Billing Account or Financial Account) of Store Credit Account used for refund return. Default to Financial Account.
@@ -0,0 +1,194 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Global General Ledger Settings
The Global General Ledger Settings are master templates that we can use to setup
up our chart of accounts, default transactions or other settings that can be applied
across many OFBiz modules.
We need settings at a global level because OFBiz is an integrated system so certain
areas like accounting are linked to many other modules. It also makes sense to have
a central place to setup things that will be used globally.
At the time of writing, the following are available as part of the Global GL Settings:
* Chart of Accounts - a comprehensive master template for a complete chart of
accounts.
* Custom Time Periods - a master list to display or setup financial periods
* Costs - a master list of any cost calculations to be used for assets or tasks
* Payment Method Type - a master list of the ways payments can be made (e.g. cash,
credit card etc) and the default accounts to be used for each
* Invoice Item Type - a master list of all the transaction line types that can
occur on any invoice and the default account to be used for each
* Rates - a list of rates (e.g. pay rates, overtime rates etc) that can be used
for billing work,tasks or as part of salary calculations
* Foreign Exchange Rates - a master list of exchange rates to be used and dates
they are valid
* GL Account Category - currently this is set to be a list of cost centres
* Cost Centers - a way to specify how to process percentage allocations between
cost centres for specific accounts
== Master Template - Chart of Accounts
If you load the demo data, then by default over 450 accounts are included as part
of the OFBiz global chart of accounts master template.
To setup a chart of accounts in OFBiz simply means that we need to select the
accounts we want to use from the global chart of accounts master template.
All general ledger accounts must exist in the global template before they can be
assigned to be used at the organisation level (e.g. Company)
== Custom Time Periods
Time periods are a defined period of time (usually a month, quarter or year) that
is used to group business transactions. It is a key part of any general accounting
setup. Time periods can be used for the definition of :
* Company Financial Year
* Fiscal / Tax Periods (weeks, months, quarters)
* VAT / GST Periods
* Sales Periods
== Costs
A business is designed to be profi table. This means that you need to be able to
track all the costs involved in your business to ensure that you are not losing
money.
Some example costs that you may want to setup and track are as follows:
* Raw Materials Costs
* Labour Costs
* Rental Costs
* Electricity Costs
* Quality Assurance or Regulatory Costs
=== Direct and Indirect Costs
Costs can also be broken down into “Direct” and “Indirect” costs.
Direct costs are costs that are easily identifiable as directly related to what
you do to produce and sell to your customers.
Indirect costs are costs that cannot easily be directly linked to what you on sell
to your customers. Included in this would be rent, electricity or general
administration costs.
=== Fixed and variable Costs
Variable costs are those that rise and fall based on the amount product you produce
or sell. If you sell or produce a lot of products it will cost more than if you
produce a smaller amount.
Fixed costs are ones that remain the same no matter how much is being produced or
sold.
Before you can calculate costs you need to define a formula of how to do it and
in OFBiz this is called a “Cost Component Calculation”.
== Payment Method Type
A “Payment Method” is simply a way to define the ways in which payments can be made.
Examples include:
* Cash
* Cheque
* Electronic Funds Transfer
* Billing Account
* Paypal
* Financial Account
* Gift Certificate
Each payment method can be linked to a different General Ledger account in the
Chart of Accounts. By doing this OFBiz will be able to help us create an accounting
transaction based on how the payment wasmade. This is very useful if we want to
automate the creation of accounting transactions.
== Invoice Item Types
An “Invoice Item Type” is another way to describe the different type of individual
line items that appear on an invoice. For example an invoice is usually made up of:
* A header - which contains details of the supplier, customer, invoice date etc
* Line items - which are the products, taxes, discounts etc on the invoice
* A footer - which summarises the totals, taxes and discounts
Invoice item types can refer to any of these three areas on an invoice. They can
also be broken down into specific categories that allow us to classify or report
on the total or frequency of that type.
Some examples of Invoice Item Types are:
* Type of Product (Standard, Digital, Service)
* Shipping or Handling Charges
* Promotions (Discounted Products, Free Products)
* Discounts (Product Discount, Invoice Discount, Early Payment)
* Returned Items (Faulty, Replacement)
OFBiz allows us to setup a code for each of the different line item types that can
appear on an invoice. We can then link each item type to a specific General Ledger
account. By doing this OFBiz will be able to help us create an accounting transactions
based on the item types that appear on the invoice.
This is very useful if we want to automate the creation of accounting transactions.
== Rates
Rates are used to create a “pay rate” or “charge amount” that can be used in the
calculation of a task, employee salary or a service that involves people.
Rates are closely linked to the OFBiz Human Resources Manager application but are
also used across multiple OFBiz applications (Manufacturing, Asset Maintenance,
Project Tasks, Timesheet Entry etc) where person related work tasks are required.
== Foreign Exchange Rates
Foreign exchange rates are used to convert from one currency to another. A business
will usually want to work in one main currency (e.g. GBP) but will allow transactions
in other currencies (e.g. EUR, USD). These currencies will need to be converted
to the main currency in order to generate financial reports (e.g. Balance Sheet
or Income Statement) and most importantly to adhere to Tax Authority regulations.
== GL Account Category
A “General Ledger Account Category” (or GL Account Category) is a generic term to
describe the way you can segment or classify accounts. Categories can be setup and
then linked to the required accounts.
Another way to think about it is that it is like adding an extra tag to an account
so that you can easily retrieve that account to do any additional reporting or
processing.
In OFBiz at the time of writing, the GL Account Category has been used to implement
cost centre functionality for the Chart of Accounts.
== Cost Centers
A cost centre is an area or part of an organisation where costs (direct or indirect)
can be allocated .
By default OFBiz will allocate and post 100% of any accounting value to the
specified General Ledger account. Setting up Cost Centres allows you to split the
amount across different areas using a percentage calculation.
For example: You want to buy something that and three departments will
contribute to buying it. If the product costs $90 then each department will pay
$30 towards the cost.
OFBiz will allow you to setup the percentage that each cost centre will contribute
so that you can view and track how much each department has contributed or spent.
@@ -0,0 +1,52 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= About Accounting
The Accounting system is organised according to generally accepted principles
such as double-entry accounting, a General Ledger with hierarchical accounts,
journals and posting of transactions and corresponding entries.
The structure is primary based on the OMG GL standard and the work that was done
on an AR/AP extension of the OMG GL standard. This correlates well with other
standards such as ebXML and OAGIS.
The Accounting entities are structured such that accounts for multiple
organisations can be managed. The multiple organisations could be multiple
companies, or departments or other organisations within a company. Each
organisation can have various GL Accounts associated with it so that it can
operate with its own subset of the Master Chart of Accounts.
Each organisation can also have its own set of Journals for flexibility, even
though the use of Journals should be as minimal as possible in favour of allowing
the system to automatically create and post transactions based on business events
triggered by standard procedures and documents such as purchase and sales orders,
invoices, inventory transfers, payments, receipts, and so on.
== Accounting Features
* General Ledger
* Accounts Receivable
* Accounts Payable
* Agreements
* Multi-currency Support
* Billing Accounts
* Fixed Asset Accounting
OFBiz accounting can be configured to handle multiple organisations including
an unlimited number of companies, subsidiaries and departments.
@@ -0,0 +1,35 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Accounting
The OFBiz accounting system is a core application component and has most of the
modern features you would expect in a general purpose double-entry accounting
system. However, OFBiz goes beyond that by and seamlessly integrates with other
OFBiz applications such as Inventory, Purchasing and Manufacturing to give your
business a complete ERP solution. This makes the system as a whole robust and
integrated to provide more value than a plain accounting system.
include::_include/acc-intro.adoc[leveloffset=+1]
include::_include/acc-agreements.adoc[leveloffset=+1]
include::_include/acc-financial-accounts.adoc[leveloffset=+1]
include::_include/acc-global-settings.adoc[leveloffset=+1]
@@ -210,8 +210,11 @@ public class FinAccountServices {
Timestamp now = UtilDateTime.nowTimestamp();
// now use our values
String finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
inContext.put("finAccountCode", finAccountCode);
String finAccountCode = null;
if (UtilValidate.isNotEmpty(accountCodeLength)) {
finAccountCode = FinAccountHelper.getNewFinAccountCode(accountCodeLength.intValue(), delegator);
inContext.put("finAccountCode", finAccountCode);
}
// with pin codes, the account code becomes the ID and the pin becomes the code
if ("Y".equalsIgnoreCase(requirePinCode)) {
@@ -558,11 +558,11 @@ public class InvoiceServices {
// Set adjustment amount as amountAlreadyIncluded to continue invoice item creation process
Boolean isTaxIncludedInPrice = "VAT_TAX".equals(adj.getString("orderAdjustmentTypeId")) && UtilValidate.isNotEmpty(adj.getBigDecimal("amountAlreadyIncluded")) && adj.getBigDecimal("amountAlreadyIncluded").signum() != 0;
if ((adj.getBigDecimal("amount").signum() == 0) && isTaxIncludedInPrice) {
if (isTaxIncludedInPrice && (adj.getBigDecimal("amount").signum() == 0)) {
adj.set("amount", adj.getBigDecimal("amountAlreadyIncluded"));
}
// If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this adjustment
if (adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal("amount").setScale(invoiceTypeDecimals, ROUNDING).abs()) > 0) {
if (isTaxIncludedInPrice && adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal("amount").setScale(invoiceTypeDecimals, ROUNDING).abs()) > 0) {
continue;
}
@@ -84,10 +84,10 @@ public class PaymentGatewayServices {
private static BigDecimal ZERO = BigDecimal.ZERO;
private static int decimals;
private static int rounding;
public final static String resource = "AccountingUiLabels";
public static final String resource = "AccountingUiLabels";
public static final String resourceError = "AccountingErrorUiLabels";
public static final String resourceOrder = "OrderUiLabels";
static {
decimals = UtilNumber.getBigDecimalScale("order.decimals");
rounding = UtilNumber.getBigDecimalRoundingMode("order.rounding");
@@ -1740,7 +1740,7 @@ public class PaymentGatewayServices {
authTrans = getAuthTransaction(paymentPref);
} catch (GeneralException e) {
Debug.logError(e, "Error re-authorizing payment", module);
return ServiceUtil.returnError(UtilProperties.getMessage("AccountingUiLabels", "AccountingPaymentReauthorizingError", locale));
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingPaymentReauthorizingError", locale));
}
}
@@ -2074,7 +2074,7 @@ public class PaymentGatewayServices {
}
} catch (GenericEntityException e) {
Debug.logError(e, "Error updating payment status information", module);
return ServiceUtil.returnError(UtilProperties.getMessage("AccountingUiLabels", "AccountingPaymentStatusUpdatingError", UtilMisc.toMap("errorString", e.toString()), locale));
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingPaymentStatusUpdatingError", UtilMisc.toMap("errorString", e.toString()), locale));
}
return ServiceUtil.returnSuccess();
@@ -2361,11 +2361,11 @@ public class PaymentGatewayServices {
// use input pay to party
partyIdTo = payTo;
} else if (invoice != null) {
// ues the invoice partyIdFrom as the pay to party (which is who supplied the invoice)
// use the invoice partyIdFrom as the pay to party (which is who supplied the invoice)
partyIdTo = invoice.getString("partyIdFrom");
} else {
// otherwise default to Company and print a big warning about this
partyIdTo = "Company";
partyIdTo = EntityUtilProperties.getPropertyValue("general", "ORGANIZATION_PARTY", "Company", delegator);
Debug.logWarning("Using default value of [" + partyIdTo + "] for payTo on invoice [" + invoiceId + "] and orderPaymentPreference [" +
paymentPreference.getString("orderPaymentPreferenceId") + "]", module);
}
@@ -3124,7 +3124,7 @@ public class PaymentGatewayServices {
// prepare the auth context
Map<String, Object> authContext = new HashMap<>();
authContext.put("orderId", "_NA_");
authContext.put("orderItems", new LinkedList());
authContext.put("orderItems", new LinkedList<>());
authContext.put("orderPaymentPreference", orderPaymentPref);
authContext.put("creditCard", creditCard);
authContext.put("billToParty", billToParty);
@@ -3391,7 +3391,7 @@ public class PaymentGatewayServices {
}
if (ServiceUtil.isError(results)) {
return ServiceUtil.returnError(UtilProperties.getMessage("AccountingUiLabels", "AccountingCreditCardManualAuthFailedError", locale));
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "AccountingCreditCardManualAuthFailedError", locale));
}
}
}
@@ -245,6 +245,8 @@ public class TaxAuthorityServices {
List<GenericValue> orderAdjustments = new LinkedList<>();
List<List<GenericValue>> itemAdjustments = new LinkedList<>();
BigDecimal totalPrice = ZERO_BASE;
Map<GenericValue,BigDecimal> productWeight = new HashMap<>();
// Loop through the products; get the taxCategory; and lookup each in the cache.
for (int i = 0; i < itemProductList.size(); i++) {
GenericValue product = itemProductList.get(i);
@@ -252,22 +254,40 @@ public class TaxAuthorityServices {
BigDecimal itemPrice = itemPriceList.get(i);
BigDecimal itemQuantity = itemQuantityList != null ? itemQuantityList.get(i) : null;
BigDecimal shippingAmount = itemShippingList != null ? itemShippingList.get(i) : null;
totalPrice = totalPrice.add(itemAmount);
List<GenericValue> taxList = getTaxAdjustments(delegator, product, productStore, payToPartyId,
billToPartyId, taxAuthoritySet, itemPrice, itemQuantity, itemAmount, shippingAmount, ZERO_BASE);
// this is an add and not an addAll because we want a List of Lists of
// GenericValues, one List of Adjustments per item
itemAdjustments.add(taxList);
//Calculates the TotalPrices for each Product in the Order
BigDecimal currentTotalPrice = productWeight.containsKey(product) ? productWeight.get(product) : BigDecimal.ZERO;
currentTotalPrice = currentTotalPrice.add(itemAmount);
productWeight.put(product, currentTotalPrice);
}
// converts the totals of the products into percent weights
for (GenericValue prod : productWeight.keySet()) {
BigDecimal value = productWeight.get(prod);
if (totalPrice.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal weight = value.divide(totalPrice, 100, salestaxRounding);
productWeight.put(prod, weight);
}
}
if (orderShippingAmount != null && orderShippingAmount.compareTo(BigDecimal.ZERO) > 0) {
List<GenericValue> taxList = getTaxAdjustments(delegator, null, productStore, payToPartyId, billToPartyId,
taxAuthoritySet, ZERO_BASE, ZERO_BASE, ZERO_BASE, orderShippingAmount, ZERO_BASE);
orderAdjustments.addAll(taxList);
for (GenericValue prod : productWeight.keySet()) {
List<GenericValue> taxList = getTaxAdjustments(delegator, prod, productStore, payToPartyId, billToPartyId,
taxAuthoritySet, ZERO_BASE, ZERO_BASE, ZERO_BASE, orderShippingAmount, null, productWeight.get(prod));
orderAdjustments.addAll(taxList);
}
}
if (orderPromotionsAmount != null && orderPromotionsAmount.compareTo(BigDecimal.ZERO) != 0) {
List<GenericValue> taxList = getTaxAdjustments(delegator, null, productStore, payToPartyId, billToPartyId,
taxAuthoritySet, ZERO_BASE, ZERO_BASE, ZERO_BASE, ZERO_BASE, orderPromotionsAmount);
taxAuthoritySet, ZERO_BASE, ZERO_BASE, ZERO_BASE, null, orderPromotionsAmount);
orderAdjustments.addAll(taxList);
}
@@ -315,9 +335,23 @@ public class TaxAuthorityServices {
String payToPartyId, String billToPartyId, Set<GenericValue> taxAuthoritySet,
BigDecimal itemPrice, BigDecimal itemQuantity, BigDecimal itemAmount,
BigDecimal shippingAmount, BigDecimal orderPromotionsAmount) {
return getTaxAdjustments(delegator, product, productStore, payToPartyId, billToPartyId,
taxAuthoritySet, itemPrice, itemQuantity, itemAmount, shippingAmount,
orderPromotionsAmount, null);
}
private static List<GenericValue> getTaxAdjustments(Delegator delegator, GenericValue product,
GenericValue productStore,
String payToPartyId, String billToPartyId, Set<GenericValue> taxAuthoritySet,
BigDecimal itemPrice, BigDecimal itemQuantity, BigDecimal itemAmount,
BigDecimal shippingAmount, BigDecimal orderPromotionsAmount, BigDecimal weight) {
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
List<GenericValue> adjustments = new LinkedList<>();
if (weight == null) {
weight = BigDecimal.ONE;
}
if (payToPartyId == null) {
if (productStore != null) {
payToPartyId = productStore.getString("payToPartyId");
@@ -359,8 +393,6 @@ public class TaxAuthorityServices {
EntityCondition productCategoryCond;
productCategoryCond = setProductCategoryCond(delegator, product);
// FIXME handles shipping and promo tax. Simple solution, see
// https://issues.apache.org/jira/browse/OFBIZ-4160 for a better one
if (product == null && shippingAmount != null) {
EntityCondition taxShippingCond = EntityCondition.makeCondition(
EntityCondition.makeCondition("taxShipping", EntityOperator.EQUALS, null),
@@ -405,6 +437,7 @@ public class TaxAuthorityServices {
for (GenericValue taxAuthorityRateProduct : lookupList) {
BigDecimal taxRate = taxAuthorityRateProduct.get("taxPercentage") != null ? taxAuthorityRateProduct
.getBigDecimal("taxPercentage") : ZERO_BASE;
taxRate = taxRate.multiply(weight);
BigDecimal taxable = ZERO_BASE;
if (product != null && (product.get("taxable") == null || (product.get("taxable") != null && product
@@ -338,6 +338,12 @@ public class AIMPaymentServices {
AuthorizeResponse ar = new AuthorizeResponse(httpResponse, apiType);
if (ar.isApproved()) {
result.put("authResult", Boolean.TRUE);
}
//When the transaction is already expired in Authorize.net, then the response is an error message with reason code 16 (i.e. "The transaction cannot be found");
// in this case we proceed without generating an error in order to void/cancel the transaction record in OFBiz as well.
//This else if block takes care of the expired transaction.
else if ("VOID".equals(props.get("transType")) && "16".equals(ar.getReasonCode())) {
result.put("authResult", Boolean.TRUE);
} else {
result.put("authResult", Boolean.FALSE);
if (Debug.infoOn()) {
@@ -157,30 +157,40 @@ public class GatewayResponse {
switch(name) {
case "ewayTrxnError":
txTrxnError = value;
break;
case "ewayTrxnStatus":
if ("true".equals(value.toLowerCase(Locale.getDefault()).trim())) {
txTrxnStatus = true;
}
break;
case "ewayTrxnNumber":
txTrxnNumber = value;
break;
case "ewayTrxnOption1":
txTrxnOption1 = value;
break;
case "ewayTrxnOption2":
txTrxnOption2 = value;
break;
case "ewayTrxnOption3":
txTrxnOption3 = value;
break;
case "ewayReturnAmount":
if (!value.equals("")) {
txReturnAmount = Integer.parseInt(value);
}
break;
case "ewayAuthCode":
txAuthCode = value;
break;
case "ewayTrxnReference":
txTrxnReference = value;
break;
case "ewayBeagleScore":
if (!value.equals("")) {
txBeagleScore = Double.parseDouble(value);
}
break;
default:
throw new Exception("Unknown field in response: " + name);
}
@@ -194,7 +194,7 @@ under the License.
<request-map uri="updateInvoiceItem">
<security https="true" auth="true"/>
<event type="service-multi" invoke="updateInvoiceItem"/>
<response name="success" type="request-redirect-noparam" value="listInvoiceItems"/>
<response name="success" type="request-redirect" value="listInvoiceItems"/>
<response name="error" type="view" value="listInvoiceItems"/>
</request-map>
<request-map uri="removeInvoiceItem">
@@ -1093,7 +1093,7 @@ under the License.
<request-map uri="updateBudgetItem">
<security https="true" auth="true"/>
<event type="service-multi" invoke="updateBudgetItem"/>
<response name="success" type="request-redirect-noparam" value="EditBudgetItems"/>
<response name="success" type="request-redirect" value="EditBudgetItems"/>
<response name="error" type="view" value="EditBudgetItems"/>
</request-map>
<request-map uri="removeBudgetItem">
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -88,6 +97,9 @@ under the License.
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -58,6 +58,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -66,6 +71,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
<!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
@@ -81,6 +90,11 @@ under the License.
<servlet-name>ControlServlet</servlet-name>
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -88,6 +97,9 @@ under the License.
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -137,7 +137,7 @@ under the License.
</drop-down>
</field>
<field name="contactMechId" tooltip="${uiLabelMap.AccountingBillingContactMechIdMessage}" use-when="billingAccount != null">
<drop-down>
<drop-down no-current-selected-key="${billingAccount.contactMechId}">
<entity-options entity-name="BillingAccountRoleAndAddress" key-field-name="contactMechId" description="[${partyId}][${contactMechId}] ${toName}, ${attnName}, ${address1}, ${stateProvinceGeoId} ${postalCode}" filter-by-date="true">
<entity-constraint name="billingAccountId" env-name="billingAccountId"/>
<entity-order-by field-name="partyId"/>
@@ -268,6 +268,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="headerItem" value="main"/>
<entity-condition entity-name="PaymentType" list="paymentTypes">
@@ -123,7 +123,7 @@ under the License.
</drop-down>
</field>
<field name="statusId" use-when="finAccount!=null" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" env-name="finAccount.statusId"/>
<entity-order-by field-name="sequenceId"/>
@@ -365,7 +365,7 @@ under the License.
</drop-down>
</field>
<field name="statusId" use-when="fixedAssetMaint!=null" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" env-name="fixedAssetMaint.statusId"/>
<entity-order-by field-name="sequenceId"/>
@@ -81,7 +81,7 @@ under the License.
</hyperlink>
</field>
<field name="invoiceTypeId" sort-field="true"><display-entity entity-name="InvoiceType"/></field>
<field name="invoiceDate" sort-field="true"><display description="${date:dateTimeString(invoiceDate, timeZone, locale)}"/></field>
<field name="invoiceDate" sort-field="true"><display type="date"/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}" sort-field="true"><display-entity entity-name="StatusItem"/></field>
<field name="description" sort-field="true"><display/></field>
<field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}" sort-field="true">
@@ -188,6 +188,7 @@ under the License.
<order-by field-name="invoiceItemSeqId"/>
</entity-and>
<script location="component://accounting/groovyScripts/invoice/CreateApplicationList.groovy"/>
<set field="parameters.statusId" from-field="invoice.statusId"/>
<set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
<set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
<set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
@@ -83,7 +83,7 @@ under the License.
<field use-when="paymentGroup==null @and paymentGroupId==null" name="paymentGroupId"><ignored/></field>
<field use-when="paymentGroup==null @and paymentGroupId!=null" name="paymentGroupId"><display description="${uiLabelMap.CommonCannotBeFound}: [${paymentGroupId}]" also-hidden="false"/></field>
<field name="paymentGroupId" use-when="display==true"><display/></field>
<field name="paymentGroupTypeId" title="${uiLabelMap.CommonType}">
<field name="paymentGroupTypeId" use-when="display==true" title="${uiLabelMap.CommonType}">
<display-entity entity-name="PaymentGroupType"/>
</field>
<field name="paymentGroupTypeId" use-when="paymentGroup==null" title="${uiLabelMap.CommonType}">
@@ -193,10 +193,8 @@ under the License.
<decorator-screen name="CommonTaxAuthorityDecorator" location="${parameters.taxAuthDecoratorLocation}">
<decorator-section name="body">
<screenlet id="TaxAuthorityCategoryPanel" title="${uiLabelMap.PageTitleAddTaxAuthorityCategory}" collapsible="true">
<label style="h3">${uiLabelMap.AccountingTaxAuthorityCategoryAdvice}</label>
<include-form name="AddTaxAuthorityRateProduct" location="component://accounting/widget/TaxAuthorityForms.xml"/>
</screenlet>
<label style="h3">${uiLabelMap.AccountingTaxAuthorityCategoryAdvice}</label>
<include-form name="ListTaxAuthorityRateProducts" location="component://accounting/widget/TaxAuthorityForms.xml"/>
</decorator-section>
</decorator-screen>
@@ -40,6 +40,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="tabButtonItem" value="main"></set>
<set field="invoiceTypeId" value="PURCHASE_INVOICE"/>
@@ -42,6 +42,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="tabButtonItem" value="main"/>
<set field="invoiceTypeId" value="SALES_INVOICE"/>
@@ -63,12 +63,7 @@ under the License.
<section>
<actions>
<set field="titleProperty" value="AccountingFindArInvoices"/>
<service service-name="performFind" result-map="result">
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="entityName" value="InvoiceAndType"/>
<field-map field-name="orderBy" value="invoiceDate DESC"/>
</service>
<set field="invoices" from-field="result.listIt"/>
<set field="tabButtonItem" value="viewInvoices"/>
</actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -85,9 +80,7 @@ under the License.
<include-form name="FindArInvoices" location="component://accounting/widget/ar/forms/InvoiceForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<platform-specific>
<html><html-template location="component://accounting/template/ar/invoice/ListInvoices.ftl"/></html>
</platform-specific>
<include-form name="ListInvoices" location="component://accounting/widget/InvoiceForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -90,6 +90,19 @@ under the License.
<responsecode>301</responsecode>
</forward>
</url-config>
<url-config>
<description>sample: remove /control in baseEcommerceSecureUrl (OFBIZ-11267)</description>
<url-pattern>^/ecomseo/control/(.*)$</url-pattern>
<seo>
<replacement>/ecomseo/$1</replacement>
</seo>
<forward>
<replacement>/ecomseo/$1</replacement>
<responsecode>301</responsecode>
</forward>
</url-config>
</url-configs>
<char-filters>
@@ -42,7 +42,8 @@ under the License.
<response name="success" type="view-last"/>
</request-map>
<request-map uri="stream">
<request-map uri="stream">
<security https="true" auth="true"/>
<event type="java" path="org.apache.ofbiz.content.data.DataEvents" invoke="serveObjectData"/>
<response name="success" type="none"/>
<response name="error" type="view" value="error"/>
@@ -57,6 +57,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -65,6 +70,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -80,8 +89,11 @@
<servlet-name>ControlServlet</servlet-name>
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -119,7 +119,8 @@
<field name="payToPartyId"><hidden value="${partyId}"/></field>
<field name="partyId"><hidden value="${partyId}"/></field>
<field name="inventoryFacilityId"><hidden value="${parameters.facilityId}"/></field>
<field name="visualThemeId"><hidden value="EC_DEFAULT"/></field>
<!-- visualThemeId must be replaced by ecomThemeId because of Entity.field names conflict. See OFBIZ-10567 -->
<field name="ecomThemeId" entry-name="visualThemeId"><hidden value="EC_DEFAULT"/></field>
<field name="manualAuthIsCapture"><hidden value="N"/></field>
<field name="prorateShipping"><hidden value="Y"/></field>
<field name="prorateTaxes"><hidden value="Y"/></field>
@@ -955,6 +955,9 @@
<value xml:lang="zh">内容</value>
<value xml:lang="zh-TW">內容</value>
</property>
<property key="ContentContentCreatedSuccessfully">
<value xml:lang="en">Content created successfully.</value>
</property>
<property key="ContentContentCreatingError">
<value xml:lang="en">Error creating content in ${serviceName}</value>
<value xml:lang="fr">Erreur de création du document dans le service ${serviceName}</value>
@@ -965,6 +968,9 @@
<value xml:lang="zh">在${serviceName}中创建内容时出错</value>
<value xml:lang="zh-TW">在${serviceName}中新建內容時出錯</value>
</property>
<property key="ContentContentDeletedSuccessfully">
<value xml:lang="en">Content deleted successfully.</value>
</property>
<property key="ContentContentIdOrUploadFileIsMissing">
<value xml:lang="en">Content Id or Upload file is missing.</value>
<value xml:lang="fr">La référence du document ou le fichier à charger est manquant.</value>
@@ -1061,6 +1067,9 @@
<value xml:lang="zh">内容到(contentTo) ${contentTo}/内容自(contentFrom) ${contentFrom} 是空的(null)</value>
<value xml:lang="zh-TW">內容_迄(contentTo) ${contentTo}/內容_起(contentFrom) ${contentFrom} 是空的(null)</value>
</property>
<property key="ContentContentUpdatedSuccessfully">
<value xml:lang="en">Content updated successfully.</value>
</property>
<property key="ContentContentUpdatingError">
<value xml:lang="en">Error updating content in ${serviceName}</value>
<value xml:lang="fr">Erreur lors de la mise à jour du document ${serviceName}</value>
@@ -21,6 +21,7 @@ img.request=/content/control/img/
img.request.param.name=imgId
stream.permission.service=genericContentPermission
stream.buffersize=8192
baseUrl=https://localhost:8443
disable.ftl.template.cache=true
@@ -37,4 +38,6 @@ content.upload.always.local.file=true
content.output.path=runtime/output
# default mime type used in *ContentWrapper classes
defaultMimeType=text/html; charset=utf-8
defaultMimeType=text/html; charset=utf-8
@@ -38,10 +38,8 @@ under the License.
<DataResource dataResourceId="DR1103b" dataResourceTypeId="OFBIZ_FILE_BIN" objectInfo="/applications/content/data/pdftest2.pdf" mimeTypeId="application/pdf" dataResourceName="Personal Profile"/>
<DataResource dataResourceId="DR1105b" dataResourceTypeId="OFBIZ_FILE_BIN" objectInfo="/applications/content/data/mswordtest2.doc" mimeTypeId="application/msword" dataResourceName="2nd Quarter Review"/>
<DataResource dataResourceId="DR1103a" dataResourceTypeId="OFBIZ_FILE_BIN" objectInfo="/applications/content/data/pdftest2.pdf" mimeTypeId="application/pdf" dataResourceName="Personal Profile"/>
<DataResource dataResourceId="DR1105a" dataResourceTypeId="OFBIZ_FILE_BIN" objectInfo="/applications/content/data/mswordtest2.doc" mimeTypeId="application/msword" dataResourceName="2nd Quarter Review"/>
<DataResource dataResourceId="DR1101" mimeTypeId="application/pdf" dataResourceName="Letter of inquiry"/>
<DataResource dataResourceId="DR1102" mimeTypeId="application/pdf" dataResourceName="POA Contract"/>
@@ -101,11 +99,9 @@ under the License.
<!-- sample instances CDT CDT1201 -->
<Content contentId="CDI1201" instanceOfContentId="CDT1201" contentTypeId="COMPDOC_INSTANCE" contentName="Demo Instance Root (CDI) 1201" ownerContentId=""/>
<Content contentId="CDI1103" instanceOfContentId="CDT1103" dataResourceId="DR1103b" contentTypeId="DOCUMENT" contentName="Personal Profile" ownerContentId=""/>
<Content contentId="CDI1105" instanceOfContentId="CDT1105" dataResourceId="DR1105b" contentTypeId="DOCUMENT" contentName="2nd Quarter Review" ownerContentId=""/>
<ContentAssoc contentIdTo="CDT1201" contentId="CDI1201" contentAssocTypeId="INSTANCE" fromDate="2006-01-12 01:01:01" sequenceNum="0020"/>
<ContentAssoc contentIdTo="CDI1201" contentId="CDI1103" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="00130"/>
<ContentAssoc contentIdTo="CDI1201" contentId="CDI1105" contentAssocTypeId="COMPDOC_PART" fromDate="2006-01-12 01:01:01" sequenceNum="0050"/>
<!-- sample revision entries for CDT CDT1201 -->
<ContentRevision contentId="CDT1201" contentRevisionSeqId="000002"/>
@@ -130,22 +126,18 @@ under the License.
<ContentRevision contentId="CDT1201" contentRevisionSeqId="000013"/>
<ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000013" itemContentId="CDT1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
<ContentRevisionItem contentId="CDT1201" contentRevisionSeqId="000013" itemContentId="CDT1105" oldDataResourceId="DR1105a" newDataResourceId="DR1105b"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000005"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000005" itemContentId="CDI1103" newDataResourceId="DR1103a"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000006"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000006" itemContentId="CDI1105" newDataResourceId="DR1105a"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000009"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000009" itemContentId="CDI1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000010"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000010" itemContentId="CDI1105" oldDataResourceId="DR1105a" newDataResourceId="DR1105b"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000013"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000013" itemContentId="CDI1103" oldDataResourceId="DR1103a" newDataResourceId="DR1103b"/>
<ContentRevision contentId="CDI1201" contentRevisionSeqId="000014"/>
<ContentRevisionItem contentId="CDI1201" contentRevisionSeqId="000014" itemContentId="CDI1105" oldDataResourceId="DR1105a" newDataResourceId="DR1105b"/>
<!-- sample approval entries for CDT CD0001 -->
@@ -19,6 +19,7 @@
import org.apache.ofbiz.base.util.Debug
import org.apache.ofbiz.base.util.UtilDateTime
import org.apache.ofbiz.base.util.UtilFormatOut
import org.apache.ofbiz.minilang.SimpleMapProcessor
import org.apache.ofbiz.content.data.DataResourceWorker
import org.apache.ofbiz.webapp.ftl.FreeMarkerViewHandler
@@ -50,6 +50,8 @@
<create-value value-field="content"/>
<field-to-result field="content.contentId" result-name="contentId"/>
<check-errors/>
<property-to-field property="ContentContentCreatedSuccessfully" resource="ContentUiLabels" field="successMessage"/>
</simple-method>
<simple-method method-name="updateContent" short-description="Update a Content Record">
<entity-one entity-name="Content" value-field="content" auto-field-map="true"/>
@@ -61,6 +63,8 @@
<store-value value-field="content"/>
<field-to-result field="content.contentId" result-name="contentId"/>
<check-errors/>
<property-to-field property="ContentContentUpdatedSuccessfully" resource="ContentUiLabels" field="successMessage"/>
</simple-method>
<simple-method method-name="removeContent" short-description="Remove a Content Record">
<make-value entity-name="Content" value-field="lookupKeyValue"/>
@@ -68,6 +72,8 @@
<find-by-primary-key entity-name="Content" map="lookupKeyValue" value-field="content"/>
<remove-value value-field="content"/>
<check-errors/>
<property-to-field property="ContentContentDeletedSuccessfully" resource="ContentUiLabels" field="successMessage"/>
</simple-method>
<simple-method method-name="removeContentAndRelated" short-description="Remove a Content Record, related resource(s) and assocs.">
<entity-one entity-name="Content" value-field="content"/>
@@ -765,83 +771,6 @@
<field-to-result field="contentId"/>
</simple-method>
<simple-method method-name="getSubContentWithPermCheck" short-description="Get sub content and perform permission check on each record">
<set field="filterByDate" from-field="parameters.filterByDate" default-value="true" type="Boolean"/>
<set field="useCache" from-field="parameters.useCache" default-value="true" type="Boolean"/>
<entity-condition entity-name="ContentAssocViewTo" list="viewList" filter-by-date="${filterByDate}" use-cache="${useCache}">
<condition-list combine="and">
<condition-expr field-name="contentIdStart" from-field="parameters.contentId"/>
<condition-expr field-name="caContentAssocTypeId" from-field="parameters.contentAssocTypeId" ignore-if-empty="true"/>
<condition-expr field-name="caMapKey" from-field="parameters.mapKey" ignore-if-empty="true"/>
</condition-list>
</entity-condition>
<iterate list="viewList" entry="view">
<set field="hasPermission" value="true" type="Boolean"/>
<if>
<condition>
<and>
<not>
<if-empty field="parameters.mainAction"/>
</not>
<not>
<if-empty field="parameters.userLogin"/>
</not>
</and>
</condition>
<then>
<set field="inMap.contentId" from-field="parameters.contentId"/>
<set field="inMap.mainAction" from-field="parameters.mainAction"/>
<set field="inMap.userLogin" from-field="parameters.userLogin"/>
<set field="inMap.contentOperationId" from-field="parameters.contentOperationId" default-value="CONTENT_CREATE"/>
<call-service service-name="genericContentPermission" in-map-name="inMap" include-user-login="true">
<result-to-field result-name="hasPermission"/>
</call-service>
</then>
</if>
<if-compare field="hasPermission" operator="equals" value="true" type="Boolean">
<set field="contentViewList[]" from-field="view"/>
</if-compare>
</iterate>
<field-to-result field="contentViewList" result-name="subContentList"/>
</simple-method>
<simple-method method-name="getSubSubContentWithPermCheck" short-description="Get sub content and perform permission check on each record">
<set-service-fields service-name="getSubContentWithPermCheck" map="parameters" to-map="inMap"/>
<call-service service-name="getSubContentWithPermCheck" in-map-name="inMap">
<result-to-field result-name="subContentList"/>
</call-service>
<iterate list="subContentList" entry="view">
<entity-condition list="viewList" entity-name="ContentAssocViewTo" filter-by-date="true" use-cache="${useCache}">
<condition-list combine="and">
<condition-expr field-name="contentIdStart" from-field="view.caContentIdTo"/>
<condition-expr field-name="caContentAssocTypeId" from-field="parameters.subContentAssocTypeId" ignore-if-empty="true"/>
<condition-expr field-name="caMapKey" from-field="parameters.subMapKey" ignore-if-empty="true"/>
</condition-list>
</entity-condition>
<clear-field field="view2"/>
<first-from-list list="viewList" entry="view2"/>
<clear-field field="map"/>
<set field="map.contentIdFrom" from-field="view.contentId"/>
<set field="map.dataResourceIdFrom" from-field="view.dataResourceId"/>
<set field="map.contentId" from-field="view2.contentId"/>
<set field="map.contentName" from-field="view2.contentName"/>
<set field="map.description" from-field="view2.description"/>
<entity-one entity-name="ElectronicText" value-field="electronicText">
<field-map field-name="dataResourceId" from-field="view2.dataResourceId"/>
</entity-one>
<set field="map.textData" from-field="electronicText.textData"/>
<set field="contentViewList[]" from-field="map"/>
</iterate>
<field-to-result field="subContentList" result-name="subContentList"/>
<field-to-result field="contentViewList" result-name="subSubContentList"/>
</simple-method>
<simple-method method-name="forceIndexContentKeywords" short-description="induce all the keywords of a content">
<entity-one entity-name="Content" value-field="content"/>
<call-class-method class-name="org.apache.ofbiz.content.content.ContentKeywordIndex" method-name="forceIndexKeywords">
+17 -35
View File
@@ -25,7 +25,7 @@
<!-- interfaces -->
<service name="uploadFileInterface" engine="interface">
<description>Contains necessary paramters for all file upload requests via service event handler</description>
<description>Contains necessary parameters for all file upload requests via service event handler</description>
<attribute name="uploadedFile" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
<attribute name="_uploadedFile_fileName" type="String" mode="IN" optional="true"/>
<attribute name="_uploadedFile_contentType" type="String" mode="IN" optional="true"/>
@@ -40,33 +40,6 @@
<attribute mode="OUT" name="resultData" optional="true" type="java.util.Map"/>
</service>
<service name="getSubContentWithPermCheck" engine="simple" auth="true"
location="component://content/minilang/content/ContentServices.xml" invoke="getSubContentWithPermCheck">
<description>Get Content and resource information</description>
<permission-service service-name="genericContentPermission" main-action="VIEW"/>
<attribute mode="IN" name="contentId" optional="false" type="String">
<type-validate>
<fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
</type-validate>
</attribute>
<attribute mode="IN" name="contentAssocTypeId" optional="true" type="String"/>
<attribute mode="IN" name="mapKey" optional="true" type="String"/>
<attribute mode="IN" name="mainAction" optional="true" type="String"/>
<attribute mode="IN" name="contentOperationId" optional="true" type="String"/>
<attribute mode="IN" name="useCache" optional="true" type="Boolean"/>
<attribute mode="IN" name="filterByDate" optional="true" type="Boolean"/>
<attribute mode="OUT" name="subContentList" optional="true" type="java.util.List"/>
</service>
<service name="getSubSubContentWithPermCheck" engine="simple" auth="true"
location="component://content/minilang/content/ContentServices.xml" invoke="getSubSubContentWithPermCheck">
<description>Get Content associated with Content</description>
<implements service="getSubContentWithPermCheck"/>
<attribute mode="IN" name="subContentAssocTypeId" optional="true" type="String"/>
<attribute mode="IN" name="subMapKey" optional="true" type="String"/>
<attribute mode="OUT" name="subSubContentList" optional="true" type="java.util.List"/>
</service>
<service name="getContentAndDataResource" engine="simple" default-entity-name="Content" auth="true"
location="component://content/minilang/content/ContentServices.xml" invoke="getContentAndDataResource">
<description>Get Content and resource information</description>
@@ -189,7 +162,7 @@
<service name="createSimpleTextContent" engine="simple" location="component://content/minilang/content/ContentServices.xml" invoke="createSimpleTextContent">
<permission-service service-name="contentManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" entity-name="Content" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="false" allow-html="any">
<attribute name="text" type="String" mode="IN" optional="false" allow-html="safe">
<type-validate>
<fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingText"/>
</type-validate>
@@ -199,7 +172,7 @@
<service name="updateSimpleTextContent" engine="simple" location="component://content/minilang/content/ContentServices.xml" invoke="updateSimpleTextContent">
<permission-service service-name="contentManagerPermission" main-action="UPDATE"/>
<attribute name="textDataResourceId" type="String" mode="IN" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="any"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="safe"/>
</service>
<!-- Util -->
@@ -367,7 +340,7 @@
<attribute mode="IN" name="forceElectronicText" optional="true" type="String"/>
<attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
<attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="persistDataResourceAndData" engine="java"
@@ -478,6 +451,9 @@
<service name="createArticleContent" engine="simple" transaction-timeout="300" auth="true"
location="component://content/minilang/content/ContentServices.xml" invoke="createArticleContent">
<description>Creates content records for a blog entry</description>
<required-permissions join-type="AND">
<check-permission permission="CONTENTMGR" action="_CREATE"/>
</required-permissions>
<implements service="createContentFromUploadedFile" optional="true"/>
<implements service="createTextContent" optional="true"/>
<attribute name="contentIdFrom" type="String" mode="IN" optional="false">
@@ -1080,6 +1056,9 @@
<service name="createBlogEntry" engine="simple" auth="true"
location="component://content/minilang/blog/BlogServices.xml" invoke="createBlogEntry">
<description>Creates content records for a blog entry</description>
<required-permissions join-type="AND">
<check-permission permission="CONTENTMGR" action="_CREATE"/>
</required-permissions>
<implements service="uploadFileInterface" optional="true"/>
<attribute name="blogContentId" type="String" mode="INOUT" optional="false">
<type-validate>
@@ -1091,12 +1070,15 @@
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
<attribute name="templateDataResourceId" type="String" mode="IN" optional="true"/>
<attribute name="articleData" type="String" mode="IN" optional="true" allow-html="none"/>
<attribute name="summaryData" type="String" mode="IN" optional="true" allow-html="none"/>
<attribute name="articleData" type="String" mode="IN" optional="true" allow-html="safe"/>
<attribute name="summaryData" type="String" mode="IN" optional="true" allow-html="safe"/>
</service>
<service name="updateBlogEntry" engine="simple" auth="true"
location="component://content/minilang/blog/BlogServices.xml" invoke="updateBlogEntry">
<description>Updates content records for a blog entry</description>
<required-permissions join-type="AND">
<check-permission permission="CONTENTMGR" action="_UPDATE"/>
</required-permissions>
<implements service="uploadFileInterface" optional="true"/>
<attribute name="blogContentId" type="String" mode="INOUT" optional="false">
<type-validate>
@@ -1112,8 +1094,8 @@
<attribute name="statusId" type="String" mode="IN" optional="true"/>
<attribute name="description" type="String" mode="IN" optional="true"/>
<attribute name="templateDataResourceId" type="String" mode="IN" optional="true"/>
<attribute name="articleData" type="String" mode="IN" optional="true" allow-html="none"/>
<attribute name="summaryData" type="String" mode="IN" optional="true" allow-html="none"/>
<attribute name="articleData" type="String" mode="IN" optional="true" allow-html="safe"/>
<attribute name="summaryData" type="String" mode="IN" optional="true" allow-html="safe"/>
</service>
<service name="getBlogEntry" engine="simple" auth="true"
location="component://content/minilang/blog/BlogServices.xml" invoke="getBlogEntry">
@@ -28,6 +28,9 @@
<description>Create a Content</description>
<permission-service service-name="genericContentPermission" main-action="CREATE"/>
<auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
<attribute name="contentAssocTypeId" type="String" mode="INOUT" optional="true"/>
<attribute name="contentIdFrom" type="String" mode="INOUT" optional="true"/>
<attribute name="contentIdTo" type="String" mode="INOUT" optional="true"/>
<!-- TODO: the following fields are deprecated; but will not be removed until all services and callers are updated -->
<attribute mode="IN" name="targetOperationList" optional="true" type="List"/>
<attribute mode="IN" name="targetOperationString" optional="true" type="String"/>
@@ -48,8 +51,8 @@
<attribute name="fromDate" type="Timestamp" mode="INOUT" optional="true"/>
<attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
<override name="contentTypeId" default-value="DOCUMENT"/>
<override name="contentName" allow-html="any"/>
<override name="description" allow-html="any"/>
<override name="contentName" allow-html="safe"/>
<override name="description" allow-html="safe"/>
</service>
<service name="createTextAndUploadedContent" engine="simple" auth="true"
@@ -141,14 +144,14 @@
<attribute mode="IN" name="skipPermissionCheck" optional="true" type="String"/>
<attribute mode="IN" name="displayFailCond" optional="true" type="Boolean"/>
<attribute mode="INOUT" name="roleTypeList" optional="true" type="List"/>
<!-- end of depricated fields -->
<override name="contentName" allow-html="any"/>
<override name="description" allow-html="any"/>
<!-- end of deprecated fields -->
<override name="contentName" allow-html="safe"/>
<override name="description" allow-html="safe"/>
</service>
<service name="updateTextContent" engine="group" auth="true">
<description>Updates a Text Document DataResource and Content Records</description>
<!-- uses updateContent internally; additonal permission(s) not necessary -->
<!-- uses updateContent internally; additional permission(s) not necessary -->
<group>
<invoke name="updateDataText" result-to-context="true"/>
<invoke name="updateContent" result-to-context="true"/>
@@ -37,8 +37,8 @@
<attribute name="dataResourceId" type="String" mode="OUT" optional="false"/>
<attribute name="dataResource" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
<attribute name="uploadedFile" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
<override name="objectInfo" allow-html="any"/>
<override name="dataResourceName" allow-html="any"/>
<override name="objectInfo" allow-html="safe"/>
<override name="dataResourceName" allow-html="safe"/>
</service>
<service name="createDataResourceAndAssocToContent" default-entity-name="DataResource" engine="simple"
location="component://content/minilang/data/DataServices.xml" invoke="createDataResourceAndAssocToContent" auth="true">
@@ -61,8 +61,8 @@
<fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingDataResourceId"/>
</type-validate>
</attribute>
<override name="objectInfo" allow-html="any"/>
<override name="dataResourceName" allow-html="any"/>
<override name="objectInfo" allow-html="safe"/>
<override name="dataResourceName" allow-html="safe"/>
</service>
<service name="removeDataResource" engine="entity-auto" default-entity-name="DataResource" auth="true" invoke="delete">
<description>Remove DataResource</description>
@@ -91,7 +91,7 @@
<description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description>
<auto-attributes include="pk" mode="INOUT" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="textData" mode="IN" optional="true" type="String" allow-html="any"/>
<attribute name="textData" mode="IN" optional="true" type="String" allow-html="safe"/>
<attribute name="targetOperationList" type="List" mode="IN" optional="true"/>
<attribute name="contentPurposeList" type="List" mode="IN" optional="true"/>
<attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/>
@@ -101,7 +101,7 @@
<description>Create a DataResource and, possibly, ElectronicText or ImageDataResource</description>
<auto-attributes include="pk" mode="IN" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="textData" mode="IN" type="String" optional="true" allow-html="any"/>
<attribute name="textData" mode="IN" type="String" optional="true" allow-html="safe"/>
<attribute name="targetOperationList" type="List" mode="IN" optional="true"/>
<attribute name="contentPurposeList" type="List" mode="IN" optional="true"/>
<attribute name="skipPermissionCheck" type="String" mode="IN" optional="true"/>
@@ -115,7 +115,7 @@
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="dataResourceTypeId" default-value="ELECTRONIC_TEXT"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="updateElectronicText" default-entity-name="ElectronicText" engine="entity-auto" invoke="update" auth="true">
<description>Update a ElectronicText</description>
@@ -123,7 +123,7 @@
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="contentId" mode="INOUT" optional="true" type="String"/><!-- to optionaly know where this text is belonging to -->
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="createElectronicTextForm" default-entity-name="ElectronicText" engine="simple"
location="component://content/minilang/data/DataServices.xml" invoke="createElectronicTextForm" auth="true">
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang.StringUtils;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.GeneralRuntimeException;
@@ -167,7 +168,7 @@ public class CmsEvents {
GenericValue pathAlias = null;
try {
pathAlias = EntityQuery.use(delegator).from("WebSitePathAlias").where("webSiteId", webSiteId, "pathAlias", pathInfo).orderBy("-fromDate").cache().filterByDate().queryOne();
pathAlias = EntityQuery.use(delegator).from("WebSitePathAlias").where("webSiteId", webSiteId, "pathAlias", pathInfo).orderBy("-fromDate").cache().filterByDate().queryFirst();
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -179,16 +180,20 @@ public class CmsEvents {
if (!alias.startsWith("/")) {
alias = "/" + alias;
}
RequestDispatcher rd = request.getRequestDispatcher(request.getServletPath() + alias);
try {
rd.forward(request, response);
} catch (ServletException e) {
Debug.logError(e, module);
return "error";
} catch (IOException e) {
Debug.logError(e, module);
return "error";
}
String context = request.getContextPath();
String location = context + request.getServletPath();
GenericValue webSite = WebSiteWorker.getWebSite(request);
if (webSite != null && webSite.getString("hostedPathAlias") != null && !"ROOT".equals(pathInfo))
location += "/" + webSite.getString("hostedPathAlias");
String uriWithContext = request.getRequestURI();
String uri = uriWithContext.substring(context.length());
uri = uri.substring(0, uri.lastIndexOf('/'));
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
response.setHeader("Location", location + uri + alias);
response.setHeader("Connection", "close");
return null; // null to not process any views
}
@@ -288,6 +293,11 @@ public class CmsEvents {
RequestHandler rh = (RequestHandler) ctx.getAttribute("_REQUEST_HANDLER_");
templateMap.put("_REQUEST_HANDLER_", rh);
//Cache Headers
UtilHttp.setResponseBrowserProxyNoCache(response);
//Security Headers
UtilHttp.setResponseBrowserDefaultSecurityHeaders(response, null);
response.setStatus(statusCode);
try {
@@ -18,7 +18,6 @@
*******************************************************************************/
package org.apache.ofbiz.content.data;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -169,7 +168,7 @@ public class DataEvents {
String mimeType = DataResourceWorker.getMimeType(dataResource);
// hack for IE and mime types
if (userAgent.indexOf("MSIE") > -1) {
if (UtilValidate.isNotEmpty(userAgent) && userAgent.indexOf("MSIE") > -1) {
Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
mimeType = "application/octet-stream";
}
@@ -271,7 +270,7 @@ public class DataEvents {
// hack for IE and mime types
String userAgent = request.getHeader("User-Agent");
if (userAgent.indexOf("MSIE") > -1) {
if (userAgent != null && userAgent.indexOf("MSIE") > -1) {
Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
mimeType = "application/octet-stream";
}
@@ -281,7 +280,7 @@ public class DataEvents {
}
OutputStream os = response.getOutputStream();
Map<String, Object> resourceData = DataResourceWorker.getDataResourceStream(dataResource, "", application.getInitParameter("webSiteId"), UtilHttp.getLocale(request), application.getRealPath("/"), false);
os.write(IOUtils.toByteArray((ByteArrayInputStream)resourceData.get("stream")));
os.write(IOUtils.toByteArray((InputStream)resourceData.get("stream")));
os.flush();
} catch (GeneralException | IOException e) {
String errMsg = "Error downloading digital product content: " + e.toString();
@@ -30,6 +30,8 @@ import java.io.Writer;
import java.net.URL;
import java.net.URLConnection;
import java.nio.ByteBuffer;
import java.nio.file.Files;
import java.nio.file.StandardOpenOption;
import java.sql.Timestamp;
import java.util.Comparator;
import java.util.HashMap;
@@ -49,7 +51,6 @@ import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.ofbiz.base.location.FlexibleLocation;
import org.apache.ofbiz.base.util.Debug;
@@ -623,9 +624,10 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data
public static String renderDataResourceAsText(LocalDispatcher dispatcher, Delegator delegator, String dataResourceId, Map<String, Object> templateContext,
Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
Writer writer = new StringWriter();
try (Writer writer = new StringWriter()) {
renderDataResourceAsText(dispatcher, delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache, null);
return writer.toString();
}
}
public static String renderDataResourceAsText(LocalDispatcher dispatcher, String dataResourceId, Appendable out,
@@ -883,14 +885,13 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data
URL url = FlexibleLocation.resolveLocation(dataResource.getString("objectInfo"));
if (url.getHost() != null) { // is absolute
InputStream in = url.openStream();
int c;
StringWriter sw = new StringWriter();
try (InputStream in = url.openStream(); StringWriter sw = new StringWriter()) {
while ((c = in.read()) != -1) {
sw.write(c);
}
sw.close();
text = sw.toString();
}
} else {
String prefix = DataResourceWorker.buildRequestPrefix(delegator, locale, webSiteId, https);
String sep = "";
@@ -1100,7 +1101,7 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data
String objectInfo = dataResource.getString("objectInfo");
if (UtilValidate.isNotEmpty(objectInfo)) {
File file = DataResourceWorker.getContentFile(dataResourceTypeId, objectInfo, contextRoot);
return UtilMisc.toMap("stream", new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), "length", Long.valueOf(file.length()));
return UtilMisc.toMap("stream", Files.newInputStream(file.toPath(), StandardOpenOption.READ), "length", Long.valueOf(file.length()));
}
throw new GeneralException("No objectInfo found for FILE type [" + dataResourceTypeId + "]; cannot stream");
@@ -1131,7 +1132,7 @@ public class DataResourceWorker implements org.apache.ofbiz.widget.content.Data
public static ByteBuffer getContentAsByteBuffer(Delegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) throws IOException, GeneralException {
GenericValue dataResource = EntityQuery.use(delegator).from("DataResource").where("dataResourceId", dataResourceId).queryOne();
Map<String, Object> resourceData = DataResourceWorker.getDataResourceStream(dataResource, https, webSiteId, locale, rootDir, false);
ByteArrayInputStream stream = (ByteArrayInputStream) resourceData.get("stream");
InputStream stream = (InputStream) resourceData.get("stream");
ByteBuffer byteBuffer = ByteBuffer.wrap(IOUtils.toByteArray(stream));
return byteBuffer;
}
@@ -35,6 +35,7 @@ import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilHttp;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.service.ServiceUtil;
/**
@@ -66,6 +67,9 @@ public final class LayoutWorker {
return ServiceUtil.returnError(e4.getMessage());
}
if(lst.size() == 0 && UtilValidate.isNotEmpty(request.getAttribute("fileItems"))) {
lst = UtilGenerics.cast(request.getAttribute("fileItems"));
}
if (lst.size() == 0) {
String errMsg = UtilProperties.getMessage(err_resource,
"layoutEvents.no_files_uploaded", locale);
@@ -66,6 +66,7 @@ import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.ServiceUtil;
import org.apache.ofbiz.webapp.view.ApacheFopWorker;
import org.apache.ofbiz.widget.model.ThemeFactory;
import org.apache.ofbiz.widget.renderer.ScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
import org.apache.ofbiz.widget.renderer.VisualTheme;
@@ -89,6 +90,9 @@ public class OutputServices {
public static Map<String, Object> sendPrintFromScreen(DispatchContext dctx, Map<String, ? extends Object> serviceContext) {
Locale locale = (Locale) serviceContext.get("locale");
VisualTheme visualTheme = (VisualTheme) serviceContext.get("visualTheme");
if (visualTheme == null) {
visualTheme = ThemeFactory.resolveVisualTheme(null);
}
String screenLocation = (String) serviceContext.remove("screenLocation");
Map<String, Object> screenContext = UtilGenerics.checkMap(serviceContext.remove("screenContext"));
String contentType = (String) serviceContext.remove("contentType");
@@ -204,6 +208,9 @@ public class OutputServices {
Locale locale = (Locale) serviceContext.get("locale");
Delegator delegator = dctx.getDelegator();
VisualTheme visualTheme = (VisualTheme) serviceContext.get("visualTheme");
if (visualTheme == null) {
visualTheme = ThemeFactory.resolveVisualTheme(null);
}
String screenLocation = (String) serviceContext.remove("screenLocation");
Map<String, Object> screenContext = UtilGenerics.checkMap(serviceContext.remove("screenContext"));
String contentType = (String) serviceContext.remove("contentType");
@@ -18,6 +18,7 @@
*******************************************************************************/
package org.apache.ofbiz.content.survey;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
@@ -25,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilHttp;
import org.apache.ofbiz.service.*;
import org.apache.ofbiz.webapp.control.ConfigXMLReader;
import org.apache.ofbiz.webapp.control.ConfigXMLReader.RequestMap;
import org.apache.ofbiz.webapp.control.RequestHandler;
@@ -39,29 +41,25 @@ public class SurveyEvents {
public static final String module = SurveyEvents.class.getName();
public static String createSurveyResponseAndRestoreParameters(HttpServletRequest request, HttpServletResponse response) {
// Call createSurveyResponse as an event, easier to setup and ensures parameter security
ConfigXMLReader.Event createSurveyResponseEvent = new ConfigXMLReader.Event("service", null, "createSurveyResponse", true);
RequestHandler rh = (RequestHandler) request.getAttribute("_REQUEST_HANDLER_");
ConfigXMLReader.ControllerConfig controllerConfig = rh.getControllerConfig();
String requestUri = (String) request.getAttribute("thisRequestUri");
RequestMap requestMap = null;
LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
DispatchContext dctx = dispatcher.getDispatchContext();
Map<String, Object> combinedMap = UtilHttp.getCombinedMap(request);
try {
requestMap = controllerConfig.getRequestMapMap().get(requestUri);
} catch (WebAppConfigurationException e) {
Debug.logError(e, "Exception thrown while parsing controller.xml file: ", module);
}
String eventResponse = null;
try {
eventResponse = rh.runEvent(request, response, createSurveyResponseEvent, requestMap, null);
} catch (EventHandlerException e) {
Map<String, Object> surveyResponseMap = dctx.makeValidContext("createSurveyResponse", ModelService.IN_PARAM, combinedMap);
Map<String, Object> surveyResponseResult = dispatcher.runSync("createSurveyResponse", surveyResponseMap);
if (ServiceUtil.isError(surveyResponseResult)) {
Debug.logError(ServiceUtil.getErrorMessage(surveyResponseResult), module);
return "error";
}
request.setAttribute("surveyResponseId", surveyResponseResult.get("surveyResponseId"));
} catch (GenericServiceException e) {
Debug.logError(e, module);
return "error";
}
if (!"success".equals(eventResponse)) {
return eventResponse;
}
// Check for an incoming _ORIG_PARAM_MAP_ID_, if present get the session stored parameter map and insert it's entries as request attributes
Map<String, Object> combinedMap = UtilHttp.getCombinedMap(request);
if (combinedMap.containsKey("_ORIG_PARAM_MAP_ID_")) {
String origParamMapId = (String) combinedMap.get("_ORIG_PARAM_MAP_ID_");
UtilHttp.restoreStashedParameterMap(request, origParamMapId);
@@ -1810,19 +1810,19 @@ under the License.
<request-map uri="updateDocumentTree">
<security auth="true" https="true"/>
<event invoke="updateContent" type="service"/>
<response name="success" type="request-redirect-noparam" value="navigateContent"/>
<response name="success" type="view" value="navigateContent"/>
<response name="error" type="view" value="navigateContent"/>
</request-map>
<request-map uri="removeDocumentFromTree">
<security auth="true" https="true"/>
<event invoke="removeContentAssoc" path="" type="service"/>
<response name="success" type="request-redirect-noparam" value="navigateContent"/>
<response name="success" type="view" value="navigateContent"/>
<response name="error" type="view" value="navigateContent"/>
</request-map>
<request-map uri="addDocumentToTree">
<security auth="true" https="true"/>
<event invoke="createDocument" path="component://content/minilang/content/ContentEvents.xml" type="simple"/>
<response name="success" type="request-redirect-noparam" value="navigateContent"/>
<response name="success" type="view" value="navigateContent"/>
<response name="error" type="request" value="navigateContent"/>
</request-map>
<request-map uri="showContent">
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -88,6 +97,9 @@ under the License.
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -33,7 +33,6 @@ under the License.
<set field="layoutSettings.companyName" from-field="uiLabelMap.ContentCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ContentCompanySubtitle" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/contentimages/css/contentForum.css" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/common/js/util/OfbizUtil.js" global="true"/>
<set field="activeApp" value="contentmgr" global="true"/>
<set field="applicationMenuName" value="ContentAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml" global="true"/>
@@ -224,7 +224,7 @@ under the License.
</field>
<field name="statusId" use-when="currentValue==null"><ignored/></field>
<field name="statusId" use-when="currentValue!=null">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" value="${currentValue.statusId}"/>
<entity-order-by field-name="sequenceId"/>
@@ -187,7 +187,7 @@ under the License.
</field>
<field name="statusId" use-when="currentValue==null"><ignored/></field>
<field name="statusId" use-when="currentValue!=null">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" value="${currentValue.statusId}"/>
<entity-order-by field-name="sequenceId"/>
@@ -71,7 +71,7 @@ under the License.
<field name="contentName" title="${uiLabelMap.ContentArticleName}"><text size="40"/></field>
<field name="description"><textarea cols="60" rows="2"/></field>
<field name="summaryData" title="${uiLabelMap.ContentSummary}" widget-style="inputBox"><textarea cols="60" rows="4"/></field>
<field name="articleData" title="${uiLabelMap.ContentBlogArticle}" widget-style="inputBox"><textarea cols="100" rows="20" visual-editor-enable="true"/></field>
<field name="articleData" title="${uiLabelMap.ContentBlogArticle}" widget-style="inputBox"><textarea cols="100" rows="20" visual-editor-enable="false"/></field>
<field name="uploadedFile" title="${uiLabelMap.ContentImage}"><file size="25"/></field>
<field name="templateDataResourceId" title="${uiLabelMap.ContentTemplate}">
<drop-down>
@@ -33,7 +33,7 @@ under the License.
</form>
<form name="AddForumGroup" type="single" target="createForumGroup" title="" default-map-name="forumGroup"
header-row-style="header-row" default-table-style="basic-table">
<field name="forumGroupName" parameter-name="contentName"><text/></field>
<field name="forumGroupName" parameter-name="contentName" required-field="true"><text/></field>
<field name="forumGroupDescription" parameter-name="description"><text/></field>
<field name="contentTypeId"><hidden value="FORUM_ROOT"/></field>
<field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
@@ -56,17 +56,17 @@ under the License.
header-row-style="header-row" default-table-style="basic-table">
<alt-target use-when="webAnalyticsConfig==null" target="createWebAnalyticsConfig"/>
<auto-fields-service service-name="updateWebAnalyticsConfig" map-name="webAnalyticsConfig"/>
<field use-when="webAnalyticsConfig!=null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsType}">
<field use-when="webAnalyticsConfig!=null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsTypes}">
<display-entity entity-name="WebAnalyticsType"/>
</field>
<field use-when="webAnalyticsConfig==null&amp;&amp;webAnalyticsTypeId==null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsType}">
<field use-when="webAnalyticsConfig==null&amp;&amp;webAnalyticsTypeId==null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsTypes}">
<drop-down allow-empty="false">
<entity-options entity-name="WebAnalyticsType">
<entity-order-by field-name="webAnalyticsTypeId"/>
</entity-options>
</drop-down>
</field>
<field use-when="webAnalyticsConfig==null&amp;&amp;webAnalyticsTypeId!=null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsType}" tooltip="${uiLabelMap.CommonCannotBeFound}:[${webAnalyticsTypeId}]">
<field use-when="webAnalyticsConfig==null&amp;&amp;webAnalyticsTypeId!=null" name="webAnalyticsTypeId" title="${uiLabelMap.CatalogWebAnalyticsTypes}" tooltip="${uiLabelMap.CommonCannotBeFound}:[${webAnalyticsTypeId}]">
<text size="20" maxlength="20"/>
</field>
<field name="webSiteId" title="${uiLabelMap.CommonWebsite}"><hidden value="${parameters.webSiteId}"/></field>
@@ -93,7 +93,7 @@ under the License.
</service>
</actions>
<field name="pathAlias" sort-field="true" widget-style="buttontext">
<hyperlink description="${pathAlias}" target="EditWebSitePathAlias?webSiteId=${webSiteId}&amp;pathAlias=${pathAlias}"></hyperlink>
<hyperlink description="${pathAlias}" target="EditWebSitePathAlias?webSiteId=${webSiteId}&amp;pathAlias=${pathAlias}&amp;fromDate=${fromDate}"></hyperlink>
</field>
<field name="aliasTo" sort-field="true"><display/></field>
<field name="contentId" sort-field="true">
@@ -127,7 +127,8 @@ under the License.
<field name="contentId"><lookup target-form-name="LookupContent"/></field>
<field name="pathAlias" use-when="webSitePathAlias!=null"><display/></field>
<field name="pathAlias" use-when="webSitePathAlias==null" required-field="true"><text/></field>
<field name="fromDate" required-field="true"><date-time default-value="${nowTimestamp}"/></field>
<field name="fromDate" use-when="webSitePathAlias!=null"><display/></field>
<field name="fromDate" use-when="webSitePathAlias==null" required-field="true"><date-time default-value="${nowTimestamp}"/></field>
<field name="submitButton" use-when="webSitePathAlias!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
<field name="submitButton" use-when="webSitePathAlias==null" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -176,12 +176,13 @@ under the License.
<StatusItem description="Available" sequenceId="10" statusCode="AVAILABLE" statusId="CTNT_AVAILABLE" statusTypeId="CONTENT_STATUS"/>
<StatusValidChange statusId="CTNT_IN_PROGRESS" statusIdTo="CTNT_INITIAL_DRAFT" transitionName="First draft"/>
<StatusValidChange statusId="CTNT_IN_PROGRESS" statusIdTo="CTNT_PUBLISHED" transitionName="Publised, not revised"/>
<StatusValidChange statusId="CTNT_IN_PROGRESS" statusIdTo="CTNT_PUBLISHED" transitionName="published, not revised"/>
<StatusValidChange statusId="CTNT_IN_PROGRESS" statusIdTo="CTNT_AVAILABLE" transitionName="Available"/>
<StatusValidChange statusId="CTNT_IN_PROGRESS" statusIdTo="IM_PENDING" transitionName="Image Pending"/>
<StatusValidChange statusId="CTNT_INITIAL_DRAFT" statusIdTo="CTNT_REVISED_DRAFT" transitionName="Draft revised"/>
<StatusValidChange statusId="CTNT_INITIAL_DRAFT" statusIdTo="CTNT_PUBLISHED" transitionName="Initial draft Publised"/>
<StatusValidChange statusId="CTNT_INITIAL_DRAFT" statusIdTo="CTNT_PUBLISHED" transitionName="Initial draft published"/>
<StatusValidChange statusId="CTNT_REVISED_DRAFT" statusIdTo="CTNT_FINAL_DRAFT" transitionName="Final draft"/>
<StatusValidChange statusId="CTNT_REVISED_DRAFT" statusIdTo="CTNT_PUBLISHED" transitionName="Revised draft Publised"/>
<StatusValidChange statusId="CTNT_REVISED_DRAFT" statusIdTo="CTNT_PUBLISHED" transitionName="Revised draft published"/>
<StatusValidChange statusId="CTNT_FINAL_DRAFT" statusIdTo="CTNT_PUBLISHED" transitionName="Final draft Published"/>
<StatusValidChange statusId="CTNT_PUBLISHED" statusIdTo="CTNT_DEACTIVATED" transitionName="Deactivated"/>
<StatusValidChange statusId="CTNT_AVAILABLE" statusIdTo="CTNT_DEACTIVATED" transitionName="Available to Deactivated"/>
@@ -401,21 +401,38 @@ under the License.
<TermType description="Commission Term Maximum Per Unit" hasTable="N" parentTypeId="COMMISSION_TERM" termTypeId="FIN_COMM_MAX"/>
<TermType description="Incoterm" hasTable="N" parentTypeId="" termTypeId="INCO_TERM"/>
<TermType description="Incoterm Ex Works" parentTypeId="INCO_TERM" termTypeId="EXW"/>
<TermType description="Incoterm Free Carrier" parentTypeId="INCO_TERM" termTypeId="FCA"/>
<TermType description="Incoterm Free Alongside Ship" parentTypeId="INCO_TERM" termTypeId="FAS"/>
<TermType description="Incoterm Free On Board" parentTypeId="INCO_TERM" termTypeId="FOB"/>
<TermType description="Incoterm Cost and Freight" parentTypeId="INCO_TERM" termTypeId="CFR"/>
<TermType description="Incoterm Cost, Insurance and Freight" parentTypeId="INCO_TERM" termTypeId="CIF"/>
<TermType description="Incoterm Carriage Paid To" parentTypeId="INCO_TERM" termTypeId="CPT"/>
<TermType description="Incoterm Carriage and Insurance Paid to" parentTypeId="INCO_TERM" termTypeId="CIP"/>
<TermType description="Incoterm Delivered At Frontier" parentTypeId="INCO_TERM" termTypeId="DAF"/>
<TermType description="Incoterm Delivered Ex Ship" parentTypeId="INCO_TERM" termTypeId="DES"/>
<TermType description="Incoterm Delivered Ex Quay" parentTypeId="INCO_TERM" termTypeId="DEQ"/>
<TermType description="Incoterm Delivered Duty Unpaid" parentTypeId="INCO_TERM" termTypeId="DDU"/>
<TermType description="Incoterm Delivered Duty Paid" parentTypeId="INCO_TERM" termTypeId="DDP"/>
<TermType description="Purchasing" parentTypeId="" hasTable="" termTypeId="PURCHASING"/>
<TermType description="Incoterm 2020" parentTypeId="INCO_TERM" termTypeId="INCO_TERM_2020"/>
<TermType description="Incoterm 2020 Ex Works" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_EXW"/>
<TermType description="Incoterm 2020 Free Carrier" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_FCA"/>
<TermType description="Incoterm 2020 Free Alongside Ship" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_FAS"/>
<TermType description="Incoterm 2020 Free On Board" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_FOB"/>
<TermType description="Incoterm 2020 Carriage Paid To" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_CPT"/>
<TermType description="Incoterm 2020 Cost and Freight" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_CFR"/>
<TermType description="Incoterm 2020 Cost, Insurance and Freight" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_CIF"/>
<TermType description="Incoterm 2020 Carriage and Insurance Paid to" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_CIP"/>
<TermType description="Incoterm 2020 Delivered at Place Unloaded" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_DPU"/>
<TermType description="Incoterm 2020 Delivered at Place" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_DAP"/>
<TermType description="Incoterm 2020 Delivered Duty Paid" parentTypeId="INCO_TERM_2020" termTypeId="INCO_TERM_2020_DDP"/>
<TermType description="Incoterm 2010" parentTypeId="INCO_TERM" termTypeId="INCO_TERM_2010"/>
<TermType description="Incoterm 2010 Ex Works" parentTypeId="INCO_TERM_2010" termTypeId="EXW"/>
<TermType description="Incoterm 2010 Free Carrier" parentTypeId="INCO_TERM_2010" termTypeId="FCA"/>
<TermType description="Incoterm 2010 Free Alongside Ship" parentTypeId="INCO_TERM_2010" termTypeId="FAS"/>
<TermType description="Incoterm 2010 Free On Board" parentTypeId="INCO_TERM_2010" termTypeId="FOB"/>
<TermType description="Incoterm 2010 Cost and Freight" parentTypeId="INCO_TERM_2010" termTypeId="CFR"/>
<TermType description="Incoterm 2010 Cost, Insurance and Freight" parentTypeId="INCO_TERM_2010" termTypeId="CIF"/>
<TermType description="Incoterm 2010 Carriage Paid To" parentTypeId="INCO_TERM_2010" termTypeId="CPT"/>
<TermType description="Incoterm 2010 Carriage and Insurance Paid to" parentTypeId="INCO_TERM_2010" termTypeId="CIP"/>
<TermType description="Incoterm 2010 Delivered Duty Paid" parentTypeId="INCO_TERM_2010" termTypeId="DDP"/>
<TermType description="Incoterm 2000" parentTypeId="INCO_TERM" termTypeId="INCO_TERM_2000"/>
<TermType description="Incoterm 2000 Delivered At Frontier" parentTypeId="INCO_TERM_2000" termTypeId="DAF"/>
<TermType description="Incoterm 2000 Delivered Ex Ship" parentTypeId="INCO_TERM_2000" termTypeId="DES"/>
<TermType description="Incoterm 2000 Delivered Ex Quay" parentTypeId="INCO_TERM_2000" termTypeId="DEQ"/>
<TermType description="Incoterm 2000 Delivered Duty Unpaid" parentTypeId="INCO_TERM_2000" termTypeId="DDU"/>
<TermType description="Purchasing" termTypeId="PURCHASING"/>
<TermType description="Vendor Customer ID" parentTypeId="PURCHASING" termTypeId="PURCH_VENDOR_ID"/>
<TermType description="Preferred Freight" parentTypeId="PURCHASING" termTypeId="PURCH_FREIGHT"/>
@@ -57,7 +57,7 @@ under the License.
<alias entity-alias="CA" name="sequenceNum" group-by="true"/>
<alias entity-alias="CRI" name="rootRevisionContentId" field="contentId" group-by="true"/>
<alias entity-alias="CRI" name="itemContentId" group-by="true"/>
<alias entity-alias="CRI" name="contentRevisionSeqId" group-by="false"/>
<alias entity-alias="CRI" name="contentRevisionSeqId" group-by="true"/>
<alias entity-alias="CRI" name="maxRevisionSeqId" field="contentRevisionSeqId" function="max"/>
<view-link entity-alias="CA" rel-entity-alias="CRI">
<key-map field-name="contentId" rel-field-name="itemContentId"/>
@@ -526,6 +526,7 @@ under the License.
<field name="roleTypeIdTo" type="id"></field>
<field name="partyIdFrom" type="id"></field>
<field name="partyIdTo" type="id"></field>
<field name="emplFromDate" type="date-time"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="salaryStepSeqId" type="id"></field>
@@ -537,13 +538,14 @@ under the License.
<prim-key field="roleTypeIdTo"/>
<prim-key field="partyIdFrom"/>
<prim-key field="partyIdTo"/>
<prim-key field="emplFromDate"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="PAY_HIST_EMPLMNT" rel-entity-name="Employment">
<key-map field-name="roleTypeIdFrom"/>
<key-map field-name="roleTypeIdTo"/>
<key-map field-name="partyIdFrom"/>
<key-map field-name="partyIdTo"/>
<key-map field-name="fromDate"/>
<key-map field-name="emplFromDate" rel-field-name="fromDate"/>
</relation>
<relation type="one" fk-name="PAY_HIST_PGRD" rel-entity-name="PayGrade">
<key-map field-name="payGradeId"/>
@@ -2914,24 +2914,9 @@ under the License.
<field name="partyId" type="id"></field>
<field name="idByIpContactMechId" type="id"></field>
<field name="refByWebContactMechId" type="id"></field>
<relation type="one" fk-name="SERVER_HIT_PARTY" rel-entity-name="Party">
<key-map field-name="partyId"/>
</relation>
<relation type="one" fk-name="SERVER_HIT_IDBYIP" title="IdByIp" rel-entity-name="ContactMech">
<key-map field-name="idByIpContactMechId" rel-field-name="contactMechId"/>
</relation>
<relation type="one" fk-name="SERVER_HIT_REFWEB" title="RefByWeb" rel-entity-name="ContactMech">
<key-map field-name="refByWebContactMechId" rel-field-name="contactMechId"/>
</relation>
<relation type="one" fk-name="SERVER_HIT_CNT" rel-entity-name="Content">
<key-map field-name="internalContentId" rel-field-name="contentId"/>
</relation>
</extend-entity>
<extend-entity entity-name="ServerHitBin">
<field name="internalContentId" type="id"></field>
<relation type="one" fk-name="SERVER_HBIN_CNT" rel-entity-name="Content">
<key-map field-name="internalContentId" rel-field-name="contentId"/>
</relation>
</extend-entity>
<extend-entity entity-name="Visit">
<field name="contactMechId" type="id"></field>
@@ -4775,7 +4775,7 @@ under the License.
<field name="shippingPrice" type="currency-precise"></field>
<field name="currencyUomId" type="id"></field>
<field name="supplierProductName" type="name"></field>
<field name="supplierProductId" type="id"></field>
<field name="supplierProductId" type="id-long"></field>
<field name="canDropShip" type="indicator"></field>
<!-- field name="supplierCommissionPerc" type="fixed-point"><description>Unused field, better use commission run using agreements in accounting</description></field-->
<field name="comments" type="comment"></field>
@@ -191,6 +191,17 @@ under the License.
<key-map field-name="picklistBinId"/>
</view-link>
</view-entity>
<view-entity entity-name="PicklistAndBin"
package-name="org.apache.ofbiz.shipment.picklist"
title="Picklist and PicklistBin View">
<member-entity entity-alias="PL" entity-name="Picklist"/>
<member-entity entity-alias="PLB" entity-name="PicklistBin"/>
<alias-all entity-alias="PL"/>
<alias-all entity-alias="PLB"/>
<view-link entity-alias="PL" rel-entity-alias="PLB">
<key-map field-name="picklistId"/>
</view-link>
</view-entity>
<entity entity-name="PicklistBin"
package-name="org.apache.ofbiz.shipment.picklist"
title="Picklist Entity">
+1 -1
View File
@@ -41,9 +41,9 @@ under the License.
<!-- All components seed data -->
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/PartySeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/SecurityExtSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/ProductSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/ContentSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/WorkEffortSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/ProductSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/ManufacturingSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/AccountingSeedData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/seed/HumanResSeedData.xml"/>
@@ -21,6 +21,8 @@
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="FormFieldTitle_accountNumber">
<value xml:lang="en">Account Number</value>
<value xml:lang="de">Kontonummer</value>
<value xml:lang="es">Número de cuenta</value>
<value xml:lang="fr">N° de compte</value>
<value xml:lang="it">Numero Conto</value>
<value xml:lang="ja">アカウント番号</value>
@@ -32,6 +34,8 @@
</property>
<property key="FormFieldTitle_actualEmployerPaidPercent">
<value xml:lang="en">Actual Employer Paid Percent</value>
<value xml:lang="de">tatsächlich bezahlter Prozentsatz des Arbeitgebers</value>
<value xml:lang="es">Porcentaje pagado por el empleador</value>
<value xml:lang="fr">Pourcentage payé par l'employeur actuel</value>
<value xml:lang="it">Percentuale Pagata Attualmente all'Impiegato</value>
<value xml:lang="ja">実績従業員支払割合(%)</value>
@@ -43,6 +47,8 @@
</property>
<property key="FormFieldTitle_actualFromDate">
<value xml:lang="en">Actual From Date</value>
<value xml:lang="de">Einstellungsdatum</value>
<value xml:lang="es">Fecha actual</value>
<value xml:lang="fr">Date réelle de début</value>
<value xml:lang="it">Data Inizio Attuale</value>
<value xml:lang="ja">実績開始日</value>
@@ -102,6 +108,8 @@
</property>
<property key="FormFieldTitle_approvalStatus">
<value xml:lang="en">Approver Status</value>
<value xml:lang="de">Bewerberstatus</value>
<value xml:lang="es">Estado de aprobación</value>
<value xml:lang="fr">Etat d'approbation</value>
<value xml:lang="ja">承認ステータス</value>
<value xml:lang="vi">Trạng thái duyệt</value>
@@ -110,6 +118,8 @@
</property>
<property key="FormFieldTitle_approverId">
<value xml:lang="en">Approver Party</value>
<value xml:lang="de">Genehmiger Id</value>
<value xml:lang="es">Aprobador</value>
<value xml:lang="fr">Approbateur</value>
<value xml:lang="ja">承認者</value>
<value xml:lang="pt-BR">Participante responsável</value>
@@ -22,7 +22,10 @@
xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
<!-- Employment Group -->
<simple-method method-name="createEmployment" short-description="Create Employment"><!--entity-auto-->
<simple-method method-name="createEmployment" short-description="Create Employment">
<set-service-fields service-name="ensurePartyRoleTo" to-map="partyRoleMap" map="parameters"/>
<call-service service-name="ensurePartyRoleTo" in-map-name="partyRoleMap"/>
<make-value entity-name="Employment" value-field="newEntity"/>
<set-pk-fields value-field="newEntity" map="parameters"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
@@ -32,10 +35,45 @@
</if-empty>
<create-value value-field="newEntity"/>
<set-service-fields service-name="createPayHistory" map="newEntity" to-map="createPayHistoryMap"/><!--create by seca-->
<set-service-fields service-name="createPayHistory" map="parameters" to-map="createPayHistoryMap"/>
<set field="createPayHistoryMap.emplFromDate" from="parameters.fromDate"/>
<call-service service-name="createPayHistory" in-map-name="createPayHistoryMap"/>
</simple-method>
<simple-method method-name="updatePayHistory" short-description="Update PayHistory, expire current record and create a new">
<entity-one entity-name="PayHistory" value-field="lookedOldValue"/>
<!-- check if amount or payGrade or salaryStepSeqId change, if Yes so expire current record -->
<if>
<condition>
<and>
<if-compare-field to-field="lookedOldValue.amount" operator="equals" field="parameters.amount"/>
<if-compare-field to-field="lookedOldValue.payGradeId" operator="equals" field="parameters.payGradeId"/>
<if-compare-field to-field="lookedOldValue.salaryStepSeqId" operator="equals" field="parameters.salaryStepSeqId"/>
</and>
</condition>
<then>
<!-- just update comment -->
<set field="lookedOldValue.comments" from-field="parameters.comments"/>
<store-value value-field="lookedOldValue"/>
</then>
<else>
<!-- expire old record and create a new one -->
<set-service-fields service-name="expirePayHistory" map="parameters" to-map="expirePayHistoryMap"/>
<call-service service-name="expirePayHistory" in-map-name="expirePayHistoryMap"/>
<set-service-fields service-name="createPayHistory" map="parameters" to-map="createPayHistoryMap"/>
<if-empty field="parameters.changeDate">
<now-timestamp field="nowTimeStamp"/>
<set field="createPayHistoryMap.fromDate" from-field="nowTimeStamp"/>
<else>
<set field="createPayHistoryMap.fromDate" from-field="parameters.changeDate"/>
</else>
</if-empty>
<call-service service-name="createPayHistory" in-map-name="createPayHistoryMap"/>
</else>
</if>
<field-to-result field="parameters.emplFromDate" result-name="fromDate"/>
</simple-method>
<simple-method method-name="createEmplPositionReportingStruct" short-description="Create a Employee Position Reporting Structure">
<make-value entity-name="EmplPositionReportingStruct" value-field="newEntity"/>
<set-pk-fields map="parameters" value-field="newEntity"/>
+15 -5
View File
@@ -154,11 +154,18 @@ under the License.
</service>
<!-- Employment Group -->
<service name="createEmployment" engine="entity-auto" default-entity-name="Employment" invoke="create" auth="true">
<description>Create Employment</description>
<service name="createEmployment" engine="simple" default-entity-name="Employment"
location="component://humanres/minilang/HumanResServices.xml" invoke="createEmployment" auth="true">
<description>Create Employment and first record in PayHistory</description>
<permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<!-- For PayHistory -->
<attribute name="amount" mode="IN" type="BigDecimal" optional="true"/>
<attribute name="payGradeId" mode="IN" type="String" optional="true"/>
<attribute name="salaryStepSeqId" mode="IN" type="String" optional="true"/>
<attribute name="periodTypeId" mode="IN" type="String" optional="true"/>
<attribute name="comments" mode="IN" type="String" optional="true"/>
<override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
</service>
@@ -246,19 +253,22 @@ under the License.
<override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
</service>
<service name="updatePayHistory" engine="entity-auto" default-entity-name="PayHistory" invoke="update" auth="true">
<service name="updatePayHistory" engine="simple" default-entity-name="PayHistory"
location="component://humanres/minilang/HumanResServices.xml" invoke="updatePayHistory" auth="true">
<description>Update Pay History</description>
<permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<attribute name="changeDate" mode="IN" type="Timestamp" optional="true"/>
<attribute name="fromDate" mode="OUT" type="Timestamp"/>
</service>
<service name="deletePayHistory" engine="simple" default-entity-name="PayHistory" invoke="delete" auth="true">
<service name="deletePayHistory" engine="entity-auto" default-entity-name="PayHistory" invoke="delete" auth="true">
<description>Delete Pay History</description>
<permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
</service>
<service name="expirePayHistory" engine="simple" default-entity-name="PayHistory" invoke="expire" auth="true">
<service name="expirePayHistory" engine="entity-auto" default-entity-name="PayHistory" invoke="expire" auth="true">
<description>Expire Pay History</description>
<permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
@@ -0,0 +1,47 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Employee Positions
An employee position is also called a job position. It is a role that has been
created to perform a specific task within the Company. This means that it has
approved funding to pay it.
Employee positions are defined by:
* the work description and responsibilities
* a pay structure (e.g. hourly wages, salary, contract etc)
* full-time or part-time
* the skills needed to fullfill the position
NOTE: An employee positions is not the same as a person fullfilling the role.
A person fulfilling an employee position is called an employee
An employee position can be fullfilled (i.e. someone is currently working in the
role) or it can be unfulfilled (i.e. a job vacancy).
NOTE: In some cases an employee position could also be considered a full-time
equivalent (FTE) and can be assigned to more than one person (e.g. job sharing)
In the OFBiz Human Resources application you can:
* Create employee positions
* Fulfill employee positions
* Define the responsibilities of an employee position
* Define a tree reporting structure between employee positions
* Track employment position fulfillments over time
@@ -0,0 +1,39 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Employees
An employee is an individual that works for a company either full-time or
part-time under a formal employment contract. The company pays the employee
wages or salary.
NOTE: Wages tend to be related to an hourly rate and can vary based on the hours
worked whereas salary is a flat rate generally paid monthly.
The Employees feature manages information about people who have an employment
relationship with your Company or one of its departments. Details that can be
setup include an employee profile, a display of all employee related information
in a single screen and facilities for managing employee skills, qualifications,
training, leave and payroll history.
In OFBiz Human Resources you can
* Create a new employee
* Search for an existing employee
* View the full list of existing employees
@@ -0,0 +1,36 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Employments
An employment is a relationship between a person and your Company.
The Human Resources application tracks employment benefits, pay history,
unemployment claims and employment agreements for each employed person.
When you create new employee, an employee relationship is created automatically.
NOTE: If a person was entered into the application by some other means then you
will have to create the employee relationship manually in the Party Manager application.
The employment record includes the start and end date of the employment.
When the employment ends you include the type of termination and a reason.
For example, an employee may have been let go because of poor performance.
(In this case the 'type' could be 'fired and the reason could be 'poor performance')
The Employments screen can be used to create an employment or search for existing
employments.
@@ -0,0 +1,41 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Global HR Settings
Global HR Settings are used to setup the basic reference data that is used
throughout the Human Resources application. Many of the screens contain fields
that have drop-down lists for selection and these drop-down list can be setup
here.
TIP: You need to have 'administrator' or 'create privileges' to update any of
the Global HR Settings
== Skills Types
A skill type is used to define a skill group. Your employees, contractors and
partners may have hundreds of different of skills so skill types allows you to
organise these skills so they are manageable.
This is helpful for reporting on your companies skill inventory or searching for
resources with the skill types needed for a job. You can search for skills types
and assign skills to people and organisations in the Skills feature.
TIP: You can manage the skills of an individual or an organisation in their
profile in Party Manager uisng the Party Skills feature.
@@ -0,0 +1,170 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Glossary
[#ANNUAL_REVENUE]
Annual Revenue::
Annual revenue is the amount of revenue for a group that is reported in the Party
Group Information screenlet of the groups profile (visit Party Profile screen).
[#BUDGET]
Budget::
A budget is used to track spending in the company for a future period of time.
The company may have one or more budgets depending on the requirements i.e. Operating
Budget, Capital Budget. A budget has a status, type and is composed of budget line
items.
[#EMPLOYEE]
Employee::
An employee is a person who has an employment relationship with your Company.
[#EMPLOYEE_POSITION_TYPE]
Employee Position Type::
Employee Positions Type is a name that describes a position. Business Analyst,
Programmer and System Administrator are examples of position types in the OFBiz
demo data. You can define your own position types in Global HR Settings > Position
Types.
[#EMPLOYMENT]
Employment::
Employment defines the relationship between your Company and a person who is an
employee. The employment relationship tracks employee benefits preferences, pay
history, and unemployment claims and agreements.
[#EXEMPT_FLAG]
Exempt Flag::
The exempt flag can be used to indicate if an employee position is exempt or non-exempt
under the fair labor Standards Act (FLSA).
[#FULFILLMENT]
Fulfillment::
A fulfillment associates a person with a position. A person can fulfill more than
one position and a position can have more then one person.
[#FULLTIME_FLAG]
Fulltime Flag::
The fulltime flag can be used to indicate if an employee position is for a full
or part time position.
[#HR_APP_MENU]
HR App Menu::
The main menu that opens the high level features of the HR App i.e. Employees,
Employments, Employee Position etc.
[#INTERNAL_ORGANIZATION]
Internal Organization::
Internal organization is the name of a relationship between a party group and your
company. This relationship is used to filter party groups as being part of your
company to distinguish them from other groups which are external. For example your
marketing department is an internal organization while a suppliers sales department
is not.
[#NUMBER_OF_EMPLOYEES]
Number of Employees::
Number of employees that are reported in the Party Group Information screenlet of
the groups profile (Visit Party Profile screen).
[#PARTY]
Party::
Party is a term used to simplify collecting information that used in a common manner
by different people and things. The most common party types are people and groups.
Both people and groups have contact information. A party is identified by a unique
Party Id. Using this Id OFBiz can collect and find contact (and other information
and processes) for both people and groups in the same way. This is why you will
often see Party Id as a field in a form or a filter as you work in OFBiz.
[#PARTY_ID]
Party Id::
The unique identifier for a party. The Id is text so in some cases you will see
an Id, created by a user, that carries some meaning i.e. Party Id DemoEmployee.
In other cases the Id is created by OFBiz and is will be simply a number from a
sequence. In either case the Id is unique.
[#Qualifications]
Qualifications::
Qualifications for an individual person or organization are in the Employees Qualifications
menu item. To find and update the qualifications of people and organizations visit
Qualifications menu.
[#PARTY_QUALIFICATION_TYPE]
Party Qualification Type::
Party qualifications define a person or organizations accomplishments that indicate
their suitability to perform a job. Qualifications are organized into qualification
groups for the purpose of managing and reporting.
[#PERSON]
Person::
Person is a human being as distinguished from a party group which is an organization.
Human beings and organizations have different attributes i.e. People have first and
last names while groups have group names. Both person and party group are types
of parties and share information and processes common to parties.
[#POSITION]
Position::
A position is a job that can be filled by more then one person over time or at
the same time. Positions are defined by a type of work. For example there may
be 20 positions in an organization for a secretary. Each position is related to
a department in the organization. A position can me thought of as a full-time
equivalent employee (FTE). So an FTE may be assigned to one or more positions
and position can be assigned to more then one FTEs (job sharing).
[#RATING]
Rating::
Rating is a user defined numeric rating for a skill. (See Skills Menu)
[#RESPONSIBILITY]
Responsibility::
Responsibilities define duties assigned to a position. They are defined in
Responsibility Types and assigned in Employee Position Responsibilities.
[#SALARY_FLAG]
Salary Flag::
The salary flag can be used to indicate if an employee position is salaried or
paid hourly.
[#SKILL]
Skill::
Skill is some ability or knowledge possessed by a person or organization that is
needed to perform a job for the company. See Skills
[#SKILL_LEVEL]
Skill Level::
Skill level is a user defined numeric rating a skill. It is up to the user to
assign some meaning to the level. For example 1=Entry, 2=Intermediate, 3=Expert
(See Skills Menu).
[#SKILL_GROUP]
Skill Group::
Skill goup is a name that describes a collection of skills that have common
attributes (See Skills Menu).
[#TEMPORARY_FLAG]
Temporary Flag::
A temporary flag can be used to indicate if an employee position is permanent or
temporary.
[#TERMINATION_REASON]
Termination Reason::
The termination reason is a name describing the cause related to a termination
type e.g. Type: resigned for reason: found new job.
[#TERMINATION_TYPE]
Termination Type::
The termination type is a name for the kind of termination e.g. Resigned, fired,
retired, layoff.
@@ -0,0 +1,130 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= About Human Resources
The people who work for your company are human capital and are its most important
asset. Selecting a software platform that increases the value of your companies human
capital and delivers benefits, services and opportunities to your workforce, is
critical to your companies success.
That platform must be able to accurately and reliability process worker transactions,
collect decision support information, and communicate between management, workers
and outside resources.
The OFBiz Human Resource application (HR App) can provide a stable foundation for
building that platform.
= Human Resources Processes
Human Resources Management can be divided into several distinct processes.
* Job Planning and Definition
* Recruitment
* Candidate Selection and Hiring
* Employee Training and Development
* Employee Evaluation and Performance Management
* Employee Salary and Benefits
== Job Planning and Definition
Generally job positions are authorised by a budget and fulfilled by people. The
person fulfilling the position may be a permanent employee, a temporary employee
or a contractor.
* Positions may be salary or hourly, fulltime or part time.
* Positions have responsibilities.
* Positions are defined by a type of work.
For example there may be 20 job positions in an organization for a administrative
clerk. Each position is has a job definition and is authorised by a budget request
from a department in the organization.
A position can be unfulfilled. (i.e a it exists but no one is currently employed
to do it).
In some cases a position could also be considered a full-time equivalent (FTE) and
can be assigned to more than one person (e.g. job sharing)
In the OFBiz Human Resources application you can:
* Create positions
* Fulfill positions
* Define the responsibilities of a position
* Define a tree reporting structure between positions
* Track the positions fulfillments over time
== Recruitment, Candidate Selection and Hiring
Recruitment is about at attracting applicants that match the skills and experience
you are looking for in a particular job position. Candidates can apply and after
reviewing their details, those who are the best match in terms of qualifications
and experience are short listed for interview. The final step is deciding upon the
final candidate that you want to hire and the employment contract details that
are related to that.
In the OFBiz Human Resouces application you can:
* Create a Requisition for new job positions
* Create Internal Job Postings
* Apply for job positions
* Review Resumes / CVs
* Arrange and Grade Interviews
== Employee Training and Development
Training and professional development is important for an organisation because it
ensures that your employees have the knowledge they need to perform their work.
It can also help to fill any gaps in skills and improve their proficiency.
In the OFBiz Human Resources application you can:
* Define and create training courses
* Schedule courses on a global training calendar
* Make course available (or unavailable) for enrollment
* Review and approve requests from employees to attend
== Performance Management and Employee Evaluation
Evaluating and managing the performance of employees is another main Human Resources
function. Performance reviews can be created for an employee and used to evaluate
the work that they have done in a particular job position. Comments and ratings
can also be added.
In the OFBiz Human Resources application you can:
* Create a new Performance Review for an employee
* Add individual review items such as Attitude, Communication or Technical Skills
* Add ratings or comments to each item
If an evaluation has gone well then the employee can be considered for promotion
to another job position, or can be given other benefits such as a salary increase.
== Employee Salary and Benefits Administration
Being able to manage employee salaries and associated benefits is a key part of
any Human Resources system.
In the OFBiz Human Resources application you can:
* Create Pay Grades
* Link Salary Steps within each Pay Grade
* Assign a Pay Grade and Salary Step to a Job Position filled by an Employee
* Manage employee holidays (leave)
* Manage associated benefits
* Calculate salaries and Generate Payslips
@@ -0,0 +1,46 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Leave
Generally each of your employees will be allowed to take a certain amount of
time off work on an annual basis. This time-off work can be called leave,
holiday or vacation. The amount and type of leave they can take may depend on
their job position or how long they have worked for you.
You may also allow your employees special leave such as days off when they are
ill (sick leave), time off during pregnacy or birth of a child (maternity or
paternity leave) or time off to attend a funeral (bereavement leave).
OFBiz allows you to setup a range of different leave types and categories to
cover many situations.
In all cases the employee will need to request the date (or dates) they would
like to take as leave. Next the manager of the employee will need to approve the
leave request. Once approved the employee can then take the leave.
In the OFBiz Human Resources application:
* Employees can schedule or a leave request
* Managers can create leave requests on behalf of an employee
* Managers can approve, reject or delete employee leave requests
NOTE: Users with Human Resource Approver permission can only approve a leave
request. To update or delete a leave request, you will need to have Human
Resources Administration permission.
@@ -0,0 +1,39 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Performance Review
Performance review allows employees to post reviews that can be used by management
in evaluating the performance of the individual employee.
The employee's position is also captured with the review which allows the creation
of reports that look at ratings for a review item by position.
*Performance Review Item*
Each review has a list of items that can be rated and commented on.
NOTE: Performance review item can be created or deleted but can not be changed.
In the OFBiz Human Resources application you can:
* Create performance review
* Search performance review
* Update performance review
* Add performance review item
* Delete performance review item
@@ -0,0 +1,35 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Qualifications
Qualifications are a feature of the recruitment process that allows you to record
the details of any qualifications held by job applicants or your existing
employees.
During the job application process, you may want to ensure that applicants have
a minimum set of qualifications as a requirement for a position. The details of
the qualifications for each applicant will need to be captured and if necessary,
verified.
For existing employees, details of qualifications during their employment with
your organisation can be added at any time.
In the case where qualifications expire if not renewed, you can also add an
expiry or renewal date.
@@ -0,0 +1,49 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Recruitment
Recruitment is an important function in any organisation. It is a set of processes
that allow you to specify, search for candidates to fulfill the roles that you
have available.
When you have a job position that needs to be fulfilled, you can create a Job
Requisition. The job requisition identifies the skills, qualifications, experience
and also the number of resources needed for a position.
NOTE: Currently the default assumption is that the Job Requisition is for an
Internal Job posting
Once the requisition is created, you can then create Job Posting based on the
requisition. For example if the requisition was for three (3) roles then three
job postings can be created (each with different application deadlines) one to
fulfill each of the positions.
People can then apply for the positions and send in their CVs or Resumes. You
can track the progress of the the application and also create details about
various types of job interviews needed (e.g. HR, Panel, Case Study
/Practical Test etc) and link it to the requisition.
You can also track the status of people who have applied for a position.
In the OFBiz Human Resource application you can
* Approve or reject job applications
* Manage and book job interviews
* Record the result of job interviews
@@ -0,0 +1,33 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Resumes
Resumes or Curriculum Vitae (CVs) are documents that job applicants use to apply
for job positions. These documents summarise the applicant's experience,
qualifications, contact information and details about why they are suitable for
a particular job position.
In OFBiz you can enter a resume as a document and then link it to a person.
Each resume entry has a unique identifier (that currently needs to be manually
entered!). This identifier links a person to an instance of their resume.
NOTE: The OFBiz Content Manager application is used for the linking of resumes
because it was designed for managing, storing and retrieving electronic data in
varying formats - such as text, images, MS Word, PDF or even web URL's.
@@ -0,0 +1,108 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
= Security
OFBiz has a security model that controls access to all aspects of teh system at
a very detailed level. This means that it is possible to manage what each user
has access to and what actions they can perform.
NOTE: Security can be so fine grained to the lowest level such as a view, or the
creation, update or deletion of a single item of information
This section covers the security permissions that inlcuded as part of the Human
Resources application and how an administrator can assign permissions to users
using the Party Manager application.
NOTE: A person may have one or more OFBiz login id's. Each login id can be
assigned to it's own set of Security Groups. This means that the id a user logs
in with determines what applications the person can work in and what work can be
done in the application.
== Human Resource Permissions
In OFBiz a Security Group is collection of permissions that allow a members of
the group to use the application and any resources. The Human Resources
application has three special security groups that can be assigned Human
Resources users. There are also other general administrative security groups
that let managers and administrators work in the application.
You can use the Party Manager application to add users to one or more Security
Groups.
The three special HR App Security Groups are named by role:
* Employee Role - This is mandatory to be able to logon into the Human Resources
application. This is true even if user has the the other Human Resources Approver
and Administration Roles. The employee role has the most restrictions on what a
user may view and the actions they can take.
* Approver Role - The Approver role gives members of the group the ability to
approve, training and employee leave requests. The approver has all of the
permissions included in the Employee Role and can also view and update some
additional screens that are not available to the Employee role.
* Administrator Role - The Human Resources Administrator Role has permission to
do most things in the Human Resources application. They are allowed full access
to view, create, update and delete throughout the Human Resources application.
Please see the note below for the additional permissions required to be able to
do everything in Human Resources.
NOTE: A person with the Human Administrator Role must also belong to the
following Security Groups (Work Effort User, My Portal Employee, My Portal
Customer or Scrum Team) to be able to add Training classes in the Training
feature.
== General OFBiz Permissions
Some OFBiz users (from the demo data) may not have any of the Human Resource
permissions but can still access the Human Resouces application to be able to
perform general operations. These include:
* Business Admin has permission for all operations in the Human Resources
application
* Flexible Admin has permission to create, update, delete and view operations
in Human Resources
* Full Admin has permission for all operations in Human Resources
* Super has permission for all operations in the Human Resources
* Viewadmin has permission for viewing details in Human Resources
== Security Administration In Party Manager
A user must be granted permission to use the Human Resources application. This
section describes how to do this using OFBiz Party Manager. It assumes the user
has a user login and Party administration privileges.
Please do the following to grant permissions
1. Login to the Party application
2. User the search functionality to locate the user that you want to give Human
Resources permissions to
3. When the search results are displayed, click on the Party ID column
4. In the User Name(s) screenlet click the Security Groups button for the User
Login that will receive Human Resources permissions
5. In the Add User Login to Security Group screenlet select the HUMANRES_EMPLOYEE.
from the Group drop-down-list.
6. Click the Add button to use the current date for the From Date or enter dates
for From Date and Thru Date as needed then click Add
7. If the person is to be allowed to approve Training add the HUMANRES_APPROVER
permission. As in the previous step enter dates as required
8. If the person is to be allowed all access then add the HUMANRES_ADMIN
permission... As in the previous steps enter dates as required.

Some files were not shown because too many files have changed in this diff Show More