summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2018-10-19 11:44:24 +0200
committerGitHub <noreply@github.com>2018-10-19 11:44:24 +0200
commited322f76a2b96472dfb60c51bad9bed731fdb611 (patch)
tree3b54e59112b28ee065d5e6d2ab1e78f7c5b8715c /doc/reference
parent9e908175307611c0ad224de1d00370d90511e9e6 (diff)
parent398f0eb8e9f26a922dcf75ae91ce18c70999f721 (diff)
[IMP] mail: Return a browse record in _track_subtype instead of xmlid
Purpose ======= - A manager could want to follow only home working of its own department - A HR officer could want to follow only sick leaves of all dpts. We have to improve what people follow and how they follow it in the leaves module Specifications ============== Subtype on department --------------------- In department form view, right now, people can follow approvals Instead we should have some generic and specific subtypes depending on the leave type For instance, a HR Officer wants to follow only sick leaves and a manager only home working Following mechanism ------------------- Remove first / second approval subtype differences if a leave type is not linked to a specific subtype, consider only classic people follow it (employee and assigned HR people / manager) Link leave type to subtypes, with some by default (i.e. home working, ...), not mandatory When creating a leave type, link it to the department to be able to activate the subtype for only one department. closes odoo/odoo#27620
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/mixins.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/reference/mixins.rst b/doc/reference/mixins.rst
index d8c976ddaaa..af06849b435 100644
--- a/doc/reference/mixins.rst
+++ b/doc/reference/mixins.rst
@@ -331,7 +331,7 @@ can override the ``_track_subtype()`` function:
# in cache
self.ensure_one()
if 'state' in init_values and self.state == 'confirmed':
- return 'my_module.mt_state_change' # Full external id
+ return self.env.ref('my_module.mt_state_change')
return super(BusinessTrip, self)._track_subtype(init_values)