[FIX] sale_stock: Printing Delivery Order

Steps to reproduce the bug:

- Create a user U with manager inventory access rights and no right in sales
- Create a SO and validate it, it will create a picking P
- Lock the SO
- Log with U and try to print the delivery slip of P

Bug:

A access right error was raised.

opw:1878504
This commit is contained in:
Goffin Simon
2018-09-03 16:51:47 +02:00
parent 388eff5b58
commit af27196fc5
@@ -2,10 +2,10 @@
<odoo>
<template id="report_delivery_document_inherit_sale_stock" inherit_id="stock.report_delivery_document">
<xpath expr="//div[@name='customer_address']" position="after">
<div class="row" t-if="o.sale_id.client_order_ref">
<div class="row" t-if="o.sudo().sale_id.client_order_ref">
<div class="col-xs-4 pull-right">
<strong>Customer Reference:</strong>
<p t-field="o.sale_id.client_order_ref"/>
<p t-field="o.sudo().sale_id.client_order_ref"/>
</div>
</div>
</xpath>