diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 51e3d2dbe85..1f47a6be9bd 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 decf9c2aaa6..c6011979f8d 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -982,7 +982,6 @@ class account_invoice(osv.osv): def invoice_validate(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'open'}, context=context) - self.invoice_validate_send_note(cr, uid, ids, context=context) return True def line_get_convert(self, cr, uid, x, part, date, context=None): @@ -1046,7 +1045,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): @@ -1276,7 +1275,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, [inv_id], 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 @@ -1300,10 +1299,6 @@ class account_invoice(osv.osv): for obj in self.browse(cr, uid, ids, context=context): self.message_append_note(cr, uid, [obj.id],body=_("%s created.") % (self._get_document_type(obj.type)), context=context) - def invoice_validate_send_note(self, cr, uid, ids, context=None): - for obj in self.browse(cr, uid, ids, context=context): - self.message_append_note(cr, uid, [obj.id], body=_("%s validated.") % (self._get_document_type(obj.type)), 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_append_note(cr, uid, [obj.id], body=_("%s paid.") % (self._get_document_type(obj.type)), context=context) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index e94857c8536..8254d5183be 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -247,7 +247,7 @@
- +
@@ -352,7 +352,7 @@
- +
diff --git a/addons/account/i18n/ja.po b/addons/account/i18n/ja.po index f4550c3fd69..754305865a8 100644 --- a/addons/account/i18n/ja.po +++ b/addons/account/i18n/ja.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-06-01 05:33+0000\n" +"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n" "X-Generator: Launchpad (build 15342)\n" #. module: account diff --git a/addons/account_bank_statement_extensions/i18n/gu.po b/addons/account_bank_statement_extensions/i18n/gu.po index 6e0e0089341..a1677df4845 100644 --- a/addons/account_bank_statement_extensions/i18n/gu.po +++ b/addons/account_bank_statement_extensions/i18n/gu.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-06-01 05:33+0000\n" +"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n" "X-Generator: Launchpad (build 15342)\n" #. module: account_bank_statement_extensions diff --git a/addons/account_check_writing/i18n/ja.po b/addons/account_check_writing/i18n/ja.po index a9ce55b0cd8..6f65f35354d 100644 --- a/addons/account_check_writing/i18n/ja.po +++ b/addons/account_check_writing/i18n/ja.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-02-08 00:35+0000\n" -"PO-Revision-Date: 2012-05-10 18:14+0000\n" -"Last-Translator: Raphael Collet (OpenERP) \n" +"PO-Revision-Date: 2012-06-01 06:41+0000\n" +"Last-Translator: Akira Hiyama \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-05-11 05:15+0000\n" -"X-Generator: Launchpad (build 15225)\n" +"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n" +"X-Generator: Launchpad (build 15342)\n" #. module: account_check_writing #: selection:res.company,check_layout:0 @@ -100,7 +100,7 @@ msgstr "小切手の振出" #: report:account.print.check.middle:0 #: report:account.print.check.top:0 msgid "Discount" -msgstr "割引き" +msgstr "割引" #. module: account_check_writing #: report:account.print.check.bottom:0 diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index d7d6501926f..bbededc8eaf 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -814,7 +814,6 @@ class calendar_alarm(osv.osv): context = {} mail_message = self.pool.get('mail.message') current_datetime = datetime.now() - request_obj = self.pool.get('res.request') alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context) mail_to = [] @@ -854,26 +853,28 @@ class calendar_alarm(osv.osv): ref = alarm.model_id.model + ',' + str(alarm.res_id) # search for alreay sent requests - if request_obj.search(cr, uid, [('trigger_date', '=', r_date), ('ref_doc1', '=', ref)], context=context): - continue + #if request_obj.search(cr, uid, [('trigger_date', '=', r_date), ('ref_doc1', '=', ref)], context=context): + #continue - if alarm.action == 'display': - value = { - 'name': alarm.name, - 'act_from': alarm.user_id.id, - 'act_to': alarm.user_id.id, - 'body': alarm.description, - 'trigger_date': r_date, - 'ref_doc1': ref - } - request_id = request_obj.create(cr, uid, value) - request_ids = [request_id] - for attendee in res_obj.attendee_ids: - if attendee.user_id: - value['act_to'] = attendee.user_id.id - request_id = request_obj.create(cr, uid, value) - request_ids.append(request_id) - request_obj.request_send(cr, uid, request_ids) + # Deactivated because of the removing of res.request + # TODO: when cleaning calendar module, re-add this in a new mechanism + #if alarm.action == 'display': + #value = { + #'name': alarm.name, + #'act_from': alarm.user_id.id, + #'act_to': alarm.user_id.id, + #'body': alarm.description, + #'trigger_date': r_date, + #'ref_doc1': ref + #} + #request_id = request_obj.create(cr, uid, value) + #request_ids = [request_id] + #for attendee in res_obj.attendee_ids: + #if attendee.user_id: + #value['act_to'] = attendee.user_id.id + #request_id = request_obj.create(cr, uid, value) + #request_ids.append(request_id) + #request_obj.request_send(cr, uid, request_ids) if alarm.action == 'email': sub = '[Openobject Reminder] %s' % (alarm.name) diff --git a/addons/base_synchro/__openerp__.py b/addons/base_synchro/__openerp__.py index a7e0cff1144..73c8cf13258 100644 --- a/addons/base_synchro/__openerp__.py +++ b/addons/base_synchro/__openerp__.py @@ -30,7 +30,7 @@ Synchronization with all objects. Configure servers and trigger synchronization with its database objects. """, - "depends": ["base"], + "depends": ["base", "mail"], "demo_xml": [], "update_xml": [ "wizard/base_synchro_view.xml", diff --git a/addons/base_synchro/wizard/base_synchro.py b/addons/base_synchro/wizard/base_synchro.py index 1192c7768ff..28433b5caac 100644 --- a/addons/base_synchro/wizard/base_synchro.py +++ b/addons/base_synchro/wizard/base_synchro.py @@ -234,7 +234,6 @@ class base_synchro(osv.osv_memory): self.pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt}) end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss') if syn_obj.user_id: - request = pooler.get_pool(cr.dbname).get('res.request') if not self.report: self.report.append('No exception.') summary = '''Here is the synchronization report: @@ -249,12 +248,8 @@ Records created: %d Exceptions: '''% (start_date,end_date,self.report_total, self.report_write,self.report_create) summary += '\n'.join(self.report) - request.create(cr, uid, { - 'name' : "Synchronization report", - 'act_from' : uid, - 'act_to' : syn_obj.user_id.id, - 'body': summary, - }) + # Chatter: old res.request transformed into a message added to the destination user + self.pool.get('res.users').message_append_note(cr, uid, [syn_obj.user_id.id], body=summary, subject=_('Synchronization Report'), context=context) return True def upload_download_multi_thread(self, cr, uid, data, context=None): diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index ee6b9835f02..0b58975bca2 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -228,7 +228,6 @@ class crm_lead(base_stage, osv.osv): When the case is over, the state is set to \'Done\'.\ If the case needs to be reviewed then the state is \ set to \'Pending\'.'), - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]), 'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64), # Only used for type opportunity diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 7d1abbcee0e..9ab2c90c853 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -155,7 +155,7 @@
- +
@@ -498,7 +498,7 @@
- +
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py index 740db3d967f..bc1ab42b3df 100644 --- a/addons/crm/crm_meeting.py +++ b/addons/crm/crm_meeting.py @@ -58,7 +58,6 @@ class crm_meeting(base_state, osv.Model): 'event_id', 'attendee_id', 'Attendees', states={'done': [('readonly', True)]}), 'date_closed': fields.datetime('Closed', readonly=True), 'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}), - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]), 'state': fields.selection([ ('draft', 'Unconfirmed'), ('open', 'Confirmed'), ('cancel', 'Cancelled'), diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index fc4efbad816..88837f92613 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -213,7 +213,7 @@
- +
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index 8c7c3fe72df..9418b05b9ea 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -69,7 +69,6 @@ class crm_phonecall(base_state, osv.osv): 'date_closed': fields.datetime('Closed', readonly=True), 'date': fields.datetime('Date'), 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'), - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]), } def _get_default_state(self, cr, uid, context=None): diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 1826de08970..0e94ceaf20d 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -124,7 +124,7 @@
- +
diff --git a/addons/crm/i18n/nl.po b/addons/crm/i18n/nl.po index 1baa8e962a6..a176db67234 100644 --- a/addons/crm/i18n/nl.po +++ b/addons/crm/i18n/nl.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n" -"PO-Revision-Date: 2012-02-16 14:00+0000\n" +"PO-Revision-Date: 2012-06-01 08:42+0000\n" "Last-Translator: Erwin \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-05-11 04:44+0000\n" -"X-Generator: Launchpad (build 15225)\n" +"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n" +"X-Generator: Launchpad (build 15342)\n" #. module: crm #: view:crm.lead.report:0 @@ -172,7 +172,7 @@ msgstr "Verwachte besluit maand" #. module: crm #: view:crm.lead2opportunity.partner.mass:0 msgid "Assigned Opportunities to" -msgstr "" +msgstr "Toegewezen porspects aan" #. module: crm #: view:crm.lead:0 field:crm.lead,partner_id:0 view:crm.lead.report:0 @@ -599,7 +599,7 @@ msgstr "Einddatum" #. module: crm #: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0 msgid "Schedule/Log a Call" -msgstr "" +msgstr "Plan/Log een gesprek" #. module: crm #: constraint:base.action.rule:0 @@ -792,7 +792,7 @@ msgstr "Doorgaan" #. module: crm #: field:crm.segmentation,som_interval:0 msgid "Days per Period" -msgstr "" +msgstr "Dagen per periode" #. module: crm #: field:crm.meeting,byday:0 @@ -960,7 +960,7 @@ msgstr "Dagen voor openen" #. module: crm #: view:crm.meeting:0 msgid "Show Time as" -msgstr "" +msgstr "Tijd weergeven als" #. module: crm #: view:crm.phonecall2partner:0 @@ -1344,7 +1344,7 @@ msgstr "Schrijfdatum" #. module: crm #: view:crm.meeting:0 msgid "End of Recurrency" -msgstr "" +msgstr "Einde herhaling" #. module: crm #: view:crm.meeting:0 @@ -1907,7 +1907,7 @@ msgstr "Antwoord aan" #. module: crm #: view:crm.case.section:0 msgid "Select Stages for this Sales Team" -msgstr "" +msgstr "Selecteer de fases voor dit verkoopteam" #. module: crm #: view:board.board:0 @@ -2779,7 +2779,7 @@ msgstr "E-mail adres van de contactpersoon" #. module: crm #: field:crm.lead,referred:0 msgid "Referred by" -msgstr "" +msgstr "Gerefereerd door" #. module: crm #: view:crm.lead:0 model:ir.model,name:crm.model_crm_add_note diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index c4e19a19dfd..808ad2e2055 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -115,7 +115,6 @@ class crm_claim(base_stage, osv.osv): When the case is over, the state is set to \'Done\'.\ If the case needs to be reviewed then the state is \ set to \'Pending\'.'), - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]), } _defaults = { @@ -159,6 +158,11 @@ class crm_claim(base_stage, osv.osv): return stage_ids[0] return False + 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 case_refuse(self, cr, uid, ids, context=None): """ Mark the case as refused: state=done and case_refused=True """ for lead in self.browse(cr, uid, ids): @@ -166,7 +170,7 @@ class crm_claim(base_stage, osv.osv): if stage_id: self.case_set(cr, uid, [lead.id], values_to_update={}, new_stage_id=stage_id, context=context) return self.case_refuse_send_note(cr, uid, ids, context=context) - + 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 @@ -241,11 +245,13 @@ class crm_claim(base_stage, osv.osv): """ Override of default prefix for notifications. """ return 'Claim' + def create_send_note(self, cr, uid, ids, context=None): + msg = _('Claim has been created.') + return self.message_append_note(cr, uid, ids, body=msg, context=context) + def case_refuse_send_note(self, cr, uid, ids, context=None): - for id in ids: - msg = _('%s has been refused.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context)) - self.message_append_note(cr, uid, [id], body=msg, context=context) - return True + msg = _('Claim has been refused.') + return self.message_append_note(cr, uid, ids, body=msg, context=context) def stage_set_send_note(self, cr, uid, ids, stage_id, context=None): """ Override of the (void) default notification method. """ diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index f2e40ae34d1..be2a2b818de 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -166,32 +166,12 @@ - - - - - - - - -