Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall method can not be called several times #53

Open
Tonow-c2c opened this issue Jun 9, 2020 · 3 comments
Open

Uninstall method can not be called several times #53

Tonow-c2c opened this issue Jun 9, 2020 · 3 comments
Labels

Comments

@Tonow-c2c
Copy link

The uninstall method doesn't work well if you call it several times in the same operation (seems only the first call work)

eg:

@anthem.log
def uninstall_agreement_sale_and_base_contract(ctx):
    """ Uninstall agreement_sale and dependency modules """
    uninstall(ctx, ['base_contract', 'agreement_sale'])


@anthem.log
def uninstall_account_followup_partner_level(ctx):
    uninstall(ctx, ['account_followup_partner_level'])


@anthem.log
def uninstall_account_invoice_supplier_ref_reuse(ctx):
    uninstall(ctx, ['account_invoice_supplier_ref_reuse'])


@anthem.log
def pre(ctx):
    """Applying 13.0.1.1.0 PRE operations"""
    uninstall_addons(ctx)


@anthem.log
def post(ctx):
    """ POST: uninstall """
    uninstall_agreement_sale_and_base_contract(ctx)
    uninstall_account_followup_partner_level(ctx)
    uninstall_account_invoice_supplier_ref_reuse(ctx)

in this case only base_contract and agreement_sale were finally uninstalled

@yvaucher yvaucher added the bug label Jun 9, 2020
@Tonow-c2c
Copy link
Author

@guewen @yvaucher did we change something for this issue ?

@yvaucher
Copy link
Member

yvaucher commented Aug 5, 2020

@Tonow-c2c not that I'm aware of

@guewen
Copy link
Contributor

guewen commented Aug 17, 2020

Not sure we can easily fix this, because odoo wipes the envs, registries, etc after uninstall. We'd have to refresh the env entirely as well. The easy approach first would be to document the method saying that it should be invoked in a single anthem run, alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants