[Merge]:lp:~openerp-dev/openobject-addons/trunk-salesteam-kanban-tpa

bzr revid: sunilsharma.sharma07@gmail.com-20131015112043-pt98cyyghkpnyrn4
This commit is contained in:
Sunil Sharma (OpenERP)
2013-10-15 16:50:43 +05:30
10 changed files with 641 additions and 40 deletions
@@ -0,0 +1,357 @@
# Danish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-10-15 00:23+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-15 04:41+0000\n"
"X-Generator: Launchpad (build 16799)\n"
#. module: account_bank_statement_extensions
#: help:account.bank.statement.line.global,name:0
msgid "Originator to Beneficiary Information"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: selection:account.bank.statement.line,state:0
msgid "Confirmed"
msgstr "Bekræftet"
#. module: account_bank_statement_extensions
#: view:account.bank.statement:0
#: view:account.bank.statement.line:0
msgid "Glob. Id"
msgstr ""
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "CODA"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,parent_id:0
msgid "Parent Code"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Debit"
msgstr "Debet"
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_cancel_statement_line
#: model:ir.model,name:account_bank_statement_extensions.model_cancel_statement_line
msgid "Cancel selected statement lines"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,val_date:0
msgid "Value Date"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Group By..."
msgstr "Gruppér efter..."
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: selection:account.bank.statement.line,state:0
msgid "Draft"
msgstr "Kladde"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement"
msgstr "Erklæring"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_confirm_statement_line
#: model:ir.model,name:account_bank_statement_extensions.model_confirm_statement_line
msgid "Confirm selected statement lines"
msgstr ""
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
#: model:ir.actions.report.xml,name:account_bank_statement_extensions.bank_statement_balance_report
msgid "Bank Statement Balances Report"
msgstr ""
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
msgid "Cancel Lines"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line_global
msgid "Batch Payment Info"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,state:0
msgid "Status"
msgstr "Status"
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
#, python-format
msgid ""
"Delete operation not allowed. Please go to the associated bank "
"statement in order to delete and/or modify bank statement line."
msgstr ""
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "or"
msgstr "eller"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Confirm Lines"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
msgid "Transactions"
msgstr "Transaktioner"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,type:0
msgid "Type"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: report:bank.statement.balance.report:0
msgid "Journal"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Confirmed Statement Lines."
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Credit Transactions."
msgstr ""
#. module: account_bank_statement_extensions
#: model:ir.actions.act_window,help:account_bank_statement_extensions.action_cancel_statement_line
msgid "cancel selected statement lines."
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_number:0
msgid "Counterparty Number"
msgstr ""
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Closing Balance"
msgstr ""
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Date"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: field:account.bank.statement.line,globalisation_amount:0
msgid "Glob. Amount"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Debit Transactions."
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Extended Filters..."
msgstr ""
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Confirmed lines cannot be changed anymore."
msgstr ""
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
msgid "Are you sure you want to cancel the selected Bank Statement lines ?"
msgstr ""
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Name"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,name:0
msgid "OBI"
msgstr ""
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "ISO 20022"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Notes"
msgstr ""
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "Manual"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Bank Transaction"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Credit"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,amount:0
msgid "Amount"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Fin.Account"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_currency:0
msgid "Counterparty Currency"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_bic:0
msgid "Counterparty BIC"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,child_ids:0
msgid "Child Codes"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Search Bank Transactions"
msgstr ""
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Are you sure you want to confirm the selected Bank Statement lines ?"
msgstr ""
#. module: account_bank_statement_extensions
#: help:account.bank.statement.line,globalisation_id:0
msgid ""
"Code to identify transactions belonging to the same globalisation level "
"within a batch payment"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Draft Statement Lines."
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Glob. Am."
msgstr ""
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,code:0
msgid "Code"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_name:0
msgid "Counterparty Name"
msgstr ""
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_res_partner_bank
msgid "Bank Accounts"
msgstr "Bankkonti"
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement Line"
msgstr ""
#. module: account_bank_statement_extensions
#: sql_constraint:account.bank.statement.line.global:0
msgid "The code must be unique !"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,bank_statement_line_ids:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_bank_statement_line
#: model:ir.ui.menu,name:account_bank_statement_extensions.bank_statement_line
msgid "Bank Statement Lines"
msgstr ""
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:129
#, python-format
msgid "Warning!"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
msgid "Child Batch Payments"
msgstr ""
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Cancel"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement Lines"
msgstr ""
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Total Amount"
msgstr ""
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,globalisation_id:0
msgid "Globalisation ID"
msgstr ""
+256
View File
@@ -0,0 +1,256 @@
# Danish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-10-14 19:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-15 04:41+0000\n"
"X-Generator: Launchpad (build 16799)\n"
#. module: base_gengo
#: view:res.company:0
msgid "Comments for Translator"
msgstr "Bemærkning til oversætter"
#. module: base_gengo
#: field:ir.translation,job_id:0
msgid "Gengo Job ID"
msgstr "Gengo Job ID"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "This language is not supported by the Gengo translation services."
msgstr "Dette sprog er ikke supporteret af Gengo oversættelses service."
#. module: base_gengo
#: field:res.company,gengo_comment:0
msgid "Comments"
msgstr "Bemærkninger"
#. module: base_gengo
#: field:res.company,gengo_private_key:0
msgid "Gengo Private Key"
msgstr "Gengo Privat nøgle"
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_base_gengo_translations
msgid "base.gengo.translations"
msgstr "base.gengo.translations"
#. module: base_gengo
#: help:res.company,gengo_auto_approve:0
msgid "Jobs are Automatically Approved by Gengo."
msgstr "Opgaver er automatisk godkendt af Gengo."
#. module: base_gengo
#: field:base.gengo.translations,lang_id:0
msgid "Language"
msgstr "Sprog"
#. module: base_gengo
#: field:ir.translation,gengo_comment:0
msgid "Comments & Activity Linked to Gengo"
msgstr "Bemærkninger og aktiviteter forbundet til Gengo"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:124
#, python-format
msgid "Gengo Sync Translation (Response)"
msgstr "Gengo synk oversættelse (Svar)"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:72
#, python-format
msgid ""
"Gengo `Public Key` or `Private Key` are missing. Enter your Gengo "
"authentication parameters under `Settings > Companies > Gengo Parameters`."
msgstr ""
"Gengo 'Offentlig nøgle' eller 'Private nøgle' mangler. Indtast din Gengo "
"godkendelses oplysninger under 'Opsætning > Firmaer > Gengo opsætning'."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Translation By Machine"
msgstr "Maskinel oversættelse"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:155
#, python-format
msgid ""
"%s\n"
"\n"
"--\n"
" Commented on %s by %s."
msgstr ""
"%s\n"
"\n"
"--\n"
" Kommenteret på %s af %s."
#. module: base_gengo
#: field:ir.translation,gengo_translation:0
msgid "Gengo Translation Service Level"
msgstr "Gengo Oversættelses service niveau"
#. module: base_gengo
#: constraint:ir.translation:0
msgid ""
"The Gengo translation service selected is not supported for this language."
msgstr ""
"Den valgte Genko oversættelses service er ikke supporteret for dette sprog."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Standard"
msgstr "Standard"
#. module: base_gengo
#: help:ir.translation,gengo_translation:0
msgid ""
"You can select here the service level you want for an automatic translation "
"using Gengo."
msgstr ""
#. module: base_gengo
#: field:base.gengo.translations,restart_send_job:0
msgid "Restart Sending Job"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid "To Approve In Gengo"
msgstr ""
#. module: base_gengo
#: view:res.company:0
msgid "Private Key"
msgstr "Privat nøgle"
#. module: base_gengo
#: view:res.company:0
msgid "Public Key"
msgstr "Offentlig nøgle"
#. module: base_gengo
#: field:res.company,gengo_public_key:0
msgid "Gengo Public Key"
msgstr "Gengo offentlig nøgle"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:123
#, python-format
msgid "Gengo Sync Translation (Request)"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid "Translations"
msgstr "Oversættelser"
#. module: base_gengo
#: field:res.company,gengo_auto_approve:0
msgid "Auto Approve Translation ?"
msgstr ""
#. module: base_gengo
#: model:ir.actions.act_window,name:base_gengo.action_wizard_base_gengo_translations
#: model:ir.ui.menu,name:base_gengo.menu_action_wizard_base_gengo_translations
msgid "Gengo: Manual Request of Translation"
msgstr ""
#. module: base_gengo
#: code:addons/base_gengo/ir_translation.py:62
#: code:addons/base_gengo/wizard/base_gengo_translations.py:109
#, python-format
msgid "Gengo Authentication Error"
msgstr ""
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_res_company
msgid "Companies"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid ""
"Note: If the translation state is 'In Progress', it means that the "
"translation has to be approved to be uploaded in this system. You are "
"supposed to do that directly by using your Gengo Account"
msgstr ""
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:82
#, python-format
msgid ""
"Gengo connection failed with this message:\n"
"``%s``"
msgstr ""
#. module: base_gengo
#: view:res.company:0
msgid "Gengo Parameters"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Send"
msgstr ""
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Ultra"
msgstr ""
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_ir_translation
msgid "ir.translation"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid "Gengo Translation Service"
msgstr ""
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Pro"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Gengo Request Form"
msgstr ""
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "Warning"
msgstr ""
#. module: base_gengo
#: help:res.company,gengo_comment:0
msgid ""
"This comment will be automatically be enclosed in each an every request sent "
"to Gengo"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Cancel"
msgstr ""
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "or"
msgstr ""
+3 -5
View File
@@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
import simplejson
import openerp
from openerp.addons.web.http import Controller, route
class ImportController(openerp.addons.web.http.Controller):
_cp_path = '/base_import'
@openerp.addons.web.http.httprequest
class ImportController(Controller):
@route('/base_import/set_file')
def set_file(self, req, file, import_id, jsonp='callback'):
import_id = int(import_id)
+3 -2
View File
@@ -224,12 +224,13 @@ class ir_import(orm.TransientModel):
headers, matches = self._match_headers(rows, fields, options)
# Match should have consumed the first row (iif headers), get
# the ``count`` next rows for preview
preview = itertools.islice(rows, count)
preview = list(itertools.islice(rows, count))
assert preview, "CSV file seems to have no content"
return {
'fields': fields,
'matches': matches or False,
'headers': headers or False,
'preview': list(preview),
'preview': preview,
}
except Exception, e:
# Due to lazy generators, UnicodeDecodeError (for
+7 -6
View File
@@ -26,9 +26,6 @@ from openerp.report.render.rml2pdf import customfonts
class base_config_settings(osv.osv_memory):
_name = 'base.config.settings'
_inherit = 'res.config.settings'
def _get_font(self, cr, uid, context=None):
return sorted(customfonts.RegisterCustomFonts())
_columns = {
'module_multi_company': fields.boolean('Manage multiple companies',
@@ -44,11 +41,11 @@ class base_config_settings(osv.osv_memory):
'module_base_import': fields.boolean("Allow users to import data from CSV files"),
'module_google_drive': fields.boolean('Attach Google documents to any record',
help="""This installs the module google_docs."""),
'font': fields.selection(_get_font, "Select Font", help="Set the font into the report header, will be used for every RML report of the user company"),
'font': fields.many2one('res.font', string="Report Font", help="Set the font into the report header, it will be used as default font in the RML reports of the user company"),
}
_defaults= {
'font': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.font or 'Helvetica',
'font': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.font.id,
}
def open_company(self, cr, uid, ids, context=None):
@@ -74,9 +71,13 @@ class base_config_settings(osv.osv_memory):
wizard = self.browse(cr, uid, ids)[0]
if wizard.font:
user = self.pool.get('res.users').browse(cr, uid, uid, context)
user.company_id.write({'font':wizard.font,'rml_header': self._change_header(user.company_id.rml_header,wizard.font), 'rml_header2': self._change_header(user.company_id.rml_header2,wizard.font), 'rml_header3': self._change_header(user.company_id.rml_header3,wizard.font)})
font_name = wizard.font.name
user.company_id.write({'font': wizard.font.id,'rml_header': self._change_header(user.company_id.rml_header,font_name), 'rml_header2': self._change_header(user.company_id.rml_header2, font_name), 'rml_header3': self._change_header(user.company_id.rml_header3, font_name)})
return {}
def act_discover_fonts(self, cr, uid, ids, context=None):
return self.pool.get("res.font").discover_fonts(cr, uid, ids, context)
# Preferences wizard for Sales & CRM.
# It is defined here because it is inherited independently in modules sale, crm,
# plugin_outlook and plugin_thunderbird.
+3 -2
View File
@@ -90,11 +90,12 @@
</div>
</div>
</group>
<group string="Report Settings">
<label for="font" string="RML font (Header/footer)" />
<group>
<label for="font" />
<div>
<div>
<field name="font" class="oe_inline"/>
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
</div>
</div>
</group>
+7 -6
View File
@@ -100,7 +100,7 @@ class crm_case_section(osv.osv):
def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
return dict(self.name_get(cr, uid, ids, context=context))
def __get_bar_values(self, cr, uid, obj, domain, read_fields, value_field, groupby_field, type=None, context=None):
def __get_bar_values(self, cr, uid, obj, domain, read_fields, value_field, groupby_field, context=None):
""" Generic method to generate data for bar chart values using SparklineBarWidget.
This method performs obj.read_group(cr, uid, domain, read_fields, groupby_field).
@@ -127,21 +127,22 @@ class crm_case_section(osv.osv):
month = self._period_number - (relativedelta.relativedelta(month_begin, group_begin_date).months + 1)
section_result[month] = {'value': 0, 'tooltip': group_begin_date.strftime('%B')}
inner_groupby = (group.get('__context', {})).get('group_by',[])
if type == "Lead" or not inner_groupby:
if value_field == 'create_date_count' or not inner_groupby:
section_result[month]['value'] = group.get(value_field, 0)
continue
elif inner_groupby:
if inner_groupby:
inner_group_obj = obj.read_group(cr, uid, group.get('__domain'), read_fields, inner_groupby, context=context)
for groupby in inner_group_obj:
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
base_currency_id = user.company_id.currency_id.id
if inner_groupby[0] == 'company_id':
base_currency_id = self.pool.get('res.company').browse(cr, uid, groupby['__domain'][0][2], context=context).currency_id.id
elif inner_groupby[0] == 'pricelist_id':
base_currency_id = self.pool.get('product.pricelist').browse(cr, uid, groupby['__domain'][0][2], context=context).currency_id.id
elif inner_groupby[0] == 'currency_id':
base_currency_id = self.pool.get('res.currency.rate').search_read(cr, uid, [('rate', '=', 1)], ['currency_id'], limit=1, context=context)[0]['currency_id'][0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
value = self.pool.get('res.currency').compute(cr, uid, base_currency_id, user.company_id.currency_id.id, groupby.get(value_field, 0))
section_result[month]['value'] = section_result[month]['value'] + value
section_result[month]['value'] += value
return section_result
def _get_opportunities_data(self, cr, uid, ids, field_name, arg, context=None):
@@ -158,7 +159,7 @@ class crm_case_section(osv.osv):
for id in ids:
res[id] = dict()
lead_domain = date_domain + [('type', '=', 'lead'), ('section_id', '=', id)]
res[id]['monthly_open_leads'] = self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date','company_id'], 'create_date_count', ['create_date', 'company_id'], type="Lead", context=context)
res[id]['monthly_open_leads'] = self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date','company_id'], 'create_date_count', ['create_date', 'company_id'], context=context)
opp_domain = date_domain + [('type', '=', 'opportunity'), ('section_id', '=', id)]
res[id]['monthly_planned_revenue'] = self.__get_bar_values(cr, uid, obj, opp_domain, ['planned_revenue', 'create_date', 'company_id'], 'planned_revenue', ['create_date', 'company_id'], context=context)
return res
+2 -2
View File
@@ -144,11 +144,11 @@
<div class="oe_items_list">
<div class="oe_salesteams_leads" t-if="record.use_leads.raw_value">
<a name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
<a name="%(action_report_crm_lead_salesteam)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar_sales" options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1, 'delayIn': '3000'}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
<a name="%(action_report_crm_lead_salesteam)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar" options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1, 'delayIn': '3000', 'tooltip_suffix': 'Lead(s)'}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
</div>
<div class="oe_salesteams_opportunities">
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
<a name="%(action_report_crm_opportunity_salesteam)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar_sales" options="{'height': '20px', 'barWidth': '4', 'barSpacing': '1', 'delayIn': '3000'}">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
<a name="%(action_report_crm_opportunity_salesteam)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar" options="{'height': '20px', 'barWidth': '4', 'barSpacing': '1', 'delayIn': '3000', 'tooltip_suffix_field': 'currency_symbol'}">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
</div>
</div>
</div>
@@ -1,5 +1,4 @@
openerp.crm = function(openerp) {
var _t = openerp.web._t;
openerp.web_kanban.KanbanRecord.include({
on_card_clicked: function() {
if (this.view.dataset.model === 'crm.case.section') {
@@ -9,17 +8,4 @@ var _t = openerp.web._t;
}
},
});
openerp.web_kanban.SparklineBarWidgetSalesTeam = openerp.web_kanban.SparklineBarWidget.extend({
set_offset:function(){
var self = this;
var currency_symbol = "";
if (self.getParent()){
currency_symbol = self.getParent().record.currency_symbol.raw_value;
};
return _.str.sprintf("{{offset:offset}}: {{value}} %s",self.$el.closest("div[class='oe_salesteams_leads']").attr('class') ? _t('Lead(s)') : currency_symbol)
}
});
openerp.web_kanban.fields_registry.add("sparkline_bar_sales", "openerp.web_kanban.SparklineBarWidgetSalesTeam");
};
+3 -3
View File
@@ -272,7 +272,7 @@
<div class="oe_salesteams_orders">
<a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
<a name="%(action_order_report_so_salesteam)d" type="action" class="oe_sparkline_bar_link">
<field name="monthly_confirmed" widget="sparkline_bar_sales" options="{'delayIn': '3000'}">
<field name="monthly_confirmed" widget="sparkline_bar" options="{'delayIn': '3000', 'tooltip_suffix_field': 'currency_symbol'}">
Revenue of confirmed sales orders per month.<br/>Click to acces the Sales Analysis.
</field>
</a>
@@ -282,7 +282,7 @@
<div class="oe_salesteams_invoices" groups="account.group_account_invoice">
<a name="%(action_invoice_salesteams)d" type="action">Invoices</a>
<a name="%(action_account_invoice_report_salesteam)d" type="action" class="oe_sparkline_bar_link">
<field name="monthly_invoiced" widget="sparkline_bar_sales" options="{'delayIn': '3000'}">
<field name="monthly_invoiced" widget="sparkline_bar" options="{'delayIn': '3000', 'tooltip_suffix_field': 'currency_symbol'}">
Revenue of sent invoices per month.<br/>Click to see a detailed analysis of invoices.
</field>
</a>
@@ -290,7 +290,7 @@
<div class="oe_salesteams_quotations">
<a name="%(action_quotations_salesteams)d" type="action" class="oe_sparkline_bar_link">Quotations</a>
<a name="%(action_order_report_quotation_salesteam)d" type="action" class="oe_sparkline_bar_link">
<field name="monthly_quoted" widget="sparkline_bar_sales" options="{'delayIn': '3000'}">
<field name="monthly_quoted" widget="sparkline_bar" options="{'delayIn': '3000', 'tooltip_suffix_field': 'currency_symbol'}">
Revenue of created quotations per month.<br/>Click to see a detailed analysis.
</field>
</a>