summaryrefslogtreecommitdiff
path: root/addons/web_editor/models/ir_qweb.py
AgeCommit message (Collapse)Author
2018-11-29[REF] *: replace deprecated pycompat helpers for builtinsAdrian Torres
This commit replaces calls to pycompat helpers that were intended for python 2 <-> python 3 interoperability for python 3 builtins, as python 2 is no longer officially supported by Odoo. This includes: * calls to imap/izip/ifilter replaced by map/zip/filter * uses of text_type replaced by str * uses of unichr replaced by chr * calls to implements_to_string, implements_iterator removed * string_types and integer_types replaced by str, int respectively * calls to to_native replaced by calls to to_text This is done in preparation to the removal of these deprecated helpers in the following commit.
2018-09-21[IMP]tools, technial modules: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2018-08-13[IMP] report: render report without editable modeChristophe Matthieu
Before this change, the reports were generated in editable mode for branding to be applied. The branding is used to cut the report and add on each selected record for generating the pdf. Applied branding and editing options takes a useless time and branding was also applied by widgets even if branding was not requested.
2018-06-29[MERGE] forward port branch saas-11.4 up to d54a3726ecaChristophe Simonis
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-28[MERGE] forward port branch 11.0 up to f6d36d81f7aChristophe Simonis
2018-06-27[FIX] ir_qweb: send template options in context to the fieldsChristophe Matthieu
Application of a fix more specific to the problem of the contact widget which can not serialize the dictionary because it contains the values of the context of which browse record. (because contact try to json.dumps options for multi-edition feature in web_editor) opw-1859848 https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922
2018-06-13[FIX] web_editor: remove website dependence introduced by 4f9d9d169f65369e02dJeremy Kersten
Now we use the get_view_id method that already do the job to filter the views based on the current website. Related to #24429
2018-06-11[IMP] website: multi-website snippets with the same keyIvan Yelizariev
Allow duplicate snippets to have different versions for different websites This commit closes #24429
2017-11-27[MOV] base: move ir_* models into models/Thibault Delavallée
2017-08-24[MOV] web(_editor): move image rendering from web_editor to webThibault Delavallée
Currently the image field rendering in QWeb using the /web/image controller is done in web_editor. However there is no link between the web editor and the rendering. The rendering can therefore be moved directly in web. During the move two options have been added to the rendering of image field : * qweb_img_raw_data: fallback on standard base64 behavior that is otherwise impossible to achieve; * qweb_img_responsive: True by default, add the img-responsive class that is not always requested; Thanks.
2017-08-23[FIX] web_editor: P3 io errorXavier Morel
Views archs (and sub-archs) should be serialized to and deserialized from unicode, not bytes.
2017-08-20[FIX] P3: hash/hmac payload must be bytesXavier Morel
2017-08-20[FIX] P3: text model typesXavier Morel
* remove references to basestring & unicode (use relevant pycompat helpers) * remove some str calls (either entirely or replaced by relevant helper, either text or native) * use better API to avoid unnecessary conversions * remove some XML declarations in views
2017-08-20[FIX] P3: fix base64 and StringIO usesXavier Morel
* StringIO removed from stdlib, replace with io * try to correctly handle BytesIO/StringIO (one is for bytes the other is for text) * fix base64: Python 3 removed bytes-encoding and bytes-bytes codecs (via #encode) so replace all calls to str.encode('base64'), also b64encode is a bytes->bytes conversion so attempt to properly handle that issue #8530
2017-08-19[FIX] P3: absolute ordering removedXavier Morel
2017-07-04[IMP] web_editor, website(_*): show all snippets even if module is not installedKishan Gajjar
* mail_channel, mass_mailing, twitter, event - t-install attribute holds the technical name of the module that needs to be install to use a particular snippet. - Disable the drag & drop feature for these dummy snippets. - Move some images to website module. - Installed snippets display at the top of the list. - Hide not-installed module snippets if user don't have rights to install module.
2017-05-15[FIX] P3: urllib, urllib2 and urlparseXavier Morel
In Python 3, all of these were "consolidated" under urllib(.request, .parse, .errors) which is inconvenient. Since we already have hard dependencies on requests and werkzeug(.urls, which is a backport of Python 3's unicode-aware urllib.parse) migrate *everything* to that. A sticking point is urllib2.URLError, those were (mostly) replaced by the slightly more general IOError which URLError extends.
2017-05-10[FIX] P3: list -> iterable builtins (#16811)xmo-odoo
In Python 3: * various builtins and dict methods were changed to return view/iterable objects rather than lists * and the separate Python 2 view/iterable builtins and methods were removed altogether This is problematic when using these items as list (which the happens repeatedly in Odoo), but more viciously when iterating *multiple times* over them (which also happens, which I've messed up multiple times while writing this, and which is a pain to debug even when you've just created the issue). Convert all code using these to semantics-matching cross-version helper functions to get the LCD behaviour between P2 and P3, and forbid the builtins via lint. issue #8530
2016-09-21[IMP] web_editor, website, website_sale: add zoom option for t-field imageJeremy Kersten
web_editor Qweb: Add 'zoom' option for widget image <span t-field="product.image_small" t-options="{'widget': 'image', 'zoom': 'image_medium'}" /> website: Add Zoom code to be standard for all website module website_sale: add zoom on Main product image
2016-08-19[FIX] web_editor: adapt the forgotten rendering of updated contact fieldsqsm-odoo
The frontend allow the rendering of fields thanks to converters and their value_to_html and record_to_html methods. These methods were changed with https://github.com/odoo/odoo/commit/3407fb70e4a5b16174234d10d97710572b6f808c#diff-d5a9a5d91bd3171e30e7facd628bdf5cL411. The problem is that the web_editor also contains code which relies on these methods and it was not adapted.
2016-08-17[FIX] qweb: fix ir.qweb.field.contactJeremy Kersten
Before this commit when you edit a contact with the editor, you didn't see the selected record before the save. Now, you can edit a contact with the html editor. We move the hacked field self (on res.partner) from website_partner to base. 2 bugs: field and record was reversed in call need to pass a browseRecord and not a dict, because we uses .env on it This hack allow to use widget='contact' on the browse record itself and not on a specific field from the browse record Eg: <div t-field="partner.self" t-options='{ "widget": "contact", "fields": ["address", "phone"] }'/>
2016-08-16[REM] most uses of `_model` (useless in most cases)Raphael Collet
2016-08-03[MIG] web_editor: migrate to new apifwi-odoo
2016-07-05[IMP] qweb: remove values from record_to_html to avoid crappy codeChristophe Matthieu
2016-06-14[IMP] qweb: use iterator to compile directives in orderChristophe Matthieu
2016-06-14[IMP] qweb: typo: remove qwebcontext and use valuesChristophe Matthieu
2016-06-14[IMP] ir.qweb: extract and create independent qweb class from ir.qwebChristophe Matthieu
The goal is to make the code more readable, more easily be optimized, allowing to share the library "QWEB" (python and js) separately Odoo.
2016-06-14[IMP] base ir.qweb: compile template (and use ast) to improve rendering speedChristophe Matthieu
* The compiled templates are cached per user, lang, inherit context values * ir.ui.fields: attributes method return an dict, and record_to_html return only the content value of the field * all rendered text use build_text and all attributes use build_attribute * t-esc-options is removed and replace by format_value method * AssetsBundle receive the list files and remains
2016-04-25[MERGE] forward port of branch saas-10 up to bb8f0f1Christophe Simonis
2016-04-25[MERGE] forward port of branch saas-9 up to 4d337f7Christophe Simonis
2016-04-19[MERGE] forward port of branch saas-6 up to 7033a97Christophe Simonis
2016-03-21[FIX] base: fix and complete migration of base/irRaphael Collet
- add or fix decorators on methods - fix most compute methods (wrong dependencies) - revert changes in `eval_context` of `ir.actions` - various code simplifications and improvements - migrate methods that were not - ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context` - ir_qweb: convert `AssetsBundle` to use new API `env` - ir_ui_view: use decorator `multi` on method `read_combined` - ir_ui_view: ensure that method `render` is never called with an xml_id - ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
2016-02-04[FIX] web_editor: simplify inheritance specsRaphael Collet
2015-12-10[FIX] web_editor: translation feature for all string fields on websiteChristophe Matthieu
* add the branding in translation mode * change javascript to add the lang in the context (automatically removed in the rte => allow to create record and edit when use an other default language of en_US) * avoid double saved
2015-09-28[FIX] web_editor: can upload a product image with the editor and save it ↵Christophe Matthieu
(without 'out of range error' because new web controller /web/image/).
2015-09-28[IMP] replace simplejson with stdlib jsonLeonardo Rochael Almeida
The stdlib version of the json library is more recent than the 3.5.3 version we are pinning in `requirements.txt` There is no reason to use it. Closes #6940
2015-09-25[FIX] web_editor: use parser from dateutil for datatime qweb field valueChristophe Matthieu
2015-08-28[MERGE] forward port of branch saas-6 up to 7a768a4Christophe Simonis
Due to `sale` rewrite (94716a3f14d929574c46ef165e4364d12a5903ed), the commit 503820acb6d82a85c0c49ac26f7e7f8cd73851dd has been partially ignored (in sale.order.line) and will be rewritten later using new-api.
2015-08-21[IMP] web: use css to display attachment mimetypeChristophe Matthieu
Widgets and website display images or display the type with icon like pdf, doc...
2015-08-21[IMP] web: create generic controller '/web/content' and '/web/image'Christophe Matthieu
Replace deprecate controllers like /web/binary/image, /web/binary/saveas... Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-05[IMP]qweb:solve t-field integer issue while render on frontend.Ajay Patel
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website