Last active
September 6, 2022 02:01
-
-
Save aannganyelne/6d898693fe633dbd118ee35bcbc8cf34 to your computer and use it in GitHub Desktop.
Odoo 12 Add value to selection field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelA(models.Model): | |
_name = "model.a" | |
alias_contact = fields.Selection([ | |
('everyone', 'Everyone'), | |
('partners', 'Authenticated Partners'), | |
('followers', 'Followers only')], default='everyone', | |
string='Alias Contact Security', required=True, | |
help="Policy to post a message on the document using the mailgateway.\n" | |
"- everyone: everyone can post\n" | |
"- partners: only authenticated partners\n" | |
"- followers: only followers of the related document or members of following channels\n") | |
class ModelB(models.Model): | |
_inherit = "model.a" | |
alias_contact = fields.Selection(selection_add=[('employees', 'Authenticated Employees')]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment