[FIX] sale_stock: display only outgoing transfers to portal users

Steps to reproduce the bug:
- Create a storable product with routes: MTO + Buy
- Create a Portal user “pu1”
- Create a SO > select the “pu1” as customer
- Validate and confirm the created PO
- Connect as “pu1”:
    - Go to the sales order view:

Problem:
The client can see outgoing and receipt(PO picking) transfers, this is a problem because then the customer can see information from the vendor

Solution:
A portal user should only see outgoing type transfers in the sale order view

opw-2816719

closes odoo/odoo#89285

X-original-commit: 91cfdf997dd210f2cbc684674745ab0b251088d2
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This commit is contained in:
Touati Djamel (otd)
2022-04-21 16:11:50 +02:00
parent f50bf9b959
commit 40c2ae4053
@@ -14,7 +14,7 @@
<strong>Delivery Orders</strong>
</div>
<div>
<t t-foreach="sale_order.picking_ids.filtered(lambda picking: picking.picking_type_id.code != 'internal')" t-as="i">
<t t-foreach="sale_order.picking_ids.filtered(lambda picking: picking.picking_type_id.code == 'outgoing')" t-as="i">
<t t-set="delivery_report_url" t-value="'/my/picking/pdf/%s?%s' % (i.id, keep_query())"/>
<div class="d-flex flex-wrap align-items-center justify-content-between o_sale_stock_picking">
<div>