Browse Source
[IMP] base_custom_info: Recursive templates.
[IMP] base_custom_info: Recursive templates.
- Select an option with an additional template and get it filled on the owner. - Drop support for onchange, too many bugs to workaround. - Improve demo data. - Improve tests. - Almost cool material icon, this is an app now! - Fun pics.pull/492/head
Jairo Llopis
8 years ago
committed by
Pedro M. Baeza
19 changed files with 356 additions and 87 deletions
-
39base_custom_info/README.rst
-
3base_custom_info/__openerp__.py
-
3base_custom_info/demo/custom.info.category.csv
-
14base_custom_info/demo/custom.info.option.csv
-
14base_custom_info/demo/custom.info.property.csv
-
1base_custom_info/demo/custom.info.template.csv
-
6base_custom_info/demo/custom_info_property_defaults.yml
-
93base_custom_info/models/custom_info.py
-
6base_custom_info/models/custom_info_option.py
-
25base_custom_info/models/custom_info_value.py
-
BINbase_custom_info/static/description/customizations-everywhere.jpg
-
BINbase_custom_info/static/description/icon.png
-
68base_custom_info/static/description/icon.svg
-
BINbase_custom_info/static/description/templateception.jpg
-
104base_custom_info/tests/test_partner.py
-
37base_custom_info/tests/test_value_conversion.py
-
2base_custom_info/views/custom_info_option_view.xml
-
6base_custom_info/views/custom_info_property_view.xml
-
22base_custom_info/views/res_partner_view.xml
@ -0,0 +1,3 @@ |
|||||
|
id,name,sequence |
||||
|
cat_statics,Statics,50 |
||||
|
cat_gaming,Gaming,100 |
@ -1,4 +1,10 @@ |
|||||
id,name,property_ids:id |
|
||||
opt_food,Loves junk food,prop_weaknesses |
|
||||
opt_videogames,Needs videogames,prop_weaknesses |
|
||||
opt_glasses,Huge glasses,prop_weaknesses |
|
||||
|
id,name,property_ids:id,template_id:id |
||||
|
opt_food,Loves junk food,prop_weaknesses, |
||||
|
opt_videogames,Needs videogames,prop_weaknesses,tpl_gamer |
||||
|
opt_glasses,Huge glasses,prop_weaknesses, |
||||
|
opt_shooter,Shooter,prop_fav_genre, |
||||
|
opt_platforms,Platforms,prop_fav_genre, |
||||
|
opt_cars,Cars,prop_fav_genre, |
||||
|
opt_rpg,RPG,prop_fav_genre, |
||||
|
opt_strategy,Strategy,prop_fav_genre, |
||||
|
opt_graphical_adventure,Graphical adventure,prop_fav_genre, |
@ -1,6 +1,8 @@ |
|||||
id,name,template_id:id,field_type,default_value,required |
|
||||
prop_teacher,Name of his/her teacher,tpl_smart,str,, |
|
||||
prop_haters,Amount of people that hates him/her for being so smart,tpl_smart,int,, |
|
||||
prop_avg_note,Average note on all subjects,tpl_smart,float,,True |
|
||||
prop_smartypants,Does he/she believe he/she is the smartest person on earth?,tpl_smart,bool,, |
|
||||
prop_weaknesses,What weaknesses does he/she have?,tpl_smart,id,Huge glasses, |
|
||||
|
id,name,template_id:id,field_type,required,minimum,maximum,category_id:id,sequence |
||||
|
prop_teacher,Name of his/her teacher,tpl_smart,str,,1,30,,100 |
||||
|
prop_haters,Amount of people that hates him/her for being so smart,tpl_smart,int,,0,99999,cat_statics,200 |
||||
|
prop_avg_note,Average note on all subjects,tpl_smart,float,True,0,10,cat_statics,300 |
||||
|
prop_smartypants,Does he/she believe he/she is the smartest person on earth?,tpl_smart,bool,,0,-1,,400 |
||||
|
prop_weaknesses,What weaknesses does he/she have?,tpl_smart,id,,0,-1,,500 |
||||
|
prop_fav_genre,Favourite videogames genre,tpl_gamer,id,,0,-1,cat_gaming,600 |
||||
|
prop_fav_game,Favourite videogame,tpl_gamer,str,,0,-1,cat_gaming,700 |
@ -1,2 +1,3 @@ |
|||||
id,name,model |
id,name,model |
||||
tpl_smart,Smart partners,res.partner |
tpl_smart,Smart partners,res.partner |
||||
|
tpl_gamer,Gamers,res.partner |
@ -0,0 +1,6 @@ |
|||||
|
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> |
||||
|
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
||||
|
- Setting default values after loading custom.info.option.csv |
||||
|
|
||||
|
- !record {model: custom.info.property, id: prop_weaknesses}: |
||||
|
default_value: Huge glasses |
After Width: 500 | Height: 380 | Size: 120 KiB |
After Width: 200 | Height: 200 | Size: 5.2 KiB |
@ -0,0 +1,68 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
|
<svg |
||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/" |
||||
|
xmlns:cc="http://creativecommons.org/ns#" |
||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
||||
|
xmlns:svg="http://www.w3.org/2000/svg" |
||||
|
xmlns="http://www.w3.org/2000/svg" |
||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
||||
|
version="1.1" |
||||
|
width="200" |
||||
|
height="200" |
||||
|
viewBox="0 0 200 200" |
||||
|
id="svg2" |
||||
|
inkscape:version="0.91 r13725" |
||||
|
sodipodi:docname="icon.svg" |
||||
|
inkscape:export-filename="icon.png" |
||||
|
inkscape:export-xdpi="90" |
||||
|
inkscape:export-ydpi="90"> |
||||
|
<metadata |
||||
|
id="metadata10"> |
||||
|
<rdf:RDF> |
||||
|
<cc:Work |
||||
|
rdf:about=""> |
||||
|
<dc:format>image/svg+xml</dc:format> |
||||
|
<dc:type |
||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
||||
|
<dc:title></dc:title> |
||||
|
</cc:Work> |
||||
|
</rdf:RDF> |
||||
|
</metadata> |
||||
|
<defs |
||||
|
id="defs8" /> |
||||
|
<sodipodi:namedview |
||||
|
pagecolor="#9c0c65" |
||||
|
bordercolor="#666666" |
||||
|
borderopacity="1" |
||||
|
objecttolerance="10" |
||||
|
gridtolerance="10" |
||||
|
guidetolerance="10" |
||||
|
inkscape:pageopacity="1" |
||||
|
inkscape:pageshadow="2" |
||||
|
inkscape:window-width="1366" |
||||
|
inkscape:window-height="704" |
||||
|
id="namedview6" |
||||
|
showgrid="false" |
||||
|
inkscape:snap-page="true" |
||||
|
inkscape:zoom="1.2291667" |
||||
|
inkscape:cx="88.427025" |
||||
|
inkscape:cy="64.892414" |
||||
|
inkscape:window-x="0" |
||||
|
inkscape:window-y="27" |
||||
|
inkscape:window-maximized="1" |
||||
|
inkscape:current-layer="svg2" /> |
||||
|
<g |
||||
|
id="g4169" |
||||
|
transform="translate(-2.3856908,-0.417955)"> |
||||
|
<path |
||||
|
inkscape:connector-curvature="0" |
||||
|
id="path4" |
||||
|
d="m 63.145923,117.98015 9.436965,0 0,-9.43697 -9.436965,0 m 4.718483,61.34028 c -20.808512,0 -37.747871,-16.93935 -37.747871,-37.74786 0,-20.80852 16.939359,-37.747875 37.747871,-37.747875 20.808514,0 37.747864,16.939355 37.747864,37.747875 0,20.80851 -16.93935,37.74786 -37.747864,37.74786 m 0,-84.932702 A 47.18484,47.18484 0 0 0 20.679568,132.1356 47.18484,47.18484 0 0 0 67.864406,179.32044 47.18484,47.18484 0 0 0 115.04924,132.1356 47.18484,47.18484 0 0 0 67.864406,84.950758 m -4.718483,70.777262 9.436965,0 0,-28.31091 -9.436965,0 0,28.31091 z" /> |
||||
|
<path |
||||
|
style="stroke:#9c0c65;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
||||
|
id="path4-3" |
||||
|
d="m 161.99013,23.51547 c -2.44155,0 -4.8831,0.830128 -6.88517,2.8322 -14.0145,14.014501 -41.94585,41.945843 -41.94585,41.945843 l 7.32466,7.324652 -17.09086,17.090856 -9.766208,0 -9.766196,19.532409 9.766196,9.7662 19.532408,-9.7662 0,-9.76621 17.09086,-17.090851 7.32465,7.324652 c 0,0 27.93134,-27.931342 41.94585,-41.945843 3.02752,-4.443623 3.80881,-9.961528 0,-13.770347 L 168.8753,26.34767 c -2.00206,-2.002072 -4.44362,-2.8322 -6.88517,-2.8322 m 0,10.596331 9.7662,9.766203 -34.18171,34.181712 -9.7662,-9.766203 34.18171,-34.181712 z" |
||||
|
inkscape:connector-curvature="0" /> |
||||
|
</g> |
||||
|
</svg> |
After Width: 318 | Height: 240 | Size: 57 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue