From 35a9d30b61405ab9c5ad2f1024afc1b8c53c1387 Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Wed, 20 Jul 2011 10:51:21 +0530 Subject: [PATCH 01/14] [IMP]: removed domain from point of sale order line bzr revid: han@tinyerp.com-20110720052121-3945e40t0ylw7tmc --- addons/point_of_sale/point_of_sale_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 1435f6cc2b6..09a5ff232f2 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -269,7 +269,6 @@ form tree - [('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))] From 5bc8c72cf543cedb2ef1943b836eb37bb1e5973a Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Wed, 20 Jul 2011 15:34:54 +0530 Subject: [PATCH 02/14] [usability],tooltip on search button bzr revid: amb@tinyerp.com-20110720100454-ko6iub7h021u25ry --- addons/crm/crm_lead_view.xml | 2 +- addons/crm/crm_opportunity_view.xml | 2 +- addons/project/project_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 0159141eb1c..58bbe7ccc76 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -309,7 +309,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index b720da13654..1e0834b7e07 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -267,7 +267,7 @@ - + From 772719e00fe0127d72b686b9c9ab6c7a842d3c4d Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Fri, 22 Jul 2011 15:30:00 +0530 Subject: [PATCH 03/14] [usability],tooptip on search button bzr revid: amb@tinyerp.com-20110722100000-736i3hxq1rlxq5oq --- addons/crm/crm_lead_view.xml | 4 ++-- addons/crm/crm_opportunity_view.xml | 4 ++-- addons/project/project_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 58bbe7ccc76..d3299060fcb 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -309,8 +309,8 @@ + name="current" help="Draft, Open and Pending Documents." + domain="[('state','in',('draft','open','pending'))]"/> diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index f8d5237161b..73d098fe4b5 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -281,9 +281,9 @@ + domain="[('state','in',('draft','open','pending'))]"/> diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 334e43ad1bd..6fb57817a3e 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -397,7 +397,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 1e0834b7e07..c3333b4145b 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -267,7 +267,7 @@ - + From 1b19585369b98087d5a7d5bb61702df9e1bd8848 Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Fri, 22 Jul 2011 18:15:02 +0530 Subject: [PATCH 04/14] [IMP]: removed domain in point of sale order line bzr revid: han@tinyerp.com-20110722124502-8otd72ebn4j6x5qi --- addons/point_of_sale/point_of_sale_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 09a5ff232f2..2d0b0167b69 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -269,6 +269,7 @@ form tree + [] From 76511fd3cf314009d08d9a265b883ff977b4cd6f Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Mon, 25 Jul 2011 14:44:54 +0530 Subject: [PATCH 05/14] [usability],improve tooltip on search button bzr revid: amb@tinyerp.com-20110725091454-mmcau026pyzze68f --- addons/crm/crm_lead_view.xml | 2 +- addons/crm/crm_opportunity_view.xml | 2 +- addons/project/project_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index d3299060fcb..e563fce39d7 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -309,7 +309,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index c3333b4145b..aae74d85cf3 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -267,7 +267,7 @@ - + From 44ab57643e4e27cac356936205941c61cddf5a08 Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Mon, 25 Jul 2011 15:21:30 +0530 Subject: [PATCH 06/14] [usability],improve tooltip on search button tasks/phases bzr revid: amb@tinyerp.com-20110725095130-ttzkwmd36p4k3cba --- addons/project/project_view.xml | 2 +- addons/project_long_term/project_long_term_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index c20d971c845..b4645e9eac8 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -397,7 +397,7 @@ - + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index aae74d85cf3..a7c0d26bc99 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -267,7 +267,7 @@ - + From bca6ad53a3518416e6e10f78296cc8bab71b449a Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Tue, 26 Jul 2011 16:29:01 +0530 Subject: [PATCH 07/14] [IMP]: point of sale modify domain bzr revid: han@tinyerp.com-20110726105901-n0ht0v53n1uxmome --- addons/point_of_sale/point_of_sale_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 2d0b0167b69..b0434718a8c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -105,7 +105,7 @@ pos.order form - [['date_order','>=',time.strftime('%Y-%m-%d')]] + [] Sales @@ -269,7 +269,7 @@ form tree - [] + [('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))] From caa3c07094a5250b18c7cd44f7f4708b4e08907c Mon Sep 17 00:00:00 2001 From: "RavishchanraMurari (Open ERP)" Date: Thu, 28 Jul 2011 11:41:56 +0530 Subject: [PATCH 08/14] email.addresss_id_repalce_by_user_email bzr revid: rmu@tinyerp.com-20110728061156-swmn5jz78zb3w4vd --- addons/base_action_rule/base_action_rule.py | 16 +++++++--------- addons/base_calendar/base_calendar.py | 8 ++++---- .../wizard/base_calendar_invite_attendee.py | 6 +++--- addons/crm/crm.py | 12 ++++-------- addons/crm/crm_action_rule.py | 4 ++-- addons/mail_gateway/mail_gateway.py | 4 ++-- addons/project/project_view.xml | 1 - addons/project/wizard/project_task_close.py | 4 ++-- addons/project_mailgate/project_mailgate.py | 2 +- .../project_scrum/wizard/project_scrum_email.py | 2 +- addons/survey/survey.py | 2 +- 11 files changed, 27 insertions(+), 34 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 80c1ab464f1..7494cb37903 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -277,10 +277,8 @@ the rule to mark CC(mail to any other person defined in actions)."), 'object_date': hasattr(obj, 'date') and obj.date or False, 'object_description': hasattr(obj, 'description') and obj.description or False, 'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/', - 'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and \ - obj.user_id.address_id and obj.user_id.address_id.email) or '/', - 'object_user_phone': hasattr(obj, 'user_id') and (obj.user_id and\ - obj.user_id.address_id and obj.user_id.address_id.phone) or '/', + 'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.user_email) or '/', + 'object_user_phone': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and obj.partner_address_id.phone) or '/', 'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/', 'partner_email': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and\ obj.partner_address_id.email) or '/', @@ -304,9 +302,9 @@ the rule to mark CC(mail to any other person defined in actions)."), body = self.format_mail(obj, body) if not emailfrom: - if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and\ - obj.user_id.address_id.email: - emailfrom = obj.user_id.address_id.email + if hasattr(obj, 'user_id') and obj.user_id and\ + obj.user_id.user_email: + emailfrom = obj.user_id.user_email name = '[%d] %s' % (obj.id, tools.ustr(obj.name)) emailfrom = tools.ustr(emailfrom) @@ -404,8 +402,8 @@ the rule to mark CC(mail to any other person defined in actions)."), emails = [] if hasattr(obj, 'user_id') and action.act_mail_to_user: - if obj.user_id and obj.user_id.address_id: - emails.append(obj.user_id.address_id.email) + if obj.user_id: + emails.append(obj.user_id.user_email) if action.act_mail_to_watchers: emails += (action.act_email_cc or '').split(',') diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 5f24b08884a..a128e18fcc1 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -245,7 +245,7 @@ class calendar_attendee(osv.osv): continue else: result[id][name] = self._get_address(attdata.sent_by_uid.name, \ - attdata.sent_by_uid.address_id.email) + attdata.sent_by_uid.user_email) if name == 'cn': if attdata.user_id: @@ -535,7 +535,7 @@ property or property parameter."), return {'value': {'email': ''}} usr_obj = self.pool.get('res.users') user = usr_obj.browse(cr, uid, user_id, *args) - return {'value': {'email': user.address_id.email, 'availability':user.availability}} + return {'value': {'email': user.user_email, 'availability':user.availability}} def do_tentative(self, cr, uid, ids, context=None, *args): """ Makes event invitation as Tentative @@ -889,9 +889,9 @@ From: """ % (alarm.name, alarm.trigger_date, alarm.description, \ alarm.user_id.name, alarm.user_id.signature) - mail_to = [alarm.user_id.address_id.email] + mail_to = [alarm.user_id.user_email] for att in alarm.attendee_ids: - mail_to.append(att.user_id.address_id.email) + mail_to.append(att.user_id.user_email) if mail_to: tools.email_send( tools.config.get('email_from', False), diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index 7d5b26026b5..a429db8e925 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -98,12 +98,12 @@ send an Email to Invited Person') user = user_obj.browse(cr, uid, user_id) res = { 'user_id': user_id, - 'email': user.address_id.email + 'email': user.user_email } res.update(ref) vals.append(res) - if user.address_id.email: - mail_to.append(user.address_id.email) + if user.user_email: + mail_to.append(user.user_email) elif type == 'external' and datas.get('email'): res = {'email': datas['email']} diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 0b1e8db7bbb..d64ef2ec97e 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -65,7 +65,7 @@ class crm_base(object): context = {} if not context.get('portal'): return False - return self.pool.get('res.users').browse(cr, uid, uid, context).address_id.id + return self.pool.get('res.partner.address').browse(cr, uid, uid, context) def _get_default_partner(self, cr, uid, context=None): """Gives id of partner for current user @@ -75,10 +75,8 @@ class crm_base(object): context = {} if not context.get('portal', False): return False - user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - if not user.address_id: - return False - return user.address_id.partner_id.id + part_id = self.pool.get('res.partner.address').browse(cr, uid, uid, context=context) + return part_id.partner_id def _get_default_email(self, cr, uid, context=None): """Gives default email address for current user @@ -87,9 +85,7 @@ class crm_base(object): if not context.get('portal', False): return False user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - if not user.address_id: - return False - return user.address_id.email + return user.user_email def _get_default_user(self, cr, uid, context=None): """Gives current user id diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index 6eb3de3c35f..31dcc0be56a 100644 --- a/addons/crm/crm_action_rule.py +++ b/addons/crm/crm_action_rule.py @@ -48,8 +48,8 @@ this if you want the rule to send an email to the partner."), def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from', False), context=None): body = self.format_mail(obj, body) if not emailfrom: - if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and obj.user_id.address_id.email: - emailfrom = obj.user_id.address_id.email + if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.user_email: + emailfrom = obj.user_id.user_email name = '[%d] %s' % (obj.id, tools.ustr(obj.name)) emailfrom = tools.ustr(emailfrom) diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index 4fa70484666..f4c45bf0ff8 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -164,8 +164,8 @@ class mailgate_thread(osv.osv): 'description': details or (hasattr(case, 'description') and case.description or False), 'email_to': email, 'email_from': email_from or \ - (hasattr(case, 'user_id') and case.user_id and case.user_id.address_id and \ - case.user_id.address_id.email), + (hasattr(case, 'user_id') and case.user_id and \ + case.user_id.user_email), 'email_cc': email_cc, 'email_bcc': email_bcc, 'partner_id': partner_id, diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 5cda5222e35..70eef194c2c 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -63,7 +63,6 @@ - diff --git a/addons/project/wizard/project_task_close.py b/addons/project/wizard/project_task_close.py index 010bba9e52b..627864820f6 100644 --- a/addons/project/wizard/project_task_close.py +++ b/addons/project/wizard/project_task_close.py @@ -84,8 +84,8 @@ class project_task_close(osv.osv_memory): elif data.manager_warn or data.partner_warn: project = task.project_id subject = _("Task '%s' Closed") % task.name - if task.user_id and task.user_id.address_id and task.user_id.address_id.email: - from_adr = task.user_id.address_id.email + if task.user_id and task.user_id.user_email: + from_adr = task.user_id.user_email signature = task.user_id.signature else: raise osv.except_osv(_('Error'), _("Couldn't send mail because your email address is not configured!")) diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 66eaa2e85fa..2325d533c03 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -103,7 +103,7 @@ class project_tasks(osv.osv): else: select = ids for task in self.browse(cr, uid, select, context=context): - user_email = (task.user_id and task.user_id.address_id and task.user_id.address_id.email) or False + user_email = (task.user_id and task.user_id.user_email) or False res += [(user_email, False, False, task.priority)] if isinstance(ids, (str, int, long)): return len(res) and res[0] or False diff --git a/addons/project_scrum/wizard/project_scrum_email.py b/addons/project_scrum/wizard/project_scrum_email.py index ae8ba092981..f2e8dd79446 100644 --- a/addons/project_scrum/wizard/project_scrum_email.py +++ b/addons/project_scrum/wizard/project_scrum_email.py @@ -82,7 +82,7 @@ class project_scrum_email(osv.osv_memory): email_from = tools.config.get('email_from', False) user = user_pool.browse(cr, uid, uid, context=context) - user_email = email_from or user.address_id.email + user_email = email_from or user.user_email body = "%s\n" %(data.message) body += "\n%s\n" %_('Tasks since yesterday') diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 74d15382670..bd27f313d82 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -741,7 +741,7 @@ class survey_request(osv.osv): if user_id: user_obj = self.pool.get('res.users') user = user_obj.browse(cr, uid, user_id, context=context) - return {'value': {'email': user.address_id.email}} + return {'value': {'email': user.user_email}} return {} survey_request() From ba6342174e4574c11aa273c9cdfa1e040d50f0b4 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 2 Aug 2011 15:08:11 +0200 Subject: [PATCH 09/14] add group implications bzr revid: rco@openerp.com-20110802130811-pkdmw43ufifz0tpj --- addons/account/security/account_security.xml | 3 ++- .../security/account_payment_security.xml | 3 +++ addons/auction/security/auction_security.xml | 9 +++++---- addons/crm/security/crm_security.xml | 12 +++++++----- addons/event/security/event_security.xml | 9 +++++---- addons/hr/security/hr_security.xml | 9 +++++---- addons/idea/security/idea_security.xml | 17 +++++++++-------- addons/lunch/security/lunch_security.xml | 15 ++++++++------- .../marketing/security/marketing_security.xml | 5 +++-- addons/mrp/security/mrp_security.xml | 7 ++++--- .../security/point_of_sale_security.xml | 8 +++++--- addons/portal/security/portal_security.xml | 9 +++++---- addons/project/security/project_security.xml | 9 +++++---- .../purchase/security/purchase_security.xml | 9 +++++---- .../security/purchase_tender.xml | 9 +++++---- addons/sale/security/sale_security.xml | 11 +++++++---- addons/stock/security/stock_security.xml | 7 ++++--- .../security/subcription_security.xml | 15 ++++++++------- addons/survey/security/survey_security.xml | 19 ++++++++++--------- 19 files changed, 105 insertions(+), 80 deletions(-) diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index 8a84ad47fc6..5c4c9a0a525 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -4,12 +4,13 @@ Accounting / Invoicing & Payments - Accounting / Accountant + Accounting / Manager + diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml index 872d9d02a92..4bae0c30ce6 100644 --- a/addons/account_payment/security/account_payment_security.xml +++ b/addons/account_payment/security/account_payment_security.xml @@ -5,6 +5,9 @@ Accounting / Payments + + + Payment Mode company rule diff --git a/addons/auction/security/auction_security.xml b/addons/auction/security/auction_security.xml index 1fc69bb314f..3caf93a2430 100644 --- a/addons/auction/security/auction_security.xml +++ b/addons/auction/security/auction_security.xml @@ -2,12 +2,13 @@ - - Auction / Manager - Auction / User + + Auction / Manager + + - \ No newline at end of file + diff --git a/addons/crm/security/crm_security.xml b/addons/crm/security/crm_security.xml index 78018a4031b..e063b9f41be 100644 --- a/addons/crm/security/crm_security.xml +++ b/addons/crm/security/crm_security.xml @@ -2,16 +2,18 @@ - - Sales / Manager + + Sales / User - All Leads - Sales / User + Sales / User - Own Leads Only + - - Sales / User - See All Leads + + Sales / Manager + diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml index 648662911d2..c3c70c94d93 100644 --- a/addons/event/security/event_security.xml +++ b/addons/event/security/event_security.xml @@ -2,14 +2,15 @@ - - Marketing / Manager - - Marketing / User + + Marketing / Manager + + + Sales / Manager diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index aba7d4b45e1..aadadd224e9 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -2,12 +2,13 @@ - - Human Resources / Manager - - Human Resources / Officer + + Human Resources / Manager + + + diff --git a/addons/idea/security/idea_security.xml b/addons/idea/security/idea_security.xml index 4b060c51e6c..344cbc64292 100644 --- a/addons/idea/security/idea_security.xml +++ b/addons/idea/security/idea_security.xml @@ -1,14 +1,15 @@ - + - - Tools / Manager - - - Tools / User - + + Tools / User + + + Tools / Manager + + - + diff --git a/addons/lunch/security/lunch_security.xml b/addons/lunch/security/lunch_security.xml index e042ac0c594..e84cdb41c0d 100644 --- a/addons/lunch/security/lunch_security.xml +++ b/addons/lunch/security/lunch_security.xml @@ -2,12 +2,13 @@ - - Tools / Manager - - - Tools / User - - + + Tools / User + + + Tools / Manager + + + diff --git a/addons/marketing/security/marketing_security.xml b/addons/marketing/security/marketing_security.xml index 06cf40772f4..344e562eb67 100644 --- a/addons/marketing/security/marketing_security.xml +++ b/addons/marketing/security/marketing_security.xml @@ -4,10 +4,11 @@ Marketing / User - + Marketing / Manager + - + diff --git a/addons/mrp/security/mrp_security.xml b/addons/mrp/security/mrp_security.xml index 1cc4c5cea9b..94f79769268 100644 --- a/addons/mrp/security/mrp_security.xml +++ b/addons/mrp/security/mrp_security.xml @@ -2,12 +2,13 @@ - - Manufacturing / Manager - Manufacturing / User + + Manufacturing / 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 9a90b4d4b6f..14c9e96df9e 100644 --- a/addons/point_of_sale/security/point_of_sale_security.xml +++ b/addons/point_of_sale/security/point_of_sale_security.xml @@ -2,11 +2,13 @@ - - Point of Sale / Manager - Point of Sale / User + + Point of Sale / Manager + + + diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml index 015a390cdae..4850cb7805b 100644 --- a/addons/portal/security/portal_security.xml +++ b/addons/portal/security/portal_security.xml @@ -1,13 +1,14 @@ - - Portal / Manager - Portal managers have access to the portal definitions, and can easily configure the users, access rights and menus of portal users. - Portal / Officer Portal officers can create new portal users with the portal wizard. + + Portal / Manager + Portal managers have access to the portal definitions, and can easily configure the users, access rights and menus of portal users. + + diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml index b51a5a9c89a..62f74f51d1b 100644 --- a/addons/project/security/project_security.xml +++ b/addons/project/security/project_security.xml @@ -2,14 +2,15 @@ - - Project / Manager - - Project / User + + Project / Manager + + + Sales / User diff --git a/addons/purchase/security/purchase_security.xml b/addons/purchase/security/purchase_security.xml index e1149c91466..a67c675b089 100644 --- a/addons/purchase/security/purchase_security.xml +++ b/addons/purchase/security/purchase_security.xml @@ -2,11 +2,12 @@ - - Purchase / Manager - - Purchase / User + Purchases / User + + + Purchases / Manager + diff --git a/addons/purchase_requisition/security/purchase_tender.xml b/addons/purchase_requisition/security/purchase_tender.xml index 595b71008ef..af8a1330e2d 100644 --- a/addons/purchase_requisition/security/purchase_tender.xml +++ b/addons/purchase_requisition/security/purchase_tender.xml @@ -2,14 +2,15 @@ - - Purchase Requisition / Manager - - Purchase Requisition / User + + Purchase Requisition / Manager + + + Purchase Requisition multi-company diff --git a/addons/sale/security/sale_security.xml b/addons/sale/security/sale_security.xml index dc7e2ce3776..ebe5b884537 100644 --- a/addons/sale/security/sale_security.xml +++ b/addons/sale/security/sale_security.xml @@ -2,16 +2,19 @@ - - Sales / Manager + + Sales / User - All Leads + Sales / User - Own Leads Only + - - Sales / User - All Leads + + Sales / Manager + diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml index 717486413c6..389d62e8ce0 100644 --- a/addons/stock/security/stock_security.xml +++ b/addons/stock/security/stock_security.xml @@ -2,12 +2,13 @@ - - Warehouse / Manager - Warehouse / User + + Warehouse / Manager + + diff --git a/addons/subscription/security/subcription_security.xml b/addons/subscription/security/subcription_security.xml index 70c648380d5..e84cdb41c0d 100644 --- a/addons/subscription/security/subcription_security.xml +++ b/addons/subscription/security/subcription_security.xml @@ -2,12 +2,13 @@ - - Tools / Manager - - - Tools / User - - + + Tools / User + + + Tools / Manager + + + diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml index e76f5bce1f5..7b6c43ed2bc 100644 --- a/addons/survey/security/survey_security.xml +++ b/addons/survey/security/survey_security.xml @@ -1,14 +1,15 @@ - - Tools / Manager - - - Tools / User - - - Survey / User - + + Tools / User + + + Tools / Manager + + + + Survey / User + From 690f42073dae1f6310a8b7fa75776bfa67f9ba64 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 2 Aug 2011 15:20:05 +0200 Subject: [PATCH 10/14] fixed implications between sales groups bzr revid: rco@openerp.com-20110802132005-9f30si9s6luo2qvk --- addons/crm/security/crm_security.xml | 12 ++++++------ addons/sale/security/sale_security.xml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/crm/security/crm_security.xml b/addons/crm/security/crm_security.xml index e063b9f41be..45b7ccb017e 100644 --- a/addons/crm/security/crm_security.xml +++ b/addons/crm/security/crm_security.xml @@ -2,18 +2,18 @@ - - Sales / User - All Leads - - Sales / User - Own Leads Only - + + + + Sales / User - All Leads + Sales / Manager - + diff --git a/addons/sale/security/sale_security.xml b/addons/sale/security/sale_security.xml index ebe5b884537..bed44a8d726 100644 --- a/addons/sale/security/sale_security.xml +++ b/addons/sale/security/sale_security.xml @@ -2,19 +2,19 @@ - - Sales / User - All Leads - - Sales / User - Own Leads Only - + + + + Sales / User - All Leads + Sales / Manager - + From 06ef024dfe05ea56dd701812cf4797d6de2ea53a Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 2 Aug 2011 15:50:30 +0200 Subject: [PATCH 11/14] [IMP] portal: remove other_group_ids, which is superseded by implied_ids bzr revid: rco@openerp.com-20110802135030-wh6nfwzfoy235baf --- addons/portal/portal.py | 25 +++++++++---------------- addons/portal/portal_view.xml | 23 ++++++++++------------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/addons/portal/portal.py b/addons/portal/portal.py index 78483d6a1f1..1c7f84c363a 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -37,10 +37,6 @@ class portal(osv.osv): 'group_id': fields.many2one('res.groups', required=True, ondelete='cascade', string='Group', help='The group extended by this portal'), - 'other_group_ids': fields.many2many('res.groups', - 'portal_group_rel', 'portal_id', 'group_id', - string='Other User Groups', - help="Those groups are assigned to the portal's users"), 'url': fields.char('URL', size=64, help="The url where portal users can connect to the server"), 'menu_action_id': fields.many2one('ir.actions.act_window', readonly=True, @@ -70,8 +66,8 @@ class portal(osv.osv): portal_id = super(portal, self).create(cr, uid, values, context) # assign menu action and widgets to users - if values.get('users') or values.get('other_group_ids') or values.get('menu_action_id'): - self._assign_menu_and_groups(cr, uid, [portal_id], context) + if values.get('users') or values.get('menu_action_id'): + self._assign_menu(cr, uid, [portal_id], context) if values.get('users') or values.get('widget_ids'): self._assign_widgets(cr, uid, [portal_id], context) @@ -83,8 +79,8 @@ class portal(osv.osv): super(portal, self).write(cr, uid, ids, values, context) # assign menu action and widgets to users - if values.get('users') or values.get('other_group_ids') or values.get('menu_action_id'): - self._assign_menu_and_groups(cr, uid, ids, context) + if values.get('users') or values.get('menu_action_id'): + self._assign_menu(cr, uid, ids, context) if values.get('users') or values.get('widget_ids'): self._assign_widgets(cr, uid, ids, context) @@ -117,18 +113,15 @@ class portal(osv.osv): return True - def _assign_menu_and_groups(self, cr, uid, ids, context=None): - """ assign portal menu and other groups to users of portals (ids) """ + def _assign_menu(self, cr, uid, ids, context=None): + """ assign portal menu to users of portals (ids) """ user_obj = self.pool.get('res.users') for p in self.browse(cr, uid, ids, context): - # user groups = portal group + other groups - group_ids = [p.group_id.id] + [g.id for g in p.other_group_ids] - user_values = {'groups_id': [(6, 0, group_ids)]} # user menu action = portal menu action if set in portal if p.menu_action_id: - user_values['menu_id'] = p.menu_action_id.id - user_ids = [u.id for u in p.users if u.id != 1] - user_obj.write(cr, uid, user_ids, user_values, context) + user_ids = [u.id for u in p.users if u.id != 1] + user_values = {'menu_id': p.menu_action_id.id} + user_obj.write(cr, uid, user_ids, user_values, context) def _assign_widgets(self, cr, uid, ids, context=None): """ assign portal widgets to users of portals (ids) """ diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml index d43c6115ad6..a6a780fdf16 100644 --- a/addons/portal/portal_view.xml +++ b/addons/portal/portal_view.xml @@ -43,10 +43,19 @@ the portal's users. - + + + + + + + + + + @@ -56,18 +65,6 @@ the portal's users.