[DOC]Hy Odoo document compute-field macro

This commit is contained in:
Fabien BOURGEOIS 2020-03-27 09:39:01 +01:00
parent 9f81eeca06
commit f4db225ccc
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@
~body))))
(defmacro compute-field [fname body]
"Takes fname Symbol and body to create computed field"
(setv fn-name f"_compute_{(mangle fname)}")
`(setv ~fname (~@body :compute ~fn-name)))