muk-it / muk_web

MuK Odoo Web Modules
GNU Lesser General Public License v3.0
109 stars 232 forks source link

[12.0] psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block #73

Closed moblesmarti closed 5 years ago

moblesmarti commented 5 years ago

we have updated your apps muk_web_branding and muk_website_branding and we have the following error: psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block.

keshrath commented 5 years ago

IF you have recently updated the app, you may need to uninstall and reinstall it once.

moblesmarti commented 5 years ago

Hi, we have tested with the order ./odoo-bin --database=DB_NAME --uninstall MODULE_NAME and its has informed us that the uninstall command is not correct.

In ./odoo-bin --help cannot see any command for uninstall module. Any help, please...

keshrath commented 5 years ago

use the odoo shell and the function button_immediate_uninstall on ir.module.module

keshrath commented 5 years ago

Shell: https://medium.com/@reedrehg/run-an-odoo-repl-ipython-prompt-7f10d0d5d824

keshrath commented 5 years ago
module = self.env.['ir.module.module'].search([('name', '=', 'muk_web_theme')], limit=1)
module.button_immediate_uninstall()
env.cr.commit()
moblesmarti commented 5 years ago

The last test I have done ... after reading your instructions carefully

odoo@portal:/opt/odoo$ ./odoo-bin shell -d mydatabase

In: attachment_obj = self.env['ir.module.module'] In: attachment_obj.search([('name', '=', 'muk_web_theme')], limit=1) Out: ir.module.module(7,)

In: attachment_obj.module.button_immediate_uninstall() Out: Traceback (most recent call last): File "/usr/lib/python3.6/code.py", line 91, in runcode exec(code, self.locals) File "", line 1, in AttributeError: 'ir.module.module' object has no attribute 'module'

What do I do wrong?

keshrath commented 5 years ago

I think its just attachment_obj.button_immediate_uninstall() but I don't get why you call the variable attachment_obj

moblesmarti commented 5 years ago

Now, I haven't any errors, but I don't know if the module (or modules) is uninstalled, because I restart the server and I have the same error.

If I repeat the same orders, the same thing happens to me, that is to say that it seems that I do not uninstall them.

In the last ordrer say me "{'type': 'ir.actions.act_url', 'target': 'self', 'url': '/web'}"

keshrath commented 5 years ago

did you do env.cr.commit()?

moblesmarti commented 5 years ago

Eureka! With patience and by pressing the instructions by hand (not copying and pasting) I have solved the problem. At least I managed to start the database, uninstalling the module from the theme. Sincerely, thank you very much for your help.