summaryrefslogtreecommitdiff
path: root/addons/sale_stock/security
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/sale_stock/security
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/sale_stock/security')
-rw-r--r--addons/sale_stock/security/ir.model.access.csv18
-rw-r--r--addons/sale_stock/security/sale_stock_security.xml23
2 files changed, 41 insertions, 0 deletions
diff --git a/addons/sale_stock/security/ir.model.access.csv b/addons/sale_stock/security/ir.model.access.csv
new file mode 100644
index 00000000..7f4be5c9
--- /dev/null
+++ b/addons/sale_stock/security/ir.model.access.csv
@@ -0,0 +1,18 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_stock_picking_salesman,stock_picking salesman,stock.model_stock_picking,sales_team.group_sale_salesman,1,1,1,0
+access_stock_move_salesman,stock_move salesman,stock.model_stock_move,sales_team.group_sale_salesman,1,1,1,0
+access_stock_move_manager,stock_move manager,stock.model_stock_move,sales_team.group_sale_manager,1,1,1,1
+access_sale_order_stock_worker,sale.order stock worker,model_sale_order,stock.group_stock_user,1,1,0,0
+access_sale_order_line_stock_worker,sale.order.line stock worker,model_sale_order_line,stock.group_stock_user,1,1,0,0
+access_stock_picking_sales,stock.picking.sales,stock.model_stock_picking,sales_team.group_sale_manager,1,1,1,1
+access_stock_picking_portal,stock.picking,stock.model_stock_picking,base.group_portal,1,0,0,0
+access_product_packaging_user,product.packaging.user,product.model_product_packaging,sales_team.group_sale_salesman,1,1,1,0
+access_stock_warehouse_user,stock.warehouse.user,stock.model_stock_warehouse,sales_team.group_sale_salesman,1,0,0,0
+access_stock_location_user,stock.location.user,stock.model_stock_location,sales_team.group_sale_salesman,1,0,0,0
+access_product_packaging_sale_manager,product.packaging salemanager,product.model_product_packaging,sales_team.group_sale_manager,1,1,1,1
+access_stock_warehouse_orderpoint_sale_salesman,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sales_team.group_sale_salesman,1,0,0,0
+access_account_partial_reconcile,account.partial.reconcile,account.model_account_partial_reconcile,stock.group_stock_manager,1,1,1,1
+access_account_journal,account.journal,account.model_account_journal,stock.group_stock_manager,1,1,0,0
+access_stock_location_sale_manager,stock.location sale manager,stock.model_stock_location,sales_team.group_sale_manager,1,0,0,0
+access_stock_rule_salemanager,stock_rule salemanager,stock.model_stock_rule,sales_team.group_sale_manager,1,1,1,1
+access_stock_rule,stock.rule.flow,stock.model_stock_rule,sales_team.group_sale_salesman,1,0,0,0
diff --git a/addons/sale_stock/security/sale_stock_security.xml b/addons/sale_stock/security/sale_stock_security.xml
new file mode 100644
index 00000000..e1860aa8
--- /dev/null
+++ b/addons/sale_stock/security/sale_stock_security.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="group_display_incoterm" model="res.groups">
+ <field name="name">Display incoterms on Sales Order and related invoices</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="group_lot_on_invoice" model="res.groups">
+ <field name="name">Display Serial &amp; Lot Number on Invoices</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <data noupdate="1">
+
+ <!-- Stock Portal Access Rules -->
+ <record id="stock_picking_rule_portal" model="ir.rule">
+ <field name="name">Portal Follower Transfers</field>
+ <field name="model_id" ref="stock.model_stock_picking"/>
+ <field name="domain_force">['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id', '=', user.partner_id.id), ('sale_id.partner_id', '=', user.partner_id.id)]</field>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
+ </record>
+ </data>
+</odoo>