[Merge] Merge with main branch.
bzr revid: mdi@tinyerp.com-20120604063834-jbfyvot5fjvc4pz7
This commit is contained in:
commit
dff4b2f2a0
|
@ -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):
|
||||
|
|
|
@ -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 <b>created</b>.") % (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 <b>validated</b>.") % (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 <b>paid</b>.") % (self._get_document_type(obj.type)), context=context)
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -352,7 +352,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-06-01 06:41+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -498,7 +498,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -213,7 +213,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
<field name="description" nolabel="1" colspan="4" />
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -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 <Unknown>\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
|
||||
|
|
|
@ -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 <b>created</b>.')
|
||||
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 <b>refused</b>.') % (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 <b>refused</b>.')
|
||||
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. """
|
||||
|
|
|
@ -166,32 +166,12 @@
|
|||
<field name="resolution" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Communication & History">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="email_from" invisible="1"/>
|
||||
<button
|
||||
string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'mail.compose.message.mode':'reply'}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
</field>
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -23,6 +23,7 @@ from base_status.base_stage import base_stage
|
|||
from crm import crm
|
||||
from crm import wizard
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
wizard.mail_compose_message.SUPPORTED_MODELS.append('crm.fundraising')
|
||||
|
||||
|
@ -76,7 +77,6 @@ class crm_fundraising(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 = {
|
||||
|
@ -122,6 +122,11 @@ class crm_fundraising(base_stage, osv.osv):
|
|||
return stage_ids[0]
|
||||
return False
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(crm_fundraising, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(crm_fundraising,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
@ -146,6 +151,11 @@ class crm_fundraising(base_stage, osv.osv):
|
|||
""" Override of default prefix for notifications. """
|
||||
return 'Fundraising'
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
msg = _('Fundraising has been <b>created</b>.')
|
||||
self.message_append_note(cr, uid, ids, body=msg, context=context)
|
||||
return True
|
||||
|
||||
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]
|
||||
|
|
|
@ -101,29 +101,6 @@
|
|||
<separator colspan="4" string="Notes"/>
|
||||
<field name="description" nolabel="1" colspan="4"/>
|
||||
</page>
|
||||
<page string="Communication & History">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="email_from" invisible="1"/>
|
||||
<button
|
||||
string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
</field>
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="4" string="Misc"/>
|
||||
|
@ -146,6 +123,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -77,7 +77,6 @@ class crm_helpdesk(base_state, osv.osv):
|
|||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf 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 = {
|
||||
|
@ -91,6 +90,11 @@ class crm_helpdesk(base_state, osv.osv):
|
|||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(crm_helpdesk, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(crm_helpdesk,self).message_new(cr, uid, msg_dict, custom_values=custom_values, context=context)
|
||||
|
@ -144,9 +148,15 @@ class crm_helpdesk(base_state, osv.osv):
|
|||
# ******************************
|
||||
# OpenChatter
|
||||
# ******************************
|
||||
|
||||
|
||||
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
|
||||
return 'Helpdesk'
|
||||
""" override of default base_state method. """
|
||||
return 'Case'
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
msg = _('Case has been <b>created</b>.')
|
||||
self.message_append_note(cr, uid, ids, body=msg, context=context)
|
||||
return True
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -84,29 +84,6 @@
|
|||
<separator colspan="4" string="Notes"/>
|
||||
<field name="description" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
<page string="Communication & History">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="email_from" invisible="1"/>
|
||||
<button
|
||||
string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
</field>
|
||||
<button string="Add Internal Note"
|
||||
name="%(crm.action_crm_add_note)d"
|
||||
context="{'model': 'crm.lead' }"
|
||||
icon="terp-document-new" type="action" />
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
icon="terp-mail-message-new" type="action"/>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<group colspan="2" col="2" groups="base.group_no_one">
|
||||
<separator colspan="4" string="Dates"/>
|
||||
|
@ -133,7 +110,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -48,6 +48,7 @@ class event_event(osv.osv):
|
|||
_name = 'event.event'
|
||||
_description = __doc__
|
||||
_order = 'date_begin'
|
||||
_inherit = ['ir.needaction_mixin','mail.thread']
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not ids:
|
||||
|
@ -70,6 +71,11 @@ class event_event(osv.osv):
|
|||
res = self.name_get(cr, uid, ids, context=context)
|
||||
return dict(res)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(event_event, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
""" Reset the state and the registrations while copying an event
|
||||
"""
|
||||
|
@ -82,6 +88,7 @@ class event_event(osv.osv):
|
|||
return super(event_event, self).copy(cr, uid, id, default=default, context=context)
|
||||
|
||||
def button_draft(self, cr, uid, ids, context=None):
|
||||
self.button_draft_send_note(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
|
@ -91,9 +98,11 @@ class event_event(osv.osv):
|
|||
if event_reg.state == 'done':
|
||||
raise osv.except_osv(_('Error!'),_("You have already set a registration for this event as 'Attended'. Please reset it to draft if you want to cancel this event.") )
|
||||
registration.write(cr, uid, reg_ids, {'state': 'cancel'}, context=context)
|
||||
self.button_cancel_send_note(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
def button_done(self, cr, uid, ids, context=None):
|
||||
self.button_done_send_note(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'done'}, context=context)
|
||||
|
||||
def check_registration_limits(self, cr, uid, ids, context=None):
|
||||
|
@ -127,6 +136,7 @@ class event_event(osv.osv):
|
|||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
self.check_registration_limits(cr, uid, ids, context=context)
|
||||
self.button_confirm_send_note(cr, uid, ids, context=context)
|
||||
return self.confirm_event(cr, uid, ids, context=context)
|
||||
|
||||
def _get_register(self, cr, uid, ids, fields, args, context=None):
|
||||
|
@ -256,13 +266,50 @@ class event_event(osv.osv):
|
|||
'register_max': type_info.default_registration_max,
|
||||
}
|
||||
return {'value': dic}
|
||||
|
||||
# ----------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been <b>created</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been <b>cancelled</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
def button_draft_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been set to <b>draft</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
def button_done_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been <b>done</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
def button_confirm_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been <b>confirmed</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
event_event()
|
||||
|
||||
class event_registration(osv.osv):
|
||||
"""Event Registration"""
|
||||
_name= 'event.registration'
|
||||
_description = __doc__
|
||||
_inherit = ['mail.thread','res.partner']
|
||||
_inherit = ['ir.needaction_mixin','mail.thread','res.partner']
|
||||
_columns = {
|
||||
'id': fields.integer('ID'),
|
||||
'origin': fields.char('Source', size=124,readonly=True,help="Name of the sale order which create the registration"),
|
||||
|
@ -293,12 +340,17 @@ class event_registration(osv.osv):
|
|||
|
||||
|
||||
def do_draft(self, cr, uid, ids, context=None):
|
||||
self.do_draft_send_note(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def confirm_registration(self, cr, uid, ids, context=None):
|
||||
self.message_append(cr, uid, ids,_('State set to open'),body_text= _('Open'))
|
||||
return self.write(cr, uid, ids, {'state': 'open'}, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(event_registration, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def registration_open(self, cr, uid, ids, context=None):
|
||||
""" Open Registration
|
||||
|
@ -395,6 +447,27 @@ class event_registration(osv.osv):
|
|||
data.update(d['value'])
|
||||
return {'value': data}
|
||||
|
||||
# ----------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Registration has been <b>created</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
def do_draft_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Registration has been set as <b>draft</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
return True
|
||||
|
||||
event_registration()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -130,7 +130,10 @@
|
|||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -406,7 +409,10 @@
|
|||
</page>
|
||||
|
||||
</notebook>
|
||||
</sheet>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -144,7 +144,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
# Latvian translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-06-01 07:35+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Latvian <lv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n"
|
||||
"X-Generator: Launchpad (build 15342)\n"
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.payslip,move_id:0
|
||||
msgid "Accounting Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.salary.rule,account_tax_id:0
|
||||
msgid "Tax Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.payslip,journal_id:0
|
||||
#: field:hr.payslip.run,journal_id:0
|
||||
msgid "Expense Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:157
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:173
|
||||
#, python-format
|
||||
msgid "Adjustment Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.contract,analytic_account_id:0
|
||||
#: field:hr.salary.rule,analytic_account_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: model:ir.model,name:hr_payroll_account.model_hr_salary_rule
|
||||
msgid "hr.salary.rule"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: model:ir.model,name:hr_payroll_account.model_hr_payslip_run
|
||||
msgid "Payslip Batches"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.contract,journal_id:0
|
||||
msgid "Salary Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: model:ir.model,name:hr_payroll_account.model_hr_payslip
|
||||
msgid "Pay Slip"
|
||||
msgstr "Algas Lapa"
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: constraint:hr.payslip:0
|
||||
msgid "Payslip 'Date From' must be before 'Date To'."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: help:hr.payslip,period_id:0
|
||||
msgid "Keep empty to use the period of the validation(Payslip) date."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:171
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The Expense Journal \"%s\" has not properly configured the Debit Account!"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:155
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The Expense Journal \"%s\" has not properly configured the Credit Account!"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.salary.rule,account_debit:0
|
||||
msgid "Debit Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:102
|
||||
#, python-format
|
||||
msgid "Payslip of %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: model:ir.model,name:hr_payroll_account.model_hr_contract
|
||||
msgid "Contract"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: constraint:hr.contract:0
|
||||
msgid "Error! contract start-date must be lower then contract end-date."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.payslip,period_id:0
|
||||
msgid "Force Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: field:hr.salary.rule,account_credit:0
|
||||
msgid "Credit Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: model:ir.model,name:hr_payroll_account.model_hr_payslip_employees
|
||||
msgid "Generate payslips for all selected employees"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:155
|
||||
#: code:addons/hr_payroll_account/hr_payroll_account.py:171
|
||||
#, python-format
|
||||
msgid "Configuration Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_payroll_account
|
||||
#: view:hr.contract:0
|
||||
#: view:hr.salary.rule:0
|
||||
msgid "Accounting"
|
||||
msgstr ""
|
|
@ -182,7 +182,6 @@ class hr_applicant(base_stage, osv.Model):
|
|||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True),
|
||||
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
|
||||
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."),
|
||||
'description': fields.text('Description'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -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: idea
|
||||
|
|
|
@ -9,3 +9,4 @@ Mail Module documentation topics
|
|||
mail_thread
|
||||
mail_openchatter_howto
|
||||
mail_needaction_howto
|
||||
mail_partner
|
||||
|
|
|
@ -38,7 +38,7 @@ Make your module inheriting from the ``mail.thread`` class.
|
|||
# inherit from mail.thread allows the use of OpenChatter
|
||||
_inherit = ['mail.thread']
|
||||
|
||||
Use the thread viewer widget inside your form view by using the ThreadView widget on the message_ids_social field inherited from mail.thread.
|
||||
Use the thread viewer widget inside your form view by using the ThreadView widget on the message_ids field inherited from mail.thread.
|
||||
|
||||
::
|
||||
|
||||
|
@ -50,7 +50,7 @@ Use the thread viewer widget inside your form view by using the ThreadView widge
|
|||
<field name="arch" type="xml">
|
||||
<form>
|
||||
[...]
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
What is shown
|
||||
==============
|
||||
- for every module which are related to partner show apporopriate message in the partner view like opportunities, sale orders and invoices.
|
||||
|
||||
|
||||
How it is done
|
||||
===============
|
||||
- _inherit = 'mail.thread'
|
||||
|
||||
- Override def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[], context=None) search by the partner
|
|
@ -69,7 +69,8 @@
|
|||
<label string="This group is visible by non members" colspan="2"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"
|
||||
options='{"thread_level": 1}'/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -61,29 +61,29 @@ class mail_thread(osv.osv):
|
|||
'''
|
||||
_name = 'mail.thread'
|
||||
_description = 'Email Thread'
|
||||
|
||||
|
||||
def _get_message_ids(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = self.message_load_ids(cr, uid, [id], context=context)
|
||||
return res
|
||||
|
||||
# OpenChatter: message_ids_social is a dummy field that should not be used
|
||||
|
||||
# OpenChatter: message_ids is a dummy field that should not be used
|
||||
_columns = {
|
||||
'message_ids_social': fields.function(_get_message_ids, method=True,
|
||||
'message_ids': fields.function(_get_message_ids, method=True,
|
||||
type='one2many', obj='mail.message', string='Temp messages', _fields_id = 'res_id'),
|
||||
}
|
||||
|
||||
#------------------------------------------------------
|
||||
# Automatic subscription when creating/reading
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
"""Automatically subscribe the creator"""
|
||||
thread_id = super(mail_thread, self).create(cr, uid, vals, context=context);
|
||||
self.message_subscribe(cr, uid, [thread_id], [uid], context=context)
|
||||
return thread_id;
|
||||
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
"""Automatically subscribe the writer"""
|
||||
if isinstance(ids, (int, long)):
|
||||
|
@ -92,7 +92,7 @@ class mail_thread(osv.osv):
|
|||
if write_res:
|
||||
self.message_subscribe(cr, uid, ids, [uid], context=context)
|
||||
return write_res;
|
||||
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
"""Override unlink, to automatically delete
|
||||
- subscriptions
|
||||
|
@ -111,13 +111,13 @@ class mail_thread(osv.osv):
|
|||
# delete notifications
|
||||
msg_to_del_ids = msg_obj.search(cr, uid, [('model', '=', self._name), ('res_id', 'in', ids)], context=context)
|
||||
msg_obj.unlink(cr, uid, msg_to_del_ids, context=context)
|
||||
|
||||
|
||||
return super(mail_thread, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
|
||||
#------------------------------------------------------
|
||||
# Generic message api
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
def message_create(self, cr, uid, thread_id, vals, context=None):
|
||||
"""OpenSocial: wrapper of mail.message create method
|
||||
- creates the mail.message
|
||||
|
@ -131,15 +131,15 @@ class mail_thread(osv.osv):
|
|||
notification_obj = self.pool.get('mail.notification')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
body = vals.get('body_html', '') if vals.get('subtype', 'plain') == 'html' else vals.get('body_text', '')
|
||||
|
||||
|
||||
# automatically subscribe the writer of the message
|
||||
if vals['user_id']:
|
||||
self.message_subscribe(cr, uid, [thread_id], [vals['user_id']], context=context)
|
||||
|
||||
|
||||
# get users that will get a notification pushed
|
||||
user_to_push_ids = self.message_create_get_notification_user_ids(cr, uid, [thread_id], vals, context=context)
|
||||
user_to_push_from_parse_ids = self.message_parse_users(cr, uid, [thread_id], body, context=context)
|
||||
|
||||
|
||||
# set email_from and email_to for comments and notifications
|
||||
if vals.get('type', False) and vals['type'] == 'comment' or vals['type'] == 'notification':
|
||||
current_user = res_users_obj.browse(cr, uid, [uid], context=context)[0]
|
||||
|
@ -159,24 +159,24 @@ class mail_thread(osv.osv):
|
|||
if email_to:
|
||||
vals['email_to'] = email_to
|
||||
vals['state'] = 'outgoing'
|
||||
|
||||
|
||||
# create message
|
||||
msg_id = message_obj.create(cr, uid, vals, context=context)
|
||||
|
||||
|
||||
# special: if install mode, do not push demo data
|
||||
if context.get('install_mode', False):
|
||||
return True
|
||||
|
||||
|
||||
# push to users
|
||||
for id in user_to_push_ids:
|
||||
notification_obj.create(cr, uid, {'user_id': id, 'message_id': msg_id}, context=context)
|
||||
|
||||
|
||||
return msg_id
|
||||
|
||||
|
||||
def message_create_get_notification_user_ids(self, cr, uid, thread_ids, new_msg_vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
||||
notif_user_ids = []
|
||||
body = new_msg_vals.get('body_html', '') if new_msg_vals.get('subtype', 'plain') == 'html' else new_msg_vals.get('body_text', '')
|
||||
for thread_id in thread_ids:
|
||||
|
@ -193,7 +193,7 @@ class mail_thread(osv.osv):
|
|||
parent_notif_ids = notif_obj.search(cr, uid, [('message_id', '=', new_msg_vals.get('parent_id'))], context=context)
|
||||
parent_notifs = notif_obj.read(cr, uid, parent_notif_ids, context=context)
|
||||
notif_user_ids += [parent_notif['user_id'][0] for parent_notif in parent_notifs]
|
||||
|
||||
|
||||
# remove duplicate entries
|
||||
notif_user_ids = list(set(notif_user_ids))
|
||||
return notif_user_ids
|
||||
|
@ -214,7 +214,7 @@ class mail_thread(osv.osv):
|
|||
for model_name in self.pool.obj_list():
|
||||
model = self.pool.get(model_name)
|
||||
if 'mail.thread' in getattr(model, '_inherit', []):
|
||||
ret_dict[model_name] = model._description
|
||||
ret_dict[model_name] = model._description
|
||||
return ret_dict
|
||||
|
||||
def message_append(self, cr, uid, threads, subject, body_text=None, body_html=None,
|
||||
|
@ -259,7 +259,7 @@ class mail_thread(osv.osv):
|
|||
to determine the model of the thread to
|
||||
update (instead of the current model).
|
||||
"""
|
||||
if context is None:
|
||||
if context is None:
|
||||
context = {}
|
||||
if attachments is None:
|
||||
attachments = {}
|
||||
|
@ -329,7 +329,7 @@ class mail_thread(osv.osv):
|
|||
'headers': headers,
|
||||
'reply_to': reply_to,
|
||||
'original': original, })
|
||||
|
||||
|
||||
new_msg_ids.append(self.message_create(cr, uid, thread.id, data, context=context))
|
||||
return new_msg_ids
|
||||
|
||||
|
@ -390,7 +390,7 @@ class mail_thread(osv.osv):
|
|||
if (cur_iter > max_iter):
|
||||
_logger.warning("Possible infinite loop in _message_add_ancestor_ids. Note that this algorithm is intended to check for cycle in message graph.")
|
||||
return child_ids
|
||||
|
||||
|
||||
def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[], context=None):
|
||||
""" OpenChatter feature: return thread messages ids. It searches in
|
||||
mail.messages where res_id = ids, (res_)model = current model.
|
||||
|
@ -408,13 +408,15 @@ class mail_thread(osv.osv):
|
|||
limit=limit, offset=offset, context=context)
|
||||
if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
|
||||
return msg_ids
|
||||
|
||||
|
||||
def message_load(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[], context=None):
|
||||
""" OpenChatter feature: return thread messages
|
||||
"""
|
||||
msg_ids = self.message_load_ids(cr, uid, ids, limit, offset, domain, ascent, root_ids, context=context)
|
||||
return self.pool.get('mail.message').read(cr, uid, msg_ids, context=context)
|
||||
|
||||
msgs = self.pool.get('mail.message').read(cr, uid, msg_ids, context=context)
|
||||
msgs = sorted(msgs, key=lambda d: (-d['id']))
|
||||
return msgs
|
||||
|
||||
def get_pushed_messages(self, cr, uid, ids, limit=100, offset=0, msg_search_domain=[], ascent=False, root_ids=[], context=None):
|
||||
""" OpenChatter: wall: get messages to display (=pushed notifications)
|
||||
:param domain: domain to add to the search; especially child_of
|
||||
|
@ -442,7 +444,7 @@ class mail_thread(osv.osv):
|
|||
if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
|
||||
msgs = msg_obj.read(cr, uid, msg_ids, context=context)
|
||||
return msgs
|
||||
|
||||
|
||||
#------------------------------------------------------
|
||||
# Email specific
|
||||
#------------------------------------------------------
|
||||
|
@ -534,7 +536,7 @@ class mail_thread(osv.osv):
|
|||
|
||||
def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):
|
||||
"""Called by ``message_process`` when a new message is received
|
||||
for a given thread model, if the message did not belong to
|
||||
for a given thread model, if the message did not belong to
|
||||
an existing thread.
|
||||
The default behavior is to create a new record of the corresponding
|
||||
model (based on some very basic info extracted from the message),
|
||||
|
@ -660,7 +662,7 @@ class mail_thread(osv.osv):
|
|||
The keys used in the returned dict are meant to map
|
||||
to usual names for relationships towards a partner
|
||||
and one of its addresses.
|
||||
|
||||
|
||||
:param email: email address for which a partner
|
||||
should be searched for.
|
||||
:rtype: dict
|
||||
|
@ -685,7 +687,7 @@ class mail_thread(osv.osv):
|
|||
#------------------------------------------------------
|
||||
# Note specific
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
def message_broadcast(self, cr, uid, ids, subject=None, body=None, parent_id=False, type='notification', subtype='html', context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
@ -710,11 +712,11 @@ class mail_thread(osv.osv):
|
|||
for msg_id in msg_ids:
|
||||
notification_obj.create(cr, uid, {'user_id': user.id, 'message_id': msg_id}, context=context)
|
||||
return True
|
||||
|
||||
|
||||
def log(self, cr, uid, id, message, secondary=False, context=None):
|
||||
_logger.warning("log() is deprecated. Please use OpenChatter notification system instead of the res.log mechanism.")
|
||||
self.message_append_note(cr, uid, [id], 'res.log', message, context=context)
|
||||
|
||||
|
||||
def message_append_note(self, cr, uid, ids, subject=None, body=None, parent_id=False, type='notification', subtype='html', context=None):
|
||||
if subject is None:
|
||||
if type == 'notification':
|
||||
|
@ -730,29 +732,29 @@ class mail_thread(osv.osv):
|
|||
body_html = body
|
||||
body_text = body
|
||||
return self.message_append(cr, uid, ids, subject, body_html=body_html, body_text=body_text, parent_id=parent_id, type=type, subtype=subtype, context=context)
|
||||
|
||||
|
||||
#------------------------------------------------------
|
||||
# Subscription mechanism
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
def message_get_subscribers_ids(self, cr, uid, ids, context=None):
|
||||
subscr_obj = self.pool.get('mail.subscription')
|
||||
subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
|
||||
subs = subscr_obj.read(cr, uid, subscr_ids, context=context)
|
||||
return [sub['user_id'][0] for sub in subs]
|
||||
|
||||
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
user_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context)
|
||||
users = self.pool.get('res.users').read(cr, uid, user_ids, fields=['id', 'name', 'avatar'], context=context)
|
||||
return users
|
||||
|
||||
|
||||
def message_is_subscriber(self, cr, uid, ids, user_id = None, context=None):
|
||||
users = self.message_get_subscribers(cr, uid, ids, context=context)
|
||||
sub_user_id = uid if user_id is None else user_id
|
||||
if sub_user_id in [user['id'] for user in users]:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def message_subscribe(self, cr, uid, ids, user_ids = None, context=None):
|
||||
subscription_obj = self.pool.get('mail.subscription')
|
||||
to_subscribe_uids = [uid] if user_ids is None else user_ids
|
||||
|
@ -776,7 +778,7 @@ class mail_thread(osv.osv):
|
|||
#------------------------------------------------------
|
||||
# Notification API
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
def message_remove_pushed_notifications(self, cr, uid, ids, msg_ids, remove_childs=True, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -24,11 +24,32 @@ from osv import fields
|
|||
|
||||
class res_partner(osv.osv):
|
||||
""" Inherits partner and adds CRM information in the partner form """
|
||||
_inherit = 'res.partner'
|
||||
_name = "res.partner"
|
||||
_inherit = ['res.partner', 'mail.thread']
|
||||
_columns = {
|
||||
'emails': fields.one2many('mail.message', 'partner_id', 'Emails', readonly=True, domain=[('email_from','!=',False)]),
|
||||
}
|
||||
|
||||
def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[False], context=None):
|
||||
""" Override of message_load_ids
|
||||
partner discussion page :
|
||||
- messages posted on res.partner, partner_id = partner.id
|
||||
- messages directly sent to partner
|
||||
"""
|
||||
msg_obj = self.pool.get('mail.message')
|
||||
msg_ids = []
|
||||
partner_ids=[]
|
||||
for partner in self.browse(cr, uid, ids, context=context):
|
||||
msg_ids += msg_obj.search(cr, uid, [ ('res_id', '=', partner.id), ('model', '=' ,self._name)] + domain,
|
||||
limit=limit, offset=offset, context=context)
|
||||
if self._name=='res.partner':
|
||||
partner_ids=msg_obj.search(cr, uid, [ ('partner_id', 'in', ids)] + domain,
|
||||
limit=limit, offset=offset, context=context)
|
||||
if partner_ids :
|
||||
msg_ids+= partner_ids
|
||||
if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
|
||||
return msg_ids
|
||||
|
||||
res_partner()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
<page string="History" position="inside">
|
||||
<field name="emails" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<xpath expr="/form/notebook" position="after">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"
|
||||
options='{"thread_level": 1}'/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</field>
|
||||
<xpath expr="/form/sheet" position="after">
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -476,10 +476,12 @@ openerp.mail = function(session) {
|
|||
// QWeb template to use when rendering the object
|
||||
template: 'RecordThread',
|
||||
|
||||
init: function() {
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.see_subscribers = true;
|
||||
this.thread = null;
|
||||
this.params = this.get_definition_options();
|
||||
this.params.thread_level = this.params.thread_level || 0;
|
||||
// datasets
|
||||
this.ds = new session.web.DataSet(this, this.view.model);
|
||||
this.ds_users = new session.web.DataSet(this, 'res.users');
|
||||
|
@ -520,12 +522,8 @@ openerp.mail = function(session) {
|
|||
// create and render Thread widget
|
||||
this.$element.find('div.oe_mail_recthread_left').empty();
|
||||
if (this.thread) this.thread.destroy();
|
||||
// hack: for groups and users
|
||||
if (this.view.model == 'mail.group') thread_level = 1;
|
||||
if (this.view.model == 'res.users') thread_level = 1;
|
||||
else thread_level = 0;
|
||||
this.thread = new mail.Thread(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id, 'uid': this.session.uid,
|
||||
'thread_level': thread_level, 'show_post_comment': true, 'limit': 15});
|
||||
'thread_level': this.params.thread_level, 'show_post_comment': true, 'limit': 15});
|
||||
var thread_done = this.thread.appendTo(this.$element.find('div.oe_mail_recthread_left'));
|
||||
return fetch_sub_done && thread_done;
|
||||
},
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:49+0000\n"
|
||||
"PO-Revision-Date: 2012-05-31 06:17+0000\n"
|
||||
"PO-Revision-Date: 2012-06-02 04:49+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"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:32+0000\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-03 04:47+0000\n"
|
||||
"X-Generator: Launchpad (build 15342)\n"
|
||||
|
||||
#. module: mrp
|
||||
|
@ -387,9 +387,9 @@ msgid ""
|
|||
"sales person creates a sales order, he can relate it to several properties "
|
||||
"and OpenERP will automatically select the BoM to use according the needs."
|
||||
msgstr ""
|
||||
"同じ製品で異なった構築方法を持つ場合、OpenERPのプロパティは製品製造のための正しい部品表を選択するのに使用されます。それぞれの部品表には幾つかのプロ"
|
||||
"パティを割り当てることができます。販売員が販売オーダーを作成した時、彼はそれを幾つかのプロパティに関連付けることができ、そして、OpenERPは要求によっ"
|
||||
"て使用する部品表を自動的に選択します。"
|
||||
"同じ製品で異なった構築方法を持つ場合、OpenERPの属性は製品製造のための正しい部品表を選択するのに使用されます。それぞれの部品表には幾つかの属性を割り"
|
||||
"当てることができます。販売員が販売オーダーを作成した時、彼はそれを幾つかの属性に関連付けることができ、そして、OpenERPは要求によって使用する部品表を"
|
||||
"自動的に選択します。"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.production,picking_id:0
|
||||
|
@ -460,7 +460,7 @@ msgstr "会社名は固有でなければいけません。"
|
|||
msgid ""
|
||||
"Define specific property groups that can be assigned to the properties of "
|
||||
"your bill of materials."
|
||||
msgstr "部品表のプロパティに割り当てることができる特定のプロパティグループを定義して下さい。"
|
||||
msgstr "部品表の属性に割り当てることができる特定の属性グループを定義して下さい。"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.workcenter,costs_cycle:0
|
||||
|
@ -932,7 +932,7 @@ msgstr "時間数"
|
|||
#: view:mrp.property:0
|
||||
#: view:mrp.property.group:0
|
||||
msgid "Property Group"
|
||||
msgstr "プロパティグループ"
|
||||
msgstr "属性グループ"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.production:0
|
||||
|
@ -1601,7 +1601,7 @@ msgstr "承認"
|
|||
#. module: mrp
|
||||
#: view:mrp.property.group:0
|
||||
msgid "Properties categories"
|
||||
msgstr "プロパティの分類"
|
||||
msgstr "属性の分類"
|
||||
|
||||
#. module: mrp
|
||||
#: help:mrp.production.workcenter.line,sequence:0
|
||||
|
@ -2072,7 +2072,7 @@ msgstr "部品表"
|
|||
#: view:procurement.order:0
|
||||
#: field:procurement.order,property_ids:0
|
||||
msgid "Properties"
|
||||
msgstr "プロパティ"
|
||||
msgstr "属性"
|
||||
|
||||
#. module: mrp
|
||||
#: view:mrp.routing.workcenter:0
|
||||
|
@ -2120,12 +2120,12 @@ msgstr "作業オーダー"
|
|||
#. module: mrp
|
||||
#: view:board.board:0
|
||||
msgid "Procurements in Exception"
|
||||
msgstr "例外の調達"
|
||||
msgstr "調達の例外"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,name:mrp.process_transition_minimumstockprocure0
|
||||
msgid "'Minimum stock rule' material"
|
||||
msgstr "材料の最上在庫ルール"
|
||||
msgstr "材料の最小在庫ルール"
|
||||
|
||||
#. module: mrp
|
||||
#: model:ir.model,name:mrp.model_mrp_product_price
|
||||
|
@ -2190,7 +2190,7 @@ msgstr "次の生産オーダー"
|
|||
#: model:ir.actions.act_window,name:mrp.mrp_property_group_action
|
||||
#: model:ir.ui.menu,name:mrp.menu_mrp_property_group_action
|
||||
msgid "Property Groups"
|
||||
msgstr "プロパティグループ"
|
||||
msgstr "属性グループ"
|
||||
|
||||
#. module: mrp
|
||||
#: model:process.transition,note:mrp.process_transition_procurestockableproduct0
|
||||
|
|
|
@ -658,6 +658,8 @@
|
|||
icon="terp-accessories-archiver+"
|
||||
name="%(mrp.action_change_production_qty)d"
|
||||
string="Change Qty" states="ready,confirmed" />
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<label string="" colspan="2"/>
|
||||
<field name="product_uos_qty" groups="product.group_uos"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
|
@ -791,7 +793,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -43,7 +43,7 @@ class procurement_order(osv.osv):
|
|||
cr.execute('update procurement_order set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id))
|
||||
for (id, name) in self.name_get(cr, uid, procurement.id):
|
||||
message = _("Procurement '%s' has an exception: 'No BoM defined for this product !'") % name
|
||||
self.log(cr, uid, id, message)
|
||||
self.message_append_note(cr, uid, [procurement.id], body=message, context=context)
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -97,6 +97,7 @@ class procurement_order(osv.osv):
|
|||
})
|
||||
res[procurement.id] = produce_id
|
||||
self.write(cr, uid, [procurement.id], {'state': 'running'})
|
||||
self.running_send_note(cr, uid, ids, context=context)
|
||||
bom_result = production_obj.action_compute(cr, uid,
|
||||
[produce_id], properties=[x.id for x in procurement.property_ids])
|
||||
wf_service.trg_validate(uid, 'mrp.production', produce_id, 'button_confirm', cr)
|
||||
|
|
|
@ -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: mrp_operations
|
||||
|
|
|
@ -117,7 +117,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -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: mrp_repair
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,407 @@
|
|||
# Japanese translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-06-01 23:22+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-02 05:35+0000\n"
|
||||
"X-Generator: Launchpad (build 15342)\n"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/share_wizard.py:51
|
||||
#, python-format
|
||||
msgid "Please select at least one user to share with"
|
||||
msgstr "共有するためには少なくとも1ユーザと共有して下さい。"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/share_wizard.py:55
|
||||
#, python-format
|
||||
msgid "Please select at least one group to share with"
|
||||
msgstr "共有するためには少なくとも1グループと共有して下さい。"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal,group_id:0
|
||||
msgid "Group"
|
||||
msgstr "グループ"
|
||||
|
||||
#. module: portal
|
||||
#: view:share.wizard:0
|
||||
#: field:share.wizard,group_ids:0
|
||||
msgid "Existing groups"
|
||||
msgstr "既存のグループ"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_res_portal_wizard_user
|
||||
msgid "Portal User Config"
|
||||
msgstr "ポータルユーザ設定"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard.user:0
|
||||
msgid "Portal User"
|
||||
msgstr "ポータルユーザ"
|
||||
|
||||
#. module: portal
|
||||
#: model:res.groups,comment:portal.group_portal_manager
|
||||
msgid ""
|
||||
"Portal managers have access to the portal definitions, and can easily "
|
||||
"configure the users, access rights and menus of portal users."
|
||||
msgstr "ポータルマネジャはポータル定義へアクセスして、ユーザ、アクセス権、ユーザのポータルメニューの設定を簡単にできます。"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,override_menu:0
|
||||
msgid "Enable this option to override the Menu Action of portal users"
|
||||
msgstr "ポータルユーザのメニューアクションを無効にするためにはこのオプションを有効にして下さい。"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.wizard.user,user_email:0
|
||||
msgid "E-mail"
|
||||
msgstr "Eメール"
|
||||
|
||||
#. module: portal
|
||||
#: constraint:res.users:0
|
||||
msgid "The chosen company is not in the allowed companies for this user"
|
||||
msgstr "選択した会社は、このユーザに許された会社ではありません。"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
#: field:res.portal,widget_ids:0
|
||||
msgid "Widgets"
|
||||
msgstr "ウィジェット"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard:0
|
||||
msgid "Send Invitations"
|
||||
msgstr "招待の送信"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
msgid "Widgets Assigned to Users"
|
||||
msgstr "ユーザ割当ウィジット"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,url:0
|
||||
msgid "The url where portal users can connect to the server"
|
||||
msgstr "ポータルユーザがサーバに接続できるURL"
|
||||
|
||||
#. module: portal
|
||||
#: model:res.groups,comment:portal.group_portal_officer
|
||||
msgid "Portal officers can create new portal users with the portal wizard."
|
||||
msgstr "ポータル役員はポータルウィザードを使って新しいポータルユーザを作成できます。"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal.wizard,message:0
|
||||
msgid "This text is included in the welcome email sent to the users"
|
||||
msgstr "このテキストはユーザに送信される歓迎Eメールに含まれます。"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,menu_action_id:0
|
||||
msgid "If set, replaces the standard menu for the portal's users"
|
||||
msgstr "セットした場合、ポータルユーザのための標準メニューを置き換えます。"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.wizard.user,lang:0
|
||||
msgid "Language"
|
||||
msgstr "言語"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
msgid "Portal Name"
|
||||
msgstr "ポータル名"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard.user:0
|
||||
msgid "Portal Users"
|
||||
msgstr "ポータルユーザ"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal,override_menu:0
|
||||
msgid "Override Menu Action of Users"
|
||||
msgstr "ユーザのメニューアクションの無効化"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal,menu_action_id:0
|
||||
msgid "Menu Action"
|
||||
msgstr "メニューアクション"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.wizard.user,name:0
|
||||
msgid "User Name"
|
||||
msgstr "ユーザ名"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,group_id:0
|
||||
msgid "The group corresponding to this portal"
|
||||
msgstr "このポータルに対応するグループ"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_res_portal_widget
|
||||
msgid "Portal Widgets"
|
||||
msgstr "ポータルウィジット"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_res_portal
|
||||
#: model:ir.module.category,name:portal.module_category_portal
|
||||
#: view:res.portal:0
|
||||
#: field:res.portal.widget,portal_id:0
|
||||
#: field:res.portal.wizard,portal_id:0
|
||||
msgid "Portal"
|
||||
msgstr "ポータル"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/portal_wizard.py:35
|
||||
#, python-format
|
||||
msgid "Your OpenERP account at %(company)s"
|
||||
msgstr "%(company)s 上のあなたのOpenERPアカウント"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/portal.py:107
|
||||
#: code:addons/portal/portal.py:184
|
||||
#, python-format
|
||||
msgid "%s Menu"
|
||||
msgstr "%s メニュー"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal.wizard,portal_id:0
|
||||
msgid "The portal in which new users must be added"
|
||||
msgstr "新しいユーザを追加すべきポータル"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_res_portal_wizard
|
||||
msgid "Portal Wizard"
|
||||
msgstr "ポータルウィザード"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,widget_ids:0
|
||||
msgid "Widgets assigned to portal users"
|
||||
msgstr "ポータルユーザ割当ウィザード"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/portal_wizard.py:163
|
||||
#, python-format
|
||||
msgid "(missing url)"
|
||||
msgstr "(不足しているURL)"
|
||||
|
||||
#. module: portal
|
||||
#: view:share.wizard:0
|
||||
#: field:share.wizard,user_ids:0
|
||||
msgid "Existing users"
|
||||
msgstr "既存ユーザ"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.wizard.user,wizard_id:0
|
||||
msgid "Wizard"
|
||||
msgstr "ウィザード"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal.wizard.user,user_email:0
|
||||
msgid ""
|
||||
"Will be used as user login. Also necessary to send the account information "
|
||||
"to new users"
|
||||
msgstr "ユーザログインとして使用されます。新しいユーザへのアカウント情報を送信するためにも必要です。"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal,parent_menu_id:0
|
||||
msgid "Parent Menu"
|
||||
msgstr "親メニュー"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal,url:0
|
||||
msgid "URL"
|
||||
msgstr "URL"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.widget,widget_id:0
|
||||
msgid "Widget"
|
||||
msgstr "ウィジット"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal.wizard.user,lang:0
|
||||
msgid "The language for the user's user interface"
|
||||
msgstr "ユーザのユーザインタフェースのための言語"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard:0
|
||||
msgid "Cancel"
|
||||
msgstr "キャンセル"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
msgid "Website"
|
||||
msgstr "Webサイト"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
msgid "Create Parent Menu"
|
||||
msgstr "親メニュー作成"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard:0
|
||||
msgid ""
|
||||
"The following text will be included in the welcome email sent to users."
|
||||
msgstr "次のテキストはユーザに送信する歓迎Eメールに含まれます。"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/portal_wizard.py:135
|
||||
#, python-format
|
||||
msgid "Email required"
|
||||
msgstr "Eメールは必須"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_res_users
|
||||
msgid "res.users"
|
||||
msgstr ""
|
||||
|
||||
#. module: portal
|
||||
#: constraint:res.portal.wizard.user:0
|
||||
msgid "Invalid email address"
|
||||
msgstr "無効なEメールアドレスです。"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/portal_wizard.py:136
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You must have an email address in your User Preferences to send emails."
|
||||
msgstr "Eメール送信のためのユーザ設定の中にEメールアドレスを持つ必要があります。"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_ir_ui_menu
|
||||
msgid "ir.ui.menu"
|
||||
msgstr ""
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
#: view:res.portal.wizard:0
|
||||
#: field:res.portal.wizard,user_ids:0
|
||||
msgid "Users"
|
||||
msgstr "ユーザ"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.actions.act_window,name:portal.portal_list_action
|
||||
#: model:ir.ui.menu,name:portal.portal_list_menu
|
||||
#: model:ir.ui.menu,name:portal.portal_menu
|
||||
#: view:res.portal:0
|
||||
msgid "Portals"
|
||||
msgstr "ポータル"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal,parent_menu_id:0
|
||||
msgid "The menu action opens the submenus of this menu item"
|
||||
msgstr "メニューアクションはこのメニュー項目のサブメニューを開きます。"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.widget,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr "順序"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.users,partner_id:0
|
||||
msgid "Related Partner"
|
||||
msgstr "関連パートナ"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal:0
|
||||
msgid "Portal Menu"
|
||||
msgstr "ポータルメニュー"
|
||||
|
||||
#. module: portal
|
||||
#: sql_constraint:res.users:0
|
||||
msgid "You can not have two users with the same login !"
|
||||
msgstr "同じログインでは2つのユーザを持てません。"
|
||||
|
||||
#. module: portal
|
||||
#: view:res.portal.wizard:0
|
||||
#: field:res.portal.wizard,message:0
|
||||
msgid "Invitation message"
|
||||
msgstr "招待メッセージ"
|
||||
|
||||
#. module: portal
|
||||
#: code:addons/portal/wizard/portal_wizard.py:36
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Dear %(name)s,\n"
|
||||
"\n"
|
||||
"You have been created an OpenERP account at %(url)s.\n"
|
||||
"\n"
|
||||
"Your login account data is:\n"
|
||||
"Database: %(db)s\n"
|
||||
"User: %(login)s\n"
|
||||
"Password: %(password)s\n"
|
||||
"\n"
|
||||
"%(message)s\n"
|
||||
"\n"
|
||||
"--\n"
|
||||
"OpenERP - Open Source Business Applications\n"
|
||||
"http://www.openerp.com\n"
|
||||
msgstr ""
|
||||
"%(name)s 様、\n"
|
||||
"\n"
|
||||
"あなたのOpenERPアカウントは作成されました。%(url)s\n"
|
||||
"\n"
|
||||
"あなたのログイン情報は次のとおりです:\n"
|
||||
"データベース:%(db)s\n"
|
||||
"ユーザ:%(login)s\n"
|
||||
"パスワード:%(password)s\n"
|
||||
"\n"
|
||||
"%(message)s\n"
|
||||
"\n"
|
||||
"--\n"
|
||||
"OpenERP - Open Source Business Applications\n"
|
||||
"http://www.openerp.com\n"
|
||||
|
||||
#. module: portal
|
||||
#: model:res.groups,name:portal.group_portal_manager
|
||||
msgid "Manager"
|
||||
msgstr "マネジャ"
|
||||
|
||||
#. module: portal
|
||||
#: help:res.portal.wizard.user,name:0
|
||||
msgid "The user's real name"
|
||||
msgstr "ユーザの本名"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.actions.act_window,name:portal.address_wizard_action
|
||||
#: model:ir.actions.act_window,name:portal.partner_wizard_action
|
||||
#: view:res.portal.wizard:0
|
||||
msgid "Add Portal Access"
|
||||
msgstr "ポータルアクセスの追加"
|
||||
|
||||
#. module: portal
|
||||
#: field:res.portal.wizard.user,partner_id:0
|
||||
msgid "Partner"
|
||||
msgstr "パートナ"
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.actions.act_window,help:portal.portal_list_action
|
||||
msgid ""
|
||||
"\n"
|
||||
"A portal helps defining specific views and rules for a group of users (the\n"
|
||||
"portal group). A portal menu, widgets and specific groups may be assigned "
|
||||
"to\n"
|
||||
"the portal's users.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
"ポータルはユーザのグループ(ポータルグループ)のために特定のビューやルールの\n"
|
||||
"定義ができます。ポータルメニュー、ウィジット、特定のグループはポータルユーザに\n"
|
||||
"割り当てることができます。\n"
|
||||
" "
|
||||
|
||||
#. module: portal
|
||||
#: model:ir.model,name:portal.model_share_wizard
|
||||
msgid "Share Wizard"
|
||||
msgstr "共有ウィザード"
|
||||
|
||||
#. module: portal
|
||||
#: model:res.groups,name:portal.group_portal_officer
|
||||
msgid "Officer"
|
||||
msgstr "役員"
|
|
@ -0,0 +1,313 @@
|
|||
# Japanese translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-06-01 23:37+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-03 04:47+0000\n"
|
||||
"X-Generator: Launchpad (build 15342)\n"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.model,name:process.model_process_node
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Process Node"
|
||||
msgstr "処理ノード"
|
||||
|
||||
#. module: process
|
||||
#: help:process.process,active:0
|
||||
msgid ""
|
||||
"If the active field is set to False, it will allow you to hide the process "
|
||||
"without removing it."
|
||||
msgstr "アクティブ項目にFalseを設定すると、処理を削除することなく非表示にできます。"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,menu_id:0
|
||||
msgid "Related Menu"
|
||||
msgstr "関連メニュー"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition,action_ids:0
|
||||
msgid "Buttons"
|
||||
msgstr "ボタン"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Group By..."
|
||||
msgstr "グループ化…"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.node,kind:0
|
||||
msgid "State"
|
||||
msgstr "状態"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
msgid "Kind Of Node"
|
||||
msgstr "ノードの種類"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,help_url:0
|
||||
msgid "Help URL"
|
||||
msgstr "ヘルプURL"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.actions.act_window,name:process.action_process_node_form
|
||||
#: model:ir.ui.menu,name:process.menu_process_node_form
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Process Nodes"
|
||||
msgstr "処理ノード"
|
||||
|
||||
#. module: process
|
||||
#: view:process.process:0
|
||||
#: field:process.process,node_ids:0
|
||||
msgid "Nodes"
|
||||
msgstr "ノード"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: field:process.node,condition_ids:0
|
||||
#: view:process.process:0
|
||||
msgid "Conditions"
|
||||
msgstr "条件"
|
||||
|
||||
#. module: process
|
||||
#: view:process.transition:0
|
||||
msgid "Search Process Transition"
|
||||
msgstr "処理遷移の検索"
|
||||
|
||||
#. module: process
|
||||
#: field:process.condition,node_id:0
|
||||
msgid "Node"
|
||||
msgstr "ノード"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.transition.action,state:0
|
||||
msgid "Workflow Trigger"
|
||||
msgstr "ワークフロートリガー"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition,note:0
|
||||
msgid "Description"
|
||||
msgstr "説明"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.model,name:process.model_process_transition_action
|
||||
msgid "Process Transitions Actions"
|
||||
msgstr "処理遷移アクション"
|
||||
|
||||
#. module: process
|
||||
#: field:process.condition,model_id:0
|
||||
#: view:process.node:0
|
||||
#: field:process.node,model_id:0
|
||||
#: view:process.process:0
|
||||
#: field:process.process,model_id:0
|
||||
msgid "Object"
|
||||
msgstr "オブジェクト"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition,source_node_id:0
|
||||
msgid "Source Node"
|
||||
msgstr "元ノード"
|
||||
|
||||
#. module: process
|
||||
#: view:process.transition:0
|
||||
#: field:process.transition,transition_ids:0
|
||||
msgid "Workflow Transitions"
|
||||
msgstr "ワークフロー遷移"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition.action,action:0
|
||||
msgid "Action ID"
|
||||
msgstr "アクションID"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.model,name:process.model_process_transition
|
||||
#: view:process.transition:0
|
||||
msgid "Process Transition"
|
||||
msgstr "処理遷移"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.model,name:process.model_process_condition
|
||||
msgid "Condition"
|
||||
msgstr "条件"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.transition.action,state:0
|
||||
msgid "Dummy"
|
||||
msgstr "ダミー"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.actions.act_window,name:process.action_process_form
|
||||
#: model:ir.ui.menu,name:process.menu_process_form
|
||||
msgid "Processes"
|
||||
msgstr "処理"
|
||||
|
||||
#. module: process
|
||||
#: field:process.condition,name:0
|
||||
#: field:process.node,name:0
|
||||
#: field:process.process,name:0
|
||||
#: field:process.transition,name:0
|
||||
#: field:process.transition.action,name:0
|
||||
msgid "Name"
|
||||
msgstr "名前"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,transition_in:0
|
||||
msgid "Starting Transitions"
|
||||
msgstr "遷移の始点"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: field:process.node,note:0
|
||||
#: view:process.process:0
|
||||
#: field:process.process,note:0
|
||||
#: view:process.transition:0
|
||||
msgid "Notes"
|
||||
msgstr "注記"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition.action,transition_id:0
|
||||
msgid "Transition"
|
||||
msgstr "遷移"
|
||||
|
||||
#. module: process
|
||||
#: view:process.process:0
|
||||
msgid "Search Process"
|
||||
msgstr "処理検索"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.node,kind:0
|
||||
#: field:process.node,subflow_id:0
|
||||
msgid "Subflow"
|
||||
msgstr "サブフロー"
|
||||
|
||||
#. module: process
|
||||
#: field:process.process,active:0
|
||||
msgid "Active"
|
||||
msgstr "アクティブ"
|
||||
|
||||
#. module: process
|
||||
#: view:process.transition:0
|
||||
msgid "Associated Groups"
|
||||
msgstr "関連グループ"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,model_states:0
|
||||
msgid "States Expression"
|
||||
msgstr "状態式"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.transition.action,state:0
|
||||
msgid "Action"
|
||||
msgstr "アクション"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,flow_start:0
|
||||
msgid "Starting Flow"
|
||||
msgstr "開始フロー"
|
||||
|
||||
#. module: process
|
||||
#: field:process.condition,model_states:0
|
||||
msgid "Expression"
|
||||
msgstr "式"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition,group_ids:0
|
||||
msgid "Required Groups"
|
||||
msgstr "グループは必須"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Incoming Transitions"
|
||||
msgstr "内向き遷移"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition.action,state:0
|
||||
msgid "Type"
|
||||
msgstr "タイプ"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,transition_out:0
|
||||
msgid "Ending Transitions"
|
||||
msgstr "遷移の終点"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.model,name:process.model_process_process
|
||||
#: field:process.node,process_id:0
|
||||
#: view:process.process:0
|
||||
msgid "Process"
|
||||
msgstr "処理"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
msgid "Search ProcessNode"
|
||||
msgstr "処理ノード検索"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Other Conditions"
|
||||
msgstr "他の条件"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.ui.menu,name:process.menu_process
|
||||
msgid "Enterprise Process"
|
||||
msgstr "企業の処理"
|
||||
|
||||
#. module: process
|
||||
#: view:process.transition:0
|
||||
msgid "Actions"
|
||||
msgstr "アクション"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Properties"
|
||||
msgstr "属性"
|
||||
|
||||
#. module: process
|
||||
#: model:ir.actions.act_window,name:process.action_process_transition_form
|
||||
#: model:ir.ui.menu,name:process.menu_process_transition_form
|
||||
msgid "Process Transitions"
|
||||
msgstr "処理遷移"
|
||||
|
||||
#. module: process
|
||||
#: field:process.transition,target_node_id:0
|
||||
msgid "Target Node"
|
||||
msgstr "対象ノード"
|
||||
|
||||
#. module: process
|
||||
#: field:process.node,kind:0
|
||||
msgid "Kind of Node"
|
||||
msgstr "ノードの種類"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Outgoing Transitions"
|
||||
msgstr "外向き遷移"
|
||||
|
||||
#. module: process
|
||||
#: view:process.node:0
|
||||
#: view:process.process:0
|
||||
msgid "Transitions"
|
||||
msgstr "遷移"
|
||||
|
||||
#. module: process
|
||||
#: selection:process.transition.action,state:0
|
||||
msgid "Object Method"
|
||||
msgstr "オブジェクトメソッド"
|
File diff suppressed because it is too large
Load Diff
|
@ -81,6 +81,7 @@ class procurement_order(osv.osv):
|
|||
_name = "procurement.order"
|
||||
_description = "Procurement"
|
||||
_order = 'priority,date_planned desc'
|
||||
_inherit = ['mail.thread']
|
||||
_log_create = False
|
||||
_columns = {
|
||||
'name': fields.char('Reason', size=64, required=True, help='Procurement name.'),
|
||||
|
@ -103,7 +104,7 @@ class procurement_order(osv.osv):
|
|||
" a make to order method."),
|
||||
|
||||
'note': fields.text('Note'),
|
||||
'message': fields.char('Latest error', size=64, help="Exception occurred while computing procurement orders."),
|
||||
'message': fields.char('Latest error', size=124, help="Exception occurred while computing procurement orders."),
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
('cancel','Cancelled'),
|
||||
|
@ -276,7 +277,7 @@ class procurement_order(osv.osv):
|
|||
if not res:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def check_buy(self, cr, uid, ids):
|
||||
""" Checks product type.
|
||||
@return: True or Product Id.
|
||||
|
@ -287,24 +288,26 @@ class procurement_order(osv.osv):
|
|||
if procurement.product_id.product_tmpl_id.supply_method <> 'buy':
|
||||
return False
|
||||
if not procurement.product_id.seller_ids:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No supplier defined for this product !'), procurement.id))
|
||||
message = _('No supplier defined for this product !')
|
||||
self.message_append_note(cr, uid, [procurement.id], body=message)
|
||||
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
|
||||
return False
|
||||
partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement.
|
||||
|
||||
if not partner:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No default supplier defined for this product'), procurement.id))
|
||||
message = _('No default supplier defined for this product')
|
||||
self.message_append_note(cr, uid, [procurement.id], body=message)
|
||||
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
|
||||
return False
|
||||
|
||||
if user.company_id and user.company_id.partner_id:
|
||||
if partner.id == user.company_id.partner_id.id:
|
||||
return False
|
||||
|
||||
address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery']
|
||||
if not address_id:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No address defined for the supplier'), procurement.id))
|
||||
message = _('No address defined for the supplier')
|
||||
self.message_append_note(cr, uid, [procurement.id], body=message)
|
||||
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -346,14 +349,18 @@ class procurement_order(osv.osv):
|
|||
move_obj.action_confirm(cr, uid, [id], context=context)
|
||||
self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1})
|
||||
self.write(cr, uid, ids, {'state': 'confirmed', 'message': ''})
|
||||
self.confirm_send_note(cr, uid, ids, context)
|
||||
return True
|
||||
|
||||
def action_move_assigned(self, cr, uid, ids, context=None):
|
||||
""" Changes procurement state to Running and writes message.
|
||||
@return: True
|
||||
"""
|
||||
message = _('From stock: products assigned.')
|
||||
self.write(cr, uid, ids, {'state': 'running',
|
||||
'message': _('from stock: products assigned.')})
|
||||
'message': message}, context=context)
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
self.running_send_note(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def _check_make_to_stock_service(self, cr, uid, procurement, context=None):
|
||||
|
@ -383,8 +390,9 @@ class procurement_order(osv.osv):
|
|||
message = _("Not enough stock.")
|
||||
|
||||
if message:
|
||||
self.log(cr, uid, procurement.id, _("Procurement '%s' is in exception: ") % (procurement.name) + message)
|
||||
message = _("Procurement '%s' is in exception: ") % (procurement.name) + message
|
||||
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
|
||||
self.message_append_note(cr, uid, [procurement.id], body=message, context=context)
|
||||
return ok
|
||||
|
||||
def action_produce_assign_service(self, cr, uid, ids, context=None):
|
||||
|
@ -393,6 +401,7 @@ class procurement_order(osv.osv):
|
|||
"""
|
||||
for procurement in self.browse(cr, uid, ids, context=context):
|
||||
self.write(cr, uid, [procurement.id], {'state': 'running'})
|
||||
self.running_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
def action_produce_assign_product(self, cr, uid, ids, context=None):
|
||||
|
@ -427,6 +436,7 @@ class procurement_order(osv.osv):
|
|||
if len(todo):
|
||||
move_obj.write(cr, uid, todo, {'state': 'assigned'})
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
self.cancel_send_note(cr, uid, ids, context=None)
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'procurement.order', id, cr)
|
||||
|
@ -451,6 +461,7 @@ class procurement_order(osv.osv):
|
|||
@return: True
|
||||
"""
|
||||
res = self.write(cr, uid, ids, {'state': 'ready'})
|
||||
self.ready_send_note(cr, uid, ids, context=None)
|
||||
return res
|
||||
|
||||
def action_done(self, cr, uid, ids):
|
||||
|
@ -463,11 +474,39 @@ class procurement_order(osv.osv):
|
|||
if procurement.close_move and (procurement.move_id.state <> 'done'):
|
||||
move_obj.action_done(cr, uid, [procurement.move_id.id])
|
||||
res = self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')})
|
||||
self.done_send_note(cr, uid, ids, context=None)
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'procurement.order', id, cr)
|
||||
return res
|
||||
|
||||
# ----------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(procurement_order, 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):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been <b>created</b>."), context=context)
|
||||
|
||||
def confirm_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been <b>confirmed</b>."), context=context)
|
||||
|
||||
def running_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been set to <b>running</b>."), context=context)
|
||||
|
||||
def ready_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been set to <b>ready</b>."), context=context)
|
||||
|
||||
def cancel_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been <b>cancelled</b>."), context=context)
|
||||
|
||||
def done_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Procurement has been <b>done</b>."), context=context)
|
||||
|
||||
procurement_order()
|
||||
|
||||
class StockPicking(osv.osv):
|
||||
|
|
|
@ -96,6 +96,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
import netsvc
|
||||
import pooler
|
||||
from osv import osv
|
||||
from osv import fields
|
||||
from tools.translate import _
|
||||
from tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
|
||||
import tools
|
||||
import netsvc
|
||||
import pooler
|
||||
|
||||
class procurement_order(osv.osv):
|
||||
_inherit = 'procurement.order'
|
||||
|
@ -69,7 +69,7 @@ class procurement_order(osv.osv):
|
|||
cr.commit()
|
||||
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
|
||||
maxdate = (datetime.today() + relativedelta(days=company.schedule_range)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
|
||||
start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
|
||||
start_date = fields.datetime.now()
|
||||
offset = 0
|
||||
report = []
|
||||
report_total = 0
|
||||
|
@ -113,13 +113,14 @@ class procurement_order(osv.osv):
|
|||
proc.product_id.name,))
|
||||
report_except += 1
|
||||
|
||||
|
||||
if use_new_cursor:
|
||||
cr.commit()
|
||||
offset += len(ids)
|
||||
if not ids: break
|
||||
end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
|
||||
end_date = fields.datetime.now()
|
||||
if uid:
|
||||
request = self.pool.get('res.request')
|
||||
# Chatter: old res.request is now a chatter on res.users, id=uid
|
||||
summary = _("""Here is the procurement scheduling report.
|
||||
|
||||
Start Time: %s
|
||||
|
@ -130,12 +131,7 @@ class procurement_order(osv.osv):
|
|||
|
||||
Exceptions:\n""") % (start_date, end_date, report_total, report_except, report_later)
|
||||
summary += '\n'.join(report)
|
||||
request.create(cr, uid,
|
||||
{'name': "Procurement Processing Report.",
|
||||
'act_from': uid,
|
||||
'act_to': uid,
|
||||
'body': summary,
|
||||
})
|
||||
self.pool.get('res.users').message_append_note(cr, uid, [uid], body=summary, context=context)
|
||||
|
||||
if use_new_cursor:
|
||||
cr.commit()
|
||||
|
@ -237,7 +233,6 @@ class procurement_order(osv.osv):
|
|||
orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
|
||||
location_obj = self.pool.get('stock.location')
|
||||
procurement_obj = self.pool.get('procurement.order')
|
||||
request_obj = self.pool.get('res.request')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
report = []
|
||||
offset = 0
|
||||
|
@ -293,12 +288,8 @@ class procurement_order(osv.osv):
|
|||
if use_new_cursor:
|
||||
cr.commit()
|
||||
if user_id and report:
|
||||
request_obj.create(cr, uid, {
|
||||
'name': 'Orderpoint report.',
|
||||
'act_from': user_id,
|
||||
'act_to': user_id,
|
||||
'body': '\n'.join(report)
|
||||
})
|
||||
# Chatter: old res.request is now a chatter on res.users, id=uid
|
||||
self.pool.get('res.users').message_append_note(cr, uid, [user_id], body='\n'.join(report), subject=_('Orderpoint report'), context=context)
|
||||
if use_new_cursor:
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,7 +68,7 @@
|
|||
<field name="type">form</field>
|
||||
<field eval="7" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product">
|
||||
<form string="Product" layout="auto">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="4" col="2">
|
||||
<separator string="Name" colspan="2"/>
|
||||
|
@ -190,7 +190,9 @@
|
|||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -509,7 +509,6 @@ def Project():
|
|||
class task(base_stage, osv.osv):
|
||||
_name = "project.task"
|
||||
_description = "Task"
|
||||
_log_create = True
|
||||
_date_name = "date_start"
|
||||
_inherit = ['ir.needaction_mixin', 'mail.thread']
|
||||
|
||||
|
@ -929,18 +928,6 @@ class task(base_stage, osv.osv):
|
|||
for task in self.browse(cr, uid, ids, context=context):
|
||||
vals = {}
|
||||
project = task.project_id
|
||||
if project:
|
||||
# Send request to project manager
|
||||
if project.warn_manager and project.user_id and (project.user_id.id != uid):
|
||||
request.create(cr, uid, {
|
||||
'name': _("Task '%s' closed") % task.name,
|
||||
'state': 'waiting',
|
||||
'act_from': uid,
|
||||
'act_to': project.user_id.id,
|
||||
'ref_partner_id': task.partner_id.id,
|
||||
'ref_doc1': 'project.task,%d'% (task.id,),
|
||||
'ref_doc2': 'project.project,%d'% (project.id,),
|
||||
}, context=context)
|
||||
for parent_id in task.parent_ids:
|
||||
if parent_id.state in ('pending','draft'):
|
||||
reopen = True
|
||||
|
@ -958,20 +945,8 @@ class task(base_stage, osv.osv):
|
|||
return True
|
||||
|
||||
def do_reopen(self, cr, uid, ids, context=None):
|
||||
request = self.pool.get('res.request')
|
||||
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
project = task.project_id
|
||||
if project and project.warn_manager and project.user_id.id and (project.user_id.id != uid):
|
||||
request.create(cr, uid, {
|
||||
'name': _("Task '%s' set in progress") % task.name,
|
||||
'state': 'waiting',
|
||||
'act_from': uid,
|
||||
'act_to': project.user_id.id,
|
||||
'ref_partner_id': task.partner_id.id,
|
||||
'ref_doc1': 'project.task,%d' % task.id,
|
||||
'ref_doc2': 'project.project,%d' % project.id,
|
||||
}, context=context)
|
||||
self.case_set(cr, uid, [task.id], 'open', {}, context=context)
|
||||
self.case_open_send_note(cr, uid, [task.id], context)
|
||||
return True
|
||||
|
@ -985,18 +960,6 @@ class task(base_stage, osv.osv):
|
|||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
self._check_child_task(cr, uid, ids, context=context)
|
||||
for task in tasks:
|
||||
project = task.project_id
|
||||
if project.warn_manager and project.user_id and (project.user_id.id != uid):
|
||||
request.create(cr, uid, {
|
||||
'name': _("Task '%s' cancelled") % task.name,
|
||||
'state': 'waiting',
|
||||
'act_from': uid,
|
||||
'act_to': project.user_id.id,
|
||||
'ref_partner_id': task.partner_id.id,
|
||||
'ref_doc1': 'project.task,%d' % task.id,
|
||||
'ref_doc2': 'project.project,%d' % project.id,
|
||||
}, context=context)
|
||||
# cancel task
|
||||
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
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<newline/>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -401,7 +401,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -259,7 +259,6 @@ class project_issue(base_stage, osv.osv):
|
|||
multi='compute_day', type="integer", help="Difference in days between last action and current date"),
|
||||
'color': fields.integer('Color Index'),
|
||||
'user_email': fields.related('user_id', 'user_email', type='char', string='User Email', readonly=True),
|
||||
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
'progress': fields.function(_hours_get, string='Progress (%)', multi='hours', group_operator="avg", help="Computed as: Time Spent / Total Time.",
|
||||
|
|
|
@ -126,9 +126,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -45,7 +45,6 @@ There are two common alternatives to configure the mailbox integration:
|
|||
""",
|
||||
"init_xml": [],
|
||||
"update_xml": ["security/ir.model.access.csv",
|
||||
"project_mailgate_view.xml",
|
||||
],
|
||||
'demo_xml': [
|
||||
],
|
||||
|
|
|
@ -26,21 +26,14 @@ import binascii
|
|||
|
||||
|
||||
class project_tasks(osv.osv):
|
||||
_name = "project.task"
|
||||
_inherit = ['mail.thread','project.task']
|
||||
|
||||
_columns = {
|
||||
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True),
|
||||
}
|
||||
_inherit = 'project.task'
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
res_id = super(project_tasks,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
subject = msg.get('subject')
|
||||
body = msg.get('body_text')
|
||||
msg_from = msg.get('from')
|
||||
data = {
|
||||
'name': subject,
|
||||
'description': body,
|
||||
'planned_hours': 0.0,
|
||||
}
|
||||
data.update(self.message_partner_by_email(cr, uid, msg_from))
|
||||
|
@ -48,12 +41,9 @@ class project_tasks(osv.osv):
|
|||
return res_id
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'):
|
||||
data.update({
|
||||
'description': msg['body_text'],
|
||||
})
|
||||
act = 'do_'+default_act
|
||||
|
||||
maps = {
|
||||
maps = {
|
||||
'cost':'planned_hours',
|
||||
}
|
||||
for line in msg['body_text'].split('\n'):
|
||||
|
@ -73,7 +63,7 @@ class project_tasks(osv.osv):
|
|||
|
||||
self.write(cr, uid, ids, data, context=context)
|
||||
getattr(self,act)(cr, uid, ids, context=context)
|
||||
self.message_append_dict(cr, uid, [res_id], msg, context=context)
|
||||
self.message_append_note(cr, uid, [res_id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def message_thread_followers(self, cr, uid, ids, context=None):
|
||||
|
@ -84,37 +74,5 @@ class project_tasks(osv.osv):
|
|||
followers[task.id] = filter(None, task_followers)
|
||||
return followers
|
||||
|
||||
def do_draft(self, cr, uid, ids, context=None):
|
||||
res = super(project_tasks, self).do_draft(cr, uid, ids, context)
|
||||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
self.message_append(cr, uid, tasks, _('Draft'), context=context)
|
||||
return res
|
||||
|
||||
def do_open(self, cr, uid, ids, context=None):
|
||||
res = super(project_tasks, self).do_open(cr, uid, ids, context)
|
||||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
self.message_append(cr, uid, tasks, _('Open'), context=context)
|
||||
return res
|
||||
|
||||
def do_pending(self, cr, uid, ids, context=None):
|
||||
res = super(project_tasks, self).do_pending(cr, uid, ids, context)
|
||||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
self.message_append(cr, uid, tasks, _('Pending'), context=context)
|
||||
return res
|
||||
|
||||
def do_close(self, cr, uid, ids, context=None):
|
||||
res = super(project_tasks, self).do_close(cr, uid, ids, context)
|
||||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
for task in tasks:
|
||||
if task.state == 'done':
|
||||
self.message_append(cr, uid, tasks, _('Done'), context=context)
|
||||
return res
|
||||
|
||||
def do_cancel(self, cr, uid, ids, context=None):
|
||||
res = super(project_tasks, self).do_cancel(cr, uid, ids, context=context)
|
||||
tasks = self.browse(cr, uid, ids, context=context)
|
||||
self.message_append(cr, uid, tasks, _('Cancel'), context=context)
|
||||
return res
|
||||
|
||||
project_tasks()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_task_mailgate_form" model="ir.ui.view">
|
||||
<field name="name">task.mailgate.form</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook/page[@string='Extra Info']" position="before">
|
||||
<page string="History">
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -81,6 +81,7 @@ class procurement_order(osv.osv):
|
|||
'company_id': procurement.company_id.id,
|
||||
},context=context)
|
||||
self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running'}, context=context)
|
||||
self.running_send_note(cr, uid, ids, context=None)
|
||||
return task_id
|
||||
|
||||
procurement_order()
|
||||
|
|
|
@ -44,6 +44,7 @@ class project_scrum_sprint(osv.osv):
|
|||
_name = 'project.scrum.sprint'
|
||||
_description = 'Project Scrum Sprint'
|
||||
_order = 'date_start desc'
|
||||
_inherit = ['mail.thread']
|
||||
def _compute(self, cr, uid, ids, fields, arg, context=None):
|
||||
res = {}.fromkeys(ids, 0.0)
|
||||
progress = {}
|
||||
|
@ -71,28 +72,27 @@ class project_scrum_sprint(osv.osv):
|
|||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
self.cancel_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
def button_draft(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'draft'}, context=context)
|
||||
self.draft_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
def button_open(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'open'}, context=context)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _("The sprint '%s' has been opened.") % (name,)
|
||||
self.log(cr, uid, id, message)
|
||||
self.open_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
def button_close(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'done'}, context=context)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _("The sprint '%s' has been closed.") % (name,)
|
||||
self.log(cr, uid, id, message)
|
||||
self.close_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
def button_pending(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'pending'}, context=context)
|
||||
self.pending_send_note(cr, uid, ids, context=None)
|
||||
return True
|
||||
|
||||
_columns = {
|
||||
|
@ -138,6 +138,33 @@ class project_scrum_sprint(osv.osv):
|
|||
v['date_stop'] = (datetime.now() + relativedelta(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
|
||||
return {'value':v}
|
||||
|
||||
# ----------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(project_scrum_sprint, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def draft_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been set to <b>draft</b>."), context=context)
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>created</b>."), context=context)
|
||||
|
||||
def open_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>opened</b>."), context=context)
|
||||
|
||||
def pending_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been set to <b>pending</b>."), context=context)
|
||||
|
||||
def cancel_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>cancelled</b>."), context=context)
|
||||
|
||||
def close_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>closed</b>."), context=context)
|
||||
|
||||
project_scrum_sprint()
|
||||
|
||||
class project_scrum_product_backlog(osv.osv):
|
||||
|
|
|
@ -307,6 +307,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -24,6 +24,7 @@ from tools.translate import _
|
|||
class backlog_sprint_assign(osv.osv_memory):
|
||||
_name = 'project.scrum.backlog.assign.sprint'
|
||||
_description = 'Assign sprint to backlogs'
|
||||
_inherit = ['mail.thread']
|
||||
_columns = {
|
||||
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint', required=True, help="Select Sprint to assign backlog."),
|
||||
'state_open': fields.boolean('Open Backlog', help="Change the state of product backlogs to open if its in draft state"),
|
||||
|
@ -55,12 +56,12 @@ class backlog_sprint_assign(osv.osv_memory):
|
|||
'remaining_hours':backlog.expected_hours,
|
||||
})
|
||||
message = _("Product Backlog '%s' is converted into Task %d.") %(backlog.name, task_id)
|
||||
self.log(cr, uid, backlog.id, message)
|
||||
self.message_append_note(cr, uid, [backlog.id], body=message, context=context)
|
||||
if data.state_open and backlog.state == "draft":
|
||||
backlog_obj.write(cr, uid, backlog.id, {'state':'open'})
|
||||
sprint = sprint_obj.browse(cr, uid, data.sprint_id.id, context=context)
|
||||
message = _("Product Backlog '%s' is assigned to sprint %s") %(backlog.name, sprint.name)
|
||||
self.log(cr, uid, backlog.id, message)
|
||||
self.message_append_note(cr, uid, [backlog.id], body=message, context=context)
|
||||
backlog_obj.write(cr, uid, backlog_ids, {'sprint_id': data.sprint_id.id}, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
|
|
@ -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-18 15:04+0000\n"
|
||||
"PO-Revision-Date: 2012-06-01 08:41+0000\n"
|
||||
"Last-Translator: Erwin <Unknown>\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:40+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: purchase
|
||||
#: model:process.transition,note:purchase.process_transition_confirmingpurchaseorder0
|
||||
|
@ -113,7 +113,7 @@ msgstr "Te factureren"
|
|||
#. module: purchase
|
||||
#: view:purchase.order.line_invoice:0
|
||||
msgid "Do you want to generate the supplier invoices?"
|
||||
msgstr ""
|
||||
msgstr "Wilt u de leveranciersfacturen genereren?"
|
||||
|
||||
#. module: purchase
|
||||
#: model:ir.actions.act_window,help:purchase.purchase_form_action
|
||||
|
@ -194,7 +194,7 @@ msgstr "Fouten in facturatie"
|
|||
#. module: purchase
|
||||
#: model:product.pricelist,name:purchase.list0
|
||||
msgid "Default Purchase Pricelist"
|
||||
msgstr "Standaard inkoopprijslijst"
|
||||
msgstr "Inkoopprijslijst"
|
||||
|
||||
#. module: purchase
|
||||
#: help:purchase.order,dest_address_id:0
|
||||
|
@ -1849,7 +1849,7 @@ msgstr ""
|
|||
#. module: purchase
|
||||
#: view:purchase.order.group:0
|
||||
msgid "Are you sure you want to merge these orders?"
|
||||
msgstr ""
|
||||
msgstr "Weet u zeker dat u deze orders wilt samenvoegen?"
|
||||
|
||||
#. module: purchase
|
||||
#: model:process.transition,name:purchase.process_transition_purchaseinvoice0
|
||||
|
|
|
@ -371,8 +371,6 @@ class purchase_order(osv.osv):
|
|||
for line in po.order_line:
|
||||
if line.state=='draft':
|
||||
todo.append(line.id)
|
||||
message = _("Purchase order '%s' is confirmed.") % (po.name,)
|
||||
self.log(cr, uid, po.id, message)
|
||||
# current_name = self.name_get(cr, uid, ids)[0][1]
|
||||
self.pool.get('purchase.order.line').action_confirm(cr, uid, todo, context)
|
||||
for id in ids:
|
||||
|
@ -399,7 +397,7 @@ class purchase_order(osv.osv):
|
|||
'account_analytic_id': order_line.account_analytic_id.id or False,
|
||||
}
|
||||
|
||||
def action_cancel_draft(self, cr, uid, ids, *args):
|
||||
def action_cancel_draft(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return False
|
||||
self.write(cr, uid, ids, {'state':'draft','shipped':0})
|
||||
|
@ -408,9 +406,7 @@ class purchase_order(osv.osv):
|
|||
# Deleting the existing instance of workflow for PO
|
||||
wf_service.trg_delete(uid, 'purchase.order', p_id, cr)
|
||||
wf_service.trg_create(uid, 'purchase.order', p_id, cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _("Purchase order '%s' has been set in draft state.") % name
|
||||
self.log(cr, uid, id, message)
|
||||
self.draft_send_note(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, context=None):
|
||||
|
@ -514,8 +510,7 @@ class purchase_order(osv.osv):
|
|||
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
wf_service.trg_validate(uid, 'purchase.order', id, 'purchase_cancel', cr)
|
||||
message = _("Purchase order '%s' is cancelled.") % name
|
||||
self.log(cr, uid, id, message)
|
||||
self.cancel_send_note(cr, uid, ids, context)
|
||||
return True
|
||||
|
||||
def _prepare_order_picking(self, cr, uid, order, context=None):
|
||||
|
@ -771,6 +766,9 @@ class purchase_order(osv.osv):
|
|||
|
||||
def invoice_done_send_note(self, cr, uid, ids, context=None):
|
||||
self.message_append_note(cr, uid, ids, body=_("Invoice <b>paid</b>."), context=context)
|
||||
|
||||
def draft_send_note(self, cr, uid, ids, context=None):
|
||||
return self.message_append_note(cr, uid, ids, body=_("Purchase Order has been set to <b>draft</b>."), context=context)
|
||||
|
||||
def cancel_send_note(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
|
@ -1076,6 +1074,7 @@ class procurement_order(osv.osv):
|
|||
}
|
||||
res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line_vals, context=context)
|
||||
self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]})
|
||||
self.running_send_note(cr, uid, [procurement.id], context=context)
|
||||
return res
|
||||
|
||||
procurement_order()
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_sheet_width">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -512,7 +512,7 @@
|
|||
<field name="inherit_id" ref="procurement.procurement_form_view"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='close_move']" position="before">
|
||||
<xpath expr="/form/sheet/notebook/page/field[@name='close_move']" position="before">
|
||||
<field name="purchase_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -259,7 +259,7 @@ class procurement_order(osv.osv):
|
|||
})],
|
||||
'purchase_ids': [(6,0,[po_id])]
|
||||
})
|
||||
self.write(cr,uid,proc_id,{'requisition_id':requisition_id})
|
||||
self.write(cr,uid,[proc_id],{'requisition_id':requisition_id},context=context)
|
||||
return res
|
||||
|
||||
procurement_order()
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -947,7 +947,7 @@
|
|||
</xpath>
|
||||
<xpath expr="/form/sheet" position="after">
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</data>
|
||||
|
@ -1062,13 +1062,12 @@
|
|||
</xpath>
|
||||
<xpath expr="/form/sheet" position="after">
|
||||
<div class="oe_form_bottom">
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_in_search" model="ir.ui.view">
|
||||
<field name="name">stock.picking.in.search</field>
|
||||
<field name="model">stock.picking.in</field>
|
||||
|
|
|
@ -115,7 +115,8 @@ class procurement_order(osv.osv):
|
|||
if proc.move_id:
|
||||
move_obj.write(cr, uid, [proc.move_id.id],
|
||||
{'location_id':proc.location_id.id})
|
||||
self.write(cr, uid, [proc.id], {'state':'running', 'message':_('Pulled from another location via procurement %d')%proc_id})
|
||||
self.write(cr, uid, [proc.id], {'state':'running', 'message':_('Pulled from another location via procurement %d') % proc_id})
|
||||
self.running_send_note(cr, uid, [proc.id], context=context)
|
||||
|
||||
# trigger direct processing (the new procurement shares the same planned date as the original one, which is already being processed)
|
||||
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_check', cr)
|
||||
|
|
Loading…
Reference in New Issue