diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-07-26 09:55:01 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-08-13 17:09:28 +0200 |
| commit | 61eef73b52c078daaae37f8d57e93830a2e53410 (patch) | |
| tree | 8b144174691de487a584bf8ac449fb55d3ad12ab /odoo/addons/base/models/ir_qweb_fields.py | |
| parent | 149eb38b07cace0ec2118d214c56995402008efc (diff) | |
[IMP] base, *: use a many2one for the company report layout
Before this rev. one could set the report layout on the company using a
hardcoded list (background, clean, standard, etc.). Other modules (typically
accounting modules) could add options in this list. The used template was built
on the layout key.
Now, the layout is a many2one field to a newly created model `report.layout`,
which is linked to a view with the layout architecture.
This gives more control to customize reports and create a new layout (without
creating a python module that extend the layout selection).
Diffstat (limited to 'odoo/addons/base/models/ir_qweb_fields.py')
| -rw-r--r-- | odoo/addons/base/models/ir_qweb_fields.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/odoo/addons/base/models/ir_qweb_fields.py b/odoo/addons/base/models/ir_qweb_fields.py index cbbbf607f05..b1aa39e7b94 100644 --- a/odoo/addons/base/models/ir_qweb_fields.py +++ b/odoo/addons/base/models/ir_qweb_fields.py @@ -655,6 +655,4 @@ class QwebView(models.AbstractModel): _logger.warning("%s.%s must be a 'ir.ui.view' model." % (record, field_name)) return None - view = view.with_context(object=record) - - return pycompat.to_text(view.render(view._context, engine='ir.qweb')) + return pycompat.to_text(view.render(options.get('values', {}), engine='ir.qweb')) |
