From a4f119b3a234dfbd589bfad62cae72aeaf21922a Mon Sep 17 00:00:00 2001
From: Christophe Matthieu
Date: Fri, 16 Nov 2012 17:01:28 +0100
Subject: [PATCH 01/73] [IMP] mail follower: hide subtype list if they are only
one subtype. Unfollow if the user unfollow all subtype.
bzr revid: chm@openerp.com-20121116160128-ffga2ffy3ldmps4b
---
addons/mail/static/src/js/mail_followers.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 7bb019cde4f..4b82a3a920a 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -184,7 +184,6 @@ openerp_mail_followers = function(session, mail) {
/** Fetch subtypes, only if current user is follower */
fetch_subtypes: function () {
- var subtype_list_ul = this.$('.oe_subtype_list').empty();
if (! this.message_is_follower) return;
var context = new session.web.CompoundContext(this.build_context(), {});
this.ds_model.call('message_get_subscription_data', [[this.view.datarecord.id], context]).then(this.proxy('display_subtypes'));
@@ -195,11 +194,17 @@ openerp_mail_followers = function(session, mail) {
var self = this;
var subtype_list_ul = this.$('.oe_subtype_list');
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
+ var count = 0;
+ subtype_list_ul.empty().hide();
_(records).each(function (record, record_name) {
+ count++;
record.name = record_name;
record.followed = record.followed || undefined;
- $(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
+ $(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( subtype_list_ul );
});
+ if (count > 1) {
+ subtype_list_ul.show();
+ }
},
do_follow: function () {
@@ -227,7 +232,9 @@ openerp_mail_followers = function(session, mail) {
checklist.push(parseInt($(record).data('id')));
}
});
-
+ if (!checklist.length) {
+ return self.do_unfollow();
+ }
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], this.message_is_follower ? checklist : undefined, context])
.then(this.proxy('read_value'));
From 3fb3b9bf6b662832baef3439162f9d5c0843fd13 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 19 Nov 2012 15:03:10 +0530
Subject: [PATCH 02/73] [IMP] add subtype of crm lead
bzr revid: fka@tinyerp.com-20121119093310-jj3mn6vq2466bc6d
---
addons/crm/crm_data.xml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index f2bf56e34ac..31ad28e78a4 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -70,5 +70,25 @@
{'type':'lead'}
+
+
+ Convert to Opportunity
+ crm.lead
+
+
+
+ Stage Changed
+ crm.lead
+
+
+
+ Lost
+ crm.lead
+
+
+
+ Won
+ crm.lead
+
From 979ca89a861daf2bac06dfc2e3e720ed8e27e7a9 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 19 Nov 2012 15:12:34 +0530
Subject: [PATCH 03/73] [IMP] add subtype of Quotation / Sales Order
bzr revid: fka@tinyerp.com-20121119094234-610wmtg9fpyvoyrw
---
addons/sale/sale_data.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 3fe03966da2..89e1e7ed56c 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -43,5 +43,16 @@
This application lets you create and send quotations and process your sales orders; from delivery to invoicing.
If you need to manage your sales pipeline (leads, opportunities, phonecalls), the CRM application may be useful. Use the Settings menu to install it.
]]>
+
+
+
+ Quotation sent
+ sale.order
+
+
+
+ Sale Order Confirmed
+ sale.order
+
From 6bd82630309ec6f1502bb513a4fdf79a723f0142 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Mon, 19 Nov 2012 15:42:48 +0530
Subject: [PATCH 04/73] [IMP] change the location of comment in follower widget
bzr revid: rma@tinyerp.com-20121119101248-wlpx7x251gpyvhz9
---
addons/mail/static/src/xml/mail_followers.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml
index 3dec4ef1dd2..2e32f63c79e 100644
--- a/addons/mail/static/src/xml/mail_followers.xml
+++ b/addons/mail/static/src/xml/mail_followers.xml
@@ -12,11 +12,11 @@
Unfollow
Following
+
+
+
-
-
-
Followers
Invite others
From 8b9ceee890e351be9fe53adf9609711de18a688e Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Mon, 19 Nov 2012 16:18:28 +0530
Subject: [PATCH 05/73] [IMP] separate the followers and subtypes in follower
widget
bzr revid: rma@tinyerp.com-20121119104828-87cgl9eulhwpqogr
---
addons/mail/static/src/xml/mail_followers.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml
index 2e32f63c79e..480001357a3 100644
--- a/addons/mail/static/src/xml/mail_followers.xml
+++ b/addons/mail/static/src/xml/mail_followers.xml
@@ -17,6 +17,7 @@
+
Followers
Invite others
From 5c17ed60e6cdd6682b9b1bbe6b4b95722f59a578 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 19 Nov 2012 16:44:38 +0530
Subject: [PATCH 06/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121119111438-xobjmirj0wfq15pn
---
addons/crm/crm_data.xml | 20 --------------------
addons/crm/crm_lead.py | 8 ++++----
addons/crm/crm_lead_data.xml | 19 +++++++++++++++++++
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index 31ad28e78a4..f2bf56e34ac 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -70,25 +70,5 @@
{'type':'lead'}
-
-
- Convert to Opportunity
- crm.lead
-
-
-
- Stage Changed
- crm.lead
-
-
-
- Lost
- crm.lead
-
-
-
- Won
- crm.lead
-
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 547b25af27c..fe6de3e76ae 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -847,7 +847,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="crm.mt_lead_stage", context=context)
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
@@ -862,11 +862,11 @@ class crm_lead(base_stage, format_address, osv.osv):
def case_mark_lost_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been lost.")
- return self.message_post(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_lost", context=context)
def case_mark_won_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been won.")
- return self.message_post(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_won", context=context)
def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]
@@ -883,7 +883,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def convert_opportunity_send_note(self, cr, uid, lead, context=None):
message = _("Lead has been converted to an opportunity.")
- lead.message_post(body=message)
+ lead.message_post(body=message, subtype="crm.mt_lead_convert_to_opportunity")
return True
def onchange_state(self, cr, uid, ids, state_id, context=None):
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index f734a839ff4..7fbdb7eec54 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -154,5 +154,24 @@
+
+ Convert to Opportunity
+ crm.lead
+
+
+
+ Stage Changed
+ crm.lead
+
+
+
+ Lost
+ crm.lead
+
+
+
+ Won
+ crm.lead
+
From abe1c73f6341d1161e1a1673b8faef52e0c0bbfc Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 19 Nov 2012 17:12:46 +0530
Subject: [PATCH 07/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121119114246-z5edddr6xphphbq0
---
addons/sale/sale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index c1af024ad9c..d297534f1a2 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -679,7 +679,7 @@ class sale_order(osv.osv):
def confirm_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), subtype="sale.mt_order_confirmed", context=context)
def cancel_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
From 742ad1b56e5701c941c0eaded89b4dbce517b145 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 19 Nov 2012 18:44:11 +0530
Subject: [PATCH 08/73] [IMP] add subtype in sales team
bzr revid: fka@tinyerp.com-20121119131411-64g1l1mu9y0zrzij
---
addons/crm/crm_lead_data.xml | 25 +++++++++++++++++++
addons/crm/crm_view.xml | 2 +-
.../hr_timesheet_invoice.py | 4 +--
.../hr_timesheet_invoice_data.xml | 22 +++++++++++++++-
addons/sale/sale_data.xml | 10 ++++++++
5 files changed, 59 insertions(+), 4 deletions(-)
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 7fbdb7eec54..8fc91ea8ea5 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -173,5 +173,30 @@
Won
crm.lead
+
+
+ Leads Created
+ crm.case.section
+
+
+
+ Leads to Opportunity
+ crm.case.section
+
+
+
+ Leads Stage Changed
+ crm.case.section
+
+
+
+ Opportunity Lost
+ crm.case.section
+
+
+
+ Opportunity Won
+ crm.case.section
+
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 99d3752529e..6fc40979fbb 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -131,7 +131,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index a24208d6ce0..679455e3864 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -107,13 +107,13 @@ class account_analytic_account(osv.osv):
def set_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'open'}, context=context)
message = _("Contract has been opened.")
- self.message_post(cr, uid, ids, body=message, context=context)
+ self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renewed", context=context)
return True
def set_pending(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'pending'}, context=context)
message = _("Contract has been set as pending.")
- self.message_post(cr, uid, ids, body=message, context=context)
+ self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renew", context=context)
return True
account_analytic_account()
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index e82b6fd19e8..410f59c6172 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -24,13 +24,33 @@
- finished
+ Contract Finished
+ account.analytic.account
+
+
+ Contract Renewed
+ account.analytic.account
+
+
+ Contract to Renew
account.analytic.account
canceled
account.analytic.account
+
+ Contract to Renew
+ crm.case.section
+
+
+ Contract Renewed
+ crm.case.section
+
+
+ Contract Finished
+ crm.case.section
+
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 89e1e7ed56c..b5a1ab4cd81 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -54,5 +54,15 @@
Sale Order Confirmed
sale.order
+
+
+ Quotation sent
+ crm.case.section
+
+
+
+ Sale Order Confirmed
+ crm.case.section
+
From b506f9689739791e0e080a271fb9a3a514adf8a2 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 20 Nov 2012 11:41:16 +0530
Subject: [PATCH 09/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121120061116-gpkamw4o34wn4ful
---
addons/crm/crm_lead_data.xml | 7 +++++++
.../hr_timesheet_invoice_data.xml | 11 +++++++----
addons/sale/sale_data.xml | 2 ++
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 8fc91ea8ea5..e2f1c307bfb 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -157,16 +157,19 @@
Convert to Opportunity
crm.lead
+
Stage Changed
crm.lead
+
Lost
crm.lead
+
@@ -177,21 +180,25 @@
Leads Created
crm.case.section
+
Leads to Opportunity
crm.case.section
+
Leads Stage Changed
crm.case.section
+
Opportunity Lost
crm.case.section
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index 410f59c6172..6d0a6797281 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -42,14 +42,17 @@
Contract to Renew
crm.case.section
-
-
- Contract Renewed
- crm.case.section
+
Contract Finished
crm.case.section
+
+
+
+ Contract Renewed
+ crm.case.section
+
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index b5a1ab4cd81..b93701baaf0 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -58,11 +58,13 @@
Quotation sent
crm.case.section
+
Sale Order Confirmed
crm.case.section
+
From 4f14cb1dae0563985ec635ed638cc4d6e433007a Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 12:09:39 +0530
Subject: [PATCH 10/73] [Add]hr_holidays:subtype added for leaves
bzr revid: kbh@tinyerp.com-20121120063939-nn4bkjdpagt2uhit
---
addons/hr_holidays/hr_holidays_data.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml
index 5af0c60fc44..fe288169fd3 100644
--- a/addons/hr_holidays/hr_holidays_data.xml
+++ b/addons/hr_holidays/hr_holidays_data.xml
@@ -44,5 +44,19 @@
True
brown
+
+
+
+ To Approve
+
+
+
+ Approved
+
+
+
+ Refused
+
+
From fd598ba6fff1d9903f2bad98e7166c94c0fce6c5 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 12:47:15 +0530
Subject: [PATCH 11/73] [IMP] add the subtypes in project tasks
bzr revid: rma@tinyerp.com-20121120071715-ap0xs1aw8sfx66q6
---
addons/project/project.py | 17 ++++++++++++++---
addons/project/project_data.xml | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 9c28fadeab9..ece0daae623 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1109,11 +1109,13 @@ class task(base_stage, osv.osv):
def set_kanban_state_normal(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
- return False
+ self.case_block_send_note(cr, uid, ids, context=context)
+ return True
def set_kanban_state_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
- return False
+ self.case_open_send_note(cr, uid, ids, context=context)
+ return True
def _store_history(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
@@ -1295,8 +1297,17 @@ class task(base_stage, osv.osv):
context=context)
def create_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task has been created."), context=context)
+ return self.message_post(cr, uid, ids, body=_("Task has been created."), subtype="project.mt_task_new", context=context)
+ def case_open_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Task has been started."), subtype="project.mt_task_started", context=context)
+
+ def case_close_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Task has been done."), subtype="project.mt_task_closed", context=context)
+
+ def case_block_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Task has been blocked."), subtype="project.mt_task_blocked", context=context)
+
def case_draft_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_('Task has been set as draft.'), context=context)
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index 08981bd126a..de4cd53a006 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -104,20 +104,32 @@
- New
+ Task created
project.task
+
- Closed
+ Done
project.task
+
+ Task Started
+ project.task
+
+
+ Tasks Blocked
+ project.task
+
+
Canceled
project.task
+
Stage Changed
project.task
+
From a56728dbc7338a2edc9f8a44401146087ac8f59c Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 12:49:11 +0530
Subject: [PATCH 12/73] [Add]hr_holidays:improved code of subtype
bzr revid: kbh@tinyerp.com-20121120071911-z6saaldgglcr1bz2
---
addons/hr_holidays/hr_holidays.py | 6 +++---
addons/hr_holidays/hr_holidays_data.xml | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 92b1d57ce15..ebba92f814c 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -431,7 +431,7 @@ class hr_holidays(osv.osv):
def holidays_confirm_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_post(cr, uid, [obj.id],
- _("Request submitted, waiting for validation by the manager."), context=context)
+ _("Request submitted, waiting for validation by the manager."), subtype="hr_holidays.mt_approve", context=context)
def holidays_first_validate_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
@@ -445,12 +445,12 @@ class hr_holidays(osv.osv):
_("Request validated."), context=context)
else:
self.message_post(cr, uid, [obj.id],
- _("The request has been approved."), context=context)
+ _("The request has been approved."), subtype="hr_holidays.mt_approved", context=context)
def holidays_refuse_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_post(cr, uid, [obj.id],
- _("Request refused"), context=context)
+ _("Request refused"), subtype="hr_holidays.mt_refused", context=context)
class resource_calendar_leaves(osv.osv):
diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml
index fe288169fd3..ad15f170e56 100644
--- a/addons/hr_holidays/hr_holidays_data.xml
+++ b/addons/hr_holidays/hr_holidays_data.xml
@@ -48,14 +48,20 @@
To Approve
+ hr.holidays
+
Approved
+ hr.holidays
+
Refused
+ hr.holidays
+
From f06c059fb64ea36e78c9cdb9e0ed79c264fd3031 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 13:01:38 +0530
Subject: [PATCH 13/73] [IMP] chnage the help string in project tasks
bzr revid: rma@tinyerp.com-20121120073138-ql9dht1do3w3lucx
---
addons/mail/data/mail_data.xml | 1 +
addons/project/project_view.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index 9b91c519348..f48984c46b4 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -29,6 +29,7 @@
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index e7f12ff3797..a913ed22adc 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -152,7 +152,7 @@
-
+
From 81e891f34ee9a43d093d009fb3835516cfb43167 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 20 Nov 2012 13:03:50 +0530
Subject: [PATCH 14/73] [IMP] add subtype in purchase
bzr revid: fka@tinyerp.com-20121120073350-i79t54g8p7pqzk05
---
addons/purchase/purchase.py | 2 +-
addons/purchase/purchase_data.xml | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 5bb38316604..8936d622507 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -787,7 +787,7 @@ class purchase_order(osv.osv):
def confirm_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to a Purchase Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Quotation for %s converted to a Purchase Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), subtype="purchase.mt_rfq_confirmed", context=context)
def shipment_send_note(self, cr, uid, ids, picking_id, context=None):
for order in self.browse(cr, uid, ids, context=context):
diff --git a/addons/purchase/purchase_data.xml b/addons/purchase/purchase_data.xml
index fa701c1f179..7a56e0dc95f 100644
--- a/addons/purchase/purchase_data.xml
+++ b/addons/purchase/purchase_data.xml
@@ -49,5 +49,16 @@
model="ir.values"
name="set"/>
+
+ RFQ Confirmed
+ purchase.order
+
+
+
+
+ RFQ Approved
+ purchase.order
+
+
From a1cd2de42a386a71c087568ae9f538240128215a Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 13:36:20 +0530
Subject: [PATCH 15/73] [Add]hr_expense:subtypeadded for expense
bzr revid: kbh@tinyerp.com-20121120080620-s8r0ery17ochs0pz
---
addons/hr_expense/hr_expense.py | 18 ++++++++++++++++++
addons/hr_expense/hr_expense_data.xml | 21 ++++++++++++++++++++-
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index ccb8af68e21..dea1f558b0f 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -127,6 +127,7 @@ class hr_expense_expense(osv.osv):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
+ self.expense_approve_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
@@ -134,6 +135,7 @@ class hr_expense_expense(osv.osv):
return True
def expense_accept(self, cr, uid, ids, *args):
+ self.expense_approved_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -142,6 +144,7 @@ class hr_expense_expense(osv.osv):
return True
def expense_canceled(self, cr, uid, ids, *args):
+ self.expense_cancel_notificate(cr, uid, ids)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
@@ -234,6 +237,21 @@ class hr_expense_expense(osv.osv):
}
return result
+ def expense_approve_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids, context=context):
+ self.message_post(cr, uid, [obj.id],
+ _("Request waiting for approved"), subtype="hr_expense_expense.mt_expense_approve", context=context)
+
+ def expense_approved_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids, context=context):
+ self.message_post(cr, uid, [obj.id],
+ _("Request approved"), subtype="hr_expense_expense.mt_expense_approved", context=context)
+
+ def expense_cancel_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids, context=context):
+ self.message_post(cr, uid, [obj.id],
+ _("Request cancelled"), subtype="hr_expense_expense.mt_expense_refused", context=context)
+
hr_expense_expense()
class product_product(osv.osv):
diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml
index f54156ac5ec..b388757a963 100644
--- a/addons/hr_expense/hr_expense_data.xml
+++ b/addons/hr_expense/hr_expense_data.xml
@@ -1,6 +1,6 @@
-
+
mail.group
@@ -17,5 +17,24 @@
Expenses
+
+
+
+ To Approve
+ hr.expense.expense
+
+
+
+
+ Approved
+ hr.expense.expense
+
+
+
+
+ Refused
+ hr.expense.expense
+
+
From 2a3c631f865998e4b6d9b2e7ab8444f0b32fa7a9 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 14:16:05 +0530
Subject: [PATCH 16/73] [Add]hr_recruitement:subtypeadded for appicants
bzr revid: kbh@tinyerp.com-20121120084605-ddhshc2szgrj3pyu
---
addons/hr_expense/hr_expense_data.xml | 2 +-
addons/hr_recruitment/hr_recruitment.py | 6 +++---
addons/hr_recruitment/hr_recruitment_data.xml | 12 ++++++++++++
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml
index b388757a963..01b839582e3 100644
--- a/addons/hr_expense/hr_expense_data.xml
+++ b/addons/hr_expense/hr_expense_data.xml
@@ -1,6 +1,6 @@
-
+
mail.group
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 155f20daf4d..1d076b25ed3 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -472,7 +472,7 @@ class hr_applicant(base_stage, osv.Model):
""" Override of the (void) default notification method. """
if not stage_id: return True
stage_name = self.pool.get('hr.recruitment.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), context=context)
+ return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), subtype="hr_recruitment.mt_stage_changed", context=context)
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Applicant'
@@ -492,12 +492,12 @@ class hr_applicant(base_stage, osv.Model):
self.message_post(cr, uid, [applicant.id], body=message, context=context)
else:
message = _("Applicant has been hired.")
- self.message_post(cr, uid, [applicant.id], body=message, context=context)
+ self.message_post(cr, uid, [applicant.id], body=message, subtype="hr_recruitment.mt_applicant_hired", context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
msg = 'Applicant refused.'
- return self.message_post(cr, uid, ids, body=msg, context=context)
+ return self.message_post(cr, uid, ids, body=msg, subtype="hr_recruitment.mt_applicant_refused",context=context)
def case_reset_send_note(self, cr, uid, ids, context=None):
message =_("Applicant has been set as new.")
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index adaeed81205..e7d060d6ea9 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -470,5 +470,17 @@
New Applicant
hr.job
+
+ Stage changed
+ hr.applicant
+
+
+ Applicant Hired
+ hr.applicant
+
+
+ Applicant Refused
+ hr.applicant
+
From aa85a5d42afb20f088756497bebc8494fbe5135f Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 14:17:29 +0530
Subject: [PATCH 17/73] [Add]hr_recruitement:defaut false added
bzr revid: kbh@tinyerp.com-20121120084729-1f8gsjt89awexe6y
---
addons/hr_recruitment/hr_recruitment_data.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index e7d060d6ea9..5afd2cd1cca 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -473,14 +473,17 @@
Stage changed
hr.applicant
+
Applicant Hired
hr.applicant
+
Applicant Refused
hr.applicant
+
From 0dbf8e7d78cdeecfcd954c8a737cef988f69025e Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 20 Nov 2012 14:36:57 +0530
Subject: [PATCH 18/73] [IMP] add subtype in account
bzr revid: fka@tinyerp.com-20121120090657-2dhw9kew0425bjjj
---
addons/account/account_invoice.py | 2 +-
addons/account/data/account_data.xml | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 3e86c4963b7..7579191b11f 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -1060,7 +1060,7 @@ class account_invoice(osv.osv):
if obj_inv.type in ('out_invoice', 'out_refund'):
ctx = self.get_log_context(cr, uid, context=ctx)
message = _("Invoice '%s' is validated.") % name
- self.message_post(cr, uid, [inv_id], body=message, context=context)
+ self.message_post(cr, uid, [inv_id], body=message, subtype="account.mt_invoice_validated", context=context)
return True
def action_cancel(self, cr, uid, ids, *args):
diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index dd27cfbab4e..2dfef225d70 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -563,11 +563,16 @@
- created
+ Created
account.invoice
+
+ Validated
+ account.invoice
+
+
- paid
+ Paid
account.invoice
From 194ae10812613da58e81f4f585b46fec09641b9d Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 14:45:03 +0530
Subject: [PATCH 19/73] [Add]hr:subtype added for job position
bzr revid: kbh@tinyerp.com-20121120091503-h6vqpwze37a59q18
---
addons/hr/hr_data.xml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml
index 25c882f2201..029b77fd999 100644
--- a/addons/hr/hr_data.xml
+++ b/addons/hr/hr_data.xml
@@ -18,5 +18,26 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp
+
+ New Applicant
+ hr.job
+
+
+
+ Stage changed
+ hr.job
+
+
+
+ Applicant Hired
+ hr.job
+
+
+
+ Applicant Refused
+ hr.job
+
+
+
From da5eb4055ff86eb988ec4c5303503556d89bbea4 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Tue, 20 Nov 2012 14:48:10 +0530
Subject: [PATCH 20/73] [REM]hr_expense:remove code of expense
bzr revid: kbh@tinyerp.com-20121120091810-mgg9y239j8kbindi
---
addons/hr_expense/hr_expense.py | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index dea1f558b0f..ccb8af68e21 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -127,7 +127,6 @@ class hr_expense_expense(osv.osv):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
- self.expense_approve_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
@@ -135,7 +134,6 @@ class hr_expense_expense(osv.osv):
return True
def expense_accept(self, cr, uid, ids, *args):
- self.expense_approved_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -144,7 +142,6 @@ class hr_expense_expense(osv.osv):
return True
def expense_canceled(self, cr, uid, ids, *args):
- self.expense_cancel_notificate(cr, uid, ids)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
@@ -237,21 +234,6 @@ class hr_expense_expense(osv.osv):
}
return result
- def expense_approve_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id],
- _("Request waiting for approved"), subtype="hr_expense_expense.mt_expense_approve", context=context)
-
- def expense_approved_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id],
- _("Request approved"), subtype="hr_expense_expense.mt_expense_approved", context=context)
-
- def expense_cancel_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id],
- _("Request cancelled"), subtype="hr_expense_expense.mt_expense_refused", context=context)
-
hr_expense_expense()
class product_product(osv.osv):
From f8294e75dd2412c4165b05e810e67b0718885707 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 15:14:54 +0530
Subject: [PATCH 21/73] [IMP] add the subtype in project issues
bzr revid: rma@tinyerp.com-20121120094454-qoxpifbmt5pfiuyj
---
addons/project_issue/project_issue_data.xml | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index c1460167097..e739a68c342 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -45,11 +45,11 @@ Access all issues from the top Project menu, and access the issues of a specific
- New
+ Issue created
project.issue
- Closed
+ Issue closed
project.issue
@@ -60,6 +60,13 @@ Access all issues from the top Project menu, and access the issues of a specific
Stage Changed
project.issue
-
+
+ Issue started
+ project.issue
+
+
+ Issue Blocked
+ project.issue
+
From b29f32cd5de65de08bb331bf69bbfd7d35cfb14b Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 15:43:06 +0530
Subject: [PATCH 22/73] [IMP] add the subtype in project
bzr revid: rma@tinyerp.com-20121120101306-nkk46y92qcs37n9c
---
addons/project/project_data.xml | 23 ++++++++++++++++++---
addons/project_issue/project_issue_data.xml | 23 ++++++++++++++++++---
2 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index de4cd53a006..1afcf5c938a 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -102,14 +102,31 @@
Stage Changed
project.project
-
+
+ Task Created
+ project.project
+
+
+
+ Task Done
+ project.project
+
+
+ Task Started
+ project.project
+
+
+ Tasks Blocked
+ project.project
+
+
- Task created
+ Task Created
project.task
- Done
+ Task Done
project.task
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index e739a68c342..ac2295b6b65 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -45,11 +45,11 @@ Access all issues from the top Project menu, and access the issues of a specific
- Issue created
+ Issue Created
project.issue
- Issue closed
+ Issue Closed
project.issue
@@ -61,12 +61,29 @@ Access all issues from the top Project menu, and access the issues of a specific
project.issue
- Issue started
+ Issue Started
project.issue
Issue Blocked
project.issue
+
+
+ Issue Created
+ project.project
+
+
+ Issue Closed
+ project.project
+
+
+ Issue Started
+ project.project
+
+
+ Issue Blocked
+ project.project
+
From cf50a968b6f0142a30eead3b992ec2df24b97fb9 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 16:15:56 +0530
Subject: [PATCH 23/73] [IMP] change the subtype in project issue
bzr revid: rma@tinyerp.com-20121120104556-hta7g7z27aa9jgl9
---
addons/project/project.py | 4 ++--
addons/project_issue/project_issue_data.xml | 11 ++---------
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index ece0daae623..47a4ac9d724 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1105,16 +1105,16 @@ class task(base_stage, osv.osv):
def set_kanban_state_blocked(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
+ self.case_block_send_note(cr, uid, ids, context=context)
return False
def set_kanban_state_normal(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
- self.case_block_send_note(cr, uid, ids, context=context)
+ self.case_open_send_note(cr, uid, ids, context=context)
return True
def set_kanban_state_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
- self.case_open_send_note(cr, uid, ids, context=context)
return True
def _store_history(self, cr, uid, ids, context=None):
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index ac2295b6b65..77d4bff648a 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -60,15 +60,7 @@ Access all issues from the top Project menu, and access the issues of a specific
Stage Changed
project.issue
-
- Issue Started
- project.issue
-
-
- Issue Blocked
- project.issue
-
-
+
Issue Created
project.project
@@ -84,6 +76,7 @@ Access all issues from the top Project menu, and access the issues of a specific
Issue Blocked
project.project
+
From a12d901e9c432aefa3f421600bf7c7830b59cce5 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 20 Nov 2012 17:35:03 +0530
Subject: [PATCH 24/73] [IMP] arrenge subtype
bzr revid: fka@tinyerp.com-20121120120503-xl0wucde6ve7fnq3
---
addons/mail/static/src/js/mail_followers.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 7bb019cde4f..fbcde0c83b3 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -193,11 +193,16 @@ openerp_mail_followers = function(session, mail) {
/** Display subtypes: {'name': default, followed} */
display_subtypes:function (data) {
var self = this;
+ var subtype = [];
var subtype_list_ul = this.$('.oe_subtype_list');
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;
+ subtype.push(record);
+ })
+ subtype.sort(function(a,b){return a.id - b.id});
+ _(subtype).each(function (record) {
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
});
},
From b22ca1096c18f765d4970f8e41064cc1edfd4729 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 20 Nov 2012 18:04:48 +0530
Subject: [PATCH 25/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121120123448-tke4jtzpwje1dlne
---
.../hr_timesheet_invoice/hr_timesheet_invoice_data.xml | 10 +++++-----
addons/sale/sale_data.xml | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index 6d0a6797281..fc083300fed 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -23,6 +23,10 @@
+
+ Contract to Renew
+ account.analytic.account
+
Contract Finished
account.analytic.account
@@ -31,12 +35,8 @@
Contract Renewed
account.analytic.account
-
- Contract to Renew
- account.analytic.account
-
- canceled
+ Canceled
account.analytic.account
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index b93701baaf0..7d03e227e7f 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -55,7 +55,7 @@
sale.order
-
+
Quotation sent
crm.case.section
From 78a4f3eab23a23eebd3fb5abc85fa14f9f59bb5c Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Tue, 20 Nov 2012 18:05:13 +0530
Subject: [PATCH 26/73] [IMP] add the state chnage in project issue
bzr revid: rma@tinyerp.com-20121120123513-or712ebsxk5ao2rq
---
addons/project_issue/project_issue.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 90640363906..5f53e1db496 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -387,6 +387,10 @@ class project_issue(base_stage, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
logged_fields = ['stage_id', 'state', 'message_ids']
+ if 'stage_id' in vals:
+ for t in self.browse(cr, uid, ids, context=context):
+ new_stage = vals.get('stage_id')
+ self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
From 17ecd10a35054d97b3d81b01764cc398bd55e680 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 11:09:54 +0530
Subject: [PATCH 27/73] [ADD/IMP]hr_expense:added method for message in expense
bzr revid: kbh@tinyerp.com-20121121053954-6japxu5y7tjilw9y
---
addons/hr_expense/hr_expense.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index ccb8af68e21..949bfb2caa8 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -127,6 +127,7 @@ class hr_expense_expense(osv.osv):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
+ self.expense_toapprove_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
@@ -134,6 +135,7 @@ class hr_expense_expense(osv.osv):
return True
def expense_accept(self, cr, uid, ids, *args):
+ self.expense_approve_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -142,6 +144,7 @@ class hr_expense_expense(osv.osv):
return True
def expense_canceled(self, cr, uid, ids, *args):
+ self.expense_refuse_notificate(cr, uid, ids)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
@@ -234,6 +237,21 @@ class hr_expense_expense(osv.osv):
}
return result
+ def expense_toapprove_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids):
+ self.message_post(cr, uid, [obj.id],
+ _("Request to approve"), subtype="hr_expense.mt_expense_approve", context=context)
+
+ def expense_approve_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids):
+ self.message_post(cr, uid, [obj.id],
+ _("Request approved"), subtype="hr_expense.mt_expense_approved", context=context)
+
+ def expense_refuse_notificate(self, cr, uid, ids, context=None):
+ for obj in self.browse(cr, uid, ids):
+ self.message_post(cr, uid, [obj.id],
+ _("Request refused"), subtype="hr_expense.mt_expense_refused", context=context)
+
hr_expense_expense()
class product_product(osv.osv):
From 7b27d67bc46c8e13575136dd14ff798111846778 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Wed, 21 Nov 2012 11:55:18 +0530
Subject: [PATCH 28/73] [IMP] make changes into project
bzr revid: rma@tinyerp.com-20121121062518-c8dna23myzgwgbgb
---
addons/project/project.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index b7ec3598c8e..978399a1bd1 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1106,7 +1106,7 @@ class task(base_stage, osv.osv):
def set_kanban_state_blocked(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
self.case_block_send_note(cr, uid, ids, context=context)
- return False
+ return True
def set_kanban_state_normal(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
@@ -1115,7 +1115,7 @@ class task(base_stage, osv.osv):
def set_kanban_state_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
- return True
+ return False
def _store_history(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
From e1c947ad2093fd41609c23fa63cd335519ea2b90 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Wed, 21 Nov 2012 12:39:01 +0530
Subject: [PATCH 29/73] [IMP] make changes into mail
bzr revid: rma@tinyerp.com-20121121070901-vy7s76adxyqobb2z
---
addons/mail/data/mail_data.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index f48984c46b4..9b91c519348 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -29,7 +29,6 @@
From f42cee3e9498c485c5ba60a1b10c7dac83525c2c Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 14:11:39 +0530
Subject: [PATCH 30/73] [IMP]hr_expense:code improved
bzr revid: kbh@tinyerp.com-20121121084139-2phwt6sxbgt0sp5r
---
addons/hr_expense/hr_expense.py | 16 ++++++++--------
.../project_issue_sheet_view.xml | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 949bfb2caa8..a580feff399 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -123,19 +123,19 @@ class hr_expense_expense(osv.osv):
company_id = employee.company_id.id
return {'value': {'department_id': department_id, 'company_id': company_id}}
- def expense_confirm(self, cr, uid, ids, *args):
+ def expense_confirm(self, cr, uid, ids, context=None):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
- self.expense_toapprove_notificate(cr, uid, ids)
+ self.expense_toapprove_notificate(cr, uid, ids, context=context)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
})
return True
- def expense_accept(self, cr, uid, ids, *args):
- self.expense_approve_notificate(cr, uid, ids)
+ def expense_accept(self, cr, uid, ids, context=None):
+ self.expense_approve_notificate(cr, uid, ids, context=context)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -143,8 +143,8 @@ class hr_expense_expense(osv.osv):
})
return True
- def expense_canceled(self, cr, uid, ids, *args):
- self.expense_refuse_notificate(cr, uid, ids)
+ def expense_canceled(self, cr, uid, ids, context=None):
+ self.expense_refuse_notificate(cr, uid, ids , context=context)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
@@ -240,12 +240,12 @@ class hr_expense_expense(osv.osv):
def expense_toapprove_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_post(cr, uid, [obj.id],
- _("Request to approve"), subtype="hr_expense.mt_expense_approve", context=context)
+ _("The request is waiting for Approval"), subtype="hr_expense.mt_expense_approve", context=context)
def expense_approve_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_post(cr, uid, [obj.id],
- _("Request approved"), subtype="hr_expense.mt_expense_approved", context=context)
+ _("The request has been approved"), subtype="hr_expense.mt_expense_approved", context=context)
def expense_refuse_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index 4fc12ab0747..2a55a229f76 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -23,7 +23,7 @@
-
+
From 0fcc816994ef41eb81f3eb06f52788b1e5718af9 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 14:34:39 +0530
Subject: [PATCH 31/73] [REM]removd unnecesary code
bzr revid: kbh@tinyerp.com-20121121090439-ifwfuod0se991qfv
---
addons/project_issue_sheet/project_issue_sheet_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index 2a55a229f76..4fc12ab0747 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -23,7 +23,7 @@
-
+
From a5afea27d5af1e04d4e2d99dfa444df4eab9d65f Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 14:43:58 +0530
Subject: [PATCH 32/73] [IMP]hr_expense:code improved
bzr revid: kbh@tinyerp.com-20121121091358-33g7oonfo819ry1f
---
addons/hr_expense/hr_expense.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index a580feff399..3327312ef9d 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -123,19 +123,19 @@ class hr_expense_expense(osv.osv):
company_id = employee.company_id.id
return {'value': {'department_id': department_id, 'company_id': company_id}}
- def expense_confirm(self, cr, uid, ids, context=None):
+ def expense_confirm(self, cr, uid, ids, *args):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
- self.expense_toapprove_notificate(cr, uid, ids, context=context)
+ self.expense_toapprove_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
})
return True
- def expense_accept(self, cr, uid, ids, context=None):
- self.expense_approve_notificate(cr, uid, ids, context=context)
+ def expense_accept(self, cr, uid, ids, *args):
+ self.expense_approve_notificate(cr, uid, ids)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -143,8 +143,8 @@ class hr_expense_expense(osv.osv):
})
return True
- def expense_canceled(self, cr, uid, ids, context=None):
- self.expense_refuse_notificate(cr, uid, ids , context=context)
+ def expense_canceled(self, cr, uid, ids, *args):
+ self.expense_refuse_notificate(cr, uid, ids)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
From d756f85a2a86cbfda4140b17627cfd04a3a73a8a Mon Sep 17 00:00:00 2001
From: Amit Patel
Date: Wed, 21 Nov 2012 15:02:00 +0530
Subject: [PATCH 33/73] [REM]:account:removed created from account
bzr revid: apa@tinyerp.com-20121121093200-hx4pi4vvk54vgn1x
---
addons/account/account_invoice.py | 7 -------
addons/account/data/account_data.xml | 4 ----
2 files changed, 11 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index fc41bbf6df6..fc2dfcf5023 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -359,8 +359,6 @@ class account_invoice(osv.osv):
context = {}
try:
res = super(account_invoice, self).create(cr, uid, vals, context)
- if res:
- self.create_send_note(cr, uid, [res], context=context)
return res
except Exception, e:
if '"journal_id" viol' in e.args[0]:
@@ -1315,11 +1313,6 @@ class account_invoice(osv.osv):
}
return type_dict.get(type, 'Invoice')
- def create_send_note(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("%s created.") % (self._get_document_type(obj.type)),
- subtype="account.mt_invoice_new", context=context)
-
def confirm_paid_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s paid.") % (self._get_document_type(obj.type)),
diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index 2dfef225d70..73ddddb87c8 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -562,10 +562,6 @@
-
- Created
- account.invoice
-
Validated
account.invoice
From d936c69aaa410c970245a377cd906337ce2f5354 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Wed, 21 Nov 2012 15:21:40 +0530
Subject: [PATCH 34/73] [IMP] remove the cancelled subtype in project
bzr revid: rma@tinyerp.com-20121121095140-qkjkvyqfqpoa9i50
---
addons/project/project.py | 4 ----
addons/project/project_data.xml | 24 +-----------------------
2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 978399a1bd1..79828a53d34 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -311,7 +311,6 @@ class project(osv.osv):
task_ids = task_obj.search(cr, uid, [('project_id', 'in', ids), ('state', '!=', 'done')])
task_obj.case_cancel(cr, uid, task_ids, context=context)
self.write(cr, uid, ids, {'state':'cancelled'}, context=context)
- self.set_cancel_send_note(cr, uid, ids, context=context)
return True
def set_pending(self, cr, uid, ids, context=None):
@@ -556,9 +555,6 @@ def Project():
def set_pending_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Project is now pending."), context=context)
- def set_cancel_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Project has been canceled."), context=context)
-
def set_close_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Project has been closed."), context=context)
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index 1afcf5c938a..b4b9a98686b 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -86,28 +86,11 @@
- New
- project.project
-
-
-
- Closed
- project.project
-
-
- Canceled
- project.project
-
-
- Stage Changed
- project.project
-
-
Task Created
project.project
-
+
Task Done
project.project
@@ -115,11 +98,6 @@
Task Started
project.project
-
- Tasks Blocked
- project.project
-
-
Task Created
project.task
From c6a88089c9e5a1ce2a61d9cb545d885de47961b2 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 15:27:28 +0530
Subject: [PATCH 35/73] [REM]hr_recruitment:code removed for stage changed
bzr revid: kbh@tinyerp.com-20121121095728-651ta4nl2162xr56
---
addons/hr_recruitment/hr_recruitment.py | 6 ------
1 file changed, 6 deletions(-)
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 1d076b25ed3..9ae8a045393 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -468,12 +468,6 @@ class hr_applicant(base_stage, osv.Model):
# OpenChatter methods and notifications
# -------------------------------------------------------
- def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
- """ Override of the (void) default notification method. """
- if not stage_id: return True
- stage_name = self.pool.get('hr.recruitment.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), subtype="hr_recruitment.mt_stage_changed", context=context)
-
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Applicant'
From c57028fdd33aa0b228b62d347d46249efa7b4528 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Wed, 21 Nov 2012 16:08:20 +0530
Subject: [PATCH 36/73] [IMP] remove the cancelled subtype in project task and
issue
bzr revid: rma@tinyerp.com-20121121103820-ieoqpx0g0rghbav7
---
addons/project/project.py | 8 -----
addons/project/project_data.xml | 37 ++++++++-------------
addons/project_issue/project_issue.py | 10 ------
addons/project_issue/project_issue_data.xml | 25 +++++++-------
4 files changed, 27 insertions(+), 53 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 79828a53d34..7b759e58483 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1008,7 +1008,6 @@ class task(base_stage, osv.osv):
self._check_child_task(cr, uid, ids, context=context)
for task in tasks:
self.case_set(cr, uid, [task.id], 'cancelled', {'remaining_hours': 0.0}, context=context)
- self.case_cancel_send_note(cr, uid, [task.id], context=context)
return True
def do_open(self, cr, uid, ids, context=None):
@@ -1176,7 +1175,6 @@ class task(base_stage, osv.osv):
#raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task, self).write(cr, uid, [t.id], write_vals, context=context)
- self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
result = True
else:
result = super(task, self).write(cr, uid, ids, vals, context=context)
@@ -1286,12 +1284,6 @@ class task(base_stage, osv.osv):
res = super(task, self).message_get_monitored_follower_fields(cr, uid, ids, context=context)
return res + ['user_id', 'manager_id']
- def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
- """ Override of the (void) default notification method. """
- stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name),
- context=context)
-
def create_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Task has been created."), subtype="project.mt_task_new", context=context)
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index b4b9a98686b..76c8c5341db 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -90,42 +90,33 @@
project.project
+
+ Task Started
+ project.project
+
Task Done
project.project
-
- Task Started
- project.project
-
+
Task Created
project.task
+
+ Task Started
+ project.task
+
+
+ Tasks Blocked
+ project.task
+
+
Task Done
project.task
-
- Task Started
- project.task
-
-
- Tasks Blocked
- project.task
-
-
-
- Canceled
- project.task
-
-
-
- Stage Changed
- project.task
-
-
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 5f53e1db496..7a055c343fd 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -387,10 +387,6 @@ class project_issue(base_stage, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
logged_fields = ['stage_id', 'state', 'message_ids']
- if 'stage_id' in vals:
- for t in self.browse(cr, uid, ids, context=context):
- new_stage = vals.get('stage_id')
- self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
@@ -461,7 +457,6 @@ class project_issue(base_stage, osv.osv):
def case_cancel(self, cr, uid, ids, context=None):
""" Cancels case """
self.case_set(cr, uid, ids, 'cancelled', {'active': True}, context=context)
- self.case_cancel_send_note(cr, uid, ids, context=context)
return True
def case_escalate(self, cr, uid, ids, context=None):
@@ -540,11 +535,6 @@ class project_issue(base_stage, osv.osv):
# OpenChatter methods and notifications
# -------------------------------------------------------
- def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
- """ Override of the (void) default notification method. """
- stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="mt_issue_new", context=context)
-
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
""" Override of default prefix for notifications. """
return 'Project issue'
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 77d4bff648a..226884e9b83 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -48,27 +48,23 @@ Access all issues from the top Project menu, and access the issues of a specific
Issue Created
project.issue
+
+ Issue Started
+ project.issue
+
+
+ Issue Blocked
+ project.issue
+
Issue Closed
project.issue
-
- Canceled
- project.issue
-
-
- Stage Changed
- project.issue
-
Issue Created
project.project
-
- Issue Closed
- project.project
-
Issue Started
project.project
@@ -78,5 +74,10 @@ Access all issues from the top Project menu, and access the issues of a specific
project.project
+
+ Issue Closed
+ project.project
+
+
From 4c2649e5ce3d1c2cd949d69ba23f271e9069c0cf Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Wed, 21 Nov 2012 18:10:24 +0530
Subject: [PATCH 37/73] [IMP] add the method for issue start in project issue
bzr revid: rma@tinyerp.com-20121121124024-rwf5j3as4m8taqmv
---
addons/project_issue/project_issue.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 7a055c343fd..9a049d03652 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -394,6 +394,10 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
+ if 'stage_id' in vals:
+ for t in self.browse(cr, uid, ids, context=context):
+ new_stage = vals.get('stage_id')
+ self.stage_set(cr, uid, [t.id], new_stage, context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
@@ -546,7 +550,15 @@ class project_issue(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue created.")
return self.message_post(cr, uid, ids, body=message, subtype="mt_issue_new", context=context)
-
+ def stage_set(self, cr, uid, ids, stage_id, context=None):
+ stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
+ if stage_name in['Design','Development','Testing','Merge']:
+ self.issue_start_send_note(cr, uid, ids, context=context)
+ return True
+
+ def issue_start_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Issue has been started."), subtype="mt_issue_started", context=context)
+
def case_escalate_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.project_id:
From 366dd537acfbe672cc0419b53d5af91ce27a9584 Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 18:22:09 +0530
Subject: [PATCH 38/73] [REM]hr_recruitment:unnecessary subtype removed
bzr revid: kbh@tinyerp.com-20121121125209-votyj0ro8i6b9z5q
---
addons/hr_recruitment/hr_recruitment.py | 2 +-
addons/hr_recruitment/hr_recruitment_data.xml | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 9ae8a045393..b5e441bde15 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -480,7 +480,7 @@ class hr_applicant(base_stage, osv.Model):
context = {}
for applicant in self.browse(cr, uid, ids, context=context):
if applicant.job_id:
- self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('New employee joined the company %s.')%(applicant.name,), subtype="hr_recruitment.mt_hired", context=context)
+ self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('New employee joined the company %s.')%(applicant.name,), context=context)
if applicant.emp_id:
message = _("Applicant has been hired and created as an employee.")
self.message_post(cr, uid, [applicant.id], body=message, context=context)
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index 5afd2cd1cca..ef8b7adfca8 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -462,10 +462,6 @@
-
- Employee Hired
- hr.job
-
New Applicant
hr.job
From 4fa2d6b95e6108b17373198296eb807e606686cd Mon Sep 17 00:00:00 2001
From: "Khushboo Bhatt (Open ERP)"
Date: Wed, 21 Nov 2012 18:57:56 +0530
Subject: [PATCH 39/73] [IMP]code improve
bzr revid: kbh@tinyerp.com-20121121132756-r4rrdioo6tife1ve
---
addons/hr/hr_data.xml | 21 -------------------
addons/hr_recruitment/hr_recruitment_data.xml | 15 +++++++++++++
2 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml
index 029b77fd999..25c882f2201 100644
--- a/addons/hr/hr_data.xml
+++ b/addons/hr/hr_data.xml
@@ -18,26 +18,5 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp
-
- New Applicant
- hr.job
-
-
-
- Stage changed
- hr.job
-
-
-
- Applicant Hired
- hr.job
-
-
-
- Applicant Refused
- hr.job
-
-
-
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index ef8b7adfca8..1cfd99801a4 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -466,6 +466,21 @@
New Applicant
hr.job
+
+ Stage changed
+ hr.job
+
+
+
+ Applicant Hired
+ hr.job
+
+
+
+ Applicant Refused
+ hr.job
+
+
Stage changed
hr.applicant
From 68022fdcbf3ff6d3efd181774ff43985e1e1184a Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Thu, 22 Nov 2012 10:59:57 +0530
Subject: [PATCH 40/73] [IMP] remove the method for issue start in project
issue
bzr revid: rma@tinyerp.com-20121122052957-x6a1ei6t2ma8wujk
---
addons/project_issue/project_issue.py | 15 +--------------
addons/project_issue/project_issue_data.xml | 2 +-
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 9a049d03652..654bcdd308a 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -394,11 +394,6 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
- if 'stage_id' in vals:
- for t in self.browse(cr, uid, ids, context=context):
- new_stage = vals.get('stage_id')
- self.stage_set(cr, uid, [t.id], new_stage, context=context)
-
return super(project_issue, self).write(cr, uid, ids, vals, context)
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
@@ -550,15 +545,7 @@ class project_issue(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue created.")
return self.message_post(cr, uid, ids, body=message, subtype="mt_issue_new", context=context)
- def stage_set(self, cr, uid, ids, stage_id, context=None):
- stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- if stage_name in['Design','Development','Testing','Merge']:
- self.issue_start_send_note(cr, uid, ids, context=context)
- return True
-
- def issue_start_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Issue has been started."), subtype="mt_issue_started", context=context)
-
+
def case_escalate_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.project_id:
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 226884e9b83..2b4ef35f904 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -48,7 +48,7 @@ Access all issues from the top Project menu, and access the issues of a specific
Issue Created
project.issue
-
+
Issue Started
project.issue
From 0bd018cbd51ed8b059dee2807a04b44a165b1dcb Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Thu, 22 Nov 2012 11:40:14 +0530
Subject: [PATCH 41/73] [IMP] improve the code
bzr revid: rma@tinyerp.com-20121122061014-hzcoqkrdspk40jnb
---
addons/project_issue/project_issue_data.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 2b4ef35f904..af0adb75f75 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -52,10 +52,6 @@ Access all issues from the top Project menu, and access the issues of a specific
Issue Started
project.issue
-
- Issue Blocked
- project.issue
-
Issue Closed
project.issue
From 828b38bfdd26a3d945d4548a635696dba4e6425a Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Thu, 22 Nov 2012 12:11:41 +0530
Subject: [PATCH 42/73] [IMP] add the method issue_start_send note in issue
bzr revid: rma@tinyerp.com-20121122064141-1lw99chpi7jp3doj
---
addons/project_issue/project_issue.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 654bcdd308a..075324f1cd8 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -387,6 +387,7 @@ class project_issue(base_stage, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
logged_fields = ['stage_id', 'state', 'message_ids']
+ print "logged_fields-------",logged_fields
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
@@ -394,7 +395,12 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
+ st = self.pool.get('project.task.type').browse(cr, uid, vals.get('stage_id'), context=context);
+ if st.state =='open':
+ self.issue_start_send_note(cr, uid, ids, context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
+ def issue_start_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Issue has been started."), subtype="mt_issue_change", context=context)
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
if not task_id:
From 01636ac48bed089223a6d255a53c2ca9e1690c5f Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Thu, 22 Nov 2012 12:45:22 +0530
Subject: [PATCH 43/73] [IMP] improve the code
bzr revid: rma@tinyerp.com-20121122071522-ck8a1hyhszqlzd0j
---
addons/project/project.py | 7 ++++++-
addons/project_issue/project_issue.py | 7 +++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 7b759e58483..5741d32a820 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1175,6 +1175,7 @@ class task(base_stage, osv.osv):
#raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task, self).write(cr, uid, [t.id], write_vals, context=context)
+ self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
result = True
else:
result = super(task, self).write(cr, uid, ids, vals, context=context)
@@ -1286,7 +1287,11 @@ class task(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Task has been created."), subtype="project.mt_task_new", context=context)
-
+ def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
+ """ Override of the (void) default notification method. """
+ stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
+ return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name),
+ context=context)
def case_open_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Task has been started."), subtype="project.mt_task_started", context=context)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 075324f1cd8..bb01ea55095 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -387,7 +387,6 @@ class project_issue(base_stage, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
#Update last action date every time the user change the stage, the state or send a new email
logged_fields = ['stage_id', 'state', 'message_ids']
- print "logged_fields-------",logged_fields
if any([field in vals for field in logged_fields]):
vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
@@ -399,6 +398,7 @@ class project_issue(base_stage, osv.osv):
if st.state =='open':
self.issue_start_send_note(cr, uid, ids, context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
+
def issue_start_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Issue has been started."), subtype="mt_issue_change", context=context)
@@ -547,7 +547,10 @@ class project_issue(base_stage, osv.osv):
def convert_to_task_send_note(self, cr, uid, ids, context=None):
message = _("Project issue converted to task.")
return self.message_post(cr, uid, ids, body=message, context=context)
-
+ def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
+ """ Override of the (void) default notification method. """
+ stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="mt_issue_new", context=context)
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue created.")
return self.message_post(cr, uid, ids, body=message, subtype="mt_issue_new", context=context)
From c3ef32a2cbfa5d38909f86279f008494de238ab7 Mon Sep 17 00:00:00 2001
From: "Randhir Mayatra (OpenERP)"
Date: Thu, 22 Nov 2012 13:00:50 +0530
Subject: [PATCH 44/73] [IMP] improve method the code
bzr revid: rma@tinyerp.com-20121122073050-6qnu5x2kci8sts39
---
addons/project_issue/project_issue.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index bb01ea55095..9201ceaf0cf 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -539,7 +539,11 @@ class project_issue(base_stage, osv.osv):
# -------------------------------------------------------
# OpenChatter methods and notifications
# -------------------------------------------------------
-
+ def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
+ """ Override of the (void) default notification method. """
+ stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="mt_issue_new", context=context)
+
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
""" Override of default prefix for notifications. """
return 'Project issue'
@@ -547,10 +551,7 @@ class project_issue(base_stage, osv.osv):
def convert_to_task_send_note(self, cr, uid, ids, context=None):
message = _("Project issue converted to task.")
return self.message_post(cr, uid, ids, body=message, context=context)
- def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
- """ Override of the (void) default notification method. """
- stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="mt_issue_new", context=context)
+
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue created.")
return self.message_post(cr, uid, ids, body=message, subtype="mt_issue_new", context=context)
From da73c446f9e3a80b4317bd1c6c8f32cfb087d289 Mon Sep 17 00:00:00 2001
From: Amit Patel
Date: Thu, 22 Nov 2012 14:40:55 +0530
Subject: [PATCH 45/73] [IMP]:changed stage while click on the stages
bzr revid: apa@tinyerp.com-20121122091055-rvwtny19yusdx1yl
---
addons/project_issue/project_issue.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 3de83e351e6..bedf26546b4 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -394,11 +394,10 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
+ if vals.get('stage_id'):
+ self.stage_set_send_note(cr, uid, ids,vals.get('stage_id'), context=context)
return super(project_issue, self).write(cr, uid, ids, vals, context)
- def issue_start_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Issue has been started."), subtype="mt_issue_change", context=context)
-
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
if not task_id:
return {'value': {}}
From c5c6279a287e29a501c726b448109bd9fd2bce3b Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Thu, 22 Nov 2012 18:16:48 +0530
Subject: [PATCH 46/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121122124648-t38mpzva7uf4jsfy
---
addons/hr_recruitment/hr_recruitment.py | 2 +-
addons/project/project.py | 1 -
addons/project_issue/project_issue.py | 8 +++++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 19ff56b35a6..8279d6fe5fd 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -484,7 +484,7 @@ class hr_applicant(base_stage, osv.Model):
self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('New employee joined the company %s.')%(applicant.name,), context=context)
if applicant.emp_id:
message = _("Applicant has been hired and created as an employee.")
- self.message_post(cr, uid, [applicant.id], body=message, context=context)
+ self.message_post(cr, uid, [applicant.id], body=message, subtype="hr_recruitment.mt_applicant_hired", context=context)
else:
message = _("Applicant has been hired.")
self.message_post(cr, uid, [applicant.id], body=message, subtype="hr_recruitment.mt_applicant_hired", context=context)
diff --git a/addons/project/project.py b/addons/project/project.py
index 5741d32a820..8155f211d06 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1175,7 +1175,6 @@ class task(base_stage, osv.osv):
#raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task, self).write(cr, uid, [t.id], write_vals, context=context)
- self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
result = True
else:
result = super(task, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index bedf26546b4..3531682fb1d 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -394,8 +394,7 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
for id in ids:
self._subscribe_project_followers_to_issue(cr, uid, id, context=context)
- if vals.get('stage_id'):
- self.stage_set_send_note(cr, uid, ids,vals.get('stage_id'), context=context)
+
return super(project_issue, self).write(cr, uid, ids, vals, context)
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
@@ -538,7 +537,7 @@ class project_issue(base_stage, osv.osv):
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), subtype="mt_issue_new", context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context)
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
""" Override of default prefix for notifications. """
@@ -562,6 +561,9 @@ class project_issue(base_stage, osv.osv):
obj.message_post(body=message)
return True
+ def case_close_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Project issue has been done."), subtype="mail.mt_issue_closed", context=context)
+
project_issue()
class project(osv.osv):
From 21116cbbed1af6e64e6bb82a12959dc92b5c03c8 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 23 Nov 2012 15:57:39 +0530
Subject: [PATCH 47/73] [IMP] improve code
bzr revid: fka@tinyerp.com-20121123102739-tq29jq6rxe5zszg1
---
addons/hr_recruitment/hr_recruitment_data.xml | 4 ++--
addons/project/project_data.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index 42872a3d2a7..cb59d4ff9d7 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -467,7 +467,7 @@
hr.job
- Stage changed
+ Stage Changed
hr.job
@@ -482,7 +482,7 @@
- Stage changed
+ Stage Changed
hr.applicant
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index a23af11922f..ed499ea70a0 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -103,7 +103,7 @@
project.task
- Tasks Blocked
+ Task Blocked
project.task
From f94f396d0420accd08d9fa1720f21da8fd36732e Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 23 Nov 2012 17:11:57 +0530
Subject: [PATCH 48/73] [IMP] remove subtype canceled & stage change
bzr revid: fka@tinyerp.com-20121123114157-ckoygs2ul6hrutqv
---
addons/analytic/__openerp__.py | 3 +--
addons/analytic/analytic.py | 2 +-
addons/analytic/analytic_data.xml | 12 ------------
addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +-
.../hr_timesheet_invoice_data.xml | 4 ----
5 files changed, 3 insertions(+), 20 deletions(-)
delete mode 100644 addons/analytic/analytic_data.xml
diff --git a/addons/analytic/__openerp__.py b/addons/analytic/__openerp__.py
index 6227cd369d3..417d2b29b20 100644
--- a/addons/analytic/__openerp__.py
+++ b/addons/analytic/__openerp__.py
@@ -38,8 +38,7 @@ that have no counterpart in the general financial accounts.
'security/analytic_security.xml',
'security/ir.model.access.csv',
'analytic_sequence.xml',
- 'analytic_view.xml',
- 'analytic_data.xml'
+ 'analytic_view.xml'
],
'demo': [],
'installable': True,
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index 708f9b3b196..c18b86a9b25 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -313,7 +313,7 @@ class account_analytic_account(osv.osv):
if obj.partner_id:
message = _("Contract for %s has been created.") % (obj.partner_id.name,)
self.message_post(cr, uid, [obj.id], body=message,
- subtype="analytic.mt_account_status", context=context)
+ context=context)
account_analytic_account()
diff --git a/addons/analytic/analytic_data.xml b/addons/analytic/analytic_data.xml
deleted file mode 100644
index 67940fb2063..00000000000
--- a/addons/analytic/analytic_data.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
- Status Change
- account.analytic.account
-
-
-
-
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index 679455e3864..63ff17fa6c1 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -101,7 +101,7 @@ class account_analytic_account(osv.osv):
def set_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'cancelled'}, context=context)
message = _("Contract has been canceled.")
- self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_canceled", context=context)
+ self.message_post(cr, uid, ids, body=message, context=context)
return True
def set_open(self, cr, uid, ids, context=None):
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index fc083300fed..a57f0c6078a 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -35,10 +35,6 @@
Contract Renewed
account.analytic.account
-
- Canceled
- account.analytic.account
-
Contract to Renew
crm.case.section
From cd38db8d30a47aa8c7e6961d2f634cfe5889bf39 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Fri, 23 Nov 2012 18:23:38 +0530
Subject: [PATCH 49/73] [IMP]if record in oppertunity type subtype convert
opprtunity not shown
bzr revid: fka@tinyerp.com-20121123125338-x6cpm3gs0a3u90vx
---
addons/crm/crm_lead.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index b72ac9ee5b4..753a92c62b0 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -891,4 +891,10 @@ class crm_lead(base_stage, format_address, osv.osv):
return {'value':{'country_id':country_id}}
return {}
+ def _get_subscription_data(self, cr, uid, ids, name, args, context=None):
+ res = super(crm_lead,self)._get_subscription_data(cr, uid, ids, name, args, context=context)
+ for subtype in self.browse(cr, uid, ids,context=context):
+ if subtype.type == 'opportunity':
+ del res[subtype.id]['message_subtype_data']['Convert to Opportunity']
+ return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From ef9c35a5cd672ac850415fa4238a966faa2b8191 Mon Sep 17 00:00:00 2001
From: "Sanjay Gohel (Open ERP)"
Date: Mon, 26 Nov 2012 18:02:03 +0530
Subject: [PATCH 50/73] [IMP]improve code
bzr revid: sgo@tinyerp.com-20121126123203-3qrbp9p8cgpcfd2y
---
addons/mail/static/src/js/mail_followers.js | 3 ---
1 file changed, 3 deletions(-)
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 721dc20b7d2..4a3bc04a6ce 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -238,9 +238,6 @@ openerp_mail_followers = function(session, mail) {
checklist.push(parseInt($(record).data('id')));
}
});
- if (!checklist.length) {
- return self.do_unfollow();
- }
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], this.message_is_follower ? checklist : undefined, context])
.then(this.proxy('read_value'));
From 927491120a58828225da74f97b225cd2fa8c8e63 Mon Sep 17 00:00:00 2001
From: "Sanjay Gohel (Open ERP)"
Date: Tue, 27 Nov 2012 18:37:23 +0530
Subject: [PATCH 51/73] [IMP]improve as per comment
bzr revid: sgo@tinyerp.com-20121127130723-44i0t3v89ewdy8zw
---
addons/crm/crm_lead.py | 7 +++---
addons/hr_expense/hr_expense.py | 24 ++++++---------------
addons/mail/static/src/js/mail_followers.js | 5 ++++-
3 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 753a92c62b0..6f8ad2e92a3 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -892,9 +892,10 @@ class crm_lead(base_stage, format_address, osv.osv):
return {}
def _get_subscription_data(self, cr, uid, ids, name, args, context=None):
+ # 'Convert to Opprtunity' subtype can only show in lead form view.
res = super(crm_lead,self)._get_subscription_data(cr, uid, ids, name, args, context=context)
- for subtype in self.browse(cr, uid, ids,context=context):
- if subtype.type == 'opportunity':
- del res[subtype.id]['message_subtype_data']['Convert to Opportunity']
+ for leads in self.browse(cr, uid, ids,context=context):
+ if leads.type == 'opportunity':
+ del res[leads.id]['message_subtype_data']['Convert to Opportunity']
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 3327312ef9d..a4745cc6806 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -127,7 +127,8 @@ class hr_expense_expense(osv.osv):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
- self.expense_toapprove_notificate(cr, uid, ids)
+ self.message_post(cr, uid, ids, body=_("The request is waiting for Approval"),
+ subtype="hr_expense.mt_expense_approve", context=context)
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
@@ -135,7 +136,8 @@ class hr_expense_expense(osv.osv):
return True
def expense_accept(self, cr, uid, ids, *args):
- self.expense_approve_notificate(cr, uid, ids)
+ self.message_post(cr, uid, ids, body=_("The request has been approved"),
+ subtype="hr_expense.mt_expense_approved", context=context)
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -144,7 +146,8 @@ class hr_expense_expense(osv.osv):
return True
def expense_canceled(self, cr, uid, ids, *args):
- self.expense_refuse_notificate(cr, uid, ids)
+ self.message_post(cr, uid, ids, body=_("Request refused"),
+ subtype="hr_expense.mt_expense_refused", context=context)
self.write(cr, uid, ids, {'state':'cancelled'})
return True
@@ -237,21 +240,6 @@ class hr_expense_expense(osv.osv):
}
return result
- def expense_toapprove_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids):
- self.message_post(cr, uid, [obj.id],
- _("The request is waiting for Approval"), subtype="hr_expense.mt_expense_approve", context=context)
-
- def expense_approve_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids):
- self.message_post(cr, uid, [obj.id],
- _("The request has been approved"), subtype="hr_expense.mt_expense_approved", context=context)
-
- def expense_refuse_notificate(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids):
- self.message_post(cr, uid, [obj.id],
- _("Request refused"), subtype="hr_expense.mt_expense_refused", context=context)
-
hr_expense_expense()
class product_product(osv.osv):
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 4a3bc04a6ce..0cb4619d3fe 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -240,7 +240,10 @@ openerp_mail_followers = function(session, mail) {
});
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], this.message_is_follower ? checklist : undefined, context])
- .then(this.proxy('read_value'));
+ .then(this.proxy('read_value')).then(function(){
+ if(checklist.length == 0){
+ return self.do_unfollow();}
+ });
},
});
};
From c5fe07802e29304165a45bdcb7fc1b8d61cfc5ee Mon Sep 17 00:00:00 2001
From: "Sanjay Gohel (Open ERP)"
Date: Wed, 28 Nov 2012 10:44:14 +0530
Subject: [PATCH 52/73] [IMP]improve code
bzr revid: sgo@tinyerp.com-20121128051414-el91llx1d1i4i565
---
addons/hr_expense/hr_expense.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index a4745cc6806..c32717cee5c 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -128,7 +128,7 @@ class hr_expense_expense(osv.osv):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
self.message_post(cr, uid, ids, body=_("The request is waiting for Approval"),
- subtype="hr_expense.mt_expense_approve", context=context)
+ subtype="hr_expense.mt_expense_approve")
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')
@@ -137,7 +137,7 @@ class hr_expense_expense(osv.osv):
def expense_accept(self, cr, uid, ids, *args):
self.message_post(cr, uid, ids, body=_("The request has been approved"),
- subtype="hr_expense.mt_expense_approved", context=context)
+ subtype="hr_expense.mt_expense_approved")
self.write(cr, uid, ids, {
'state':'accepted',
'date_valid':time.strftime('%Y-%m-%d'),
@@ -147,7 +147,7 @@ class hr_expense_expense(osv.osv):
def expense_canceled(self, cr, uid, ids, *args):
self.message_post(cr, uid, ids, body=_("Request refused"),
- subtype="hr_expense.mt_expense_refused", context=context)
+ subtype="hr_expense.mt_expense_refused")
self.write(cr, uid, ids, {'state':'cancelled'})
return True
From 300e802490ae1d6b2a587c4b5e5f9c3667c27679 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Mon, 3 Dec 2012 12:39:06 +0100
Subject: [PATCH 53/73] [IMP] [REVIEW] project: cleaned subtypes, added
comments in data files. Updated messages body to have shorter sentences.
bzr revid: tde@openerp.com-20121203113906-g0nhtn9j22d3lf0b
---
addons/project/project.py | 16 +++++++++-------
addons/project/project_data.xml | 17 +++++++++++------
addons/project_issue/project_issue.py | 14 +++++++++-----
addons/project_issue/project_issue_data.xml | 20 ++++++++++++--------
4 files changed, 41 insertions(+), 26 deletions(-)
diff --git a/addons/project/project.py b/addons/project/project.py
index 3c999b24d52..f516a30783e 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -1283,30 +1283,32 @@ class task(base_stage, osv.osv):
return res + ['user_id', 'manager_id']
def create_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task has been created."), subtype="project.mt_task_new", context=context)
+ return self.message_post(cr, uid, ids, body=_("Task created."), subtype="project.mt_task_new", context=context)
+
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name),
context=context)
+
def case_open_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task has been started."), subtype="project.mt_task_started", context=context)
+ return self.message_post(cr, uid, ids, body=_("Task started."), subtype="project.mt_task_started", context=context)
def case_close_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task has been done."), subtype="project.mt_task_closed", context=context)
+ return self.message_post(cr, uid, ids, body=_("Task closed."), subtype="project.mt_task_closed", context=context)
def case_block_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task has been blocked."), subtype="project.mt_task_blocked", context=context)
-
+ return self.message_post(cr, uid, ids, body=_("Task blocked."), subtype="project.mt_task_blocked", context=context)
+
def case_draft_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_('Task has been set as draft.'), context=context)
+ return self.message_post(cr, uid, ids, body=_('Task set as draft.'), context=context)
def do_delegation_send_note(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
msg = _('Task has been delegated to %s.') % (task.user_id.name)
self.message_post(cr, uid, [task.id], body=msg, context=context)
return True
-
+
def project_task_reevaluate(self, cr, uid, ids, context=None):
if self.pool.get('res.users').has_group(cr, uid, 'project.group_time_work_estimation_tasks'):
return {
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index ed499ea70a0..194707a894a 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -78,21 +78,26 @@
-
-
+
+
Task Created
project.project
-
+
Task Started
project.project
+
-
+
+ Task Blocked
+ project.project
+
+
Task Done
project.project
-
+
Task Created
project.task
@@ -101,11 +106,11 @@
Task Started
project.task
+
Task Blocked
project.task
-
Task Done
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 3a827a87578..37a94a062a3 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -532,11 +532,12 @@ class project_issue(base_stage, osv.osv):
# -------------------------------------------------------
# OpenChatter methods and notifications
# -------------------------------------------------------
+
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_post(cr, uid, ids, body= _("Stage changed to %s.") % (stage_name), context=context)
-
+ return self.message_post(cr, uid, ids, body=_("Stage changed to %s.") % (stage_name), context=context)
+
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
""" Override of default prefix for notifications. """
return 'Project issue'
@@ -544,10 +545,13 @@ class project_issue(base_stage, osv.osv):
def convert_to_task_send_note(self, cr, uid, ids, context=None):
message = _("Project issue converted to task.")
return self.message_post(cr, uid, ids, body=message, context=context)
-
+
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue created.")
- return self.message_post(cr, uid, ids, body=message, subtype="mt_issue_new", context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="project_issue.mt_issue_new", context=context)
+
+ def case_open_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Task started."), subtype="project_issue.mt_issue_started", context=context)
def case_escalate_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
@@ -560,7 +564,7 @@ class project_issue(base_stage, osv.osv):
return True
def case_close_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Project issue has been done."), subtype="mail.mt_issue_closed", context=context)
+ return self.message_post(cr, uid, ids, body=_("Project issue closed."), subtype="project_issue.mt_issue_closed", context=context)
project_issue()
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 817a7c24fb2..4dd39fd6c97 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -43,29 +43,33 @@ You can record issues, assign them to a responsible person, and keep track of th
Access all issues from the top Project menu, and access the issues of a specific project via the projects gallery view.]]>
-
-
+
+
Issue Created
project.issue
+
-
+
Issue Started
project.issue
+
-
+
Issue Closed
project.issue
-
-
+
+
Issue Created
project.project
+
-
+
Issue Started
project.project
+
-
+
Issue Closed
project.project
From 3b06de54cc59f751b431d71972e347514d3c9067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Mon, 3 Dec 2012 12:39:36 +0100
Subject: [PATCH 54/73] [IMP] base_status: updated Chatter body messages to
have shorter sentences.
bzr revid: tde@openerp.com-20121203113936-cgyvn0io82twh2be
---
addons/base_status/base_stage.py | 14 +++++++-------
addons/base_status/base_state.py | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py
index 9858a7fe0cc..294af978f40 100644
--- a/addons/base_status/base_stage.py
+++ b/addons/base_status/base_stage.py
@@ -323,39 +323,39 @@ class base_stage(object):
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been opened.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s opened.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been closed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s closed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been cancelled.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s cancelled.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s is now pending.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s pending.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been renewed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s renewed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
for id in ids:
if new_section:
- msg = '%s has been escalated to %s.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
+ msg = '%s escalated to %s.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
- msg = '%s has been escalated.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = '%s escalated.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
diff --git a/addons/base_status/base_state.py b/addons/base_status/base_state.py
index cebf5537485..6aaa1e22ae5 100644
--- a/addons/base_status/base_state.py
+++ b/addons/base_status/base_state.py
@@ -184,39 +184,39 @@ class base_state(object):
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been opened.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s opened.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
for id in ids:
if new_section:
- msg = '%s has been escalated to %s.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
+ msg = '%s escalated to %s.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
- msg = '%s has been escalated.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = '%s escalated.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been closed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s closed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been canceled.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s canceled.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s is now pending.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s b>pending.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
- msg = _('%s has been renewed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
+ msg = _('%s renewed.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_post(cr, uid, [id], body=msg, context=context)
return True
From ce923903b5edbea571cdd09cfcb939cb0c45bdce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Mon, 3 Dec 2012 12:40:09 +0100
Subject: [PATCH 55/73] [IMP] [REVIEW] [DOC] addons: added some comments in the
various data files about subtypes.
bzr revid: tde@openerp.com-20121203114009-obtca9gf3t7b909y
---
addons/account/data/account_data.xml | 2 +-
addons/account_voucher/account_voucher_data.xml | 2 +-
addons/crm/crm_lead_data.xml | 16 ++++++----------
addons/event/event_data.xml | 4 ++--
addons/hr_expense/hr_expense_data.xml | 3 ++-
addons/hr_holidays/hr_holidays_data.xml | 4 +---
addons/hr_recruitment/hr_recruitment_data.xml | 4 +++-
.../hr_timesheet_invoice_data.xml | 3 ++-
addons/mail/data/mail_data.xml | 1 +
addons/purchase/purchase_data.xml | 5 +++--
addons/sale/sale_data.xml | 6 +++---
11 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index 5459f806eee..0072a949d89 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -155,7 +155,7 @@
account.invoice
-
+
Validated
account.invoice
diff --git a/addons/account_voucher/account_voucher_data.xml b/addons/account_voucher/account_voucher_data.xml
index fc008e479e9..7e11f625d9e 100644
--- a/addons/account_voucher/account_voucher_data.xml
+++ b/addons/account_voucher/account_voucher_data.xml
@@ -13,7 +13,7 @@
You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.
]]>
-
+
Status Change
account.voucher
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index e2f1c307bfb..e7605c00a1c 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -154,56 +154,52 @@
+
Convert to Opportunity
crm.lead
-
Stage Changed
crm.lead
-
Lost
crm.lead
-
Won
crm.lead
+
- Leads Created
+ Lead Created
crm.case.section
-
- Leads to Opportunity
+ Lead to Opportunity
crm.case.section
-
- Leads Stage Changed
+ Lead Stage Changed
crm.case.section
-
Opportunity Lost
crm.case.section
-
Opportunity Won
crm.case.section
+
diff --git a/addons/event/event_data.xml b/addons/event/event_data.xml
index 47efca17d6d..490a2b869e7 100644
--- a/addons/event/event_data.xml
+++ b/addons/event/event_data.xml
@@ -12,9 +12,9 @@
open
-
+
- New Registrations
+ New Registration
event.event
diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml
index 01b839582e3..c5f1b99bb11 100644
--- a/addons/hr_expense/hr_expense_data.xml
+++ b/addons/hr_expense/hr_expense_data.xml
@@ -25,16 +25,17 @@
+
Approved
hr.expense.expense
-
Refused
hr.expense.expense
+
diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml
index ad15f170e56..54240eeea0b 100644
--- a/addons/hr_holidays/hr_holidays_data.xml
+++ b/addons/hr_holidays/hr_holidays_data.xml
@@ -45,19 +45,17 @@
brown
-
+
To Approve
hr.holidays
-
Approved
hr.holidays
-
Refused
hr.holidays
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index cb59d4ff9d7..a9bc7440276 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -461,7 +461,7 @@
-
+
New Applicant
hr.job
@@ -481,6 +481,7 @@
hr.job
+
Stage Changed
hr.applicant
@@ -496,5 +497,6 @@
hr.applicant
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
index a57f0c6078a..895329debfc 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml
@@ -22,7 +22,7 @@
20.0
-
+
Contract to Renew
account.analytic.account
@@ -35,6 +35,7 @@
Contract Renewed
account.analytic.account
+
Contract to Renew
crm.case.section
diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml
index b095c54247f..f59ddd1c3ea 100644
--- a/addons/mail/data/mail_data.xml
+++ b/addons/mail/data/mail_data.xml
@@ -27,6 +27,7 @@
1000
+
diff --git a/addons/purchase/purchase_data.xml b/addons/purchase/purchase_data.xml
index 7a56e0dc95f..3be0587388f 100644
--- a/addons/purchase/purchase_data.xml
+++ b/addons/purchase/purchase_data.xml
@@ -48,17 +48,18 @@
id="purchase_default_set"
model="ir.values"
name="set"/>
-
+
+
RFQ Confirmed
purchase.order
-
RFQ Approved
purchase.order
+
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 7d03e227e7f..cfedc8ee850 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -44,27 +44,27 @@
If you need to manage your sales pipeline (leads, opportunities, phonecalls), the CRM application may be useful. Use the Settings menu to install it.
]]>
-
+
Quotation sent
sale.order
-
Sale Order Confirmed
sale.order
+
Quotation sent
crm.case.section
-
Sale Order Confirmed
crm.case.section
+
From e1d1b049c12ab5c3096aaec858ecfecc87ceaad6 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Mon, 3 Dec 2012 18:31:26 +0530
Subject: [PATCH 56/73] [IMP] remove _get_subscription_data method
bzr revid: fka@tinyerp.com-20121203130126-1ofjqy0w459q58p1
---
addons/crm/crm_lead.py | 7 -------
1 file changed, 7 deletions(-)
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index cb9d5119317..430ea65c58d 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -895,11 +895,4 @@ class crm_lead(base_stage, format_address, osv.osv):
return {'value':{'country_id':country_id}}
return {}
- def _get_subscription_data(self, cr, uid, ids, name, args, context=None):
- # 'Convert to Opprtunity' subtype can only show in lead form view.
- res = super(crm_lead,self)._get_subscription_data(cr, uid, ids, name, args, context=context)
- for leads in self.browse(cr, uid, ids,context=context):
- if leads.type == 'opportunity':
- del res[leads.id]['message_subtype_data']['Convert to Opportunity']
- return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From aa2ca3ce0c794479a3cd8961698a948c0821ad74 Mon Sep 17 00:00:00 2001
From: "Foram Katharotiya (OpenERP)"
Date: Tue, 4 Dec 2012 13:02:44 +0530
Subject: [PATCH 57/73] [IMP] add issue blocked subtype
bzr revid: fka@tinyerp.com-20121204073244-2m629bmhs394rpwb
---
addons/project_issue/project_issue.py | 25 ++++++++++++++++++++-
addons/project_issue/project_issue_data.xml | 5 +++++
addons/project_issue/project_issue_view.xml | 4 ++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 37a94a062a3..a63afaf976c 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -233,6 +233,12 @@ class project_issue(base_stage, osv.osv):
When the case is over, the status is set to \'Done\'.\
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
+ 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
+ help="A task's kanban state indicates special situations affecting it:\n"
+ " * Normal is the default situation\n"
+ " * Blocked indicates something is preventing the progress of this task\n"
+ " * Ready for next stage indicates the task is ready to be pulled to the next stage",
+ readonly=True, required=False),
'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1),
'email_cc': fields.char('Watchers Emails', size=256, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'date_open': fields.datetime('Opened', readonly=True,select=True),
@@ -279,6 +285,7 @@ class project_issue(base_stage, osv.osv):
'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
+ 'kanban_state': 'normal',
}
_group_by_full = {
@@ -551,7 +558,7 @@ class project_issue(base_stage, osv.osv):
return self.message_post(cr, uid, ids, body=message, subtype="project_issue.mt_issue_new", context=context)
def case_open_send_note(self, cr, uid, ids, context=None):
- return self.message_post(cr, uid, ids, body=_("Task started."), subtype="project_issue.mt_issue_started", context=context)
+ return self.message_post(cr, uid, ids, body=_("Issue started."), subtype="project_issue.mt_issue_started", context=context)
def case_escalate_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
@@ -563,9 +570,25 @@ class project_issue(base_stage, osv.osv):
obj.message_post(body=message)
return True
+ def case_block_send_note(self, cr, uid, ids, context=None):
+ return self.message_post(cr, uid, ids, body=_("Issue blocked."), subtype="project_issue.mt_issue_blocked", context=context)
+
def case_close_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Project issue closed."), subtype="project_issue.mt_issue_closed", context=context)
+ def set_kanban_state_blocked(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
+ self.case_block_send_note(cr, uid, ids, context=context)
+ return True
+
+ def set_kanban_state_normal(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
+ self.case_open_send_note(cr, uid, ids, context=context)
+ return True
+
+ def set_kanban_state_done(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
+ return False
project_issue()
class project(osv.osv):
diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml
index 4dd39fd6c97..1182aeeea42 100644
--- a/addons/project_issue/project_issue_data.xml
+++ b/addons/project_issue/project_issue_data.xml
@@ -54,6 +54,11 @@ Access all issues from the top Project menu, and access the issues of a specific
project.issue
+
+ Issue Blocked
+ project.issue
+
+
Issue Closed
project.issue
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 60cc6448a46..d73ca3e288e 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -240,6 +240,7 @@
+