[FIX] portal_stock: access rights

When clicking on the delivery order linked to the SO with a portal user,
a access right error was raised.

1. Due to this record rule: res_partner: portal/public: read access on my commercial
The portal user cannot read the fields of the partner linked to the warehouse of the picking.
The unreadable fields were in external_layout_footer.

2. The portal user is not allowed to read the field barcode on a product.

opw:693238
This commit is contained in:
Goffin Simon
2016-12-05 15:52:48 +01:00
parent 1f795a2d5a
commit 14e5b7fcb6
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -118,6 +118,7 @@
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul t-if="not company.custom_footer" class="list-inline">
<t t-set="company" t-value="company.sudo()"/>
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.fax and company.phone">&amp;bull;</li>
@@ -80,7 +80,7 @@
<br/>
<br/>
<table class="table table-condensed" t-if="o.pack_operation_ids">
<t t-set="has_barcode" t-value="any([pack_operation.product_id and pack_operation.product_id.barcode or pack_operation.package_id for pack_operation in o.pack_operation_ids])"/>
<t t-set="has_barcode" t-value="any([pack_operation.product_id and pack_operation.product_id.sudo().barcode or pack_operation.package_id for pack_operation in o.pack_operation_ids])"/>
<t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('pack_lot_ids')" groups="stock.group_production_lot"/>
<thead>
<tr>