How to install Swiss Salary module from Open Net

If you just download it from LaunchPad and place in addons directory following by adding new modules into the system, the attempt to add modules gives you a server crash code as follows:

File "/usr/share/openerp/osv/orm.py", line 875, in create_instance
  if not getattr(cls, '_original_module', None) and name == parent_model._name:
tributeError: 'NoneType' object has no attribute '_name

here I explain what can one do to fix the problem…

It looks like this is a well known OpenERP Server problem which was described here, what we need to do is as follows:

=== modified file 'openerp/osv/orm.py'
2    --- openerp/osv/orm.py    2012-02-23 17:58:51 +0000
3    +++ openerp/osv/orm.py    2012-03-05 12:20:23 +0000
4    @@ -872,11 +872,11 @@
5     
6                 for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]):
7                     parent_model = pool.get(parent_name)
8    -                if not getattr(cls, '_original_module', None) and name == parent_model._name:
9    -                    cls._original_module = parent_model._original_module
10                     if not parent_model:
11                         raise TypeError('The model "%s" specifies an unexisting parent class "%s"\n'
12                             'You may need to add a dependency on the parent class\' module.' % (name, parent_name))
13    +                if not getattr(cls, '_original_module', None) and name == parent_model._name:
14    +                    cls._original_module = parent_model._original_module
15                     parent_class = parent_model.__class__
16                     nattr = {}
17                     for s in attributes:

After that fix, you can get an error, which you can use to fix the problem…