From af1df4d5cd44a176b1ea933c18963bd8b36f0db9 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 11 Sep 2012 14:09:19 +0530 Subject: [PATCH 01/79] [FIX]product:search method added for searching products by category bzr revid: kbh@tinyerp.com-20120911083919-cwenu6oum79oa7do --- addons/product/product.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/product/product.py b/addons/product/product.py index c9345a22103..ac62ef129c4 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -743,6 +743,14 @@ class product_product(osv.osv): else: return super(product_product, self).copy(cr, uid, id, default=default, context=context) + + def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): + if context is None: + context = {} + if context and context.get('search_default_categ_id', False): + args.append((('categ_id', 'child_of', context['search_default_categ_id']))) + return super(product_product, self).search(cr, uid, args, offset, limit, order, context, count) + product_product() class product_packaging(osv.osv): From 6fca7f4abef5e4a54b77de1ec49a2c351ca8f63e Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Tue, 11 Sep 2012 18:57:24 +0530 Subject: [PATCH 02/79] [IMP] improve the placeholder text bzr revid: rma@tinyerp.com-20120911132724-nc201qmgoicvknmt --- openerp/addons/base/res/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index a79610b7a18..6b8354214bf 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -216,7 +216,7 @@ - + From 573cad0c9f0447442cae68778d043dc0a79070e5 Mon Sep 17 00:00:00 2001 From: Amit Patel Date: Tue, 18 Sep 2012 16:55:03 +0530 Subject: [PATCH 03/79] [IMP]:demo and data for product category bzr revid: apa@tinyerp.com-20120918112503-q82c8ry6omoj8uyq --- addons/product/product_data.xml | 6 +++++- addons/product/product_demo.xml | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index 5ae76a87695..9808fa732e9 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -7,7 +7,11 @@ All products - + + + Saleable + + Unit diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 97d6e03205c..6676a79dfe6 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -9,11 +9,7 @@ - - - - Saleable - + Internal From c3a5df8eacd4a8c270bf096ec3bb45a30c9352bd Mon Sep 17 00:00:00 2001 From: Amit Patel Date: Tue, 18 Sep 2012 16:59:41 +0530 Subject: [PATCH 04/79] [IMP]:improved code bzr revid: apa@tinyerp.com-20120918112941-7k31spiybf37ulb1 --- addons/product/product_demo.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 6676a79dfe6..66b86fc7b63 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -19,27 +19,27 @@ Other Products - + Computers - + Services - + External Devices - + Accessories - + Components - + Softwares From a41714da567ea3bbda4442792780a6fcf948ae6e Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 19 Sep 2012 14:21:03 +0530 Subject: [PATCH 05/79] [IMP]User : Access rights in changed menu name bzr revid: hsa@tinyerp.com-20120919085103-mmen7f0vzqvmp9bx --- addons/event/security/event_security.xml | 2 +- addons/mail/security/mail_security.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml index f46bc5fff96..2cc749a1a40 100644 --- a/addons/event/security/event_security.xml +++ b/addons/event/security/event_security.xml @@ -3,7 +3,7 @@ - Event + Events Helps you manage your Events. 3 diff --git a/addons/mail/security/mail_security.xml b/addons/mail/security/mail_security.xml index a12314e6f25..1d6d8d90579 100644 --- a/addons/mail/security/mail_security.xml +++ b/addons/mail/security/mail_security.xml @@ -4,7 +4,7 @@ - Social and Sharing Tools + Home 26 From 808fc09e925245f5a936d96d9ee29987aee80536 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 19 Sep 2012 14:22:04 +0530 Subject: [PATCH 06/79] [IMP]User : Access rights in changed menu name bzr revid: hsa@tinyerp.com-20120919085204-2cqnwkprzbnfkf70 --- openerp/addons/base/module/module_data.xml | 4 ++-- openerp/addons/base/security/base_security.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/module/module_data.xml b/openerp/addons/base/module/module_data.xml index 15cbded05cd..6cc69835322 100644 --- a/openerp/addons/base/module/module_data.xml +++ b/openerp/addons/base/module/module_data.xml @@ -25,13 +25,13 @@ - Sales Management + Sales Helps you handle your quotations, sale orders and invoicing. 2 - Project Management + Project Helps you manage your projects and tasks by tracking them, generating plannings, etc... 3 diff --git a/openerp/addons/base/security/base_security.xml b/openerp/addons/base/security/base_security.xml index 8eb832ea618..3cb8f7044b2 100644 --- a/openerp/addons/base/security/base_security.xml +++ b/openerp/addons/base/security/base_security.xml @@ -11,7 +11,7 @@ Access Rights - Configuration + Settings From e9719348547c7c2cba2334411c4a153da1c1e340 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 19 Sep 2012 16:23:24 +0530 Subject: [PATCH 07/79] [IMP]MRP : Add Product Menu and BOM field is required bzr revid: hsa@tinyerp.com-20120919105324-uqh8z188rtl34bva --- addons/mrp/mrp.py | 3 ++- addons/mrp/mrp_view.xml | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index ae29ad324db..52459484a14 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -461,7 +461,8 @@ class mrp_production(osv.osv): 'date_start': fields.datetime('Start Date', select=True, readonly=True), 'date_finished': fields.datetime('End Date', select=True, readonly=True), - 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}), + 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}, + help="Bills of Materials allow you to define the list of required raw materials required to make a finished product."), 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]}, help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."), 'picking_id': fields.many2one('stock.picking', 'Picking List', readonly=True, ondelete="restrict", diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index d05893cf778..f202eab8ce9 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -13,7 +13,7 @@ parent="base.menu_mrp_root" sequence="1"/> - @@ -521,6 +521,10 @@ id="menu_mrp_bom_form_action" parent="menu_mrp_bom" sequence="10"/> + - + From 1650c991af4769695d68c4a143e200b15fe07d90 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 19 Sep 2012 18:20:59 +0530 Subject: [PATCH 08/79] [IMP]Product Form, set postion of fields and set label bzr revid: hsa@tinyerp.com-20120919125059-82uazhvyng025jwd --- addons/event_sale/event_sale_view.xml | 2 +- addons/hr_expense/hr_expense_view.xml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml index c39cff04bd9..52f935a0760 100644 --- a/addons/event_sale/event_sale_view.xml +++ b/addons/event_sale/event_sale_view.xml @@ -6,7 +6,7 @@ product.product - + diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 5389f88b885..248eb0a7d93 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -195,9 +195,10 @@ product.product - - - + + + From f46b934a7ae845b2327dc76be21102ba4578354b Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Wed, 19 Sep 2012 18:54:54 +0530 Subject: [PATCH 09/79] [IMP] removed same buttons from More button located at top bzr revid: bde@tinyerp.com-20120919132454-vic77ff22hjro39t --- .../voucher_payment_receipt_view.xml | 5 ++-- addons/event/event_view.xml | 2 +- addons/hr_contract/hr_contract_view.xml | 15 +++++----- addons/hr_evaluation/hr_evaluation_view.xml | 10 +++++-- addons/hr_payroll/hr_payroll_view.xml | 16 +++++----- .../hr_timesheet_sheet_view.xml | 10 +++++-- .../lunch/wizard/lunch_order_cancel_view.xml | 2 +- .../lunch/wizard/lunch_order_confirm_view.xml | 2 +- .../wizard/mrp_repair_make_invoice_view.xml | 3 +- addons/project/project_view.xml | 25 +++++----------- addons/project_issue/project_issue_view.xml | 13 ++++---- .../project_long_term_view.xml | 30 +++++++++---------- 12 files changed, 65 insertions(+), 68 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index c41ed6d5577..a05ae02183b 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -153,7 +153,7 @@ - + @@ -325,8 +325,7 @@ - - + diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index fd396053d5d..27367cca6e6 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -4,7 +4,7 @@ - + + hr.contract + form + tree,form + {'search_default_employee_id': [active_id], 'default_employee_id': active_id} + @@ -21,7 +20,7 @@ - - -
- - - -

- You must configure the etherpad through the menu Setting > Companies > Companies, in the configuration tab of your company.
-

-
+ + + + +
+

+ You must configure the etherpad through the menu Setting > Companies > Companies, in the configuration tab of your company. +

+
+
+ + + +
+
+
+
+
+ + +
+
+ Ñ +
+
+
+
+
+
+
+ From 4d65e16e60ac552474cb4b7037e14584544cc211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 24 Sep 2012 16:11:44 +0200 Subject: [PATCH 33/79] [FIX] calendar overflow bzr revid: fva@openerp.com-20120924141144-a5msie519hh9nl23 --- addons/web_calendar/static/src/css/web_calendar.css | 9 +++++++++ addons/web_calendar/static/src/js/calendar.js | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/addons/web_calendar/static/src/css/web_calendar.css b/addons/web_calendar/static/src/css/web_calendar.css index b7008a5bd91..52ea63e787e 100644 --- a/addons/web_calendar/static/src/css/web_calendar.css +++ b/addons/web_calendar/static/src/css/web_calendar.css @@ -1,5 +1,14 @@ +.oe_view_manager_view_calendar { + position: relative; +} .oe_calendar_table { + position: absolute; + left: 0px; + right: 0px; + top: 0px; border-top: 3px solid #eee; + width:100%; + overflow: hidden; } .oe_calendar { background-color:#eee; diff --git a/addons/web_calendar/static/src/js/calendar.js b/addons/web_calendar/static/src/js/calendar.js index c3a9a25745e..5eb966aa315 100644 --- a/addons/web_calendar/static/src/js/calendar.js +++ b/addons/web_calendar/static/src/js/calendar.js @@ -172,8 +172,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({ scheduler.init(this.$el.find('.oe_calendar')[0], null, this.mode || 'month'); - // Remove hard coded style attributes from dhtmlx scheduler - this.$el.find(".dhx_cal_navline div").removeAttr('style'); + scheduler.detachAllEvents(); scheduler.attachEvent('onEventAdded', this.do_create_event); @@ -184,12 +183,19 @@ instance.web_calendar.CalendarView = instance.web.View.extend({ scheduler.attachEvent('onViewChange', this.on_view_changed); this.refresh_scheduler(); + + // Remove hard coded style attributes from dhtmlx scheduler + this.$el.find(".dhx_cal_navline").removeAttr('style'); + instance.web.bus.on('resize',this,function(){ + self.$el.find(".dhx_cal_navline").removeAttr('style'); + }); }, on_view_changed: function(mode, date) { this.$el.find('.oe_calendar').removeClass('oe_cal_day oe_cal_week oe_cal_month').addClass('oe_cal_' + mode); if (!date.between(this.range_start, this.range_stop)) { this.update_range_dates(date); this.do_ranged_search(); + this.$el.find(".dhx_cal_navline div").removeAttr('style'); } this.ready.resolve(); }, From bd4802fd6e73a087a8b41241068c90b41a6baff9 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Mon, 24 Sep 2012 23:39:49 +0530 Subject: [PATCH 34/79] [ADD]: Add tips for users bzr revid: atp@tinyerp.com-20120924180949-dtnqnsowrw2hogcv --- addons/crm/crm_view.xml | 2 +- addons/hr/hr_view.xml | 1 + addons/mail/static/src/js/mail_followers.js | 2 ++ addons/mail/static/src/xml/mail_followers.xml | 5 +++++ addons/project/project_view.xml | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 373844a08af..63f709f1290 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -117,7 +117,7 @@
- +
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 5d4c2ae9d45..556411fdab4 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -44,6 +44,7 @@ + As Manager of this employee, you will automatically follow all human resource request of this employee diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index cf33bd64640..3527313a72c 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -23,9 +23,11 @@ openerp_mail_followers = function(session, mail) { template: 'mail.followers', init: function() { + this._super.apply(this, arguments); this.options.image = this.node.attrs.image || 'image_small'; this.options.title = this.node.attrs.title || 'Followers'; + this.options.context = this.node.attrs.context; this.ds_model = new session.web.DataSetSearch(this, this.view.model); this.ds_follow = new session.web.DataSetSearch(this, this.field.relation); }, diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 32ce34d48d1..7b51404825a 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -12,6 +12,11 @@
+ + +
+
+

diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 93d01a5619b..462f622fa03 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -153,7 +153,7 @@
- +
From 55315e418aa79c1d0cb0df9c074f34e86aa37787 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 25 Sep 2012 07:07:47 +0530 Subject: [PATCH 35/79] [FIX]: remove context from expense and set condition for null followers in issue bzr revid: atp@tinyerp.com-20120925013747-o09k9bfwg83l0a41 --- addons/hr_expense/hr_expense.py | 4 ++-- addons/project_issue/project_issue.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index a46f2250b5c..f8fa8d9caff 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -118,9 +118,9 @@ class hr_expense_expense(osv.osv): return {'value': {'department_id': department_id, 'company_id': company_id}} def expense_confirm(self, cr, uid, ids, *args): - for expense in self.browse(cr, uid, ids, context=context): + for expense in self.browse(cr, uid, ids): if expense.employee_id and expense.employee_id.parent_id and expense.employee_id.parent_id.user_id: - self.message_subscribe(cr, uid, [expense.id], [expense.employee_id.parent_id.user_id.id], context=context) + self.message_subscribe(cr, uid, [expense.id], [expense.employee_id.parent_id.user_id.id]) self.write(cr, uid, ids, { 'state':'confirm', 'date_confirm': time.strftime('%Y-%m-%d') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 805d29eb98d..5c9245de836 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -383,7 +383,7 @@ class project_issue(base_stage, osv.osv): obj_id = super(project_issue, self).create(cr, uid, vals, context=context) project_obj = self.pool.get("project.project") project_id = self.browse(cr, uid, obj_id, context=context).project_id - followers = [follower.id for follower in project_id.message_follower_ids] + followers = [follower.id for follower in project_id.message_follower_ids if project_id.message_follower_ids] self.message_subscribe(cr, uid, [obj_id], followers, context=context) self.create_send_note(cr, uid, [obj_id], context=context) return obj_id From f8df69e807d85aa9103e149ef534d96c9d32a955 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 25 Sep 2012 08:05:02 +0530 Subject: [PATCH 36/79] [FIX]: Fix id and None project_id problem bzr revid: atp@tinyerp.com-20120925023502-s114b6811pxm84kg --- addons/project_issue/project_issue.py | 5 +++-- addons/sale_crm/sale_crm.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 5c9245de836..18ab392dd79 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -383,8 +383,9 @@ class project_issue(base_stage, osv.osv): obj_id = super(project_issue, self).create(cr, uid, vals, context=context) project_obj = self.pool.get("project.project") project_id = self.browse(cr, uid, obj_id, context=context).project_id - followers = [follower.id for follower in project_id.message_follower_ids if project_id.message_follower_ids] - self.message_subscribe(cr, uid, [obj_id], followers, context=context) + if project_id: + followers = [follower.id for follower in project_id.message_follower_ids] + self.message_subscribe(cr, uid, [obj_id], followers, context=context) self.create_send_note(cr, uid, [obj_id], context=context) return obj_id diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py index b7bd064563d..d2c8358263e 100644 --- a/addons/sale_crm/sale_crm.py +++ b/addons/sale_crm/sale_crm.py @@ -35,7 +35,7 @@ class sale_order(osv.osv): section_id = self.browse(cr, uid, order, context=context).section_id if section_id: followers = [follow.id for follow in section_id.message_follower_ids] - self.message_subscribe(cr, uid, [order.id], followers, context=context) + self.message_subscribe(cr, uid, [order], followers, context=context) return order sale_order() From ff126c5013bbcca60754e2815c243aa6ae73aca6 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 25 Sep 2012 10:23:58 +0530 Subject: [PATCH 37/79] [FIX]: Add oe_grey class bzr revid: atp@tinyerp.com-20120925045358-ch8rp3gjw8w5o4d0 --- addons/hr/hr_view.xml | 2 +- addons/mail/static/src/xml/mail_followers.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 556411fdab4..9924b75acea 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -44,7 +44,7 @@ - As Manager of this employee, you will automatically follow all human resource request of this employee + As Manager of this employee, you will automatically follow all human resource request of this employee diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 7b51404825a..e8a6a2aa910 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -11,12 +11,12 @@
+
+ +
+
+
- - -
-
-

From c81bab9a8c63d7ae18a4147395c3580298fc2d40 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Tue, 25 Sep 2012 11:48:37 +0530 Subject: [PATCH 38/79] [IMP]put button in condition bzr revid: pna@tinyerp.com-20120925061837-sl090l2n1y8gzb0e --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 86b101acf30..63ef9d6723c 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -169,8 +169,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); //bounce effect on red button when click on statusbar. this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) { - var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'}); if((self.get("actual_mode") == "view")) { + var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'}); $button.effect('bounce', {distance:18, times: 5}, 150); e.stopPropagation(); } From 7e3367ccc551c81474dd94f7ad505e25ab81ddca Mon Sep 17 00:00:00 2001 From: Hardik Date: Tue, 25 Sep 2012 12:10:30 +0530 Subject: [PATCH 39/79] [IMP]MRP : Add context in product action bzr revid: hsa@tinyerp.com-20120925064030-ts2zed5vkznj9puj --- addons/mrp/mrp_view.xml | 5 ++--- addons/product/product_view.xml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 26f3b7fadc2..c003711ceb1 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -516,12 +516,11 @@ Products - ir.actions.act_window product.product form kanban,tree,form - - + {'search_default_filter_supply_method_produce' : 1} + diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index d04e6f17fe8..ea4308152c0 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -16,6 +16,7 @@ + From 2fd06a53de196ca2d85c6530962b34e14e833e06 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Tue, 25 Sep 2012 12:37:43 +0530 Subject: [PATCH 40/79] fix typo bzr revid: rgaopenerp-20120925070743-5wg90i03onym8826 --- addons/document/static/src/js/document.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js index 0a99fd4ef56..2dde2696c81 100644 --- a/addons/document/static/src/js/document.js +++ b/addons/document/static/src/js/document.js @@ -1,9 +1,9 @@ openerp.document = function (instance) { _t = instance.web._t; - instance.web.SidebarAttachement =instance.web.Sidebar.include({ + instance.web.Sidebar.include({ init : function(){ this._super.apply(this, arguments); - this.sections. splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), }); + this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), }); this.items['files'] = []; } }); From 325115166bf68b01a6ec79e95d8f1f5923679d44 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Tue, 25 Sep 2012 13:06:45 +0530 Subject: [PATCH 41/79] [IMP] account_voucher : made the o2m visible only if the o2m is not empty bzr revid: rpr@tinyerp.com-20120925073645-58cwpq600ua7ei3q --- addons/account_voucher/voucher_payment_receipt_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index c41ed6d5577..9d2b799f337 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -155,7 +155,7 @@ - + - + Date: Tue, 25 Sep 2012 14:19:49 +0530 Subject: [PATCH 42/79] [IMP] account_voucher : from invoice form the tab "payment information" tab visible bzr revid: rpr@tinyerp.com-20120925084949-7o3n24opjimhi7fk --- addons/account_voucher/account_voucher_pay_invoice.xml | 6 +++--- addons/account_voucher/voucher_payment_receipt_view.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account_voucher/account_voucher_pay_invoice.xml b/addons/account_voucher/account_voucher_pay_invoice.xml index 323be77f334..456c1b6fddc 100644 --- a/addons/account_voucher/account_voucher_pay_invoice.xml +++ b/addons/account_voucher/account_voucher_pay_invoice.xml @@ -8,9 +8,9 @@
- -
+ +
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 462f622fa03..45ba2f3cc38 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -153,7 +153,7 @@
- +
From d050d743ee8cd5b8ab62aafae8abc142702b7891 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Thu, 27 Sep 2012 00:14:45 +0530 Subject: [PATCH 62/79] [FIX]: override write method into hr module.. bzr revid: atp@tinyerp.com-20120926184445-3o03o0n4oxgprern --- addons/crm/crm_lead.py | 2 +- addons/hr_evaluation/hr_evaluation.py | 3 +++ addons/hr_expense/hr_expense.py | 6 ++++++ addons/hr_holidays/hr_holidays.py | 8 ++++++++ addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 3 +++ addons/project/project.py | 2 +- addons/project_issue/project_issue.py | 2 +- addons/sale_crm/sale_crm.py | 2 +- 8 files changed, 24 insertions(+), 4 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index db2ede3ab5e..118847d46b6 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -790,7 +790,7 @@ class crm_lead(base_stage, format_address, osv.osv): vals['probability'] = stage.probability for lead in self.browse(cr, uid, ids, context=context): if lead.section_id: - vals.update({'message_follower_ids': [(4, follower.id) for follower in lead.section_id.message_follower_ids]}) + vals['message_follower_ids'] = [(4, follower.id) for follower in lead.section_id.message_follower_ids] return super(crm_lead,self).write(cr, uid, ids, vals, context) # ---------------------------------------- diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index a81d1c9b9cb..61d506d220a 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -266,6 +266,9 @@ class hr_evaluation(osv.osv): return True def write(self, cr, uid, ids, vals, context=None): + for evalutation in self.browse(cr, uid, ids, context=context): + if evalutation.employee_id and evalutation.employee_id.parent_id and evalutation.employee_id.parent_id.user_id: + vals['message_follower_ids'] = [(4, evalutation.employee_id.parent_id.user_id.partner_id.id)] if 'date' in vals: new_vals = {'date_deadline': vals.get('date')} obj_hr_eval_iterview = self.pool.get('hr.evaluation.interview') diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 91dc44fed61..ae67a20e270 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -100,6 +100,12 @@ class hr_expense_expense(osv.osv): 'currency_id': _get_currency, } + def write(self, cr, uid, ids, vals, context=None): + for expense in self.browse(cr, uid, ids): + if expense.employee_id and expense.employee_id.parent_id.user_id: + vals['message_follower_ids'] = [(4, expense.employee_id.parent_id.user_id.partner_id.id)] + return super(hr_expense_expense, self).write(cr, uid, ids, vals, context=context) + def onchange_currency_id(self, cr, uid, ids, currency_id=False, company_id=False, context=None): res = {'value': {'journal_id': False}} journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase'), ('currency','=',currency_id), ('company_id', '=', company_id)], context=context) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 76d4e42818a..30ef776574f 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -307,6 +307,14 @@ class hr_holidays(osv.osv): self.holidays_confirm_notificate(cr, uid, ids, context=context) return self.write(cr, uid, ids, {'state':'confirm'}) + def write(self, cr, uid, ids, vals, context=None): + for holiday in self.browse(cr, uid, ids): + if holiday.employee_id and holiday.employee_id.parent_id.user_id: + vals['message_follower_ids'] = [(4, holiday.employee_id.parent_id.user_id.partner_id.id)] + return super(hr_holidays, self).write(cr, uid, ids, vals, context=context) + + + def holidays_refuse(self, cr, uid, ids, context=None): obj_emp = self.pool.get('hr.employee') ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)]) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 13c11cf72c7..49d50ea2552 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -252,6 +252,9 @@ class hr_timesheet_sheet(osv.osv): return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv) def write(self, cr, uid, ids, vals, *args, **argv): + for timesheet in self.browse(cr, uid, ids): + if timesheet.employee_id and timesheet.employee_id.parent_id.user_id: + vals['message_follower_ids'] = [(4, timesheet.employee_id.parent_id.user_id.partner_id.id)] if 'employee_id' in vals: new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False if not new_user_id: diff --git a/addons/project/project.py b/addons/project/project.py index 4276f9d7885..ebfa5902c35 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1116,7 +1116,7 @@ class task(base_stage, osv.osv): ids = [ids] for t in self.browse(cr, uid, ids, context=context): if t.project_id: - vals.update({'message_follower_ids': [(4, follower.id) for follower in t.project_id.message_follower_ids]}) + vals['message_follower_ids'] = [(4, follower.id) for follower in t.project_id.message_follower_ids] if vals and not 'kanban_state' in vals and 'stage_id' in vals: new_stage = vals.get('stage_id') diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index f9d48ae6036..15eb1ee5f7c 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -366,7 +366,7 @@ class project_issue(base_stage, osv.osv): vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S') for issue in self.browse(cr, uid, ids, context=context): if issue.project_id: - vals.update({'message_follower_ids': [(4, follower.id) for follower in issue.project_id.message_follower_ids]}) + vals['message_follower_ids'] = [(4, follower.id) for follower in issue.project_id.message_follower_ids] return super(project_issue, self).write(cr, uid, ids, vals, context) def onchange_task_id(self, cr, uid, ids, task_id, context=None): diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py index 7ed3db401c1..a0d680cbde5 100644 --- a/addons/sale_crm/sale_crm.py +++ b/addons/sale_crm/sale_crm.py @@ -41,7 +41,7 @@ class sale_order(osv.osv): def write(self, cr, uid, ids, vals, context=None): for order in self.browse(cr, uid, ids, context=context): if order.section_id: - vals.update({'message_follower_ids': [(4, follower.id) for follower in order.section_id.message_follower_ids]}) + vals['message_follower_ids'] = [(4, follower.id) for follower in order.section_id.message_follower_ids] return super(sale_order, self).write(cr, uid, ids, vals, context=context) sale_order() From 92ea964019a350fc1c2fac173bbc33aecee11bd3 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 26 Sep 2012 22:51:05 +0200 Subject: [PATCH 63/79] [FIX] invitation on meetings bzr revid: fp@openerp.com-20120926205105-6638lw5v70leui34 --- addons/base_calendar/base_calendar.py | 42 ++++++++++++++++++----- addons/base_calendar/crm_meeting.py | 30 +++++++++++++++- addons/base_calendar/crm_meeting_view.xml | 18 +++++----- 3 files changed, 73 insertions(+), 17 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 73811d5ba71..6176b2804f3 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1060,6 +1060,37 @@ rule or repeating pattern of time to exclude from the recurring rule."), 'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"), } + def create_attendees(self, cr, uid, ids, context): + att_obj = self.pool.get('calendar.attendee') + user_obj = self.pool.get('res.users') + current_user = user_obj.browse(cr, uid, uid, context=context) + for event in self.browse(cr, uid, ids, context): + attendees = {} + for att in event.attendee_ids: + attendees[att.partner_id.id] = True + new_attendees = [] + mail_to = [] + for partner in event.partner_ids: + if partner.id in attendees: + continue + att_id = self.pool.get('calendar.attendee').create(cr, uid, { + 'partner_id': partner.id, + 'user_id': partner.user_ids and partner.user_ids[0].id or False, + 'ref': self._name+','+str(event.id), + 'email': partner.email + }, context=context) + if partner.email: + mail_to.append(partner.email) + self.write(cr, uid, [event.id], { + 'attendee_ids': [(4, att_id)] + }, context=context) + new_attendees.append(att_id) + + if mail_to and current_user.email: + att_obj._send_mail(cr, uid, new_attendees, mail_to, + email_from = current_user.email) + return True + def default_organizer(self, cr, uid, context=None): user_pool = self.pool.get('res.users') user = user_pool.browse(cr, uid, uid, context=context) @@ -1366,6 +1397,8 @@ rule or repeating pattern of time to exclude from the recurring rule."), vals['vtimezone'] = vals['vtimezone'][40:] res = super(calendar_event, self).write(cr, uid, ids, vals, context=context) + if vals.get('partner_ids', False): + self.create_attendees(cr, uid, ids, context) if ('alarm_id' in vals or 'base_calendar_alarm_id' in vals)\ or ('date' in vals or 'duration' in vals or 'date_deadline' in vals): @@ -1489,17 +1522,10 @@ rule or repeating pattern of time to exclude from the recurring rule."), if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'): vals['vtimezone'] = vals['vtimezone'][40:] - #updated_vals = self.onchange_dates(cr, uid, [], - # vals.get('date', False), - # vals.get('duration', False), - # vals.get('date_deadline', False), - # vals.get('allday', False), - # context=context) - #vals.update(updated_vals.get('value', {})) - res = super(calendar_event, self).create(cr, uid, vals, context) alarm_obj = self.pool.get('res.alarm') alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context) + self.create_attendees(cr, uid, [res], context) return res def do_tentative(self, cr, uid, ids, context=None, *args): diff --git a/addons/base_calendar/crm_meeting.py b/addons/base_calendar/crm_meeting.py index 0ee23ed1d0f..b87114f3a66 100644 --- a/addons/base_calendar/crm_meeting.py +++ b/addons/base_calendar/crm_meeting.py @@ -71,6 +71,34 @@ class crm_meeting(base_state, osv.Model): default['attendee_ids'] = False return super(crm_meeting, self).copy(cr, uid, id, default, context) + def onchange_partner_ids(self, cr, uid, ids, value, context=None): + """ The basic purpose of this method is to check that destination partners + effectively have email addresses. Otherwise a warning is thrown. + :param value: value format: [[6, 0, [3, 4]]] + """ + res = {'value': {}} + if not value or not value[0] or not value[0][0] == 6: + return + res.update(self.check_partners_email(cr, uid, value[0][2], context=context)) + return res + + def check_partners_email(self, cr, uid, partner_ids, context=None): + """ Verify that selected partner_ids have an email_address defined. + Otherwise throw a warning. """ + partner_wo_email_lst = [] + for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context): + if not partner.email: + partner_wo_email_lst.append(partner) + if not partner_wo_email_lst: + return {} + warning_msg = _('The following contacts have no email address :') + for partner in partner_wo_email_lst: + warning_msg += '\n- %s' % (partner.name) + return {'warning': { + 'title': _('Email addresses not found'), + 'message': warning_msg, + } + } # ---------------------------------------- # OpenChatter # ---------------------------------------- @@ -80,7 +108,7 @@ class crm_meeting(base_state, osv.Model): return [('date','<=',time.strftime('%Y-%M-%D 23:59:59')), ('date_deadline','>=', time.strftime('%Y-%M-%D 00:00:00')), ('user_id','=',uid)] def case_get_note_msg_prefix(self, cr, uid, id, context=None): - return 'Meeting' + return _('Meeting') def case_open_send_note(self, cr, uid, ids, context=None): return self.message_post(cr, uid, ids, body=_("Meeting confirmed."), context=context) diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 4b165c1d495..2da18447820 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -80,7 +80,9 @@
@@ -88,11 +90,12 @@ -