Skip to content

Commit

Permalink
OZ-196: Add the 'Ozone Settings' Odoo Add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuisson committed Dec 15, 2023
1 parent e1e94bb commit 8bde3a4
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 33 deletions.
39 changes: 6 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
# Ozone - The 'Distro' Project
>_The enterprise-grade health information system that augments OpenMRS 3._
## (option 1) Try Ozone FOSS in Gitpod

This is the official Maven project for the free and open-source software flavour of Ozone, aka **Ozone FOSS**.
This Maven project makes it easy to build and package Ozone FOSS.

:bulb: **Did you know?** There is a *pro* flavour of Ozone, aka **Ozone Pro**, that adds a number of enterprise features to Ozone FOSS.

## 1. Overview
A **Maven project** that gathers all artefacts that make the **FOSS distribution of Ozone**.

It depends on the OpenMRS 3 distro Ref App
```xml
<dependency>
<groupId>org.openmrs.distro</groupId>
<artifactId>referenceapplication-package</artifactId>
<type>zip</type>
</dependency>
```
and then _augments_ OpenMRS 3 with all components that make Ozone FOSS a fully integrated health information system.

## 2. Try Ozone FOSS in Gitpod
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ozone-his/ozone-distro)

It may take some time to setup Ozone for the first time, so hang tight :hourglass_flowing_sand:

When ready Gitpod will launch the tab for OpenMRS 3.

## 2. Try Ozone locally
## (option 2) Try Ozone locally using the embedded Apache 2 proxy

```bash
git clone https://github.com/ozone-his/ozone-distro
Expand All @@ -35,7 +15,9 @@ source target/go-to-scripts-dir.sh
./start-demo.sh
```

## 2-bis. Try Ozone locally with Traefik as the proxy


## (option 3) Try Ozone locally assuming Traefik is running on the host

```bash
git clone https://github.com/ozone-his/ozone-distro
Expand All @@ -45,8 +27,7 @@ export TRAEFIK="true"
./start-demo.sh
```

## 3. Browse Ozone

## Browse Ozone

Access each Ozone FOSS components at the following URL:

Expand All @@ -60,11 +41,3 @@ Access each Ozone FOSS components at the following URL:

Ozone FOSS requires you to log into each component separately.


## 3. Find us
[Slack](https://openmrs.slack.com/archives/C02PYQD5D0A) - [Forum](https://talk.openmrs.org/c/software/ozone-his) - [Website](http://ozone-his.com)

<sub>:information_source: Self sign-up [here](https://slack.openmrs.org/) before accessing our Slack space for the first time.</sub>
## 4. Report an issue
1. Either start a conversation on [Slack](https://openmrs.slack.com/archives/C02PYQD5D0A) about it,
1. Or start a thread on our [forum](https://talk.openmrs.org/c/software/ozone-his) about it.
21 changes: 21 additions & 0 deletions distro/binaries/odoo/addons/ozone_settings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ozone_settings

A module used for updating odoo settings for odoo

### Installation

To install this module, you need to:

Download the module and add it to your Odoo addons folder. Afterward,
log on to your Odoo server and go to the Apps menu. Trigger the debug
mode and update the list by clicking on the "Update Apps List" link. Now
install the module by clicking on the install button.


### Upgrade

To upgrade this module, you need to:

Download the module and add it to your Odoo addons folder. Restart the
server and log on to your Odoo server. Select the Apps menu and upgrade
the module by clicking on the upgrade button.
1 change: 1 addition & 0 deletions distro/binaries/odoo/addons/ozone_settings/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

28 changes: 28 additions & 0 deletions distro/binaries/odoo/addons/ozone_settings/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
{
'name': "Ozone Odoo Settings",

'summary': """
Odoo Settings for ozone
""",

'description': """
Odoo Settings for ozone
""",

'author': 'enyachoke',
'website': 'https://mekomsolutions.com',
'license': 'MIT',
'category': 'Technical Settings',
'version': '14.0.1.0.0',

'depends': [
'base',
'sale_management'
],

'data': [
'data/ozone-settings.xml',
'data/portal-user-template.xml'
],
}
15 changes: 15 additions & 0 deletions distro/binaries/odoo/addons/ozone_settings/data/ozone-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="ozone_config_settings" model="res.config.settings">
<field name="group_uom" eval="True"/>
<field name="group_product_pricelist" eval="True"/>
<field name="product_pricelist_setting">advanced</field>
<field name="default_invoice_policy">order</field>
<field name="group_stock_multi_locations" eval="True"/>
<field name="group_stock_adv_location" eval="True"/>
</record>
<function model="res.config.settings" name="execute">
<value model="res.config.settings"
search="[('id', '=', ref('ozone_config_settings'))]"/>
</function>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="base.template_portal_user_id" model="res.users">
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'),ref('sales_team.group_sale_salesman_all_leads'),ref('stock.group_stock_user'),ref('account.group_account_invoice')])]"/>
</record>
</data>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# from . import res_settings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,26 @@
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<!-- Copy binaries/ folder -->
<id>Copy local binaries/ resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<markersDirectory>${project.build.directory}/</markersDirectory>
<outputDirectory>
${project.build.directory}/${project.artifactId}-${project.version}/binaries</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/binaries</directory>
</resource>
</resources>
</configuration>
</execution>

<execution>
<!-- Copy configs/ folder -->
<id>Copy local configs/ resources</id>
Expand All @@ -204,6 +224,7 @@
</resources>
</configuration>
</execution>

<execution>
<!-- Copy data/ folder -->
<id>Copy local data/ resources</id>
Expand Down

0 comments on commit 8bde3a4

Please sign in to comment.