Notification Manager
Notification Manager#
The notification managers allow notifying beneficiaries of some events happening in the programs or cycles.
odoo.addons.g2p_programs.models.managers.notification_manager
provides the class BaseNotificationManager
define
the interface for this manager. SMSNotificationManager
is the default implementation.
- class odoo.addons.g2p_programs.models.managers.notification_manager.BaseNotificationManager[source]#
This component is used to notify beneficiaries of their enrollment and other events related to the program
- class odoo.addons.g2p_programs.models.managers.notification_manager.SMSNotificationManager[source]#
-
- create_uid#
The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
- Parameters
comodel_name (str) -- name of the target model
Mandatory
except for related or extended fields.domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
ondelete (str) -- what to do when the referred record is deleted; possible values are:
'set null'
,'restrict'
,'cascade'
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)delegate (bool) -- set it to
True
to make fields of the target model accessible from the current model (corresponds to_inherits
)check_company (bool) -- Mark the field to be verified in
_check_company()
. Add a default company domain depending on the field attributes.
- display_name#
Basic string field, can be length-limited, usually displayed as a single-line string in clients.
- Parameters
size (int) -- the maximum size of values stored for that field
trim (bool) -- states whether the value is trimmed or not (by default,
True
). Note that the trim operation is applied only by the web client.translate (bool or callable) -- enable the translation of the field's values; use
translate=True
to translate field values as a whole;translate
may also be a callable such thattranslate(callback, value)
translatesvalue
by usingcallback(term)
to retrieve the translation of terms.
- id#
Special case for field 'id'.
- on_cycle_ended_template#
One2many field; the value of such a field is the recordset of all the records in
comodel_name
such that the fieldinverse_name
is equal to the current record.- Parameters
comodel_name (str) -- name of the target model
inverse_name (str) -- name of the inverse
Many2one
field incomodel_name
domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)limit (int) -- optional limit to use upon read
The attributes
comodel_name
andinverse_name
are mandatory except in the case of related fields or field extensions.
- on_cycle_started_template#
One2many field; the value of such a field is the recordset of all the records in
comodel_name
such that the fieldinverse_name
is equal to the current record.- Parameters
comodel_name (str) -- name of the target model
inverse_name (str) -- name of the inverse
Many2one
field incomodel_name
domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)limit (int) -- optional limit to use upon read
The attributes
comodel_name
andinverse_name
are mandatory except in the case of related fields or field extensions.
- on_enrolled_in_program_template#
One2many field; the value of such a field is the recordset of all the records in
comodel_name
such that the fieldinverse_name
is equal to the current record.- Parameters
comodel_name (str) -- name of the target model
inverse_name (str) -- name of the inverse
Many2one
field incomodel_name
domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)limit (int) -- optional limit to use upon read
The attributes
comodel_name
andinverse_name
are mandatory except in the case of related fields or field extensions.
- write_uid#
The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
- Parameters
comodel_name (str) -- name of the target model
Mandatory
except for related or extended fields.domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
ondelete (str) -- what to do when the referred record is deleted; possible values are:
'set null'
,'restrict'
,'cascade'
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)delegate (bool) -- set it to
True
to make fields of the target model accessible from the current model (corresponds to_inherits
)check_company (bool) -- Mark the field to be verified in
_check_company()
. Add a default company domain depending on the field attributes.
- class odoo.addons.g2p_programs.models.managers.notification_manager.SMSTemplate[source]#
- g2p_sms_id#
The value of such a field is a recordset of size 0 (no record) or 1 (a single record).
- Parameters
comodel_name (str) -- name of the target model
Mandatory
except for related or extended fields.domain -- an optional domain to set on candidate values on the client side (domain or string)
context (dict) -- an optional context to use on the client side when handling that field
ondelete (str) -- what to do when the referred record is deleted; possible values are:
'set null'
,'restrict'
,'cascade'
auto_join (bool) -- whether JOINs are generated upon search through that field (default:
False
)delegate (bool) -- set it to
True
to make fields of the target model accessible from the current model (corresponds to_inherits
)check_company (bool) -- Mark the field to be verified in
_check_company()
. Add a default company domain depending on the field attributes.