The `consolidation_label` attribute is replaced by `string`. This way,
the label is taken into account by the translation tools.
This is the modification of the documentation regarding the Enterprise
improvement.
opw-683601
In the 'get_html' method, the report is using a custom model to render its html,
we should use its own 'render_html' method to generate the report. During the
module migration, we replaced
'report_model.render_html(cr, uid, ids, data=data, context=context)'
by
'report_model.render_html(data=data)'
The new API signature of 'get_html' is
@api.model
def get_html(self, docids, report_name, data=None):
That way, 'render_html' doesn't receive docids anymore when called. We should do instead
if report_model is not None:
return report_model.browse(docids).render_html(data=data)
As render_html is an api.multi method, this is all wrong too, because we'll send a
browse record with the custom report model to the render_html method, to use the
ids with 'self.ids' that are absolutely not corresponding to the report model but to
to the record model we want to print (an invoice for example).
In old API style we were sending a list of ids, but it's not correct to keep the same
behavior by sending a browse record with only the ids relevant. We have also to
change render_html method decorator to @api.model with a new signature
@api.model
def render_html(self, docids, data=None):
And replace the call to render_html by
if report_model is not None:
return report_model.render_html(docids, data=data)
In the case the report is printed from a wizard, this is sufficient because the ids
are taken from the active_ids in context, or in data.
In the case the report is printed from a simple action, we should replace the occurence
of 'self.ids' (which doesn't mean anything) to 'docids'
This fix doesn't solve the printing issues for the custom accounting reports, because
the method get_pdf has been reimplemented in the module account_reports.
- correct typos
- clarify some points, according to the community comments
- precise the xml notation : record tag vs act_window/menuitem/... tags
- add organization of report, wizard, data/demo, ... (directories and naming conventions)
- new conventions for 'symbols'
- ...
Thanks to @rim-odoo for its grammar extremist review, and @tde-banana-odoo for our long debates about wizard conventions.
When using the inheritance spec `position="replace"`,
the framework will now support a text node exactly
equal to `$0` and will replace it with the node
that was matched by the inheritance locator.
Given an original view equal to this:
```
<div class="foo">
<p class="bar">the paragraph</p>
</div>
```
And an inherited view with the following inheritance spec:
```
<p class="bar" position="replace">
<div class="panel">
<div class="panel-header">The Title</div>
<div class="panel-body">
$0
</div>
</div>
</p>
```
The finalt result after inheritance would become:
```
<div class="foo">
<div class="panel">
<div class="panel-header">The Title</div>
<div class="panel-body">
<p class="bar">the paragraph</p>
</div>
</div>
</div>
```
Also updated doc and tests accordingly.
With this commit, actions can have a type=fullscreen. This means that
the navbar will be hidden, for the action and for all subsequent actions
open in the breadcrumb
There is no real security behind this, this is just a feature for
convenience, so users can bookmark an url an open some action in a way
that they are not distracted by anything. In short, this is some kind of
light 'kiosk' mode.