Commit 6e0d631
committed
[FIX] util/pg: get common column name with type or typcategory
get the coomin columns info with same typcategory or
same data type and skipp the column with different
datatype and different type
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/19.0/odoo/service/server.py", line 1514, in preload_registries
registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'], reinit_modules=config['reinit'])
File "/home/odoo/src/odoo/19.0/odoo/tools/func.py", line 88, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/19.0/odoo/orm/registry.py", line 186, in new
load_modules(
File "/home/odoo/src/odoo/19.0/odoo/modules/loading.py", line 493, in load_modules
migrations.migrate_module(package, 'end')
File "/home/odoo/src/odoo/19.0/odoo/modules/migration.py", line 220, in migrate_module
exec_script(self.cr, installed_version, pyfile, pkg.name, stage, stageformat[stage] % version)
File "/home/odoo/src/odoo/19.0/odoo/modules/migration.py", line 257, in exec_script
mod.migrate(cr, installed_version)
File "/tmp/tmp7yriz79e/migrations/hr/saas~18.4.1.1/end-migrate.py", line 87, in migrate
cr.execute(query, [e[1] for e in required_default_values])
File "/home/odoo/src/odoo/19.0/odoo/sql_db.py", line 426, in execute
self._obj.execute(query, params)
psycopg2.errors.DatatypeMismatch: column "fondo_ahorro" is of type boolean but expression is of type double precision
LINE 16: ..."."distance_home_work_unit", "e"."employee_type", "e"."fondo...
^
HINT: You will need to rewrite or cast the expression.
```
```
select id,name,model,ttype,store from ir_model_fields where name='fondo_ahorro';
id | name | model | ttype | store
-------+--------------+-----------------------+---------+-------
28361 | fondo_ahorro | hr.employee | float | t
28687 | fondo_ahorro | calculo.liquidaciones | float | t
28379 | fondo_ahorro | hr.version | boolean | t
(3 rows)
```
upg-3444635
opw-52601471 parent 92efe24 commit 6e0d631
1 file changed
+36
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
1230 | | - | |
| 1230 | + | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1246 | 1254 | | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
1250 | 1260 | | |
1251 | | - | |
| 1261 | + | |
1252 | 1262 | | |
1253 | | - | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1254 | 1276 | | |
1255 | 1277 | | |
1256 | 1278 | | |
| |||
0 commit comments