diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 5601179e0fc..f8e203356ae 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -127,6 +127,7 @@ class account_bank_statement(osv.osv): _order = "date desc, id desc" _name = "account.bank.statement" _description = "Bank Statement" + _inherit = ['mail.thread'] _columns = { 'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement 'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True), @@ -364,7 +365,7 @@ class account_bank_statement(osv.osv): 'name': st_number, 'balance_end_real': st.balance_end }, context=context) - self.log(cr, uid, st.id, _('Statement %s is confirmed, journal items are created.') % (st_number,)) + self.message_append_note(cr, uid, [st.id], body=_('Statement %s is confirmed, journal items are created.') % (st_number,), context=context) return self.write(cr, uid, ids, {'state':'confirm'}, context=context) def button_cancel(self, cr, uid, ids, context=None): diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index d0f7579a86e..a163d4a645a 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1002,7 +1002,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.log(cr, uid, inv_id, message, context=ctx) + self.message_append_note(cr, uid, [inv_id], body=message, context=context) return True def action_cancel(self, cr, uid, ids, *args): @@ -1232,7 +1232,7 @@ class account_invoice(osv.osv): # TODO: use currency's formatting function msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \ (name, pay_amount, code, invoice.amount_total, code, total, code) - self.log(cr, uid, inv_id, msg) + self.message_append_note(cr, uid, ids, body=msg, context=context) self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context) # Update the stored value (fields.function), so we write to trigger recompute diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 5a9e808bf2d..39d164c15ac 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -243,7 +243,7 @@ - + @@ -338,7 +338,7 @@ - + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 44e866a3341..033e7e5f02f 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -156,7 +156,7 @@
- +
@@ -528,7 +528,7 @@
- +
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index 24799e97421..4c84fef228b 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -211,7 +211,7 @@ - + diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index af49956eda8..ff32825c75e 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -121,7 +121,7 @@ states="cancel" type="object" icon="gtk-convert" /> - + diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 9673ba5e430..fa19af177a6 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -98,6 +98,16 @@ class crm_claim(crm.crm_case, osv.osv): def case_get_note_msg_prefix(self, cr, uid, id, context=None): return 'Claim' + def create(self, cr, uid, vals, context=None): + obj_id = super(crm_claim, self).create(cr, uid, vals, context) + self.create_send_note(cr, uid, [obj_id], context=context) + return obj_id + + def create_send_note(self, cr, uid, ids, context=None): + msg = '%s has been created.' % (self.case_get_note_msg_prefix(cr, uid, ids, context=context)) + self.message_append_note(cr, uid, ids, body=msg, context=context) + return True + def onchange_partner_id(self, cr, uid, ids, part, email=False): """This function returns value of partner address based on partner :param part: Partner's id @@ -116,8 +126,6 @@ class crm_claim(crm.crm_case, osv.osv): for l in self.browse(cr, uid, ids): # When coming from draft override date and stage otherwise just set state if l.state == 'draft': - message = _("The claim '%s' has been opened.") % l.name - self.log(cr, uid, l.id, message) stage_id = self.stage_find(cr, uid, l.section_id.id or False, [('sequence','>',0)]) if stage_id: self.stage_set(cr, uid, [l.id], stage_id) diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 03639fc10e4..193545b11af 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -66,7 +66,8 @@ crm.claim form -
+ + @@ -145,31 +146,12 @@ - - - - - - - - -