From 45ddb1f0b747dde81553f75000feee75b13f8005 Mon Sep 17 00:00:00 2001 From: "Hardik Ansodariy (OpenERP)" Date: Thu, 18 Aug 2011 17:25:20 +0530 Subject: [PATCH 01/51] [IMP]: improved view and provide access right accordingly bzr revid: han@tinyerp.com-20110818115520-5hp5zoydw467jrwj --- addons/delivery/delivery.py | 2 +- addons/delivery/delivery_demo.xml | 1 + addons/delivery/delivery_view.xml | 8 +++----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py index d70af4b4d1e..55199a9aa19 100644 --- a/addons/delivery/delivery.py +++ b/addons/delivery/delivery.py @@ -71,7 +71,7 @@ class delivery_carrier(osv.osv): 'free_if_more_than': fields.boolean('Free If More Than'), 'amount': fields.float('Amount'), 'use_detailed_pricelist': fields.boolean('Use Detailed Pricelist'), - 'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Price List'), + 'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Advanced Pricing'), } _defaults = { diff --git a/addons/delivery/delivery_demo.xml b/addons/delivery/delivery_demo.xml index 4dfef0c105b..94666efb26c 100644 --- a/addons/delivery/delivery_demo.xml +++ b/addons/delivery/delivery_demo.xml @@ -17,6 +17,7 @@ Delivery by Poste + Delivery service diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 72f811632ce..4ade9b321a7 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -9,7 +9,6 @@ tree - @@ -22,10 +21,9 @@
- - + @@ -82,7 +80,7 @@ Define the delivery methods you are using and their pricing in order to reinvoice the delivery costs when you are doing invoicing based on delivery orders - + @@ -132,7 +130,7 @@ tree,form The delivery price list allows you to compute the cost and sales price of the delivery according to the weight of the products and other criteria. You can define several price lists for one delivery method, per country or a zone in a specific country defined by a postal code range. - + delivery.grid.line.form From cfffadc509baa237a913f92b35500979026f3391 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 30 Aug 2011 14:15:10 +0530 Subject: [PATCH 02/51] [Usability project_isses, renamed the field and changed the core relavend to it, assigned_to to user_id] bzr revid: tta@openerp.com-20110830084510-0zqh6akkptue5zet --- .../board_project_issue_view.xml | 4 ++-- addons/project_issue/project_issue.py | 22 +++++-------------- addons/project_issue/project_issue_view.xml | 19 ++++++++-------- .../report/project_issue_report.py | 6 ++--- .../report/project_issue_report_view.xml | 11 ++++------ .../project_issue_sheet.py | 4 ++-- .../project_issue_sheet_view.xml | 2 +- 7 files changed, 25 insertions(+), 43 deletions(-) diff --git a/addons/project_issue/board_project_issue_view.xml b/addons/project_issue/board_project_issue_view.xml index 3b6a6bcd0a3..6563e4a33b9 100644 --- a/addons/project_issue/board_project_issue_view.xml +++ b/addons/project_issue/board_project_issue_view.xml @@ -123,7 +123,7 @@ project.issue form tree,form - [('state','not in',('cancel','done')),'|',('assigned_to','=',uid),('user_id','=',uid)] + [('state','not in',('cancel','done')),'|',('user_id','=',uid)] @@ -142,7 +142,7 @@ project.issue.report form graph,tree,form, - [('state','=','open'),'|',('assigned_to','=',uid),('user_id','=',uid)] + [('state','=','open'),'|',('user_id','=',uid)] diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index b6032241a8e..733e2035f19 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -56,7 +56,7 @@ class project_issue(crm.crm_case, osv.osv): """ res = super(project_issue, self).case_open(cr, uid, ids, *args) - self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'assigned_to' : uid}) + self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'user_id' : uid}) for (id, name) in self.name_get(cr, uid, ids): message = _("Issue '%s' has been opened.") % name self.log(cr, uid, id, message) @@ -174,8 +174,7 @@ class project_issue(crm.crm_case, osv.osv): 'date_deadline': fields.date('Deadline'), 'section_id': fields.many2one('crm.case.section', 'Sales Team', \ select=True, help='Sales team to which Case belongs to.\ - Define Responsible user and Email account for mail gateway.'), - 'user_id': fields.related('project_id', 'user_id', type='many2one', relation='res.users', store=True, select=1, string='Responsible'), + Define Responsible user and Email account for mail gateway.'), 'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ domain="[('partner_id','=',partner_id)]"), @@ -208,7 +207,7 @@ class project_issue(crm.crm_case, osv.osv): multi='compute_day', type="float", store=True), 'day_close': fields.function(_compute_day, string='Days to Close', \ multi='compute_day', type="float", store=True), - 'assigned_to': fields.many2one('res.users', 'Assigned to', required=False, select=1), + 'user_id': fields.many2one('res.users', 'Assigned to', required=False, select=1), 'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \ multi='compute_day', type="float", store=True), 'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \ @@ -230,17 +229,6 @@ class project_issue(crm.crm_case, osv.osv): return user.context_project_id.id return False - def on_change_project(self, cr, uid, ids, project_id, context=None): - result = {} - - if project_id: - project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) - if project.user_id: - result['value'] = {'user_id' : project.user_id.id} - - return result - - _defaults = { 'active': 1, #'user_id': crm.crm_case._get_default_user, @@ -282,7 +270,7 @@ class project_issue(crm.crm_case, osv.osv): 'date': bug.date, 'project_id': bug.project_id.id, 'priority': bug.priority, - 'user_id': bug.assigned_to.id, + 'user_id': bug.user_id.id, 'planned_hours': 0.0, }) @@ -350,7 +338,7 @@ class project_issue(crm.crm_case, osv.osv): if not task_id: return {'value':{}} task = self.pool.get('project.task').browse(cr, uid, task_id, context=context) - return {'value':{'assigned_to': task.user_id.id,}} + return {'value':{'user_id': task.user_id.id,}} def case_escalate(self, cr, uid, ids, *args): """Escalates case to top level diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fcea96d6770..e486b850c47 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -53,10 +53,9 @@ - + - - + @@ -188,7 +187,7 @@