You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from odoo import fields, models, api
|
|
|
|
|
|
class ResContacts(models.Model):
|
|
_inherit = "res.partner"
|
|
|
|
contact_type = fields.Selection([
|
|
('no_contact', 'I do not want to be contacted.'),
|
|
('email_contact', 'I only want to be contacted by Email.'),
|
|
('phone_contact', 'I only want to be contacted by Phone.'),
|
|
('email_phone_contact', 'You can contact me by Email or Phone.')
|
|
],
|
|
string='Contact Type',
|
|
default='email_contact',
|
|
help="Which way user want to be contacted.")
|
|
letter_contact = fields.Boolean("Letter Contact")
|
|
phone_contact = fields.Boolean("Phone Contact")
|
|
email_contact = fields.Boolean("Email Contact")
|
|
is_verified = fields.Boolean("Verified Email")
|
|
last_updated = fields.Datetime("Letzte Aktualisierung")
|
|
request_gdpdr = fields.Boolean("Request GDPDR")
|
|
|
|
# s
|
|
@api.multi
|
|
def write(self, vals):
|
|
print(vals)
|
|
return super(ResContacts, self).write(vals)
|
|
|
|
@api.model
|
|
def create(self, vals):
|
|
print(vals)
|
|
return super(ResContacts, self).create(vals)
|
|
|
|
|
|
class CrmLead(models.Model):
|
|
_inherit = "crm.lead"
|
|
|
|
email_link = fields.Char("Email verification link")
|