trytond-patches/issue4482.diff
2023-01-04 16:05:47 +01:00

20 lines
999 B
Diff

diff -r 27ef44e71712 inventory.xml
--- a/tryton/modules/stock/inventory.xml Thu Apr 04 17:02:50 2019 +0200
+++ b/tryton/modules/stock/inventory.xml Thu Apr 04 17:10:20 2019 +0200
@@ -60,6 +60,16 @@
<field name="name">inventory_line_tree</field>
</record>
+ <record model="ir.rule.group" id="rule_group_inventory">
+ <field name="name">Inventory Group</field>
+ <field name="model" search="[('model', '=', 'stock.inventory')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_inventory">
+ <field name="domain" eval="[('company', 'in', Eval('user', {}).get('companies', []))]" pyson="1"/>
+ <field name="rule_group" ref="rule_group_inventory"/>
+ </record>
+
<record model="ir.model.access" id="access_inventory">
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
<field name="perm_read" eval="False"/>