Wednesday 16 September 2015

How to configure hierarchy Sales Team Structure in Odoo / OpenERP

Often times while following OpenERP/Odoo for sales management, it is our requirement to have a proper team hierarchy with the secure desired flow of information. For that Odoo provides us the ability to create our own sales teams with the desired access control for the flow of information in the team hierarchy. In this tutorial we will use use the default Odoo provided roles or group. For the one who wants to customize the access control as per his/her requirement, he/she have to create their own security rules etc.

One of major concerns for the Odoo users is to easily configure the sales team, since Odoo have the poorest documentation [as per the online sorcerers :) ]. So to configure your sales teams properly, likely this tutorial will helps you.

In this tutorial I am considering this sales team hierarchy:
  • Sales Manager (Team Leader)
    • Sales Person 
      • Sales And Quotations

Setting proper sales team configurations can solve the mentioned problems.
Sales Teams can be configured by the following steps:
  • Create Sales Teams: Go to Sales Tab Configuration Sales Teams.  Give the newly created sales team some desired name like Team A.
  • Set Team Leader (Sale Manger) for Sales Team. From Sales Configuration Sales Team. Make sure that the Team Leader has proper access rights (instructions are given below for setting access rights.
  • Assigning Team members of that Sales team. Add some users as a team member to new sales team. Each user should have proper access rights. (Instructions are given below).
  • Set Sales Person and Sales Team on Quotations and Sales Orders. Now as our sales team is created, it’s time to associate some sales and quotation to our sales team. To do this one should set Sales Person and Sales Team while creating new Quotations and Sale order. Set Sales Team from the Other Information Tab.

How to set access rights For Team Leader & Sales Person: 

To configure access rights: settings users user access rights

  • For Team Leader set sales value to Manager 
  • For Team Leader set sales value to See Own Leads

Tuesday 15 September 2015

The Anatomy of Bika-LIMS

Python, Zope, CMF, Plone, Bika how does that all fit together?
 

Bika-LIMS Architecture:

The architecture of Bika-LIMS can be analyzed from this figure:

Figure 1 Bika-LIMS architecture

What is Zope:

Zope is one of the most scalable web application servers in the market.


Figure 2 The Zope Application Server

What is Plone?

Plone is a content management system (CMS) which you can use to build a web site. With Plone, ordinary people can contribute content to a web site without the help of a computer geek. Plone runs over the Web, too, so you don't need to install any special software on your computer. The word content is meant to be general, because you can publish so many types information,




Where Bika-LIMS stands?

Bika-LIMS is an add-ons built for the Plone framework. Or we can say that the Bika-LIMS is Plone site. That means in order to understand the Bika-LIMS, we must have to understand Plone framework.

Plone is all about Content and Theme:

Theming Plone:

Theming a Plone site has two major parts:

· Structural theming: the construction of the HTML skeleton of a page and getting the right content elements into the right spots. Also, the provision of the CSS and Javascript elements to finish the presentation and provide dynamic behaviors.

Templating, which itself has two aspects:

  • Viewlet templates, which we might think of as the micro formatting of the page. Remember when we looked at the viewlet map of a page? (Look again via @@manage-viewlets.) All those viewlets are provided via individual, editable templates.
  • Content type view templates, Whenever we create a new content type or modify an existing one, we’ll typically want to create or modify a view template.

Structural theming is best accomplished via the Diazo theme engine. Diazo provides a rule based mechanism for mapping content provided by Plone into one or more master page designs.

Templating is accomplished by editing page template files which allow us to mix object content from the ZODB with HTML. Plone uses its own (actually Zope’s) Template Attribute Language (TAL) for this purpose.

Content-types in Plone:

A content type is a variety of object that can store information and is editable by users. We have different content types to reflect the different kinds of information about which we need to collect and display information. Pages, folders, events, news items, files (binary) and images are all content types.

There are two content-frameworks in Plone: Archetypes and Dexterity. Dexterity is the new way to create content types and is default in Plone 5. And Archetype is the default way to create content types in Plone 4.

Since the scope of this document is to understand the Bika-LIMS and the Bika-LIMS is based on Plone 4. So we will just understand the archetype framework here. The comparation between the two frameworks can be seen from http://plone-training.readthedocs.org/en/latest/dexterity.html#dexterity-and-archetypes-a-comparison

The makings of a Plone content type:

Every Plone content type has the following parts:
  • Schema: A definition of fields that comprise a content type; properties of an object.
  • FTI: The “Factory Type Information” configures the content type in Plone, assigns it a name, an icon, additional features and possible views to it.
  • Views: A view is a representation of the object and the content of its fields that may be rendered in response to a request. You may have one or more views for an object. Some may be visual — intended for display as web pages — others may be intended to satisfy AJAX requests and be in formats like JSON or XML.

Archetypes Content-types:

Archetype is a framework designed to facilitate the building of applications for Plone and CMF. Its main purpose is to provide a common method for building content objects, based on schema definitions.

  • o Schema in Archetypes: Schema only in Python
  • o Archetypes: Permissions per field hard, custom forms even harder.
  • o If you have to program for old sites you need to know Archetypes!

To learn more about Archetypes visit https://plone.org/products/archetypes/documentation/old/ArchetypesDeveloperGuide/index_html

Major Archetypes present in Bika-LIMS can be seen from the project database ERD:






References:
http://www.bikalabs.com/softwarecenter/bika
http://www.bikalabs.org/
https://plone.org/
http://www.zope.org/