Skip to content

Conversation

paradoxxxzero
Copy link
Contributor

When a binding is deactivated, its state is set to to_update but when it's reactivated nothing happens.

This PR sets the state to to_update when the binding is set to active again.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@sebastienbeau sebastienbeau added this to the 14.0 milestone Dec 11, 2021
@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 17, 2022
@github-actions github-actions bot closed this May 22, 2022
@hparfr
Copy link
Contributor

hparfr commented May 23, 2022

@simahawk @sebastienbeau can someone merge this one ?

@simahawk simahawk reopened this May 23, 2022
Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work. Could you please keep commit msg shorter and keep explanations for the long description?

Eg:

connector_search_engine: fix state on binding re-activate

When a binding is re-activated it's state should be set to `to_update`
so that it will get exported when needed.


def write(self, vals):
not_new = self.browse()
if "active" in vals and not vals["active"]:
Copy link
Contributor

@simahawk simahawk May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is enough. IMO in case a record is re-activated the json data should be recomputed first -> this will lead to proper state.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right.
What we need to do is if the field is we have vals["active"] is to call jobify_recompute_json(force_export=True) and this job will update the json and then set it to_update

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 29, 2022
@sebastienbeau
Copy link
Member

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

Successfully merging this pull request may close these issues.

6 participants