erp5 presentation plone_symosium_tokyo_2015
TRANSCRIPT
How to create an ERP with Zope
Yusei Tahara at Nexedi KK
ERP is
Important things for ERPfrom technical point of view
● To integrate various business activities● To be flexible for specification changes● To make something working quickly
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
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
Auto generated accessors
Python classType InformationIn portal_types
Categorydefinitions
Property sheetdefinitions
Auto generatedaccessors
Category accessors examples● getCategoryNameValue()● getCategoryNameValueList()● setCategoryNameValueList()● setCategoryNameValueList()● getCategoryNameRelatedValue()● getCategoryNameRelatedValueList()● getCategoryNameTitle()● getCategoryNameTranslatedTitle()
ZSQLCatalog
ZODB
Indexing
Find object
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)
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
・・・・
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
Component Tool
● Write unrestricted python code through the web.
● Transaction, Cluster● Workflow● For External methods,
Classes, Tests
Business Template
● Packaging system for ERP5● Dump code,settings from ZODB to file
system● git
Thank you
Contact me : [email protected]
How to create an ERP with Zope
Yusei Tahara at Nexedi KK
ERP is
ERP is complex. It has to handle various different business activities...
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Thank you
Contact me : [email protected]