mirror of
https://github.com/bringout/odoomates.git
synced 2026-04-26 16:32:05 +02:00
Initial commit: Odoomates Odoo packages (12 packages)
This commit is contained in:
commit
3b38c49bf0
526 changed files with 34983 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
|
||||
class SearchAppointmentWizard(models.TransientModel):
|
||||
_name = "search.appointment.wizard"
|
||||
_description = "Search Appointment Wizard"
|
||||
|
||||
patient_id = fields.Many2one('hospital.patient', string="Patient", required=True)
|
||||
|
||||
def action_search_appointment_m1(self):
|
||||
action = self.env.ref('om_hospital.action_hospital_appointment').read()[0]
|
||||
action['domain'] = [('patient_id', '=', self.patient_id.id)]
|
||||
return action
|
||||
|
||||
def action_search_appointment_m2(self):
|
||||
action = self.env['ir.actions.actions']._for_xml_id("om_hospital.action_hospital_appointment")
|
||||
action['domain'] = [('patient_id', '=', self.patient_id.id)]
|
||||
return action
|
||||
|
||||
def action_search_appointment_m3(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Appointments',
|
||||
'res_model': 'hospital.appointment',
|
||||
'view_type': 'form',
|
||||
'domain': [('patient_id', '=', self.patient_id.id)],
|
||||
'view_mode': 'tree,form',
|
||||
'target': 'current',
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue