Rohan Nayani(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-788139-ron into 
lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #788139 in OpenERP Addons: "stock modules needs multicompany access rule"
  https://bugs.launchpad.net/openobject-addons/+bug/788139

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-788139-ron/+merge/63853
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-788139-ron/+merge/63853
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-788139-ron.
=== modified file 'mrp/security/mrp_security.xml'
--- mrp/security/mrp_security.xml	2011-02-28 13:57:54 +0000
+++ mrp/security/mrp_security.xml	2011-06-08 12:51:38 +0000
@@ -36,5 +36,19 @@
         <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
     </record>
 
+    <record model="ir.rule" id="mrp_routing_rule">
+        <field name="name">mrp_routing multi-company</field>
+        <field name="model_id" search="[('model','=','mrp.routing')]" model="ir.model"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
+    </record>
+
+    <record model="ir.rule" id="mrp_routing_workcenter_rule">
+        <field name="name">mrp_routing_workcenter multi-company</field>
+        <field name="model_id" search="[('model','=','mrp.routing.workcenter')]" model="ir.model"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
+    </record>
+
 </data>
 </openerp>

=== modified file 'product/security/product_security.xml'
--- product/security/product_security.xml	2011-05-31 21:23:20 +0000
+++ product/security/product_security.xml	2011-06-08 12:51:38 +0000
@@ -45,5 +45,12 @@
         <field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field>
     </record>
 
+    <record model="ir.rule" id="product_supplierinfo_comp_rule">
+        <field name="name">product supplierinfo company rule</field>
+        <field name="model_id" ref="model_product_supplierinfo"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field>
+    </record>
+
 </data>
 </openerp>

=== modified file 'stock/security/stock_security.xml'
--- stock/security/stock_security.xml	2011-02-28 13:57:54 +0000
+++ stock/security/stock_security.xml	2011-06-08 12:51:38 +0000
@@ -53,5 +53,19 @@
         <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
     </record>
 
+    <record model="ir.rule" id="stock_production_lot_comp_rule">
+        <field name="name">Production lot multi-company</field>
+        <field name="model_id" ref="model_stock_production_lot"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+     <record model="ir.rule" id="stock_production_lot_revision_comp_rule">
+        <field name="name">Production lot revision multi-company</field>
+        <field name="model_id" ref="model_stock_production_lot_revision"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+ 
 </data>
 </openerp>

=== modified file 'stock_location/__openerp__.py'
--- stock_location/__openerp__.py	2011-03-25 10:24:13 +0000
+++ stock_location/__openerp__.py	2011-06-08 12:51:38 +0000
@@ -89,7 +89,7 @@
     'images': ['images/pulled_flow.jpeg','images/pushed_flow.jpeg'],
     'depends': ['procurement','stock','sale'],
     'init_xml': [],
-    'update_xml': ['stock_location_view.xml', 'security/ir.model.access.csv', 'procurement_pull_workflow.xml'],
+    'update_xml': ['stock_location_view.xml', "security/stock_location_security.xml", 'security/ir.model.access.csv', 'procurement_pull_workflow.xml'],
     'demo_xml': [
         'stock_location_demo_cpu1.xml',
         'stock_location_demo_cpu3.yml',

=== added file 'stock_location/security/stock_location_security.xml'
--- stock_location/security/stock_location_security.xml	1970-01-01 00:00:00 +0000
+++ stock_location/security/stock_location_security.xml	2011-06-08 12:51:38 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="0">
+
+<!-- multi -->
+     <record model="ir.rule" id="product_pulled_flow_comp_rule">
+        <field name="name">product_pulled_flow multi-company</field>
+        <field name="model_id" ref="model_product_pulled_flow"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+      <record model="ir.rule" id="stock_location_path_comp_rule">
+        <field name="name">stock_location_path multi-company</field>
+        <field name="model_id" ref="model_stock_location_path"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+ 
+</data>
+</openerp>

=== modified file 'stock_planning/__openerp__.py'
--- stock_planning/__openerp__.py	2011-03-25 10:24:13 +0000
+++ stock_planning/__openerp__.py	2011-06-08 12:51:38 +0000
@@ -144,6 +144,7 @@
 """,
     "demo_xml":[],
     "update_xml": [
+        "security/stock_planning_security.xml",
         "security/ir.model.access.csv",
         "stock_planning_view.xml",
         "wizard/stock_planning_create_periods_view.xml",

=== added file 'stock_planning/security/stock_planning_security.xml'
--- stock_planning/security/stock_planning_security.xml	1970-01-01 00:00:00 +0000
+++ stock_planning/security/stock_planning_security.xml	2011-06-08 12:51:38 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="0">
+
+<!-- multi -->
+     <record model="ir.rule" id="stock_planning_comp_rule">
+        <field name="name">stock_planning multi-company</field>
+        <field name="model_id" ref="model_stock_planning"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+     <record model="ir.rule" id="stock_sale_forecast_comp_rule">
+        <field name="name">stock_sale_forecast multi-company</field>
+        <field name="model_id" ref="model_stock_sale_forecast"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+</data>
+</openerp>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to