[FIX] util/domains: add version check for model_name#461
Open
apan-odoo wants to merge 1 commit into
Open
Conversation
The field [`model_name`] has become `store=f` in `v18.1`
and its column is [removed] from upgrade too.
Traceback:
```py
File "/tmp/tmpd0m7olzw/migrations/util/fields.py", line 259, in remove_field
adapt_domains(
File "/tmp/tmpd0m7olzw/migrations/util/domains.py", line 479, in adapt_domains
cr.execute(query, [target_model, match_old, dot_old])
File "/home/odoo/src/odoo/19.0/odoo/sql_db.py", line 440, in execute
self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column "model_name" does not exist
LINE 2: SELECT id, (SELECT model_name FROM ir_act_se...
^
```
[`model_name`]: https://github.com/odoo/odoo/blob/68f258e99f42693131a5309b3606c3b95f93d824/odoo/addons/base/models/ir_actions.py#L638
[removed]: https://github.com/odoo/upgrade/blob/master/migrations/base/saas~18.1.1.3/pre-migrate.py#L6
Contributor
Contributor
|
i think this is the same case as this was for #366 not sure. |
Contributor
Author
Maybe when Edit: Additionally there are much failing dbs in past onto this. |
Contributor
|
You should investigate why the column is there on the first place. Be in the lookout for new requests failing on this error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The field
model_namehas becomestore=finv18.1and its column is removed from upgrade too.Traceback: