[REM] sale, purcahse, crm_phonecall, analytic: stop subscribing default subscribed users. Purchase: added monitored field: validator.
bzr revid: tde@openerp.com-20120815201320-gzkzdm14vnni8dsq
This commit is contained in:
parent
af44478ff3
commit
8b616f3302
|
@ -297,7 +297,6 @@ class account_analytic_account(osv.osv):
|
|||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_subscribe(cr, uid, [obj.id], [obj.user_id.id], context=context)
|
||||
self.message_append_note(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), context=context)
|
||||
|
||||
account_analytic_account()
|
||||
|
|
|
@ -271,7 +271,6 @@ class crm_phonecall(base_state, osv.osv):
|
|||
def case_open_send_note(self, cr, uid, ids, context=None):
|
||||
lead_obj = self.pool.get('crm.lead')
|
||||
for phonecall in self.browse(cr, uid, ids, context=context):
|
||||
phonecall.message_subscribe([phonecall.user_id.id], context=context)
|
||||
if phonecall.opportunity_id:
|
||||
lead = phonecall.opportunity_id
|
||||
# convert datetime field to a datetime, using server format, then
|
||||
|
|
|
@ -230,7 +230,7 @@ class mail_thread(osv.Model):
|
|||
# get monitored fields
|
||||
monitored_fields = self.message_get_monitored_follower_fields(cr, uid, ids, context=context)
|
||||
print monitored_fields
|
||||
# for each monitored field: if in record_vals, it has been modified
|
||||
# for each monitored field: if in record_vals, it has been modified/added
|
||||
fields = [field for field in monitored_fields if field in record_vals.iterkeys()]
|
||||
print fields
|
||||
|
||||
|
|
|
@ -738,12 +738,16 @@ class purchase_order(osv.osv):
|
|||
result[obj.id].append(obj.validator.id)
|
||||
return result
|
||||
|
||||
def message_get_monitored_follower_fields(self, cr, uid, ids, context=None):
|
||||
""" Add 'validator' to the monitored fields """
|
||||
res = super(purchase_order, self).message_get_monitored_follower_fields(cr, uid, ids, context=context)
|
||||
return res + ['validator']
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
return self.message_append_note(cr, uid, ids, body=_("Request for quotation <b>created</b>."), context=context)
|
||||
|
||||
def confirm_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_subscribe(cr, uid, [obj.id], [obj.validator.id], context=context)
|
||||
self.message_append_note(cr, uid, [obj.id], body=_("Quotation for <em>%s</em> <b>converted</b> to a Purchase Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
|
||||
|
||||
def shipment_send_note(self, cr, uid, ids, picking_id, context=None):
|
||||
|
|
|
@ -1031,7 +1031,6 @@ class sale_order(osv.osv):
|
|||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_subscribe(cr, uid, [obj.id], [obj.user_id.id], context=context)
|
||||
self.message_append_note(cr, uid, [obj.id], body=_("Quotation for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), context=context)
|
||||
|
||||
def confirm_send_note(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue