No Description
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.

ms_reason_cancel_wizard.py 549B

12345678910111213141516
  1. from odoo import fields, api, models
  2. class ms_reason_cancel_wizard(models.TransientModel):
  3. _name = "ms.reason.cancel.wizard"
  4. _description = "Reason Cancel"
  5. name = fields.Text(string="Reason", required=True)
  6. @api.one
  7. def action_cancel(self):
  8. active_ids = self._context.get('active_ids')
  9. if not active_ids :
  10. return False
  11. pemeriksaan_id = self.env['ms.pemeriksaan'].browse(active_ids[:1])
  12. pemeriksaan_id.pendaftaran_id.note += self.name
  13. pemeriksaan_id.state = 'cancel'