← Back to team overview

openerp-expert-framework team mailing list archive

about base_external_referentials and magentoerpconnect

 

Hi Raphaël,

I'm back in action with OpenObject/OpenERP and at the moment I'm
studying base_external_referentials as I'm going to write a module for
integrating Django-LFS.
In order to understand how the module works I'm doing the only thing I
can do: read the code line by line :) but as you know this can be quite
time consuming above all with such a complex module.
So, just a couple of things:

   1. goooood work guys :)
   2. do  you have a schema/diagram/image/whatever on how things are
      glued together? This will simplify a lot my work as well as others';
   3. some suggestions/questions about specific parts of the code:
          * base_external_referentials/external_osv.py:
                o

                  49: def external_connection(self, cr, uid, DEBUG=False):

                                     """Should be overridden to provide valid external referential connection"""

                                     return False

                      + Shouldn't be better to rise an exception here?
                        You can use for example "NotImplemented":

                        raise NotImplemented("You must provide this method....")

                      + NOTE: IMHO the "class Connection" that you've
                        defined in "magentoerpconnect/magerp_osv.py"
                        should be placed into base_external_referentials
                        or at least a skeleton of it. That's because:
                           1. later in the code you use methods that you
                              only have defined into
                              "magentoerpconnect/magerp_osv.py" such as
                              "call";
                           2. people don't have to skim trough other
                              module's code to know how they should
                              structure their connection class/methods.
                o

                  134: def get_external_data

                      + what is supposed/planned to do?
                o

                  261: mapping_id = self.pool.get('external.mapping').search(cr, uid, [('model', '=', self._name), ('referential_id', '=', ext_ref_id)])

                o

                  262: if mapping_id:

                o

                  [...]

                o

                  272: mapping_id = self.pool.get('external.mapping').search(cr, uid, [('model', '=', self._name), ('referential_id', '=', ext_ref_id)])
                          

                  o Those lines are the same but nothing seems changed
                    in terms of values, is it an error or am I missing
                    something?


TIA for your attention, bests
SimO