Skip to content

Commit

Permalink
[FIX] category in manifest file
Browse files Browse the repository at this point in the history
[UPD]removed deprecated method manage()
  • Loading branch information
primes2h authored and FrancescoCosma committed May 8, 2023
1 parent 64534e2 commit 0045f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion l10n_it_location_nuts/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "ITA - Regioni NUTS",
"summary": "Opzioni NUTS specifiche per l'Italia",
"version": "16.0.1.0.0",
"category": "Localisation/Europe",
"category": "Localization/Europe",
"website": "https://github.com/OCA/l10n-italy",
"author": "Agile Business Group, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
9 changes: 4 additions & 5 deletions l10n_it_location_nuts/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

def post_init_hook(cr, registry):
"""Define Italian specific configuration in res.country."""
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
italy = env.ref("base.it")
_logger.info("Setting Italy NUTS configuration")
italy.write({"state_level": 4})
env = api.Environment(cr, SUPERUSER_ID, {})
italy = env.ref("base.it")
_logger.info("Setting Italy NUTS configuration")
italy.write({"state_level": 4})

0 comments on commit 0045f91

Please sign in to comment.