summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/context.js
AgeCommit message (Collapse)Author
2018-07-06[REF] *: rename web.pyeval into web.py_utilsGéry Debongnie
The pyeval name is quite confusing, given that there is already an eval and an evaluate function in py.js, and that the web.pyeval exports two evaluate functions. Since this file is more about odoo specific customization to py.js, it is renamed in py_utils to better express its intended use.
2017-04-24[FIX] web: properly format dates in contextGéry Debongnie
When evaluating a context, we need to use the server format for dates, because the context will ultimately be sent do the server. Also, moment objects are not known by pyeval, so they simply cause a crash (for example, see bank statements form view, edit it, click on 'add an item') With this commit, we make sure that the evaluation context is correct, with respect to dates (we use the toJSON method, because that is the way we get the server compatible date)
2017-04-11[IMP] web, *: compute contexts and domains from datapointqsm-odoo
This commit tries to refactore the management of contexts and domains in the webclient. - Get rid of CompoundDomain: use standard array manipulation to join multiple domains or use the Domain class (to be improved) - Get rid of data.js build_domain and build_context methods - Link this.record to the data point from the basic model for all fields (not only relational fields) - Add a getContext and a getDomain function to the basic model data point (localData element) so that AbstractField implementations can use them thanks to their this.record element. - Remove the autocontext binding for field RPCs (see FieldManagerMixin)
2017-04-11[IMP] web: some more linting to follow guidelinesqsm-odoo
2017-04-11[REF] web, *: move CompoundContext out of data.jsGéry Debongnie
We want to remove data.js, but we still need the CompoundContext class, so we take it out, and rename it 'Context'