diff options
| author | Raphael Collet <rco@openerp.com> | 2016-02-23 14:54:34 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-03-21 13:46:44 +0100 |
| commit | 4ddc32313996c8cf6e8e6dffd2253aad8a144ccf (patch) | |
| tree | 32e6eaf4c7317b944c18d7758cb61f0636949a40 /addons/web_editor/models | |
| parent | eb04aa1e395d347c474181e90f8c8eded1d17ca3 (diff) | |
[FIX] base: fix and complete migration of base/ir
- 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`
Diffstat (limited to 'addons/web_editor/models')
| -rw-r--r-- | addons/web_editor/models/ir_qweb.py | 6 | ||||
| -rw-r--r-- | addons/web_editor/models/ir_ui_view.py | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/addons/web_editor/models/ir_qweb.py b/addons/web_editor/models/ir_qweb.py index 149fcc5cc74..a0fe989391c 100644 --- a/addons/web_editor/models/ir_qweb.py +++ b/addons/web_editor/models/ir_qweb.py @@ -57,9 +57,6 @@ class QWeb(orm.AbstractModel): template_attributes['call'] = template_attributes['snippet'] return self.render_tag_call(element, template_attributes, generated_attributes, qwebcontext) - def get_converter_for(self, field_type): - return self.pool.get('ir.qweb.field.' + field_type, self.pool['ir.qweb.field']) - #------------------------------------------------------ # QWeb fields @@ -102,9 +99,6 @@ class Field(orm.AbstractModel): def from_html(self, cr, uid, model, field, element, context=None): return self.value_from_string(element.text_content().strip()) - def qweb_object(self): - return self.pool['ir.qweb'] - class Integer(orm.AbstractModel): _name = 'ir.qweb.field.integer' diff --git a/addons/web_editor/models/ir_ui_view.py b/addons/web_editor/models/ir_ui_view.py index dd7501c44f9..01082efb37b 100644 --- a/addons/web_editor/models/ir_ui_view.py +++ b/addons/web_editor/models/ir_ui_view.py @@ -12,6 +12,8 @@ class view(osv.osv): @api.cr_uid_ids_context def render(self, cr, uid, id_or_xml_id, values=None, engine='ir.qweb', context=None): + if isinstance(id_or_xml_id, list): + id_or_xml_id = id_or_xml_id[0] if not values: values = {} if values.get('editable'): |
