diff options
| author | Arnold Moyaux <arm@odoo.com> | 2018-01-10 16:31:42 +0100 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2018-02-01 15:26:59 +0100 |
| commit | 18d5b11cb4a58a3bd0676427d318249a127a6a5f (patch) | |
| tree | 59b74bde8895b803fd35bfa1b104dbe119b1fd38 /addons/web/static/src/js/views/basic/basic_renderer.js | |
| parent | a94d58fefe01f3a7c33d0c5afad8ce697c67f965 (diff) | |
[IMP] stock : log a note
The purpose of this commit is to create a generic method in order to
log an activity on following documents or on upstream documents in order
to avoid code duplication.
In order to use it, you have to:
- create a static method in order to generate the string
for the note (it will use an arguement with the format
{'dest_object': ['orig_obejct', (new_qty, old_qty)]}
- 'DOWN' to notify following document. In this case you
have to specify a groupby/sorted method.
- 'UP' to notify upstream document. In this case you have
to specify a specific method call
'_get_upstream_documents_and_responsibles' on the object to
ride up.
Log_activity's operating mode:
destination objects = self.stream_field(passed as arguments)
'DOWN' group destination objects by document on which we want
to log the activity and a responsible to assign.
For each pair (document, responsible) generate a specific note
with only the information relative to object that belong to the current
document. Once the note is returned, it logs the activity on the
document and assign the reponsible.
'UP' instead of sort and group runs the method
'_get_upstream_documents_and_responsibles'. For example on moves
this method is called recursively on all moves orig that are not done or
cancel until it can't find a valid one at this moment it returns its picking.
Then generate the note and log the activity the same way than 'DOWN'.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions
