Dear Community, As you know when you use OpenERP with multiple localizations you will face some problems. Indeed each localization can change the views, the menu and also overwrite the initial python method. For now there is no standard for making localization compatible. So I propose to create an abstract module that will provide us tools for solving the problem.
My idea is simple: instead of doing a lot of ugly code in the xml for trying to hide some field depending in the localization (and the same for the menu) it will be easier to hide automatically every view for a module (and the same for the menu). For the python part I propose to use an abstraction for testing if we have or not to execute the code. A prototype can be found here : https://code.launchpad.net/~extra-addons-commiter/+junk/POC-multi-localization Try it, fork it, improve it The module multicompany_module_selector add the possibility to unactive a module for a company (open the menu company and add the module to unactive) The module fake_company_1 and fake_company_2 are fake module for testing the POC What does the multicompany_module_selector: - it overwrites the build of the view and exclude all of the view added by the module unactivated for a specific company - it overwrite the build of the menu and exclude all of the menu added by the module unactivated nactivated for a specific company - it add the “_check_module_allowed” method on the class Model in order to test easily the localisation. You can try it, for that just install the 3 modules. Then create 3 companies and 3 users (on user per company) For the company 1, unactive the module ‘fake_localization_2’ For the company 2, unactive the module ‘fake_localization_1’ Now with the user 3, open a sale order you will see the field added by the localization 1 and 2 Create a sale order and validate it, you will see that the sale_order pass in the python code of the localisation 1 and 2 Now with the user 1, open a sale order you will see the field added by the localization 1/ Create a sale order and validate it, you will see that the sale_order pass in the python code of the localisation 1 Now with the user 2, open a sale order you will see the field added by the localization 2 Create a sale order and validate it, you will see that the sale_order pass in the python code of the localisation 2 This is a POC; it needs more work to have something good. But before working more on it, I would like to have your opinion. Indeed we really need to find a good solution for making localization compatible without headache Thanks for helping us -- BEAU Sébastien MagentoERPconnect Project Manager at Akretion twitter : seb_beau skype : sebastien_beau www.akretion.com http://launchpad.net/magentoerpconnect
_______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : openerp-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp