Skip to Content

Contributors

Plugin/module multiplexer/switcher for multi company

Hi!

I have a client that has multi company installation. Each company resides in a different country. For each country I have created a module that acts the same as partner_autocomplate but retrieveing data from their local authorities (state registers). Now I would like to create something as a plugin system where the client could use all of these modules for different companies. So I'd need to create some sort of plugins and multiplexer/switcher that would route requests to appropriate plugin. Is there anything like that already existing in Odoo?

One approach that I see would be creating that multiplexer/switcher as a main module that would provide company-specific configuration. Each of the plugin modules would be a module of its own extending the main module's list of available plugins implemented as fields.Selection via selection_add. That selection would be used as company-specific configuration to know, which plugin should server the requests. So when requests comes and it is passed through plugins each would be able to tell whether it's the correct one to serve it.

Is there a better way to do this? Any suggestions are welcome.

Best regards

	Radovan Skolnik



by Radovan Skolnik - 11:26 - 8 Feb 2022

Follow-Ups

  • Re: Plugin/module multiplexer/switcher for multi company
    The only problem with the dynamic dispatching according method name is that the code discoverability is more difficult, as you usually look for occurrences of your full method name in other parts of the code, which doesn't happen here. I recently suggest to use a similar approach using inheritance here:


    and attended by Denis here:


    Regards.

    by Pedro M. Baeza - 02:40 - 9 Feb 2022
  • Re: Plugin/module multiplexer/switcher for multi company
    Yes, dispatcher is sort of what I'm looking for. What you suggest is ingenious! Me coming from languages like Java/Pascal/C/Assembler would never think of approach you suggested :-) I mean dynamically calling method name like that. I wanted to do this by standard inheritance chaining of the same method where only the appropriate one would process the request.

    Thanks for the eye-opener!

    Best regards 

      Radovan

    From: gdgellatly@gmail.com
    Sent: February 9, 2022 12:36
    To: contributors@odoo-community.org
    Reply-to: contributors@odoo-community.org
    Subject: Re: Plugin/module multiplexer/switcher for multi company

    Hi,

    It sounds to me like you are suggesting a standard dispatcher.

    There is already plenty of this in Odoo. Company specific headers, company specific pricelists, bank specific imports, EDI processing orders, mail.channel specific commands (those are dynamically defined and executed, probably best example for this).

    Just define a parent module with a standard API dispatcher and a selection field (or Char) where it makes sense.

    e.g in base module - very pseudo if its python, if it is web based or you just need a URL for standard data maybe it may be different but you get the idea.
    class Company:
    field = fields.Selection(base)

    class Partner:
    def complete:
      ensure_one()
      return getattr(self, 'complete_{self.env.user_id.company_id.field}', self.complete_base)()

    def complete base

    extension module
    add field to selection say modb
    def complete_modb()

    On Wed, Feb 9, 2022 at 8:51 PM Radovan Skolnik <radovan@skolnik.info> wrote:
    Hi,
    
    the question was meant more towards good design of something that covers the 
    same area functionally (in this case partner autocomplete) but needs to 
    provide more implementations that are chosen based on certain criteria.
    
    So in my case I need to have more than one different implementation of the same 
    functionality present in the system and choose the appropriate one - in my 
    case based on current company being active and configuration for that company.
    
    That leads me to some kind plugin system and was wondering if there was 
    anything like that existing in Odoo / OCA already.
    
    Best regards
    
    	Radovan
    
    On streda 9. februára 2022 6:52:24 CET Bruno Joliveau wrote:
    
    > Hi,
    
    > I think it's probably different from a context to another.
    
    > In our case, the majority of our customers work internationally. Their
    
    > search for information is dissociated. The autocomplete is not linked to
    
    > the company in which the user is connected but the country on which he
    
    > creates the new partner for which he is looking for information. All the
    
    > countries we needed to cover for this customer had different connection
    
    > modes and incompatible data structures. We have therefore chosen to process
    
    > outside Odoo in order to standardize the structure of the results thanks to
    
    > different mappings. Odoo connects to the service, the service gets data and
    
    > digests the information. Hope it helps !
    
    > 
    
    > 
    
    > *Bruno Joliveau* - Président NUMIGI SOLUTIONS INC.
    
    > bruno.joliveau@numigi.com  [1]  (514) 317-7944
    
    > Longueuil, Québec, Canada http://www.numigi.com/ [2]
    
    > None [3]   None [4]   None [5]   None [6]
    
    > [7]
    
    > 
    
    > Le mar. 8 févr. 2022 à 17:27, Radovan Skolnik < radovan@skolnik.info  [8] > a
    
    > écrit : Hi!
    
    > I have a client that has multi company installation. Each company resides in
    
    > a different country. For each country I have created a module that acts the
    
    > same as partner_autocomplate but retrieveing data from their local
    
    > authorities (state registers). Now I would like to create something as a
    
    > plugin system where the client could use all of these modules for different
    
    > companies. So I'd need to create some sort of plugins and
    
    > multiplexer/switcher that would route requests to appropriate plugin. Is
    
    > there anything like that already existing in Odoo? One approach that I see
    
    > would be creating that multiplexer/switcher as a main module that would
    
    > provide company-specific configuration. Each of the plugin modules would be
    
    > a module of its own extending the main module's list of available plugins
    
    > implemented as fields.Selection via selection_add. That selection would be
    
    
    > used as company-specific configuration to know, which plugin should server
    
    
    > the requests. So when requests comes and it is passed through plugins each
    
    
    > would be able to tell whether it's the correct one to serve it. Is there a
    
    
    > better way to do this? Any suggestions are welcome.
    
    
    > Best regards
    
    
    > Radovan Skolnik
    
    
    > 
    
    
    > 
    
    
    > _______________________________________________
    
    
    > Mailing-List:https://odoo-community.org/groups/contributors-15 [9]
    
    > Post to: mailto: contributors@odoo-community.org [10]
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [11]
    
    > 
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [12]
    
    > Post to: mailto:contributors@odoo-community.org
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [13]
    
    > 
    
    > 
    
    > 
    
    > [1] mailto:bruno.joliveau@numigi.com
    
    > [2] http://www.numigi.com/
    
    > [3] https://fr.linkedin.com/company/numigi
    
    > [4] https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ
    
    > [5] https://blogue.numigi.com/
    
    > [6] https://twitter.com/numigi_ca?lang=fr
    
    > [7] https://bit.ly/5W-Numigi
    
    > [8] mailto:radovan@skolnik.info
    
    > [9] https://odoo-community.org/groups/contributors-15
    
    > [10] mailto:contributors@odoo-community.org
    
    > [11] https://odoo-community.org/groups?unsubscribe
    
    > [12] https://odoo-community.org/groups/contributors-15
    
    > [13] https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
                            Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Radovan Skolnik - 02:21 - 9 Feb 2022
  • Re: Plugin/module multiplexer/switcher for multi company
    Hi,

    It sounds to me like you are suggesting a standard dispatcher.

    There is already plenty of this in Odoo. Company specific headers, company specific pricelists, bank specific imports, EDI processing orders, mail.channel specific commands (those are dynamically defined and executed, probably best example for this).

    Just define a parent module with a standard API dispatcher and a selection field (or Char) where it makes sense.

    e.g in base module - very pseudo if its python, if it is web based or you just need a URL for standard data maybe it may be different but you get the idea.
    class Company:
    field = fields.Selection(base)

    class Partner:
    def complete:
      ensure_one()
      return getattr(self, 'complete_{self.env.user_id.company_id.field}', self.complete_base)()

    def complete base

    extension module
    add field to selection say modb
    def complete_modb()

    On Wed, Feb 9, 2022 at 8:51 PM Radovan Skolnik <radovan@skolnik.info> wrote:
    Hi,
    
    the question was meant more towards good design of something that covers the 
    same area functionally (in this case partner autocomplete) but needs to 
    provide more implementations that are chosen based on certain criteria.
    
    So in my case I need to have more than one different implementation of the same 
    functionality present in the system and choose the appropriate one - in my 
    case based on current company being active and configuration for that company.
    
    That leads me to some kind plugin system and was wondering if there was 
    anything like that existing in Odoo / OCA already.
    
    Best regards
    
    	Radovan
    
    On streda 9. februára 2022 6:52:24 CET Bruno Joliveau wrote:
    
    
    > Hi,
    
    
    > I think it's probably different from a context to another.
    
    
    > In our case, the majority of our customers work internationally. Their
    
    
    > search for information is dissociated. The autocomplete is not linked to
    
    
    > the company in which the user is connected but the country on which he
    
    
    > creates the new partner for which he is looking for information. All the
    
    
    > countries we needed to cover for this customer had different connection
    
    
    > modes and incompatible data structures. We have therefore chosen to process
    
    
    > outside Odoo in order to standardize the structure of the results thanks to
    
    
    > different mappings. Odoo connects to the service, the service gets data and
    
    
    > digests the information. Hope it helps !
    
    
    > 
    
    
    > 
    
    
    > *Bruno Joliveau* - Président NUMIGI SOLUTIONS INC.
    
    
    > bruno.joliveau@numigi.com [1]  (514) 317-7944
    
    
    > Longueuil, Québec, Canada  http://www.numigi.com/ [2]
    
    
    > None [3]   None [4]   None [5]   None [6]
    
    
    > [7]
    
    
    > 
    
    
    > Le mar. 8 févr. 2022 à 17:27, Radovan Skolnik < radovan@skolnik.info [8] > a
    
    
    > écrit : Hi!
    
    
    > I have a client that has multi company installation. Each company resides in
    
    
    > a different country. For each country I have created a module that acts the
    
    
    > same as partner_autocomplate but retrieveing data from their local
    
    
    > authorities (state registers). Now I would like to create something as a
    
    
    > plugin system where the client could use all of these modules for different
    
    
    > companies. So I'd need to create some sort of plugins and
    
    
    > multiplexer/switcher that would route requests to appropriate plugin. Is
    
    
    > there anything like that already existing in Odoo? One approach that I see
    
    
    > would be creating that multiplexer/switcher as a main module that would
    
    
    > provide company-specific configuration. Each of the plugin modules would be
    
    
    > a module of its own extending the main module's list of available plugins
    
    
    > implemented as fields.Selection via selection_add. That selection would be
    
    
    > used as company-specific configuration to know, which plugin should server
    
    
    > the requests. So when requests comes and it is passed through plugins each
    
    
    > would be able to tell whether it's the correct one to serve it. Is there a
    
    
    > better way to do this? Any suggestions are welcome.
    
    
    > Best regards
    
    
    > Radovan Skolnik
    
    
    > 
    
    
    > 
    
    
    > _______________________________________________
    
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [9]
    
    
    > Post to: mailto: contributors@odoo-community.org [10]
    
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [11]
    
    
    > 
    
    
    > 
    
    
    > _______________________________________________
    
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [12]
    
    
    > Post to: mailto:contributors@odoo-community.org
    
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [13]
    
    
    > 
    
    
    > 
    
    
    > 
    
    
    > [1] mailto:bruno.joliveau@numigi.com
    
    
    > [2] http://www.numigi.com/
    
    
    > [3] https://fr.linkedin.com/company/numigi
    
    
    > [4] https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ
    
    
    > [5] https://blogue.numigi.com/
    
    
    > [6] https://twitter.com/numigi_ca?lang=fr
    
    
    > [7] https://bit.ly/5W-Numigi
    
    
    > [8] mailto:radovan@skolnik.info
    
    
    > [9] https://odoo-community.org/groups/contributors-15
    
    
    > [10] mailto:contributors@odoo-community.org
    
    
    > [11] https://odoo-community.org/groups?unsubscribe
    
    
    > [12] https://odoo-community.org/groups/contributors-15
    
    
    > [13] https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by "Graeme Gellatly" <gdgellatly@gmail.com> - 12:35 - 9 Feb 2022
  • Re: Plugin/module multiplexer/switcher for multi company

    Hi Radovan

    Recently there were a lot of discussions in "OCA/edi" repository to refactor the pre-14.0 code to use "Component", and I think they pulled it off also - this code mainly has to do with export and import of electronic invoices and other documents, which can be in different formats.

    A similar usecase is in the "bank-statement-import" repository, here to import different formats of bank statements - you can study how it was done there:

    https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import

    The particular module of account_statement_import_online puts down a framework to import from different online API's:

    https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online

    Which may come closer to your usecase.

    I think the "component" route is technically the best, but as you can see before it existed, people made it in different ways, and so there are more ways to Rome.

    -Tom

    On 2/9/22 11:52 AM, Radovan Skolnik wrote:
    Lois,
    
    that definitely seems like well-thought-out system for even much more complex 
    cases than mine. For the sake of learning something new I will probably try to 
    use it. Thanx a lot.
    
    Best regards
    
    	Radovan
    
    On streda 9. februára 2022 10:37:26 CET Lois Rilo Antelo wrote:
    
    > Hi Radovan,
    
    > I think that components (
    
    > https://github.com/OCA/connector/tree/14.0/component [1] ) might be the
    
    > concept you are looking for. You can have a base module and then different
    
    > modules that introduce new components for each country (following your
    
    > example). Then on execution, the appropriate component will be used
    
    > depending on the working context. You can see different examples on how to
    
    > use components in the OCA: different connectors, edi... My 2 cents.
    
    > Kind regards,
    
    > On Wed, Feb 9, 2022 at 8:51 AM Radovan Skolnik < radovan@skolnik.info [2] >
    
    > wrote: Hi,
    
    > the question was meant more towards good design of something that covers the
    
    > same area functionally (in this case partner autocomplete) but needs to
    
    > provide more implementations that are chosen based on certain criteria. So
    
    > in my case I need to have more than one different implementation of the
    
    > same functionality present in the system and choose the appropriate one -
    
    > in my case based on current company being active and configuration for that
    
    > company. That leads me to some kind plugin system and was wondering if
    
    > there was anything like that existing in Odoo / OCA already.
    
    > Best regards
    
    > Radovan
    
    > 
    
    > On streda 9. februára 2022 6:52:24 CET Bruno Joliveau wrote:
    
    > > Hi,
    
    > > I think it's probably different from a context to another.
    
    > > In our case, the majority of our customers work internationally. Their
    
    > > search for information is dissociated. The autocomplete is not linked to
    
    > > the company in which the user is connected but the country on which he
    
    > > creates the new partner for which he is looking for information. All the
    
    > > countries we needed to cover for this customer had different connection
    
    > > modes and incompatible data structures. We have therefore chosen to
    
    > > process
    
    > > outside Odoo in order to standardize the structure of the results thanks
    
    > > to
    
    > > different mappings. Odoo connects to the service, the service gets data
    
    > > and
    
    > > digests the information. Hope it helps !
    
    > > 
    
    > > 
    
    > > *Bruno Joliveau* - Président NUMIGI SOLUTIONS INC.
    
    > > 
    
    > >  bruno.joliveau@numigi.com [3] [1] (514) 317-7944
    
    > > 
    
    > > Longueuil, Québec, Canada  http://www.numigi.com/ [4] [2]
    
    > > None [3]  None [4]  None [5]  None [6]
    
    > > [7]
    
    > > 
    
    > > Le mar. 8 févr. 2022 à 17:27, Radovan Skolnik <  radovan@skolnik.info [5]
    
    > > [8] > a écrit : Hi!
    
    > > I have a client that has multi company installation. Each company resides
    
    > > in a different country. For each country I have created a module that
    
    > > acts the same as partner_autocomplate but retrieveing data from their
    
    > > local authorities (state registers). Now I would like to create something
    
    > > as a plugin system where the client could use all of these modules for
    
    > > different companies. So I'd need to create some sort of plugins and
    
    > > multiplexer/switcher that would route requests to appropriate plugin. Is
    
    > > there anything like that already existing in Odoo? One approach that I see
    
    > > would be creating that multiplexer/switcher as a main module that would
    
    > > provide company-specific configuration. Each of the plugin modules would
    
    > > be
    
    > > a module of its own extending the main module's list of available plugins
    
    > > implemented as fields.Selection via selection_add. That selection would be
    
    > > used as company-specific configuration to know, which plugin should server
    
    > > the requests. So when requests comes and it is passed through plugins each
    
    > > would be able to tell whether it's the correct one to serve it. Is there a
    
    > > better way to do this? Any suggestions are welcome.
    
    > > Best regards
    
    > > Radovan Skolnik
    
    > > 
    
    > > 
    
    > > _______________________________________________
    
    > > Mailing-List:  https://odoo-community.org/groups/contributors-15 [6] [9]
    
    > > Post to: mailto:  contributors@odoo-community.org [7] [10]
    
    > > Unsubscribe:  https://odoo-community.org/groups?unsubscribe [8] [11]
    
    > > 
    
    > > 
    
    > > _______________________________________________
    
    > > Mailing-List:  https://odoo-community.org/groups/contributors-15 [9] [12]
    
    > > Post to: mailto: contributors@odoo-community.org [10]
    
    > > Unsubscribe:  https://odoo-community.org/groups?unsubscribe [11] [13]
    
    > > 
    
    > > 
    
    > > 
    
    > > [1] mailto: bruno.joliveau@numigi.com [12]
    
    > > [2]  http://www.numigi.com/ [13]
    
    > > [3]  https://fr.linkedin.com/company/numigi [14]
    
    > > [4]  https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ [15]
    
    > > [5]  https://blogue.numigi.com/ [16]
    
    > > [6]  https://twitter.com/numigi_ca?lang=fr [17]
    
    > > [7]  https://bit.ly/5W-Numigi [18]
    
    > > [8] mailto: radovan@skolnik.info [19]
    
    > > [9]  https://odoo-community.org/groups/contributors-15 [20]
    
    > > [10] mailto: contributors@odoo-community.org [21]
    
    > > [11]  https://odoo-community.org/groups?unsubscribe [22]
    
    > > [12]  https://odoo-community.org/groups/contributors-15 [23]
    
    > > [13]  https://odoo-community.org/groups?unsubscribe [24]
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [25]
    
    > Post to: mailto: contributors@odoo-community.org [26]
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [27]
    
    > 
    
    > --
    
    > *Lois Rilo Antelo*  Odoo consultant at ForgeFlow S.L.  
    
    > lois.rilo@forgeflow.com [28]  |  https://www.forgeflow.com [29] Twitter:
    
    > /LoisRForgeFlow [30]
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [31]
    
    > Post to: mailto:contributors@odoo-community.org
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [32]
    
    > 
    
    > 
    
    > 
    
    > [1] https://github.com/OCA/connector/tree/14.0/component
    
    > [2] mailto:radovan@skolnik.info
    
    > [3] mailto:bruno.joliveau@numigi.com
    
    > [4] http://www.numigi.com/
    
    > [5] mailto:radovan@skolnik.info
    
    > [6] https://odoo-community.org/groups/contributors-15
    
    > [7] mailto:contributors@odoo-community.org
    
    > [8] https://odoo-community.org/groups?unsubscribe
    
    > [9] https://odoo-community.org/groups/contributors-15
    
    > [10] mailto:contributors@odoo-community.org
    
    > [11] https://odoo-community.org/groups?unsubscribe
    
    > [12] mailto:bruno.joliveau@numigi.com
    
    > [13] http://www.numigi.com/
    
    > [14] https://fr.linkedin.com/company/numigi
    
    > [15] https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ
    
    > [16] https://blogue.numigi.com/
    
    > [17] https://twitter.com/numigi_ca?lang=fr
    
    > [18] https://bit.ly/5W-Numigi
    
    > [19] mailto:radovan@skolnik.info
    
    > [20] https://odoo-community.org/groups/contributors-15
    
    > [21] mailto:contributors@odoo-community.org
    
    > [22] https://odoo-community.org/groups?unsubscribe
    
    > [23] https://odoo-community.org/groups/contributors-15
    
    > [24] https://odoo-community.org/groups?unsubscribe
    
    > [25] https://odoo-community.org/groups/contributors-15
    
    > [26] mailto:contributors@odoo-community.org
    
    > [27] https://odoo-community.org/groups?unsubscribe
    
    > [28] mailto:lois.rilo@eficent.com
    
    > [29] https://www.forgeflow.com/
    
    > [30] https://twitter.com/LoisRForgeFlow
    
    > [31] https://odoo-community.org/groups/contributors-15
    
    > [32] https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Tom Blauwendraat - 12:26 - 9 Feb 2022
  • Re: Plugin/module multiplexer/switcher for multi company
    Lois,
    
    that definitely seems like well-thought-out system for even much more complex 
    cases than mine. For the sake of learning something new I will probably try to 
    use it. Thanx a lot.
    
    Best regards
    
    	Radovan
    
    On streda 9. februára 2022 10:37:26 CET Lois Rilo Antelo wrote:
    
    > Hi Radovan,
    
    > I think that components (
    
    > https://github.com/OCA/connector/tree/14.0/component [1] ) might be the
    
    > concept you are looking for. You can have a base module and then different
    
    > modules that introduce new components for each country (following your
    
    > example). Then on execution, the appropriate component will be used
    
    > depending on the working context. You can see different examples on how to
    
    > use components in the OCA: different connectors, edi... My 2 cents.
    
    > Kind regards,
    
    > On Wed, Feb 9, 2022 at 8:51 AM Radovan Skolnik < radovan@skolnik.info [2] >
    
    > wrote: Hi,
    
    > the question was meant more towards good design of something that covers the
    
    > same area functionally (in this case partner autocomplete) but needs to
    
    > provide more implementations that are chosen based on certain criteria. So
    
    > in my case I need to have more than one different implementation of the
    
    > same functionality present in the system and choose the appropriate one -
    
    > in my case based on current company being active and configuration for that
    
    > company. That leads me to some kind plugin system and was wondering if
    
    > there was anything like that existing in Odoo / OCA already.
    
    > Best regards
    
    > Radovan
    
    > 
    
    > On streda 9. februára 2022 6:52:24 CET Bruno Joliveau wrote:
    
    > > Hi,
    
    > > I think it's probably different from a context to another.
    
    > > In our case, the majority of our customers work internationally. Their
    
    > > search for information is dissociated. The autocomplete is not linked to
    
    > > the company in which the user is connected but the country on which he
    
    > > creates the new partner for which he is looking for information. All the
    
    > > countries we needed to cover for this customer had different connection
    
    > > modes and incompatible data structures. We have therefore chosen to
    
    > > process
    
    > > outside Odoo in order to standardize the structure of the results thanks
    
    > > to
    
    > > different mappings. Odoo connects to the service, the service gets data
    
    > > and
    
    > > digests the information. Hope it helps !
    
    > > 
    
    > > 
    
    > > *Bruno Joliveau* - Président NUMIGI SOLUTIONS INC.
    
    > > 
    
    > >  bruno.joliveau@numigi.com [3] [1] (514) 317-7944
    
    > > 
    
    > > Longueuil, Québec, Canada  http://www.numigi.com/ [4] [2]
    
    > > None [3]  None [4]  None [5]  None [6]
    
    > > [7]
    
    > > 
    
    > > Le mar. 8 févr. 2022 à 17:27, Radovan Skolnik <  radovan@skolnik.info [5]
    
    > > [8] > a écrit : Hi!
    
    > > I have a client that has multi company installation. Each company resides
    
    > > in a different country. For each country I have created a module that
    
    > > acts the same as partner_autocomplate but retrieveing data from their
    
    > > local authorities (state registers). Now I would like to create something
    
    > > as a plugin system where the client could use all of these modules for
    
    > > different companies. So I'd need to create some sort of plugins and
    
    > > multiplexer/switcher that would route requests to appropriate plugin. Is
    
    > > there anything like that already existing in Odoo? One approach that I see
    
    > > would be creating that multiplexer/switcher as a main module that would
    
    > > provide company-specific configuration. Each of the plugin modules would
    
    > > be
    
    > > a module of its own extending the main module's list of available plugins
    
    > > implemented as fields.Selection via selection_add. That selection would be
    
    > > used as company-specific configuration to know, which plugin should server
    
    > > the requests. So when requests comes and it is passed through plugins each
    
    > > would be able to tell whether it's the correct one to serve it. Is there a
    
    > > better way to do this? Any suggestions are welcome.
    
    > > Best regards
    
    > > Radovan Skolnik
    
    > > 
    
    > > 
    
    > > _______________________________________________
    
    > > Mailing-List:  https://odoo-community.org/groups/contributors-15 [6] [9]
    
    > > Post to: mailto:  contributors@odoo-community.org [7] [10]
    
    > > Unsubscribe:  https://odoo-community.org/groups?unsubscribe [8] [11]
    
    > > 
    
    > > 
    
    > > _______________________________________________
    
    > > Mailing-List:  https://odoo-community.org/groups/contributors-15 [9] [12]
    
    > > Post to: mailto: contributors@odoo-community.org [10]
    
    > > Unsubscribe:  https://odoo-community.org/groups?unsubscribe [11] [13]
    
    > > 
    
    > > 
    
    > > 
    
    > > [1] mailto: bruno.joliveau@numigi.com [12]
    
    > > [2]  http://www.numigi.com/ [13]
    
    > > [3]  https://fr.linkedin.com/company/numigi [14]
    
    > > [4]  https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ [15]
    
    > > [5]  https://blogue.numigi.com/ [16]
    
    > > [6]  https://twitter.com/numigi_ca?lang=fr [17]
    
    > > [7]  https://bit.ly/5W-Numigi [18]
    
    > > [8] mailto: radovan@skolnik.info [19]
    
    > > [9]  https://odoo-community.org/groups/contributors-15 [20]
    
    > > [10] mailto: contributors@odoo-community.org [21]
    
    > > [11]  https://odoo-community.org/groups?unsubscribe [22]
    
    > > [12]  https://odoo-community.org/groups/contributors-15 [23]
    
    > > [13]  https://odoo-community.org/groups?unsubscribe [24]
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [25]
    
    > Post to: mailto: contributors@odoo-community.org [26]
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [27]
    
    > 
    
    > --
    
    > *Lois Rilo Antelo*  Odoo consultant at ForgeFlow S.L.  
    
    > lois.rilo@forgeflow.com [28]  |  https://www.forgeflow.com [29] Twitter:
    
    > /LoisRForgeFlow [30]
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15 [31]
    
    > Post to: mailto:contributors@odoo-community.org
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe [32]
    
    > 
    
    > 
    
    > 
    
    > [1] https://github.com/OCA/connector/tree/14.0/component
    
    > [2] mailto:radovan@skolnik.info
    
    > [3] mailto:bruno.joliveau@numigi.com
    
    > [4] http://www.numigi.com/
    
    > [5] mailto:radovan@skolnik.info
    
    > [6] https://odoo-community.org/groups/contributors-15
    
    > [7] mailto:contributors@odoo-community.org
    
    > [8] https://odoo-community.org/groups?unsubscribe
    
    > [9] https://odoo-community.org/groups/contributors-15
    
    > [10] mailto:contributors@odoo-community.org
    
    > [11] https://odoo-community.org/groups?unsubscribe
    
    > [12] mailto:bruno.joliveau@numigi.com
    
    > [13] http://www.numigi.com/
    
    > [14] https://fr.linkedin.com/company/numigi
    
    > [15] https://www.youtube.com/channel/UC2z69q_2XnumQEE9E7BmelQ
    
    > [16] https://blogue.numigi.com/
    
    > [17] https://twitter.com/numigi_ca?lang=fr
    
    > [18] https://bit.ly/5W-Numigi
    
    > [19] mailto:radovan@skolnik.info
    
    > [20] https://odoo-community.org/groups/contributors-15
    
    > [21] mailto:contributors@odoo-community.org
    
    > [22] https://odoo-community.org/groups?unsubscribe
    
    > [23] https://odoo-community.org/groups/contributors-15
    
    > [24] https://odoo-community.org/groups?unsubscribe
    
    > [25] https://odoo-community.org/groups/contributors-15
    
    > [26] mailto:contributors@odoo-community.org
    
    > [27] https://odoo-community.org/groups?unsubscribe
    
    > [28] mailto:lois.rilo@eficent.com
    
    > [29] https://www.forgeflow.com/
    
    > [30] https://twitter.com/LoisRForgeFlow
    
    > [31] https://odoo-community.org/groups/contributors-15
    
    > [32] https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    by Radovan Skolnik - 11:51 - 9 Feb 2022