-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path__init__.py
More file actions
34 lines (31 loc) · 1.02 KB
/
__init__.py
File metadata and controls
34 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from odoo import api, SUPERUSER_ID
from . import models
# def post_init_hook(env):
# contact_model = env.ref("base.model_res_partner")
# registrant_id_field = env.ref("spp_registrant_import.field_res_partner__spp_id")
# contact_import_match = env["spp.import.match"].search([("model_id", "=", contact_model.id)])
# if not contact_import_match:
# env["spp.import.match"].create(
# {
# "model_id": contact_model.id,
# "field_ids": [
# (
# 0,
# 0,
# {"field_id": registrant_id_field.id},
# ),
# ],
# }
# )
# else:
# contact_import_match.write(
# {
# "field_ids": [
# (
# 0,
# 0,
# {"field_id": registrant_id_field.id},
# ),
# ],
# }
# )