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.

24 lines
862 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # Copyright 2019 Coop IT Easy SCRLfs
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class SubscriptionRequest(models.Model):
  5. _inherit = "subscription.request"
  6. info_session_confirmed = fields.Boolean(
  7. string="Confirmed Info Session", default=False
  8. )
  9. def get_partner_vals(self):
  10. partner_vals = super(SubscriptionRequest, self).get_partner_vals()
  11. partner_vals["info_session_confirmed"] = self.info_session_confirmed
  12. return partner_vals
  13. def get_required_field(self):
  14. required_fields = super(SubscriptionRequest, self).get_required_field()
  15. company = self.env["res.company"]._company_default_get()
  16. if company.info_session_confirmation_required:
  17. required_fields.append("info_session_confirmed")
  18. return required_fields