muk-it / muk_dms

MuK Document Management System
GNU Lesser General Public License v3.0
91 stars 143 forks source link

MUK DMS Uninstall #79

Closed amirpadilla closed 5 years ago

amirpadilla commented 5 years ago

Hello,

We did purchase some of your modules (sent kerrim the invoice).

I have the following issue

If I try to uninstall MUK Documents, it starts the document migration Migration

and after uninstall it I got an error on the website Web

So I found out that some system files are stored in MUK Documents Attatchments

and If I try to change the storage location I still have the missing elements in the webpage. Settings

Also if I uncheck the Attachment Storage option it starts the attachment migration but then some error occur and then it starts over, like a loop. AttachmentsError

So, my question is: What is the correct way to uninstall MUK Documents without losing all the attachments?

Kerrim- commented 5 years ago

I think the reason you are experiencing this is because you are trying to uninstall the module while odoo is running (maybe with more than one worker accessing this db), hence the deadlock. I just tried it and it should be enough just to uninstall muk_dms. The migration process for the attachments is started automatically and after that it removes the modules.

As the migration process can take a while, I would recommend the following:

  1. In the settings change the attachment storage to lobject or database first and click save.

  2. Then you can start the migration in the settings or go to documents -> attachment -> attachments in debug mode where you will see this screen. The column storage type will change to something like: "MuK Documents >> Database". This means that this files are still managed by MuK Documents but the actual storage location is the database. You can check the items you want to migrate and click on action -> migrate storage location.

image

  1. After migrating all files you should check if everything is still working. If it does you can uninstall MuK Documents. If you get some kind of lock try to stop odoo from accessing this database for example by setting database name or dbfilter in your config and then open an odoo shell to the database where you want to uninstall the dms.
# odoo shell -c /etc/odoo/odoo.conf -d YOURDABATASE --no-http
muk_dms = env["ir.module.module"].search([("name", "=", "muk_dms")])
muk_dms.button_immediate_uninstall()

As of the less error you posted I'm not sure if it is related to the dms. It says something in a specific line in your less file is undefined. So the file exists but can't be compiled.

amirpadilla commented 5 years ago

Hi @keshrath , @Kerrim-

I'm not sure if we should close this issue, I followed Kerrim steps, but the main issue is with

After migrating all files you should check if everything is still working.

I tried to migrate some files and webpage stopped working, it looks the migration break the location where the less files are in the system, so i'm not sure if that is because of the migration or it has to do something with Odoo directly

Could not get content for /web_editor/static/src/less/web_editor.common.custom.web.assets_frontend.less defined in bundle 'web.assets_frontend'. Could not get content for /portal/static/src/less/website.wrapwrap.custom.web.assets_frontend.less defined in bundle 'web.assets_frontend'. (b'', b"NameError: .o-create-color-classes is undefined in - on line 4350, column 17: 4349 4350 .o-create-color-classes(~'alpha-lighter', @color-alpha-lighter); 4351 .o-create-color-classes(~'alpha-light', @color-alpha-light);

")This error occured while compiling the bundle 'web.assets_frontend' containing:

  • /web/static/lib/bootstrap/less/variables.less
  • /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less
  • /web/static/lib/bootstrap/less/mixins/buttons.less
  • /web/static/lib/bootstrap/less/mixins/clearfix.less
  • /web/static/lib/bootstrap/less/mixins/size.less
  • /web/static/src/less/variables.less
  • /web/static/src/less/utils.less
  • /web_editor/static/src/less/web_editor.variables.less
  • /web/static/src/less/import_bootstrap.less
  • /web_editor/static/src/less/web_editor.common.custom.web.assets_frontend.less
  • /portal/static/src/less/website.ui.less
  • /portal/static/src/less/website.wrapwrap.custom.web.assets_frontend.less
  • /portal/static/src/less/bootstrap.extend.less
  • /portal/static/src/less/portal_frontend.less
  • /payment/static/src/less/payment_form.less
  • /sale/static/src/less/sale_portal.less
  • /website/static/src/less/website.ui.components.less
  • /website/static/src/less/website.snippets.less
  • /website/static/src/less/website.zoomodoo.less
  • /website_form/static/src/less/website_form.less
  • /website_mail/static/src/css/website_mail.less
  • /website_rating/static/src/less/website_rating.less
  • /website_sale_comparison/static/src/less/website_sale_comparison.less
  • /website_sale_wishlist/static/src/less/website_sale_wishlist.less
  • /business_all_in_one_73lines/static/src/less/s_three_boxes_with_icon.less
  • /business_all_in_one_73lines/static/src/less/s_progress_bar.less
  • /business_all_in_one_73lines/static/src/less/odometer.less
  • /business_all_in_one_73lines/static/src/less/skill_chart.less
  • /business_all_in_one_73lines/static/src/less/s_1x1_promo_banner_images.less
  • /business_all_in_one_73lines/static/src/less/s_ecommerce_service.less
  • /business_all_in_one_73lines/static/src/less/s_about_us_skill_chart.less
  • /business_all_in_one_73lines/static/src/less/s_bar_chart.less
  • /ecommerce_all_in_one_73lines/static/src/less-css/products_view_switcher.less
  • /ecommerce_all_in_one_73lines/static/src/less-css/products_view_limit.less
  • /ecommerce_all_in_one_73lines/static/src/less-css/brand_page.less
  • /ecommerce_all_in_one_73lines/static/src/less-css/quick_view.less
  • /ecommerce_all_in_one_73lines/static/src/less-css/product_ribbon.less
  • /mail/static/src/less/chat_window.less
  • /mail/static/src/less/thread.less
  • /im_livechat/static/src/less/im_livechat.less Could not get content for /web_editor/static/src/less/web_editor.common.custom.web.assets_frontend.less defined in bundle 'web.assets_frontend'. Could not get content for /portal/static/src/less/website.wrapwrap.custom.web.assets_frontend.less defined in bundle 'web.assets_frontend'.
keshrath commented 5 years ago

Try regenerating the assets after migration. In Odoo 12 this can be done directly via the Debug menu "Regenerate Assets Bundles". Maybe it didn't exist in version 11 then you have to do it via the odoo shell.

amirpadilla commented 5 years ago

@keshrath Do you know by any chance the command for the shell, I can't locate any command in the odor forums

I will try with this: https://medium.com/@reedrehg/odoo-images-and-attachments-explaining-and-regenerating-assets-d1eb7fe8a3ed

keshrath commented 5 years ago

https://github.com/odoo/odoo/blob/12.0/addons/web/static/src/js/tools/debug_manager.js#L226

keshrath commented 5 years ago

just delete them

amirpadilla commented 5 years ago

@keshrath tried with no luck