summaryrefslogtreecommitdiff
path: root/addons/delivery/security
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-03-05 10:44:07 +0100
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-03-06 10:02:44 +0100
commit037cfc9f67f86bc05aa9b239d8e479fd07ebaff9 (patch)
tree29d5912525cfdb5970f609cd684da14af78f31ac /addons/delivery/security
parentb466b3bc608b54d96ca0242b4d9c6176b76d88b6 (diff)
[FIX] delivery: products not shared
- Define 2 companies A and B. Delivery methods are linked to products in company A - Deactivate 'Share product to all companies' - Create a user B in Company B only - As user B, create a SO and open the drop-down list for delivery methods An access error is raised. Delivery methods should follow the same record rules than the products they are linked to. opw-1815490
Diffstat (limited to 'addons/delivery/security')
-rw-r--r--addons/delivery/security/delivery_security.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/delivery/security/delivery_security.xml b/addons/delivery/security/delivery_security.xml
new file mode 100644
index 00000000000..ae588bc245c
--- /dev/null
+++ b/addons/delivery/security/delivery_security.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+<data noupdate="1">
+ <record id="delivery_comp_rule" model="ir.rule">
+ <field name="name">Delivery multi-company</field>
+ <field name="model_id" ref="model_delivery_carrier"/>
+ <field name="global" eval="True"/>
+ <field name="domain_force"> ['|',('product_id.company_id','=',user.company_id.id),('product_id.company_id','=',False)]</field>
+ <field name="active" eval="False"/>
+ </record>
+</data>
+</odoo>