|
1 |
-- @tag: rights_view_docs
|
|
2 |
-- @description: Rechte zum Lesen von Belegen
|
|
3 |
-- @depends: release_3_6_0
|
|
4 |
-- @locales: View sales quotations
|
|
5 |
-- @locales: View sales orders
|
|
6 |
-- @locales: View sales delivery orders
|
|
7 |
-- @locales: View sales invoices and credit notes
|
|
8 |
-- @locales: View RFQs
|
|
9 |
-- @locales: View purchase orders
|
|
10 |
-- @locales: View purchase delivery orders
|
|
11 |
-- @locales: View purchase invoices
|
|
12 |
|
|
13 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
14 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_quotation_edit'),
|
|
15 |
'sales_quotation_view',
|
|
16 |
'View sales quotations',
|
|
17 |
FALSE);
|
|
18 |
|
|
19 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
20 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_order_edit'),
|
|
21 |
'sales_order_view',
|
|
22 |
'View sales orders',
|
|
23 |
FALSE);
|
|
24 |
|
|
25 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
26 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'sales_delivery_order_edit'),
|
|
27 |
'sales_delivery_order_view',
|
|
28 |
'View sales delivery orders',
|
|
29 |
FALSE);
|
|
30 |
|
|
31 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
32 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'invoice_edit'),
|
|
33 |
'sales_invoice_view',
|
|
34 |
'View sales invoices and credit notes',
|
|
35 |
FALSE);
|
|
36 |
|
|
37 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
38 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'request_quotation_edit'),
|
|
39 |
'request_quotation_view',
|
|
40 |
'View RFQs',
|
|
41 |
FALSE);
|
|
42 |
|
|
43 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
44 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'purchase_order_edit'),
|
|
45 |
'purchase_order_view',
|
|
46 |
'View purchase orders',
|
|
47 |
FALSE);
|
|
48 |
|
|
49 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
50 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'purchase_delivery_order_edit'),
|
|
51 |
'purchase_delivery_order_view',
|
|
52 |
'View purchase delivery orders',
|
|
53 |
FALSE);
|
|
54 |
|
|
55 |
INSERT INTO auth.master_rights (position, name, description, category)
|
|
56 |
VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'vendor_invoice_edit'),
|
|
57 |
'purchase_invoice_view',
|
|
58 |
'View purchase invoices',
|
|
59 |
FALSE);
|
|
60 |
|
|
61 |
|
|
62 |
INSERT INTO auth.group_rights (group_id, "right", granted)
|
|
63 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_quotation_view', true UNION
|
|
64 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_order_view', true UNION
|
|
65 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_delivery_order_view', true UNION
|
|
66 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'sales_invoice_view', true UNION
|
|
67 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'request_quotation_view', true UNION
|
|
68 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_order_view', true UNION
|
|
69 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_delivery_order_view', true UNION
|
|
70 |
SELECT (SELECT id FROM auth.group WHERE name = 'Vollzugriff'), 'purchase_invoice_view', true;
|
Rechte (nur) zum Lesen von Belegen