From 6f1eebd5a2c18bae40d59d66026bcbc4a88c63b5 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 9 Dec 2011 13:57:41 +0100 Subject: [PATCH 01/10] [FIX] share: add domain to hide share groups from the res.users form bzr revid: rco@openerp.com-20111209125741-1b4um49lcdqb3j73 --- addons/share/res_users.py | 8 +++++++- addons/share/res_users_view.xml | 12 ------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/addons/share/res_users.py b/addons/share/res_users.py index f7a81a24948..0462f1339d0 100644 --- a/addons/share/res_users.py +++ b/addons/share/res_users.py @@ -26,7 +26,13 @@ class res_groups(osv.osv): _columns = { 'share': fields.boolean('Share Group', readonly=True, help="Group created to set access rights for sharing data with some users.") - } + } + + def __init__(self, pool, cr): + super(res_groups, self).__init__(pool, cr) + # add domain in get_groups_by_application() + self.groups_by_application_domain.append(('share', '=', False)) + res_groups() class res_users(osv.osv): diff --git a/addons/share/res_users_view.xml b/addons/share/res_users_view.xml index b03a090c809..3b74fbb4dbc 100644 --- a/addons/share/res_users_view.xml +++ b/addons/share/res_users_view.xml @@ -21,18 +21,6 @@ Users {'search_default_no_share': 1} - - res.users.form - res.users - form - - - - {'search_default_no_share':1} - - - - res.groups.search.share From c0755c42187739697de16f90ec970f2e3478a26c Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 14:35:23 +0100 Subject: [PATCH 02/10] [IMP] account, analytic, auction: add group categories bzr revid: rco@openerp.com-20111212133523-ea0r5b47mc5tddl7 --- addons/account/security/account_security.xml | 9 ++++++--- .../security/account_payment_security.xml | 3 ++- addons/analytic/security/analytic_security.xml | 3 ++- addons/auction/security/auction_security.xml | 12 ++++++++++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index c928ff3c8fe..64498127dc5 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -2,14 +2,17 @@ - Accounting / Invoicing & Payments + Invoicing & Payments + - Accounting / Accountant + Accountant + - Accounting / Manager + Manager + diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml index 4bae0c30ce6..91b65785d7b 100644 --- a/addons/account_payment/security/account_payment_security.xml +++ b/addons/account_payment/security/account_payment_security.xml @@ -3,7 +3,8 @@ - Accounting / Payments + Payments + diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml index 165bb92f6b9..3f8ec1036be 100644 --- a/addons/analytic/security/analytic_security.xml +++ b/addons/analytic/security/analytic_security.xml @@ -16,6 +16,7 @@ - Useability / Analytic Accounting + Analytic Accounting + diff --git a/addons/auction/security/auction_security.xml b/addons/auction/security/auction_security.xml index 3caf93a2430..087151cb6ea 100644 --- a/addons/auction/security/auction_security.xml +++ b/addons/auction/security/auction_security.xml @@ -2,11 +2,19 @@ + + Auction + + 26 + + - Auction / User + User + - Auction / Manager + Manager + From 857e45e84ce4adf2636686f368da674c901a658d Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 14:43:54 +0100 Subject: [PATCH 03/10] [IMP] base_contact, crm, document, event: add group categories bzr revid: rco@openerp.com-20111212134354-49p2gyf93qozplll --- .../base_contact/security/base_contact_security.xml | 6 ++++-- addons/crm/security/crm_security.xml | 9 ++++++--- addons/document/security/document_security.xml | 3 ++- addons/event/security/event_security.xml | 12 ++++++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/addons/base_contact/security/base_contact_security.xml b/addons/base_contact/security/base_contact_security.xml index 56a995c76a8..29b16893ef2 100644 --- a/addons/base_contact/security/base_contact_security.xml +++ b/addons/base_contact/security/base_contact_security.xml @@ -3,11 +3,13 @@ - Sales / User + User + - Sales / Manager + Manager + diff --git a/addons/crm/security/crm_security.xml b/addons/crm/security/crm_security.xml index 8ac32086cfd..635ed5f5fe6 100644 --- a/addons/crm/security/crm_security.xml +++ b/addons/crm/security/crm_security.xml @@ -3,16 +3,19 @@ - Sales / User - Own Leads Only + User - Own Leads Only + - Sales / User - All Leads + User - All Leads + - Sales / Manager + Manager + diff --git a/addons/document/security/document_security.xml b/addons/document/security/document_security.xml index bc0281e388c..74f3426fc50 100644 --- a/addons/document/security/document_security.xml +++ b/addons/document/security/document_security.xml @@ -3,7 +3,8 @@ - Knowledge / User + User + diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml index c3c70c94d93..091aaef03a1 100644 --- a/addons/event/security/event_security.xml +++ b/addons/event/security/event_security.xml @@ -3,20 +3,24 @@ - Marketing / User + User + - Marketing / Manager + Manager + - Sales / Manager + Manager + - Sales / User + User + From 084c5d9289e914bf871c5b01802b4e44c164f16b Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 14:49:38 +0100 Subject: [PATCH 04/10] [IMP] hr, idea, knowledge, lunch: add group categories bzr revid: rco@openerp.com-20111212134938-xwfnq4d3ks1awuu9 --- addons/hr/security/hr_security.xml | 6 ++++-- addons/idea/security/idea_security.xml | 6 ++++-- addons/knowledge/security/knowledge_security.xml | 15 +++++++++------ addons/lunch/security/lunch_security.xml | 6 ++++-- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index 8e77830184b..e8d1edd3712 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -3,11 +3,13 @@ - Human Resources / HR Officer + HR Officer + - Human Resources / HR Manager + HR Manager + diff --git a/addons/idea/security/idea_security.xml b/addons/idea/security/idea_security.xml index 344cbc64292..02a3cbdbdd8 100644 --- a/addons/idea/security/idea_security.xml +++ b/addons/idea/security/idea_security.xml @@ -3,10 +3,12 @@ - Tools / User + User + - Tools / Manager + Manager + diff --git a/addons/knowledge/security/knowledge_security.xml b/addons/knowledge/security/knowledge_security.xml index b4c7bb99c1b..80bce33e7e4 100644 --- a/addons/knowledge/security/knowledge_security.xml +++ b/addons/knowledge/security/knowledge_security.xml @@ -1,13 +1,16 @@ - - Sales / Manager - - - Knowledge / User - + + Manager + + + + + User + + diff --git a/addons/lunch/security/lunch_security.xml b/addons/lunch/security/lunch_security.xml index e84cdb41c0d..7d665c96435 100644 --- a/addons/lunch/security/lunch_security.xml +++ b/addons/lunch/security/lunch_security.xml @@ -3,10 +3,12 @@ - Tools / User + User + - Tools / Manager + Manager + From 85b3757a60d0672b370f4320a4ce0bdebfd7557d Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 14:57:31 +0100 Subject: [PATCH 05/10] [IMP] marketing, mrp, point_of_sale, portal: add group categories bzr revid: rco@openerp.com-20111212135731-gdccm6nwt7ic00t4 --- addons/marketing/security/marketing_security.xml | 6 ++++-- addons/mrp/security/mrp_security.xml | 6 ++++-- .../security/point_of_sale_security.xml | 6 ++++-- addons/portal/security/portal_security.xml | 12 ++++++++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/addons/marketing/security/marketing_security.xml b/addons/marketing/security/marketing_security.xml index 344e562eb67..d04473da8bf 100644 --- a/addons/marketing/security/marketing_security.xml +++ b/addons/marketing/security/marketing_security.xml @@ -2,11 +2,13 @@ - Marketing / User + User + - Marketing / Manager + Manager + diff --git a/addons/mrp/security/mrp_security.xml b/addons/mrp/security/mrp_security.xml index fb83f8c4a62..b4b79d6f606 100644 --- a/addons/mrp/security/mrp_security.xml +++ b/addons/mrp/security/mrp_security.xml @@ -3,10 +3,12 @@ - Manufacturing / User + User + - Manufacturing / Manager + Manager + diff --git a/addons/point_of_sale/security/point_of_sale_security.xml b/addons/point_of_sale/security/point_of_sale_security.xml index 14c9e96df9e..2516f1e3ddb 100644 --- a/addons/point_of_sale/security/point_of_sale_security.xml +++ b/addons/point_of_sale/security/point_of_sale_security.xml @@ -3,10 +3,12 @@ - Point of Sale / User + User + - Point of Sale / Manager + Manager + diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml index 4850cb7805b..4b73db5cdcc 100644 --- a/addons/portal/security/portal_security.xml +++ b/addons/portal/security/portal_security.xml @@ -1,13 +1,21 @@ + + Portal + + 25 + + - Portal / Officer + Officer Portal officers can create new portal users with the portal wizard. + - Portal / Manager + Manager Portal managers have access to the portal definitions, and can easily configure the users, access rights and menus of portal users. + From 5aa61b26e8fd2baeb286c85304cb592941c39ca0 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 15:05:28 +0100 Subject: [PATCH 06/10] [IMP] product, project, purchase, purchase_requisition: add group categories bzr revid: rco@openerp.com-20111212140528-g8oxverkipswionf --- addons/product/security/product_security.xml | 12 ++++++++---- addons/project/security/project_security.xml | 9 ++++++--- addons/purchase/security/purchase_security.xml | 6 ++++-- .../security/purchase_tender.xml | 12 ++++++++++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml index d9f14a13225..59d93fd2b3d 100644 --- a/addons/product/security/product_security.xml +++ b/addons/product/security/product_security.xml @@ -3,14 +3,17 @@ - Useability / Product UoS View + Product UoS View + - Sales / Manager + Manager + - Sales / User + User + @@ -21,7 +24,8 @@ - Useability / Product Variant + Product Variant + diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml index 62f74f51d1b..69f4dff9a83 100644 --- a/addons/project/security/project_security.xml +++ b/addons/project/security/project_security.xml @@ -3,16 +3,19 @@ - Project / User + User + - Project / Manager + Manager + - Sales / User + User + diff --git a/addons/purchase/security/purchase_security.xml b/addons/purchase/security/purchase_security.xml index a67c675b089..4a8ac571703 100644 --- a/addons/purchase/security/purchase_security.xml +++ b/addons/purchase/security/purchase_security.xml @@ -3,10 +3,12 @@ - Purchases / User + User + - Purchases / Manager + Manager + diff --git a/addons/purchase_requisition/security/purchase_tender.xml b/addons/purchase_requisition/security/purchase_tender.xml index af8a1330e2d..71c54b973e3 100644 --- a/addons/purchase_requisition/security/purchase_tender.xml +++ b/addons/purchase_requisition/security/purchase_tender.xml @@ -2,12 +2,20 @@ + + Purchase Requisition + + 9 + + - Purchase Requisition / User + User + - Purchase Requisition / Manager + Manager + From 00fbd705f645cbbe6b44f7c2940b943c140c1e10 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 15:11:31 +0100 Subject: [PATCH 07/10] [IMP] sale, sale_crm, share, stock: add group categories bzr revid: rco@openerp.com-20111212141131-5yhvgd2pjx60seo1 --- addons/sale/security/sale_security.xml | 9 ++++++--- addons/sale_mrp/security/sale_mrp_security.xml | 10 ++++++---- addons/share/security/share_security.xml | 11 +++++++++-- addons/stock/security/stock_security.xml | 6 ++++-- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/addons/sale/security/sale_security.xml b/addons/sale/security/sale_security.xml index b7a228acf6a..ae8c8bf62e3 100644 --- a/addons/sale/security/sale_security.xml +++ b/addons/sale/security/sale_security.xml @@ -3,16 +3,19 @@ - Sales / User - Own Leads Only + User - Own Leads Only + - Sales / User - All Leads + User - All Leads + - Sales / Manager + Manager + diff --git a/addons/sale_mrp/security/sale_mrp_security.xml b/addons/sale_mrp/security/sale_mrp_security.xml index c0139329d1e..7b5d00c55fc 100644 --- a/addons/sale_mrp/security/sale_mrp_security.xml +++ b/addons/sale_mrp/security/sale_mrp_security.xml @@ -2,12 +2,14 @@ - - Sales / Manager - + + Manager + + - Sales / User + User + diff --git a/addons/share/security/share_security.xml b/addons/share/security/share_security.xml index a5405dbcb48..1e92ac44a53 100644 --- a/addons/share/security/share_security.xml +++ b/addons/share/security/share_security.xml @@ -1,10 +1,17 @@ + + Sharing + + 26 + + - Sharing / User + User Members of this groups have access to the sharing wizard, which allows them to invite external users to view or edit some of their documents. + - \ No newline at end of file + diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml index 389d62e8ce0..f83a5d362ab 100644 --- a/addons/stock/security/stock_security.xml +++ b/addons/stock/security/stock_security.xml @@ -3,10 +3,12 @@ - Warehouse / User + User + - Warehouse / Manager + Manager + From 49a7682479682068c97069c1d7997e7a04ef64a6 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 15:21:21 +0100 Subject: [PATCH 08/10] [IMP] subscription, survey, wiki: add group categories bzr revid: rco@openerp.com-20111212142121-jly0qs05n2tvk1wh --- addons/subscription/security/subcription_security.xml | 6 ++++-- addons/survey/security/survey_security.xml | 6 ++++-- addons/wiki/security/wiki_security.xml | 9 ++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/addons/subscription/security/subcription_security.xml b/addons/subscription/security/subcription_security.xml index e84cdb41c0d..7d665c96435 100644 --- a/addons/subscription/security/subcription_security.xml +++ b/addons/subscription/security/subcription_security.xml @@ -3,10 +3,12 @@ - Tools / User + User + - Tools / Manager + Manager + diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml index 7b6c43ed2bc..c44a35e3ee9 100644 --- a/addons/survey/security/survey_security.xml +++ b/addons/survey/security/survey_security.xml @@ -2,10 +2,12 @@ - Tools / User + User + - Tools / Manager + Manager + diff --git a/addons/wiki/security/wiki_security.xml b/addons/wiki/security/wiki_security.xml index 98a8c03c177..16bd30c151f 100644 --- a/addons/wiki/security/wiki_security.xml +++ b/addons/wiki/security/wiki_security.xml @@ -2,14 +2,9 @@ - - Sales / Manager - - - Sales / User - - Knowledge / User + User + From 48b53165ea1c16038377217d5e3e517cdaa552df Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 15:39:56 +0100 Subject: [PATCH 09/10] [FIX] account_payment: something wrong with group Accounting / Payments bzr revid: rco@openerp.com-20111212143956-rhiwojhs3m26jmhw --- addons/account_payment/security/account_payment_security.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml index 91b65785d7b..4bae0c30ce6 100644 --- a/addons/account_payment/security/account_payment_security.xml +++ b/addons/account_payment/security/account_payment_security.xml @@ -3,8 +3,7 @@ - Payments - + Accounting / Payments From 70bb0dd8109a5fba81ebb13175a3c03398d7a73a Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Dec 2011 15:51:28 +0100 Subject: [PATCH 10/10] [IMP] base_contact, event, knowledge, product, project, sale_mrp: avoid redefinition of sale groups bzr revid: rco@openerp.com-20111212145128-zx64v0uwf8n0lwyu --- addons/base_contact/__openerp__.py | 1 - .../security/base_contact_security.xml | 16 ----------- addons/event/__openerp__.py | 1 - addons/event/security/event_security.xml | 27 ------------------- .../knowledge/security/knowledge_security.xml | 5 ---- addons/product/security/product_security.xml | 9 ------- addons/project/security/project_security.xml | 5 ---- addons/sale_mrp/__openerp__.py | 1 - .../sale_mrp/security/sale_mrp_security.xml | 16 ----------- 9 files changed, 81 deletions(-) delete mode 100644 addons/base_contact/security/base_contact_security.xml delete mode 100644 addons/event/security/event_security.xml delete mode 100644 addons/sale_mrp/security/sale_mrp_security.xml diff --git a/addons/base_contact/__openerp__.py b/addons/base_contact/__openerp__.py index f5969b6e309..74720eb3011 100644 --- a/addons/base_contact/__openerp__.py +++ b/addons/base_contact/__openerp__.py @@ -45,7 +45,6 @@ Pay attention that this module converts the existing addresses into "addresses + 'depends': ['base','process'], 'init_xml': [], 'update_xml': [ - 'security/base_contact_security.xml', 'security/ir.model.access.csv', 'base_contact_view.xml', 'base_contact_installer_view.xml', diff --git a/addons/base_contact/security/base_contact_security.xml b/addons/base_contact/security/base_contact_security.xml deleted file mode 100644 index 29b16893ef2..00000000000 --- a/addons/base_contact/security/base_contact_security.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - User - - - - - Manager - - - - - diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py index abd3f6393b5..283bd03ce30 100644 --- a/addons/event/__openerp__.py +++ b/addons/event/__openerp__.py @@ -42,7 +42,6 @@ Note that: 'depends': ['crm', 'base_contact', 'account', 'marketing', 'mail'], 'init_xml': [], 'update_xml': [ - 'security/event_security.xml', 'security/ir.model.access.csv', 'wizard/event_confirm_registration_view.xml', 'wizard/event_confirm_view.xml', diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml deleted file mode 100644 index 091aaef03a1..00000000000 --- a/addons/event/security/event_security.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - User - - - - - Manager - - - - - - Manager - - - - - User - - - - - diff --git a/addons/knowledge/security/knowledge_security.xml b/addons/knowledge/security/knowledge_security.xml index 80bce33e7e4..560fdce0506 100644 --- a/addons/knowledge/security/knowledge_security.xml +++ b/addons/knowledge/security/knowledge_security.xml @@ -2,11 +2,6 @@ - - Manager - - - User diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml index 59d93fd2b3d..5c993b9cd61 100644 --- a/addons/product/security/product_security.xml +++ b/addons/product/security/product_security.xml @@ -7,15 +7,6 @@ - - Manager - - - - User - - - Product multi-company diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml index 69f4dff9a83..f1e3a6e9b74 100644 --- a/addons/project/security/project_security.xml +++ b/addons/project/security/project_security.xml @@ -13,11 +13,6 @@ - - User - - - diff --git a/addons/sale_mrp/__openerp__.py b/addons/sale_mrp/__openerp__.py index 7d4443a3cce..4900834f7b0 100644 --- a/addons/sale_mrp/__openerp__.py +++ b/addons/sale_mrp/__openerp__.py @@ -39,7 +39,6 @@ It adds sales name and sales Reference on production order. 'depends': ['mrp', 'sale'], 'init_xml': [], 'update_xml': [ - 'security/sale_mrp_security.xml', 'security/ir.model.access.csv', 'sale_mrp_view.xml', ], diff --git a/addons/sale_mrp/security/sale_mrp_security.xml b/addons/sale_mrp/security/sale_mrp_security.xml deleted file mode 100644 index 7b5d00c55fc..00000000000 --- a/addons/sale_mrp/security/sale_mrp_security.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Manager - - - - - User - - - - -