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

[10.0][MIG]rule_group is updated yet not available in the model #1058

Closed
flotho opened this issue Feb 4, 2020 · 5 comments
Closed

[10.0][MIG]rule_group is updated yet not available in the model #1058

flotho opened this issue Feb 4, 2020 · 5 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@flotho
Copy link
Member

flotho commented Feb 4, 2020

Hi,

I'm running an upgrade from v9 to v10 with connectors and have this message :

sale_exception: error in migration script sale_exception/migrations/10.0.2.0.0/pre-migration.py: ProgrammingError("ERREUR:  la colonne \xc2\xab rule_group \xc2\xbb de la relation \xc2\xab exception_rule \xc2\xbb n'existe pas\nLINE 3:         SET rule_group = 'sale'\n                    ^\n",)
2020-02-04 12:16:48,273 17929 ERROR old_prod OpenUpgrade: ERREUR:  la colonne « rule_group » de la relation « exception_rule » n'existe pas
LINE 3:         SET rule_group = 'sale'

In this line https://github.com/OCA/sale-workflow/blob/10.0/sale_exception/migrations/10.0.2.0.0/pre-migration.py#L11 the query should be after the model name changing IMHO .

Moreover the field supposed to be changed is not available here : https://github.com/OCA/sale-workflow/blob/9.0/sale_exception/models/sale.py

@pedrobaeza , any tips ?

Regards

@flotho
Copy link
Member Author

flotho commented Feb 4, 2020

Hummm,

Finally, I think that https://github.com/OCA/server-tools/blob/10.0/base_exception/migrations/10.0.2.0.0/pre-migration.py is doing part of the job and this should prevent https://github.com/OCA/sale-workflow/blob/10.0/sale_exception/migrations/10.0.2.0.0/pre-migration.py#L17
and also this should be a post-migration instead of pre-migration

@flotho
Copy link
Member Author

flotho commented Feb 4, 2020

@flotho
Copy link
Member Author

flotho commented Feb 4, 2020

This has been deleted from the file here : OCA/server-tools@00202b4#diff-c7fd995df65e10a635951020066e82a6L94

@flotho
Copy link
Member Author

flotho commented Aug 11, 2021

@florian-dacosta , could you please explain what is the "replacement" of the rule_group field that you deleted in the following commit OCA/server-tools@00202b4#diff-c7fd995df65e10a635951020066e82a6L94

flotho added a commit to flotho/connector-ecommerce that referenced this issue Aug 11, 2021
flotho added a commit to flotho/connector-ecommerce that referenced this issue Aug 11, 2021
In case of onchange method calling method that retrun possible false values https://github.com/OCA/OCB/blob/10.0/addons/account/models/partner.py#L162 the syntax value[0] failed because of the structure fo the dictionnary :
values = {'fiscal_position_id': False}
This patch prevent to pass in those lines

Update sale_order_onchange.py

fix pylint/flake

Delete rule_group from data

to deal with OCA/sale-workflow#1058

Update ecommerce_data.xml

(facepalm)
@github-actions
Copy link

github-actions bot commented May 1, 2022

There hasn't been any activity on this issue in the past 6 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 issue 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 May 1, 2022
@github-actions github-actions bot closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant