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.

17 lines
598 B

  1. from odoo import api, models
  2. class ValidateSubscriptionRequest(models.TransientModel):
  3. _name = "validate.subscription.request"
  4. _description = "Update Partner Info"
  5. @api.multi
  6. def validate(self):
  7. selected_requests = self.env['subscription.request'].browse(
  8. self._context.get('active_ids'))
  9. subscription_requests = selected_requests.filtered(
  10. lambda record: record.state in ['draft', 'waiting'])
  11. for subscription_request in subscription_requests:
  12. subscription_request.validate_subscription_request()
  13. return True