Saturday 20 April 2013

Attrs in OpenERP Explained in detail - Serpent Consulting Services!

As an OpenERP Developer, you might come across such a situation where you would like to make one or some fields readonly or mandatory or hide (‘invisible’ in OpenERP terminology) based on the values of other fields.

Well, then you are getting OpenERP Training just by reading this as the solutions here are explained by well versed OpenERP Trainers.

The solution here to your situation is ‘attrs’.

The attrs is an element in OpenERP which is responsible to alter the attributes of a field, not the value. The ‘attrs’ attribute can be used to dynamically change the attributes of view components based on the value of other fields. Buttons in OpenERP use states attribute for dynamic visibility, they too can be used with attrs. It can be used on field, page, group, button and notebook tags. Remember, there is no RPC call ever made because this is a pure client side attribute at view level.

The structure of ‘attrs‘ is a dictionary carrying the key as the client attribute and value as a set of domain(s),the keys could be:
  • readonly
  • invisible
  • required

Structure : attrs=”{‘attribute’:Domain which is if true, the element will wear the new property ‘attribute’}”

Syntax of attrs : 
attrs=
”{‘readonly’:[('value','=','balance')],  ‘invisible’: ['|',('service','in',['OpenERP Support','OpenERP Training']),(‘company’,'=’,'SerpentCS’)]}”
/>
Result : If the domains are satisfied, the field ‘value_amount’ will be readonly in 1st case and will be hidden on 2nd case.
attrs=”{‘required’: [('parent_id', '=', False)]}”
/>
You can use any domains here but make sure there will be no server side calls made. So better to be limited at view level.

Attrs is reflected at view level per record, and hence that can never be applied at List view/ Tree view level.

Hope this makes you hungry to learn more about the beauty of OpenObject Framework. You can take the advantages of learning this greatly with us by attending our trainings.

Thanks,
Serpent Consulting Services

OpenERP Training in India : May 2013

Dear Aspirants,
We feel proud to announce that Serpent Consulting Services is organizing a Functional and Technical Training on OpenERP version 7 which is going to rock the floors of ERP Market. We have chosen to be the DJs.
Serpent Consulting Services successfully completed 14 Training sessions of OpenERP Technical and OpenERP Functional Trainings for the year 2012, and 6 Training Sessions in the year 2013. It is a tremendous achievement for any company. The satisfaction of attendees and feedback can be seen on our testimonials page. We deliver the best quality in very less fees, you can search around for any check.
Our Facebook Profile shows all pictures.
Serpent Consulting Services feels immense pleasure to announce back to back OpenERP Technical and Functional Trainings Respectively.
Special attention this time is discounted Training Fees :-
1. Single ( Individual Trainee) : 830 USD per trainee.
2. Group (between 5 to 9 Trainees) : 730 USD per trainee.
3. Corporate (10 to 15 Trainees) : 680 USD for per trainee.
OpenERP Functional Training May 2013 :-
This Training is dedicated to partners, integrators and end-users who want to get a better functional understanding of OpenERP. This training is meant to give an overview of the OpenERP features allowing for a general understanding of the software.
The 7th Training programme will be OpenERP Functional Training version 7 to be held on 13th May to 17th May 2013. Aspirants join us for Training, and come out as expert after the completion of Training.
Training Outlines can be found at :-
OpenERP Functional Training
OpenERP Technical Training May 2013 :-
The technical training is a unique opportunity for anyone, who wants to develop and customize his own modules! This Training is exclusive to partners, integrators and new developers who need to gain knowledge of the OpenERP development process and also for IT professionals eager to learn more about the OpenERP technical aspects.
The 7th Training programme will be OpenERP Technical Training version 7 to be held on 20th May to 24th May 2013. It brings occasion for you to attend in India. We come with various new additions to the normal Training.
Training Outlines can be found at :-
OpenERP Technical Training
Duration : -
Both Training will be 5 days training. 8 hours each day.
Facilities:
Daily drinks (tea / coffee) and Lunch
Training material
Both of these Trainings are very important who are new to OpenERP world. SerpentCS organizing OpenERP Technical and Functional Trainings every month with a good success ratio is resulting in confident smiles of attendees.
We will be pleased to welcome you at this training!
You can also Contact Us for Remote and Onsite Training, OpenERP Support, OpenERP Offshore,OpenERP Migration and Tryton Services.
Register your seat at contact@serpentcs.com.
Recent News :-
  1. OpenERP Module Recording : A Complete How-to for XML/YML.
  2. How to Install OpenERP 7 on CentOS & How to Install OpenERP 7 on Ubuntu.
  3. OpenERP 7 : Multi Company Bug is fixed !
  4. Its official now : OpenERP 7.0 has been released!
  5. Know Fabien Pinckaers : CEO of OpenERP SA
  6. Security in OpenERP .07 : Users, groups, access, record rules.
  7. SerpentCS releases an Android Application
  8. Configuration wizard in OpenERP 7.0
  9. OpenERP 7.0 : as easy as 10 clicks
  10. Field-level Access Control in OpenERP 7.0

For any news and updates Regarding Serpent Consulting Services, visit here.

MultiCompany Configuration in OpenERP - Serpent Consulting Services!

OpenERP Version 7 supports multi-company environment. We have created 3 companies to explain the feature. Go to Settings> Companies> Companies. See the image below.





Here, ‘Serpent Consulting Services’ is set as a parent company, ‘Sub Company 1’ and ‘Sub Company 2’ are set as children companies. You may see the structure of the companies as > follows:



Now, we have to configure chart of accounts for each company. To do that, go to Settings> Configuration> Invoicing. You have to select the company and you have to select Chart of Account Template. You have to click on ‘Install more chart template’ to see the list of country specific chart of account. You may select from the list. See the following image:


After configuring  chart of accounts for each company, you have to configure warehouse locations. For that, go to Warehouse> Configuration> Locations. If you are not able to see the option Locations, go to Settings> Configuration> Warehouse. In ‘Location and Warehouse’ there is a checkbox ‘Manage multiple locations and warehouses’. Check it and click on apply. See the image below.


After that, go to Warehouse> Configuration> Locations. Configure locations for each companies. In the form view, there is a ‘Company’ field.  Enter the name of respective company when you create Locations. Refer the image below.


Now, for Warehouse configuration, go to Warehouse> Configuration> Warehouses. Create separate warehouses for separate companies. For each warehouse you have to define Location Input, Location Stock and Location Output. And for each warehouse you have to enter the name of respective company. Image below is the list view of the Warehouses.




After warehouse, you have to configure Shop. You will find shop at Sales> Configuration> Shop. Create shop for each company. Each shop is integrated with one warehouse. While creating a shop, select correct warehouse for corresponding company. In the following image you can see 3 shops in the list view.



Next is the configuration of the products. You may configure any product as a global product or as a product specific to a company. You will see products in Sales, Purchase and Warehouse. Go to Warehouse> Products> Products.


In the Product form view, there is a field ‘Company’ in the third tab ‘Inventory’.


To make a product global, keep the company field blank. ‘demo product’ is a global product. ‘demo SCS product’ is a product belonged to Serpent Consulting Services company. ‘demo sub product 1’ is belonged to Sub Company 1 and ‘demo sub product 2’ is belonged to Sub Product 2. Admin use can see all products.

Now, you can configure users for different companies. To configure user, go to Settings> Users> Users. Click on ‘Create’ to create a new user. In the form view, you can enter the details like User’s name, Login name, password etc. You will also see ‘Company’ field. Here, 4 users are created. One is Admin user, ‘serpentcs’ user belongs to ‘Serpent Consulting Services’ company, user ‘Sub user 1’ belongs to ‘Sub Company 1’ and user ‘Sub user 2’ belongs to ‘Sub Company 2’. Users can only be assigned to the companies specified in the list of ‘Allowed Companies’ (It can be found at user’s form second tab). Check the following image of user form view.



Multi-Company configuration of OpenERP is done now. You can also configure Partners separately for different companies when you multi-company environment.
Now, in multi-company, sharing of information is done such as the user can see the products configured for child company and the parent company. But the user cannot see the products configured for another child company. Suppose the user of Sub Company 1, ssu1, logs in, user can see the products of Sub Company 1 and Serpent Consulting Services. See the following image.

Similarly, when the user who belonged to Sub Company 2 logged in, the user can see the product configured for the child company Sub Company 2 and parent company Serpent Consulting Services. See the image below.

When the user of parent company Serpent Consulting Services logs in, the user can see products of Parent Company and the children companies.
Now, Login as user of Sub Company 1. Create a Quotation. When you select product to create order lines, you will see the list of products as below.

You may also configure child company as a parent company for a company. You will have 3 tier structure of Companies in single database.
Thanks.
Recent News :-
  1. OpenERP Technical, Function Training in India : May 2013
  2. OpenERP Module Recording : A Complete How-to for XML/YML.
  3. How to Install OpenERP 7 on CentOS!
  4. How to Install OpenERP 7 on Ubuntu.
  5. Its official now : OpenERP 7.0 has been released!
  6. OpenERP 7.0 Training in Dubai Organized by SerpentCS
  7. Security in OpenERP .07 : Users, groups, access, record rules.
  8. SerpentCS releases an Android Application

For any news and updates Regarding Serpent Consulting Services, visit here.