Download pool/shard005/Python/0044770_pre-migration.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/Python/0044770_pre-migration.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard005/Python/0044770_pre-migration.py
-
curl -L -o 0044770_pre-migration.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/Python/0044770_pre-migration.py
529 Bytes
| from openupgradelib import openupgrade | |
| def migrate(env, version): | |
| if not version: | |
| return | |
| # Associate already created toilets fund to new xml record | |
| toilets_fund = env["product.template"].search( | |
| [("default_code", "=", "toilet")] | |
| ) | |
| if toilets_fund: | |
| openupgrade.add_xmlid( | |
| env.cr, | |
| "sponsorship_switzerland", | |
| "product_template_fund_toilets", | |
| "product.template", | |
| toilets_fund.id, | |
| ) | |