Closed asm8073 closed 4 years ago
@asm8073 Your problem is the time it takes to recompute all the partners. If you install the module, it will try to split all existing names in firstname and lastname.
You might try to install the module from the commandline (start the server with -i partner_firstname).
If this still failes, due to a large number of partners, you might need some coding to disable the immediate recomputation, and have a cronjob recompute the partner names in batches (like every hour the next 1024).
Hi @NL66278 , Thank you for your advises. I have more than 30 000 contacts in the DB, so I think the command line installation would not make big difference. I would like to adjust the code in order to disable the immediate recalculation. Could you please give me a hint where to disable the immediate recalculation? Thanks!
@asm8073 Comment out this line: https://github.com/OCA/partner-contact/blob/43fee0870ae261cf733fcd5e95e402c169912e1d/partner_firstname/__init__.py#L2
@NL66278 , thank you for the hint! Changing init.py made error on the installation, as the post_init_hook function is also mentioned in the manifest file. So, I commented out the 4th line in the code below from the hooks.py file:
def post_inithook(cr, ): with api.Environment.manage(): env = api.Environment(cr, SUPERUSER_ID, {}) # env['res.partner']._install_partner_firstname()
Also, I needed to delete pycache and then I was able to install the module successfully. Thank you for your help!
@asm8073 I a glad your issue is resolved!
Hi, I'm using the Odoo Enterprise 12 (Odoo 12.0+e-20191215). I have downloaded the module from the OCA site, have unzipped it and put in the modules folder of our Odoo server, I have changed the folder owner in the same manner as for other modules. Once the server is restarted, I have clicked on Update Apps List and have got the module n the interface :
Once I’ve clicked on the “Install”, the screen gets in waiting for a minute and then shows the message “Connection lost” :
In a minute or so, I get the connection restored, but the module is not in the installed status and not usable
The Odoo server logs during the installation are attached.
module_first_name_install.log