summaryrefslogtreecommitdiff
path: root/addons/stock/models
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-02-14 11:22:15 +0100
committerMartin Trigaux <mat@odoo.com>2020-05-14 13:59:10 +0200
commitd9287caf9408bb4ff85ad734cbca08e44321e205 (patch)
tree0d3b7c5705e5172176a7d76bf9098e381190bf4b /addons/stock/models
parent56a8c9e4311d24c33b7ad08b8230e4be345a85b8 (diff)
[IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view, get_website_pages should all be private: It should not be possible to render an aribtrary template only with its name or id Still need to render some qweb views from js so the method render_template is kept public. This explains why the website editor still need read access on ir.ui.view as we want to allow any snippet to be rendered.
Diffstat (limited to 'addons/stock/models')
-rw-r--r--addons/stock/models/stock_picking.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 12da2dd4902..c4cbdf52e4d 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -1163,7 +1163,7 @@ class Picking(models.Model):
'moves_information': rendering_context.values(),
'impacted_pickings': impacted_pickings,
}
- return self.env.ref('stock.exception_on_picking').render(values=values)
+ return self.env.ref('stock.exception_on_picking')._render(values=values)
documents = self._log_activity_get_documents(moves, 'move_dest_ids', 'DOWN', _keys_in_sorted, _keys_in_groupby)
documents = self._less_quantities_than_expected_add_documents(moves, documents)
@@ -1329,7 +1329,7 @@ class Picking(models.Model):
def _attach_sign(self):
""" Render the delivery report in pdf and attach it to the picking in `self`. """
self.ensure_one()
- report = self.env.ref('stock.action_report_delivery').render_qweb_pdf(self.id)
+ report = self.env.ref('stock.action_report_delivery')._render_qweb_pdf(self.id)
filename = "%s_signed_delivery_slip" % self.name
if self.partner_id:
message = _('Order signed by %s') % (self.partner_id.name)