~openerp-vietnam/openobject-doc/technical-tutorial

« back to all changes in this revision

Viewing changes to build/html/_sources/part_2/customize_doc.txt

  • Committer: Najlaâ EL KHAYAT
  • Date: 2009-04-07 12:47:35 UTC
  • Revision ID: nel@tinyerp.com-20090407124735-fvnl6acj42fhff34
doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
===============
 
2
Managing views
 
3
===============
 
4
 
 
5
**Custom view with existing field**
 
6
 
 
7
Sometimes, views contain fields that we would like to move from place to place. Web client allows you to add new fields, change views...
 
8
 
 
9
The below image show the option of customizations: Custom views, objects and workflows
 
10
 
 
11
.. image::  images_custom/1.jpeg 
 
12
 
 
13
Suppose we are on partner menu and we would like to customize the view with adding an existing field 'ean13':
 
14
 
 
15
Before changes, the partner form looks like:
 
16
 
 
17
.. image::  images_custom/before_ean13.png 
 
18
 
 
19
 
 
20
To add this field, press on 'manage views' and choose the view 'res.partner.form'. 
 
21
Then, select the field 'name', click on '+' then select ean13 and its position:
 
22
 
 
23
.. image::  images_custom/ean13.png 
 
24
 
 
25
Refresh client with 'F5' and check the position of EAN13:
 
26
 
 
27
.. image::  images_custom/after_ean13.png 
 
28
 
 
29
 
 
30
========================
 
31
Customization of Objects
 
32
========================
 
33
 
 
34
 
 
35
**Custom Object**
 
36
 
 
37
In this example, we would like to add a new field on the partner form 
 
38
Here we add a domain activity on the partner, because in tiny we don't have a field like this.
 
39
Take care of keeping your new field starting with with x_.
 
40
 
 
41
.. image::  images_custom/2.jpeg 
 
42
 
 
43
You need also to change the appropriate view to see your field on the form.
 
44
Let's make the activity domain printing after the lang:
 
45
 
 
46
.. image::  images_custom/3.jpeg 
 
47
 
 
48
when validating, a screen allows you to add more options on, like required, readonly...
 
49
 
 
50
.. image::  images_custom/3bis.jpeg 
 
51
 
 
52
After refresh, this is how your form looks like:
 
53
 
 
54
.. image::  images_custom/4.jpeg 
 
55
 
 
56
===============
 
57
Creating graphs
 
58
===============
 
59
 
 
60
**Create a graph**
 
61
 
 
62
This how we create a graph, manage views-> new -> then choose the view type 'Graph':
 
63
 
 
64
.. image::  images_custom/5graph_partner.jpeg 
 
65
 
 
66
Then, set the coordinates:
 
67
 
 
68
.. image::  images_custom/6graph_view.jpeg 
 
69
 
 
70
 
 
71
To see the graph on the partner, you need to add graph on the view mode:
 
72
Partners -> Switch(button the right), then change this:
 
73
        view mode becomes: tree,form,graph intead of tree, form
 
74
        then, add the view graph in the array views
 
75
In this picture, you can see the definition of your graph:
 
76
 
 
77
.. image::  images_custom/7Graph.jpeg