Skip to content

Backend Growerp plugin for Apache OFBiz, Required for the flutter growerp frontend when using Apache OFBiz.

Notifications You must be signed in to change notification settings

growerp/growerp-ofbiz

Repository files navigation

Note: This software is currently not kept up to date with the updated GrowERP flutter frontend which works with Moqui Only.

This OFBiz plugin version works with the growerp frontend of december 10 2020. If you like this OFBiz plugin to work with newer GrowERP flutter versions, send a Pull request or sponsor this project, see the growerp.com website

GrowERP OFBiz plugin for the Flutter frontend.

Introduction

A plugin to serve the GrowERP frontend at https://github.com/growerp/growerp

Installation

install Apache Ofbiz on Ubuntu: (works on any OS very similarly)

git clone https://github.com/apache/ofbiz-framework.git ofbiz
git clone https://github.com/apache/ofbiz-plugins.git
cp ofbiz-plugins/ofbiz-rest-impl ofbiz/plugins
git clone https://github.com/growerp/growerp-ofbiz.git ofbiz/plugins/growerp
cd ofbiz
./gradlew loadAll
./gradlew ofbiz

Extra for local development

When in development, we need to change ofbiz to make the rest interface using http instead of https which is the OFBiz default.

change OFBiz Rest Plugin so you do not need a valid ssl certificate:

file: plugins/ofbiz-rest-impl/webapp/ofbiz-rest-jersey/WEB-INF/controller.xml
change:

from:     <request-map uri="main"><security https="true"/>
To:       <request-map uri="main"><security https="false"/>

Further you need apache2 in front of ofbiz. install:

sudo apt install apache2
sudo a2enmod headers
sudo a2enmod mod_proxy
sudo a2enmod mod_proxy_ajp

replace file: /etc/apache2/sites-enabled/000-default.conf with this:

<Proxy *>
        AddDefaultCharset off
        Order deny,allow
        Allow from all
</Proxy>
ProxyVia On
<LocationMatch "/rest/">
    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Headers "Authorization,ContentType"
    Header always set Access-Control-Allow-Credentials "true"
</LocationMatch>
NameVirtualHost *:80
<VirtualHost *>
    ServerName localhost
    ServerAdmin you@example.com
    ProxyRequests Off
    ProxyPreserveHost On
    proxyPass /rest ajp://localhost:8009/rest
    proxyPassreverse /rest ajp://localhost:8009/rest
</VirtualHost>

when installed, restart apache2:

systemctl restart apache2

then the rest interface should work with http://localhost/rest

If you know a beter way to avoid the XMLHttpRequest error? Let me know!

In the admin flutter project there is a flutter test for this ofbiz component

About

Backend Growerp plugin for Apache OFBiz, Required for the flutter growerp frontend when using Apache OFBiz.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published