Commit 4a9fdd8
committed
[IMP] create_m2m: auto generate and return table name
In order to limit chances for typos, while keeping the util backwards
compatible, allow users to provide the `util.AUTOMATIC` sentinel value to
automatically generate the m2m table name, following the same rule as the
ORM[^1].
The function now return the m2m table name.
[^1]: Example from 18.0
https://github.com/odoo/odoo/blob/f42fe80576c8b419b5215ff17859e0dfebcd996a/odoo/fields.py#L4918-L4923
Part-of: #304
Signed-off-by: Christophe Simonis (chs) <[email protected]>1 parent 56a18c1 commit 4a9fdd8
2 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1048 | 1060 | | |
1049 | 1061 | | |
1050 | 1062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
1339 | 1339 | | |
1340 | 1340 | | |
1341 | 1341 | | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
1342 | 1359 | | |
1343 | 1360 | | |
1344 | 1361 | | |
1345 | 1362 | | |
1346 | 1363 | | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1347 | 1367 | | |
1348 | 1368 | | |
1349 | | - | |
| 1369 | + | |
1350 | 1370 | | |
1351 | 1371 | | |
1352 | 1372 | | |
| |||
1366 | 1386 | | |
1367 | 1387 | | |
1368 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
1369 | 1391 | | |
1370 | 1392 | | |
1371 | 1393 | | |
| |||
0 commit comments