diff --git a/addons/account/account.py b/addons/account/account.py
index e11479e4dc0..7ec3bcde2c8 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -111,7 +111,7 @@ class account_payment_term_line(osv.osv):
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
- 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True),
+ 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'),
}
_defaults = {
'value': 'balance',
@@ -1375,7 +1375,7 @@ class account_move(osv.osv):
balance = 0.0
for line in line_ids:
if line[2]:
- balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00)
+ balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
return {'value': {'balance': balance}}
def write(self, cr, uid, ids, vals, context=None):
@@ -2999,6 +2999,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', help="Currency as per company's country."),
'only_one_chart_template': fields.boolean('Only One Chart Template Available'),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Cash and Banks', required=True),
@@ -3009,6 +3010,13 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'purchase_tax_rate': fields.float('Purchase Tax(%)'),
'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sales and purchase rates or use the usual m2o fields. This last choice assumes that the set of tax defined for the chosen template is complete'),
}
+
+ def onchange_company_id(self, cr, uid, ids, company_id, context=None):
+ currency_id = False
+ if company_id:
+ currency_id = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.id
+ return {'value': {'currency_id': currency_id}}
+
def onchange_tax_rate(self, cr, uid, ids, rate=False, context=None):
return {'value': {'purchase_tax_rate': rate or False}}
@@ -3039,6 +3047,13 @@ class wizard_multi_charts_accounts(osv.osv_memory):
res.update({'bank_accounts_id': [{'acc_name': _('Cash'), 'account_type': 'cash'},{'acc_name': _('Bank'), 'account_type': 'bank'}]})
if 'company_id' in fields:
res.update({'company_id': self.pool.get('res.users').browse(cr, uid, [uid], context=context)[0].company_id.id})
+ if 'currency_id' in fields:
+ company_id = res.get('company_id') or False
+ if company_id:
+ company_obj = self.pool.get('res.company')
+ country_id = company_obj.browse(cr, uid, company_id, context=context).country_id.id
+ currency_id = company_obj.on_change_country(cr, uid, company_id, country_id, context=context)['value']['currency_id']
+ res.update({'currency_id': currency_id})
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
if ids:
@@ -3343,6 +3358,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
ir_values_obj = self.pool.get('ir.values')
obj_wizard = self.browse(cr, uid, ids[0])
company_id = obj_wizard.company_id.id
+ self.pool.get('res.company').write(cr, uid, [company_id], {'currency_id': obj_wizard.currency_id.id})
# If the floats for sale/purchase rates have been filled, create templates from them
self._create_tax_templates_from_rates(cr, uid, obj_wizard, company_id, context=context)
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index 8df291a98d1..095d461ff3b 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -430,7 +430,7 @@ class account_bank_statement(osv.osv):
'name': st_number,
'balance_end_real': st.balance_end
}, context=context)
- self.message_append_note(cr, uid, [st.id], body=_('Statement %s is confirmed, journal items are created.') % (st_number,), context=context)
+ self.message_post(cr, uid, [st.id], body=_('Statement %s confirmed, journal items were created.') % (st_number,), context=context)
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
def button_cancel(self, cr, uid, ids, context=None):
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 78ef090ebbe..15027b7a8f6 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -1045,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.message_append_note(cr, uid, [inv_id], body=message, context=context)
+ self.message_post(cr, uid, [inv_id], body=message, context=context)
return True
def action_cancel(self, cr, uid, ids, *args):
@@ -1275,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.message_append_note(cr, uid, [inv_id], body=msg, context=context)
+ self.message_post(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
@@ -1288,24 +1288,25 @@ class account_invoice(osv.osv):
def _get_document_type(self, type):
type_dict = {
- 'out_invoice': 'Customer invoice',
- 'in_invoice': 'Supplier invoice',
- 'out_refund': 'Customer Refund',
- 'in_refund': 'Supplier Refund',
+ # Translation markers will have no effect at runtime, only used to properly flag export
+ 'out_invoice': _('Customer invoice'),
+ 'in_invoice': _('Supplier invoice'),
+ 'out_refund': _('Customer Refund'),
+ 'in_refund': _('Supplier Refund'),
}
return type_dict.get(type, 'Invoice')
def create_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 created .") % (self._get_document_type(obj.type)), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("%s created .") % (_(self._get_document_type(obj.type))), context=context)
def confirm_paid_send_note(self, cr, uid, ids, context=None):
- for obj in self.browse(cr, uid, ids, context=context):
- self.message_append_note(cr, uid, [obj.id], body=_("%s paid .") % (self._get_document_type(obj.type)), context=context)
+ for obj in self.browse(cr, uid, ids, context=context):
+ self.message_post(cr, uid, [obj.id], body=_("%s paid .") % (_(self._get_document_type(obj.type))), context=context)
def invoice_cancel_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 cancelled .") % (self._get_document_type(obj.type)), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("%s cancelled .") % (_(self._get_document_type(obj.type))), context=context)
account_invoice()
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 5b3b5c6378c..ebf6aea5c9e 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -2355,8 +2355,10 @@
-
+
+
+
diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml
index 630c551c5ca..563c3f5fc6c 100644
--- a/addons/account/board_account_view.xml
+++ b/addons/account/board_account_view.xml
@@ -29,7 +29,6 @@
]]>
- '%(object.user_id.email) or ''}
-
-You can view the invoice document, download it and pay online using the following link:
- ${ctx.get('edi_web_url_view') or 'n/a'}
-
-% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
-<%
-comp_name = quote(object.company_id.name)
-inv_number = quote(object.number)
-paypal_account = quote(object.company_id.paypal_account)
-inv_amount = quote(str(object.amount_total))
-cur_name = quote(object.currency_id.name)
-paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s"\
- "&invoice=%s&amount=%s¤cy_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \
- (paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name)
-%>
-It is also possible to directly pay with Paypal:
- ${paypal_url}
-% endif
-
-If you have any question, do not hesitate to contact us.
-
-
-Thank you for choosing ${object.company_id.name}!
-
-
---
-${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
-${object.company_id.name}
-% if object.company_id.street:
-${object.company_id.street or ''}
-% endif
-% if object.company_id.street2:
-${object.company_id.street2}
-% endif
-% if object.company_id.city or object.company_id.zip:
-${object.company_id.zip or ''} ${object.company_id.city or ''}
-% endif
-% if object.company_id.country_id:
-${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
-% endif
-% if object.company_id.phone:
-Phone: ${object.company_id.phone}
-% endif
-% if object.company_id.website:
-${object.company_id.website or ''}
-% endif
- ]]>
diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot
index 174002a8d8d..0d5439719e2 100644
--- a/addons/account/i18n/account.pot
+++ b/addons/account/i18n/account.pot
@@ -9538,7 +9538,7 @@ msgid "Refund"
msgstr ""
#. module: account
-#: model:email.template,body_text:account.email_template_edi_invoice
+#: model:email.template,body:account.email_template_edi_invoice
msgid "\n"
"Hello${object.address_invoice_id.name and ' ' or ''}${object.address_invoice_id.name or ''},\n"
"\n"
diff --git a/addons/account/res_config.py b/addons/account/res_config.py
index 658f87962ff..9674cd0e65c 100644
--- a/addons/account/res_config.py
+++ b/addons/account/res_config.py
@@ -145,42 +145,45 @@ class account_config_settings(osv.osv_memory):
def onchange_company_id(self, cr, uid, ids, company_id):
# update related fields
- company = self.pool.get('res.company').browse(cr, uid, company_id)
- has_chart_of_accounts = company_id not in self.pool.get('account.installer').get_unconfigured_cmp(cr, uid)
- fiscalyear_count = self.pool.get('account.fiscalyear').search_count(cr, uid,
- [('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
- ('company_id', '=', company_id)])
- values = {
- 'expects_chart_of_accounts': company.expects_chart_of_accounts,
- 'currency_id': company.currency_id.id,
- 'paypal_account': company.paypal_account,
- 'company_footer': company.rml_footer2,
- 'has_chart_of_accounts': has_chart_of_accounts,
- 'has_fiscal_year': bool(fiscalyear_count),
- 'chart_template_id': False,
- 'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
- }
- # update journals and sequences
- for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
- for suffix in ('_journal_id', '_sequence_prefix', '_sequence_next'):
- values[journal_type + suffix] = False
- journal_obj = self.pool.get('account.journal')
- journal_ids = journal_obj.search(cr, uid, [('company_id', '=', company_id)])
- for journal in journal_obj.browse(cr, uid, journal_ids):
- if journal.type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
- values.update({
- journal.type + '_journal_id': journal.id,
- journal.type + '_sequence_prefix': journal.sequence_id.prefix,
- journal.type + '_sequence_next': journal.sequence_id.number_next,
- })
- # update taxes
- ir_values = self.pool.get('ir.values')
- taxes_id = ir_values.get_default(cr, uid, 'product.product', 'taxes_id', company_id=company_id)
- supplier_taxes_id = ir_values.get_default(cr, uid, 'product.product', 'supplier_taxes_id', company_id=company_id)
- values.update({
- 'default_sale_tax': isinstance(taxes_id, list) and taxes_id[0] or taxes_id,
- 'default_purchase_tax': isinstance(supplier_taxes_id, list) and supplier_taxes_id[0] or supplier_taxes_id,
- })
+ values = {}
+ values['currency_id'] = False
+ if company_id:
+ company = self.pool.get('res.company').browse(cr, uid, company_id)
+ has_chart_of_accounts = company_id not in self.pool.get('account.installer').get_unconfigured_cmp(cr, uid)
+ fiscalyear_count = self.pool.get('account.fiscalyear').search_count(cr, uid,
+ [('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
+ ('company_id', '=', company_id)])
+ values = {
+ 'expects_chart_of_accounts': company.expects_chart_of_accounts,
+ 'currency_id': company.currency_id.id,
+ 'paypal_account': company.paypal_account,
+ 'company_footer': company.rml_footer2,
+ 'has_chart_of_accounts': has_chart_of_accounts,
+ 'has_fiscal_year': bool(fiscalyear_count),
+ 'chart_template_id': False,
+ 'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
+ }
+ # update journals and sequences
+ for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
+ for suffix in ('_journal_id', '_sequence_prefix', '_sequence_next'):
+ values[journal_type + suffix] = False
+ journal_obj = self.pool.get('account.journal')
+ journal_ids = journal_obj.search(cr, uid, [('company_id', '=', company_id)])
+ for journal in journal_obj.browse(cr, uid, journal_ids):
+ if journal.type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
+ values.update({
+ journal.type + '_journal_id': journal.id,
+ journal.type + '_sequence_prefix': journal.sequence_id.prefix,
+ journal.type + '_sequence_next': journal.sequence_id.number_next,
+ })
+ # update taxes
+ ir_values = self.pool.get('ir.values')
+ taxes_id = ir_values.get_default(cr, uid, 'product.product', 'taxes_id', company_id=company_id)
+ supplier_taxes_id = ir_values.get_default(cr, uid, 'product.product', 'supplier_taxes_id', company_id=company_id)
+ values.update({
+ 'default_sale_tax': isinstance(taxes_id, list) and taxes_id[0] or taxes_id,
+ 'default_purchase_tax': isinstance(supplier_taxes_id, list) and supplier_taxes_id[0] or supplier_taxes_id,
+ })
return {'value': values}
def onchange_chart_template_id(self, cr, uid, ids, chart_template_id, context=None):
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index 02da9a6ab1f..9acc09e9026 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory):
_description = "Account Common Report"
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
+ res = {}
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
- return {'value': {'company_id': company_id}}
+ res['value'] = {'company_id': company_id}
+ return res
_columns = {
'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py
index b4254b5ba84..b5d1cc37776 100644
--- a/addons/account/wizard/pos_box.py
+++ b/addons/account/wizard/pos_box.py
@@ -40,6 +40,10 @@ class CashBox(osv.osv_memory):
return {}
+ def _create_bank_statement_line(self, cr, uid, box, record, context=None):
+ values = self._compute_values_for_statement_line(cr, uid, box, record, context=context)
+ return self.pool.get('account.bank.statement.line').create(cr, uid, values, context=context)
+
class CashBoxIn(CashBox):
_name = 'cash.box.in'
@@ -49,30 +53,24 @@ class CashBoxIn(CashBox):
'ref' : fields.char('Reference', size=32),
})
- def _create_bank_statement_line(self, cr, uid, box, record, context=None):
- absl_proxy = self.pool.get('account.bank.statement.line')
-
- values = {
+ def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
+ return {
'statement_id' : record.id,
'journal_id' : record.journal_id.id,
'account_id' : record.journal_id.internal_account_id.id,
'amount' : box.amount or 0.0,
- 'ref' : "%s" % (box.ref or ''),
+ 'ref' : '%s' % (box.ref or ''),
'name' : box.name,
}
- return absl_proxy.create(cr, uid, values, context=context)
-
CashBoxIn()
class CashBoxOut(CashBox):
_name = 'cash.box.out'
- def _create_bank_statement_line(self, cr, uid, box, record, context=None):
- absl_proxy = self.pool.get('account.bank.statement.line')
-
+ def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
amount = box.amount or 0.0
- values = {
+ return {
'statement_id' : record.id,
'journal_id' : record.journal_id.id,
'account_id' : record.journal_id.internal_account_id.id,
@@ -80,6 +78,4 @@ class CashBoxOut(CashBox):
'name' : box.name,
}
- return absl_proxy.create(cr, uid, values, context=context)
-
CashBoxOut()
diff --git a/addons/account_accountant/account_accountant_data.xml b/addons/account_accountant/account_accountant_data.xml
index 383b53cf49e..5b563017c62 100644
--- a/addons/account_accountant/account_accountant_data.xml
+++ b/addons/account_accountant/account_accountant_data.xml
@@ -21,13 +21,14 @@
-
-
-
- Module Accounting and Finance has been installed.
- With OpenERP's accounting, you can get an instant access to all your financial data, setup your analytic accounting, forecast your taxes, control your budgets, easily create and send invoices, record bank statements, etc.
+
+ mail.group
+
+ notification
+ Accounting and Finance application installed!
+ With OpenERP's accounting, you get instant access to your financial data, and can setup analytic accounting, forecast taxes, control budgets, easily create and send invoices, record bank statements, etc.
-The accounting features are fully integrated with others OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.
-
+The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.
+
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index d151d2171a4..1e84681b1ea 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -213,8 +213,6 @@ class account_followup_print_all(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
move_obj = self.pool.get('account.move.line')
user_obj = self.pool.get('res.users')
- line_obj = self.pool.get('account_followup.stat')
- mail_message = self.pool.get('mail.message')
if context is None:
context = {}
@@ -235,13 +233,7 @@ class account_followup_print_all(osv.osv_memory):
total_amt += line.debit - line.credit
dest = False
if partner:
- if partner.type=='contact':
- if adr.email:
- dest = [partner.email]
- if (not dest) and partner.type=='default':
- if partner.email:
- dest = [partner.email]
- src = tools.config.options['email_from']
+ dest = [partner.email]
if not data.partner_lang:
body = data.email_body
else:
@@ -281,7 +273,12 @@ class account_followup_print_all(osv.osv_memory):
msg = ''
if dest:
try:
- mail_message.schedule_with_attach(cr, uid, src, dest, sub, body, context=context)
+ vals = {'state': 'outgoing',
+ 'subject': sub,
+ 'body_html': '%s ' % body,
+ 'email_to': dest,
+ 'email_from': data_user.email or tools.config.options['email_from']}
+ self.pool.get('mail.mail').create(cr, uid, vals, context=context)
msg_sent += partner.name + '\n'
except Exception, e:
raise osv.except_osv('Error !', e )
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index cb2e93705bb..d8e59cf863a 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -1299,17 +1299,17 @@ class account_voucher(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s created ." % self._document_type[obj.type or False]
- self.message_append_note(cr, uid, [obj.id], body=message, context=context)
+ self.message_post(cr, uid, [obj.id], body=message, context=context)
def post_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s '%s' is posted ." % (self._document_type[obj.type or False], obj.move_id.name)
- self.message_append_note(cr, uid, [obj.id], body=message, context=context)
+ self.message_post(cr, uid, [obj.id], body=message, context=context)
def reconcile_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s reconciled ." % self._document_type[obj.type or False]
- self.message_append_note(cr, uid, [obj.id], body=message, context=context)
+ self.message_post(cr, uid, [obj.id], body=message, context=context)
account_voucher()
diff --git a/addons/account_voucher/account_voucher_data.xml b/addons/account_voucher/account_voucher_data.xml
index 8be2851a434..656d2c2cd91 100644
--- a/addons/account_voucher/account_voucher_data.xml
+++ b/addons/account_voucher/account_voucher_data.xml
@@ -2,15 +2,16 @@
-
-
-
- Module eInvoicing & Payments has been installed.
- OpenERP's electronic invoicing allows to ease and fasten the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.
+
+ mail.group
+
+ notification
+ eInvoicing & Payments application installed!
+ OpenERP's electronic invoicing accelerates the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.
-You can track customer payments easily and automate the reminders. You get an overview of the discussion with your customers on each invoice to ensure a full traceability.
+You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability.
-If you want to use advanced accounting features, you should install the "Accounting and Finance" module.
-
+For advanced accounting features, you should install the "Accounting and Finance" module.
+
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index 7eeb9266e47..d90e2006a71 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -297,7 +297,7 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_append_note(cr, uid, [obj.id], body=_("Contract for %s has been created .") % (obj.partner_id.name), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Contract for %s has been created .") % (obj.partner_id.name), context=context)
account_analytic_account()
diff --git a/addons/auth_openid/static/src/xml/auth_openid.xml b/addons/auth_openid/static/src/xml/auth_openid.xml
index aa61d161657..6a40439a012 100644
--- a/addons/auth_openid/static/src/xml/auth_openid.xml
+++ b/addons/auth_openid/static/src/xml/auth_openid.xml
@@ -4,7 +4,7 @@
- %s ' % body,
+ 'res_id': obj.id,
+ 'model': obj._table_name,
+ 'auto_delete': True
+ }, context=context)
def do_check(self, cr, uid, action, obj, context=None):
@@ -438,11 +432,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
if len(emails) and action.act_mail_body:
emails = list(set(emails))
email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
-
- def to_email(text):
- return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
- emails = to_email(','.join(filter(None, emails)))
- email_froms = to_email(email_from)
+ emails = tools.email_split(','.join(filter(None, emails)))
+ email_froms = tools.email_split(email_from)
if email_froms:
self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
return True
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index be3244f8a5b..a6d5f6859af 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -471,18 +471,10 @@ property or property parameter."),
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None):
"""
Send mail for event invitation to event attendees.
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of attendee’s IDs.
@param email_from: Email address for user sending the mail
- @param context: A standard dictionary for contextual values
@return: True
"""
- if context is None:
- context = {}
-
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name
- mail_message = self.pool.get('mail.message')
for att in self.browse(cr, uid, ids, context=context):
sign = att.sent_by_uid and att.sent_by_uid.signature or ''
sign = ' '.join(sign and sign.split('\n') or [])
@@ -508,17 +500,18 @@ property or property parameter."),
}
body = html_invitation % body_vals
if mail_to and email_from:
- attach = self.get_ics_file(cr, uid, res_obj, context=context)
- mail_message.schedule_with_attach(cr, uid,
- email_from,
- mail_to,
- sub,
- body,
- attachments=attach and {'invitation.ics': attach} or None,
- content_subtype='html',
- reply_to=email_from,
- context=context
- )
+ ics_file = self.get_ics_file(cr, uid, res_obj, context=context)
+ vals = {'email_from': email_from,
+ 'email_to': mail_to,
+ 'state': 'outgoing',
+ 'subject': sub,
+ 'body_html': body,
+ 'auto_delete': True}
+ if ics_file:
+ vals['attachment_ids'] = [(0,0,{'name': 'invitation.ics',
+ 'datas_fname': 'invitation.ics',
+ 'datas': str(ics_file).encode('base64')})]
+ self.pool.get('mail.mail').create(cr, uid, vals, context=context)
return True
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
@@ -812,7 +805,6 @@ class calendar_alarm(osv.osv):
"""
if context is None:
context = {}
- mail_message = self.pool.get('mail.message')
current_datetime = datetime.now()
alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
@@ -849,36 +841,10 @@ class calendar_alarm(osv.osv):
else:
re_dates = [alarm.trigger_date]
- for r_date in re_dates:
- 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
-
- # 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 re_dates:
if alarm.action == 'email':
- sub = '[Openobject Reminder] %s' % (alarm.name)
- body = """
+ sub = '[OpenERP Reminder] %s' % (alarm.name)
+ body = """
Event: %s
Event Date: %s
Description: %s
@@ -888,20 +854,21 @@ From:
----
%s
-
+
""" % (alarm.name, alarm.trigger_date, alarm.description, \
alarm.user_id.name, alarm.user_id.signature)
mail_to = [alarm.user_id.email]
for att in alarm.attendee_ids:
mail_to.append(att.user_id.email)
if mail_to:
- mail_message.schedule_with_attach(cr, uid,
- tools.config.get('email_from', False),
- mail_to,
- sub,
- body,
- context=context
- )
+ vals = {
+ 'state': 'outgoing',
+ 'subject': sub,
+ 'body_html': body,
+ 'email_to': mail_to,
+ 'email_from': tools.config.get('email_from', mail_to),
+ }
+ self.pool.get('mail.mail').create(cr, uid, vals, context=context)
if next_trigger_date:
update_vals.update({'trigger_date': next_trigger_date})
else:
@@ -1616,36 +1583,6 @@ class calendar_todo(osv.osv):
calendar_todo()
-class ir_attachment(osv.osv):
- _name = 'ir.attachment'
- _inherit = 'ir.attachment'
-
- def search_count(self, cr, user, args, context=None):
- new_args = []
- for domain_item in args:
- if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id':
- new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2])))
- else:
- new_args.append(domain_item)
- return super(ir_attachment, self).search_count(cr, user, new_args, context)
-
- def create(self, cr, uid, vals, context=None):
- if context:
- id = context.get('default_res_id', False)
- context.update({'default_res_id' : base_calendar_id2real_id(id)})
- return super(ir_attachment, self).create(cr, uid, vals, context=context)
-
- def search(self, cr, uid, args, offset=0, limit=None, order=None,
- context=None, count=False):
- new_args = []
- for domain_item in args:
- if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id':
- new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2])))
- else:
- new_args.append(domain_item)
- return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
- limit=limit, order=order, context=context, count=False)
-ir_attachment()
class ir_values(osv.osv):
_inherit = 'ir.values'
diff --git a/addons/base_calendar/crm_meeting.py b/addons/base_calendar/crm_meeting.py
index cb96ff2a4d0..e1c66148ae7 100644
--- a/addons/base_calendar/crm_meeting.py
+++ b/addons/base_calendar/crm_meeting.py
@@ -43,7 +43,7 @@ class crm_meeting(base_state, osv.Model):
_name = 'crm.meeting'
_description = "Meeting"
_order = "id desc"
- _inherit = ["calendar.event", 'ir.needaction_mixin', "mail.thread"]
+ _inherit = ["calendar.event", "mail.thread", 'ir.needaction_mixin']
_columns = {
# base_state required fields
'create_date': fields.datetime('Creation Date', readonly=True),
@@ -70,13 +70,17 @@ class crm_meeting(base_state, osv.Model):
# OpenChatter
# ----------------------------------------
+ # shows events of the day for this user
+ def needaction_domain_get(self, cr, uid, domain=[], context={}):
+ return [('date','<=',time.strftime('%Y-%M-%D 23:59:59')), ('date_deadline','>=', time.strftime('%Y-%M-%D 00:00:00')), ('user_id','=',uid)]
+
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Meeting'
def case_open_send_note(self, cr, uid, ids, context=None):
- return self.message_append_note(cr, uid, ids, body=_("Meeting has been confirmed ."), context=context)
+ return self.message_post(cr, uid, ids, body=_("Meeting confirmed ."), context=context)
def case_close_send_note(self, cr, uid, ids, context=None):
- return self.message_append_note(cr, uid, ids, body=_("Meeting has been done ."), context=context)
+ return self.message_post(cr, uid, ids, body=_("Meeting completed ."), context=context)
diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml
index 6009251a460..928f8d94d5c 100644
--- a/addons/base_calendar/crm_meeting_view.xml
+++ b/addons/base_calendar/crm_meeting_view.xml
@@ -170,7 +170,8 @@
@@ -182,17 +183,16 @@
+ />
+ type="object" />
+ type="object" />
@@ -200,16 +200,16 @@
+ string="Uncertain" />
+ string="Accept" />
+ string="Decline" />
@@ -244,13 +244,13 @@
CRM - Meetings Tree
crm.meeting
-
+
-
+
@@ -287,9 +287,9 @@
-
+
-
+
diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py
index 775de51394c..529e70fdb49 100644
--- a/addons/base_status/base_stage.py
+++ b/addons/base_status/base_stage.py
@@ -297,55 +297,31 @@ class base_stage(object):
destination=False)
def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True):
- mail_message = self.pool.get('mail.message')
- for case in self.browse(cr, uid, ids, context=context):
- if not destination and not case.email_from:
- return False
- if not case.user_id.email:
- return False
- if destination and case.section_id.user_id:
- case_email = case.section_id.user_id.email
- else:
- case_email = case.user_id.email
-
- src = case_email
- dest = case.user_id.email or ""
- body = case.description or ""
- for message in case.message_ids:
- if message.email_from and message.body_text:
- body = message.body_text
- break
-
- if not destination:
- src, dest = dest, case.email_from
- if body and case.user_id.signature:
- if body:
- body += '\n\n%s' % (case.user_id.signature)
- else:
- body = '\n\n%s' % (case.user_id.signature)
-
- body = self.format_body(body)
-
- attach_to_send = {}
-
- if attach:
- attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
- attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
- attach_to_send = dict(map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send))
-
- # Send an email
- subject = "Reminder: [%s] %s" % (str(case.id), case.name, )
- mail_message.schedule_with_attach(cr, uid,
- src,
- [dest],
- subject,
- body,
- model=self._name,
- reply_to=case.section_id.reply_to,
- res_id=case.id,
- attachments=attach_to_send,
- context=context
- )
+ if 'message_post' in self:
+ for case in self.browse(cr, uid, ids, context=context):
+ if destination:
+ recipient_id = case.user_id.partner_id.id
+ else:
+ if not case.email_from:
+ return False
+ recipient_id = self.pool.get('res.partner').find_or_create(cr, uid, case.email_from, context=context)
+
+ body = case.description or ""
+ for message in case.message_ids:
+ if message.type == 'email' and message.body:
+ body = message.body
+ break
+ body = self.format_body(body)
+ attach_to_send = {}
+ if attach:
+ attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
+ attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
+ attach_to_send = dict(map(lambda x: (x['datas_fname'], x['datas'].decode('base64')), attach_to_send))
+
+ subject = "Reminder: [%s] %s" % (case.id, case.name)
+ self.message_post(cr, uid, case.id, body=body,
+ subject=subject, attachments=attach_to_send,
+ partner_ids=[recipient_id], context=context)
return True
def _check(self, cr, uid, ids=False, context=None):
@@ -360,17 +336,6 @@ class base_stage(object):
def format_mail(self, obj, body):
return self.pool.get('base.action.rule').format_mail(obj, body)
- def message_thread_followers(self, cr, uid, ids, context=None):
- res = {}
- for case in self.browse(cr, uid, ids, context=context):
- l=[]
- if case.email_cc:
- l.append(case.email_cc)
- if case.user_id and case.user_id.email:
- l.append(case.user_id.email)
- res[case.id] = l
- return res
-
# ******************************
# Notifications
# ******************************
@@ -395,31 +360,31 @@ class base_stage(object):
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been opened .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been closed .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been canceled .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s is now pending .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been renewed .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
@@ -428,5 +393,5 @@ class base_stage(object):
msg = '%s has been escalated to %s .' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
msg = '%s has been escalated .' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
diff --git a/addons/base_status/base_state.py b/addons/base_status/base_state.py
index 8fa2f92e22a..cebf5537485 100644
--- a/addons/base_status/base_state.py
+++ b/addons/base_status/base_state.py
@@ -179,13 +179,13 @@ class base_state(object):
# Notifications
# ******************************
- def case_get_note_msg_prefix(self, cr, uid, id, context=None):
- return ''
-
+ def case_get_note_msg_prefix(self, cr, uid, id, context=None):
+ return ''
+
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been opened .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
@@ -194,29 +194,29 @@ class base_state(object):
msg = '%s has been escalated to %s .' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
msg = '%s has been escalated .' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been closed .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been canceled .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s is now pending .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been renewed .') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=msg, context=context)
+ self.message_post(cr, uid, [id], body=msg, context=context)
return True
diff --git a/addons/base_vat/i18n/es_MX.po b/addons/base_vat/i18n/es_MX.po
index 57d269be72d..cd511c528b0 100644
--- a/addons/base_vat/i18n/es_MX.po
+++ b/addons/base_vat/i18n/es_MX.po
@@ -1,70 +1,54 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * base_vat
+# Spanish (Mexico) 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 , 2012.
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 6.0dev\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2011-01-11 11:14+0000\n"
-"PO-Revision-Date: 2010-12-25 18:58+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"\n"
-"Language-Team: \n"
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-09-07 00:31+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Spanish (Mexico) \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-09-05 05:10+0000\n"
-"X-Generator: Launchpad (build 13830)\n"
+"X-Launchpad-Export-Date: 2012-09-08 04:54+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: base_vat
-#: code:addons/base_vat/base_vat.py:87
+#: code:addons/base_vat/base_vat.py:141
#, python-format
msgid ""
-"The Vat does not seems to be correct. You should have entered something like "
-"this %s"
-msgstr ""
-"El CIF/NIF parece que no sea correcto. Debería haber introducido algo como "
-"esto %s"
+"This VAT number does not seem to be valid.\n"
+"Note: the expected format is %s"
+msgstr "El RFC no es válido. El formato esperado es %s"
#. module: base_vat
-#: model:ir.module.module,description:base_vat.module_meta_information
-msgid ""
-"\n"
-" Enable the VAT Number for the partner. Check the validity of that VAT "
-"Number.\n"
-"\n"
-" This module follows the methods stated at http://sima-pc.com/nif.php "
-"for\n"
-" checking the validity of VAT Number assigned to partners in European "
-"countries.\n"
-" "
+#: sql_constraint:res.company:0
+msgid "The company name must be unique !"
msgstr ""
-"\n"
-" Permite la validación del CIF/NIF de las empresas. Comprueba si el "
-"CIF/NIF es un número válido.\n"
-"\n"
-" Este módulo usa los métodos especificados en http://sima-pc.com/nif.php "
-"para\n"
-" la validación del CIF/NIF asignado a las empresas de los países "
-"europeos.\n"
-" "
-
-#. module: base_vat
-#: model:ir.module.module,shortdesc:base_vat.module_meta_information
-msgid "Base VAT - To check VAT number validity"
-msgstr "Base CIF/NIF - Para comprobar la validez de los CIF/NIF"
#. module: base_vat
#: constraint:res.partner:0
-msgid "Error ! You can not create recursive associated members."
-msgstr "¡Error! No puede crear miembros asociados recursivos."
+msgid "Error ! You cannot create recursive associated members."
+msgstr ""
#. module: base_vat
-#: code:addons/base_vat/base_vat.py:88
-#, python-format
-msgid "The VAT is invalid, It should begin with the country code"
-msgstr "El CIF/NIF no es válido, debería empezar con el código del país"
+#: field:res.company,vat_check_vies:0
+msgid "VIES VAT Check"
+msgstr ""
+
+#. module: base_vat
+#: model:ir.model,name:base_vat.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: base_vat
+#: constraint:res.company:0
+msgid "Error! You can not create recursive companies."
+msgstr ""
#. module: base_vat
#: help:res.partner,vat_subjected:0
@@ -72,27 +56,20 @@ msgid ""
"Check this box if the partner is subjected to the VAT. It will be used for "
"the VAT legal statement."
msgstr ""
-"Marque esta opción si la empresa está sujeta al IVA. Será utilizado para la "
-"declaración legal del IVA."
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_partner
msgid "Partner"
-msgstr "Empresa"
+msgstr ""
+
+#. module: base_vat
+#: help:res.company,vat_check_vies:0
+msgid ""
+"If checked, Partners VAT numbers will be fully validated against EU's VIES "
+"service rather than via a simple format validation (checksum)."
+msgstr ""
#. module: base_vat
#: field:res.partner,vat_subjected:0
msgid "VAT Legal Statement"
-msgstr "Sujeto a IVA"
-
-#~ msgid "Invalid XML for View Architecture!"
-#~ msgstr "¡XML inválido para la definición de la vista!"
-
-#~ msgid ""
-#~ "Enable the VAT Number for the partner. Check the validity of that VAT Number."
-#~ msgstr ""
-#~ "Activa el IVA (Impuesto Valor Añadido) para la empresa. Comprueba la validez "
-#~ "del CIF/NIF."
-
-#~ msgid "VAT"
-#~ msgstr "IVA"
+msgstr ""
diff --git a/addons/board/__openerp__.py b/addons/board/__openerp__.py
index f07878717fd..2690012f3b4 100644
--- a/addons/board/__openerp__.py
+++ b/addons/board/__openerp__.py
@@ -28,9 +28,7 @@
Lets the user create a custom dashboard.
========================================
-This module also creates the Administration Dashboard.
-
-The user can also publish notes.
+Allows users to create custom dashboard.
""",
'author': 'OpenERP SA',
'depends': ['base'],
diff --git a/addons/board/i18n/nb.po b/addons/board/i18n/nb.po
new file mode 100644
index 00000000000..2d759af27d1
--- /dev/null
+++ b/addons/board/i18n/nb.po
@@ -0,0 +1,348 @@
+# Norwegian Bokmal 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 , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-09-06 14:01+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:58+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
+
+#. module: board
+#: view:res.log.report:0
+msgid " Year "
+msgstr " År "
+
+#. module: board
+#: model:ir.model,name:board.model_board_menu_create
+msgid "Menu Create"
+msgstr "Meny laget"
+
+#. module: board
+#: view:board.menu.create:0
+msgid "Menu Information"
+msgstr "Meny informasjon"
+
+#. module: board
+#: view:res.users:0
+msgid "Latest Connections"
+msgstr "Siste Tilkoblinger"
+
+#. module: board
+#: view:res.log.report:0
+msgid "Log created in last month"
+msgstr "Logg opprettet i forrige måned"
+
+#. module: board
+#: view:board.board:0
+#: model:ir.actions.act_window,name:board.open_board_administration_form
+msgid "Administration Dashboard"
+msgstr "Administrasjon kontrollpanel"
+
+#. module: board
+#: view:res.log.report:0
+msgid "Group By..."
+msgstr "Grupper etter ..."
+
+#. module: board
+#: view:res.log.report:0
+msgid "Log created in current year"
+msgstr "Logg opprettet i gjeldende år."
+
+#. module: board
+#: model:ir.model,name:board.model_board_board
+msgid "Board"
+msgstr "Brett"
+
+#. module: board
+#: field:board.menu.create,menu_name:0
+msgid "Menu Name"
+msgstr "Menynavn"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.board_weekly_res_log_report_action
+#: view:res.log.report:0
+msgid "Weekly Global Activity"
+msgstr "Ukentlig global aktivitet"
+
+#. module: board
+#: field:board.board.line,name:0
+msgid "Title"
+msgstr "Tittel"
+
+#. module: board
+#: field:res.log.report,nbr:0
+msgid "# of Entries"
+msgstr "# av oppføringer"
+
+#. module: board
+#: view:res.log.report:0
+#: field:res.log.report,month:0
+msgid "Month"
+msgstr "Måned"
+
+#. module: board
+#: view:res.log.report:0
+msgid "Log created in current month"
+msgstr "Logg opprettet i gjeldende måned."
+
+#. module: board
+#: model:ir.actions.act_window,name:board.board_monthly_res_log_report_action
+#: view:res.log.report:0
+msgid "Monthly Activity per Document"
+msgstr "Månedlig aktivitet per dokument"
+
+#. module: board
+#: view:board.board:0
+msgid "Configuration Overview"
+msgstr "Konfigurasjonsoversikt"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.action_view_board_list_form
+#: model:ir.ui.menu,name:board.menu_view_board_form
+msgid "Dashboard Definition"
+msgstr "Kontrollpanel Definisjon"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "March"
+msgstr "Mars"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "August"
+msgstr "August"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.action_user_connection_tree
+msgid "User Connections"
+msgstr "Brukertilkoblinger"
+
+#. module: board
+#: field:res.log.report,creation_date:0
+msgid "Creation Date"
+msgstr "Opprettelsesdato"
+
+#. module: board
+#: view:res.log.report:0
+msgid "Log Analysis"
+msgstr "Logg analyse"
+
+#. module: board
+#: field:res.log.report,res_model:0
+msgid "Object"
+msgstr "Objekt"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "June"
+msgstr "Juni"
+
+#. module: board
+#: field:board.board,line_ids:0
+msgid "Action Views"
+msgstr "Handling Visninger"
+
+#. module: board
+#: model:ir.model,name:board.model_res_log_report
+msgid "Log Report"
+msgstr "Logg rapport"
+
+#. module: board
+#: code:addons/board/wizard/board_menu_create.py:46
+#, python-format
+msgid "Please Insert Dashboard View(s) !"
+msgstr "Vennligst Sett Kontrollpanel Vinsning (er)!"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "July"
+msgstr "juli"
+
+#. module: board
+#: view:res.log.report:0
+#: field:res.log.report,day:0
+msgid "Day"
+msgstr "Dag"
+
+#. module: board
+#: view:board.menu.create:0
+msgid "Create Menu For Dashboard"
+msgstr "Opprett meny for Kontrollpanel."
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "February"
+msgstr "Februar"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "October"
+msgstr "Oktober"
+
+#. module: board
+#: model:ir.model,name:board.model_board_board_line
+msgid "Board Line"
+msgstr "bord Linje"
+
+#. module: board
+#: field:board.menu.create,menu_parent_id:0
+msgid "Parent Menu"
+msgstr "Overordnet meny"
+
+#. module: board
+#: view:res.log.report:0
+msgid " Month-1 "
+msgstr " Måned-1 "
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "January"
+msgstr "Januar"
+
+#. module: board
+#: view:board.board:0
+msgid "Users"
+msgstr "Brukere"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "November"
+msgstr "November"
+
+#. module: board
+#: help:board.board.line,sequence:0
+msgid ""
+"Gives the sequence order when displaying a list of "
+"board lines."
+msgstr "Gir rekkefølgen av når du viser en liste over bord linjer."
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "April"
+msgstr "April"
+
+#. module: board
+#: view:board.board:0
+#: field:board.board,name:0
+#: field:board.board.line,board_id:0
+#: model:ir.ui.menu,name:board.menu_dasboard
+msgid "Dashboard"
+msgstr "Kontrollpanel"
+
+#. module: board
+#: code:addons/board/wizard/board_menu_create.py:45
+#, python-format
+msgid "User Error!"
+msgstr "Bruker feil!"
+
+#. module: board
+#: field:board.board.line,action_id:0
+msgid "Action"
+msgstr "Handling"
+
+#. module: board
+#: field:board.board.line,position:0
+msgid "Position"
+msgstr "Posisjon"
+
+#. module: board
+#: view:res.log.report:0
+msgid "Model"
+msgstr "Modell"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.board_homepage_action
+msgid "Home Page"
+msgstr "Hjemmeside"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.action_latest_activities_tree
+msgid "Latest Activities"
+msgstr "Senest aktiveter"
+
+#. module: board
+#: selection:board.board.line,position:0
+msgid "Left"
+msgstr "Venstre"
+
+#. module: board
+#: field:board.board,view_id:0
+msgid "Board View"
+msgstr "Bord visning"
+
+#. module: board
+#: selection:board.board.line,position:0
+msgid "Right"
+msgstr "Høyre"
+
+#. module: board
+#: field:board.board.line,width:0
+msgid "Width"
+msgstr "Bredde"
+
+#. module: board
+#: view:res.log.report:0
+msgid " Month "
+msgstr " Måned "
+
+#. module: board
+#: field:board.board.line,sequence:0
+msgid "Sequence"
+msgstr "Sekvens"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "September"
+msgstr "September"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "December"
+msgstr "Desember"
+
+#. module: board
+#: view:board.board:0
+#: view:board.menu.create:0
+msgid "Create Menu"
+msgstr "Opprett meny"
+
+#. module: board
+#: field:board.board.line,height:0
+msgid "Height"
+msgstr "Høyde"
+
+#. module: board
+#: model:ir.actions.act_window,name:board.action_board_menu_create
+msgid "Create Board Menu"
+msgstr "Opprett bord meny"
+
+#. module: board
+#: selection:res.log.report,month:0
+msgid "May"
+msgstr "Mai"
+
+#. module: board
+#: view:res.log.report:0
+#: field:res.log.report,name:0
+msgid "Year"
+msgstr "År"
+
+#. module: board
+#: view:board.menu.create:0
+msgid "Cancel"
+msgstr "Kanseller"
+
+#. module: board
+#: view:board.board:0
+msgid "Dashboard View"
+msgstr "Kontrollpanel visning"
diff --git a/addons/board/static/src/css/Makefile b/addons/board/static/src/css/Makefile
new file mode 100644
index 00000000000..0cb5ae70f4a
--- /dev/null
+++ b/addons/board/static/src/css/Makefile
@@ -0,0 +1,3 @@
+dashboard.css: dashboard.sass
+ sass --trace -t expanded dashboard.sass dashboard.css
+
diff --git a/addons/board/static/src/css/dashboard.css b/addons/board/static/src/css/dashboard.css
index 6907b4271a0..38e224daf42 100644
--- a/addons/board/static/src/css/dashboard.css
+++ b/addons/board/static/src/css/dashboard.css
@@ -5,6 +5,11 @@
.openerp .oe_dashboard {
width: 100%;
}
+.openerp .oe_dashboard .oe_dashboard_layout_selector ul, .openerp .oe_dashboard .oe_dashboard_layout_selector li {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
.openerp .oe_dashboard .oe_action {
margin: 0 8px 8px 0;
background-color: white;
diff --git a/addons/board/static/src/css/dashboard.sass b/addons/board/static/src/css/dashboard.sass
index 4bacc7bd892..1bfc01a3809 100644
--- a/addons/board/static/src/css/dashboard.sass
+++ b/addons/board/static/src/css/dashboard.sass
@@ -14,6 +14,11 @@
margin: 0 4px 6px 0
.oe_dashboard
width: 100%
+ .oe_dashboard_layout_selector
+ ul, li
+ margin: 0
+ padding: 0
+ list-style-type: none
.oe_action
margin: 0 8px 8px 0
background-color: white
diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml
index 16ed1e4c5ad..d80183b80c9 100644
--- a/addons/crm/board_crm_view.xml
+++ b/addons/crm/board_crm_view.xml
@@ -2,22 +2,6 @@
-
- My Opportunities
- crm.lead
- tree
- [('user_id','=',uid),('type', '=', 'opportunity'),('state','not in',('cancel','done'))]
-
-
-
-
- New Leads
- crm.lead
- tree
- [('user_id','=',uid),('state','=','draft'),('type','=','lead')]
-
-
-
Opportunities By Stage - Graph
crm.lead.report
@@ -70,11 +54,9 @@
-
-
-
- Module CRM has been installed
- From the top menu Sales, you can: trace leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.
+
+ mail.group
+
+ notification
+ CRM application installed!
+ From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.
+To manage quotations and sale orders, install the "Sales Management" application.
+
-To manage quotations and sale orders, install the module "Sales Management".
-
-
sales
{'type':'lead'}
-
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 25a47ecbadc..ddfdb05ca66 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -19,11 +19,9 @@
#
##############################################################################
-import binascii
from base_status.base_stage import base_stage
import crm
from datetime import datetime
-from mail.mail_message import to_email
from osv import fields, osv
import time
import tools
@@ -40,8 +38,7 @@ class crm_lead(base_stage, osv.osv):
_name = "crm.lead"
_description = "Lead/Opportunity"
_order = "priority,date_action,id desc"
- _inherit = ['ir.needaction_mixin', 'mail.thread']
- _mail_compose_message = True
+ _inherit = ['mail.thread','ir.needaction_mixin']
def _get_default_section_id(self, cr, uid, context=None):
""" Gives default section by checking if present in the context """
@@ -90,8 +87,8 @@ class crm_lead(base_stage, osv.osv):
search_domain = []
section_id = self._resolve_section_id_from_context(cr, uid, context=context)
if section_id:
- search_domain += ['|', '&', ('section_ids', '=', section_id), ('fold', '=', False)]
- search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
+ search_domain += ['|', ('section_ids', '=', section_id)]
+ search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
# retrieve type from the context (if set: choose 'type' or 'both')
type = self._resolve_type_from_context(cr, uid, context=context)
if type:
@@ -101,7 +98,12 @@ class crm_lead(base_stage, osv.osv):
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
- return result
+
+ fold = {}
+ for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
+ fold[stage.id] = stage.fold or False
+
+ return result, fold
_group_by_full = {
'stage_id': _read_group_stage_ids
@@ -175,16 +177,6 @@ class crm_lead(base_stage, osv.osv):
else:
return [('id', '=', '0')]
- def _get_email_subject(self, cr, uid, ids, fields, args, context=None):
- res = {}
- for obj in self.browse(cr, uid, ids, context=context):
- res[obj.id] = ''
- for msg in obj.message_ids:
- if msg.email_from:
- res[obj.id] = msg.subject
- break
- return res
-
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null',
select=True, help="Optional linked partner, usually after conversion of the lead"),
@@ -213,7 +205,7 @@ class crm_lead(base_stage, osv.osv):
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage',
- domain="['&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
+ domain="['&', ('fold', '=', False), '&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
'user_id': fields.many2one('res.users', 'Salesperson'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
@@ -228,7 +220,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\'.'),
- 'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64),
# Only used for type opportunity
'probability': fields.float('Success Rate (%)',group_operator="avg"),
@@ -449,7 +440,7 @@ class crm_lead(base_stage, osv.osv):
oldest_id = opportunity_ids[0]
return self.browse(cr, uid, oldest_id, context=context)
- def _mail_body_text(self, cr, uid, lead, fields, title=False, context=None):
+ def _mail_body(self, cr, uid, lead, fields, title=False, context=None):
body = []
if title:
body.append("%s\n" % (title))
@@ -486,11 +477,11 @@ class crm_lead(base_stage, osv.osv):
for opportunity in opportunities:
subject.append(opportunity.name)
title = "%s : %s" % (merge_message, opportunity.name)
- details.append(self._mail_body_text(cr, uid, opportunity, fields, title=title, context=context))
+ details.append(self._mail_body(cr, uid, opportunity, fields, title=title, context=context))
subject = subject[0] + ", ".join(subject[1:])
details = "\n\n".join(details)
- return self.message_append_note(cr, uid, [opportunity_id], subject=subject, body=details)
+ return self.message_post(cr, uid, [opportunity_id], body=details, subject=subject, context=context)
def _merge_opportunity_history(self, cr, uid, opportunity_id, opportunities, context=None):
message = self.pool.get('mail.message')
@@ -546,7 +537,7 @@ class crm_lead(base_stage, osv.osv):
oldest = self._merge_find_oldest(cr, uid, ids, context=context)
if ctx_opportunities :
first_opportunity = ctx_opportunities[0]
- tail_opportunities = opportunities_list
+ tail_opportunities = opportunities_list + ctx_opportunities[1:]
else:
first_opportunity = opportunities_list[0]
tail_opportunities = opportunities_list[1:]
@@ -606,19 +597,13 @@ class crm_lead(base_stage, osv.osv):
for lead in self.browse(cr, uid, ids, context=context):
if lead.state in ('done', 'cancel'):
continue
- if user_ids or section_id:
- self.allocate_salesman(cr, uid, [lead.id], user_ids, section_id, context=context)
-
vals = self._convert_opportunity_data(cr, uid, lead, customer, section_id, context=context)
self.write(cr, uid, [lead.id], vals, context=context)
-
self.convert_opportunity_send_note(cr, uid, lead, context=context)
- #TOCHECK: why need to change partner details in all messages of lead ?
- if lead.partner_id:
- msg_ids = [ x.id for x in lead.message_ids]
- mail_message.write(cr, uid, msg_ids, {
- 'partner_id': lead.partner_id.id
- }, context=context)
+
+ if user_ids or section_id:
+ self.allocate_salesman(cr, uid, ids, user_ids, section_id, context=context)
+
return True
def _lead_create_contact(self, cr, uid, lead, name, is_company, parent_id=False, context=None):
@@ -630,7 +615,7 @@ class crm_lead(base_stage, osv.osv):
'parent_id': parent_id,
'phone': lead.phone,
'mobile': lead.mobile,
- 'email': lead.email_from and to_email(lead.email_from)[0],
+ 'email': lead.email_from and tools.email_split(lead.email_from)[0],
'fax': lead.fax,
'title': lead.title and lead.title.id or False,
'function': lead.function,
@@ -650,7 +635,7 @@ class crm_lead(base_stage, osv.osv):
partner_id = False
if lead.partner_name and lead.contact_name:
partner_id = self._lead_create_contact(cr, uid, lead, lead.partner_name, True, context=context)
- self._lead_create_contact(cr, uid, lead, lead.contact_name, False, partner_id, context=context)
+ partner_id = self._lead_create_contact(cr, uid, lead, lead.contact_name, False, partner_id, context=context)
elif lead.partner_name and not lead.contact_name:
partner_id = self._lead_create_contact(cr, uid, lead, lead.partner_name, True, context=context)
elif not lead.partner_name and lead.contact_name:
@@ -678,32 +663,16 @@ class crm_lead(base_stage, osv.osv):
if context is None:
context = {}
partner_ids = {}
+ force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context):
if action == 'create':
if not partner_id:
partner_id = self._create_lead_partner(cr, uid, lead, context)
+ partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context=context)
self._lead_set_partner(cr, uid, lead, partner_id, context=context)
partner_ids[lead.id] = partner_id
return partner_ids
- def _send_mail_to_salesman(self, cr, uid, lead, context=None):
- """
- Send mail to salesman with updated Lead details.
- @ lead: browse record of 'crm.lead' object.
- """
- #TOFIX: mail template should be used here instead of fix subject, body text.
- message = self.pool.get('mail.message')
- email_to = lead.user_id and lead.user_id.email
- if not email_to:
- return False
-
- email_from = lead.section_id and lead.section_id.user_id and lead.section_id.user_id.email or email_to
- partner = lead.partner_id and lead.partner_id.name or lead.partner_name
- subject = "lead %s converted into opportunity" % lead.name
- body = "Info \n Id : %s \n Subject: %s \n Partner: %s \n Description : %s " % (lead.id, lead.name, lead.partner_id.name, lead.description)
- return message.schedule_with_attach(cr, uid, email_from, [email_to], subject, body)
-
-
def allocate_salesman(self, cr, uid, ids, user_ids, team_id=False, context=None):
index = 0
for lead_id in ids:
@@ -821,14 +790,13 @@ class crm_lead(base_stage, osv.osv):
if custom_values is None: custom_values = {}
custom_values.update({
'name': msg.get('subject') or _("No Subject"),
- 'description': msg.get('body_text'),
+ 'description': msg.get('body'),
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
})
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
custom_values['priority'] = msg.get('priority')
- custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from', False), context=context))
return super(crm_lead, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
@@ -841,18 +809,18 @@ class crm_lead(base_stage, osv.osv):
if update_vals is None: update_vals = {}
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
- vals['priority'] = msg.get('priority')
+ update_vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability',
}
- for line in msg.get('body_text', '').split('\n'):
+ for line in msg.get('body', '').split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower()):
key = maps.get(res.group(1).lower())
- vals[key] = res.group(2).lower()
+ update_vals[key] = res.group(2).lower()
return super(crm_lead, self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
@@ -860,15 +828,10 @@ class crm_lead(base_stage, osv.osv):
# OpenChatter methods and notifications
# ----------------------------------------
- def message_get_monitored_follower_fields(self, cr, uid, ids, context=None):
- """ Add 'user_id' to the monitored fields """
- res = super(crm_lead, self).message_get_monitored_follower_fields(cr, uid, ids, context=context)
- return res + ['user_id']
-
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]
- return self.message_append_note(cr, uid, ids, body= _("Stage changed to %s .") % (stage_name), context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s .") % (stage_name), context=context)
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
@@ -878,33 +841,33 @@ class crm_lead(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for id in ids:
message = _("%s has been created .")% (self.case_get_note_msg_prefix(cr, uid, id, context=context))
- self.message_append_note(cr, uid, [id], body=message, context=context)
+ self.message_post(cr, uid, [id], body=message, context=context)
return True
def case_mark_lost_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been lost .")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, context=context)
def case_mark_won_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been won .")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, context=context)
def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]
if action == 'log': prefix = 'Logged'
else: prefix = 'Scheduled'
message = _("%s a call for the %s .") % (prefix, phonecall.date)
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, context=context)
def _lead_set_partner_send_note(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context=context):
message = _("%s partner is now set to %s ." % (self.case_get_note_msg_prefix(cr, uid, lead, context=context), lead.partner_id.name))
- lead.message_append_note(body=message)
+ lead.message_post(body=message)
return True
def convert_opportunity_send_note(self, cr, uid, lead, context=None):
message = _("Lead has been converted to an opportunity .")
- lead.message_append_note(body=message)
+ lead.message_post(body=message)
return True
crm_lead()
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 04f91933f66..f734a839ff4 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -55,7 +55,7 @@
Dead
-
+
cancel
diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml
index 6118c08c0e5..b3c00256b06 100644
--- a/addons/crm/crm_lead_demo.xml
+++ b/addons/crm/crm_lead_demo.xml
@@ -552,86 +552,67 @@ Andrew
Plan to buy a Laptop
crm.lead
- html
- <![CDATA[Email0 inquiry]]><div><font size="2">Hello,</font></div><div><font size="2"><br></font></div><div><font size="2">I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.</font></div><div><font size="2">Can you please send me product catalogue?</font></div>
+ <![CDATA[Email0 inquiry]]><div><font size="2">Hello,</font></div><div><font size="2"><br></font></div><div><font size="2">I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.</font></div><div><font size="2">Can you please send me product catalogue?</font></div>
email
- received
-
Re: Plan to buy a Laptop
crm.lead
-
- plain
- Dear Customer,
+ comment
+ Dear Customer,
Thanks for showing interest in our products.
We have attached the catalogue,
We would like to know your interests, Let us know if we can call you for more details.
Thanks
- email
-
- sent
+
+
Re: Plan to buy a Laptop
crm.lead
- plain
- Yes, its open till 10:00 PM, you are welcome!
+ Yes, its open till 10:00 PM, you are welcome!
email
- sent
-
+
-
Inquiry
crm.lead
- plain
- Hello,
+ Hello,
I am Jason from Le Club SARL,
I am intertested to attend Training organized in your company,
Can you send details,
email
- received
-
-
Need Details
crm.lead
- plain
- Want to know features and benifits to use the new software.
+ Want to know features and benifits to use the new software.
comment
-
-
Leads
crm.lead
-
+
@@ -257,12 +257,11 @@
-
+
-
-
+
@@ -296,23 +295,16 @@
-
+
-
-
-
+
@@ -362,10 +353,8 @@
-
-
-
+
@@ -386,7 +375,6 @@
-
@@ -515,7 +503,7 @@
-
+
@@ -545,7 +533,7 @@
Opportunities Tree
crm.lead
-
+
@@ -555,7 +543,6 @@
-
@@ -563,7 +550,7 @@
-
+
@@ -578,7 +565,7 @@
-
+
@@ -600,7 +587,6 @@
-
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 13171d95b9b..62fc53364ee 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -44,7 +44,7 @@ class crm_meeting(osv.Model):
def create_send_note(self, cr, uid, ids, context=None):
if context is None:
context = {}
- # update context: if come from phonecall, default state values can make the message_append_note crash
+ # update context: if come from phonecall, default state values can make the message_post crash
context.pop('default_state', False)
for meeting in self.browse(cr, uid, ids, context=context):
# in the message, transpose meeting.date to the timezone of the current user
@@ -53,14 +53,14 @@ class crm_meeting(osv.Model):
if meeting.opportunity_id: # meeting can be create from phonecalls or opportunities, therefore checking for the parent
lead = meeting.opportunity_id
message = _("Meeting linked to the opportunity %s has been created and scheduled on %s .") % (lead.name, meeting_date_tz)
- lead.message_append_note(_('System Notification'), message)
+ lead.message_post(body=message)
elif meeting.phonecall_id:
phonecall = meeting.phonecall_id
message = _("Meeting linked to the phonecall %s has been created and scheduled on %s .") % (phonecall.name, meeting_date_tz)
- phonecall.message_append_note(body=message)
+ phonecall.message_post(body=message)
else:
message = _("A meeting has been scheduled on %s .") % (meeting_date_tz)
- meeting.message_append_note(body=message)
+ meeting.message_post(body=message)
return True
class calendar_attendee(osv.osv):
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index da08f97250a..44894fc881d 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -32,7 +32,7 @@ class crm_phonecall(base_state, osv.osv):
_name = "crm.phonecall"
_description = "Phonecall"
_order = "id desc"
- _inherit = ['ir.needaction_mixin', 'mail.thread']
+ _inherit = ['mail.thread']
_columns = {
# base_state required fields
'date_action_last': fields.datetime('Last Action', readonly=1),
@@ -177,11 +177,11 @@ class crm_phonecall(base_state, osv.osv):
if context is None:
context = {}
partner_ids = {}
+ force_partner_id = partner_id
for call in self.browse(cr, uid, ids, context=context):
if action == 'create':
- if not partner_id:
- partner_id = self._call_create_partner(cr, uid, call, context=context)
- self._call_create_partner_address(cr, uid, call, partner_id, context=context)
+ partner_id = force_partner_id or self._call_create_partner(cr, uid, call, context=context)
+ self._call_create_partner_address(cr, uid, call, partner_id, context=context)
self._call_set_partner(cr, uid, [call.id], partner_id, context=context)
partner_ids[call.id] = partner_id
return partner_ids
@@ -266,7 +266,7 @@ class crm_phonecall(base_state, osv.osv):
def case_reset_send_note(self, cr, uid, ids, context=None):
message = _('Phonecall has been reset and set as open .')
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, context=context)
def case_open_send_note(self, cr, uid, ids, context=None):
lead_obj = self.pool.get('crm.lead')
@@ -280,11 +280,11 @@ class crm_phonecall(base_state, osv.osv):
message = _("Phonecall linked to the opportunity %s has been created and scheduled on %s .") % (lead.name, phonecall_date_str)
else:
message = _("Phonecall has been created and opened .")
- phonecall.message_append_note(body=message)
+ phonecall.message_post(body=message)
return True
def _call_set_partner_send_note(self, cr, uid, ids, context=None):
- return self.message_append_note(cr, uid, ids, body=_("Partner has been created ."), context=context)
+ return self.message_post(cr, uid, ids, body=_("Partner has been created ."), context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 3b5162288a4..2f885e09b61 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -66,8 +66,7 @@
CRM - Phone Calls Tree
crm.phonecall
-
-
+
@@ -76,7 +75,6 @@
-
CRM - Logged Phone Calls Tree
crm.phonecall
-
+
-
-
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 4283dd8fb3c..35ed9411215 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -105,21 +105,11 @@
-
-
-
-
-
-
-
-
-
')])
context.update({'active_model': 'crm.lead','active_id': lead_ids[0]})
- id = self.create(cr, uid, {'body_text': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context)
+ id = self.create(cr, uid, {'body': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context)
try:
self.send_mail(cr, uid, [id], context=context)
except:
@@ -34,12 +34,6 @@
!python {model: crm.lead}: |
lead_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right ')])
self.convert_partner(cr, uid, lead_ids, context=context)
--
- Now, I search customer in regular customer list.
--
- !python {model: crm.lead}: |
- partner_ids = self.message_partner_by_email(cr, uid, 'Mr. John Right ')
- assert partner_ids.get('partner_id'), "Customer is not found in regular customer list."
-
I convert one phonecall request as a customer and put into regular customer list.
-
diff --git a/addons/crm/test/process/lead2opportunity2win.yml b/addons/crm/test/process/lead2opportunity2win.yml
index 23713dfca2f..ed552421cf0 100644
--- a/addons/crm/test/process/lead2opportunity2win.yml
+++ b/addons/crm/test/process/lead2opportunity2win.yml
@@ -55,7 +55,7 @@
After communicated with customer, I put some notes with contract details.
-
!python {model: crm.lead}: |
- self.message_append_note(cr, uid, [ref('crm_case_4')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
+ self.message_post(cr, uid, [ref('crm_case_4')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
-
I win this opportunity
-
@@ -73,7 +73,7 @@
I convert mass lead into opportunity customer.
-
!python {model: crm.lead2opportunity.partner.mass}: |
- context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_4")})
+ context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_11")})
id = self.create(cr, uid, {'user_ids': [ref('base.user_root')], 'section_id': ref('crm.section_sales_department')}, context=context)
self.mass_convert(cr, uid, [id], context=context)
-
@@ -83,7 +83,8 @@
opp = self.browse(cr, uid, ref('crm_case_11'))
assert opp.name == "Need estimated cost for new project", "Opportunity name not correct"
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
- assert opp.partner_id.name == "Thomas Passot", 'Partner mismatch!'
+ expected_partner = "Thomas Passot"
+ assert opp.partner_id.name == expected_partner, 'Partner mismatch! %s vs %s' % (opp.partner_id.name, expected_partner)
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
-
Then check for second lead converted on opportunity.
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index 547d3ed299e..e90303dda66 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -24,8 +24,6 @@ from tools.translate import _
import tools
import re
-import time
-
class crm_lead2opportunity_partner(osv.osv_memory):
_name = 'crm.lead2opportunity.partner'
_description = 'Lead To Opportunity Partner'
@@ -35,8 +33,8 @@ class crm_lead2opportunity_partner(osv.osv_memory):
'action': fields.selection([('exist', 'Link to an existing partner'), \
('create', 'Create a new partner'), \
('nothing', 'Do not link to a partner')], \
- 'Action', required=True),
- 'name': fields.selection([('convert', 'Convert to Opportunity'), ('merge', 'Merge with existing Opportunity')],'Select Action', required=True),
+ 'Related Partner', required=True),
+ 'name': fields.selection([('convert', 'Convert to Opportunities'), ('merge', 'Merge with existing Opportunities')], 'Conversion Action', required=True),
'opportunity_ids': fields.many2many('crm.lead', string='Opportunities', domain=[('type', '=', 'opportunity')]),
}
@@ -68,8 +66,6 @@ class crm_lead2opportunity_partner(osv.osv_memory):
if ids:
opportunities.append(ids[0])
if not partner_id:
- label = False
- opp_ids = []
if email:
# Find email of existing opportunity matches the email_from of the lead
cr.execute("""select id from crm_lead where type='opportunity' and
@@ -106,23 +102,36 @@ class crm_lead2opportunity_partner(osv.osv_memory):
if context is None:
context = {}
lead = self.pool.get('crm.lead')
- partner_id = self._create_partner(cr, uid, ids, context=context)
+ res = False
+ partner_ids_map = self._create_partner(cr, uid, ids, context=context)
lead_ids = vals.get('lead_ids', [])
- user_ids = vals.get('user_ids', False)
team_id = vals.get('section_id', False)
- return lead.convert_opportunity(cr, uid, lead_ids, partner_id, user_ids, team_id, context=context)
+ for lead_id in lead_ids:
+ partner_id = partner_ids_map.get(lead_id, False)
+ # FIXME: cannot pass user_ids as the salesman allocation only works in batch
+ res = lead.convert_opportunity(cr, uid, [lead_id], partner_id, [], team_id, context=context)
+ # FIXME: must perform salesman allocation in batch separately here
+ user_ids = vals.get('user_ids', False)
+ if user_ids:
+ lead.allocate_salesman(cr, uid, lead_ids, user_ids, team_id=team_id, context=context)
+ return res
def _merge_opportunity(self, cr, uid, ids, opportunity_ids, action='merge', context=None):
- #TOFIX: is it usefully ?
if context is None:
context = {}
- merge_opportunity = self.pool.get('crm.merge.opportunity')
res = False
- #If we convert in mass, don't merge if there is no other opportunity but no warning
- if action == 'merge' and (len(opportunity_ids) > 1 or not context.get('mass_convert') ):
- self.write(cr, uid, ids, {'opportunity_ids' : [(6,0, [opportunity_ids[0].id])]}, context=context)
- context.update({'lead_ids' : record_id, "convert" : True})
- res = merge_opportunity.merge(cr, uid, data.opportunity_ids, context=context)
+ # Expected: all newly-converted leads (active_ids) will be merged with the opportunity(ies)
+ # that have been selected in the 'opportunity_ids' m2m, with all these records
+ # merged into the first opportunity (and the rest deleted)
+ opportunity_ids = [o.id for o in opportunity_ids]
+ lead_ids = context.get('active_ids', [])
+ if action == 'merge' and lead_ids and opportunity_ids:
+ # Add the leads in the to-merge list, next to other opps
+ # (the fact that they're passed in context['lead_ids'] means that
+ # they cannot be selected to contain the result of the merge.
+ opportunity_ids.extend(lead_ids)
+ context.update({'lead_ids': lead_ids, "convert" : True})
+ res = self.pool.get('crm.lead').merge_opportunity(cr, uid, opportunity_ids, context=context)
return res
def action_apply(self, cr, uid, ids, context=None):
@@ -131,27 +140,37 @@ class crm_lead2opportunity_partner(osv.osv_memory):
"""
if not context:
context = {}
-
lead = self.pool.get('crm.lead')
lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0]
self._convert_opportunity(cr, uid, ids, {'lead_ids': lead_ids}, context=context)
- self._merge_opportunity(cr, uid, ids, data.opportunity_ids, data.action, context=context)
+ self._merge_opportunity(cr, uid, ids, data.opportunity_ids, data.name, context=context)
return lead.redirect_opportunity_view(cr, uid, lead_ids[0], context=context)
-crm_lead2opportunity_partner()
class crm_lead2opportunity_mass_convert(osv.osv_memory):
_name = 'crm.lead2opportunity.partner.mass'
_description = 'Mass Lead To Opportunity Partner'
_inherit = 'crm.lead2opportunity.partner'
-
_columns = {
- 'user_ids': fields.many2many('res.users', string='Salesmans'),
+ 'user_ids': fields.many2many('res.users', string='Salesmen'),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
-
}
+
+ def default_get(self, cr, uid, fields, context=None):
+ res = super(crm_lead2opportunity_mass_convert, self).default_get(cr, uid, fields, context)
+ if 'partner_id' in fields:
+ # avoid forcing the partner of the first lead as default
+ res['partner_id'] = False
+ if 'action' in fields:
+ res['action'] = 'create'
+ if 'name' in fields:
+ res['name'] = 'convert'
+ if 'opportunity_ids' in fields:
+ res['opportunity_ids'] = False
+ return res
+
def _convert_opportunity(self, cr, uid, ids, vals, context=None):
data = self.browse(cr, uid, ids, context=context)[0]
salesteam_id = data.section_id and data.section_id.id or False
@@ -162,9 +181,6 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory):
return super(crm_lead2opportunity_mass_convert, self)._convert_opportunity(cr, uid, ids, vals, context=context)
def mass_convert(self, cr, uid, ids, context=None):
- value = self.default_get(cr, uid, ['partner_id', 'opportunity_ids'], context=context)
- value['opportunity_ids'] = [(6, 0, value['opportunity_ids'])]
- self.write(cr, uid, ids, value, context=context)
return self.action_apply(cr, uid, ids, context=context)
-crm_lead2opportunity_mass_convert()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_lead_to_opportunity_view.xml b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
index 8829749efa3..6a826f7bc0e 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity_view.xml
+++ b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
@@ -37,24 +37,38 @@
crm.lead2opportunity.partner.mass
-
+
diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
index 98f114b4088..9b239bab7b9 100644
--- a/addons/crm/wizard/crm_lead_to_partner.py
+++ b/addons/crm/wizard/crm_lead_to_partner.py
@@ -50,20 +50,20 @@ class crm_lead2partner(osv.osv_memory):
def _select_partner(self, cr, uid, context=None):
if context is None:
context = {}
- lead = self.pool.get('crm.lead')
- partner = self.pool.get('res.partner')
- lead_ids = list(context and context.get('active_ids', []) or [])
- if not len(lead_ids):
+ if not context.get('active_model') == 'crm.lead' or not context.get('active_id'):
return False
- this = lead.browse(cr, uid, lead_ids[0], context=context)
- # Find partner address matches the email_from of the lead
- res = lead.message_partner_by_email(cr, uid, this.email_from, context=context)
- partner_id = res.get('partner_id', False)
- # Find partner name that matches the name of the lead
- if not partner_id and this.partner_name:
+ partner = self.pool.get('res.partner')
+ lead = self.pool.get('crm.lead')
+ this = lead.browse(cr, uid, context.get('active_id'), context=context)
+ partner_id = False
+ if this.email_from:
+ partner_ids = partner.search(cr, uid, [('email', '=', this.email_from)], context=context)
+ if partner_ids:
+ partner_id = partner_ids[0]
+ if not this.partner_id and this.partner_name:
partner_ids = partner.search(cr, uid, [('name', '=', this.partner_name)], context=context)
- if partner_ids and len(partner_ids):
- partner_id = partner_ids[0]
+ if partner_ids:
+ partner_id = partner_ids[0]
return partner_id
def default_get(self, cr, uid, fields, context=None):
@@ -107,15 +107,16 @@ class crm_lead2partner(osv.osv_memory):
lead_ids = context and context.get('active_ids') or []
data = self.browse(cr, uid, ids, context=context)[0]
partner_id = data.partner_id and data.partner_id.id or False
- partner_ids = lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context)
- return partner_ids[lead_ids[0]]
+ return lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context)
def make_partner(self, cr, uid, ids, context=None):
"""
This function Makes partner based on action.
"""
- partner_id = self._create_partner(cr, uid, ids, context=context)
- return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_id, context=context)
+ # Only called from Form view, so only meant to convert one Lead.
+ lead_id = context and context.get('active_id') or False
+ partner_ids_map = self._create_partner(cr, uid, ids, context=context)
+ return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_ids_map.get(lead_id, False), context=context)
crm_lead2partner()
diff --git a/addons/crm/wizard/crm_phonecall_to_partner.py b/addons/crm/wizard/crm_phonecall_to_partner.py
index 422af02f99d..715b7396c66 100644
--- a/addons/crm/wizard/crm_phonecall_to_partner.py
+++ b/addons/crm/wizard/crm_phonecall_to_partner.py
@@ -57,12 +57,10 @@ class crm_phonecall2partner(osv.osv_memory):
if context is None:
context = {}
phonecall = self.pool.get('crm.phonecall')
-
data = self.browse(cr, uid, ids, context=context)[0]
call_ids = context and context.get('active_ids') or []
partner_id = data.partner_id and data.partner_id.id or False
- partner_ids = phonecall.convert_partner(cr, uid, call_ids, data.action, partner_id, context=context)
- return partner_ids[call_ids[0]]
+ return phonecall.convert_partner(cr, uid, call_ids, data.action, partner_id, context=context)
crm_phonecall2partner()
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index ec6252bcdca..535f6d20367 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -72,7 +72,7 @@ class crm_claim(base_stage, osv.osv):
_description = "Claim"
_order = "priority,date desc"
_inherit = ['mail.thread']
- _mail_compose_message = True
+
_columns = {
'id': fields.integer('ID', readonly=True),
'name': fields.char('Claim Subject', size=128, required=True),
@@ -194,13 +194,12 @@ class crm_claim(base_stage, osv.osv):
if custom_values is None: custom_values = {}
custom_values.update({
'name': msg.get('subject') or _("No Subject"),
- 'description': msg.get('body_text'),
+ 'description': msg.get('body'),
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
})
if msg.get('priority'):
custom_values['priority'] = msg.get('priority')
- custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
return super(crm_claim,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
@@ -220,7 +219,7 @@ class crm_claim(base_stage, osv.osv):
'revenue': 'planned_revenue',
'probability':'probability'
}
- for line in msg['body_text'].split('\n'):
+ for line in msg['body'].split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower()):
@@ -239,16 +238,16 @@ class crm_claim(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
msg = _('Claim has been created .')
- return self.message_append_note(cr, uid, ids, body=msg, context=context)
+ return self.message_post(cr, uid, ids, body=msg, context=context)
def case_refuse_send_note(self, cr, uid, ids, context=None):
msg = _('Claim has been refused .')
- return self.message_append_note(cr, uid, ids, body=msg, context=context)
+ return self.message_post(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. """
stage_name = self.pool.get('crm.claim.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_append_note(cr, uid, ids, body= _("Stage changed to %s .") % (stage_name), context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to %s .") % (stage_name), context=context)
class res_partner(osv.osv):
diff --git a/addons/crm_claim/crm_claim_menu.xml b/addons/crm_claim/crm_claim_menu.xml
index 46f8760387a..bb881d62a58 100644
--- a/addons/crm_claim/crm_claim_menu.xml
+++ b/addons/crm_claim/crm_claim_menu.xml
@@ -50,9 +50,9 @@
parent="base.menu_aftersale" action="crm_case_categ_claim0" sequence="1"/>
+
-
diff --git a/addons/crm_claim/test/ui/claim_demo.yml b/addons/crm_claim/test/ui/claim_demo.yml
index ad8fdf3aa44..044e0482e93 100644
--- a/addons/crm_claim/test/ui/claim_demo.yml
+++ b/addons/crm_claim/test/ui/claim_demo.yml
@@ -9,7 +9,6 @@
-
!python {model: crm.claim}: |
try:
- self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body_text': 'first training session completed',})
+ self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body': 'first training session completed',})
except:
pass
-
\ No newline at end of file
diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
index 4b0cb2e3ffa..612537bdb77 100644
--- a/addons/crm_helpdesk/crm_helpdesk.py
+++ b/addons/crm_helpdesk/crm_helpdesk.py
@@ -38,7 +38,7 @@ class crm_helpdesk(base_state, osv.osv):
_description = "Helpdesk"
_order = "id desc"
_inherit = ['mail.thread']
- _mail_compose_message = True
+
_columns = {
'id': fields.integer('ID', readonly=True),
'name': fields.char('Name', size=128, required=True),
@@ -105,12 +105,11 @@ class crm_helpdesk(base_state, osv.osv):
if custom_values is None: custom_values = {}
custom_values.update({
'name': msg.get('subject') or _("No Subject"),
- 'description': msg.get('body_text'),
+ 'description': msg.get('body'),
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
})
- custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
return super(crm_helpdesk,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
@@ -130,7 +129,7 @@ class crm_helpdesk(base_state, osv.osv):
'revenue': 'planned_revenue',
'probability':'probability'
}
- for line in msg['body_text'].split('\n'):
+ for line in msg['body'].split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower()):
@@ -149,7 +148,7 @@ class crm_helpdesk(base_state, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
msg = _('Case has been created .')
- self.message_append_note(cr, uid, ids, body=msg, context=context)
+ self.message_post(cr, uid, ids, body=msg, context=context)
return True
diff --git a/addons/crm_helpdesk/report/crm_helpdesk_report.py b/addons/crm_helpdesk/report/crm_helpdesk_report.py
index 93a33d62819..6496935c2d2 100644
--- a/addons/crm_helpdesk/report/crm_helpdesk_report.py
+++ b/addons/crm_helpdesk/report/crm_helpdesk_report.py
@@ -97,7 +97,7 @@ class crm_helpdesk_report(osv.osv):
c.planned_cost,
count(*) as nbr,
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
- (SELECT count(id) FROM mail_message WHERE model='crm.helpdesk' AND res_id=c.id AND email_from IS NOT NULL) AS email,
+ (SELECT count(id) FROM mail_message WHERE model='crm.helpdesk' AND res_id=c.id AND type = 'email') AS email,
abs(avg(extract('epoch' from (c.date_deadline - c.date_closed)))/(3600*24)) as delay_expected
from
crm_helpdesk c
diff --git a/addons/crm_helpdesk/test/process/help-desk.yml b/addons/crm_helpdesk/test/process/help-desk.yml
index 320bd61c2af..4fd6a9ee9d7 100644
--- a/addons/crm_helpdesk/test/process/help-desk.yml
+++ b/addons/crm_helpdesk/test/process/help-desk.yml
@@ -23,7 +23,7 @@
!python {model: crm.helpdesk}: |
question_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right ')])
try:
- self.message_update(cr, uid, question_ids, {'subject': 'Link of product', 'body_text': 'www.openerp.com'})
+ self.message_update(cr, uid, question_ids, {'subject': 'Link of product', 'body': 'www.openerp.com'})
except:
pass
diff --git a/addons/crm_partner_assign/crm_lead_view.xml b/addons/crm_partner_assign/crm_lead_view.xml
index d4ff93d52fd..cd2e3f08c9a 100644
--- a/addons/crm_partner_assign/crm_lead_view.xml
+++ b/addons/crm_partner_assign/crm_lead_view.xml
@@ -19,8 +19,7 @@
attrs="{'invisible':[('partner_assigned_id','=',False)]}"
name="%(crm_lead_forward_to_partner_act)d"
icon="terp-mail-forward" type="action"
- context="{'default_name': 'partner', 'default_partner_id': partner_assigned_id}"
- />
+ context="{'default_composition_mode': 'forward', 'default_partner_ids': [partner_assigned_id]}"/>
@@ -37,8 +36,6 @@
-
-
crm.lead.geo_assign.tree.inherit
crm.lead
@@ -49,6 +46,7 @@
+
crm.opportunity.partner.filter.assigned
crm.lead
@@ -63,5 +61,6 @@
+
diff --git a/addons/crm_partner_assign/i18n/ar.po b/addons/crm_partner_assign/i18n/ar.po
index de0f43af5a6..53d88fd259a 100644
--- a/addons/crm_partner_assign/i18n/ar.po
+++ b/addons/crm_partner_assign/i18n/ar.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:39+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "التمركز الجغرافي"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -134,7 +134,7 @@ msgid "Highest"
msgstr "أعلى"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/bg.po b/addons/crm_partner_assign/i18n/bg.po
index 8d34ce6a73c..cb670286522 100644
--- a/addons/crm_partner_assign/i18n/bg.po
+++ b/addons/crm_partner_assign/i18n/bg.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:39+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Най-висок"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/ca.po b/addons/crm_partner_assign/i18n/ca.po
index 1ff3ec07048..1f73a19b35a 100644
--- a/addons/crm_partner_assign/i18n/ca.po
+++ b/addons/crm_partner_assign/i18n/ca.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo localitzar"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "El més alt"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/crm_partner_assign.pot b/addons/crm_partner_assign/i18n/crm_partner_assign.pot
index 3fb9fc0e915..c3ddc66fa3b 100644
--- a/addons/crm_partner_assign/i18n/crm_partner_assign.pot
+++ b/addons/crm_partner_assign/i18n/crm_partner_assign.pot
@@ -72,7 +72,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -129,7 +129,7 @@ msgid "Highest"
msgstr ""
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/da.po b/addons/crm_partner_assign/i18n/da.po
index 4e249458019..5bb8265399f 100644
--- a/addons/crm_partner_assign/i18n/da.po
+++ b/addons/crm_partner_assign/i18n/da.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr ""
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/de.po b/addons/crm_partner_assign/i18n/de.po
index 9257f3c329e..20a3352bc3f 100644
--- a/addons/crm_partner_assign/i18n/de.po
+++ b/addons/crm_partner_assign/i18n/de.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geogr. Lokalisierung"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Text Version der Mitteilung"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Sehr Hoch"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Text Inhalt"
diff --git a/addons/crm_partner_assign/i18n/el.po b/addons/crm_partner_assign/i18n/el.po
index d621855b061..edad942b005 100644
--- a/addons/crm_partner_assign/i18n/el.po
+++ b/addons/crm_partner_assign/i18n/el.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Υψηλότερο"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/es.po b/addons/crm_partner_assign/i18n/es.po
index cfcbb629923..f4e6d399e15 100644
--- a/addons/crm_partner_assign/i18n/es.po
+++ b/addons/crm_partner_assign/i18n/es.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo localizar"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Más alta"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/es_CR.po b/addons/crm_partner_assign/i18n/es_CR.po
index 4315ece4f3b..383f2669379 100644
--- a/addons/crm_partner_assign/i18n/es_CR.po
+++ b/addons/crm_partner_assign/i18n/es_CR.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
"Language: es\n"
#. module: crm_partner_assign
@@ -75,7 +75,7 @@ msgid "Geo Localize"
msgstr "Geo localizar"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Versión en texto plano del mensaje"
@@ -136,7 +136,7 @@ msgid "Highest"
msgstr "Más alta"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Contenido del Texto"
diff --git a/addons/crm_partner_assign/i18n/es_PY.po b/addons/crm_partner_assign/i18n/es_PY.po
index b3e52bffc08..b250c96e070 100644
--- a/addons/crm_partner_assign/i18n/es_PY.po
+++ b/addons/crm_partner_assign/i18n/es_PY.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo localizar"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Muy alto"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/fi.po b/addons/crm_partner_assign/i18n/fi.po
index cd7065f8fd6..9c237cf5495 100644
--- a/addons/crm_partner_assign/i18n/fi.po
+++ b/addons/crm_partner_assign/i18n/fi.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Alueellista"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Korkein"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/fr.po b/addons/crm_partner_assign/i18n/fr.po
index 770f58f72a5..0d3f4e07808 100644
--- a/addons/crm_partner_assign/i18n/fr.po
+++ b/addons/crm_partner_assign/i18n/fr.po
@@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -75,7 +75,7 @@ msgid "Geo Localize"
msgstr "Géolocalisation"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Version plein texte du message"
@@ -136,7 +136,7 @@ msgid "Highest"
msgstr "La Plus haute"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Contenu du texte"
diff --git a/addons/crm_partner_assign/i18n/gl.po b/addons/crm_partner_assign/i18n/gl.po
index 5bf10d25f16..184f3a25386 100644
--- a/addons/crm_partner_assign/i18n/gl.po
+++ b/addons/crm_partner_assign/i18n/gl.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Xeolocalizar"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "A máis alta"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/hr.po b/addons/crm_partner_assign/i18n/hr.po
index e18b6c5188e..3236f0bd3ac 100644
--- a/addons/crm_partner_assign/i18n/hr.po
+++ b/addons/crm_partner_assign/i18n/hr.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Najviši"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/hu.po b/addons/crm_partner_assign/i18n/hu.po
index 816f93f1203..daaeca2363e 100644
--- a/addons/crm_partner_assign/i18n/hu.po
+++ b/addons/crm_partner_assign/i18n/hu.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Földrajzi fekvés meghatározása"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Legmagasabb"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/it.po b/addons/crm_partner_assign/i18n/it.po
index c008216c5d3..21d3c30d82b 100644
--- a/addons/crm_partner_assign/i18n/it.po
+++ b/addons/crm_partner_assign/i18n/it.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo localizzazione"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Maggiore"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/ja.po b/addons/crm_partner_assign/i18n/ja.po
index d6a739dc2b1..93dcbe346ca 100644
--- a/addons/crm_partner_assign/i18n/ja.po
+++ b/addons/crm_partner_assign/i18n/ja.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "ジオロカライゼーション"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "メッセージのテキスト版"
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "最高"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "テキストの内容"
diff --git a/addons/crm_partner_assign/i18n/lt.po b/addons/crm_partner_assign/i18n/lt.po
index 7c2f427260a..8e89e14575c 100644
--- a/addons/crm_partner_assign/i18n/lt.po
+++ b/addons/crm_partner_assign/i18n/lt.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr ""
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/lv.po b/addons/crm_partner_assign/i18n/lv.po
index a51b096e0a3..182f8990341 100644
--- a/addons/crm_partner_assign/i18n/lv.po
+++ b/addons/crm_partner_assign/i18n/lv.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Ģeo. lokalizācija"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "Augstākā"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/nl.po b/addons/crm_partner_assign/i18n/nl.po
index ebb0cf33f10..ac9dc276e82 100644
--- a/addons/crm_partner_assign/i18n/nl.po
+++ b/addons/crm_partner_assign/i18n/nl.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo lokaliseren"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Platte tekst versie van het bericht"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Hoogste"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Tekst inhoud"
diff --git a/addons/crm_partner_assign/i18n/pl.po b/addons/crm_partner_assign/i18n/pl.po
index 9645def6e96..31936f2794c 100644
--- a/addons/crm_partner_assign/i18n/pl.po
+++ b/addons/crm_partner_assign/i18n/pl.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Lokalizacja geograficzna"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Najwyższy"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/pt.po b/addons/crm_partner_assign/i18n/pt.po
index a1b159fe387..ba250d4519b 100644
--- a/addons/crm_partner_assign/i18n/pt.po
+++ b/addons/crm_partner_assign/i18n/pt.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Localizar Geograficamente"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Formatação do texto da versão da mensagem"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Maior"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Conteúdos do texto"
diff --git a/addons/crm_partner_assign/i18n/pt_BR.po b/addons/crm_partner_assign/i18n/pt_BR.po
index 10e51041d3f..fa7a7d0561c 100644
--- a/addons/crm_partner_assign/i18n/pt_BR.po
+++ b/addons/crm_partner_assign/i18n/pt_BR.po
@@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -75,7 +75,7 @@ msgid "Geo Localize"
msgstr "Localização Geográfica"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Versão em texto"
@@ -136,7 +136,7 @@ msgid "Highest"
msgstr "Mais Alta"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Conteúdo"
diff --git a/addons/crm_partner_assign/i18n/ro.po b/addons/crm_partner_assign/i18n/ro.po
index d4e43523d6e..c385587a99b 100644
--- a/addons/crm_partner_assign/i18n/ro.po
+++ b/addons/crm_partner_assign/i18n/ro.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Localizare Geo"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Versiune text-simplu a mesajului"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Cel mai ridicat (cea mai ridicata)"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Cuprins text"
diff --git a/addons/crm_partner_assign/i18n/ru.po b/addons/crm_partner_assign/i18n/ru.po
index 4a5229b59b2..0a354515bf8 100644
--- a/addons/crm_partner_assign/i18n/ru.po
+++ b/addons/crm_partner_assign/i18n/ru.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Геолоцировать"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Высший"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/sq.po b/addons/crm_partner_assign/i18n/sq.po
index 56d7f386635..7d2f01a6693 100644
--- a/addons/crm_partner_assign/i18n/sq.po
+++ b/addons/crm_partner_assign/i18n/sq.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:39+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr ""
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/sr@latin.po b/addons/crm_partner_assign/i18n/sr@latin.po
index 6e9aab21f1c..0605ee65706 100644
--- a/addons/crm_partner_assign/i18n/sr@latin.po
+++ b/addons/crm_partner_assign/i18n/sr@latin.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr ""
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr ""
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr ""
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr ""
diff --git a/addons/crm_partner_assign/i18n/sv.po b/addons/crm_partner_assign/i18n/sv.po
index 345d61d10b3..0605d54bcaa 100644
--- a/addons/crm_partner_assign/i18n/sv.po
+++ b/addons/crm_partner_assign/i18n/sv.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geoplacering"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Textversion av meddelandet"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "Högsta"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Textinnehåll"
diff --git a/addons/crm_partner_assign/i18n/tr.po b/addons/crm_partner_assign/i18n/tr.po
index da879a6156b..11fcc743002 100644
--- a/addons/crm_partner_assign/i18n/tr.po
+++ b/addons/crm_partner_assign/i18n/tr.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Coğrafi konumlama"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "Mesajın düz-metin versiyonu"
@@ -135,7 +135,7 @@ msgid "Highest"
msgstr "En yüksek"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "Metin içeriği"
diff --git a/addons/crm_partner_assign/i18n/zh_CN.po b/addons/crm_partner_assign/i18n/zh_CN.po
index 67f4a4e74b8..ff25feafd25 100644
--- a/addons/crm_partner_assign/i18n/zh_CN.po
+++ b/addons/crm_partner_assign/i18n/zh_CN.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-28 06:40+0000\n"
-"X-Generator: Launchpad (build 15864)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "geolocalization定位"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "内容的纯文本版本"
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "最高"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "文本内容"
diff --git a/addons/crm_partner_assign/i18n/zh_TW.po b/addons/crm_partner_assign/i18n/zh_TW.po
index 3c77816d71b..4870b464035 100644
--- a/addons/crm_partner_assign/i18n/zh_TW.po
+++ b/addons/crm_partner_assign/i18n/zh_TW.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-08-31 04:56+0000\n"
-"X-Generator: Launchpad (build 15887)\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:59+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0
@@ -74,7 +74,7 @@ msgid "Geo Localize"
msgstr "Geo 定位"
#. module: crm_partner_assign
-#: help:crm.lead.forward.to.partner,body_text:0
+#: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message"
msgstr "內容的純文字版本"
@@ -133,7 +133,7 @@ msgid "Highest"
msgstr "最高"
#. module: crm_partner_assign
-#: field:crm.lead.forward.to.partner,body_text:0
+#: field:crm.lead.forward.to.partner,body:0
msgid "Text contents"
msgstr "文本內容"
diff --git a/addons/crm_partner_assign/test/partner_assign.yml b/addons/crm_partner_assign/test/partner_assign.yml
index bc4cd0d6e57..a055fc6cd6d 100644
--- a/addons/crm_partner_assign/test/partner_assign.yml
+++ b/addons/crm_partner_assign/test/partner_assign.yml
@@ -29,8 +29,8 @@
I forward this opportunity to its nearest partner.
-
!python {model: crm.lead.forward.to.partner}: |
- context.update({'active_model': 'crm.lead', 'active_id': ref('crm.crm_case_19'), 'active_ids': [ref('crm.crm_case_19')]})
- forward_id = self.create(cr, uid, {'email_from': 'test@openerp.com', 'send_to': 'partner'}, context=context)
+ context.update({'default_model': 'crm.lead', 'default_res_id': ref('crm.crm_case_19'), 'active_ids': [ref('crm.crm_case_19')]})
+ forward_id = self.create(cr, uid, {}, context=context)
try:
self.action_forward(cr, uid, [forward_id], context=context)
except:
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
index d479f8b1bd5..0cac38e0163 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -20,186 +20,153 @@
#
##############################################################################
-import time
import re
+import time
+import tools
+
from osv import osv, fields
from tools.translate import _
-from mail.mail_message import to_email
class crm_lead_forward_to_partner(osv.osv_memory):
- """Forwards lead history"""
+ """ Forward info history to partners. """
_name = 'crm.lead.forward.to.partner'
_inherit = "mail.compose.message"
+ def default_get(self, cr, uid, fields, context=None):
+ if context is None:
+ context = {}
+ # set as comment, perform overrided document-like action that calls get_record_data
+ old_mode = context.get('default_composition_mode', 'forward')
+ context['default_composition_mode'] = 'comment'
+ res = super(crm_lead_forward_to_partner, self).default_get(cr, uid, fields, context=context)
+ # back to forward mode
+ context['default_composition_mode'] = old_mode
+ res['composition_mode'] = context['default_composition_mode']
+ return res
+
+ def _get_composition_mode_selection(self, cr, uid, context=None):
+ composition_mode = super(crm_lead_forward_to_partner, self)._get_composition_mode_selection(cr, uid, context=context)
+ composition_mode.append(('forward', 'Forward'))
+ return composition_mode
+
_columns = {
- 'send_to': fields.selection([('user', 'User'), ('partner', 'Partner'), \
- ('email', 'Email Address')], 'Send to', required=True),
- 'user_id': fields.many2one('res.users', "User"),
- 'attachment_ids': fields.many2many('ir.attachment','lead_forward_to_partner_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
- 'partner_id' : fields.many2one('res.partner', 'Partner'),
- 'history': fields.selection([('info', 'Case Information'), ('latest', 'Latest email'), ('whole', 'Whole Story')], 'Send history', required=True),
+ 'partner_ids': fields.many2many('res.partner',
+ 'lead_forward_to_partner_res_partner_rel',
+ 'wizard_id', 'partner_id', 'Additional contacts'),
+ 'attachment_ids': fields.many2many('ir.attachment',
+ 'lead_forward_to_partner_attachment_rel',
+ 'wizard_id', 'attachment_id', 'Attachments'),
+ 'history_mode': fields.selection([('info', 'Case Information'),
+ ('latest', 'Latest email'), ('whole', 'Whole Story')],
+ 'Send history', required=True),
}
_defaults = {
- 'send_to' : 'email',
- 'history': 'latest',
- 'email_from': lambda s, cr, uid, c: s.pool.get('res.users').browse(cr, uid, uid, c).email,
+ 'history_mode': 'latest',
+ 'content_subtype': lambda self,cr, uid, context={}: 'html',
}
- def on_change_email(self, cr, uid, ids, user, context=None):
- if not user:
- return {'value': {'email_to': False}}
- return {'value': {'email_to': self.pool.get('res.users').browse(cr, uid, uid, context=context).email}}
-
- def on_change_history(self, cr, uid, ids, history_type, context=None):
- """Gives message body according to type of history selected
- * info: Forward the case information
- * whole: Send the whole history
- * latest: Send the latest histoy
+ def get_record_data(self, cr, uid, model, res_id, context=None):
+ """ Override of mail.compose.message, to add default values coming
+ form the related lead.
"""
- #TODO: ids and context are not comming
- res = {}
- res_id = context.get('active_id')
- model = context.get('active_model')
- lead = self.pool.get(model).browse(cr, uid, res_id, context)
- body_text = self._get_message_body_text(cr, uid, lead, history_type, context=context)
- if body_text:
- res = {'value': {'body_text' : body_text}}
+ res = super(crm_lead_forward_to_partner, self).get_record_data(cr, uid, model, res_id, context=context)
+ if model not in ('crm.lead') or not res_id:
+ return res
+ lead_obj = self.pool.get(model)
+ lead = lead_obj.browse(cr, uid, res_id, context=context)
+ subject = '%s: %s - %s' % (_('Fwd'), _('Lead forward'), lead.name)
+ body = self._get_message_body(cr, uid, lead, 'info', context=context)
+ res.update({
+ 'subject': subject,
+ 'body': body,
+ })
return res
-
- def on_change_partner(self, cr, uid, ids, partner_id):
- """This function fills address information based on partner/user selected
- """
- if not partner_id:
- return {'value' : {'email_to' : False}}
- partner_obj = self.pool.get('res.partner')
- data = {}
- partner = partner_obj.browse(cr, uid, [partner_id])
- user_id = partner and partner[0].user_id or False
- data.update({'email_from': partner and partner[0].email or "",
- 'email_cc' : user_id and user_id.user or '',
- 'user_id': user_id and user_id.id or False})
- return {'value' : data}
+
+ def on_change_history_mode(self, cr, uid, ids, history_mode, model, res_id, context=None):
+ """ Update body when changing history_mode """
+ if model and model == 'crm.lead' and res_id:
+ lead = self.pool.get(model).browse(cr, uid, res_id, context=context)
+ body = self._get_message_body(cr, uid, lead, history_mode, context=context)
+ return {'value': {'body': body}}
+
+ def create(self, cr, uid, values, context=None):
+ """ TDE-HACK: remove 'type' from context, because when viewing an
+ opportunity form view, a default_type is set and propagated
+ to the wizard, that has a not matching type field. """
+ default_type = context.pop('default_type', None)
+ new_id = super(crm_lead_forward_to_partner, self).create(cr, uid, values, context=context)
+ if default_type:
+ context['default_type'] = default_type
+ return new_id
def action_forward(self, cr, uid, ids, context=None):
- """
- Forward the lead to a partner
- """
+ """ Forward the lead to a partner """
if context is None:
context = {}
res = {'type': 'ir.actions.act_window_close'}
- model = context.get('active_model')
- if model not in ('crm.lead'):
+ wizard = self.browse(cr, uid, ids[0], context=context)
+ if wizard.model not in ('crm.lead'):
return res
- this = self.browse(cr, uid, ids[0], context=context)
- lead = self.pool.get(model)
- lead_id = context and context.get('active_id', False) or False
- lead_ids = lead_id and [lead_id] or []
- mode = context.get('mail.compose.message.mode')
- if mode == 'mass_mail':
+ lead = self.pool.get(wizard.model)
+ lead_ids = wizard.res_id and [wizard.res_id] or []
+
+ if wizard.composition_mode == 'mass_mail':
lead_ids = context and context.get('active_ids', []) or []
- value = self.default_get(cr, uid, ['body_text', 'email_to', 'email_cc', 'subject', 'history'], context=context)
+ value = self.default_get(cr, uid, ['body', 'email_to', 'email_cc', 'subject', 'history_mode'], context=context)
self.write(cr, uid, ids, value, context=context)
- context['mail.compose.message.mode'] = mode
self.send_mail(cr, uid, ids, context=context)
- for case in lead.browse(cr, uid, lead_ids, context=context):
- if (this.send_to == 'partner' and this.partner_id):
- lead.assign_partner(cr, uid, [case.id], this.partner_id.id, context=context)
+ # for case in lead.browse(cr, uid, lead_ids, context=context):
+ # TODO: WHAT TO DO WITH THAT ?
+ # if (this.send_to == 'partner' and this.partner_id):
+ # lead.assign_partner(cr, uid, [case.id], this.partner_id.id, context=context)
- if this.send_to == 'user':
- lead.allocate_salesman(cr, uid, [case.id], [this.user_id.id], context=context)
-
- email_cc = to_email(case.email_cc)
- email_cc = email_cc and email_cc[0] or ''
- new_cc = []
- if email_cc:
- new_cc.append(email_cc)
- for to in this.email_to.split(','):
- email_to = to_email(to)
- email_to = email_to and email_to[0] or ''
- if email_to not in new_cc:
- new_cc.append(to)
- update_vals = {'email_cc' : ', '.join(new_cc) }
- lead.write(cr, uid, [case.id], update_vals, context=context)
+ # if this.send_to == 'user':
+ # lead.allocate_salesman(cr, uid, [case.id], [this.user_id.id], context=context)
return res
- def _get_info_body_text(self, cr, uid, lead, context=None):
+ def _get_info_body(self, cr, uid, lead, context=None):
field_names = []
proxy = self.pool.get(lead._name)
if lead.type == 'opportunity':
field_names += ['partner_id']
field_names += [
- 'partner_name' , 'title', 'function', 'street', 'street2',
+ 'partner_name' , 'title', 'function', 'street', 'street2',
'zip', 'city', 'country_id', 'state_id', 'email_from',
'phone', 'fax', 'mobile', 'categ_id', 'description',
]
- return proxy._mail_body_text(cr, uid, lead, field_names, context=context)
+ return proxy._mail_body(cr, uid, lead, field_names, context=context)
- def _get_message_body_text(self, cr, uid, lead, mode='whole', context=None):
- """This function gets whole communication history and returns as top posting style
+ def _get_message_body(self, cr, uid, lead, history_mode='whole', context=None):
+ """ This function gets whole communication history and returns as top
+ posting style
+ #1: form a body, based on the lead
+ #2: append to the body the communication history, based on the
+ history_mode parameter
+
+ - info: Forward the case information
+ - latest: Send the latest history
+ - whole: Send the whole history
+
+ :param lead: browse_record on crm.lead
+ :param history_mode: 'whole' or 'latest'
"""
mail_message = self.pool.get('mail.message')
- message_ids = []
- body = self._get_info_body_text(cr, uid, lead, context=context)
- if mode in ('whole', 'latest'):
- message_ids = lead.message_ids
- message_ids = map(lambda x: x.id, filter(lambda x: x.email_from, message_ids))
- if mode == 'latest' and len(message_ids):
- message_ids = [message_ids[0]]
- for message in mail_message.browse(cr, uid, message_ids, context=context):
- header = '-------- Original Message --------'
- sender = 'From: %s' %(message.email_from or '')
- to = 'To: %s' % (message.email_to or '')
- sentdate = 'Date: %s' % (message.date or '')
- desc = '\n%s'%(message.body_text)
- original = [header, sender, to, sentdate, desc, '\n']
- original = '\n'.join(original)
- body += original
+ body = self._get_info_body(cr, uid, lead, context=context)
+ if history_mode not in ('whole', 'latest'):
+ return body or ''
+ for message in lead.message_ids:
+ header = '-------- Original Message --------'
+ sentdate = 'Date: %s' % (message.date or '')
+ desc = '\n%s'%(message.body)
+ original = [header, sentdate, desc, '\n']
+ original = '\n'.join(original)
+ body += original
+ if history_mode == 'latest':
+ break
return body or ''
- def get_value(self, cr, uid, model, res_id, context=None):
- if context is None:
- context = {}
- res = super(crm_lead_forward_to_partner, self).get_value(cr, uid, model, res_id, context=context)
- if model not in ("crm.lead"):
- return res
- proxy = self.pool.get(model)
- partner = self.pool.get('res.partner')
- lead = proxy.browse(cr, uid, res_id, context=context)
- mode = context.get('mail.compose.message.mode')
- if mode == "forward":
- body_type = context.get('mail.compose.message.body')
- email_cc = res.get('email_cc', "")
- email = res.get('email_to', "")
- subject = '%s: %s - %s' % (_('Fwd'), 'Lead forward', lead.name)
- body = self._get_message_body_text(cr, uid, lead, body_type, context=context)
- partner_assigned_id = lead.partner_assigned_id and lead.partner_assigned_id.id or False
- user_id = False
- if not partner_assigned_id:
- partner_assigned_id = proxy.search_geo_partner(cr, uid, [lead.id], context=None).get(lead.id, False)
- if partner_assigned_id:
- assigned_partner = partner.browse(cr, uid, partner_assigned_id, context=context)
- user_id = assigned_partner.user_id and assigned_partner.user_id.id or False
- email_cc = assigned_partner.user_id and assigned_partner.user_id.email or ''
- email = assigned_partner.email
-
- res.update({
- 'subject' : subject,
- 'body_text' : body,
- 'email_cc' : email_cc,
- 'email_to' : email,
- 'partner_assigned_id': partner_assigned_id,
- 'user_id': user_id,
- })
- return res
-
- def default_get(self, cr, uid, fields, context=None):
- if context is None:
- context = {}
- context['mail.compose.message.mode'] = 'forward'
- context['mail.compose.message.body'] = 'info'
- return super(crm_lead_forward_to_partner, self).default_get(cr, uid, fields, context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
index cecf73954e5..0d8f27eec74 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
@@ -7,42 +7,31 @@
crm.lead.forward.to.partner
@@ -57,18 +46,14 @@
new
-
-
-
-
+ />
diff --git a/addons/crm_profiling/i18n/nb.po b/addons/crm_profiling/i18n/nb.po
new file mode 100644
index 00000000000..653dc05522e
--- /dev/null
+++ b/addons/crm_profiling/i18n/nb.po
@@ -0,0 +1,212 @@
+# Norwegian Bokmal 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 , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-09-06 14:26+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-09-07 04:58+0000\n"
+"X-Generator: Launchpad (build 15914)\n"
+
+#. module: crm_profiling
+#: view:crm_profiling.questionnaire:0
+msgid "Questions List"
+msgstr "Spørsmål liste."
+
+#. module: crm_profiling
+#: model:ir.actions.act_window,help:crm_profiling.open_questionnaires
+msgid ""
+"You can create specific topic-related questionnaires to guide your team(s) "
+"in the sales cycle by helping them to ask the right questions. The "
+"segmentation tool allows you to automatically assign a partner to a category "
+"according to his answers to the different questionnaires."
+msgstr ""
+"Du kan opprette spesifikke tema-relaterte spørreskjemaer for å styre lag (e) "
+"i salgsperioden ved å hjelpe dem til å stille de riktige spørsmålene. "
+"Segmentering verktøyet lar deg automatisk tildele en partner til en kategori "
+"i henhold til hans svar til de ulike spørreskjemaer."
+
+#. module: crm_profiling
+#: field:crm_profiling.answer,question_id:0
+#: field:crm_profiling.question,name:0
+#: model:ir.model,name:crm_profiling.model_crm_profiling_question
+#: field:open.questionnaire.line,question_id:0
+msgid "Question"
+msgstr "Spørsmål"
+
+#. module: crm_profiling
+#: model:ir.actions.act_window,name:crm_profiling.action_open_questionnaire
+#: view:open.questionnaire:0
+msgid "Open Questionnaire"
+msgstr "åpen Spørreskjema"
+
+#. module: crm_profiling
+#: field:crm.segmentation,child_ids:0
+msgid "Child Profiles"
+msgstr "Barn profiler"
+
+#. module: crm_profiling
+#: view:crm.segmentation:0
+msgid "Partner Segmentations"
+msgstr "Partner segmenteringer"
+
+#. module: crm_profiling
+#: field:crm_profiling.answer,name:0
+#: model:ir.model,name:crm_profiling.model_crm_profiling_answer
+#: field:open.questionnaire.line,answer_id:0
+msgid "Answer"
+msgstr "Svar"
+
+#. module: crm_profiling
+#: model:ir.model,name:crm_profiling.model_open_questionnaire_line
+msgid "open.questionnaire.line"
+msgstr "Åpen.Spørreskjema.Linje"
+
+#. module: crm_profiling
+#: model:ir.model,name:crm_profiling.model_crm_segmentation
+msgid "Partner Segmentation"
+msgstr "Partnersegmentering"
+
+#. module: crm_profiling
+#: view:res.partner:0
+msgid "Profiling"
+msgstr "Profilering"
+
+#. module: crm_profiling
+#: view:crm_profiling.questionnaire:0
+#: field:crm_profiling.questionnaire,description:0
+msgid "Description"
+msgstr "Beskrivelse:"
+
+#. module: crm_profiling
+#: field:crm.segmentation,answer_no:0
+msgid "Excluded Answers"
+msgstr "Ekskluderte svar"
+
+#. module: crm_profiling
+#: view:crm_profiling.answer:0
+#: view:crm_profiling.question:0
+#: field:res.partner,answers_ids:0
+msgid "Answers"
+msgstr "Svar"
+
+#. module: crm_profiling
+#: model:ir.model,name:crm_profiling.model_open_questionnaire
+msgid "open.questionnaire"
+msgstr "Åpen.Spørresjema"
+
+#. module: crm_profiling
+#: field:open.questionnaire,questionnaire_id:0
+msgid "Questionnaire name"
+msgstr "Spørresjema navn."
+
+#. module: crm_profiling
+#: view:res.partner:0
+msgid "Use a questionnaire"
+msgstr "Bruk et spørresjema."
+
+#. module: crm_profiling
+#: view:open.questionnaire:0
+msgid "_Cancel"
+msgstr "_Avbryt"
+
+#. module: crm_profiling
+#: field:open.questionnaire,question_ans_ids:0
+msgid "Question / Answers"
+msgstr "Spørsmål / Svar"
+
+#. module: crm_profiling
+#: view:crm_profiling.questionnaire:0
+#: model:ir.actions.act_window,name:crm_profiling.open_questionnaires
+#: model:ir.ui.menu,name:crm_profiling.menu_segm_questionnaire
+#: view:open.questionnaire:0
+msgid "Questionnaires"
+msgstr "Spørreskjemaer"
+
+#. module: crm_profiling
+#: help:crm.segmentation,profiling_active:0
+msgid ""
+"Check this box if you want to use this tab as "
+"part of the segmentation rule. If not checked, "
+"the criteria beneath will be ignored"
+msgstr ""
+"Kryss av her hvis du ønsker å bruke denne kategorien som en del av "
+"segmentering regelen. Hvis det ikke er merket, vil kriteriene under bli "
+"ignorert."
+
+#. module: crm_profiling
+#: constraint:crm.segmentation:0
+msgid "Error ! You can not create recursive profiles."
+msgstr "Feil ! Du kan ikke lage rekursive profiler."
+
+#. module: crm_profiling
+#: field:crm.segmentation,profiling_active:0
+msgid "Use The Profiling Rules"
+msgstr "Bruk profileringen Regler"
+
+#. module: crm_profiling
+#: constraint:res.partner:0
+msgid "Error ! You cannot create recursive associated members."
+msgstr "Feil! Du kan ikke opprette rekursive tilknyttede medlemmer."
+
+#. module: crm_profiling
+#: view:crm_profiling.question:0
+#: field:crm_profiling.question,answers_ids:0
+msgid "Avalaible Answers"
+msgstr ""
+
+#. module: crm_profiling
+#: field:crm.segmentation,answer_yes:0
+msgid "Included Answers"
+msgstr "Inkluderte svar."
+
+#. module: crm_profiling
+#: view:crm_profiling.question:0
+#: field:crm_profiling.questionnaire,questions_ids:0
+#: model:ir.actions.act_window,name:crm_profiling.open_questions
+#: model:ir.ui.menu,name:crm_profiling.menu_segm_answer
+msgid "Questions"
+msgstr "Spørsmål"
+
+#. module: crm_profiling
+#: field:crm.segmentation,parent_id:0
+msgid "Parent Profile"
+msgstr "Overordnede profil"
+
+#. module: crm_profiling
+#: view:open.questionnaire:0
+msgid "Cancel"
+msgstr "Kanseller"
+
+#. module: crm_profiling
+#: model:ir.model,name:crm_profiling.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+
+#. module: crm_profiling
+#: code:addons/crm_profiling/wizard/open_questionnaire.py:77
+#: field:crm_profiling.questionnaire,name:0
+#: model:ir.model,name:crm_profiling.model_crm_profiling_questionnaire
+#: view:open.questionnaire:0
+#: view:open.questionnaire.line:0
+#: field:open.questionnaire.line,wizard_id:0
+#, python-format
+msgid "Questionnaire"
+msgstr "Spørreskjemaet"
+
+#. module: crm_profiling
+#: view:open.questionnaire:0
+msgid "Save Data"
+msgstr "Lagre data"
+
+#~ msgid "Avalaible answers"
+#~ msgstr "Tilgjengelige svar."
diff --git a/addons/document/board_document_view.xml b/addons/document/board_document_view.xml
index a802d788e05..986b054383f 100644
--- a/addons/document/board_document_view.xml
+++ b/addons/document/board_document_view.xml
@@ -8,9 +8,6 @@