Pratik Vyas | c1e6e4c | 2011-06-08 14:37:15 +0530 | [diff] [blame] | 1 | //make tabs |
| 2 | |
| 3 | pscript.onload_people = function() { |
| 4 | make_customer_tab($i('crm_home')); |
| 5 | } |
| 6 | |
| 7 | function make_customer_tab(parent) { |
| 8 | new wn.widgets.DocColumnView('Customers', parent, ['Customer Group', 'Customer', 'Contact'], { |
| 9 | 'Customer Group': { |
| 10 | show_fields : ['name'], |
| 11 | create_fields : ['name'], |
| 12 | search_fields : ['name'], |
| 13 | next_col: 'Customer' |
| 14 | }, |
| 15 | 'Customer': { |
| 16 | show_fields : ['name', 'customer_name'], |
| 17 | create_fields : ['name', 'customer_name'], |
| 18 | search_fields : ['customer_name'], |
| 19 | filter_by : ['Customer Group', 'customer_group'], |
| 20 | next_col: 'Contact' |
| 21 | }, |
| 22 | 'Contact': { |
| 23 | show_fields : ['name', 'first_name', 'last_name'], |
| 24 | create_fields : ['name','first_name', 'last_name'], |
| 25 | search_fields : ['first_name', 'last_name'], |
| 26 | conditions: ['is_customer=1'], |
| 27 | filter_by : ['Customer', 'customer'] |
| 28 | }, |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | |