From 330fe871bca54ebd4404475fd5538f3e299c676d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 8 Feb 2017 16:55:26 +0100 Subject: [PATCH 1/8] [IMP] rating_project: change demo data Since we want to remove portal module, this xmlid will not make sense anymore. --- addons/rating_project/data/project_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/rating_project/data/project_demo.xml b/addons/rating_project/data/project_demo.xml index 7229f83d770..222bd7a40ca 100644 --- a/addons/rating_project/data/project_demo.xml +++ b/addons/rating_project/data/project_demo.xml @@ -4,7 +4,7 @@ - + From b91b66c686b0817d9bf335e97b9f6a4fa672cae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 8 Feb 2017 15:16:02 +0100 Subject: [PATCH 2/8] [REM] portal_gamification: kill the module The goal is to prepare the removal of 'portal' module. Since this module only provides access rules and rights, those ones are moved directly into its parent module (aka gamification). Since no module depends on it, we can remove it without problem. --- .../security/gamification_security.xml | 2 +- .../gamification/security/ir.model.access.csv | 8 +++++++ addons/portal_gamification/__init__.py | 2 -- addons/portal_gamification/__manifest__.py | 22 ------------------- .../security/ir.model.access.csv | 9 -------- .../security/portal_security.xml | 9 -------- 6 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 addons/portal_gamification/__init__.py delete mode 100644 addons/portal_gamification/__manifest__.py delete mode 100644 addons/portal_gamification/security/ir.model.access.csv delete mode 100644 addons/portal_gamification/security/portal_security.xml diff --git a/addons/gamification/security/gamification_security.xml b/addons/gamification/security/gamification_security.xml index 785d533ae4b..3eecfb2e98c 100644 --- a/addons/gamification/security/gamification_security.xml +++ b/addons/gamification/security/gamification_security.xml @@ -4,7 +4,7 @@ User can only see his/her goals or goal from the same challenge in board visibility - + diff --git a/addons/gamification/security/ir.model.access.csv b/addons/gamification/security/ir.model.access.csv index 5bfd05af9cc..6a4d9f64a0a 100644 --- a/addons/gamification/security/ir.model.access.csv +++ b/addons/gamification/security/ir.model.access.csv @@ -2,18 +2,26 @@ id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink goal_employee,"Goal Employee",model_gamification_goal,base.group_user,1,1,0,0 goal_manager,"Goal Manager",model_gamification_goal,base.group_erp_manager,1,1,1,1 +goal_portal,"Goal Portal",gamification.model_gamification_goal,base.group_portal,1,1,0,0 goal_definition_employee,"Goal Definition Employee",model_gamification_goal_definition,base.group_user,1,0,0,0 goal_definition_manager,"Goal Definition Manager",model_gamification_goal_definition,base.group_erp_manager,1,1,1,1 +goal_definition_portal,"Goal Definition Portal",gamification.model_gamification_goal_definition,base.group_portal,1,0,0,0 challenge_employee,"Goal Challenge Employee",model_gamification_challenge,base.group_user,1,0,0,0 challenge_manager,"Goal Challenge Manager",model_gamification_challenge,base.group_erp_manager,1,1,1,1 +challenge_portal,"Goal Challenge Portal",gamification.model_gamification_challenge,base.group_portal,1,0,0,0 challenge_line_employee,"Challenge Line Employee",model_gamification_challenge_line,base.group_user,1,0,0,0 challenge_line_manager,"Challenge Line Manager",model_gamification_challenge_line,base.group_erp_manager,1,1,1,1 +challenge_line_portal,"Challenge Line Portal",gamification.model_gamification_challenge_line,base.group_portal,1,0,0,0 badge_employee,"Badge Employee",model_gamification_badge,base.group_user,1,0,0,0 badge_manager,"Badge Manager",model_gamification_badge,base.group_erp_manager,1,1,1,1 +badge_portal,"Badge Portal",gamification.model_gamification_badge,base.group_portal,1,0,0,0 +badge_public,"Badge Public",gamification.model_gamification_badge,base.group_public,1,0,0,0 badge_user_employee,"Badge-user Employee",model_gamification_badge_user,base.group_user,1,1,1,0 badge_user_manager,"Badge-user Manager",model_gamification_badge_user,base.group_erp_manager,1,1,1,1 +badge_user_portal,"Badge-user Portal",gamification.model_gamification_badge_user,base.group_portal,1,1,1,0 +badge_user_public,"Badge-user Public",gamification.model_gamification_badge_user,base.group_public,1,0,0,0 diff --git a/addons/portal_gamification/__init__.py b/addons/portal_gamification/__init__.py deleted file mode 100644 index 67dee8c60db..00000000000 --- a/addons/portal_gamification/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/addons/portal_gamification/__manifest__.py b/addons/portal_gamification/__manifest__.py deleted file mode 100644 index 8e3afd362f4..00000000000 --- a/addons/portal_gamification/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - - -{ - 'name': 'Portal Gamification', - 'version': '1', - 'category': 'Extra Tools', - 'complexity': 'easy', - 'description': """ -This module adds security rules for gamification to allow portal users to participate to challenges -=================================================================================================== - """, - 'depends': ['gamification','portal'], - 'data': [ - 'security/ir.model.access.csv', - 'security/portal_security.xml', - ], - 'installable': True, - 'auto_install': True, - 'category': 'Hidden', -} diff --git a/addons/portal_gamification/security/ir.model.access.csv b/addons/portal_gamification/security/ir.model.access.csv deleted file mode 100644 index 448e483d7cf..00000000000 --- a/addons/portal_gamification/security/ir.model.access.csv +++ /dev/null @@ -1,9 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -goal_portal,"Goal Portal",gamification.model_gamification_goal,base.group_portal,1,1,0,0 -goal_definition_portal,"Goal Definition Portal",gamification.model_gamification_goal_definition,base.group_portal,1,0,0,0 -challenge_portal,"Goal Challenge Portal",gamification.model_gamification_challenge,base.group_portal,1,0,0,0 -challenge_line_portal,"Challenge Line Portal",gamification.model_gamification_challenge_line,base.group_portal,1,0,0,0 -badge_portal,"Badge Portal",gamification.model_gamification_badge,base.group_portal,1,0,0,0 -badge_public,"Badge Public",gamification.model_gamification_badge,base.group_public,1,0,0,0 -badge_user_portal,"Badge-user Portal",gamification.model_gamification_badge_user,base.group_portal,1,1,1,0 -badge_user_public,"Badge-user Public",gamification.model_gamification_badge_user,base.group_public,1,0,0,0 diff --git a/addons/portal_gamification/security/portal_security.xml b/addons/portal_gamification/security/portal_security.xml deleted file mode 100644 index 5c2777283cc..00000000000 --- a/addons/portal_gamification/security/portal_security.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - From 9f006b5cce0ed05a315663675c68baf5ac4b499d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 8 Feb 2017 15:26:30 +0100 Subject: [PATCH 3/8] [REM] portal_stock: kill the module The goal is to prepare the removal of 'portal' module. Since this module only provides access rules and rights, those ones are moved directly into its parent module (aka 'stock'). Since no module depends on it, we can remove it without problem. --- addons/portal_stock/__init__.py | 2 -- addons/portal_stock/__manifest__.py | 22 ------------------- .../portal_stock/security/ir.model.access.csv | 7 ------ .../portal_stock/security/portal_security.xml | 20 ----------------- addons/stock/security/ir.model.access.csv | 6 +++++ addons/stock/security/stock_security.xml | 21 +++++++++++++++--- 6 files changed, 24 insertions(+), 54 deletions(-) delete mode 100644 addons/portal_stock/__init__.py delete mode 100644 addons/portal_stock/__manifest__.py delete mode 100644 addons/portal_stock/security/ir.model.access.csv delete mode 100644 addons/portal_stock/security/portal_security.xml diff --git a/addons/portal_stock/__init__.py b/addons/portal_stock/__init__.py deleted file mode 100644 index 67dee8c60db..00000000000 --- a/addons/portal_stock/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/addons/portal_stock/__manifest__.py b/addons/portal_stock/__manifest__.py deleted file mode 100644 index d8b9127310a..00000000000 --- a/addons/portal_stock/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - - -{ - 'name': 'Portal Stock', - 'version': '0.1', - 'category': 'Warehouse', - 'complexity': 'easy', - 'description': """ -This module adds access rules to your portal if stock and portal are installed. -========================================================================================== - """, - 'depends': ['sale_stock','portal'], - 'data': [ - 'security/portal_security.xml', - 'security/ir.model.access.csv', - ], - 'installable': True, - 'auto_install': True, - 'category': 'Hidden', -} diff --git a/addons/portal_stock/security/ir.model.access.csv b/addons/portal_stock/security/ir.model.access.csv deleted file mode 100644 index a5b64d87828..00000000000 --- a/addons/portal_stock/security/ir.model.access.csv +++ /dev/null @@ -1,7 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_stock_picking,stock.picking,stock.model_stock_picking,base.group_portal,1,0,0,0 -access_stock_picking_type_portal,stock.picking.type portal,stock.model_stock_picking_type,base.group_portal,1,0,0,0 -access_stock_pack_operation_portal,stock.pack.operation portal,stock.model_stock_pack_operation,base.group_portal,1,0,0,0 -access_stock_move,stock.move,stock.model_stock_move,base.group_portal,1,0,0,0 -access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,base.group_portal,1,0,0,0 -access_procurement_order,procurement.order,stock.model_procurement_order,base.group_portal,1,0,0,0 diff --git a/addons/portal_stock/security/portal_security.xml b/addons/portal_stock/security/portal_security.xml deleted file mode 100644 index 2aa3c41d1a0..00000000000 --- a/addons/portal_stock/security/portal_security.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - Portal Follower Pickings - - ['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)] - - - - - Portal Follower Pack Operations - - ['|', ('picking_id.message_partner_ids','in',[user.partner_id.id]), ('picking_id.partner_id.id','=',user.partner_id.id)] - - - - diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv index fe51da8bb0b..96536138936 100644 --- a/addons/stock/security/ir.model.access.csv +++ b/addons/stock/security/ir.model.access.csv @@ -8,13 +8,16 @@ access_stock_location_manager,stock.location.manager,model_stock_location,stock. access_stock_location_user,stock.location.user,model_stock_location,base.group_user,1,0,0,0 access_stock_picking_user,stock.picking user,model_stock_picking,stock.group_stock_user,1,1,1,1 access_stock_picking_manager,stock.picking manager,model_stock_picking,stock.group_stock_manager,1,1,1,1 +access_stock_picking_portal,stock.picking,stock.model_stock_picking,base.group_portal,1,0,0,0 access_stock_picking_type_all,stock.picking.type all users,model_stock_picking_type,base.group_user,1,0,0,0 access_stock_picking_type_user,stock.picking.type user,model_stock_picking_type,stock.group_stock_user,1,0,0,0 access_stock_picking_type_manager,stock.picking.type manager,model_stock_picking_type,stock.group_stock_manager,1,1,1,1 +access_stock_picking_type_portal,stock.picking.type portal,stock.model_stock_picking_type,base.group_portal,1,0,0,0 access_stock_production_lot_manager,stock.production.lot manager,model_stock_production_lot,stock.group_stock_manager,1,0,0,0 access_stock_production_lot_user,stock.production.lot user,model_stock_production_lot,stock.group_stock_user,1,1,1,1 access_stock_move_manager,stock.move manager,model_stock_move,stock.group_stock_manager,1,1,1,1 access_stock_move_user,stock.move user,model_stock_move,stock.group_stock_user,1,1,1,0 +access_stock_move_portal,stock.move,stock.model_stock_move,base.group_portal,1,0,0,0 access_stock_inventory_user,stock.inventory user,model_stock_inventory,stock.group_stock_user,1,1,1,0 access_stock_inventory_manager,stock.inventory manager,model_stock_inventory,stock.group_stock_manager,1,1,1,1 access_stock_inventory_line_user,stock.inventory.line user,model_stock_inventory_line,stock.group_stock_user,1,1,1,0 @@ -35,6 +38,7 @@ access_product_group_res_partner_stock_manager,res_partner group_stock_manager,b access_product_pricelist_item_stock_manager,product.pricelist.item stock_manager,product.model_product_pricelist_item,stock.group_stock_manager,1,1,1,1 access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,model_stock_warehouse_orderpoint,stock.group_stock_user,1,0,0,0 access_stock_warehouse_orderpoint_system,stock.warehouse.orderpoint system,model_stock_warehouse_orderpoint,stock.group_stock_manager,1,1,1,1 +access_stock_warehouse_orderpoint_portal,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,base.group_portal,1,0,0,0 access_stock_quant_manager,stock.quant manager,model_stock_quant,stock.group_stock_manager,1,0,0,0 access_stock_quant_user,stock.quant user,model_stock_quant,stock.group_stock_user,1,0,0,0 access_stock_quant_all,stock.quant all users,model_stock_quant,base.group_user,1,0,0,0 @@ -64,6 +68,7 @@ access_stock_move_operation_link_all,stock.move.operation.link all users,model_s access_stock_pack_operation_lot_manager,stock.pack.operation.lot manager,model_stock_pack_operation_lot,stock.group_stock_manager,1,1,1,1 access_stock_pack_operation_lot_user,stock.pack.operation.lot user,model_stock_pack_operation_lot,stock.group_stock_user,1,1,1,1 access_stock_pack_operation_lot_all,stock.pack.operation.lot all users,model_stock_pack_operation_lot,base.group_user,1,1,1,1 +access_stock_pack_operation_portal,stock.pack.operation portal,stock.model_stock_pack_operation,base.group_portal,1,0,0,0 access_product_price_history_stock_user,prices.history stock user,product.model_product_price_history,stock.group_stock_user,1,0,0,0 access_product_price_history_stock_manager,prices.history stock manager,product.model_product_price_history,stock.group_stock_manager,1,1,1,1 access_barcode_nomenclature_stock_user,barcode.nomenclature.stock.user,barcodes.model_barcode_nomenclature,stock.group_stock_user,1,0,0,0 @@ -73,3 +78,4 @@ access_barcode_rule_stock_manager,barcode.rule.stock.manager,barcodes.model_barc access_stock_forecast_user,report.stock.forecast.user,model_report_stock_forecast,stock.group_stock_user,1,0,0,0 access_stock_forecast_manager,report.stock.forecast.manager,model_report_stock_forecast,stock.group_stock_manager,1,1,1,1 access_stock_scrap_user,stock.scrap.user,model_stock_scrap,stock.group_stock_user,1,0,0,0 +access_procurement_order,procurement.order,stock.model_procurement_order,base.group_portal,1,0,0,0 \ No newline at end of file diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml index 7763c6666df..a825375bd1b 100644 --- a/addons/stock/security/stock_security.xml +++ b/addons/stock/security/stock_security.xml @@ -61,15 +61,15 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - + Stock Operation Type multi-company ['|', ('warehouse_id', '=', False), '|',('warehouse_id.company_id','=',False),('warehouse_id.company_id','child_of',[user.company_id.id])] - - + + Warehouse multi-company @@ -133,5 +133,20 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + + Portal Follower Pickings + + ['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)] + + + + + Portal Follower Pack Operations + + ['|', ('picking_id.message_partner_ids','in',[user.partner_id.id]), ('picking_id.partner_id.id','=',user.partner_id.id)] + + From 2b4eeb908f10b9045a5d11eec956ee2c6bae4af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 8 Feb 2017 16:03:00 +0100 Subject: [PATCH 4/8] [MOV] portal,website_portal: move wizard and tests into website_portal The goal is to prepare the removal of 'portal' module. Converting a partner into a portal user, though the wizard is moved in website_portal. 'base' will manage portal user and group, but if website_portal is not installed, there is nothing to display for portal user. --- addons/portal/__init__.py | 1 - addons/portal/__manifest__.py | 1 - addons/portal/tests/__init__.py | 4 ---- addons/website_portal/__init__.py | 1 + addons/website_portal/__manifest__.py | 1 + addons/website_portal/tests/__init__.py | 6 +++++- addons/{portal => website_portal}/tests/test_portal.py | 0 addons/{portal => website_portal}/wizard/__init__.py | 0 addons/{portal => website_portal}/wizard/portal_wizard.py | 0 .../wizard/portal_wizard_views.xml | 0 10 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 addons/portal/tests/__init__.py rename addons/{portal => website_portal}/tests/test_portal.py (100%) rename addons/{portal => website_portal}/wizard/__init__.py (100%) rename addons/{portal => website_portal}/wizard/portal_wizard.py (100%) rename addons/{portal => website_portal}/wizard/portal_wizard_views.xml (100%) diff --git a/addons/portal/__init__.py b/addons/portal/__init__.py index 11529f98733..81fc81d29c9 100644 --- a/addons/portal/__init__.py +++ b/addons/portal/__init__.py @@ -2,4 +2,3 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. import models -import wizard diff --git a/addons/portal/__manifest__.py b/addons/portal/__manifest__.py index 54ebe066a34..04627a30aea 100644 --- a/addons/portal/__manifest__.py +++ b/addons/portal/__manifest__.py @@ -24,7 +24,6 @@ very handy when used in combination with the module 'share'. 'data': [ 'data/portal_data.xml', 'views/portal_views.xml', - 'wizard/portal_wizard_views.xml', 'security/ir.model.access.csv', ], 'demo': ['data/portal_demo.xml'], diff --git a/addons/portal/tests/__init__.py b/addons/portal/tests/__init__.py deleted file mode 100644 index 3cc7401124d..00000000000 --- a/addons/portal/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from . import test_portal diff --git a/addons/website_portal/__init__.py b/addons/website_portal/__init__.py index bf7fb7b45c1..dd6445ec471 100644 --- a/addons/website_portal/__init__.py +++ b/addons/website_portal/__init__.py @@ -2,3 +2,4 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers +import wizard diff --git a/addons/website_portal/__manifest__.py b/addons/website_portal/__manifest__.py index 421def25ac0..e8a3f4f310c 100644 --- a/addons/website_portal/__manifest__.py +++ b/addons/website_portal/__manifest__.py @@ -14,5 +14,6 @@ Allows your customers to manage their account from a beautiful web interface. ], 'data': [ 'views/website_portal_templates.xml', + 'wizard/portal_wizard_views.xml', ], } diff --git a/addons/website_portal/tests/__init__.py b/addons/website_portal/tests/__init__.py index a2e745ce861..a2fdc8ff2cf 100644 --- a/addons/website_portal/tests/__init__.py +++ b/addons/website_portal/tests/__init__.py @@ -1 +1,5 @@ -import test_load_process \ No newline at end of file +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +import test_load_process +import test_portal diff --git a/addons/portal/tests/test_portal.py b/addons/website_portal/tests/test_portal.py similarity index 100% rename from addons/portal/tests/test_portal.py rename to addons/website_portal/tests/test_portal.py diff --git a/addons/portal/wizard/__init__.py b/addons/website_portal/wizard/__init__.py similarity index 100% rename from addons/portal/wizard/__init__.py rename to addons/website_portal/wizard/__init__.py diff --git a/addons/portal/wizard/portal_wizard.py b/addons/website_portal/wizard/portal_wizard.py similarity index 100% rename from addons/portal/wizard/portal_wizard.py rename to addons/website_portal/wizard/portal_wizard.py diff --git a/addons/portal/wizard/portal_wizard_views.xml b/addons/website_portal/wizard/portal_wizard_views.xml similarity index 100% rename from addons/portal/wizard/portal_wizard_views.xml rename to addons/website_portal/wizard/portal_wizard_views.xml From 1f3da58cfe3e406d7029018859181bc94c97414e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 8 Feb 2017 16:21:42 +0100 Subject: [PATCH 5/8] [MOV] base,portal: make portal module empty The goal is to prepare the removal of 'portal' module. - demo portal user is moved into base - 'is_portal' field on res.group too - remaining security rule are moved to base too - mail template is moved to website_portal --- addons/mail/data/mail_demo.xml | 7 +--- addons/portal/data/portal_data.xml | 36 ------------------ addons/portal/data/portal_demo.xml | 27 ------------- addons/portal/models/res_groups.py | 2 - addons/portal/security/ir.model.access.csv | 2 - addons/portal/views/portal_views.xml | 25 ------------ .../project_issue/data/project_issue_demo.xml | 2 +- .../data/crm_lead_demo.xml | 2 +- .../data/res_partner_grade_demo.xml | 2 +- addons/website_portal/__manifest__.py | 1 + .../data/website_portal_data.xml | 38 +++++++++++++++++++ addons/website_portal/wizard/portal_wizard.py | 2 +- addons/website_portal_sale/data/sale_demo.xml | 16 ++++---- addons/website_project/demo/project_demo.xml | 4 +- odoo/addons/base/base_demo.xml | 26 +++++++++++++ odoo/addons/base/res/res_users.py | 1 + odoo/addons/base/res/res_users_view.xml | 4 ++ odoo/addons/base/security/base_security.xml | 1 + odoo/addons/base/security/ir.model.access.csv | 2 + 19 files changed, 88 insertions(+), 112 deletions(-) create mode 100644 addons/website_portal/data/website_portal_data.xml diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 23050da6405..9e1680e4160 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -2,11 +2,6 @@ - - - Plan to install backup servers @@ -22,7 +17,7 @@ Do you have a simple solution with servers running on Redhat Linux?

Best regards,

-
-- 
+
--
 Virginie Agrolait
 virginie@agrolait.fr
email diff --git a/addons/portal/data/portal_data.xml b/addons/portal/data/portal_data.xml index 60da9bf2b63..9efc3453a78 100644 --- a/addons/portal/data/portal_data.xml +++ b/addons/portal/data/portal_data.xml @@ -2,42 +2,6 @@ - - - - - - Portal: new user - - ${object.partner_id.email} - Your Odoo account at ${user.company_id.name} - ${object.partner_id.lang} - - - - Dear ${object.user_id.name or ''}, -

-

- You have been given access to ${user.company_id.name}'s ${object.wizard_id.portal_id.name}. -

-

- Your login account data is: -

- -

- You can set or change your password via the following url: -

- -

-${object.wizard_id.welcome_message or ''}]]> - diff --git a/addons/portal/data/portal_demo.xml b/addons/portal/data/portal_demo.xml index 85cc1e0b6d2..411eaee612d 100644 --- a/addons/portal/data/portal_demo.xml +++ b/addons/portal/data/portal_demo.xml @@ -2,33 +2,6 @@ - - - Demo Portal User - demo.portal@yourcompany.example.com - - - Vivegnis - 4683 - - YourCompany - Rue Cesar de Paepe, 43 - - - - portal - portal - inbox - --
-Mr Demo Portal]]>
- - -
- - - - -
diff --git a/addons/portal/models/res_groups.py b/addons/portal/models/res_groups.py index 01897204bc5..d915b162c8c 100644 --- a/addons/portal/models/res_groups.py +++ b/addons/portal/models/res_groups.py @@ -9,5 +9,3 @@ class PortalGroup(models.Model): """ _inherit = 'res.groups' - - is_portal = fields.Boolean('Portal', help="If checked, this group is usable as a portal.") diff --git a/addons/portal/security/ir.model.access.csv b/addons/portal/security/ir.model.access.csv index ff54e38279f..97dd8b917b8 100644 --- a/addons/portal/security/ir.model.access.csv +++ b/addons/portal/security/ir.model.access.csv @@ -1,3 +1 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_ir_attachment_portal,ir.attachment.portal,base.model_ir_attachment,base.group_portal,1,0,1,0 -access_ir_ui_menu_portal,ir.ui.menu.portal,base.model_ir_ui_menu,base.group_portal,1,0,0,0 \ No newline at end of file diff --git a/addons/portal/views/portal_views.xml b/addons/portal/views/portal_views.xml index 629e0cfc7d9..8046b18d28e 100644 --- a/addons/portal/views/portal_views.xml +++ b/addons/portal/views/portal_views.xml @@ -1,30 +1,5 @@ - - - Group Search - res.groups - - - - - - - - - - - - - Portal Form - res.groups - - - - - - - diff --git a/addons/project_issue/data/project_issue_demo.xml b/addons/project_issue/data/project_issue_demo.xml index b2431710833..6f4dd2ec56f 100644 --- a/addons/project_issue/data/project_issue_demo.xml +++ b/addons/project_issue/data/project_issue_demo.xml @@ -36,7 +36,7 @@ - + Bug in Accounts module diff --git a/addons/website_crm_partner_assign/data/crm_lead_demo.xml b/addons/website_crm_partner_assign/data/crm_lead_demo.xml index a9209a2954e..59d296d3368 100644 --- a/addons/website_crm_partner_assign/data/crm_lead_demo.xml +++ b/addons/website_crm_partner_assign/data/crm_lead_demo.xml @@ -24,7 +24,7 @@ Regards, Steve - + diff --git a/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml b/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml index c3515840099..bce96651c14 100644 --- a/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml +++ b/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml @@ -13,7 +13,7 @@ - + 10 diff --git a/addons/website_portal/__manifest__.py b/addons/website_portal/__manifest__.py index e8a3f4f310c..a3fd791351d 100644 --- a/addons/website_portal/__manifest__.py +++ b/addons/website_portal/__manifest__.py @@ -15,5 +15,6 @@ Allows your customers to manage their account from a beautiful web interface. 'data': [ 'views/website_portal_templates.xml', 'wizard/portal_wizard_views.xml', + 'data/website_portal_data.xml', ], } diff --git a/addons/website_portal/data/website_portal_data.xml b/addons/website_portal/data/website_portal_data.xml new file mode 100644 index 00000000000..3ffcb7693ff --- /dev/null +++ b/addons/website_portal/data/website_portal_data.xml @@ -0,0 +1,38 @@ + + + + + + Portal: new user + + ${object.partner_id.email} + Your Odoo account at ${user.company_id.name} + ${object.partner_id.lang} + + + + Dear ${object.user_id.name or ''}, +

+

+ You have been given access to ${user.company_id.name}'s ${object.wizard_id.portal_id.name}. +

+

+ Your login account data is: +

+ +

+ You can set or change your password via the following url: +

+ +

+${object.wizard_id.welcome_message or ''}]]> + + + diff --git a/addons/website_portal/wizard/portal_wizard.py b/addons/website_portal/wizard/portal_wizard.py index 051d4bee319..0816820f195 100644 --- a/addons/website_portal/wizard/portal_wizard.py +++ b/addons/website_portal/wizard/portal_wizard.py @@ -182,7 +182,7 @@ class PortalWizardUser(models.TransientModel): raise UserError(_('You must have an email address in your User Preferences to send emails.')) # determine subject and body in the portal user's language - template = self.env.ref('portal.mail_template_data_portal_welcome') + template = self.env.ref('website_portal.mail_template_data_portal_welcome') for wizard_line in self: lang = wizard_line.user_id.lang partner = wizard_line.user_id.partner_id diff --git a/addons/website_portal_sale/data/sale_demo.xml b/addons/website_portal_sale/data/sale_demo.xml index e7223543cdd..9225efcc631 100644 --- a/addons/website_portal_sale/data/sale_demo.xml +++ b/addons/website_portal_sale/data/sale_demo.xml @@ -2,15 +2,15 @@ - - - + + + sent - + @@ -41,14 +41,14 @@ - - - + + + - + diff --git a/addons/website_project/demo/project_demo.xml b/addons/website_project/demo/project_demo.xml index 25d4d62ef04..afdd792eb74 100644 --- a/addons/website_project/demo/project_demo.xml +++ b/addons/website_project/demo/project_demo.xml @@ -2,11 +2,11 @@ - + portal + eval="[ref('project.project_project_1')], [ref('base.partner_demo_portal')]"/> diff --git a/odoo/addons/base/base_demo.xml b/odoo/addons/base/base_demo.xml index ea46467957c..d32755e8e47 100644 --- a/odoo/addons/base/base_demo.xml +++ b/odoo/addons/base/base_demo.xml @@ -56,5 +56,31 @@ + + + + Demo Portal User + demo.portal@yourcompany.example.com + + + none + Vivegnis + 4683 + + YourCompany + Rue Cesar de Paepe, 43 + + + + portal + portal + --
Mr Demo Portal]]>
+ +
+ + + + +
diff --git a/odoo/addons/base/res/res_users.py b/odoo/addons/base/res/res_users.py index e92aaf5315e..978fb6f4024 100644 --- a/odoo/addons/base/res/res_users.py +++ b/odoo/addons/base/res/res_users.py @@ -83,6 +83,7 @@ class Groups(models.Model): color = fields.Integer(string='Color Index') full_name = fields.Char(compute='_compute_full_name', string='Group Name', search='_search_full_name') share = fields.Boolean(string='Share Group', help="Group created to set access rights for sharing data with some users.") + is_portal = fields.Boolean('Portal', help="If checked, this group is usable as a portal.") _sql_constraints = [ ('name_uniq', 'unique (category_id, name)', 'The name of the group must be unique within an application!') diff --git a/odoo/addons/base/res/res_users_view.xml b/odoo/addons/base/res/res_users_view.xml index 7c161bae18f..1b28358c4e5 100644 --- a/odoo/addons/base/res/res_users_view.xml +++ b/odoo/addons/base/res/res_users_view.xml @@ -42,6 +42,9 @@ + + + @@ -56,6 +59,7 @@ + diff --git a/odoo/addons/base/security/base_security.xml b/odoo/addons/base/security/base_security.xml index ab4191de93a..f36c0b061e8 100644 --- a/odoo/addons/base/security/base_security.xml +++ b/odoo/addons/base/security/base_security.xml @@ -57,6 +57,7 @@ Portal Portal members have specific access rights (such as record rules and restricted menus). They usually do not belong to the usual Odoo groups. +