diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-01-04 11:11:12 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-11-03 11:41:39 +0100 |
| commit | 018144b8ac83e277e6add0e98de417bcaa7e613c (patch) | |
| tree | be1247613ccfb8ca5ee9da60140f86b052bf845f /addons/web/static/lib/jquery.mjs.nestedSortable | |
| parent | 7cf554af54109c2ba3aab2530f3f6735851e6838 (diff) | |
[IMP] lunch: new lunch widget
The JS widget is simplified, which a cleaner approach.
For the rendering part:
- the server reads the data
- the JS widget formats/organizes the data
- the template renders the data prepared by the widget
Quick summary of the modifications:
1. The associated field is a text field which contains JSON-encoded
data. The data are read server-side, and not client-side anymore.
2. The widget is an AbstractField, no need of ReinitializeWidgetMixin
anymore. No use of the FieldMonetary widget directly, but use a similar
format_value instead (inspired by ShowPaymentLineWidget).
3. Data formatting (call to format_value) is done in the widget, not in
the template anymore. This seems to be the standard way of doing, since
lunch was the only module where format_value was in the template and not
in the widget.
4. The addition of an order line is cleaner since all necessary data
are prepared server-side.
Diffstat (limited to 'addons/web/static/lib/jquery.mjs.nestedSortable')
0 files changed, 0 insertions, 0 deletions
