erp5 presentation plone_symosium_tokyo_2015

26
How to create an ERP with Zope Yusei Tahara at Nexedi KK

Upload: taharayusei

Post on 12-Aug-2015

21 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Erp5 presentation plone_symosium_tokyo_2015

How to create an ERP with Zope

Yusei Tahara at Nexedi KK

Page 2: Erp5 presentation plone_symosium_tokyo_2015

ERP is

Page 3: Erp5 presentation plone_symosium_tokyo_2015

Important things for ERPfrom technical point of view

● To integrate various business activities● To be flexible for specification changes● To make something working quickly

Page 4: Erp5 presentation plone_symosium_tokyo_2015

Category

Object A Object B

It describesmeaning

Category examples

● Region● Product● Chemical formulation● Color● Delivery mode

● Shipping source● Receiver of invoice● Buyer of buyer● Previous owner● Next owner

Page 5: Erp5 presentation plone_symosium_tokyo_2015

Region

Asia

Japan

Tokyo

China

Europe

Movement

Person A

Company X

Company B

Buyer

Shipping address

Region

Region

Person F Sales agent

Product C

Resource

Formulation

Aerosol

Emulsion

Oil

Shipping source

A trade

Previous owner

Next owner

Warehouse X

Page 6: Erp5 presentation plone_symosium_tokyo_2015

Auto generated accessors

Python classType InformationIn portal_types

Categorydefinitions

Property sheetdefinitions

Auto generatedaccessors

Category accessors examples● getCategoryNameValue()● getCategoryNameValueList()● setCategoryNameValueList()● setCategoryNameValueList()● getCategoryNameRelatedValue()● getCategoryNameRelatedValueList()● getCategoryNameTitle()● getCategoryNameTranslatedTitle()

Page 7: Erp5 presentation plone_symosium_tokyo_2015

ZSQLCatalog

ZODB

Indexing

Find object

Page 8: Erp5 presentation plone_symosium_tokyo_2015

Inventory API

● Based on ZSQLCatalog technology● Use MariaDB(Relational database)

For Inventory

portal_simulation.getInventor( section_uid=owner_uid, node_uid=warehouse_uid, resource_uid=resource_uid, at_date=target_date)

For Accounting

portal_simulation.getInventory( section_uid=owner_uid, node_uid=account_uid, resource_uid=currency_uid, at_date=target_date)

Page 9: Erp5 presentation plone_symosium_tokyo_2015

Activity tool for background jobs

ZODB

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

MariaDB

Frontend nodes for users

Activity processing nodesActivity distribution node

・・・・

Page 10: Erp5 presentation plone_symosium_tokyo_2015

Activity

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

activity activityactivity

activity activity

activity

activity

Distribution node

activity

activity activity

#1 #2 #3 #4

Assign activity

Assigned activities

Pendingactivities

How to use activity

object.targetMethod() ↓ object.activate().targetMethod()

targetMethod() will be executed by one of processing nodes.

Processing nodes

Page 11: Erp5 presentation plone_symosium_tokyo_2015

Component Tool

● Write unrestricted python code through the web.

● Transaction, Cluster● Workflow● For External methods,

Classes, Tests

Page 12: Erp5 presentation plone_symosium_tokyo_2015

Business Template

● Packaging system for ERP5● Dump code,settings from ZODB to file

system● git

Page 13: Erp5 presentation plone_symosium_tokyo_2015

Thank you

Contact me : [email protected]

Page 14: Erp5 presentation plone_symosium_tokyo_2015

How to create an ERP with Zope

Yusei Tahara at Nexedi KK

Page 15: Erp5 presentation plone_symosium_tokyo_2015

ERP is

ERP is complex. It has to handle various different business activities...

Page 16: Erp5 presentation plone_symosium_tokyo_2015

Important things for ERPfrom technical point of view

● To integrate various business activities● To be flexible for specification changes● To make something working quickly

To be flexible and to be fast are important. That is because it is hard to understand what customer really wants to do. So, making a minimum working system quickly and use it to communicate with customer is a key to success.

Page 17: Erp5 presentation plone_symosium_tokyo_2015

Category

Object A Object B

It describesmeaning

Category examples

● Region● Product● Chemical formulation● Color● Delivery mode

● Shipping source● Receiver of invoice● Buyer of buyer● Previous owner● Next owner

ERP5's category functionality is a key to implement “Unified Business Model”. http://www.erp5.org/UnifiedBusinessModel

Thanks to Unified Business Model, ERP5 can cover various different business activities.

Page 18: Erp5 presentation plone_symosium_tokyo_2015

Region

Asia

Japan

Tokyo

China

Europe

Movement

Person A

Company X

Company B

Buyer

Shipping address

Region

Region

Person F Sales agent

Product C

Resource

Formulation

Aerosol

Emulsion

Oil

Shipping source

A trade

Previous owner

Next owner

Warehouse X

This is a example of a trading. Each arrow is a category that describes a meaning of linked object.

Page 19: Erp5 presentation plone_symosium_tokyo_2015

Auto generated accessors

Python classType InformationIn portal_types

Categorydefinitions

Property sheetdefinitions

Auto generatedaccessors

Category accessors examples● getCategoryNameValue()● getCategoryNameValueList()● setCategoryNameValueList()● setCategoryNameValueList()● getCategoryNameRelatedValue()● getCategoryNameRelatedValueList()● getCategoryNameTitle()● getCategoryNameTranslatedTitle()

To be flexible as much as possible, ERP5 allows user to define document's properties and categories through the web. See demo.

Page 20: Erp5 presentation plone_symosium_tokyo_2015

ZSQLCatalog

ZODB

Indexing

Find object

ERP5 uses SQL based catalog engine to find objects in ZODB. This is a big difference between Plone and ERP5. Thanks to MariaDB and mroonga, to implement full text search functionality was easy. ERP5 can use useful features of relational database. See demo.

Page 21: Erp5 presentation plone_symosium_tokyo_2015

Inventory API

● Based on ZSQLCatalog technology● Use MariaDB(Relational database)

For Inventory

portal_simulation.getInventor( section_uid=owner_uid, node_uid=warehouse_uid, resource_uid=resource_uid, at_date=target_date)

For Accounting

portal_simulation.getInventory( section_uid=owner_uid, node_uid=account_uid, resource_uid=currency_uid, at_date=target_date)

Another example of benefit from relational database.ERP5 has an API to handle inventory and this API is

used to handle both accounting and inventory management. Thanks to Unified Business Model, accounting and inventory management are the same thing in ERP5. See demo.

Page 22: Erp5 presentation plone_symosium_tokyo_2015

Activity tool for background jobs

ZODB

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

MariaDB

Frontend nodes for users

Activity processing nodesActivity distribution node

・・・・

Business application needs to process many things in background. To do it, ERP5 has CMFActivity.

Page 23: Erp5 presentation plone_symosium_tokyo_2015

Activity

ZEOClient

ZEOClient

ZEOClient

ZEOClient

ZEOClient

activity activityactivity

activity activity

activity

activity

Distribution node

activity

activity activity

#1 #2 #3 #4

Assign activity

Assigned activities

Pendingactivities

How to use activity

object.targetMethod() ↓ object.activate().targetMethod()

targetMethod() will be executed by one of processing nodes.

Processing nodes

CMFActivity uses ZEO clients as background job processing nodes.

To use activity is very easy. You need to call “activate()” method only. See demo.

Page 24: Erp5 presentation plone_symosium_tokyo_2015

Component Tool

● Write unrestricted python code through the web.

● Transaction, Cluster● Workflow● For External methods,

Classes, Tests

We made a special tool to support writing python class, unit test code and any other unrestricted python code through the web.

Code written in this tool is protected by transaction and workflow. Code is shared among all ZEO clients automatically the same as python script.

If developer made a mistake(syntax error for example), then the previous code is still used. Once the syntax error was fixed, then finally the new code becomes validated workflow state and is deployed to all the nodes. See demo.

Page 25: Erp5 presentation plone_symosium_tokyo_2015

Business Template

● Packaging system for ERP5● Dump code,settings from ZODB to file

system● git

To manage code in ZODB has been a well known annoying issue for zope users.

ERP5 has its own packaging system named business template. Thanks to business template, developer can import/export all code and configurations from ERP5 instance and manage them in a version control system such as git. It is an essential feature to implement a complex system with ZODB and through-the-web development style. See demo.

Page 26: Erp5 presentation plone_symosium_tokyo_2015

Thank you

Contact me : [email protected]