Skip to content
Snippets Groups Projects
Commit 33527483 authored by Daniil Digtyar Vasilieva's avatar Daniil Digtyar Vasilieva :call_me:
Browse files

Updated selection genders

parent 69ea96e6
No related branches found
No related tags found
1 merge request!86Fix partners company
......@@ -7,12 +7,8 @@ import re
class ResPartner(models.Model):
_inherit = 'res.partner'
#extend the available Selection options with not_binary, not_share
gender = fields.Selection(
[("male", _("Male")), ("female", _("Female")), ("not_binary", _("Not binary")),
("not_share", _("I prefer to not share it")), ("other", _("Other"))
])
gender = fields.Selection(selection_add=[("not_binary", "Not binary"),
("not_share", "I prefer to not share it")])
def _get_sanitized_login_username(self):
return ((self.vat and re.sub(r"[^a-zA-Z0-9]","",self.vat).lower()) or
......
......@@ -4,13 +4,8 @@ from odoo.exceptions import UserError, ValidationError
class SubscriptionRequest(models.Model):
_inherit = 'subscription.request'
gender = fields.Selection(
[("male", _("Male")), ("female", _("Female")), ("not_binary", _("Not binary")),
("not_share", _("I prefer to not share it")), ("other", _("Other"))],
string="Gender",
readonly=True,
states={"draft": [("readonly", False)]},
)
gender = fields.Selection(selection_add=[("not_binary", "Not binary"),
("not_share", "I prefer to not share it")])
def get_journal(self):
"""Need to override in order to use in multicompany enviroment"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment