Gorash
e830953570
[IMP] IrQweb: refactoring and add technical documentation
Major changes:
- Remove some of the recursively when compiling
- Compile attributes became a directive
- Compile options became a directive
- `t-field` compilation now uses the same logic as `t-out`
- Simplification of ``t-if`` directive compilation
- Improved handling of errors wrapped by QWebException
- Constants defined outside the class
Odoo
┗━► _render (returns MarkupSafe)
┗━► _compile (returns function) ◄━━━━━━━━━━┓
┗━► _compile_node (returns code string array) ◄━━━━━━━━┓ ┃
┃ (skip the current node if found t-qweb-skip) ┃ ┃
┃ (add technical directives: t-tag-open, t-tag-close, t-inner-content) ┃ ┃
┃ ┃ ┃
┣━► _directives_eval_order (defined directive order) ┃ ┃
┣━► _compile_directives (loop) Consume all remaining directives ◄━━━┓ ┃ ┃
┃ ┃ (e.g.: to change the indentation) ┃ ┃ ┃
┃ ┣━► _compile_directive ┃ ┃ ┃
┃ ┃ ┗━► t-if ━━► _compile_directive_if ━┫ ┃ ┃
┃ ┃ ┗━► t-foreach ━━► _compile_directive_foreach ━┛ ┃ ┃
┃ ┃ ┗━► t-inner-content ━━► _compile_directive_inner_content ◄━━━━━┓ ━┛ ┃
┃ ┃ ┗━► t-options ━━► _compile_directive_options ┃ ┃
┃ ┃ ┗━► t-call ━━► _compile_directive_call ━┫ ━━━┛
┃ ┃ ┗━► t-att ━━► _compile_directive_att ┃
┃ ┃ ┗━► t-tag-open ━━► _compile_directive_open ◄━━┓ ┃
┃ ┃ ┗━► t-tag-close ━━► _compile_directive_close ◄━━┫ ┃
┃ ┃ ┗━► t-out ━━► _compile_directive_out ━┛ ━┫ ◄━━┓
┃ ┃ ┗━► t-field ━━► _compile_directive_field ┃ ━┫
┃ ┃ ┗━► t-esc ━━► _compile_directive_esc ┃ ━┛
┃ ┃ ┗━► t-* ━━► ... ┃
┃ ┃ ┃
┗━━┻━► _compile_static_node ━┛
closes odoo/odoo#81024
Related: odoo/enterprise#22942
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-02-03 08:09:31 +00:00
..
2021-12-04 21:45:04 +00:00
2021-02-18 08:51:02 +00:00
2020-12-08 15:42:16 +00:00
2021-12-09 14:36:58 +00:00
2022-02-01 14:37:42 +00:00
2021-11-08 17:48:49 +00:00
2022-01-24 11:09:55 +00:00
2022-01-14 16:37:50 +00:00
2021-12-09 14:36:58 +00:00
2021-12-09 14:36:58 +00:00
2022-01-26 08:48:43 +00:00
2022-01-22 11:51:42 +00:00
2021-12-09 14:36:58 +00:00
2021-04-29 05:34:19 +00:00
2022-01-26 08:48:43 +00:00
2021-12-22 15:45:53 +00:00
2022-01-21 15:58:59 +00:00
2022-01-25 17:21:04 +00:00
2021-02-04 13:03:44 +00:00
2021-12-24 13:11:50 +00:00
2021-12-09 14:36:58 +00:00
2022-02-03 08:09:31 +00:00
2021-04-29 05:34:19 +00:00
2021-09-28 23:42:54 +00:00
2021-12-01 17:30:51 +01:00
2021-02-18 08:51:02 +00:00
2021-09-02 04:41:46 +00:00
2022-01-28 14:10:02 +00:00
2022-02-03 08:09:31 +00:00
2021-12-09 14:36:58 +00:00
2021-12-09 14:36:58 +00:00
2020-07-14 09:10:32 +00:00
2021-12-09 14:36:58 +00:00