Make column syntax definition easier and shorter

Registered by Nicolas DS

The aim of the wrapper is to made the code more simple for new comming user.
Wrapper will add those helping functions:
- Automatic object naming: don't need the "_name"
- Automatic column detection in class attribute: don't need the "_columns = {}"
- Automatic labeling: label = attribute name, '_' converted to ' '
- Automatic many2one and many2many resolution: scan the other object
- Automatic retrieve object name from a class model: Don't need to type all the
  object name

Note:
The implementation of 'column_G' is not done for now, it's a special case
of many2many: equal2equal, see the blueprint "many2many-equal2equal"

Object implementation (NOW):
----------------------------
class my_object(osv.osv):
    _name = 'my_module.my_object'
    _columns = {
        'col_a': fields.integer('column A'),
        'col_b': fields.char('column B', size=44),
        'col_c': fields.many2one('my_module.other_object', 'The column C'),
        'col_d': fields.many2many('my_module.other_object',
            'm2m_my_module_my_object_my_module_my_other_object', 'ocol_c',
            'col_d', 'The column D'),
        'column_E': fields.integer('column E'),
        'column_F': fields.char('column F', size=44),
        'column_G': fields.many2many('my_module.my_object',
            'e2e_my_module_my_object', 'column_G',
            'column_G', 'The column G')
    }

class other_object(osv.osv):
    _name = 'my_module.other_object'
    _columns = {
        'ocol_a': fields.integer('ocol a'),
        'ocol_b': fields.one2many('my_module.my_object', 'col_c','ocol b'),
        'ocol_c': fields.many2many('my_module.my_object',
            'm2m_my_module_my_object_my_module_my_other_object', 'col_d',
            'ocol_c', 'ocol c')
    }

Object implementation (TARGET of this blueprint):
That will generate the same thing !
-------------------------------------------------
class my_object(osv.osv):
    col_a = field.integer('column A')
    col_b = field.char(44, 'column B')
    col_c = field.many2one('my_module.other_object', 'The column C')
    col_d = field.many2many(other_object, 'The column D')
    column_E = field.integer()
    column_F = field.char(44)
    column_G = field.many2many()

class other_object(osv.osv):
    ocol_a = field.integer()
    ocol_b = field.one2many(my_object)

Explanation:
- Automatic label: column_E, column_F, ocol_a, ocol_b
- Automatic retrieve object name from a class model: col_d, ocol_b

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.