Category Archives: Maestro

Development.

Maestro Update

SCC Maestro now consists of:

  • Maestro Desktop (WordPress, WP LDAP Simple Login)
  • Maestro Mail (SquirrelMail, Postfix, Dovecot)
  • Maestro Users (OpenLDAP, phpLdapAdmin)
  • Maestro Issues (MantisBT)
  • Maestro Parts, Manufacturing and Material (Tryton)

Significant advancements include Maestro Desktop, a launching point for Maestro components, a webmail client for Maestro Mail, and an IMAP mail interface to Maestro Mail for enterprise users to bring Maestro Mail into their own system.

Upcoming advancements include Maestro Documents, a new document management component, integrated with Maestro Desktop.

A VirtualBox virtual appliance will be available shortly. Use the contact form to receive additional information.

Maestro Update

SCC Maestro system now consists of the following integrated components:

  • Maestro Mail (Postfix, Mutt)
  • Maestro Users (OpenLDAP, phpLdapAdmin)
  • Maestro Issues (MantisBT)
  • Maestro Parts, Manufacturing and Material (Tryton)

Integration consists of single-point maintenance of user master data (authentication and email address) in an LDAP server, integrated with Issue Management and Material Management for user authentication.

The LDAP server (OpenLDAP) holds user names, login ids, and email addresses. Issue management (MantisBT) and material management (Tryton) authenticate users against through OpenLDAP. If LDAP authentication fails (the user id is not known or the provided password is not authenticated), Tryton falls back to local authentication (Mantis has no fall back). Email notices from MantisBT and Tryton are sent and received internally via Maestro Mail, and can be read – and also sent – using the Mutt mail client.

The next integration milestone will bring signicant mail improvements. A web-mail client will be provided for reading Maestro Mail, and an IMAP mail interface will be provided for enterprise users to bring Maestro Mail into their own system.

Maestro-Tryton in Closed-Alpha

I have written before about the Tryton framework. dalescott.net now includes a Tryton server and an “scc” database for implementing Maestro with Tryton – or Maestro-Tryton.

Maestro-Tryton is in Closed-Alpha, and will publicly available when all basic SCC master data has been included – Users, Products, Bills-of-Materials (BOMs), Suppliers, Customers and Projects.

If you are interested in collaborating on the Maestro project, please leave a comment and I’ll contact you. You can access the Maestro project on GitHub to access the source data, read the Maestro project wiki, and submit wiki articles, updates, issues and other work to the project.

Flattening a directory structure on Windows

The other day I needed to copy all the files within a hierarchical directory structure in a shared network directory into a single directory. Here’s how I did it.

1) install the following GnuWin32 utilities from http://gnuwin32.sourceforge.net/packages.html (this is much simpler than and add the bin directory (c:\Program Files\GnuWin32\bin) to your PATH environment variable.

  • CoreUtils
  • FindUtils
  • sed

2) Check the shared network directory for files with the same name, and either change names or delete files before copying. My shared network directory is mapped as I:\Share.

C:\>I:
I:\>cd I:\Share
I:\Share>"c:\Program Files\GnuWin32\bin\find.exe" . -type f | sed "s/.*\///" | sort | uniq -d

The full path to “find” is needed because, although the GnuWin32 bin directory is on my command path, the Windows “find” command is found on my path before the GnuWin32 “find”. This can take some time – 15 minutes on a 5 year old laptop with a shared directory having 170k files and 22K directories!

3) Copy the files into a new “files” directory on X-drive:

I:\Share>mkdir X:\files
I:\Share>cp `find . -type f` X:\files

Done!

P.S. Thanks to ldenneau for the idea (http://ask.metafilter.com/62308/Easy-Windows-directory-flattening-with-minimal-tools)

Using Tryton for Maestro Workflows

This article is part of a series on the Tryton framework, and complements the Maestro project on GitHub. This article explores a number of Maestro workflows using Tryton.

This article is a work in process.

Background

The Swift Construction Company (SCC) manufactures a radio receiver called an Aircraft Wireless. The SCC buys assembled electronics circuit boards (part number 20000003) in lots of 5 from Trilogy-Net. The circuit boards are used in the assembly of Aircraft Wireless units (part number 10000003). When circuit boards arrive from Trilogy-Net at the SCC, they are inspected, identified with a serial number and stocked in inventory. The SCC has a number of customers for Aircraft Wireless units, including B&E Submarines who purchased an Aircraft Wireless system to evaluate.

Product Structure

10000003 ASSY,MKTG,AIRCRAFT WIRELESS
|--- 90000012 EARPH,MONO,HI-Z,3.5MM
|--- 50000001 DOC,USER,AIRCRAFT WIRELESS
|--- 80000005 BOX,SHIPPING,5X4X2,CARDBOARD,WHITE
\--- 10000001 ASSY,AIRCRAFT WIRELESS
     |--- 10000002 ENCL,AIRCRAFT WIRELESS
     |    \--- 80000001 BOX,IP54,4.74X3.13X2.17",ALUM,BLK,SCREWS
     |--- 20000003 PCA,AIRCRAFT WIRELESS
     |    |--- 20000001 IND,830UH,AIRCRAFT WIRELES
     |    |    |--- 90000001 WIRE,MAGNET,38AWG,POLY
     |    |    |--- 90000002 MAG,FERRITE ROD,1/4IN X 4IN,MATL=61
     |    |    \--- 90000003 TAPE,ELECTRICAL,3/4",BLUE,VINYL
     |    |--- 20000002 PCB,AIRCRAFT WIRELESS
     |    |--- 90000004 CONN,PHONE,F,MONO,PCB,3.5MM
     |    |--- 90000005 CAPV,150-230PF,TOP ADJUST,PCB
     |    |--- 90000006 DIO,SIG,GERM,0A95,AXIAL,D0-7,GLASS
     |    |--- 90000007 CAP,ELEC,10UF,16V,20%,RADIAL,ROHS
     |    |--- 90000008 CAP,CER,33PF,100V,10%,RADIAL,ROHS
     |    |--- 90000009 CAP,CER,3300PF,100V,10%,RADIAL,ROHS
     |    |--- 90000010 RES,AXIAL,2.0M,0.4W,1%,MF,ROHS
     |    \--- 90000011 RES,AXIAL,5.6M,0.4W,1%,MF,ROHS
     |--- 80000003 SCREW,MACHINE,PHIL,4-40X1/4,SS
     |--- 80000004 WASHER,FLAT,4-40
     |--- 80000006 STANDOFF,HEX,4-40,0.5"L,ALUM
     |--- 80000007 WASHER,LOCK,#4,INTERNAL TOOTH
     |--- 90000014 CONN,BINDING POST BANANA,INSUL,GRN
     |--- 90000015 CONN,BINDING POST BANANA,INSUL,YEL
     |--- 90000016 CONN,RING,16-22AWG,#4,RED
     |--- 90000017 WIRE,STRANDED,16AWG,GREEN,POLY
     \--- 90000018 WIRE,STRANDED,16AWG,YELLOW,POLY

60000001 ASSY,FIELD SPARES,AIRCRAFT WIRELESS
|--- 90000012 EARPH,MONO,HI-Z,3.5MM Maplin LB25C
|--- 20000003 PCA,AIRCRAFT WIRELESS Trilogy-Net SCC:20000003
\--- 50000001 DOC,USER,AIRCRAFT WIRELESS

Workflows

Serialized Stock Purchased by a Customer

This workflow explores serialized stock in the context of a customer purchase. B&E Submarines desires to purchase a spare parts kit for the Aircraft Wireless unit they previously purchased. A serialized circuit board is used in the assembly of the spare parts kit (preferably a phantom-type BoM to make the parts in it visible), which is then sold and delivered to B&E.

Sometime later, Ed Bentley calls from B&E. He says he found a circuit board, but he doesn’t know if it is the circuit board from the spares kit. Ed is not sure, but he thinks the original board might have failed and he swapped it with the one from the spare parts kit. Ed wants to know if the serial number on the board is the same as the board shipped in the spare parts kit he bought.

Serialized Stock Consumed by a Project

Explore serial numbers in the context of a project. B&E Submarines plans to upgrade 5 of their submarines with Aircraft Wireless systems. A contract is negotiated between the SCC and B&E, and the SCC initiates a Project to capture all related activity (of which the physical receiver units are only one portion). Complete radio receivers PN 10000003 are manufactured, each with its own serial number, traceable to the serialized electronics circuit board within. The completed radio receivers are sold and delivered to B&E as part of the overall project.

Sometime later, Ed Bentley calls from B&E. He has a circuit board in his hand again, and wants to know where the serial number came from. Ed asks if the circuit board was from one of the 5 receivers delivered as part of the upgrade project.

Create, sell, ship, and return a field spares kit

  • Create manufacturing order
  • Issue material to order (serialized PCA)
  • Deliver order to customer
  • Return order from customer
  • Return material to stock (serialized PCA)

Related Topics

Visual display of model

  • Start Tryton client and connect to tryton database.
  • Access Administration > Models and select a model to view the schema for.
  • Select the report icon on the toolbar followed by the “Graph” action.
  • Select the number of levels to display.

Importing Maestro data into Tryton

This article is part of a series on the Tryton framework, and complements the Maestro project on GitHub. This article explores importing basic Maestro data into Tryton.

This article is a work in process. The built-in csv import capability in Tryton can be used to import basic data such as users (see the Maestro project), but more complex importing (e.g. product attributes, Bills-of-Materials) must be done by coding using the Proteus library.

Load Users

To be completed – see Maestro project

Load Units of Measure

To be completed – see Maestro project

Load Suppliers

To be completed – currently loading individual suppliers manually.

Load Customers

To be completed – currently loading individual customers manually.

Load Products

To be completed – see Maestro project

Load Projects

To be completed.

Load Serialized Stock

To be completed.

The Tryton Framework

As I was working on implementing the Maestro project in OpenERP v7, I came across a fundamental problem (for me) with product serialization. The out-of-box experience in OpenERP for managing serialized goods does not provide a consistent flow for receipt of serializing goods from a vendor or internal production, to the issue of serialized goods to a customer, and then the return serialized goods from the customer if necessary. It’s not that OpenERP isn’t technically capable, but the required software development is beyond the scope of the Maestro project.

However, the solution may lie in a close cousin to OpenERP – the Tryton framework. From tryton.org,

(Tryton) Is a three-tiers high-level general purpose application platform under the license GPL-3 written in Python and using PostgreSQL as database engine.

It is the core base of a complete business solution providing modularity, scalability and security.

The Tryton framework was created by forking OpenERP v4.1 (when it was called TinyERP). The fork included both the server daemon and the desktop client. While OpenERP is concerned with being a superior ERP-like application, Tryton strives to be a superior framework for building ERP-like applications. The desktop client can be used by end-users, and is certainly up to the task, but some situations may find a simplified user interface more suitable (possibly web-type), tailored specifically to the end-user’s needs.

The Tryton framework and desktop client are licensed under the GPL v3. Although the GPL may not be considered as business-friendly as the BSD, MIT or Apache-style permissive licenses, it is far friendlier than the AGPL – which is the license used by OpenERP after v4.1.

I’ve collected my my notes on Tryton in the Maestro project repo.

Serialized workflow in OpenERP

I apologize if you are hoping for all the answers, but maybe you’ll find one or two. I’m just a guy trying to model enterprise workflows using OpenERP. If you’re feeling generous, please share your thoughts, or maybe download the SCC database, get something working and share how.

I envision a whole library of worked examples for newb like me, showing how various workflows can be implemented in OpenERP, a set of worked “happy paths,” or an “OpenERP Workflow Recipes for Dummies” if you will. I’ve started a project on GitHub with the source PLM data (csv files containing hierarchical product structure with suppliers), where the recipes and related data could also be hosted. Does something like this already exist, maybe on LaunchPad?

The SCC database was created using a BitNami OpenERP v7 virtual machine, with the following apps installed:

  • Remove openerp.com bindings
  • Sales Management
  • CRM
  • MRP
  • Project Management
  • Issue Tracker
  • Base Import
  • Document Management System (install wizard reports config will be based on installed modules)

Business Model

The Swift Construction Company (SCC) manufactures a radio receiver called an  Aircraft Wireless.  The SCC buys an assembled electronics circuit board (Part Number 20000003) in lots of 10 from Trilogy-Net.  The circuit boards are used to manufacture Aircraft Wireless units (PN 10000003). When circuit boards from Trilogy-Net arrive at the SCC, they are inspected and, if acceptable, identified with a serial number and stored on a shelf. One of the SCC’s customers is B&E Submarines, who some time ago purchased an Aircraft Wireless system from the SCC to evaluate.

The products (part numbers), customer (B&E) and supplier (Trilogy-Net) have been created. Two BoMs have been created, one for the finished Aircraft Wireless product (PN 10000003) and one for a spare parts kit (PN 60000001), which includes the electronics circuit board (PN 20000003).

Scenario 1

Explore serial numbers in the context of a customer purchase. B&E Submarines desires to purchase a spare parts kit for the Aircraft Wireless unit they previously purchased. A serialized circuit board is used in the assembly of the spare parts kit (preferably a phantom-type BoM to make the parts in it visible), which is then sold and delivered to B&E.

Sometime later, Ed Bentley calls from B&E. He says he found a circuit board, but he doesn’t know if it’s the circuit board from the spares kit. He’s not sure but he thinks the original board might have failed, and he swapped it with the one from the spare parts kit. Ed wants to know if the serial number on the board is the same as the board shipped in the spare parts kit he bought.

Scenario 2

Explore serial numbers in the context of a project. B&E Submarines plans to upgrade 5 of their submarines with Aircraft Wireless systems. A contract is negotiated between the SCC and B&E, and the SCC initiates a Project to capture all related activity (of which the physical receiver units are only one portion). Complete radio receivers PN 10000003 are manufactured, each with its own serial number – traceable to the serialized electronics circuit board inside. The completed radio receivers are sold and delivered to B&E as part of the overall project.

Sometime later, Ed Bentley calls from B&E. He has a circuit board in his hand again, and wants to know where the serial number came from. Ed asks if the circuit board was from one of the 5 receivers delivered as part of the upgrade project.

Download SCC Database

Download current SCC OpenERP Database

 

Maestro has been re-scoped

The Maestro project has been re-scoped as a data set for demonstrating and testing ERP and ERP-like applications. The current implementation target for Maestro is OpenERP, and development of a Maestro standalone application based on the Yii PHP framework has been temporarily suspended.

This decision was based on the amount of work still needed to achieve a minimum viable feature set developing from scratch, and  the opportunities that become possible by building on OpenERP. I want to sincerely thank Maestro contributors Serge and Mark for their excellent work, and for helping me better understand the challenges of developing a Maestro application from scratch.

When I come up for air, I’ll post more on my experiences sp far with OpenERP, but I can tell you now I’m excited!

Installing OpenERP 7.0 using BitNami OpenERP 7.0 Stack

Fred Blauer recommended I take a look at OpenERP based on my described use case of PLM, Manufacturing, and Inventory Management.

I have been casually following OpenERP since v4.x (it was called TinyERP then), but had never configured a server – primarily because OpenERP used separate server and client, and I wanted a pure server system. However, I was pleasantly surprised when I took a look at the current OpenERP 7.0. OpenERP is now a pure web application, and BitNami has a free OpenERP Stack, including an Ubuntu-based virtual machine (in VMware format but also supported by VirtualBox). I’ll get the vm running first on my Win7 laptop with VirtualBox, and describe my experiences using OpenERP in a future post.

Create server

  • Download BitNami OpenERP Stack virtual machine (vm) to a Windows machine on my local network.
  • Using VirtualBox, create a new vm with characteristics: Linux/Ubuntu 64b OS with 1.5GB RAM, but do not configure a boot drive. I originally tried the suggested 512MB RAM, but the system was thrashing (as seen by memory use in ‘top’), with very poor performance.
  • Extract the files from the downloaded vm zip file into the directory VirtualBox created for the new vm.
  • Configure the new vm using VirtualBox Manager.
    • Network: Bridged (to have access from other machines in my network).
    • Storage: bitnami-openerp-7.0-3-ubuntu-12.04.vmdk (included in the BitNami vm download and copied to the vm directory).
  • Boot the new vm.

After booting, the console will display the server IP address and other helpful information (the IP address shown will likely differ in your environment):

*** Welcome to the BitNami OpenERP Stack ***
*** Built using Ubuntu 12.04 - Kernel 3.2.0-31-virtual (tty1). ***
*** You can access the application at 192.168.10.124 ***
*** The default username and password is 'user' and 'bitnami'. ***
*** Please refer to http://wiki.bitnami.com/Virtual_Machines for details. ***

******************************************************************************
*  To access the console, please use user 'bitnami' and password 'bitnami'.  *
*                                                                            *
*                                 WARNING                                    *
*  For security reasons, upon your first login, you will be prompted to      *
*  change the default password.                                              *
******************************************************************************

linux login:

If you copied the system drive for the vm from one host computer to another, the vm may report “The machine could not configure the network interface” after booting. This will occur if VIrtualBox provides a different Ethernet MAC ID on the second computer than on the first, and Ubunto creates a new Ethernet interface for a new interface MAC ID but is still configured for the interface on the first computer. Got it? “ifconfig -a” shows the Ethernet devices identified during boot, and “dmesg | grep eth” will show the network interface renaming. In this case, edit /etc/network/interfaces to specify the appropriate network interface (e.g. eth1 instead of eth0). See: http://www.howtogeek.com/168143/fixing-failed-to-bring-up-eth0-in-ubuntu-virtual-machine/ and http://gist.github.com/percursoaleatorio/6881040.

Login to the VirtualBox terminal using the provided username/password (bitnami/bitnami), and set a new password when prompted e.g. appleton (i.e. bitnami/appleton).

Enable ssh login

  • Configure sshd for remote login and scp file transfer.
$ sudo cp /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh

PostgreSQL

My initial goal was to use pgadmin3 for viewing and managing PostgreSQL databases on the vm from my laptop.

  • Edit postgresql.conf so PostgreSQL will listen on all IP addresses.
$ sudo vi /opt/bitnami/postgresql/data/postgresql.conf
...
listen_addresses = '*'                  # what IP address(es) to listen on;
...
  • Restart PostgreSQL. I tried using pg_ctl but it wouldn’t initially run because of missing libraries. I solved this by adding the BitNami common libraries and the PostgreSQL libraries to LD_LIBRARY_PATH in ~/.bashrc (and logged out and back in again).
$ vi ~/.bashrc
...
# for BitNami Stack PostgreSQL
LD_LIBRARY_PATH=/opt/bitnami/postgresql/lib:/opt/bitnami/common/lib
export LD_LIBRARY_PATH
...

However, this just led to other problems – the user to run pg_ctl as, whether the unset environment variable PGDATA is an issue, etc. I’m sure this isn’t how BitNami intends this to work (fwiw, /opt/bitnami/ctlscript.sh seems to be the intended control point for everything), but

Finally I just rebooted the vm, but pgadmin3 still wouldn’t connect. Perhaps it’s a firewall problem…

However, the PostgreSQL psql cli utility can be used (the password for the bitnami_openerp database is ‘bitnami’):

bitnami@linux:~$ psql bitnami_openerp
Password:
psql.bin (9.2.4)
Type "help" for help.

bitnami_openerp=# help
You are using psql, the command-line interface to PostgreSQL.
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit
bitnami_openerp=#

For more information on psql, see the PostgreSQL psql documentation.

Configure OpenERP

The BitNami OpenERP stack vm includes a database called bitnami_openerp (Administrator username/password: user/bitnami). I’m going to create a new database from scratch and install the basic modules needed to support Maestro workflows.

Access the vm from a workstation browser. The IP address for the vm is shown in the vm terminal window after booting (or after logging out).

  • Create a new database (company). The PostgreSQL master (super-administrator) password is “bitnami”, and I’ll use “appleton” for the new database password. OpenERP will create a new database with an administrative user (username/password: admin/appleton) and a demo user (username/password: demo/demo), and will login to the database as the administrator.

You will likely see a “timezone mismatch” warning in the top bar of the window. This is because the timezone set in your user preferences (which was configured by BitNami when they created the OpenERP stack) is different from the timezone your browser believes you are in (which comes from your workstation). You can access your user preferences by clicking the drop-down menu beside your username in the top bar of the window.

Install the following OpenERP applications using the Modules > Apps menu:

        • MRP (Manufacturing Orders, Bill of Materials, Routing)
        • Project Management (Projects, Tasks)
        • Issue Tracker (Support, Bug Tracker, Helpdesk)
        • Warehouse Management (Inventory, Logistic, Storage)

You will be prompted for your OpenERP user id and password (free to register) to start, and for any required configurations as each application is installed. Applications often have dependency applications, which will be automatically installed.

If you want to experiment with pre-defined demo data, select Manage Databases in the login screen and create a new database selecting “Install Demo Data”. The new database will be configured with a basic set of applications and demo data.

Still to do

Now that I’ve got OpenERP installed, the top items on my To Do list are:

  • Learn how OpenERP works! Create a couple users, import Maestro bills of materials, manufacture some serialized items using un-controlled, batch controlled and serialized raw material, etc.
  • Learn more about host OpenERP and Python web applications in general using WSGI by examining the BitNami OpenERP Stack (/opt/bitnami/apache2/conf/httpd.conf includes a WSGI reference).
  • Install OpenERP on FreeBSD. As of 2014-03-20, there is a binary package available for OpenERP 7.0, but it will still take time to understand how to make it usable.

Related information

For more information on OpenERP, a great reference is the OpenERP Book.

 

Updated since first posting 2013-07-22.