Skip to content

Commit

Permalink
T1844 change settings registration (#49)
Browse files Browse the repository at this point in the history
* feat: remove unwanted muskathlon_lead_notify_id models

* feat: remove unused fields muskathlon_lead_notify_id

* fix: fix pre-commit in children_page.xml

---------

Co-authored-by: jordyBSK <[email protected]>
  • Loading branch information
jordyBSK and jordyBSK authored Oct 8, 2024
1 parent 3c8e376 commit ee1f78c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
13 changes: 0 additions & 13 deletions muskathlon/models/staff_notification_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ class StaffNotificationSettings(models.TransientModel):
_inherit = "res.config.settings"

# Users to notify for Muskathlon Registration
muskathlon_lead_notify_id = fields.Many2one(
"res.users",
"Muskathlon Registrations",
domain=[("share", "=", False)],
readonly=False,
)
muskathlon_order_notify_id = fields.Many2one(
"res.users",
"Muskathlon Material Orders",
Expand All @@ -32,10 +26,6 @@ class StaffNotificationSettings(models.TransientModel):

def set_values(self):
super().set_values()
self.env["ir.config_parameter"].sudo().set_param(
"muskathlon.muskathlon_lead_notify_id",
str(self.muskathlon_lead_notify_id.id),
)
self.env["ir.config_parameter"].sudo().set_param(
"muskathlon.muskathlon_order_notify_id",
str(self.muskathlon_order_notify_id.id),
Expand All @@ -47,9 +37,6 @@ def get_values(self):
params = self.env["ir.config_parameter"].sudo()

res.update(
muskathlon_lead_notify_id=int(
params.get_param("muskathlon.muskathlon_lead_notify_id", 1)
),
muskathlon_order_notify_id=int(
params.get_param("muskathlon.muskathlon_order_notify_id", 1)
),
Expand Down
5 changes: 0 additions & 5 deletions muskathlon/views/notification_settings_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
<h3>Muskathlon</h3>
<div name="muskathlon_notifications">
<label
for="muskathlon_lead_notify_id"
class="o_light_label"
/>
<field name="muskathlon_lead_notify_id" />
<label
for="muskathlon_order_notify_id"
class="o_light_label"
/>
Expand Down

0 comments on commit ee1f78c

Please sign in to comment.