[MERGE] from upstream

bzr revid: fva@openerp.com-20130917101910-4h2g2njs2e9toc36
This commit is contained in:
Frédéric van der Essen 2013-09-17 12:19:10 +02:00
commit c33fd59465
73 changed files with 1798 additions and 4149 deletions

View File

@ -2788,6 +2788,7 @@ class account_chart_template(osv.osv):
'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."),
'currency_id': fields.many2one('res.currency', 'Currency'),
'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 sale and purchase rates or choose from list of taxes. This last choice assumes that the set of tax defined on this template is complete'),
'account_root_id': fields.many2one('account.account.template', 'Root Account', domain=[('parent_id','=',False)]),
'tax_code_root_id': fields.many2one('account.tax.code.template', 'Root Tax Code', domain=[('parent_id','=',False)]),
@ -3043,12 +3044,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'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}}
@ -3058,7 +3053,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
res['value'] = {'complete_tax_set': False, 'sale_tax': False, 'purchase_tax': False}
if chart_template_id:
data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
res['value'].update({'complete_tax_set': data.complete_tax_set})
currency_id = data.currency_id and data.currency_id.id or self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
res['value'].update({'complete_tax_set': data.complete_tax_set, 'currency_id': currency_id})
if data.complete_tax_set:
# default tax is given by the lowest sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
@ -3090,7 +3086,13 @@ class wizard_multi_charts_accounts(osv.osv_memory):
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
if ids:
if 'chart_template_id' in fields:
res.update({'only_one_chart_template': len(ids) == 1, 'chart_template_id': ids[0]})
#in order to get set default chart which was last created set max of ids.
chart_id = max(ids)
if context.get("default_charts"):
model_data = self.pool.get('ir.model.data').search_read(cr, uid, [('model','=','account.chart.template'),('module','=',context.get("default_charts"))], ['res_id'], context=context)
if model_data:
chart_id = model_data[0]['res_id']
res.update({'only_one_chart_template': len(ids) == 1, 'chart_template_id': chart_id})
if 'sale_tax' in fields:
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", ids[0]), ('type_tax_use', 'in', ('sale','all'))], order="sequence")

View File

@ -10,7 +10,7 @@
</form>
<footer position="replace">
<footer>
<button name="action_next" type="object" string="Continue" class="oe_highlight"/>
<button name="action_next" context="{'default_charts':charts}" type="object" string="Continue" class="oe_highlight"/>
</footer>
</footer>
<separator string="title" position="replace">

View File

@ -2120,7 +2120,7 @@
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
</group>
<group>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="currency_id" class="oe_inline"/>
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>

View File

@ -1,23 +1,28 @@
# Danish translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# 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>, 2012.
# 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-03 16:03+0000\n"
"PO-Revision-Date: 2012-01-27 08:38+0000\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-09-15 20:07+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: 2012-12-04 05:53+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2013-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
#. module: auth_crypt
#: field:res.users,password_crypt:0
msgid "Encrypted Password"
msgstr "Krypteret kodeord"
#. module: auth_crypt
#: model:ir.model,name:auth_crypt.model_res_users
msgid "Users"
msgstr ""
msgstr "Brugere"

View File

@ -0,0 +1,23 @@
# 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-09-15 20:08+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-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: auth_oauth_signup
#: model:ir.model,name:auth_oauth_signup.model_res_users
msgid "Users"
msgstr "Bruger"

View File

@ -0,0 +1,45 @@
# 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-09-15 20:14+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-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: contacts
#: model:ir.actions.act_window,help:contacts.action_contacts
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to add a contact in your address book.\n"
" </p><p>\n"
" OpenERP helps you easily track all activities related to\n"
" a customer; discussions, history of business opportunities,\n"
" documents, etc.\n"
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klik for at tilføje kontakt i din adressebog.\n"
" </p><p>\n"
" OpenERP hjælper med at spore alle aktiviteter i forbindelse med\n"
" kunde korrespondance, historik på forretnings muligheder,\n"
" dokumenter, o.s.v.\n"
" </p>\n"
" "
#. module: contacts
#: model:ir.actions.act_window,name:contacts.action_contacts
#: model:ir.ui.menu,name:contacts.menu_contacts
msgid "Contacts"
msgstr "Adressebog"

View File

@ -57,7 +57,8 @@ Dashboard for CRM will include:
'base_calendar',
'resource',
'board',
'fetchmail'
'fetchmail',
'web_kanban_sparkline',
],
'data': [
'crm_data.xml',
@ -122,7 +123,6 @@ Dashboard for CRM will include:
'static/src/css/crm.css'
],
'js': [
'static/lib/sparkline/jquery.sparkline.js',
'static/src/js/crm_case_section.js',
],
'installable': True,

View File

@ -99,11 +99,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)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
<a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar" options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1}">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)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
<a name="%(action_report_crm_opportunity)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar" height="20px" barWidth="4" barSpacing="1">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
</div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -9,26 +9,4 @@ openerp.crm = function(openerp) {
},
});
openerp.crm.SparklineBarWidget = openerp.web_kanban.AbstractField.extend({
className: "oe_sparkline_bar",
start: function() {
var self = this;
var title = this.$node.html();
setTimeout(function () {
var value = _.pluck(self.field.value, 'value');
var tooltips = _.pluck(self.field.value, 'tooltip');
self.$el.sparkline(value, {
type: 'bar',
barWidth: 5,
tooltipFormat: '{{offset:offset}} {{value}}',
tooltipValueLookups: {
'offset': tooltips
},
});
self.$el.tipsy({'delayIn': 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'});
}, 0);
},
});
openerp.web_kanban.fields_registry.add("sparkline_bar", "openerp.crm.SparklineBarWidget");
};

View File

@ -0,0 +1,490 @@
# English (United Kingdom) 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-09-14 06:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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-09-15 05:49+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: email_template
#: field:email.template,email_from:0
#: field:email_template.preview,email_from:0
msgid "From"
msgstr "From"
#. module: email_template
#: field:mail.compose.message,template_id:0
msgid "Template"
msgstr ""
#. module: email_template
#: help:email.template,ref_ir_value:0
#: help:email_template.preview,ref_ir_value:0
msgid "Sidebar button to open the sidebar action"
msgstr "Sidebar button to open the sidebar action"
#. module: email_template
#: field:res.partner,opt_out:0
msgid "Opt-Out"
msgstr "Opt-Out"
#. module: email_template
#: field:email.template,email_to:0
#: field:email_template.preview,email_to:0
msgid "To (Emails)"
msgstr "To (E-mails)"
#. module: email_template
#: field:email.template,mail_server_id:0
#: field:email_template.preview,mail_server_id:0
msgid "Outgoing Mail Server"
msgstr "Outgoing Mail Server"
#. module: email_template
#: help:email.template,ref_ir_act_window:0
#: help:email_template.preview,ref_ir_act_window:0
msgid ""
"Sidebar action to make this template available on records of the related "
"document model"
msgstr ""
"Sidebar action to make this template available on records of the related "
"document model"
#. module: email_template
#: field:email.template,model_object_field:0
#: field:email_template.preview,model_object_field:0
msgid "Field"
msgstr "Field"
#. module: email_template
#: help:email.template,email_from:0
#: help:email_template.preview,email_from:0
msgid "Sender address (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Remove context action"
msgstr "Remove context action"
#. module: email_template
#: help:email.template,mail_server_id:0
#: help:email_template.preview,mail_server_id:0
msgid ""
"Optional preferred server for outgoing mails. If not set, the highest "
"priority one will be used."
msgstr ""
#. module: email_template
#: field:email.template,report_name:0
#: field:email_template.preview,report_name:0
msgid "Report Filename"
msgstr "Report Filename"
#. module: email_template
#: view:email.template:0
msgid "Preview"
msgstr ""
#. module: email_template
#: field:email.template,reply_to:0
#: field:email_template.preview,reply_to:0
msgid "Reply-To"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Use template"
msgstr ""
#. module: email_template
#: field:email.template,body_html:0
#: field:email_template.preview,body_html:0
msgid "Body"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:247
#, python-format
msgid "%s (copy)"
msgstr ""
#. module: email_template
#: help:email.template,user_signature:0
#: help:email_template.preview,user_signature:0
msgid ""
"If checked, the user's signature will be appended to the text version of the "
"message"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "SMTP Server"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as new template"
msgstr ""
#. module: email_template
#: help:email.template,sub_object:0
#: help:email_template.preview,sub_object:0
msgid ""
"When a relationship field is selected as first field, this field shows the "
"document model the relationship goes to."
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_email_template
msgid "Email Templates"
msgstr ""
#. module: email_template
#: help:email.template,report_name:0
#: help:email_template.preview,report_name:0
msgid ""
"Name to use for the generated report file (may contain placeholders)\n"
"The extension can be omitted and will then come from the report type."
msgstr ""
#. module: email_template
#: field:email.template,ref_ir_act_window:0
#: field:email_template.preview,ref_ir_act_window:0
msgid "Sidebar action"
msgstr ""
#. module: email_template
#: help:email.template,lang:0
#: help:email_template.preview,lang:0
msgid ""
"Optional translation language (ISO code) to select when sending out an "
"email. If not set, the english version will be used. This should usually be "
"a placeholder expression that provides the appropriate language code, e.g. "
"${object.partner_id.lang.code}."
msgstr ""
#. module: email_template
#: field:email_template.preview,res_id:0
msgid "Sample Document"
msgstr ""
#. module: email_template
#: help:email.template,model_object_field:0
#: help:email_template.preview,model_object_field:0
msgid ""
"Select target field from the related document model.\n"
"If it is a relationship field you will be able to select a target field at "
"the destination of the relationship."
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Dynamic Value Builder"
msgstr ""
#. module: email_template
#: model:ir.actions.act_window,name:email_template.wizard_email_template_preview
msgid "Template Preview"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as a new template"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid ""
"Display an option on related documents to open a composition wizard with "
"this template"
msgstr ""
#. module: email_template
#: help:email.template,email_cc:0
#: help:email_template.preview,email_cc:0
msgid "Carbon copy recipients (placeholders may be used here)"
msgstr ""
#. module: email_template
#: help:email.template,email_to:0
#: help:email_template.preview,email_to:0
msgid "Comma-separated recipient addresses (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Advanced"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Preview of"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Using sample document"
msgstr ""
#. module: email_template
#: view:email.template:0
#: model:ir.actions.act_window,name:email_template.action_email_template_tree_all
#: model:ir.ui.menu,name:email_template.menu_email_templates
msgid "Templates"
msgstr ""
#. module: email_template
#: field:email.template,name:0
#: field:email_template.preview,name:0
msgid "Name"
msgstr ""
#. module: email_template
#: field:email.template,lang:0
#: field:email_template.preview,lang:0
msgid "Language"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_email_template_preview
msgid "Email Template Preview"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Email Preview"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid ""
"Remove the contextual action to use this template on related documents"
msgstr ""
#. module: email_template
#: field:email.template,copyvalue:0
#: field:email_template.preview,copyvalue:0
msgid "Placeholder Expression"
msgstr ""
#. module: email_template
#: field:email.template,sub_object:0
#: field:email_template.preview,sub_object:0
msgid "Sub-model"
msgstr ""
#. module: email_template
#: help:email.template,subject:0
#: help:email_template.preview,subject:0
msgid "Subject (placeholders may be used here)"
msgstr ""
#. module: email_template
#: help:email.template,reply_to:0
#: help:email_template.preview,reply_to:0
msgid "Preferred response address (placeholders may be used here)"
msgstr ""
#. module: email_template
#: field:email.template,ref_ir_value:0
#: field:email_template.preview,ref_ir_value:0
msgid "Sidebar Button"
msgstr ""
#. module: email_template
#: field:email.template,report_template:0
#: field:email_template.preview,report_template:0
msgid "Optional report to print and attach"
msgstr ""
#. module: email_template
#: help:email.template,null_value:0
#: help:email_template.preview,null_value:0
msgid "Optional value to use if the target field is empty"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Model"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Add context action"
msgstr ""
#. module: email_template
#: help:email.template,model_id:0
#: help:email_template.preview,model_id:0
msgid "The kind of document with with this template can be used"
msgstr ""
#. module: email_template
#: field:email.template,email_recipients:0
#: field:email_template.preview,email_recipients:0
msgid "To (Partners)"
msgstr ""
#. module: email_template
#: field:email.template,auto_delete:0
#: field:email_template.preview,auto_delete:0
msgid "Auto Delete"
msgstr ""
#. module: email_template
#: help:email.template,copyvalue:0
#: help:email_template.preview,copyvalue:0
msgid ""
"Final placeholder expression, to be copy-pasted in the desired template "
"field."
msgstr ""
#. module: email_template
#: field:email.template,model:0
#: field:email_template.preview,model:0
msgid "Related Document Model"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Addressing"
msgstr ""
#. module: email_template
#: help:email.template,email_recipients:0
#: help:email_template.preview,email_recipients:0
msgid ""
"Comma-separated ids of recipient partners (placeholders may be used here)"
msgstr ""
#. module: email_template
#: field:email.template,attachment_ids:0
#: field:email_template.preview,attachment_ids:0
msgid "Attachments"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Deletion of the action record failed."
msgstr ""
#. module: email_template
#: field:email.template,email_cc:0
#: field:email_template.preview,email_cc:0
msgid "Cc"
msgstr ""
#. module: email_template
#: field:email.template,model_id:0
#: field:email_template.preview,model_id:0
msgid "Applies to"
msgstr ""
#. module: email_template
#: field:email.template,sub_model_object_field:0
#: field:email_template.preview,sub_model_object_field:0
msgid "Sub-field"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Email Details"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:199
#, python-format
msgid "Send Mail (%s)"
msgstr ""
#. module: email_template
#: help:res.partner,opt_out:0
msgid ""
"If checked, this partner will not receive any automated email notifications, "
"such as the availability of invoices."
msgstr ""
#. module: email_template
#: help:email.template,auto_delete:0
#: help:email_template.preview,auto_delete:0
msgid "Permanently delete this email after sending it, to save space"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Group by..."
msgstr ""
#. module: email_template
#: help:email.template,sub_model_object_field:0
#: help:email_template.preview,sub_model_object_field:0
msgid ""
"When a relationship field is selected as first field, this field lets you "
"select the target field within the destination document model (sub-model)."
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Warning"
msgstr ""
#. module: email_template
#: field:email.template,user_signature:0
#: field:email_template.preview,user_signature:0
msgid "Add Signature"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_res_partner
msgid "Partner"
msgstr ""
#. module: email_template
#: field:email.template,null_value:0
#: field:email_template.preview,null_value:0
msgid "Default Value"
msgstr ""
#. module: email_template
#: help:email.template,attachment_ids:0
#: help:email_template.preview,attachment_ids:0
msgid ""
"You may attach files to this template, to be added to all emails created "
"from this template"
msgstr ""
#. module: email_template
#: help:email.template,body_html:0
#: help:email_template.preview,body_html:0
msgid "Rich-text/HTML version of the message (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Contents"
msgstr ""
#. module: email_template
#: field:email.template,subject:0
#: field:email_template.preview,subject:0
msgid "Subject"
msgstr ""

View File

@ -252,6 +252,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.ARS"/>
</record>

View File

@ -2518,6 +2518,7 @@
<field name="property_account_income_categ" ref="chart4000"/>
<field name="property_account_expense" ref="chart5000"/>
<field name="property_account_income" ref="chart4000"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -13,6 +13,7 @@
<field name="property_account_expense_categ" ref="a_expense"/>
<field name="property_account_income_categ" ref="a_sale"/>
<field name="spoken_languages" eval="'nl_BE'"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -249,6 +249,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.BOB"/>
</record>

View File

@ -11,6 +11,7 @@
<field name="property_account_payable" ref="account_template_201010100" />
<field name="property_account_expense_categ" ref="account_template_3010103010000" />
<field name="property_account_income_categ" ref="account_template_3010101010200" />
<field name="currency_id" ref="base.BRL"/>
</record>
</data>

View File

@ -13,6 +13,7 @@
<field name="property_account_payable" ref="chart2111_en"/>
<field name="property_account_income_categ" ref="chart411_en"/>
<field name="property_account_expense_categ" ref="chart5111_en"/>
<field name="currency_id" ref="base.CAD"/>
</record>
<record id="stock.property_stock_account_input_categ" model="ir.property">

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="chart2111_fr"/>
<field name="property_account_income_categ" ref="chart411_fr"/>
<field name="property_account_expense_categ" ref="chart5111_fr"/>
<field name="currency_id" ref="base.CAD"/>
</record>
<record id="stock.property_stock_account_input_categ" model="ir.property">

View File

@ -11812,6 +11812,7 @@
<field name="property_reserve_and_surplus_account" ref="ch_2991"/>
<field name="code_digits" eval="0"/>
<field name="spoken_languages" eval="'it_IT;de_DE'"/>
<field name="currency_id" ref="base.CHF"/>
</record>
</data>
</openerp>

View File

@ -248,6 +248,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.AUD"/>
</record>

View File

@ -957,6 +957,7 @@
<field name="property_account_payable" ref="chart2202"/>
<field name="property_account_expense_categ" ref="chart1401"/>
<field name="property_account_income_categ" ref="chart6001"/>
<field name="currency_id" ref="base.CNY"/>
</record>
<!-- 增值税 -->
<record id="vats" model="account.tax.template">

View File

@ -103348,6 +103348,7 @@ participacion, de conformidad con las disposiciones legales vigentes.
<field name="property_account_payable" ref="chart238095999"/>
<field name="property_account_expense_categ" ref="chart529595999"/>
<field name="property_account_income_categ" ref="chart413595999"/>
<field name="currency_id" ref="base.COP"/>
</record>
</data>

View File

@ -16,6 +16,7 @@
<field name="property_account_expense" ref="account_account_template_0_511301"/>
<field name="property_account_income_categ" ref="account_account_template_0_410001"/>
<field name="property_account_expense_categ" ref="account_account_template_0_511301"/>
<field name="currency_id" ref="base.CRC"/>
</record>
<record id="account_chart_template_x" model="account.chart.template">
<field name="name">Costa Rica - Company 1</field>
@ -28,6 +29,7 @@
<field name="property_account_expense" ref="account_account_template_x511301"/>
<field name="property_account_income_categ" ref="account_account_template_x410001"/>
<field name="property_account_expense_categ" ref="account_account_template_x511301"/>
<field name="currency_id" ref="base.CRC"/>
</record>
</data>
</openerp>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="account_1610"/>
<field name="property_account_expense_categ" ref="account_3400"/>
<field name="property_account_income_categ" ref="account_8400"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="chart_skr04_3301"/>
<field name="property_account_expense_categ" ref="chart_skr04_5400"/>
<field name="property_account_income_categ" ref="chart_skr04_4400"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -4202,7 +4202,8 @@
<field name="property_account_receivable" ref="4"/>
<field name="property_account_payable" ref="5"/>
<field name="property_account_expense_categ" ref="60101"/>
<field name="property_account_income_categ" ref="710101"/>
<field name="property_account_income_categ" ref="710101"/>
<field name="currency_id" ref="base.ECS"/>
</record>
</data>

View File

@ -13333,6 +13333,7 @@
<field name="property_account_payable" ref="pgc_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_600_child"/>
<field name="property_account_income_categ" ref="pgc_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -12420,6 +12420,7 @@
<field name="property_account_payable" ref="pgc_assoc_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_assoc_600_child"/>
<field name="property_account_income_categ" ref="pgc_assoc_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -11464,6 +11464,7 @@
<field name="property_account_payable" ref="pgc_pymes_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_pymes_600_child"/>
<field name="property_account_income_categ" ref="pgc_pymes_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -441,6 +441,7 @@
<field name="property_account_payable" ref="fr_pcg_pay"/>
<field name="property_account_expense_categ" ref="pcg_6071"/>
<field name="property_account_income_categ" ref="pcg_7071"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -21,6 +21,7 @@
<field name="property_account_payable" ref="chartgr_50_00"/>
<field name="property_account_expense_categ" ref="chartgr_64_98"/>
<field name="property_account_income_categ" ref="chartgr_71_00"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -31,6 +31,7 @@
<field name="property_account_payable" ref="cta210101"/>
<field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/>
<field name="currency_id" ref="base.QTQ"/>
</record>
<!-- Compras e IVA por Cobrar -->

View File

@ -17,6 +17,7 @@
<field name="property_account_payable" ref="cta210101"/>
<field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/>
<field name="currency_id" ref="base.HNL"/>
</record>
<!-- Compras e ISV por Cobrar -->

View File

@ -15,6 +15,7 @@
<field name="property_account_expense_categ" ref="kp_rrif4199"/>
<field name="property_account_income_categ" ref="kp_rrif7500"/>
<field name="currency_id" ref="base.HRK"/>
</record>
</data>

View File

@ -550,6 +550,7 @@
<field name="property_account_payable" ref="a215"/>
<field name="property_account_expense_categ" ref="a540"/>
<field name="property_account_income_categ" ref="a311"/>
<field name="currency_id" ref="base.INR"/>
</record>

View File

@ -988,6 +988,7 @@
<field name="property_account_payable" ref="p21000"/>
<field name="property_account_expense_categ" ref="p41010"/>
<field name="property_account_income_categ" ref="p31010"/>
<field name="currency_id" ref="base.INR"/>
</record>
</data>

View File

@ -11,6 +11,7 @@
<field name="property_account_payable" ref="2501"/>
<field name="property_account_expense_categ" ref="4101"/>
<field name="property_account_income_categ" ref="3101"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -13,6 +13,7 @@
<field name="property_account_income_categ" ref="lu_2011_account_7051"/>
<field name="property_account_income_opening" ref="lu_2011_account_141"/>
<field name="property_account_expense_opening" ref="lu_2011_account_141"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -742,7 +742,9 @@
<field name="account_root_id" ref="pcg_0"/>
<field name="tax_code_root_id" ref="vat_ma_tax_root"/>
<field name="bank_account_view_id" ref="pcg_514"/>
<field name="property_account_receivable" ref="pcg_3488"/>
<field name="property_account_payable" ref="pcg_4488"/>
<field name="currency_id" ref="base.MAD"/>
</record>
<record model="account.tax.template" id="tva_exo">

View File

@ -3695,6 +3695,7 @@ Cuentas del plan
<field name="property_account_income_categ" ref="cuenta5111001000"/>
<field name="property_stock_account_input_categ" ref="cuenta4111003000"/>
<field name="property_stock_account_output_categ" ref="cuenta4511003000"/>
<field name="currency_id" ref="base.MXN"/>
</record>

View File

@ -4102,6 +4102,7 @@
<field name="property_account_payable" ref="a_pay"/> <!-- crediteuren -->
<field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen -->
<field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening -->
<field name="currency_id" ref="base.EUR"/>
</record>
<!-- BTW Template

View File

@ -242,6 +242,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="62_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.PAB"/>
</record>

View File

@ -2257,7 +2257,8 @@
<field name="property_account_receivable" ref="121100"/>
<field name="property_account_payable" ref="421100"/>
<field name="property_account_expense_categ" ref="6011_01"/>
<field name="property_account_income_categ" ref="70111_01"/>
<field name="property_account_income_categ" ref="70111_01"/>
<field name="currency_id" ref="base.PEN"/>
</record>

View File

@ -3202,6 +3202,7 @@
<field name="property_account_payable" ref="chart221000000"/>
<field name="property_account_expense_categ" ref="chart330020000"/>
<field name="property_account_income_categ" ref="chart773010000"/>
<field name="currency_id" ref="base.PLZ"/>
</record>
</data>

View File

@ -16,6 +16,7 @@
<field name="property_account_income_categ" ref="chart_711"/>
<field name="property_account_expense_categ" ref="chart_311"/>
<field name="property_reserve_and_surplus_account" ref="chart_811"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -4587,7 +4587,7 @@
<field name="property_account_payable" ref="ro_pcg_pay"/> <!-- 4011 -->
<field name="property_account_expense_categ" ref="ro_pcg_expense"/> <!-- 607 -->
<field name="property_account_income_categ" ref="ro_pcg_sale"/> <!-- 707 -->
<field name="currency_id" ref="base.ROL"/>
</record>
</data>
</openerp>

View File

@ -1850,6 +1850,7 @@
<field name="property_account_payable" ref="pcg_4011"/>
<field name="property_account_expense_categ" ref="pcg_6011" />
<field name="property_account_income_categ" ref="pcg_7011" />
<field name="currency_id" ref="base.XOF"/>
</record>
<record model="account.tax.code.template" id="tax_col_ht">

View File

@ -477,6 +477,7 @@
<field name="property_account_income_categ" ref="a_sales"/>
<field name="property_account_expense" ref="a_exp_office"/>
<field name="property_account_income" ref="a_sales"/>
<field name="currency_id" ref="base.THB"/>
</record>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="tr320"/>
<field name="property_account_expense_categ" ref="tr150"/>
<field name="property_account_income_categ" ref="tr600"/>
<field name="currency_id" ref="base.TRL"/>
</record>

View File

@ -6,6 +6,7 @@
<field name="name">Basic Chart of Account</field>
<field name="visible" eval="False" />
<field name="complete_tax_set" eval="False" />
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_cogs" model="account.chart.template">
@ -13,45 +14,53 @@
<field name="visible" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="complete_tax_set" eval="False" />
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_advertising" model="account.chart.template">
<field name="name">Advertising</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_agriculture" model="account.chart.template">
<field name="name">Agriculture</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_construction" model="account.chart.template">
<field name="name">Construction Trades (Plumber, Electrician, HVAC, etc.)</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_financial_service" model="account.chart.template">
<field name="name">Financial Services other than Accounting or Bookkeeping</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_service" model="account.chart.template">
<field name="name">General Service-Based Business</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_legal_service" model="account.chart.template">
<field name="name">Legal Services</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_product" model="account.chart.template">
<field name="name">General Product-Based Business</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
</data>
</openerp>

View File

@ -6,33 +6,43 @@
<field name="account_root_id" ref="coa_basic"/>
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="tax_code_root_id" ref="tax_code_chart_root"/>
<field name="property_account_receivable" ref="account_receivable"/>
<field name="property_account_payable" ref="account_payable"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_advertising" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_agriculture" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_construction" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_financial_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_legal_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_product" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
</data>
</openerp>

View File

@ -1,5 +1,6 @@
<openerp>
<data noupdate="1">
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>

View File

@ -1895,6 +1895,7 @@
<field name="property_account_payable" ref="uy_code_21100"/>
<field name="property_account_income_categ" ref="uy_code_4100"/>
<field name="property_account_expense_categ" ref="uy_code_5100"/>
<field name="currency_id" ref="base.UYP"/>
</record>

View File

@ -3315,6 +3315,7 @@
<field name="property_account_payable" ref="account_activa_account_2122001"/>
<field name="property_account_expense_categ" ref="account_activa_account_7151001"/>
<field name="property_account_income_categ" ref="account_activa_account_5111001"/>
<field name="currency_id" ref="base.VUB"/>
</record>
</data>
</openerp>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="tax0sale" model="account.tax.template">
<record id="tax0all" model="account.tax.template">
<field name="chart_template_id" ref="ve_chart_template_amd"/>
<field name="name">Exento</field>
<field name="amount">0.00000</field>
<field name="type">percent</field>
<field name="type_tax_use">sale</field>
<field name="type_tax_use">all</field>
<field name="collected_id" ref="account_activa_account_2172003"/>
<field name="paid_id" ref="account_activa_account_2172003"/>
<field name="base_code_id" ref="vat_code_base_due"/>
@ -54,19 +54,6 @@
<field name="ref_base_code_id" ref="vat_code_receivable_net"/>
<field name="ref_tax_code_id" ref="vat_code_payable"/>
</record>
<record id="tax0purchase" model="account.tax.template">
<field name="chart_template_id" ref="ve_chart_template_amd"/>
<field name="name">Exento</field>
<field name="amount">0.00000</field>
<field name="type">percent</field>
<field name="type_tax_use">purchase</field>
<field name="collected_id" ref="account_activa_account_2172003"/>
<field name="paid_id" ref="account_activa_account_2172003"/>
<field name="base_code_id" ref="vat_code_base_due"/>
<field name="tax_code_id" ref="vat_code_due_tva"/>
<field name="ref_base_code_id" ref="vat_code_receivable_net"/>
<field name="ref_tax_code_id" ref="vat_code_payable"/>
</record>
<record id="tax1purchase" model="account.tax.template">
<field name="chart_template_id" ref="ve_chart_template_amd"/>
<field name="name">IVA (12.0%) compras</field>

View File

@ -2015,7 +2015,7 @@
<field name="property_account_payable" ref="chart331" />
<field name="property_account_expense_categ" ref="chart1561" />
<field name="property_account_income_categ" ref="chart5111" />
<field name="currency_id" ref="base.VND"/>
</record>
</data>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2011-11-09 21:53+0000\n"
"Last-Translator: OpenERP Danmark / Henning Dinsen <Unknown>\n"
"PO-Revision-Date: 2013-09-12 17:27+0000\n"
"Last-Translator: John Mertens Pallesen <Unknown>\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-09-12 05:03+0000\n"
"X-Launchpad-Export-Date: 2013-09-13 05:39+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: mrp
@ -29,6 +29,14 @@ msgid ""
" * Notes for the technician and for the final customer.\n"
" This installs the module mrp_repair."
msgstr ""
"Tillad at administrere alle reperationer på produkter.\n"
" * Tilføj/fjern varer under reparation\n"
" * Påvirkning lager\n"
" * Fakturering (varer og/eller ydelser)\n"
" * Garanti behandling\n"
" * Tilbuds rapport reparation\n"
" * Notes for the technician and for the final customer.\n"
" This installs the module mrp_repair."
#. module: mrp
#: report:mrp.production.order:0
@ -38,7 +46,7 @@ msgstr ""
#. module: mrp
#: help:mrp.production,location_src_id:0
msgid "Location where the system will look for components."
msgstr ""
msgstr "Lokation hvor systemet vil lede efter komponenter."
#. module: mrp
#: field:mrp.production,workcenter_lines:0
@ -68,12 +76,12 @@ msgstr ""
#: code:addons/mrp/report/price.py:130
#, python-format
msgid "Hourly Cost"
msgstr ""
msgstr "Kostpris pr. time."
#. module: mrp
#: view:mrp.production:0
msgid "Scrap Products"
msgstr ""
msgstr "Kasser vare"
#. module: mrp
#: view:mrp.workcenter:0
@ -113,7 +121,7 @@ msgstr ""
#. module: mrp
#: view:product.product:0
msgid "False"
msgstr ""
msgstr "Falsk"
#. module: mrp
#: view:mrp.bom:0
@ -125,12 +133,12 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "Finished Products"
msgstr ""
msgstr "Færdigproduceret vare"
#. module: mrp
#: view:mrp.production:0
msgid "Manufacturing Orders which are currently in production."
msgstr ""
msgstr "Produktionsordre igang"
#. module: mrp
#: help:mrp.bom,message_summary:0
@ -145,7 +153,7 @@ msgstr ""
#: model:process.transition,name:mrp.process_transition_servicerfq0
#: model:process.transition,name:mrp.process_transition_stockrfq0
msgid "To Buy"
msgstr ""
msgstr "Indkøb"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_purchaseprocure0
@ -187,12 +195,12 @@ msgstr ""
#. module: mrp
#: model:process.node,note:mrp.process_node_purchaseprocure0
msgid "For purchased material"
msgstr ""
msgstr "Indkøbte matrialer"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_production_order_action
msgid "Order Planning"
msgstr ""
msgstr "Ordreplanlægning"
#. module: mrp
#: field:mrp.config.settings,module_mrp_operations:0
@ -203,7 +211,7 @@ msgstr ""
#: code:addons/mrp/mrp.py:633
#, python-format
msgid "Cannot cancel manufacturing order!"
msgstr ""
msgstr "Det er ikke muligt at annullere produktionsordre !"
#. module: mrp
#: field:mrp.workcenter,costs_cycle_account_id:0
@ -250,7 +258,7 @@ msgstr ""
#: view:mrp.production:0
#: field:mrp.production,move_created_ids2:0
msgid "Produced Products"
msgstr ""
msgstr "Produceret vare"
#. module: mrp
#: report:mrp.production.order:0
@ -265,7 +273,7 @@ msgstr ""
#. module: mrp
#: field:mrp.config.settings,module_mrp_byproduct:0
msgid "Produce several products from one manufacturing order"
msgstr ""
msgstr "Producer flere varer på samme produktionsordre"
#. module: mrp
#: help:mrp.config.settings,group_mrp_properties:0

View File

@ -151,24 +151,18 @@ class pos_details(report_sxw.rml_parse):
return self._ellipsis(name, maxlen, ' ...')
def _get_tax_amount(self, form):
res = {}
temp = {}
list_ids = []
temp2 = 0.0
taxes = {}
account_tax_obj = self.pool.get('account.tax')
user_ids = form['user_ids'] or self._get_all_users()
pos_order_obj = self.pool.get('pos.order')
pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids)])
temp.update({'name': ''})
for order in pos_order_obj.browse(self.cr, self.uid, pos_ids):
temp2 += order.amount_tax
for line in order.lines:
if len(line.product_id.taxes_id):
tax = line.product_id.taxes_id[0]
res[tax.name] = (line.price_unit * line.qty * (1-(line.discount or 0.0) / 100.0)) + (tax.id in list_ids and res[tax.name] or 0)
list_ids.append(tax.id)
temp.update({'name': tax.name})
temp.update({'amount': temp2})
return [temp] or False
line_taxes = account_tax_obj.compute_all(self.cr, self.uid, line.product_id.taxes_id, line.price_unit, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
for tax in line_taxes['taxes']:
taxes.setdefault(tax['id'], {'name': tax['name'], 'amount':0.0})
taxes[tax['id']]['amount'] += tax['amount']
return [value for value in taxes.values()] or False
def _get_user_names(self, user_ids):
user_obj = self.pool.get('res.users')

View File

@ -586,6 +586,7 @@
background:#fff;
border: 1px solid #fff;
border-radius: 3px;
overflow: hidden;
-webkit-box-shadow: 0px 2px 0px #dad8e4, 0px 1px 8px #636480;
-moz-box-shadow: 0px 2px 0px #dad8e4, 0px 1px 8px #636480;
box-shadow: 0px 2px 0px #dad8e4, 0px 1px 8px #636480;
@ -627,6 +628,8 @@
top:auto;
line-height: 14px;
width:100%;
overflow: hidden;
text-overflow: ellipsis;
background: -webkit-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1));
background: -moz-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1));
background: -ms-linear-gradient(-90deg,rgba(255,255,255,0),rgba(255,255,255,1), rgba(255,255,255,1));
@ -804,9 +807,11 @@
.point-of-sale .pos-sale-ticket table {
width: 100%;
border: 0;
table-layout: fixed;
}
.point-of-sale .pos-sale-ticket table td {
border: 0;
word-wrap: break-word;
}
@media print {
@ -905,14 +910,16 @@
.point-of-sale .scale-screen .product-name {
position: absolute;
left:0;
left:40px;
top:50px;
height:50px;
font-size:40px;
font-size:36px;
line-height:50px;
text-align:right;
right:275px;
color: #8d8d8d;
overflow: hidden;
text-overflow: ellipsis;
}
.point-of-sale .scale-screen .weight{
position: absolute;
@ -1076,6 +1083,7 @@
font-weight: bold;
width:80%;
overflow:hidden;
text-overflow: ellipsis;
}
.point-of-sale .order .orderline .price{
padding:0;

View File

@ -150,6 +150,9 @@ function openerp_pos_db(instance, module){
if(product.ean13){
str += '|' + product.ean13;
}
if(product.default_code){
str += '|' + product.default_code;
}
var packagings = this.packagings_by_product_id[product.id] || [];
for(var i = 0; i < packagings.length; i++){
str += '|' + packagings[i].ean;

View File

@ -182,7 +182,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch(
'product.product',
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13',
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code',
'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
[['sale_ok','=',true],['available_in_pos','=',true]],
{pricelist: self.get('pos_config').pricelist_id[0]} // context for price

View File

@ -750,9 +750,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.product_categories_widget.reset_category();
this.pos_widget.order_widget.set_numpad_state(this.pos_widget.numpad.state);
if(this.pos.iface_vkeyboard){
this.pos_widget.onscreen_keyboard.connect();
}
if(this.pos_widget.screen_selector.current_mode === 'client'){
this.add_action_button({
@ -769,6 +766,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this._super();
this.pos_widget.order_widget.set_numpad_state(null);
this.pos_widget.payment_screen.set_numpad_state(null);
if(this.pos.iface_vkeyboard && this.pos_widget.onscreen_keyboard){
this.pos_widget.onscreen_keyboard.hide();
}
},
});

View File

@ -27,9 +27,7 @@ function openerp_pos_keyboard(instance, module){ //module is instance.point_of_s
}
this.input_selector = options.input_selector || '.searchbox input';
//show the keyboard when the input zone is clicked.
$(this.input_selector).focus(function(){self.show();});
this.$target = null;
//Keyboard state
this.capslock = false;
@ -37,14 +35,15 @@ function openerp_pos_keyboard(instance, module){ //module is instance.point_of_s
this.numlock = false;
},
connect : function(){
connect : function($target){
var self = this;
$(this.input_selector).focus(function(){self.show();});
this.$target = $target;
$target.focus(function(){self.show();});
},
// Write a character to the input zone
writeCharacter: function(character){
var $input = $(this.input_selector);
var $input = this.$target
$input[0].value += character;
$input.keydown();
$input.keyup();
@ -56,7 +55,7 @@ function openerp_pos_keyboard(instance, module){ //module is instance.point_of_s
// Removes the last character from the input zone.
deleteCharacter: function(){
var $input = $(this.input_selector);
var $input = this.$target;
var input_value = $input[0].value;
$input[0].value = input_value.substr(0, input_value.length - 1);
$input.keydown();
@ -65,7 +64,7 @@ function openerp_pos_keyboard(instance, module){ //module is instance.point_of_s
// Clears the content of the input zone.
deleteAllCharacters: function(){
var $input = $(this.input_selector);
var $input = this.$target;
$input[0].value = "";
$input.keydown();
$input.keyup();

View File

@ -548,6 +548,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
self.renderElement();
self.search_and_categories(category);
});
if(this.pos.iface_vkeyboard && this.pos_widget.onscreen_keyboard){
this.pos_widget.onscreen_keyboard.connect(this.$('.searchbox input'));
}
this.search_and_categories();
},

View File

@ -593,6 +593,11 @@
Shop: <t t-esc="widget.shop_obj.name"/><br />
<br />
<table>
<colgroup>
<col width='50%' />
<col width='25%' />
<col width='25%' />
</colgroup>
<tr t-foreach="widget.currentOrderLines.toArray()" t-as="orderline">
<td>
<t t-esc="orderline.get_product().get('name')"/>

View File

@ -0,0 +1,25 @@
# 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-09-15 20:32+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-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: portal_anonymous
#. openerp-web
#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8
#, python-format
msgid "Login"
msgstr "Login"

View File

@ -0,0 +1,554 @@
# Russian 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:06+0000\n"
"PO-Revision-Date: 2013-09-16 07:59+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Russian <ru@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-09-17 04:37+0000\n"
"X-Generator: Launchpad (build 16765)\n"
#. module: portal_sale
#: model:ir.model,name:portal_sale.model_account_config_settings
msgid "account.config.settings"
msgstr ""
#. module: portal_sale
#: model:ir.actions.act_window,help:portal_sale.portal_action_invoices
msgid "We haven't sent you any invoice."
msgstr "У Вас нет никаких счетов."
#. module: portal_sale
#: model:email.template,report_name:portal_sale.email_template_edi_sale
msgid ""
"${(object.name or '').replace('/','_')}_${object.state == 'draft' and "
"'draft' or ''}"
msgstr ""
"${(object.name or '').replace('/','_')}_${object.state == 'draft' and "
"'проект' or ''}"
#. module: portal_sale
#: model:res.groups,name:portal_sale.group_payment_options
msgid "View Online Payment Options"
msgstr "Посмотреть варианты оплаты онлайн"
#. module: portal_sale
#: field:account.config.settings,group_payment_options:0
msgid "Show payment buttons to employees too"
msgstr "Показывать кнопки оплаты сотрудникам"
#. module: portal_sale
#: model:email.template,subject:portal_sale.email_template_edi_sale
msgid ""
"${object.company_id.name} ${object.state in ('draft', 'sent') and "
"'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })"
msgstr ""
"${object.company_id.name} ${object.state in ('draft', 'sent') and "
"'Предложение' or 'Заказ'} № ${object.name or 'б/н' }"
#. module: portal_sale
#: model:ir.actions.act_window,help:portal_sale.action_quotations_portal
msgid "We haven't sent you any quotation."
msgstr "У Вас нет никаких предложений цен"
#. module: portal_sale
#: model:ir.ui.menu,name:portal_sale.portal_sales_orders
msgid "Sales Orders"
msgstr "Заказы продаж"
#. module: portal_sale
#: model:res.groups,comment:portal_sale.group_payment_options
msgid ""
"Members of this group see the online payment options\n"
"on Sale Orders and Customer Invoices. These options are meant for customers "
"who are accessing\n"
"their documents through the portal."
msgstr ""
"Члены этой группы видят варианты оплаты счетов онлайн\n"
"по заказам продаж и счетам заказчиков. Эти варианты предназначены для "
"заказчиков, имеющих доступ\n"
"к своим документам через портал."
#. module: portal_sale
#: model:email.template,body_html:portal_sale.email_template_edi_sale
msgid ""
"\n"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, "
"255, 255); \">\n"
"\n"
" <p>Hello ${object.partner_id.name},</p>\n"
" \n"
" <p>Here is your ${object.state in ('draft', 'sent') and 'quotation' or "
"'order confirmation'} from ${object.company_id.name}: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Order number: <strong>${object.name}</strong><br />\n"
" &nbsp;&nbsp;Order total: <strong>${object.amount_total} "
"${object.pricelist_id.currency_id.name}</strong><br />\n"
" &nbsp;&nbsp;Order date: ${object.date_order}<br />\n"
" % if object.origin:\n"
" &nbsp;&nbsp;Order reference: ${object.origin}<br />\n"
" % endif\n"
" % if object.client_order_ref:\n"
" &nbsp;&nbsp;Your reference: ${object.client_order_ref}<br />\n"
" % endif\n"
" % if object.user_id:\n"
" &nbsp;&nbsp;Your contact: <a href=\"mailto:${object.user_id.email or "
"''}?subject=Order%20${object.name}\">${object.user_id.name}</a>\n"
" % endif\n"
" </p>\n"
"\n"
" <% set signup_url = object.get_signup_url() %>\n"
" % if signup_url:\n"
" <p>\n"
" You can access this document and pay online via our Customer Portal:\n"
" </p>\n"
" <a style=\"display:block; width: 150px; height:20px; margin-left: "
"120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-"
"serif; font-size: 13px; font-weight: bold; text-align: center; text-"
"decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; "
"background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat "
"no-repeat;\"\n"
" href=\"${signup_url}\">View ${object.state in ('draft', 'sent') "
"and 'Quotation' or 'Order'}</a>\n"
" % endif\n"
"\n"
" % if object.paypal_url:\n"
" <br/>\n"
" <p>It is also possible to directly pay with Paypal:</p>\n"
" <a style=\"margin-left: 120px;\" href=\"${object.paypal_url}\">\n"
" <img class=\"oe_edi_paypal_button\" "
"src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\"/>\n"
" </a>\n"
" % endif\n"
"\n"
" <br/>\n"
" <p>If you have any question, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: "
"#8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; "
"background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: "
"#DDD;\">\n"
" <strong style=\"text-"
"transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: "
"16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" % if object.company_id.street:\n"
" ${object.company_id.street}<br/>\n"
" % endif\n"
" % if object.company_id.street2:\n"
" ${object.company_id.street2}<br/>\n"
" % endif\n"
" % if object.company_id.city or object.company_id.zip:\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\n"
" % endif\n"
" % if object.company_id.country_id:\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\n"
" % endif\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: "
"0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: "
"0px; padding-left: 0px; \">\n"
" Phone:&nbsp; ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web :&nbsp;<a "
"href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" % endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
"\n"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, "
"255, 255); \">\n"
"\n"
" <p>Здравствуйте, ${object.partner_id.name}!</p>\n"
" \n"
" <p>Направляем Вам ${object.state in ('draft', 'sent') and 'предложение' "
"or 'подтверждение заказа'} от ${object.company_id.name}: </p>\n"
"\n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>СВОДКА</strong><br />\n"
" &nbsp;&nbsp;Заказ: <strong>${object.name}</strong><br />\n"
" &nbsp;&nbsp;Итог: <strong>${object.amount_total} "
"${object.pricelist_id.currency_id.name}</strong><br />\n"
" &nbsp;&nbsp;Дата: ${object.date_order}<br />\n"
" % if object.origin:\n"
" &nbsp;&nbsp;Основание заказа: ${object.origin}<br />\n"
" % endif\n"
" % if object.client_order_ref:\n"
" &nbsp;&nbsp;Ваша ссылка: ${object.client_order_ref}<br />\n"
" % endif\n"
" % if object.user_id:\n"
" &nbsp;&nbsp;Ваш контакт: <a href=\"mailto:${object.user_id.email or "
"''}?subject=Order%20${object.name}\">${object.user_id.name}</a>\n"
" % endif\n"
" </p>\n"
"\n"
" <% set signup_url = object.get_signup_url() %>\n"
" % if signup_url:\n"
" <p>\n"
" Вы можете ознакомиться с этим документом онлайн и узнать о вариантах "
"оплаты через наш Портал:\n"
" </p>\n"
" <a style=\"display:block; width: 150px; height:20px; margin-left: "
"120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-"
"serif; font-size: 13px; font-weight: bold; text-align: center; text-"
"decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; "
"background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat "
"no-repeat;\"\n"
" href=\"${signup_url}\">Посмотреть ${object.state in ('draft', "
"'sent') and 'Предложение' or 'Заказ'}</a>\n"
" % endif\n"
"\n"
" % if object.paypal_url:\n"
" <br/>\n"
" <p>Также возможно произвести оплату непосредственно через Paypal:</p>\n"
" <a style=\"margin-left: 120px;\" href=\"${object.paypal_url}\">\n"
" <img class=\"oe_edi_paypal_button\" "
"src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\"/>\n"
" </a>\n"
" % endif\n"
"\n"
" <br/>\n"
" <p>Если у Вас есть вопросы - пожалуйста, свяжитесь с нами.</p>\n"
" <p>Спасибо, что выбрали ${object.company_id.name or 'нас'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: "
"#8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; "
"background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: "
"#DDD;\">\n"
" <strong style=\"text-"
"transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: "
"16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" % if object.company_id.street:\n"
" ${object.company_id.street}<br/>\n"
" % endif\n"
" % if object.company_id.street2:\n"
" ${object.company_id.street2}<br/>\n"
" % endif\n"
" % if object.company_id.city or object.company_id.zip:\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\n"
" % endif\n"
" % if object.company_id.country_id:\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\n"
" % endif\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: "
"0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: "
"0px; padding-left: 0px; \">\n"
" Phone:&nbsp; ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Сайт :&nbsp;<a "
"href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" % endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
#. module: portal_sale
#: model:email.template,report_name:portal_sale.email_template_edi_invoice
msgid ""
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
"and 'draft' or ''}"
msgstr ""
"Счёт_${(object.number or '').replace('/','_')}_${object.state == 'draft' and "
"'проект' or ''}"
#. module: portal_sale
#: model:email.template,subject:portal_sale.email_template_edi_invoice
msgid "${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })"
msgstr "${object.company_id.name} Счёт № ${object.number or 'n/a' }"
#. module: portal_sale
#: model:ir.model,name:portal_sale.model_mail_mail
msgid "Outgoing Mails"
msgstr "Исходящая почта"
#. module: portal_sale
#: model:ir.actions.act_window,name:portal_sale.action_quotations_portal
#: model:ir.ui.menu,name:portal_sale.portal_quotations
msgid "Quotations"
msgstr "Предложения цен"
#. module: portal_sale
#: model:ir.model,name:portal_sale.model_sale_order
msgid "Sales Order"
msgstr "Заказ продаж"
#. module: portal_sale
#: field:account.invoice,portal_payment_options:0
#: field:sale.order,portal_payment_options:0
msgid "Portal Payment Options"
msgstr "Варианты оплаты через портал"
#. module: portal_sale
#: help:account.config.settings,group_payment_options:0
msgid ""
"Show online payment options on Sale Orders and Customer Invoices to "
"employees. If not checked, these options are only visible to portal users."
msgstr ""
"Показывать варианты оплаты по заказам продаж и счетам заказчиков "
"сотрудникам. Если не отмечено, то эти варианты видны только пользователям "
"портала."
#. module: portal_sale
#: model:ir.actions.act_window,name:portal_sale.portal_action_invoices
#: model:ir.ui.menu,name:portal_sale.portal_invoices
msgid "Invoices"
msgstr "Счета"
#. module: portal_sale
#: view:account.config.settings:0
msgid "Configure payment acquiring methods"
msgstr "Настроить методы получения платежей"
#. module: portal_sale
#: model:email.template,body_html:portal_sale.email_template_edi_invoice
msgid ""
"\n"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, "
"255, 255); \">\n"
"\n"
" <p>Hello ${object.partner_id.name},</p>\n"
"\n"
" <p>A new invoice is available for you: </p>\n"
" \n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENCES</strong><br />\n"
" &nbsp;&nbsp;Invoice number: <strong>${object.number}</strong><br />\n"
" &nbsp;&nbsp;Invoice total: <strong>${object.amount_total} "
"${object.currency_id.name}</strong><br />\n"
" &nbsp;&nbsp;Invoice date: ${object.date_invoice}<br />\n"
" % if object.origin:\n"
" &nbsp;&nbsp;Order reference: ${object.origin}<br />\n"
" % endif\n"
" % if object.user_id:\n"
" &nbsp;&nbsp;Your contact: <a href=\"mailto:${object.user_id.email or "
"''}?subject=Invoice%20${object.number}\">${object.user_id.name}</a>\n"
" % endif\n"
" </p> \n"
"\n"
" <% set signup_url = object.get_signup_url() %>\n"
" % if signup_url:\n"
" <p>\n"
" You can access the invoice document and pay online via our Customer "
"Portal:\n"
" </p>\n"
" <a style=\"display:block; width: 150px; height:20px; margin-left: "
"120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-"
"serif; font-size: 13px; font-weight: bold; text-align: center; text-"
"decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; "
"background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat "
"no-repeat;\"\n"
" href=\"${signup_url}\">View Invoice</a>\n"
" % endif\n"
" \n"
" % if object.paypal_url:\n"
" <br/>\n"
" <p>It is also possible to directly pay with Paypal:</p>\n"
" <a style=\"margin-left: 120px;\" href=\"${object.paypal_url}\">\n"
" <img class=\"oe_edi_paypal_button\" "
"src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\"/>\n"
" </a>\n"
" % endif\n"
" \n"
" <br/>\n"
" <p>If you have any question, do not hesitate to contact us.</p>\n"
" <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: "
"#8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; "
"background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: "
"#DDD;\">\n"
" <strong style=\"text-"
"transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: "
"16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" % if object.company_id.street:\n"
" ${object.company_id.street}<br/>\n"
" % endif\n"
" % if object.company_id.street2:\n"
" ${object.company_id.street2}<br/>\n"
" % endif\n"
" % if object.company_id.city or object.company_id.zip:\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\n"
" % endif\n"
" % if object.company_id.country_id:\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\n"
" % endif\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: "
"0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: "
"0px; padding-left: 0px; \">\n"
" Phone:&nbsp; ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web :&nbsp;<a "
"href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" % endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
msgstr ""
"\n"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, "
"255, 255); \">\n"
"\n"
" <p>Здравствуйте, ${object.partner_id.name},</p>\n"
"\n"
" <p>Вам выставлен счёт: </p>\n"
" \n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>СВОДКА</strong><br />\n"
" &nbsp;&nbsp;Счёт: <strong>${object.number}</strong><br />\n"
" &nbsp;&nbsp;Итог: <strong>${object.amount_total} "
"${object.currency_id.name}</strong><br />\n"
" &nbsp;&nbsp;Дата: ${object.date_invoice}<br />\n"
" % if object.origin:\n"
" &nbsp;&nbsp;Основание: ${object.origin}<br />\n"
" % endif\n"
" % if object.user_id:\n"
" &nbsp;&nbsp;Ваш контакт: <a href=\"mailto:${object.user_id.email or "
"''}?subject=Счёт%20${object.number}\">${object.user_id.name}</a>\n"
" % endif\n"
" </p> \n"
"\n"
" <% set signup_url = object.get_signup_url() %>\n"
" % if signup_url:\n"
" <p>\n"
" Вы можете ознакомиться с документом онлайн и узнать о вариантах оплаты "
"через наш Портал:\n"
" </p>\n"
" <a style=\"display:block; width: 150px; height:20px; margin-left: "
"120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-"
"serif; font-size: 13px; font-weight: bold; text-align: center; text-"
"decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; "
"background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat "
"no-repeat;\"\n"
" href=\"${signup_url}\">Посмотреть счёт</a>\n"
" % endif\n"
" \n"
" % if object.paypal_url:\n"
" <br/>\n"
" <p>Также возможно произвести оплату через Paypal:</p>\n"
" <a style=\"margin-left: 120px;\" href=\"${object.paypal_url}\">\n"
" <img class=\"oe_edi_paypal_button\" "
"src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\"/>\n"
" </a>\n"
" % endif\n"
" \n"
" <br/>\n"
" <p>Если у Вас есть вопросы - пожалуйста, свяжитесь с нами.</p>\n"
" <p>Спасибо, что выбрали ${object.company_id.name or 'нас'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: "
"#8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; "
"background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: "
"#DDD;\">\n"
" <strong style=\"text-"
"transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: "
"16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" % if object.company_id.street:\n"
" ${object.company_id.street}<br/>\n"
" % endif\n"
" % if object.company_id.street2:\n"
" ${object.company_id.street2}<br/>\n"
" % endif\n"
" % if object.company_id.city or object.company_id.zip:\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\n"
" % endif\n"
" % if object.company_id.country_id:\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\n"
" % endif\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: "
"0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: "
"0px; padding-left: 0px; \">\n"
" Phone:&nbsp; ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Сайт:&nbsp;<a "
"href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" % endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
#. module: portal_sale
#: model:ir.actions.act_window,help:portal_sale.action_orders_portal
msgid "We haven't sent you any sales order."
msgstr "У Вас нет никаких заказов."
#. module: portal_sale
#: model:ir.model,name:portal_sale.model_account_invoice
msgid "Invoice"
msgstr "Счёт"
#. module: portal_sale
#: model:ir.actions.act_window,name:portal_sale.action_orders_portal
msgid "Sale Orders"
msgstr "Заказы продаж"

View File

@ -0,0 +1,473 @@
# Korean 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:06+0000\n"
"PO-Revision-Date: 2013-09-15 08:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Korean <ko@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-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Request a Quotation"
msgstr "견적 요청"
#. module: purchase_requisition
#: selection:purchase.requisition,exclusive:0
msgid "Multiple Requisitions"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition.line,product_uom_id:0
msgid "Product Unit of Measure"
msgstr ""
#. module: purchase_requisition
#: model:ir.actions.act_window,help:purchase_requisition.action_purchase_requisition
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to start a new purchase requisition process. \n"
" </p><p>\n"
" A purchase requisition is the step before a request for "
"quotation.\n"
" In a purchase requisition (or purchase tender), you can record "
"the\n"
" products you need to buy and trigger the creation of RfQs to\n"
" suppliers. After the negotiation, once you have reviewed all "
"the\n"
" supplier's offers, you can validate some and cancel others.\n"
" </p>\n"
" "
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
#: field:purchase.requisition,user_id:0
msgid "Responsible"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
#: field:purchase.requisition,state:0
msgid "Status"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Send to Suppliers"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Group By..."
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
#: selection:purchase.requisition,state:0
msgid "Purchase Done"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,message_follower_ids:0
msgid "Followers"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Purchase Requisition in negociation"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
#: field:purchase.requisition.partner,partner_id:0
msgid "Supplier"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
#: selection:purchase.requisition,state:0
msgid "New"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Product Detail"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Qty"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Type"
msgstr ""
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition_partner
#: model:ir.actions.report.xml,name:purchase_requisition.report_purchase_requisition
#: model:ir.model,name:purchase_requisition.model_purchase_requisition
#: model:ir.module.category,name:purchase_requisition.module_category_purchase_requisition
#: field:product.product,purchase_requisition:0
#: field:purchase.order,requisition_id:0
#: view:purchase.requisition:0
#: field:purchase.requisition.line,requisition_id:0
#: view:purchase.requisition.partner:0
msgid "Purchase Requisition"
msgstr ""
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_purchase_requisition_line
msgid "Purchase Requisition Line"
msgstr ""
#. module: purchase_requisition
#: view:purchase.order:0
msgid "Purchase Orders with requisition"
msgstr ""
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_product_product
#: field:purchase.requisition.line,product_id:0
msgid "Product"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Quotations"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Terms and Conditions"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
#: field:purchase.requisition,description:0
msgid "Description"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,message_unread:0
msgid "Unread Messages"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,company_id:0
#: field:purchase.requisition.line,company_id:0
msgid "Company"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition.partner:0
msgid "Create Quotation"
msgstr ""
#. module: purchase_requisition
#: help:purchase.requisition,message_ids:0
msgid "Messages and communication history"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Approved by Supplier"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition.partner:0
msgid "or"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Reset to Draft"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Current Purchase Requisition"
msgstr ""
#. module: purchase_requisition
#: model:res.groups,name:purchase_requisition.group_purchase_requisition_user
msgid "User"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Order Reference"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,message_is_follower:0
msgid "Is a Follower"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition.line,product_qty:0
msgid "Quantity"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Unassigned Requisition"
msgstr ""
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition
#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition_pro_mgt
msgid "Purchase Requisitions"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Quotation Detail"
msgstr ""
#. module: purchase_requisition
#: code:addons/purchase_requisition/purchase_requisition.py:134
#, python-format
msgid ""
"You have already one %s purchase order for this partner, you must cancel "
"this purchase order to create a new quotation."
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "End Date"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
#: field:purchase.requisition,name:0
msgid "Requisition Reference"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,line_ids:0
msgid "Products to Purchase"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
#: selection:purchase.requisition,state:0
msgid "Sent to Suppliers"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Search Purchase Requisition"
msgstr ""
#. module: purchase_requisition
#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:41
#, python-format
msgid "No Product in Tender."
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Date Ordered"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,message_ids:0
msgid "Messages"
msgstr ""
#. module: purchase_requisition
#: help:purchase.requisition,exclusive:0
msgid ""
"Purchase Requisition (exclusive): On the confirmation of a purchase order, "
"it cancels the remaining purchase order.\n"
"Purchase Requisition(Multiple): It allows to have multiple purchase "
"orders.On confirmation of a purchase order it does not cancel the remaining "
"orders"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Cancel Purchase Order"
msgstr ""
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_purchase_order
#: view:purchase.requisition:0
msgid "Purchase Order"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,origin:0
msgid "Source Document"
msgstr ""
#. module: purchase_requisition
#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:41
#, python-format
msgid "Error!"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,exclusive:0
msgid "Requisition Type"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "New Purchase Requisition"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Products"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Order Date"
msgstr ""
#. module: purchase_requisition
#: selection:purchase.requisition,state:0
msgid "Cancelled"
msgstr ""
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_purchase_requisition_partner
msgid "Purchase Requisition Partner"
msgstr ""
#. module: purchase_requisition
#: help:purchase.requisition,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Purchase for Requisitions"
msgstr ""
#. module: purchase_requisition
#: model:ir.actions.act_window,name:purchase_requisition.act_res_partner_2_purchase_order
msgid "Purchase orders"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,date_end:0
msgid "Requisition Deadline"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,message_summary:0
msgid "Summary"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Reference"
msgstr ""
#. module: purchase_requisition
#: model:ir.model,name:purchase_requisition.model_procurement_order
msgid "Procurement"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
#: view:purchase.requisition:0
msgid "Source"
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,warehouse_id:0
msgid "Warehouse"
msgstr ""
#. module: purchase_requisition
#: field:procurement.order,requisition_id:0
msgid "Latest Requisition"
msgstr ""
#. module: purchase_requisition
#: model:res.groups,name:purchase_requisition.group_purchase_requisition_manager
msgid "Manager"
msgstr ""
#. module: purchase_requisition
#: selection:purchase.requisition,exclusive:0
msgid "Purchase Requisition (exclusive)"
msgstr ""
#. module: purchase_requisition
#: help:purchase.requisition,message_summary:0
msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
msgid "Product UoM"
msgstr ""
#. module: purchase_requisition
#: code:addons/purchase_requisition/purchase_requisition.py:134
#, python-format
msgid "Warning!"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Confirm Purchase Order"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition.partner:0
msgid "Cancel"
msgstr ""
#. module: purchase_requisition
#: report:purchase.requisition:0
#: field:purchase.requisition,date_start:0
msgid "Requisition Date"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Start Date"
msgstr ""
#. module: purchase_requisition
#: view:purchase.requisition:0
msgid "Unassigned"
msgstr ""
#. module: purchase_requisition
#: view:purchase.order:0
msgid "Requisition"
msgstr ""
#. module: purchase_requisition
#: help:product.product,purchase_requisition:0
msgid ""
"Check this box to generates purchase requisition instead of generating "
"requests for quotation from procurement."
msgstr ""
#. module: purchase_requisition
#: field:purchase.requisition,purchase_ids:0
msgid "Purchase Orders"
msgstr ""

View File

@ -37,7 +37,7 @@ modules.
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/crm_statistics_dashboard.jpeg', 'images/opportunity_to_quote.jpeg'],
'depends': ['sale', 'crm'],
'depends': ['sale', 'crm', 'web_kanban_gauge'],
'data': [
'wizard/crm_make_sale_view.xml',
'sale_crm_view.xml',
@ -48,7 +48,6 @@ modules.
'report/sale_crm_account_invoice_report_view.xml',
],
'js': [
'static/lib/justgage.js',
'static/src/js/sale_crm.js',
],
'demo': ['sale_crm_demo.xml'],

View File

@ -268,8 +268,8 @@
</xpath>
<xpath expr="//div[@class='oe_items_list']" position="after">
<div class="oe_center" t-if="record.invoiced_target.raw_value">
<field name="monthly_invoiced" widget="gage" style="width:160px; height: 120px;" options="{'max_field': 'invoiced_target'}">Invoiced</field>
<field name="invoiced_forecast" widget="gage" style="width:160px; height: 120px;" options="{'max_field': 'invoiced_target', 'action_change': 'action_forecast'}">Forecast</field>
<field name="monthly_invoiced" widget="gauge" style="width:160px; height: 120px;" options="{'max_field': 'invoiced_target'}">Invoiced</field>
<field name="invoiced_forecast" widget="gauge" style="width:160px; height: 120px;" options="{'max_field': 'invoiced_target', 'action_change': 'action_forecast'}">Forecast</field>
</div>
<div class="oe_center" style="color:#bbbbbb;" t-if="!record.invoiced_target.raw_value">
<br/>Define an invoicing target in the sales team settings to see the period's achievement and forecast at a glance.

View File

@ -1,883 +0,0 @@
/**
* JustGage - this is work-in-progress, unreleased, unofficial code, so it might not work top-notch :)
* Check http://www.justgage.com for official releases
* Licensed under MIT.
* @author Bojan Djuricic (@Toorshia)
*
* LATEST UPDATES
* -----------------------------
* April 01, 2013.
* -----------------------------
* fix - https://github.com/toorshia/justgage/issues/46
* -----------------------------
* March 26, 2013.
* -----------------------------
* customSectors - define specific color for value range (0-10 : red, 10-30 : blue etc.)
* -----------------------------
* March 23, 2013.
* -----------------------------
* counter - option to animate value in counting fashion
* fix - https://github.com/toorshia/justgage/issues/45
* -----------------------------
* March 13, 2013.
* -----------------------------
* refresh method - added optional 'max' parameter to use when you need to update max value
* -----------------------------
* February 26, 2013.
* -----------------------------
* decimals - option to define/limit number of decimals when not using humanFriendly or customRenderer to display value
* fixed a missing parameters bug when calling generateShadow() for IE < 9
* -----------------------------
* December 31, 2012.
* -----------------------------
* fixed text y-position for hidden divs - workaround for Raphael <tspan> 'dy' bug - https://github.com/DmitryBaranovskiy/raphael/issues/491
* 'show' parameters, like showMinMax are now 'hide' because I am lame developer - please update these in your setups
* Min and Max labels are now auto-off when in donut mode
* Start angle in donut mode is now 90
* donutStartAngle - option to define start angle for donut
* -----------------------------
* November 25, 2012.
* -----------------------------
* Option to define custom rendering function for displayed value
* -----------------------------
* November 19, 2012.
* -----------------------------
* Config.value is now updated after gauge refresh
* -----------------------------
* November 13, 2012.
* -----------------------------
* Donut display mode added
* Option to hide value label
* Option to enable responsive gauge size
* Removed default title attribute
* Option to accept min and max defined as string values
* Option to configure value symbol
* Fixed bad aspect ratio calculations
* Option to configure minimum font size for all texts
* Option to show shorthand big numbers (human friendly)
*/
JustGage = function(config) {
if (!config.id) {alert("Missing id parameter for gauge!"); return false;}
if (!config.node) {
if (!document.getElementById(config.id)) {alert("No element with id: \""+config.id+"\" found!"); return false;}
config.node = document.getElementById(config.id);
}
var obj = this;
// configurable parameters
obj.config =
{
// id : string
// this is container element id
id : config.id,
// node : string
// the node to use instead of DOM
node : config.node,
// title : string
// gauge title
title : (config.title) ? config.title : "",
// titleFontColor : string
// color of gauge title
titleFontColor : (config.titleFontColor) ? config.titleFontColor : "#999999",
// value : int
// value gauge is showing
value : (config.value) ? config.value : 0,
// valueFontColor : string
// color of label showing current value
valueFontColor : (config.valueFontColor) ? config.valueFontColor : "#010101",
// symbol : string
// special symbol to show next to value
symbol : (config.symbol) ? config.symbol : "",
// min : int
// min value
min : (config.min) ? parseFloat(config.min) : 0,
// max : int
// max value
max : (config.max) ? parseFloat(config.max) : 100,
// humanFriendlyDecimal : int
// number of decimal places for our human friendly number to contain
humanFriendlyDecimal : (config.humanFriendlyDecimal) ? config.humanFriendlyDecimal : 0,
// textRenderer: func
// function applied before rendering text
textRenderer : (config.textRenderer) ? config.textRenderer : null,
// gaugeWidthScale : float
// width of the gauge element
gaugeWidthScale : (config.gaugeWidthScale) ? config.gaugeWidthScale : 1.0,
// gaugeColor : string
// background color of gauge element
gaugeColor : (config.gaugeColor) ? config.gaugeColor : "#edebeb",
// label : string
// text to show below value
label : (config.label) ? config.label : "",
// labelFontColor : string
// color of label showing label under value
labelFontColor : (config.labelFontColor) ? config.labelFontColor : "#b3b3b3",
// shadowOpacity : int
// 0 ~ 1
shadowOpacity : (config.shadowOpacity) ? config.shadowOpacity : 0.2,
// shadowSize: int
// inner shadow size
shadowSize : (config.shadowSize) ? config.shadowSize : 5,
// shadowVerticalOffset : int
// how much shadow is offset from top
shadowVerticalOffset : (config.shadowVerticalOffset) ? config.shadowVerticalOffset : 3,
// levelColors : string[]
// colors of indicator, from lower to upper, in RGB format
levelColors : (config.levelColors) ? config.levelColors : [
"#a9d70b",
"#f9c802",
"#ff0000"
],
// startAnimationTime : int
// length of initial animation
startAnimationTime : (config.startAnimationTime) ? config.startAnimationTime : 700,
// startAnimationType : string
// type of initial animation (linear, >, <, <>, bounce)
startAnimationType : (config.startAnimationType) ? config.startAnimationType : ">",
// refreshAnimationTime : int
// length of refresh animation
refreshAnimationTime : (config.refreshAnimationTime) ? config.refreshAnimationTime : 700,
// refreshAnimationType : string
// type of refresh animation (linear, >, <, <>, bounce)
refreshAnimationType : (config.refreshAnimationType) ? config.refreshAnimationType : ">",
// donutStartAngle : int
// angle to start from when in donut mode
donutStartAngle : (config.donutStartAngle) ? config.donutStartAngle : 90,
// valueMinFontSize : int
// absolute minimum font size for the value
valueMinFontSize : config.valueMinFontSize || 16,
// titleMinFontSize
// absolute minimum font size for the title
titleMinFontSize : config.titleMinFontSize || 10,
// labelMinFontSize
// absolute minimum font size for the label
labelMinFontSize : config.labelMinFontSize || 10,
// minLabelMinFontSize
// absolute minimum font size for the minimum label
minLabelMinFontSize : config.minLabelMinFontSize || 10,
// maxLabelMinFontSize
// absolute minimum font size for the maximum label
maxLabelMinFontSize : config.maxLabelMinFontSize || 10,
// hideValue : bool
// hide value text
hideValue : (config.hideValue) ? config.hideValue : false,
// hideMinMax : bool
// hide min and max values
hideMinMax : (config.hideMinMax) ? config.hideMinMax : false,
// hideInnerShadow : bool
// hide inner shadow
hideInnerShadow : (config.hideInnerShadow) ? config.hideInnerShadow : false,
// humanFriendly : bool
// convert large numbers for min, max, value to human friendly (e.g. 1234567 -> 1.23M)
humanFriendly : (config.humanFriendly) ? config.humanFriendly : false,
// noGradient : bool
// whether to use gradual color change for value, or sector-based
noGradient : (config.noGradient) ? config.noGradient : false,
// donut : bool
// show full donut gauge
donut : (config.donut) ? config.donut : false,
// relativeGaugeSize : bool
// whether gauge size should follow changes in container element size
relativeGaugeSize : (config.relativeGaugeSize) ? config.relativeGaugeSize : false,
// counter : bool
// animate level number change
counter : (config.counter) ? config.counter : false,
// decimals : int
// number of digits after floating point
decimals : (config.decimals) ? config.decimals : 0,
// customSectors : [] of objects
// number of digits after floating point
customSectors : (config.customSectors) ? config.customSectors : []
};
// variables
var
canvasW,
canvasH,
widgetW,
widgetH,
aspect,
dx,
dy,
titleFontSize,
titleX,
titleY,
valueFontSize,
valueX,
valueY,
labelFontSize,
labelX,
labelY,
minFontSize,
minX,
minY,
maxFontSize,
maxX,
maxY;
// overflow values
if (this.config.value > this.config.max) this.config.value = this.config.max;
if (this.config.value < this.config.min) this.config.value = this.config.min;
this.originalValue = config.value;
// canvas
this.canvas = Raphael(this.config.node, "100%", "100%");
if (this.config.relativeGaugeSize === true) {
this.canvas.setViewBox(0, 0, 200, 150, true);
}
// canvas dimensions
if (this.config.relativeGaugeSize === true) {
canvasW = 200;
canvasH = 150;
} else {
canvasW = getStyle(this.config.node, "width").slice(0, -2) * 1;
canvasH = getStyle(this.config.node, "height").slice(0, -2) * 1;
}
// widget dimensions
if (this.config.donut === true) {
// DONUT *******************************
// width more than height
if(canvasW > canvasH) {
widgetH = canvasH;
widgetW = widgetH;
// width less than height
} else if (canvasW < canvasH) {
widgetW = canvasW;
widgetH = widgetW;
// if height don't fit, rescale both
if(widgetH > canvasH) {
aspect = widgetH / canvasH;
widgetH = widgetH / aspect;
widgetW = widgetH / aspect;
}
// equal
} else {
widgetW = canvasW;
widgetH = widgetW;
}
// delta
dx = (canvasW - widgetW)/2;
dy = (canvasH - widgetH)/2;
// title
titleFontSize = ((widgetH / 8) > 10) ? (widgetH / 10) : 10;
titleX = dx + widgetW / 2;
titleY = dy + widgetH / 11;
// value
valueFontSize = ((widgetH / 6.4) > 16) ? (widgetH / 5.4) : 18;
valueX = dx + widgetW / 2;
if(this.config.label !== '') {
valueY = dy + widgetH / 1.85;
} else {
valueY = dy + widgetH / 1.7;
}
// label
labelFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10;
labelX = dx + widgetW / 2;
labelY = valueY + labelFontSize;
// min
minFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10;
minX = dx + (widgetW / 10) + (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ;
minY = labelY;
// max
maxFontSize = ((widgetH / 16) > 10) ? (widgetH / 16) : 10;
maxX = dx + widgetW - (widgetW / 10) - (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ;
maxY = labelY;
} else {
// HALF *******************************
// width more than height
if(canvasW > canvasH) {
widgetH = canvasH;
widgetW = widgetH * 1.25;
//if width doesn't fit, rescale both
if(widgetW > canvasW) {
aspect = widgetW / canvasW;
widgetW = widgetW / aspect;
widgetH = widgetH / aspect;
}
// width less than height
} else if (canvasW < canvasH) {
widgetW = canvasW;
widgetH = widgetW / 1.25;
// if height don't fit, rescale both
if(widgetH > canvasH) {
aspect = widgetH / canvasH;
widgetH = widgetH / aspect;
widgetW = widgetH / aspect;
}
// equal
} else {
widgetW = canvasW;
widgetH = widgetW * 0.75;
}
// delta
dx = (canvasW - widgetW)/2;
dy = (canvasH - widgetH)/2;
// title
titleFontSize = ((widgetH / 8) > this.config.titleMinFontSize) ? (widgetH / 10) : this.config.titleMinFontSize;
titleX = dx + widgetW / 2;
titleY = dy + widgetH / 6.4;
// value
valueFontSize = ((widgetH / 6.5) > this.config.valueMinFontSize) ? (widgetH / 6.5) : this.config.valueMinFontSize;
valueX = dx + widgetW / 2;
valueY = dy + widgetH / 1.275;
// label
labelFontSize = ((widgetH / 16) > this.config.labelMinFontSize) ? (widgetH / 16) : this.config.labelMinFontSize;
labelX = dx + widgetW / 2;
labelY = valueY + valueFontSize / 2 + 5;
// min
minFontSize = ((widgetH / 16) > this.config.minLabelMinFontSize) ? (widgetH / 16) : this.config.minLabelMinFontSize;
minX = dx + (widgetW / 10) + (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ;
minY = labelY;
// max
maxFontSize = ((widgetH / 16) > this.config.maxLabelMinFontSize) ? (widgetH / 16) : this.config.maxLabelMinFontSize;
maxX = dx + widgetW - (widgetW / 10) - (widgetW / 6.666666666666667 * this.config.gaugeWidthScale) / 2 ;
maxY = labelY;
}
// parameters
this.params = {
canvasW : canvasW,
canvasH : canvasH,
widgetW : widgetW,
widgetH : widgetH,
dx : dx,
dy : dy,
titleFontSize : titleFontSize,
titleX : titleX,
titleY : titleY,
valueFontSize : valueFontSize,
valueX : valueX,
valueY : valueY,
labelFontSize : labelFontSize,
labelX : labelX,
labelY : labelY,
minFontSize : minFontSize,
minX : minX,
minY : minY,
maxFontSize : maxFontSize,
maxX : maxX,
maxY : maxY
};
// var clear
canvasW, canvasH, widgetW, widgetH, aspect, dx, dy, titleFontSize, titleX, titleY, valueFontSize, valueX, valueY, labelFontSize, labelX, labelY, minFontSize, minX, minY, maxFontSize, maxX, maxY = null
// pki - custom attribute for generating gauge paths
this.canvas.customAttributes.pki = function (value, min, max, w, h, dx, dy, gws, donut) {
var alpha, Ro, Ri, Cx, Cy, Xo, Yo, Xi, Yi, path;
if (donut) {
alpha = (1 - 2 * (value - min) / (max - min)) * Math.PI;
Ro = w / 2 - w / 7;
Ri = Ro - w / 6.666666666666667 * gws;
Cx = w / 2 + dx;
Cy = h / 1.95 + dy;
Xo = w / 2 + dx + Ro * Math.cos(alpha);
Yo = h - (h - Cy) + 0 - Ro * Math.sin(alpha);
Xi = w / 2 + dx + Ri * Math.cos(alpha);
Yi = h - (h - Cy) + 0 - Ri * Math.sin(alpha);
path += "M" + (Cx - Ri) + "," + Cy + " ";
path += "L" + (Cx - Ro) + "," + Cy + " ";
if (value > ((max - min) / 2)) {
path += "A" + Ro + "," + Ro + " 0 0 1 " + (Cx + Ro) + "," + Cy + " ";
}
path += "A" + Ro + "," + Ro + " 0 0 1 " + Xo + "," + Yo + " ";
path += "L" + Xi + "," + Yi + " ";
if (value > ((max - min) / 2)) {
path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx + Ri) + "," + Cy + " ";
}
path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx - Ri) + "," + Cy + " ";
path += "Z ";
return { path: path };
} else {
alpha = (1 - (value - min) / (max - min)) * Math.PI;
Ro = w / 2 - w / 10;
Ri = Ro - w / 6.666666666666667 * gws;
Cx = w / 2 + dx;
Cy = h / 1.25 + dy;
Xo = w / 2 + dx + Ro * Math.cos(alpha);
Yo = h - (h - Cy) + 0 - Ro * Math.sin(alpha);
Xi = w / 2 + dx + Ri * Math.cos(alpha);
Yi = h - (h - Cy) + 0 - Ri * Math.sin(alpha);
path += "M" + (Cx - Ri) + "," + Cy + " ";
path += "L" + (Cx - Ro) + "," + Cy + " ";
path += "A" + Ro + "," + Ro + " 0 0 1 " + Xo + "," + Yo + " ";
path += "L" + Xi + "," + Yi + " ";
path += "A" + Ri + "," + Ri + " 0 0 0 " + (Cx - Ri) + "," + Cy + " ";
path += "Z ";
return { path: path };
}
// var clear
alpha, Ro, Ri, Cx, Cy, Xo, Yo, Xi, Yi, path = null;
};
// gauge
this.gauge = this.canvas.path().attr({
"stroke": "none",
"fill": this.config.gaugeColor,
pki: [this.config.max, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut]
});
this.gauge.id = this.config.id+"-gauge";
// level
this.level = this.canvas.path().attr({
"stroke": "none",
"fill": getColor(this.config.value, (this.config.value - this.config.min) / (this.config.max - this.config.min), this.config.levelColors, this.config.noGradient, this.config.customSectors),
pki: [this.config.min, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut]
});
if(this.config.donut) {
this.level.transform("r" + this.config.donutStartAngle + ", " + (this.params.widgetW/2 + this.params.dx) + ", " + (this.params.widgetH/1.95 + this.params.dy));
}
this.level.id = this.config.id+"-level";
// title
this.txtTitle = this.canvas.text(this.params.titleX, this.params.titleY, this.config.title);
this.txtTitle.attr({
"font-size":this.params.titleFontSize,
"font-weight":"bold",
"font-family":"Arial",
"fill":this.config.titleFontColor,
"fill-opacity":"1"
});
setDy(this.txtTitle, this.params.titleFontSize, this.params.titleY);
this.txtTitle.id = this.config.id+"-txttitle";
// value
this.txtValue = this.canvas.text(this.params.valueX, this.params.valueY, 0);
this.txtValue.attr({
"font-size":this.params.valueFontSize,
"font-weight":"bold",
"font-family":"Arial",
"fill":this.config.valueFontColor,
"fill-opacity":"0"
});
setDy(this.txtValue, this.params.valueFontSize, this.params.valueY);
this.txtValue.id = this.config.id+"-txtvalue";
// label
this.txtLabel = this.canvas.text(this.params.labelX, this.params.labelY, this.config.label);
this.txtLabel.attr({
"font-size":this.params.labelFontSize,
"font-weight":"normal",
"font-family":"Arial",
"fill":this.config.labelFontColor,
"fill-opacity":"0"
});
setDy(this.txtLabel, this.params.labelFontSize, this.params.labelY);
this.txtLabel.id = this.config.id+"-txtlabel";
// min
this.txtMinimum = this.config.min;
if( this.config.humanFriendly ) this.txtMinimum = humanFriendlyNumber( this.config.min, this.config.humanFriendlyDecimal );
this.txtMin = this.canvas.text(this.params.minX, this.params.minY, this.txtMinimum);
this.txtMin.attr({
"font-size":this.params.minFontSize,
"font-weight":"normal",
"font-family":"Arial",
"fill":this.config.labelFontColor,
"fill-opacity": (this.config.hideMinMax || this.config.donut)? "0" : "1"
});
setDy(this.txtMin, this.params.minFontSize, this.params.minY);
this.txtMin.id = this.config.id+"-txtmin";
// max
this.txtMaximum = this.config.max;
if( this.config.humanFriendly ) this.txtMaximum = humanFriendlyNumber( this.config.max, this.config.humanFriendlyDecimal );
this.txtMax = this.canvas.text(this.params.maxX, this.params.maxY, this.txtMaximum);
this.txtMax.attr({
"font-size":this.params.maxFontSize,
"font-weight":"normal",
"font-family":"Arial",
"fill":this.config.labelFontColor,
"fill-opacity": (this.config.hideMinMax || this.config.donut)? "0" : "1"
});
setDy(this.txtMax, this.params.maxFontSize, this.params.maxY);
this.txtMax.id = this.config.id+"-txtmax";
var defs = this.canvas.canvas.childNodes[1];
var svg = "http://www.w3.org/2000/svg";
if (ie < 9) {
onCreateElementNsReady(function() {
this.generateShadow(svg, defs);
});
} else {
this.generateShadow(svg, defs);
}
// var clear
defs, svg = null;
// execute on each animation frame
function onAnimate() {
if (obj.config.counter) {
var currentValue = obj.level.attr("pki");
if(obj.config.textRenderer) {
// this.originalValue = this.config.textRenderer(this.originalValue);
obj.txtValue.attr("text", obj.config.textRenderer(Math.floor(currentValue[0])));
} else if(obj.config.humanFriendly) {
// this.originalValue = humanFriendlyNumber( this.originalValue, this.config.humanFriendlyDecimal ) + this.config.symbol;
obj.txtValue.attr("text", humanFriendlyNumber( Math.floor(currentValue[0]), obj.config.humanFriendlyDecimal ) + obj.config.symbol);
} else {
// this.originalValue += this.config.symbol;
obj.txtValue.attr("text", (currentValue[0] * 1).toFixed(obj.config.decimals) + obj.config.symbol);
}
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
currentValue = null;
}
}
if(!obj.config.counter) {
if(obj.config.textRenderer) {
obj.originalValue = obj.config.textRenderer(obj.originalValue);
} else if(obj.config.humanFriendly) {
obj.originalValue = humanFriendlyNumber( obj.originalValue, obj.config.humanFriendlyDecimal ) + obj.config.symbol;
} else {
obj.originalValue = (obj.originalValue * 1).toFixed(obj.config.decimals) + obj.config.symbol;
}
obj.txtValue.attr("text", obj.originalValue);
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
}
//event fired on each animation frame
eve.on("raphael.anim.frame.*", onAnimate);
// animate gauge level
this.level.animate({pki: [this.config.value, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut]}, this.config.startAnimationTime, this.config.startAnimationType);
// animate value
this.txtValue.animate({"fill-opacity":"1"}, this.config.startAnimationTime, this.config.startAnimationType);
// animate label
this.txtLabel.animate({"fill-opacity":"1"}, this.config.startAnimationTime, this.config.startAnimationType);
};
/** Refresh gauge level */
JustGage.prototype.refresh = function(val, max) {
var originalVal, displayVal, color, max = max || null;
// set new max
if(max !== null) {
this.config.max = max;
this.txtMaximum = this.config.max;
if( this.config.humanFriendly ) this.txtMaximum = humanFriendlyNumber( this.config.max, this.config.humanFriendlyDecimal );
this.txtMax.attr({"text" : this.config.max});
setDy(this.txtMax, this.params.maxFontSize, this.params.maxY);
}
// overflow values
originalVal = val;
displayVal = val;
if ((val * 1) > (this.config.max * 1)) {val = (this.config.max * 1);}
if ((val * 1) < (this.config.min * 1)) {val = (this.config.min * 1);}
color = getColor(val, (val - this.config.min) / (this.config.max - this.config.min), this.config.levelColors, this.config.noGradient, this.config.customSectors);
if(this.config.textRenderer) {
displayVal = this.config.textRenderer(displayVal);
} else if( this.config.humanFriendly ) {
displayVal = humanFriendlyNumber( displayVal, this.config.humanFriendlyDecimal ) + this.config.symbol;
} else {
displayVal = (displayVal * 1).toFixed(this.config.decimals) + this.config.symbol;
}
if(!this.config.counter) {
this.canvas.getById(this.config.id+"-txtvalue").attr({"text":displayVal});
setDy(this.canvas.getById(this.config.id+"-txtvalue"), this.params.valueFontSize, this.params.valueY);
}
this.canvas.getById(this.config.id+"-level").animate({pki: [val, this.config.min, this.config.max, this.params.widgetW, this.params.widgetH, this.params.dx, this.params.dy, this.config.gaugeWidthScale, this.config.donut], "fill":color}, this.config.refreshAnimationTime, this.config.refreshAnimationType);
this.config.value = val * 1;
// var clear
originalVal, displayVal, color, max = null;
};
/** Generate shadow */
JustGage.prototype.generateShadow = function(svg, defs) {
var gaussFilter, feOffset, feGaussianBlur, feComposite1, feFlood, feComposite2, feComposite3;
// FILTER
gaussFilter=document.createElementNS(svg,"filter");
gaussFilter.setAttribute("id", this.config.id + "-inner-shadow");
defs.appendChild(gaussFilter);
// offset
feOffset = document.createElementNS(svg,"feOffset");
feOffset.setAttribute("dx", 0);
feOffset.setAttribute("dy", this.config.shadowVerticalOffset);
gaussFilter.appendChild(feOffset);
// blur
feGaussianBlur = document.createElementNS(svg,"feGaussianBlur");
feGaussianBlur.setAttribute("result","offset-blur");
feGaussianBlur.setAttribute("stdDeviation", this.config.shadowSize);
gaussFilter.appendChild(feGaussianBlur);
// composite 1
feComposite1 = document.createElementNS(svg,"feComposite");
feComposite1.setAttribute("operator","out");
feComposite1.setAttribute("in", "SourceGraphic");
feComposite1.setAttribute("in2","offset-blur");
feComposite1.setAttribute("result","inverse");
gaussFilter.appendChild(feComposite1);
// flood
feFlood = document.createElementNS(svg,"feFlood");
feFlood.setAttribute("flood-color","black");
feFlood.setAttribute("flood-opacity", this.config.shadowOpacity);
feFlood.setAttribute("result","color");
gaussFilter.appendChild(feFlood);
// composite 2
feComposite2 = document.createElementNS(svg,"feComposite");
feComposite2.setAttribute("operator","in");
feComposite2.setAttribute("in", "color");
feComposite2.setAttribute("in2","inverse");
feComposite2.setAttribute("result","shadow");
gaussFilter.appendChild(feComposite2);
// composite 3
feComposite3 = document.createElementNS(svg,"feComposite");
feComposite3.setAttribute("operator","over");
feComposite3.setAttribute("in", "shadow");
feComposite3.setAttribute("in2","SourceGraphic");
gaussFilter.appendChild(feComposite3);
// set shadow
if (!this.config.hideInnerShadow) {
this.canvas.canvas.childNodes[2].setAttribute("filter", "url(#" + this.config.id + "-inner-shadow)");
this.canvas.canvas.childNodes[3].setAttribute("filter", "url(#" + this.config.id + "-inner-shadow)");
}
// var clear
gaussFilter, feOffset, feGaussianBlur, feComposite1, feFlood, feComposite2, feComposite3 = null;
};
/** Get color for value */
function getColor(val, pct, col, noGradient, custSec) {
var no, inc, colors, percentage, rval, gval, bval, lower, upper, range, rangePct, pctLower, pctUpper, color;
var noGradient = noGradient || custSec.length > 0;
if(custSec.length > 0) {
for(var i = 0; i < custSec.length; i++) {
if(val > custSec[i].lo && val <= custSec[i].hi) {
return custSec[i].color;
}
}
}
no = col.length;
if (no === 1) return col[0];
inc = (noGradient) ? (1 / no) : (1 / (no - 1));
colors = [];
for (var i = 0; i < col.length; i++) {
percentage = (noGradient) ? (inc * (i + 1)) : (inc * i);
rval = parseInt((cutHex(col[i])).substring(0,2),16);
gval = parseInt((cutHex(col[i])).substring(2,4),16);
bval = parseInt((cutHex(col[i])).substring(4,6),16);
colors[i] = { pct: percentage, color: { r: rval, g: gval, b: bval } };
}
if(pct === 0) {
return 'rgb(' + [colors[0].color.r, colors[0].color.g, colors[0].color.b].join(',') + ')';
}
for (var j = 0; j < colors.length; j++) {
if (pct <= colors[j].pct) {
if (noGradient) {
return 'rgb(' + [colors[j].color.r, colors[j].color.g, colors[j].color.b].join(',') + ')';
} else {
lower = colors[j - 1];
upper = colors[j];
range = upper.pct - lower.pct;
rangePct = (pct - lower.pct) / range;
pctLower = 1 - rangePct;
pctUpper = rangePct;
color = {
r: Math.floor(lower.color.r * pctLower + upper.color.r * pctUpper),
g: Math.floor(lower.color.g * pctLower + upper.color.g * pctUpper),
b: Math.floor(lower.color.b * pctLower + upper.color.b * pctUpper)
};
return 'rgb(' + [color.r, color.g, color.b].join(',') + ')';
}
}
}
}
/** Fix Raphael display:none tspan dy attribute bug */
function setDy(elem, fontSize, txtYpos) {
if ((!ie || ie > 9) && (elem.node.firstChild.attributes.dy)) {
elem.node.firstChild.attributes.dy.value = 0;
}
}
/** Random integer */
function getRandomInt (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/** Cut hex */
function cutHex(str) {
return (str.charAt(0)=="#") ? str.substring(1,7):str;
}
/** Human friendly number suffix - From: http://stackoverflow.com/questions/2692323/code-golf-friendly-number-abbreviator */
function humanFriendlyNumber( n, d ) {
var p, d2, i, s;
p = Math.pow;
d2 = p(10, d);
i = 7;
while( i ) {
s = p(10,i--*3);
if( s <= n ) {
n = Math.round(n*d2/s)/d2+"KMGTPE"[i];
}
}
return n;
}
/** Get style */
function getStyle(oElm, strCssRule){
var strValue = "";
if(document.defaultView && document.defaultView.getComputedStyle){
strValue = document.defaultView.getComputedStyle(oElm).getPropertyValue(strCssRule);
}
else if(oElm.currentStyle){
strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
return p1.toUpperCase();
});
strValue = oElm.currentStyle[strCssRule];
}
return strValue;
}
/** Create Element NS Ready */
function onCreateElementNsReady(func) {
if (document.createElementNS !== undefined) {
func();
} else {
setTimeout(function() { onCreateElementNsReady(func); }, 100);
}
}
/** Get IE version */
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
// And to detect the version:
// ie === 6 // IE6
// ie > 7 // IE8, IE9 ...
// ie < 9 // Anything less than IE9
// ----------------------------------------------------------
// UPDATE: Now using Live NodeList idea from @jdalton
var ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}());

View File

@ -1,108 +0,0 @@
openerp.sale_crm = function(openerp) {
var _t = openerp.web._t;
openerp.sale_crm.GaugeWidget = openerp.web_kanban.AbstractField.extend({
className: "oe_gage",
start: function() {
var self = this;
var parent = this.getParent();
var max = this.options.max_field ? parent.record[this.options.max_field].raw_value : 100;
var label = this.options.label_field ? parent.record[this.options.label_field].raw_value : "";
var title = this.$node.html();
var val = this.field.value;
var value = _.isArray(val) && val.length ? val[val.length-1]['value'] : val;
var unique_id = _.uniqueId("JustGage");
this.$el.empty()
.attr('style', this.$node.attr('style') + ';position:relative; display:inline-block;')
.attr('id', unique_id);
this.gage = new JustGage({
id: unique_id,
node: this.$el[0],
title: title,
value: value,
min: 0,
max: max,
relativeGaugeSize: true,
humanFriendly: true,
titleFontColor: '#333333',
valueFontColor: '#333333',
labelFontColor: '#000',
label: label,
levelColors: [
"#ff0000",
"#f9c802",
"#a9d70b"
],
});
var flag_open = false;
if (self.options.action_change) {
var $svg = self.$el.find('svg');
var css = {
'text-align': 'center',
'position': 'absolute',
'width': self.$el.outerWidth() + 'px',
'top': (self.$el.outerHeight()/2-5) + 'px'
};
self.$el.click(function (event) {
event.stopPropagation();
flag_open = false;
if (!parent.view.is_action_enabled('edit')) {
return;
}
if (!self.$el.find(".oe_justgage_edit").size()) {
$div = $('<div class="oe_justgage_edit" style="z-index:1"/>');
$div.css(css);
$input = $('<input/>').val(value);
$input.css({
'text-align': 'center',
'margin': 'auto',
'width': ($svg.outerWidth()-40) + 'px'
});
$div.append($input);
self.$el.prepend($div)
$input.focus()
.keydown(function (event) {
event.stopPropagation();
if (event.keyCode == 13 || event.keyCode == 9) {
if ($input.val() != value) {
parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () {
parent.do_reload();
});
} else {
$div.remove();
}
}
})
.click(function (event) {
event.stopPropagation();
flag_open = false;
})
.blur(function (event) {
if(!flag_open) {
self.$el.find(".oe_justgage_edit").remove();
} else {
flag_open = false;
setTimeout(function () {$input.focus();}, 0);
}
});
}
}).mousedown(function () {
flag_open = true;
});
if (!+value) {
$svg.fadeTo(0, 0.3);
$div = $('<div/>').text(_t("Click to change value"));
$div.css(css);
self.$el.append($div);
}
}
},
});
openerp.web_kanban.fields_registry.add("gage", "openerp.sale_crm.GaugeWidget");
};

View File

@ -0,0 +1,25 @@
# 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:06+0000\n"
"PO-Revision-Date: 2013-09-15 20:22+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-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "Tilføj/fjern genvej ..."