diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 4af3b43d54c..d8205ababa7 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -951,23 +951,8 @@ class account_invoice(osv.osv):
return taxes.values()
def _log_event(self, cr, uid, ids, factor=1.0, name='Open Invoice'):
- invs = self.read(cr, uid, ids, ['type','partner_id','amount_untaxed'])
- for inv in invs:
- part=inv['partner_id'] and inv['partner_id'][0]
- pc = pr = 0.0
- cr.execute('select sum(quantity*price_unit) from account_invoice_line where invoice_id=%s', (inv['id'],))
- total = inv['amount_untaxed']
- if inv['type'] in ('in_invoice','in_refund'):
- partnertype='supplier'
- eventtype = 'purchase'
- pc = total*factor
- else:
- partnertype = 'customer'
- eventtype = 'sale'
- pr = total*factor
- if self.pool.get('res.partner.event.type').check(cr, uid, 'invoice_open'):
- self.pool.get('res.partner.event').create(cr, uid, {'name':'Invoice: '+name, 'som':False, 'description':name+' '+str(inv['id']), 'document':name, 'partner_id':part, 'date':time.strftime('%Y-%m-%d %H:%M:%S'), 'canal_id':False, 'user_id':uid, 'partner_type':partnertype, 'probability':1.0, 'planned_revenue':pr, 'planned_cost':pc, 'type':eventtype})
- return len(invs)
+ #TODO: implement messages system
+ return True
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml
index e434f28d947..ee1bbbbcc4b 100644
--- a/addons/account/partner_view.xml
+++ b/addons/account/partner_view.xml
@@ -132,11 +132,13 @@
form
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index ce07647dc92..2bd56a3b513 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -56,15 +56,15 @@
-
+
-
+
-
+
@@ -73,7 +73,7 @@
-
+
@@ -82,9 +82,9 @@
-
+
-
+
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index bd366fff5c3..d3c640efca3 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -203,9 +203,13 @@ class crm_case(object):
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email}}
- def _history(self, cr, uid, cases, keyword, history=False, email=False, details=None, email_from=False, message_id=False, context={}):
+ def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
mailgate_pool = self.pool.get('mailgate.thread')
- return mailgate_pool._history(cr, uid, cases, keyword, history=history, email=email, details=details, email_from=email_from, message_id=message_id, context=context)
+ return mailgate_pool._history(cr, uid, cases, keyword, history=history,\
+ subject=subject, email=email, \
+ details=details, email_from=email_from,\
+ message_id=message_id, attach=attach, \
+ context=context)
def case_open(self, cr, uid, ids, *args):
"""Opens Case
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index 3a14659672a..9092efef8e8 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -82,23 +82,9 @@ this if you want the rule to send an email to the partner."),
if hasattr(obj, 'categ_id'):
ok = ok and (not action.trg_categ_id or action.trg_categ_id.id==obj.categ_id.id)
-# TODO: history_line is removed
-# if hasattr(obj, 'history_line'):
-# ok = ok and (not action.trg_max_history or action.trg_max_history<=(len(obj.history_line)+1))
-# reg_history = action.regex_history
-# result_history = True
-# if reg_history:
-# ptrn = re.compile(str(reg_history))
-# if obj.history_line:
-# _result = ptrn.search(str(obj.history_line[0].description))
-# if not _result:
-# result_history = False
- regex_h = not reg_history or result_history
- ok = ok and regex_h
return ok
def do_action(self, cr, uid, action, model_obj, obj, context={}):
-
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -118,7 +104,7 @@ this if you want the rule to send an email to the partner."),
write['email_cc'] = obj.email_cc+','+obj.act_email_cc
else:
write['email_cc'] = obj.act_email_cc
-
+
model_obj.write(cr, uid, [obj.id], write, context)
emails = []
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index cfff95888cc..1873f53f573 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -1,59 +1,11 @@
-
-
-
- CRM: Create Case
- crm_case_draft
-
-
-
- CRM: Open Case
- crm_case_open
-
-
-
- CRM: Pending Case
- crm_case_pending
-
-
-
- CRM: Cancel Case
- crm_case_cancel
-
-
-
- CRM: Close Case
- crm_case_done
-
-
-
-
Sales Department
Sales
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Check cases rules
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 3a358ddf649..c1060f3e658 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -137,7 +137,6 @@ and users by email"),
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
- 'function_name': fields.char('Function', size=64),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 8a1c7e0e51b..78437ee411f 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -72,7 +72,7 @@
-
+
@@ -161,16 +161,21 @@
-
-
+
+
+
+
+
+
+
+
+ string="Reply to Last Email"
+ name="%(crm.action_crm_send_mail)d"
+ context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
+ icon="gtk-undo" type="action" />
-
@@ -178,7 +183,7 @@
diff --git a/addons/crm/scripts/php/crmlead.php b/addons/crm/scripts/php/crmlead.php
index aa23e5c78ba..91cfe7649ed 100644
--- a/addons/crm/scripts/php/crmlead.php
+++ b/addons/crm/scripts/php/crmlead.php
@@ -117,7 +117,7 @@ class Contact
"email_from" => new xmlrpcval($post['email'], "string"),
"phone" => new xmlrpcval($post['phone'], "string"),
"partner_name" => new xmlrpcval($post['name'], "string"),
- "function_name" => new xmlrpcval($post["jobtitle"], "string"),
+ "function" => new xmlrpcval($post["jobtitle"], "string"),
"zip" => new xmlrpcval($post['zip'], "string"),
"stage_id" => new xmlrpcval(6, "int"),
"city" => new xmlrpcval($post['city'], "string"),
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
index 153f136cfb2..156ab3311f4 100644
--- a/addons/crm/wizard/crm_forward_to_partner.py
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -212,7 +212,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
lead = lead_proxy.browse(cr, uid, lead_id, context=context)
if lead.type == 'lead':
field_names = [
- 'partner_name', 'title', 'function_name', 'street', 'street2',
+ 'partner_name', 'title', 'function', 'street', 'street2',
'zip', 'city', 'country_id', 'state_id', 'email_from',
'phone', 'fax', 'mobile'
]
diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
index 2decc56b806..98a075ba1ba 100644
--- a/addons/crm/wizard/crm_lead_to_partner.py
+++ b/addons/crm/wizard/crm_lead_to_partner.py
@@ -155,7 +155,7 @@ class crm_lead2partner(osv.osv_memory):
'email': lead.email_from,
'fax': lead.fax,
'title': lead.title,
- 'function': lead.function_name,
+ 'function': lead.function,
'street': lead.street,
'street2': lead.street2,
'zip': lead.zip,
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index 8458172104a..8bc63f2f1a1 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -99,7 +99,7 @@ class crm_send_new_email(osv.osv_memory):
model = hist.model_id.model
model_pool = self.pool.get(model)
res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
- res_id = res_ids and res_ids[0] or False
+ res_id = res_ids and res_ids[0] or False
case = model_pool.browse(cr, uid, res_id)
emails = [obj.email_to] + (obj.email_cc or '').split(',')
emails = filter(None, emails)
@@ -107,7 +107,11 @@ class crm_send_new_email(osv.osv_memory):
body = case_pool.format_body(body)
email_from = getattr(obj, 'email_from', False)
- case_pool._history(cr, uid, [case], _('Send'), history=True, email=obj.email_to, details=body, email_from=email_from, message_id=message_id)
+
+ case_pool._history(cr, uid, [case], _('Send'), history=True, \
+ email=obj.email_to, details=body, \
+ subject=obj.subject, email_from=email_from, \
+ message_id=message_id, attach=attach)
x_headers = dict()
#x_headers = {
diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml
index a625ec4dbc8..7b462646784 100644
--- a/addons/crm_claim/crm_claim_view.xml
+++ b/addons/crm_claim/crm_claim_view.xml
@@ -174,31 +174,38 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_fundraising/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml
index 908e9c7616d..78123fd32b7 100644
--- a/addons/crm_fundraising/crm_fundraising_view.xml
+++ b/addons/crm_fundraising/crm_fundraising_view.xml
@@ -195,18 +195,25 @@
-
-
+
+
+
+
+
+
+
+
+ string="Reply to Last Email"
+ name="%(crm.action_crm_send_mail)d"
+ context="{'mail':'reply', 'model': 'crm.fundraising'}"
+ icon="gtk-undo" type="action" />
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+ string="Reply to Last Email"
+ name="%(crm.action_crm_send_mail)d"
+ context="{'mail':'reply', 'model': 'crm.helpdesk'}"
+ icon="gtk-undo" type="action" />
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/event/wizard/event_make_invoice.py b/addons/event/wizard/event_make_invoice.py
index 1e8505a74e9..e4eacf99d3c 100644
--- a/addons/event/wizard/event_make_invoice.py
+++ b/addons/event/wizard/event_make_invoice.py
@@ -69,7 +69,7 @@ class event_make_invoice(osv.osv_memory):
inv_rej_reason += "ID "+str(reg.id)+": Registration doesn't have any partner to invoice. \n"
continue
else:
- val_invoice = pool_obj.get('account.invoice').onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
+ val_invoice = inv_obj.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
partner_address_id = val_invoice['value']['address_invoice_id']
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index 5a1c0f249ad..8bc24682c5a 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -152,26 +152,33 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 8b2b14c1cb7..7353652820e 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -112,20 +112,27 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
purchase.order
-
- Purchase: Purchase Confirmation
- purchase_open
-
-
Purchase Pricelist
purchase
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index e1a8998e1d3..2be5a50ff81 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -9,16 +9,6 @@
sale.order
-
-
- SALE: Sale Confirmation
- sale_open
-
-
-
-