A...Farm ERP, Release 0.1a Actors 1.Director Preconditions 1.User is authenticated Post-conditions...

Post on 27-Jun-2020

0 views 0 download

Transcript of A...Farm ERP, Release 0.1a Actors 1.Director Preconditions 1.User is authenticated Post-conditions...

Farm ERPRelease 0.1a

A.R

January 05, 2014

Contents

1 Quick Start 31.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.1 Local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Staging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.3 Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Features 52.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Global Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 uc1: Manage users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2.1 uc1.1: List users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2.2 uc1.2: Add/Edit user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.2.3 uc1.3: Delete user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.3 uc2: Manage projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.4 uc3: Manage accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.5 uc4: Manage inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.5.1 uc4.1: List Inventories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.5.2 uc4.2: Manage inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.5.3 uc4.3: Manage product inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.5.4 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.6 uc5: Manage products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.7 uc6: Manage credit book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.7.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.8 uc7: Manage cash journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.8.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.9 uc0: Manage system settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 Developers 313.1 Contributor Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.1.1 More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.1.2 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.1.3 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.2 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.3 API Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.3.1 farming.svc.authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

i

4 Reference 334.1 Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.1.1 Version 0.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1.2 Version 0.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5 Screenshots 355.1 Cash Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.2 Credit Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.3 Product Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.4 Users Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

ii

Farm ERP, Release 0.1a

Accounting software relying on FAO guidelines.

Notable Features:

• Cash Journal

• Credit Book

• Product Inventory

• User Management

Contents 1

Farm ERP, Release 0.1a

2 Contents

CHAPTER 1

Quick Start

1.1 Requirements

1.1.1 Dependencies

• Debian 7 (or Ubuntu >= 12.04)

• Python 2.7

• Vagrant (Optional, to test staging env)

• sshpass (Optional, to setup Vagrant VM)

1.2 Installation

1.2.1 Local

Development environment:

$ fab init_env_local$ fab init_env_vagrant

1.2.2 Staging

Using vagrant by default:

1. Add hosts in deploy/ansible/hosts/staging.

2. Set environment vars in deploy/ansible/vars/staging.yml.

3. Launch installation wizard:

$ fab deploy_staging

1.2.3 Production

1. Add hosts in deploy/ansible/hosts/production

2. Set environment vars in deploy/ansible/vars/production.yml

3. Launch installation wizard:

3

Farm ERP, Release 0.1a

$ fab deploy_prod

4 Chapter 1. Quick Start

CHAPTER 2

Features

2.1 Overview

farm.erp is a complete toolbox for agricultural accounting.

5

Farm ERP, Release 0.1a

2.1.1 Context

2.1.2 Global Use Cases

Stakeholders

Inventory Manager Manages inventory.

Accountant Manages credit book and cash journal.

Director Same role as Inventory Manager and Accountant plus manages user.

Admin Same role as Director, plus can manage technical features.

6 Chapter 2. Features

Farm ERP, Release 0.1a

Global Use Cases

uc1: Manage users

uc1.1: List users

2.1. Overview 7

Farm ERP, Release 0.1a

Actors

1. Director

Preconditions

1. User is authenticated

Post-conditions

1. User list is displayed

2. The Add user action is available

3. An action list is available for each users displayed

Normal flow

1. The user opens the users list view

2. The system displays following global actions :

Actions:

• Add user

3. The system displays the users list. For each row:

Data:

• Firstname : string(250)

• Surname : string(250)

• Email : string(250)

• User Roles : List of user roles, see Stakeholders

• Is Active : Yes/No

Actions:

• Edit

• Delete

Alternate flow 2a. The user clics on Add user

1. The user clicks on Add user

2. The system launches uc1.2: Add/Edit user

3a. The user clics on Edit

1. The user clicks on Edit

2. The system launches uc1.2: Add/Edit user

3b. The user clics on Delete

1. The user clicks on Delete

2. The system launches uc1.3: Delete user

uc1.2: Add/Edit user

8 Chapter 2. Features

Farm ERP, Release 0.1a

Actors

1. Director

Preconditions

1. User is authenticated

Post-conditions

1. New user is added or existing user is updated

2. System launches uc1.1: List users

Normal flow

1. User opens the Add/Edit user screen

2. The system show the new user input form :

Data

• Firstname : string(250), mandatory

• Surname : string(250), mandatory

• Email : string(250), mandatory

• User Roles : List of user roles, see Stakeholders

• Is Active : Yes/No, default=No

Actions

• Save

• Cancel

3. The user clics on Save

4. The system adds or updates user’s data and launches uc1.1: List users

5. The system displays the following flash message:

User {{ Email }} added|updated successfully.

Alternate flow 3a. The user clics on Cancel

1. The system cancels users’s input and launches uc1.1: List users

Requirements

1. Email must be unique in database

uc1.3: Delete user

Actors

1. Director

Preconditions

1. User is authenticated

2. User clicked Delete on uc1.1: List users

2.1. Overview 9

Farm ERP, Release 0.1a

Post-conditions

1. Target user is marked as deleted in database

2. System launches uc1.1: List users

Normal flow

1. The system show the following confirmation message:

Delete {{Firstname}} {{Surname}} <{{Email}}> ?

Data

• Firstname : Target user’s data

• Surname : Target user’s data

• Email : Target user’s data

Actions

• Delete

• Cancel

2. The user clics on Delete

3. The system marks target user as deleted and launches uc1.1: List users

4. The system displays the following flash message:

User {{ Email }} deleted successfully.

Alternate flow 2a. The user clics on Cancel

1. The system launches uc1.1: List users

10 Chapter 2. Features

Farm ERP, Release 0.1a

uc2: Manage projects

2.1. Overview 11

Farm ERP, Release 0.1a

uc3: Manage accounts

12 Chapter 2. Features

Farm ERP, Release 0.1a

uc4: Manage inventory

uc4.1: List Inventories

Actors

• Inventory Manager

Preconditions

1. User is authenticated

2.1. Overview 13

Farm ERP, Release 0.1a

Post-conditions

1. All available inventories are displayed

2. Contextual and global actions are displayed according to user’s rights

Normal flow

1. The system displays all available inventories :

Item Data

• Title : string(250), mandatory

• Start Date : date, mandatory

• End Date : date

• Is Completed : Yes/No.

• Products Count : computed, number of products inventoried

Item Actions

• View

Global Actions

• Add Inventory

2. End

Alternate flow 2.a User clicks View

1. The syste launches uc4.2: Manage inventory

2.b User clicks Add Inventory

1. TODO

Requirements

1. If Is Completed value is No, it’s an ongoing inventory.

2. If user is not Inventory Manager the only action available is View.

See also Requirements

uc4.2: Manage inventory

Actors

• All authenticated users

Preconditions

1. User is authenticated

2. User selected an inventory to display

Post-conditions

1. Inventory data are displayed

14 Chapter 2. Features

Farm ERP, Release 0.1a

Normal flow

1. The system displays products list :

Item Data

• Designation : string(250), mandatory

• Quantity : integer, mandatory

Item Actions

• View Product Inventory

2. End

Alternate flow 2.a User clicks View Product Inventory

1. The system launches uc4.3: Manage product inventory

Requirements See Requirements

uc4.3: Manage product inventory

Actors

• All authenticated users

Preconditions

1. User is authenticated

2. User selected an inventory and a product from inventory

Post-conditions

1. Product’s data are displayed

Normal flow

1. The system displays the associated product data :

Data

• Designation : string(250), mandatory

• TODO

Actions

• TODO

2. End

Alternate flow

Requirements See Requirements

Requirements

1. Only Inventory Manager can modify content of inventories

2.1. Overview 15

Farm ERP, Release 0.1a

uc5: Manage products

uc6: Manage credit book

Requirements See Requirements

16 Chapter 2. Features

Farm ERP, Release 0.1a

uc7: Manage cash journal

Requirements

1. A new credit book is associated with every new cash journal.

2.1. Overview 17

Farm ERP, Release 0.1a

uc0: Manage system settings

2.2 uc1: Manage users

2.2.1 uc1.1: List users

Actors

1. Director

Preconditions

1. User is authenticated

Post-conditions

1. User list is displayed

2. The Add user action is available

3. An action list is available for each users displayed

18 Chapter 2. Features

Farm ERP, Release 0.1a

Normal flow

1. The user opens the users list view

2. The system displays following global actions :

Actions:

• Add user

3. The system displays the users list. For each row:

Data:

• Firstname : string(250)

• Surname : string(250)

• Email : string(250)

• User Roles : List of user roles, see Stakeholders

• Is Active : Yes/No

Actions:

• Edit

• Delete

Alternate flow

2a. The user clics on Add user

1. The user clicks on Add user

2. The system launches uc1.2: Add/Edit user

3a. The user clics on Edit

1. The user clicks on Edit

2. The system launches uc1.2: Add/Edit user

3b. The user clics on Delete

1. The user clicks on Delete

2. The system launches uc1.3: Delete user

2.2.2 uc1.2: Add/Edit user

Actors

1. Director

Preconditions

1. User is authenticated

Post-conditions

1. New user is added or existing user is updated

2. System launches uc1.1: List users

2.2. uc1: Manage users 19

Farm ERP, Release 0.1a

Normal flow

1. User opens the Add/Edit user screen

2. The system show the new user input form :

Data

• Firstname : string(250), mandatory

• Surname : string(250), mandatory

• Email : string(250), mandatory

• User Roles : List of user roles, see Stakeholders

• Is Active : Yes/No, default=No

Actions

• Save

• Cancel

3. The user clics on Save

4. The system adds or updates user’s data and launches uc1.1: List users

5. The system displays the following flash message:

User {{ Email }} added|updated successfully.

Alternate flow

3a. The user clics on Cancel

1. The system cancels users’s input and launches uc1.1: List users

Requirements

1. Email must be unique in database

2.2.3 uc1.3: Delete user

Actors

1. Director

Preconditions

1. User is authenticated

2. User clicked Delete on uc1.1: List users

Post-conditions

1. Target user is marked as deleted in database

2. System launches uc1.1: List users

20 Chapter 2. Features

Farm ERP, Release 0.1a

Normal flow

1. The system show the following confirmation message:

Delete {{Firstname}} {{Surname}} <{{Email}}> ?

Data

• Firstname : Target user’s data

• Surname : Target user’s data

• Email : Target user’s data

Actions

• Delete

• Cancel

2. The user clics on Delete

3. The system marks target user as deleted and launches uc1.1: List users

4. The system displays the following flash message:

User {{ Email }} deleted successfully.

Alternate flow

2a. The user clics on Cancel

1. The system launches uc1.1: List users

2.2. uc1: Manage users 21

Farm ERP, Release 0.1a

2.3 uc2: Manage projects

22 Chapter 2. Features

Farm ERP, Release 0.1a

2.4 uc3: Manage accounts

2.4. uc3: Manage accounts 23

Farm ERP, Release 0.1a

2.5 uc4: Manage inventory

2.5.1 uc4.1: List Inventories

Actors

• Inventory Manager

24 Chapter 2. Features

Farm ERP, Release 0.1a

Preconditions

1. User is authenticated

Post-conditions

1. All available inventories are displayed

2. Contextual and global actions are displayed according to user’s rights

Normal flow

1. The system displays all available inventories :

Item Data

• Title : string(250), mandatory

• Start Date : date, mandatory

• End Date : date

• Is Completed : Yes/No.

• Products Count : computed, number of products inventoried

Item Actions

• View

Global Actions

• Add Inventory

2. End

Alternate flow

2.a User clicks View

1. The syste launches uc4.2: Manage inventory

2.b User clicks Add Inventory

1. TODO

Requirements

1. If Is Completed value is No, it’s an ongoing inventory.

2. If user is not Inventory Manager the only action available is View.

See also Requirements

2.5.2 uc4.2: Manage inventory

Actors

• All authenticated users

2.5. uc4: Manage inventory 25

Farm ERP, Release 0.1a

Preconditions

1. User is authenticated

2. User selected an inventory to display

Post-conditions

1. Inventory data are displayed

Normal flow

1. The system displays products list :

Item Data

• Designation : string(250), mandatory

• Quantity : integer, mandatory

Item Actions

• View Product Inventory

2. End

Alternate flow

2.a User clicks View Product Inventory

1. The system launches uc4.3: Manage product inventory

Requirements

See Requirements

2.5.3 uc4.3: Manage product inventory

Actors

• All authenticated users

Preconditions

1. User is authenticated

2. User selected an inventory and a product from inventory

Post-conditions

1. Product’s data are displayed

26 Chapter 2. Features

Farm ERP, Release 0.1a

Normal flow

1. The system displays the associated product data :

Data

• Designation : string(250), mandatory

• TODO

Actions

• TODO

2. End

Alternate flow

Requirements

See Requirements

2.5.4 Requirements

1. Only Inventory Manager can modify content of inventories

2.6 uc5: Manage products

2.6. uc5: Manage products 27

Farm ERP, Release 0.1a

2.7 uc6: Manage credit book

2.7.1 Requirements

See Requirements

28 Chapter 2. Features

Farm ERP, Release 0.1a

2.8 uc7: Manage cash journal

2.8.1 Requirements

1. A new credit book is associated with every new cash journal.

2.9 uc0: Manage system settings

2.8. uc7: Manage cash journal 29

Farm ERP, Release 0.1a

30 Chapter 2. Features

CHAPTER 3

Developers

3.1 Contributor Guide

Those who wish to contribute directly to the project can contact me at dev.aert@gmail.com to talk about gettingrepository access granted.

3.1.1 More Information

• GitHub : http://github.com/aert/aert-bookkeeping

• Documentation : http://aert-bookkeeping.readthedocs.org

3.1.2 License

This project is licensed under the MIT license.

3.1.3 Support

• Issue Tracking : https://github.com/aert/aert-bookkeeping/issues

• Pull Request : https://github.com/aert/aert-bookkeeping/pulls

3.2 Testing

• Using Vagrant:

$ fab init_env_vagrant$ fab run_tests

3.3 API Documentation

3.3.1 farming.svc.authentication

Authentication Policies

31

Farm ERP, Release 0.1a

32 Chapter 3. Developers

CHAPTER 4

Reference

4.1 Changelog

4.1.1 Version 0.2

• (A) Build Product Inventory +feature @20130915-134333

4.1.2 Version 0.1

• (A) Write Functional Specs +analysis @20130915-132022

• (A) Write Technical Specs (API) +analysis @20130915-132537

• (A) Setup CSS & Page flows +analysis @20130915-132702

• (B) Add user management and special user for testing purpose +feature @20130915-132757

33

Farm ERP, Release 0.1a

34 Chapter 4. Reference

CHAPTER 5

Screenshots

5.1 Cash Journal

35

Farm ERP, Release 0.1a

5.2 Credit Book

5.3 Product Inventory

36 Chapter 5. Screenshots

Farm ERP, Release 0.1a

5.4 Users Management

5.4. Users Management 37