summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorParamjit Singh Sahota <psa@tinyerp.com>2013-06-07 18:44:49 +0530
committerParamjit Singh Sahota <psa@tinyerp.com>2013-06-07 18:44:49 +0530
commite6c711af32f2a75ad65aef5cdc8c9bd2cff9f4f5 (patch)
tree7eeb421b5d284ddc17fb5d026a7f95866937b00c /addons
parent3b96536e757cbb3e730b094511280a0766f51154 (diff)
parent8c6ff33bef12cdfed35b15a90c3fd13bdd723b42 (diff)
[MERGE] MergeD lp:openobject-addons.
bzr revid: psa@tinyerp.com-20130607131449-dq4k9dam7adxsm6b
Diffstat (limited to 'addons')
-rw-r--r--addons/account/account.py44
-rw-r--r--addons/account/account_bank_statement.py2
-rw-r--r--addons/account/account_cash_statement.py2
-rw-r--r--addons/account/account_invoice.py57
-rw-r--r--addons/account/account_invoice_view.xml6
-rw-r--r--addons/account/account_move_line.py6
-rw-r--r--addons/account/account_view.xml4
-rw-r--r--addons/account/demo/account_minimal.xml42
-rw-r--r--addons/account/html/index.html1
-rw-r--r--addons/account/i18n/ru.po34
-rw-r--r--addons/account/installer.py2
-rw-r--r--addons/account/partner_view.xml2
-rw-r--r--addons/account/process/customer_invoice_process.xml32
-rw-r--r--addons/account/process/statement_process.xml14
-rw-r--r--addons/account/process/supplier_invoice_process.xml28
-rw-r--r--addons/account/product_view.xml4
-rw-r--r--addons/account/project/project_view.xml1
-rw-r--r--addons/account/report/account_print_invoice.rml129
-rw-r--r--addons/account/res_config.py6
-rw-r--r--addons/account/res_config_view.xml2
-rw-r--r--addons/account/wizard/account_validate_account_move.py2
-rw-r--r--addons/account/wizard/pos_box.py2
-rw-r--r--addons/account_analytic_analysis/account_analytic_analysis.py4
-rw-r--r--addons/account_analytic_analysis/i18n/ru.po22
-rw-r--r--addons/account_analytic_default/security/account_analytic_default_security.xml2
-rw-r--r--addons/account_analytic_plans/account_analytic_plans.py4
-rw-r--r--addons/account_analytic_plans/i18n/ru.po18
-rw-r--r--addons/account_asset/i18n/ru.po56
-rw-r--r--addons/account_check_writing/i18n/ru.po32
-rw-r--r--addons/account_followup/account_followup_customers.xml5
-rw-r--r--addons/account_followup/i18n/ru.po44
-rw-r--r--addons/account_followup/report/account_followup_report.xml2
-rw-r--r--addons/account_followup/security/account_followup_security.xml2
-rw-r--r--addons/account_payment/security/account_payment_security.xml6
-rw-r--r--addons/account_payment/wizard/account_payment_order.py3
-rw-r--r--addons/account_test/i18n/ru.po241
-rw-r--r--addons/account_voucher/account_voucher.py2
-rw-r--r--addons/account_voucher/html/index.html4
-rw-r--r--addons/account_voucher/i18n/ru.po104
-rw-r--r--addons/account_voucher/security/account_voucher_security.xml4
-rw-r--r--addons/analytic/analytic.py2
-rw-r--r--addons/analytic/security/analytic_security.xml4
-rw-r--r--addons/analytic_user_function/analytic_user_function.py4
-rw-r--r--addons/anonymization/anonymization.py10
-rw-r--r--addons/auth_openid/i18n/ru.po20
-rw-r--r--addons/auth_signup/i18n/ru.po71
-rw-r--r--addons/auth_signup/res_users.py38
-rw-r--r--addons/auth_signup/res_users_view.xml2
-rw-r--r--addons/auth_signup/static/src/js/auth_signup.js2
-rw-r--r--addons/base_action_rule/base_action_rule.py54
-rw-r--r--addons/base_action_rule/base_action_rule_view.xml43
-rw-r--r--addons/base_action_rule/i18n/ru.po22
-rw-r--r--addons/base_action_rule/tests/base_action_rule_test.py24
-rw-r--r--addons/base_setup/i18n/ru.po61
-rw-r--r--addons/base_status/base_state.py2
-rw-r--r--addons/base_status/i18n/ru.po18
-rw-r--r--addons/base_vat/base_vat.py2
-rw-r--r--addons/claim_from_delivery/i18n/ru.po12
-rw-r--r--addons/crm/__openerp__.py7
-rw-r--r--addons/crm/base_partner_merge.py103
-rw-r--r--addons/crm/base_partner_merge_view.xml29
-rw-r--r--addons/crm/crm.py71
-rw-r--r--addons/crm/crm_action_rule_demo.xml7
-rw-r--r--addons/crm/crm_case_section_view.xml79
-rw-r--r--addons/crm/crm_data.xml5
-rw-r--r--addons/crm/crm_demo.xml20
-rw-r--r--addons/crm/crm_lead.py17
-rw-r--r--addons/crm/crm_lead_demo.xml61
-rw-r--r--addons/crm/crm_lead_view.xml13
-rw-r--r--addons/crm/crm_phonecall_demo.xml6
-rw-r--r--addons/crm/crm_view.xml2
-rw-r--r--addons/crm/html/index.html1
-rw-r--r--addons/crm/i18n/ru.po66
-rw-r--r--addons/crm/process/crm_configuration_process.xml12
-rw-r--r--addons/crm/report/crm_lead_report_view.xml2
-rw-r--r--addons/crm/report/crm_phonecall_report_view.xml2
-rw-r--r--addons/crm/res_config_view.xml4
-rw-r--r--addons/crm/security/ir.model.access.csv2
-rw-r--r--addons/crm/static/lib/sparkline/jquery.sparkline.js3047
-rw-r--r--addons/crm/static/src/css/crm.css28
-rw-r--r--addons/crm/static/src/js/crm.js11
-rw-r--r--addons/crm/static/src/js/crm_case_section.js34
-rw-r--r--addons/crm/test/crm_lead_cancel.yml6
-rw-r--r--addons/crm/wizard/crm_lead_to_opportunity.py2
-rw-r--r--addons/crm_claim/i18n/ru.po70
-rw-r--r--addons/crm_claim/report/crm_claim_report_view.xml4
-rw-r--r--addons/crm_helpdesk/crm_helpdesk_view.xml4
-rw-r--r--addons/crm_helpdesk/i18n/ru.po26
-rw-r--r--addons/crm_helpdesk/i18n/zh_CN.po14
-rw-r--r--addons/crm_helpdesk/report/crm_helpdesk_report_view.xml4
-rw-r--r--addons/crm_helpdesk/test/customer_question.eml2
-rw-r--r--addons/crm_partner_assign/i18n/ru.po85
-rw-r--r--addons/crm_partner_assign/wizard/crm_forward_to_partner.py1
-rw-r--r--addons/crm_profiling/i18n/ru.po10
-rw-r--r--addons/delivery/sale.py4
-rw-r--r--addons/document_page/document_page_view.xml1
-rw-r--r--addons/document_webdav/webdav_setup.xml13
-rw-r--r--addons/edi/i18n/ru.po23
-rw-r--r--addons/edi/models/edi.py2
-rw-r--r--addons/email_template/email_template.py4
-rw-r--r--addons/email_template/i18n/ru.po14
-rw-r--r--addons/event/event_view.xml19
-rw-r--r--addons/event_sale/event_sale.py5
-rw-r--r--addons/fetchmail/security/ir.model.access.csv1
-rw-r--r--addons/fleet/i18n/de.po42
-rw-r--r--addons/google_docs/i18n/ln.po188
-rw-r--r--addons/hr/html/index.html1
-rw-r--r--addons/hr/process/hr_process.xml10
-rw-r--r--addons/hr/security/hr_security.xml4
-rw-r--r--addons/hr_attendance/security/ir_rule.xml4
-rw-r--r--addons/hr_attendance/wizard/hr_attendance_error.py2
-rw-r--r--addons/hr_evaluation/security/hr_evaluation_security.xml4
-rw-r--r--addons/hr_expense/hr_expense.py47
-rw-r--r--addons/hr_expense/hr_expense_view.xml2
-rw-r--r--addons/hr_expense/process/hr_expense_process.xml26
-rw-r--r--addons/hr_expense/security/ir_rule.xml6
-rw-r--r--addons/hr_holidays/hr_holidays_view.xml4
-rw-r--r--addons/hr_holidays/process/hr_holidays_process.xml26
-rw-r--r--addons/hr_holidays/security/ir_rule.xml4
-rw-r--r--addons/hr_payroll/security/hr_security.xml4
-rw-r--r--addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py2
-rw-r--r--addons/hr_recruitment/__openerp__.py4
-rw-r--r--addons/hr_recruitment/hr_recruitment.py2
-rw-r--r--addons/hr_recruitment/hr_recruitment_data.xml14
-rw-r--r--addons/hr_recruitment/hr_recruitment_demo.xml129
-rw-r--r--addons/hr_recruitment/hr_recruitment_demo.yml102
-rw-r--r--addons/hr_recruitment/hr_recruitment_view.xml10
-rw-r--r--addons/hr_recruitment/security/hr_recruitment_security.xml2
-rw-r--r--addons/hr_timesheet/__openerp__.py2
-rw-r--r--addons/hr_timesheet/hr_timesheet_demo.xml10
-rw-r--r--addons/hr_timesheet/security/hr_timesheet_security.xml4
-rw-r--r--addons/hr_timesheet_invoice/hr_timesheet_invoice.py2
-rw-r--r--addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml24
-rw-r--r--addons/hr_timesheet_sheet/static/src/js/timesheet.js44
-rw-r--r--addons/im/im.py74
-rw-r--r--addons/im/security/ir.model.access.csv2
-rw-r--r--addons/im/static/src/audio/Ting.mp3bin17087 -> 17293 bytes
-rw-r--r--addons/im/static/src/audio/Ting.oggbin12568 -> 17026 bytes
-rw-r--r--addons/im/static/src/js/im.js7
-rw-r--r--addons/im/watcher.py84
-rw-r--r--addons/im_livechat/security/ir.model.access.csv2
-rw-r--r--addons/im_livechat/static/ext/static/audio/Ting.mp3bin17087 -> 17293 bytes
-rw-r--r--addons/im_livechat/static/ext/static/audio/Ting.oggbin12568 -> 17026 bytes
-rw-r--r--addons/im_livechat/static/ext/static/js/livesupport.js7
-rw-r--r--addons/l10n_be/wizard/l10n_be_account_vat_declaration.py2
-rw-r--r--addons/l10n_be/wizard/l10n_be_partner_vat_listing.py6
-rw-r--r--addons/l10n_be/wizard/l10n_be_vat_intra.py4
-rw-r--r--addons/l10n_ca/__openerp__.py4
-rw-r--r--addons/l10n_ca/account_tax_en.xml10
-rw-r--r--addons/l10n_ca/account_tax_fr.xml10
-rw-r--r--addons/l10n_ca/fiscal_templates_en.xml12
-rw-r--r--addons/l10n_ca/fiscal_templates_fr.xml6
-rw-r--r--addons/l10n_cr/l10n_cr_base_data.xml23
-rw-r--r--addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py8
-rw-r--r--addons/l10n_it/__openerp__.py2
-rw-r--r--addons/l10n_it/data/account.tax.code.template.csv31
-rw-r--r--addons/l10n_it/data/account.tax.template.csv135
-rw-r--r--addons/l10n_lu/account_financial_report.xml30
-rw-r--r--addons/l10n_lu/wizard/print_vat.py2
-rw-r--r--addons/mail/html/index.html4
-rw-r--r--addons/mail/mail_mail.py17
-rw-r--r--addons/mail/mail_mail_view.xml5
-rw-r--r--addons/mail/mail_message.py29
-rw-r--r--addons/mail/mail_thread.py37
-rw-r--r--addons/mail/res_users_view.xml2
-rw-r--r--addons/mail/static/src/js/mail.js11
-rw-r--r--addons/mail/static/src/xml/mail.xml2
-rw-r--r--addons/mail/tests/test_mail_gateway.py12
-rw-r--r--addons/mail/wizard/mail_compose_message.py1
-rw-r--r--addons/marketing_campaign/marketing_campaign_demo.xml13
-rw-r--r--addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml141
-rw-r--r--addons/membership/process/membership_process.xml22
-rw-r--r--addons/mrp/html/index.html4
-rw-r--r--addons/mrp/i18n/mn.po113
-rw-r--r--addons/mrp/i18n/ru.po24
-rw-r--r--addons/mrp/process/procurement_process.xml48
-rw-r--r--addons/mrp/process/service_product_process.xml6
-rw-r--r--addons/mrp/process/stockable_product_process.xml8
-rw-r--r--addons/mrp/procurement.py5
-rw-r--r--addons/mrp/report/order.rml93
-rw-r--r--addons/mrp_operations/mrp_operations.py4
-rw-r--r--addons/mrp_operations/process/mrp_operation_process.xml16
-rw-r--r--addons/mrp_repair/mrp_repair.py4
-rw-r--r--addons/mrp_repair/security/mrp_repair_security.xml2
-rw-r--r--addons/multi_company/i18n/ru.po16
-rw-r--r--addons/multi_company/multi_company_demo.xml84
-rw-r--r--addons/note/html/index.html4
-rw-r--r--addons/note/i18n/ru.po286
-rw-r--r--addons/note/note_view.xml2
-rw-r--r--addons/note/security/ir.rule.xml4
-rw-r--r--addons/point_of_sale/html/index.html1
-rw-r--r--addons/point_of_sale/point_of_sale.py6
-rw-r--r--addons/point_of_sale/static/src/js/widgets.js11
-rw-r--r--addons/point_of_sale/wizard/pos_open_statement.py2
-rw-r--r--addons/portal/security/portal_security.xml2
-rw-r--r--addons/portal/wizard/portal_wizard.py90
-rw-r--r--addons/portal_hr_employees/hr_employee_view.xml3
-rw-r--r--addons/procurement/procurement.py2
-rw-r--r--addons/procurement/procurement_view.xml1
-rw-r--r--addons/procurement/stock_orderpoint.xml27
-rw-r--r--addons/product/process/product_process.xml4
-rw-r--r--addons/product/product.py11
-rw-r--r--addons/project/html/index.html4
-rw-r--r--addons/project/i18n/ru.po116
-rw-r--r--addons/project/process/task_process.xml12
-rw-r--r--addons/project/project.py29
-rw-r--r--addons/project/report/project_cumulative.xml2
-rw-r--r--addons/project_gtd/wizard/project_gtd_empty.py2
-rw-r--r--addons/project_issue/project_issue.py42
-rw-r--r--addons/project_issue/project_issue_view.xml27
-rw-r--r--addons/project_issue_sheet/project_issue_sheet_view.xml3
-rw-r--r--addons/project_long_term/project_long_term_view.xml5
-rw-r--r--addons/project_mrp/process/project_mrp_process.xml12
-rw-r--r--addons/project_timesheet/__openerp__.py2
-rw-r--r--addons/project_timesheet/process/project_timesheet_process.xml12
-rw-r--r--addons/project_timesheet/project_timesheet.py10
-rw-r--r--addons/purchase/html/index.html1
-rw-r--r--addons/purchase/process/purchase_process.xml36
-rw-r--r--addons/purchase/purchase_workflow.xml2
-rw-r--r--addons/purchase/report/order.rml84
-rw-r--r--addons/purchase/report/request_quotation.rml55
-rw-r--r--addons/report_webkit/webkit_report.py2
-rw-r--r--addons/sale/html/index.html4
-rw-r--r--addons/sale/i18n/ru.po17
-rw-r--r--addons/sale/process/sale_process.xml12
-rw-r--r--addons/sale/report/sale_order.rml93
-rw-r--r--addons/sale/res_partner.py2
-rw-r--r--addons/sale/sale.py6
-rw-r--r--addons/sale/sale_demo.xml2
-rw-r--r--addons/sale/sale_view.xml2
-rw-r--r--addons/sale_analytic_plans/i18n/ru.po8
-rw-r--r--addons/sale_crm/__openerp__.py6
-rw-r--r--addons/sale_crm/i18n/ru.po32
-rw-r--r--addons/sale_crm/process/sale_crm_process.xml16
-rw-r--r--addons/sale_crm/sale_crm.py63
-rw-r--r--addons/sale_crm/sale_crm_demo.xml130
-rw-r--r--addons/sale_crm/sale_crm_view.xml89
-rw-r--r--addons/sale_crm/static/lib/justgage.js883
-rw-r--r--addons/sale_crm/static/src/js/sale_crm.js108
-rw-r--r--addons/sale_crm/wizard/crm_make_sale.py2
-rw-r--r--addons/sale_journal/i18n/ru.po14
-rw-r--r--addons/sale_margin/i18n/ru.po7
-rw-r--r--addons/sale_margin/sale_margin_view.xml2
-rw-r--r--addons/sale_stock/i18n/ru.po100
-rw-r--r--addons/sale_stock/process/sale_stock_process.xml20
-rw-r--r--addons/sale_stock/test/cancel_order_sale_stock.yml4
-rw-r--r--addons/share/wizard/share_wizard.py8
-rw-r--r--addons/stock/html/index.html4
-rw-r--r--addons/stock/i18n/ru.po15
-rw-r--r--addons/stock/stock.py5
-rw-r--r--addons/stock/wizard/stock_partial_picking.py6
-rw-r--r--addons/stock_location/stock_location_demo_cpu1.xml5
-rw-r--r--addons/subscription/subscription.py4
-rw-r--r--addons/survey/wizard/survey_send_invitation.py3
-rw-r--r--addons/warning/warning.py16
255 files changed, 7648 insertions, 2174 deletions
diff --git a/addons/account/account.py b/addons/account/account.py
index e92bd3a7879..a68c1de0939 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -648,10 +648,10 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
- raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
+ raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
# Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does)
if (new_type in restricted_groups):
- raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
+ raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
return True
@@ -1015,14 +1015,14 @@ class account_period(osv.osv):
if not result:
result = self.search(cr, uid, args, context=context)
if not result:
- raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
+ raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
return result
def action_draft(self, cr, uid, ids, *args):
mode = 'draft'
for period in self.browse(cr, uid, ids):
if period.fiscalyear_id.state == 'done':
- raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year'))
+ raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year'))
cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),))
cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),))
return True
@@ -1034,9 +1034,15 @@ class account_period(osv.osv):
context = {}
ids = []
if name:
- ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
+ ids = self.search(cr, user,
+ [('code', 'ilike', name)] + args,
+ limit=limit,
+ context=context)
if not ids:
- ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
+ ids = self.search(cr, user,
+ [('name', operator, name)] + args,
+ limit=limit,
+ context=context)
return self.name_get(cr, user, ids, context=context)
def write(self, cr, uid, ids, vals, context=None):
@@ -1059,10 +1065,14 @@ class account_period(osv.osv):
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
if period_date_start > period_date_stop:
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
+
+ # /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
+ # on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
+
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
if period_from.special:
- return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
- return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
+ return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
+ return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
class account_journal_period(osv.osv):
@@ -1854,6 +1864,12 @@ class account_tax_code(osv.osv):
_order = 'code'
+def get_precision_tax():
+ def change_digit_tax(cr):
+ res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
+ return (16, res+3)
+ return change_digit_tax
+
class account_tax(osv.osv):
"""
A tax object.
@@ -1874,12 +1890,6 @@ class account_tax(osv.osv):
default.update({'name': name + _(' (Copy)')})
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
- def get_precision_tax():
- def change_digit_tax(cr):
- res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
- return (16, res+2)
- return change_digit_tax
-
_name = 'account.tax'
_description = 'Tax'
_columns = {
@@ -2307,7 +2317,7 @@ class account_model(osv.osv):
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
- raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !'))
+ raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!'))
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
@@ -2319,7 +2329,7 @@ class account_model(osv.osv):
analytic_account_id = False
if line.analytic_account_id:
if not model.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
analytic_account_id = line.analytic_account_id.id
val = {
'move_id': move_id,
@@ -2795,7 +2805,7 @@ class account_tax_template(osv.osv):
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'name': fields.char('Tax Name', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
- 'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
+ 'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index 023765d73f0..8a15321b9c6 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -420,7 +420,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytic_account_id:
if not st.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
if not st_line.amount:
continue
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index 40f0ca80738..8e3e250d41c 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -252,7 +252,7 @@ class account_cash_statement(osv.osv):
for statement in statement_pool.browse(cr, uid, ids, context=context):
vals = {}
if not self._user_allow(cr, uid, statement.id, context=context):
- raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, )))
+ raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, )))
if statement.name and statement.name == '/':
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 14aabed86ad..01476374cf4 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -69,7 +69,7 @@ class account_invoice(osv.osv):
tt = type2journal.get(type_inv, 'sale')
result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
if not result:
- raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,))
return result[0]
def _get_type(self, cr, uid, context=None):
@@ -89,13 +89,43 @@ class account_invoice(osv.osv):
return [('none', _('Free Reference'))]
def _amount_residual(self, cr, uid, ids, name, args, context=None):
+ """Function of the field residua. It computes the residual amount (balance) for each invoice"""
+ if context is None:
+ context = {}
+ ctx = context.copy()
result = {}
+ currency_obj = self.pool.get('res.currency')
for invoice in self.browse(cr, uid, ids, context=context):
+ nb_inv_in_partial_rec = max_invoice_id = 0
result[invoice.id] = 0.0
if invoice.move_id:
- for m in invoice.move_id.line_id:
- if m.account_id.type in ('receivable','payable'):
- result[invoice.id] += m.amount_residual_currency
+ for aml in invoice.move_id.line_id:
+ if aml.account_id.type in ('receivable','payable'):
+ if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
+ result[invoice.id] += aml.amount_residual_currency
+ else:
+ ctx['date'] = aml.date
+ result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
+
+ if aml.reconcile_partial_id.line_partial_ids:
+ #we check if the invoice is partially reconciled and if there are other invoices
+ #involved in this partial reconciliation (and we sum these invoices)
+ for line in aml.reconcile_partial_id.line_partial_ids:
+ if line.invoice:
+ nb_inv_in_partial_rec += 1
+ #store the max invoice id as for this invoice we will make a balance instead of a simple division
+ max_invoice_id = max(max_invoice_id, line.invoice.id)
+ if nb_inv_in_partial_rec:
+ #if there are several invoices in a partial reconciliation, we split the residual by the number
+ #of invoice to have a sum of residual amounts that matches the partner balance
+ new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
+ if invoice.id == max_invoice_id:
+ #if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
+ #balance to avoid rounding errors
+ result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
+ else:
+ result[invoice.id] = new_value
+
#prevent the residual amount on the invoice to be less than 0
result[invoice.id] = max(result[invoice.id], 0.0)
return result
@@ -600,7 +630,7 @@ class account_invoice(osv.osv):
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configuration Error!'),
- _('Invoice line account\'s company and invoice\'s compnay does not match.'))
+ _('Invoice line account\'s company and invoice\'s company does not match.'))
else:
continue
if company_id and type:
@@ -756,7 +786,7 @@ class account_invoice(osv.osv):
else:
ref = self._convert_ref(cr, uid, inv.number)
if not inv.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
il['analytic_lines'] = [(0,0, {
'name': il['name'],
'date': inv['date_invoice'],
@@ -882,7 +912,7 @@ class account_invoice(osv.osv):
if not inv.journal_id.sequence_id:
raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.'))
if not inv.invoice_line:
- raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
+ raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.'))
if inv.move_id:
continue
@@ -903,7 +933,7 @@ class account_invoice(osv.osv):
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
if group_check_total and uid in [x.id for x in group_check_total.users]:
if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)):
- raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.'))
+ raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
if inv.payment_term:
total_fixed = total_percent = 0
@@ -1445,7 +1475,7 @@ class account_invoice_line(osv.osv):
context = dict(context)
context.update({'company_id': company_id, 'force_company': company_id})
if not partner_id:
- raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
+ raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
if not product:
if type in ('in_invoice', 'in_refund'):
return {'value': {}, 'domain':{'product_uom':[]}}
@@ -1460,6 +1490,7 @@ class account_invoice_line(osv.osv):
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
+ result['name'] = res.partner_ref
if type in ('out_invoice','out_refund'):
a = res.property_account_income.id
if not a:
@@ -1474,19 +1505,21 @@ class account_invoice_line(osv.osv):
if type in ('out_invoice', 'out_refund'):
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
+ if res.description_sale:
+ result['name'] += '\n'+res.description_sale
else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
+ if res.description_purchase:
+ result['name'] += '\n'+res.description_purchase
+
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'):
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
else:
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
- result['name'] = res.partner_ref
result['uos_id'] = uom_id or res.uom_id.id
- if res.description:
- result['name'] += '\n'+res.description
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 7469c38decb..c71b97d5796 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -197,7 +197,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
- domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
+ domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
@@ -320,7 +320,7 @@
<group>
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
- groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}"
+ context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'
domain="[('customer', '=', True)]"/>
<field name="fiscal_position" widget="selection" />
@@ -353,7 +353,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
- domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
+ domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index d6c25364784..e604cc6d1a4 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -192,7 +192,7 @@ class account_move_line(osv.osv):
for obj_line in self.browse(cr, uid, ids, context=context):
if obj_line.analytic_account_id:
if not obj_line.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context)
acc_ana_line_obj.create(cr, uid, vals_line)
return True
@@ -1101,7 +1101,7 @@ class account_move_line(osv.osv):
period = period_obj.browse(cr, uid, period_id, context=context)
for (state,) in result:
if state == 'done':
- raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
+ raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
if not result:
jour_period_obj.create(cr, uid, {
'name': (journal.code or journal.name)+':'+(period.name or ''),
@@ -1181,7 +1181,7 @@ class account_move_line(osv.osv):
move_id = move_obj.create(cr, uid, v, context)
vals['move_id'] = move_id
else:
- raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
+ raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
ok = not (journal.type_control_ids or journal.account_control_ids)
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 603c4254b19..e921e639642 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -907,9 +907,7 @@
<label for="type"/>
<div>
<field name="type"/>
- <field name="amount" class="oe_inline"
- attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
- <label string="%%" attrs="{'invisible':[('type','&lt;&gt;','percent')]}"/>
+ <field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
</div>
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml
index ce9a09def08..3940c1e5357 100644
--- a/addons/account/demo/account_minimal.xml
+++ b/addons/account/demo/account_minimal.xml
@@ -313,8 +313,8 @@
<field name="code">TSAJ</field>
<field name="type">sale</field>
<field name="sequence_id" ref="sequence_sale_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="a_sale"/>
+ <field name="default_credit_account_id" ref="a_sale"/>
+ <field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -323,8 +323,8 @@
<field name="code">TSCNJ</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="a_sale"/>
+ <field name="default_credit_account_id" ref="a_sale"/>
+ <field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -334,8 +334,8 @@
<field name="code">TEXJ</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="sequence_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="a_expense"/>
+ <field name="default_debit_account_id" ref="a_expense"/>
+ <field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -344,8 +344,8 @@
<field name="code">TECNJ</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="a_expense"/>
+ <field name="default_debit_account_id" ref="a_expense"/>
+ <field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -355,8 +355,8 @@
<field name="code">TBNK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_bank_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="bnk"/>
- <field model="account.account" name="default_credit_account_id" ref="bnk"/>
+ <field name="default_debit_account_id" ref="bnk"/>
+ <field name="default_credit_account_id" ref="bnk"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -365,8 +365,8 @@
<field name="code">TCHK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_check_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="cash"/>
- <field model="account.account" name="default_credit_account_id" ref="cash"/>
+ <field name="default_debit_account_id" ref="cash"/>
+ <field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -374,9 +374,9 @@
<field name="name">Cash Journal - (test)</field>
<field name="code">TCSH</field>
<field name="type">cash</field>
- <field name="profit_account_id" model="account.account" ref="rsa" />
- <field name="loss_account_id" model="account.account" ref="rsa" />
- <field name="internal_account_id" model="account.account" ref="rsa" />
+ <field name="profit_account_id" ref="rsa" />
+ <field name="loss_account_id" ref="rsa" />
+ <field name="internal_account_id" ref="rsa" />
<field name="with_last_closing_balance" eval="True" />
<!--
Usually, cash payment methods requires a control at opening and closing.
@@ -385,8 +385,8 @@
-->
<field name="cash_control" eval="False"/>
<field name="sequence_id" ref="sequence_cash_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="cash"/>
- <field model="account.account" name="default_credit_account_id" ref="cash"/>
+ <field name="default_debit_account_id" ref="cash"/>
+ <field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -403,8 +403,8 @@
<field name="code">TOEJ</field>
<field name="type">situation</field>
<field name="sequence_id" ref="sequence_opening_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="o_income"/>
- <field model="account.account" name="default_credit_account_id" ref="o_expense"/>
+ <field name="default_debit_account_id" ref="o_income"/>
+ <field name="default_credit_account_id" ref="o_expense"/>
<field eval="True" name="centralisation"/>
<field name="user_id" ref="base.user_root"/>
</record>
@@ -413,8 +413,8 @@
<field name="name">USD Bank Journal - (test)</field>
<field name="code">TUBK</field>
<field name="type">bank</field>
- <field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
- <field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
+ <field name="default_debit_account_id" ref="usd_bnk"/>
+ <field name="default_credit_account_id" ref="usd_bnk"/>
<field name="currency" ref="base.USD"/>
</record>
<!--
diff --git a/addons/account/html/index.html b/addons/account/html/index.html
index 9a32fb015aa..09a58fb3246 100644
--- a/addons/account/html/index.html
+++ b/addons/account/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
<img src="account_sc_00.png" alt="Online Demo">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
diff --git a/addons/account/i18n/ru.po b/addons/account/i18n/ru.po
index 6ded487f1d9..17687d26313 100644
--- a/addons/account/i18n/ru.po
+++ b/addons/account/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-03-14 06:41+0000\n"
+"PO-Revision-Date: 2013-06-05 13:02+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:17+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@@ -465,7 +465,7 @@ msgstr "Шаблона плана счетов"
#. module: account
#: selection:account.invoice.refund,filter_refund:0
msgid "Modify: create refund, reconcile and create a new draft invoice"
-msgstr ""
+msgstr "Изменить: создать возврат, сверить и создать новый счет"
#. module: account
#: help:account.config.settings,tax_calculation_rounding_method:0
@@ -704,6 +704,8 @@ msgid ""
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
"and 'draft' or ''}"
msgstr ""
+"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
+"and 'draft' or ''}"
#. module: account
#: view:account.period:0
@@ -731,6 +733,8 @@ msgstr "Период журнала"
msgid ""
"You cannot create more than one move per period on a centralized journal."
msgstr ""
+"Вы не можете создать более одного движения за период в централизованном "
+"журнале."
#. module: account
#: help:account.tax,account_analytic_paid_id:0
@@ -911,6 +915,7 @@ msgid ""
"Print Report with the currency column if the currency differs from the "
"company currency."
msgstr ""
+"Печать отчета с колонкой валюты, если валюта отличается от валюты компании."
#. module: account
#: report:account.analytic.account.quantity_cost_ledger:0
@@ -950,6 +955,10 @@ msgid ""
" </p>\n"
" "
msgstr ""
+"<p>\n"
+" Элементы журнала не найдены.\n"
+" </p>\n"
+" "
#. module: account
#: code:addons/account/account.py:1639
@@ -1039,7 +1048,7 @@ msgstr "Обязательства"
#: code:addons/account/account_invoice.py:867
#, python-format
msgid "Please define sequence on the journal related to this invoice."
-msgstr ""
+msgstr "Пожалуйста, определите нумерацию в журнале, связанном с этим счетом."
#. module: account
#: view:account.entries.report:0
@@ -1517,6 +1526,9 @@ msgid ""
"And after getting confirmation from the bank it will be in 'Confirmed' "
"status."
msgstr ""
+"Когда новый отчет создан - статус станет \"Черновик\".\n"
+"После получения подтверждения из банка, статус измениться на \" "
+"Подтверждено\"."
#. module: account
#: field:account.invoice.report,state:0
@@ -1560,6 +1572,8 @@ msgid ""
"There is no default debit account defined \n"
"on journal \"%s\"."
msgstr ""
+"Дебетовый счет по умолчанию не определен\n"
+"в журнале \"%s\"."
#. module: account
#: view:account.tax:0
@@ -1662,7 +1676,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,company_footer:0
msgid "Bank accounts footer preview"
-msgstr ""
+msgstr "Просмотр нижнего колонтитула банковских счетов"
#. module: account
#: selection:account.account,type:0
@@ -7386,7 +7400,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,module_account_voucher:0
msgid "Manage customer payments"
-msgstr ""
+msgstr "Управление платежами заказчиков"
#. module: account
#: help:report.invoice.created,origin:0
@@ -7415,7 +7429,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_invoice_tree1
#: model:ir.ui.menu,name:account.menu_action_invoice_tree1
msgid "Customer Invoices"
-msgstr "Счета клиенту"
+msgstr "Счета заказчику"
#. module: account
#: view:account.tax:0
@@ -10543,7 +10557,7 @@ msgstr "Состояние счета - сделано"
#. module: account
#: field:account.config.settings,module_account_followup:0
msgid "Manage customer payment follow-ups"
-msgstr ""
+msgstr "Управление напоминаниями заказчикам об оплатах"
#. module: account
#: model:ir.model,name:account.model_report_account_sales
@@ -11037,7 +11051,7 @@ msgstr "Счет расходов по шаблону ТМЦ"
#. module: account
#: field:res.partner,property_payment_term:0
msgid "Customer Payment Term"
-msgstr ""
+msgstr "Срок платежа заказчика"
#. module: account
#: help:accounting.report,label_filter:0
diff --git a/addons/account/installer.py b/addons/account/installer.py
index 537371d0f64..961b8f9e763 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -111,7 +111,7 @@ class account_installer(osv.osv_memory):
def check_unconfigured_cmp(self, cr, uid, context=None):
""" check if there are still unconfigured companies """
if not self.get_unconfigured_cmp(cr, uid, context=context):
- raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
+ raise osv.except_osv(_('No Unconfigured Company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None: context = {}
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml
index f6c89a92560..3dcc68e315e 100644
--- a/addons/account/partner_view.xml
+++ b/addons/account/partner_view.xml
@@ -68,7 +68,7 @@
name="%(account.action_invoice_tree)d"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
<button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
- <button type="action" string="Contracts/Analytic Accounts" name="%(account.action_open_partner_analytic_accounts)d"
+ <button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"
groups="analytic.group_analytic_accounting"/>
</xpath>
</field>
diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml
index 8971235c1f7..e45f8080518 100644
--- a/addons/account/process/customer_invoice_process.xml
+++ b/addons/account/process/customer_invoice_process.xml
@@ -123,24 +123,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The accountant confirms the statement.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
- <field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
+ <field name="target_node_id" ref="process_node_accountingstatemententries0"/>
+ <field name="source_node_id" ref="account.process_node_draftstatement0"/>
</record>
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
+ <field name="target_node_id" ref="process_node_draftinvoices0"/>
+ <field name="source_node_id" ref="process_node_analytic0"/>
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are checked, validated and printed.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
+ <field name="target_node_id" ref="process_node_invoiceinvoice0"/>
+ <field name="source_node_id" ref="process_node_draftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@@ -148,40 +148,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
- <field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
+ <field name="target_node_id" ref="process_node_accountingentries0"/>
+ <field name="source_node_id" ref="process_node_invoiceinvoice0"/>
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are the first input of the reconciliation.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
+ <field name="target_node_id" ref="process_node_reconciliation0"/>
+ <field name="source_node_id" ref="process_node_accountingentries0"/>
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Manual or automatic creation of payment entries according to the statements&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
- <field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
+ <field name="target_node_id" ref="process_node_paymententries0"/>
+ <field name="source_node_id" ref="process_node_bankstatement0"/>
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Payment entries are the second input of the reconciliation.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
+ <field name="target_node_id" ref="process_node_reconciliation0"/>
+ <field name="source_node_id" ref="process_node_paymententries0"/>
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice can be paid.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
+ <field name="target_node_id" ref="process_node_paidinvoice0"/>
+ <field name="source_node_id" ref="process_node_reconciliation0"/>
</record>
<!--
diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml
index 64dd7520bc1..81b1748a6d4 100644
--- a/addons/account/process/statement_process.xml
+++ b/addons/account/process/statement_process.xml
@@ -68,8 +68,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic import of the bank statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from an electronic file&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
- <field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
+ <field name="target_node_id" ref="process_node_draftstatement0"/>
+ <field name="source_node_id" ref="process_node_electronicfile0"/>
</record>
<record id="process_transition_invoicemanually0" model="process.transition">
@@ -77,17 +77,17 @@
<field eval="&quot;&quot;&quot;Manual entry&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A statement with manual entries becomes a draft statement.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
- <field model="process.node" name="source_node_id" ref="process_node_manually0"/>
+ <field name="target_node_id" ref="process_node_draftstatement0"/>
+ <field name="source_node_id" ref="process_node_manually0"/>
</record>
<record id="process_transition_invoiceimport0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Import from invoice or payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from a supplier or customer invoice&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
- <field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
+ <field name="target_node_id" ref="process_node_draftstatement0"/>
+ <field name="source_node_id" ref="process_node_importinvoice0"/>
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml
index 58b98220f95..b1d9de904aa 100644
--- a/addons/account/process/supplier_invoice_process.xml
+++ b/addons/account/process/supplier_invoice_process.xml
@@ -111,16 +111,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
+ <field name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
+ <field name="source_node_id" ref="process_node_analyticcost0"/>
</record>
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are validated. &quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
+ <field name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
+ <field name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@@ -128,40 +128,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice. &quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
+ <field name="target_node_id" ref="process_node_supplieraccountingentries0"/>
+ <field name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
</record>
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are an input of the reconciliation.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
+ <field name="target_node_id" ref="process_node_supplierreconciliation0"/>
+ <field name="source_node_id" ref="process_node_supplieraccountingentries0"/>
</record>
<record id="process_transition_paymentorderbank0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The payment order is sent to the bank.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
+ <field name="target_node_id" ref="process_node_supplierbankstatement0"/>
+ <field name="source_node_id" ref="process_node_supplierpaymentorder0"/>
</record>
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Bank statements are entered in the system.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
+ <field name="target_node_id" ref="process_node_supplierreconciliation0"/>
+ <field name="source_node_id" ref="process_node_supplierbankstatement0"/>
</record>
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;System payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
+ <field name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
+ <field name="source_node_id" ref="process_node_supplierreconciliation0"/>
</record>
</data>
diff --git a/addons/account/product_view.xml b/addons/account/product_view.xml
index 44d53839700..2c540cb6ee6 100644
--- a/addons/account/product_view.xml
+++ b/addons/account/product_view.xml
@@ -11,11 +11,11 @@
<page string="Accounting" groups="account.group_account_invoice">
<group name="properties">
<group>
- <field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
+ <field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
</group>
<group>
- <field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
+ <field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
</group>
</group>
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 4dbdf41abf0..6ce97b5c868 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -68,6 +68,7 @@
<field name="parent_id" invisible="1"/>
<field name="type"/>
<field name="company_id" groups="base.group_multi_company"/>
+ <field name="template_id" invisible="1"/>
</tree>
</field>
</record>
diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml
index 9268c94d4c7..3582221df44 100644
--- a/addons/account/report/account_print_invoice.rml
+++ b/addons/account/report/account_print_invoice.rml
@@ -99,42 +99,39 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
- <paraStyle name="Standard" fontName="Helvetica"/>
- <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Index" fontName="Helvetica"/>
- <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="Footer" fontName="Helvetica"/>
- <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
- <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
- <paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
- <paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard"/>
+ <paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index"/>
+
+ <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Footer"/>
+ <paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+
+ <paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+
+ <paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
+
+ <paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
+ <paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@@ -144,12 +141,12 @@
<pto_header><!-- Must be after setLang() -->
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
<tr>
- <td> <para style="terp_tblheader_Details">Description</para> </td>
- <td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
- <td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
- <td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
- <td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
- <td> <para style="terp_tblheader_Details_Right">Price</para> </td>
+ <td><para style="terp_tblheader_Details"><b>Description</b></para></td>
+ <td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
+ <td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
+ <td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
+ <td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
+ <td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
</tr>
</blockTable>
</pto_header>
@@ -172,29 +169,29 @@
</td>
</tr>
</blockTable>
- <para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
- <para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
- <para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
- <para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
- <para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
- <para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
- <para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
+ <para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
+ <para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
+ <para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
+ <para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
+ <para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
+ <para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
+ <para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Description</para>
+ <para style="terp_tblheader_General_Centre"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Invoice Date</para>
+ <para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
</td>
- <td>
- <para style="terp_tblheader_General_Centre">Source</para>
+ <td>
+ <para style="terp_tblheader_General_Centre"><b>Source</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Customer Code</para>
+ <para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
</td>
</tr>
</blockTable>
@@ -220,22 +217,22 @@
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
<tr>
<td>
- <para style="terp_tblheader_General">Description</para>
+ <para style="terp_tblheader_General"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Taxes</para>
+ <para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Quantity</para>
+ <para style="terp_tblheader_General_Right"><b>Quantity</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Unit Price</para>
+ <para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Disc.(%)</para>
+ <para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Price</para>
+ <para style="terp_tblheader_General_Right"><b>Price</b></para>
</td>
</tr>
</blockTable>
@@ -298,10 +295,10 @@
</para>
</td>
<td>
- <para style="terp_tblheader_Details">Total:</para>
+ <para style="terp_tblheader_Details"><b>Total:</b></para>
</td>
<td>
- <para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
+ <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
</td>
</tr>
</blockTable>
@@ -311,13 +308,13 @@
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
<tr>
<td>
- <para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
+ <para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Base </para>
+ <para style="terp_tblheader_Details_Right"><b>Base </b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Amount </para>
+ <para style="terp_tblheader_Details_Right"><b>Amount </b></para>
</td>
<td>
<para style="terp_default_8">
@@ -361,7 +358,7 @@
<blockTable colWidths="120.0,410.0" style="Table1">
<tr>
<td>
- <para style="terp_default_Bold_9">Fiscal Position Remark : </para>
+ <para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
</td>
<td>
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
diff --git a/addons/account/res_config.py b/addons/account/res_config.py
index f1f1aee7d41..89d238b16e9 100644
--- a/addons/account/res_config.py
+++ b/addons/account/res_config.py
@@ -338,4 +338,10 @@ class account_config_settings(osv.osv_memory):
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
dp.write({'digits': config.decimal_precision})
+ def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
+ if analytic_accounting:
+ return {'value': {
+ 'module_account_accountant': True,
+ }}
+ return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/res_config_view.xml b/addons/account/res_config_view.xml
index 7977c0fc505..ce8b41fc2da 100644
--- a/addons/account/res_config_view.xml
+++ b/addons/account/res_config_view.xml
@@ -130,7 +130,7 @@
<label for="module_account_accountant"/>
</div>
<div>
- <field name="group_analytic_accounting" class="oe_inline"/>
+ <field name="group_analytic_accounting" class="oe_inline" on_change="onchange_analytic_accounting(group_analytic_accounting, context)"/>
<label for="group_analytic_accounting"/>
</div>
<div>
diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py
index 324248284f1..050191db187 100644
--- a/addons/account/wizard/account_validate_account_move.py
+++ b/addons/account/wizard/account_validate_account_move.py
@@ -57,7 +57,7 @@ class validate_account_move_lines(osv.osv_memory):
move_ids.append(line.move_id.id)
move_ids = list(set(move_ids))
if not move_ids:
- raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
+ raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move entries in draft state.'))
obj_move.button_validate(cr, uid, move_ids, context)
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py
index bd38e6bbed6..4b7e63585d8 100644
--- a/addons/account/wizard/pos_box.py
+++ b/addons/account/wizard/pos_box.py
@@ -22,7 +22,7 @@ class CashBox(osv.osv_memory):
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
- return self._run(cr, uid, ids, records, context=None)
+ return self._run(cr, uid, ids, records, context=context)
def _run(self, cr, uid, ids, records, context=None):
for box in self.browse(cr, uid, ids, context=context):
diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py
index be1e0aac402..b3dd2302a2f 100644
--- a/addons/account_analytic_analysis/account_analytic_analysis.py
+++ b/addons/account_analytic_analysis/account_analytic_analysis.py
@@ -478,7 +478,7 @@ class account_analytic_account(osv.osv):
'remaining_hours': fields.function(_remaining_hours_calc, type='float', string='Remaining Time',
help="Computed using the formula: Maximum Time - Total Worked Time"),
'remaining_hours_to_invoice': fields.function(_remaining_hours_to_invoice_calc, type='float', string='Remaining Time',
- help="Computed using the formula: Maximum Time - Total Invoiced Time"),
+ help="Computed using the formula: Expected on timesheets - Total invoiced on timesheets"),
'fix_price_to_invoice': fields.function(_fix_price_to_invoice_calc, type='float', string='Remaining Time',
help="Sum of quotations for this contract."),
'timesheet_ca_invoiced': fields.function(_timesheet_ca_invoiced_calc, type='float', string='Remaining Time',
@@ -653,7 +653,7 @@ class account_analytic_account(osv.osv):
fpos_obj = self.pool.get('account.fiscal.position')
if not contract.partner_id:
- raise osv.except_osv(_('No Customer Defined !'),_("You must first select a Customer for Contract %s!") % contract.name )
+ raise osv.except_osv(_('No Customer Defined!'),_("You must first select a Customer for Contract %s!") % contract.name )
fpos = contract.partner_id.property_account_position.id or False
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', contract.company_id.id or False)], limit=1)
diff --git a/addons/account_analytic_analysis/i18n/ru.po b/addons/account_analytic_analysis/i18n/ru.po
index 3944c48afb6..339d425c717 100644
--- a/addons/account_analytic_analysis/i18n/ru.po
+++ b/addons/account_analytic_analysis/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2011-02-19 12:16+0000\n"
+"PO-Revision-Date: 2013-05-31 07:35+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:25+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -73,7 +73,7 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "⇒ Invoice"
-msgstr ""
+msgstr "⇒ Счет"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
@@ -196,6 +196,8 @@ msgid ""
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
"'normal','template'])]}"
msgstr ""
+"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
+"'normal','template'])]}"
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin_rate:0
@@ -335,7 +337,7 @@ msgstr "Теоретическая выручка"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "To Renew"
-msgstr ""
+msgstr "К продлению"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -431,7 +433,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,toinvoice_total:0
msgid "Total to Invoice"
-msgstr ""
+msgstr "Всего в счет"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -546,18 +548,18 @@ msgstr "Дата последней операции по этому счету.
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
msgid "sale.config.settings"
-msgstr ""
+msgstr "sale.config.settings"
#. module: account_analytic_analysis
#: field:sale.config.settings,group_template_required:0
msgid "Mandatory use of templates."
-msgstr ""
+msgstr "Обязательное использование шаблонов."
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
msgid "Contract Template"
-msgstr ""
+msgstr "Шаблон контракта"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -612,7 +614,7 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Total"
-msgstr ""
+msgstr "Итого"
#~ msgid "Hours summary by user"
#~ msgstr "Итого часов по пользователям"
diff --git a/addons/account_analytic_default/security/account_analytic_default_security.xml b/addons/account_analytic_default/security/account_analytic_default_security.xml
index 63c6e30eb22..cdce2a9955e 100644
--- a/addons/account_analytic_default/security/account_analytic_default_security.xml
+++ b/addons/account_analytic_default/security/account_analytic_default_security.xml
@@ -4,7 +4,7 @@
<record id="analytic_default_comp_rule" model="ir.rule">
<field name="name">Analytic Default multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_account_analytic_default"/>
+ <field name="model_id" ref="model_account_analytic_default"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py
index 54b15ad565b..4cf12098fff 100644
--- a/addons/account_analytic_plans/account_analytic_plans.py
+++ b/addons/account_analytic_plans/account_analytic_plans.py
@@ -332,7 +332,7 @@ class account_move_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if line.analytics_id:
if not line.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,))
toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context)
if toremove:
@@ -471,7 +471,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytics_id:
if not st.journal_id.analytic_journal_id:
- raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
+ raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,))
if not st_line.amount:
continue
return True
diff --git a/addons/account_analytic_plans/i18n/ru.po b/addons/account_analytic_plans/i18n/ru.po
index ba32246e8d6..29cb3ea910f 100644
--- a/addons/account_analytic_plans/i18n/ru.po
+++ b/addons/account_analytic_plans/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2012-12-28 10:00+0000\n"
+"PO-Revision-Date: 2013-05-31 07:41+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:26+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
@@ -48,7 +48,7 @@ msgstr "Ставка (%)"
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The total should be between %s and %s."
-msgstr ""
+msgstr "Итог должен быть между %s и %s."
#. module: account_analytic_plans
#: view:account.analytic.plan:0
@@ -131,7 +131,7 @@ msgstr "Не показывать пустые строки"
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "There are no analytic lines related to account %s."
-msgstr ""
+msgstr "Нет позиций аналитики относящихся к счету %s."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
@@ -315,7 +315,7 @@ msgstr "Журнал аналитики"
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model."
-msgstr ""
+msgstr "Пожалуйста, введите имя и код перед сохранением модели."
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
@@ -347,7 +347,7 @@ msgstr "Журнал"
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
#, python-format
msgid "You have to define an analytic journal on the '%s' journal."
-msgstr ""
+msgstr "Вы должны определить журнал аналитики для журнала '%s'"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
@@ -375,7 +375,7 @@ msgstr "Позиция счета"
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "There is no analytic plan defined."
-msgstr ""
+msgstr "Аналитический план счетов не определен."
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
@@ -402,7 +402,7 @@ msgstr "Разнесение аналитики"
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model with this name and code already exists."
-msgstr ""
+msgstr "Модель с таким названием и кодом уже существует."
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
diff --git a/addons/account_asset/i18n/ru.po b/addons/account_asset/i18n/ru.po
index a0950a98370..d6bc83aacb5 100644
--- a/addons/account_asset/i18n/ru.po
+++ b/addons/account_asset/i18n/ru.po
@@ -8,14 +8,14 @@ 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-07-12 12:04+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-05-31 08:06+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:50+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: account_asset
#: view:account.asset.asset:0
@@ -148,7 +148,7 @@ msgstr ""
#. module: account_asset
#: help:account.asset.asset,method_period:0
msgid "The amount of time between two depreciations, in months"
-msgstr ""
+msgstr "Количество времени между амортизациями, в месяцах"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciation_date:0
@@ -160,7 +160,7 @@ msgstr "Дата амортизации"
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You cannot create recursive assets."
-msgstr ""
+msgstr "Ошибка! Нельзя создавать рекурсивные активы."
#. module: account_asset
#: field:asset.asset.report,posted_value:0
@@ -205,7 +205,7 @@ msgstr "# позиций амортизации"
#. module: account_asset
#: field:account.asset.asset,method_period:0
msgid "Number of Months in a Period"
-msgstr ""
+msgstr "Количество месяцев в периоде"
#. module: account_asset
#: view:asset.asset.report:0
@@ -234,7 +234,7 @@ msgstr "Счет активов"
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
msgid "Compute Assets"
-msgstr ""
+msgstr "Вычислить активы"
#. module: account_asset
#: field:account.asset.category,method_period:0
@@ -265,12 +265,12 @@ msgstr "Изменить длительность"
#: help:account.asset.category,method_number:0
#: help:account.asset.history,method_number:0
msgid "The number of depreciations needed to depreciate your asset"
-msgstr ""
+msgstr "Количество амортизаций необходимых для обесценивания актива"
#. module: account_asset
#: view:account.asset.category:0
msgid "Analytic Information"
-msgstr ""
+msgstr "Аналитическая информация"
#. module: account_asset
#: field:account.asset.category,account_analytic_id:0
@@ -293,7 +293,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.depreciation.line,remaining_value:0
msgid "Next Period Depreciation"
-msgstr ""
+msgstr "Следующий период амортизации"
#. module: account_asset
#: help:account.asset.history,method_period:0
@@ -344,7 +344,7 @@ msgstr "Поиск категории актива"
#. module: account_asset
#: view:asset.modify:0
msgid "months"
-msgstr ""
+msgstr "месяцы"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice_line
@@ -372,7 +372,7 @@ msgstr ""
#: view:asset.depreciation.confirmation.wizard:0
#: view:asset.modify:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: account_asset
#: field:account.asset.asset,note:0
@@ -406,7 +406,7 @@ msgstr ""
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in running state"
-msgstr ""
+msgstr "Активы в рабочем состоянии"
#. module: account_asset
#: view:account.asset.asset:0
@@ -427,7 +427,7 @@ msgstr ""
#: field:account.asset.asset,state:0
#: field:asset.asset.report,state:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
@@ -474,12 +474,12 @@ msgstr "Вычислить"
#. module: account_asset
#: view:account.asset.history:0
msgid "Asset History"
-msgstr ""
+msgstr "История актива"
#. module: account_asset
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
msgid "asset.depreciation.confirmation.wizard"
-msgstr ""
+msgstr "asset.depreciation.confirmation.wizard"
#. module: account_asset
#: field:account.asset.asset,active:0
@@ -505,7 +505,7 @@ msgstr "История"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid "Compute Asset"
-msgstr ""
+msgstr "Вычислить актив"
#. module: account_asset
#: field:asset.depreciation.confirmation.wizard,period_id:0
@@ -521,7 +521,7 @@ msgstr "Общий"
#: field:account.asset.asset,prorata:0
#: field:account.asset.category,prorata:0
msgid "Prorata Temporis"
-msgstr ""
+msgstr "По истечении срока"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice
@@ -553,7 +553,7 @@ msgstr "Элементы журнала"
#. module: account_asset
#: view:asset.modify:0
msgid "Asset Durations to Modify"
-msgstr ""
+msgstr "Актив - интервал времени для изменения"
#. module: account_asset
#: field:account.asset.asset,purchase_date:0
@@ -574,6 +574,8 @@ msgid ""
"Choose the period for which you want to automatically post the depreciation "
"lines of running assets"
msgstr ""
+"Выберите период, за который вы хотите автоматически создавать записи "
+"амортизации для актива"
#. module: account_asset
#: view:account.asset.asset:0
@@ -588,12 +590,12 @@ msgstr "Метод амортизации"
#. module: account_asset
#: field:account.asset.depreciation.line,amount:0
msgid "Current Depreciation"
-msgstr ""
+msgstr "Текущая аммортизация"
#. module: account_asset
#: field:account.asset.asset,name:0
msgid "Asset Name"
-msgstr ""
+msgstr "Название актива"
#. module: account_asset
#: field:account.asset.category,open_asset:0
@@ -618,7 +620,7 @@ msgstr "Журнал"
#. module: account_asset
#: field:account.asset.history,name:0
msgid "History name"
-msgstr ""
+msgstr "Название истории"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciated_value:0
@@ -657,7 +659,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
msgid "Gross Value"
-msgstr ""
+msgstr "Валовая стоимость"
#. module: account_asset
#: field:account.asset.category,name:0
@@ -703,12 +705,12 @@ msgstr ""
#. module: account_asset
#: field:account.asset.depreciation.line,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Нумерация"
#. module: account_asset
#: help:account.asset.category,method_period:0
msgid "State here the time between 2 depreciations, in months"
-msgstr ""
+msgstr "Время между двумя амортизациями в месяцах"
#. module: account_asset
#: field:account.asset.history,date:0
@@ -729,7 +731,7 @@ msgstr "Число амортизаций"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Create Move"
-msgstr ""
+msgstr "Создать перемещение"
#. module: account_asset
#: view:account.asset.asset:0
diff --git a/addons/account_check_writing/i18n/ru.po b/addons/account_check_writing/i18n/ru.po
index ba474c72a22..8e68dd7152a 100644
--- a/addons/account_check_writing/i18n/ru.po
+++ b/addons/account_check_writing/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-12-11 13:00+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-06-03 07:47+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:51+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: account_check_writing
#: selection:res.company,check_layout:0
@@ -25,13 +25,13 @@ msgstr ""
#. module: account_check_writing
#: report:account.print.check.top:0
msgid "Open Balance"
-msgstr ""
+msgstr "Открытый баланс"
#. module: account_check_writing
#: view:account.check.write:0
#: view:account.voucher:0
msgid "Print Check"
-msgstr ""
+msgstr "Напечатать чек"
#. module: account_check_writing
#: selection:res.company,check_layout:0
@@ -82,7 +82,7 @@ msgstr "Описание"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_journal
msgid "Journal"
-msgstr ""
+msgstr "Журнал"
#. module: account_check_writing
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
@@ -95,14 +95,14 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Discount"
-msgstr ""
+msgstr "Скидка"
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Original Amount"
-msgstr ""
+msgstr "Первоначальная сумма"
#. module: account_check_writing
#: field:res.company,check_layout:0
@@ -119,7 +119,7 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Payment"
-msgstr ""
+msgstr "Платеж"
#. module: account_check_writing
#: field:account.journal,use_preprint_check:0
@@ -153,7 +153,7 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Due Date"
-msgstr ""
+msgstr "Дата исполнения"
#. module: account_check_writing
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
@@ -163,13 +163,13 @@ msgstr ""
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_res_company
msgid "Companies"
-msgstr ""
+msgstr "Компании"
#. module: account_check_writing
#: code:addons/account_check_writing/wizard/account_check_batch_printing.py:59
#, python-format
msgid "Error!"
-msgstr ""
+msgstr "Ошибка!"
#. module: account_check_writing
#: help:account.check.write,check_number:0
@@ -202,12 +202,12 @@ msgstr ""
#. module: account_check_writing
#: view:account.check.write:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: account_check_writing
#: field:account.voucher,amount_in_word:0
msgid "Amount in Word"
-msgstr ""
+msgstr "Сумма прописью"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_check_write
@@ -217,7 +217,7 @@ msgstr ""
#. module: account_check_writing
#: view:account.check.write:0
msgid "Cancel"
-msgstr ""
+msgstr "Отмена"
#. module: account_check_writing
#: field:account.check.write,check_number:0
diff --git a/addons/account_followup/account_followup_customers.xml b/addons/account_followup/account_followup_customers.xml
index 6893abe012e..fba0bce460b 100644
--- a/addons/account_followup/account_followup_customers.xml
+++ b/addons/account_followup/account_followup_customers.xml
@@ -9,11 +9,12 @@
<field name="model">res.partner</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
- <tree string="Customer Followup">
+ <tree string="Customer Followup" create="false" delete="false">
<field name="display_name"/>
<field name="payment_next_action_date"/>
<field name="payment_next_action"/>
<field name="user_id" invisible="1"/>
+ <field name="country_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="payment_responsible_id"/>
<field name="payment_earliest_due_date"/>
@@ -97,7 +98,7 @@
<button name="action_done" type="object" string="⇾ Mark as Done"
help="Click to mark the action as done." class="oe_link"
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
- groups="base.group_partner_manager"/>
+ groups="account.group_account_user"/>
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
</div>
</group>
diff --git a/addons/account_followup/i18n/ru.po b/addons/account_followup/i18n/ru.po
index f6cb2cf0412..b57c8e4315e 100644
--- a/addons/account_followup/i18n/ru.po
+++ b/addons/account_followup/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2011-11-11 15:21+0000\n"
-"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
+"PO-Revision-Date: 2013-05-31 10:28+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: account_followup
#: model:email.template,subject:account_followup.email_template_account_followup_default
@@ -22,7 +22,7 @@ msgstr ""
#: model:email.template,subject:account_followup.email_template_account_followup_level1
#: model:email.template,subject:account_followup.email_template_account_followup_level2
msgid "${user.company_id.name} Payment Reminder"
-msgstr ""
+msgstr "${user.company_id.name} напоминание о платеже"
#. module: account_followup
#: help:res.partner,latest_followup_level_id:0
@@ -43,12 +43,12 @@ msgstr "Дальнейшие действия"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(date)s"
-msgstr ""
+msgstr "%(date)s"
#. module: account_followup
#: field:res.partner,payment_next_action_date:0
msgid "Next Action Date"
-msgstr ""
+msgstr "Дата следующего действия"
#. module: account_followup
#: view:account_followup.followup.line:0
@@ -64,7 +64,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "⇾ Mark as Done"
-msgstr ""
+msgstr "⇾ отметить как сделанное"
#. module: account_followup
#: field:account_followup.followup.line,manual_action_note:0
@@ -94,7 +94,7 @@ msgstr "Тема эл.письма"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(user_signature)s"
-msgstr ""
+msgstr "%(user_signature)s"
#. module: account_followup
#: view:account_followup.followup.line:0
@@ -109,19 +109,19 @@ msgstr ""
#. module: account_followup
#: field:account_followup.print,email_body:0
msgid "Email Body"
-msgstr ""
+msgstr "Тело эл. письма"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
msgid "Send Follow-Ups"
-msgstr ""
+msgstr "Послать напоминания"
#. module: account_followup
#: report:account_followup.followup.print:0
#: code:addons/account_followup/account_followup.py:263
#, python-format
msgid "Amount"
-msgstr ""
+msgstr "Сумма"
#. module: account_followup
#: help:res.partner,payment_next_action:0
@@ -133,7 +133,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "No Responsible"
-msgstr ""
+msgstr "Нет ответственного"
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
@@ -209,17 +209,17 @@ msgstr "Всего по дебету"
#. module: account_followup
#: field:res.partner,payment_next_action:0
msgid "Next Action"
-msgstr ""
+msgstr "Следующее действие"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid ": Partner Name"
-msgstr ""
+msgstr ": Название партнера"
#. module: account_followup
#: field:account_followup.followup.line,manual_action_responsible_id:0
msgid "Assign a Responsible"
-msgstr ""
+msgstr "Назначить ответственного"
#. module: account_followup
#: view:account_followup.followup:0
@@ -305,7 +305,7 @@ msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(partner_name)s"
-msgstr ""
+msgstr "%(partner_name)s"
#. module: account_followup
#: model:email.template,body_html:account_followup.email_template_account_followup_level1
@@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом
#: code:addons/account_followup/wizard/account_followup_print.py:166
#, python-format
msgid " will be sent"
-msgstr ""
+msgstr " будет отправлен"
#. module: account_followup
#: view:account_followup.followup.line:0
@@ -388,7 +388,7 @@ msgstr ""
#: view:account_followup.followup.line:0
#: field:account_followup.followup.line,send_letter:0
msgid "Send a Letter"
-msgstr ""
+msgstr "Отправить письмо"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
@@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение"
#: code:addons/account_followup/wizard/account_followup_print.py:155
#, python-format
msgid "Anybody"
-msgstr ""
+msgstr "Кто угодно"
#. module: account_followup
#: help:account_followup.followup.line,send_email:0
@@ -528,7 +528,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "Search Partner"
-msgstr ""
+msgstr "Поиск партнера"
#. module: account_followup
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
@@ -554,7 +554,7 @@ msgstr ""
#. module: account_followup
#: view:account_followup.print:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: account_followup
#: view:res.partner:0
diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml
index 6fee6a77ac1..b7c38e89f5e 100644
--- a/addons/account_followup/report/account_followup_report.xml
+++ b/addons/account_followup/report/account_followup_report.xml
@@ -6,7 +6,7 @@
<field name="name">account_followup.stat.tree</field>
<field name="model">account_followup.stat</field>
<field name="arch" type="xml">
- <tree string="Follow-up lines">
+ <tree string="Follow-up lines" create="false">
<field name="partner_id"/>
<field name="date_move"/>
<field name="date_move_last"/>
diff --git a/addons/account_followup/security/account_followup_security.xml b/addons/account_followup/security/account_followup_security.xml
index 1586403d701..69c9a44a1b9 100644
--- a/addons/account_followup/security/account_followup_security.xml
+++ b/addons/account_followup/security/account_followup_security.xml
@@ -4,7 +4,7 @@
<record id="account_followup_comp_rule" model="ir.rule">
<field name="name">Account Follow-up multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_account_followup_followup"/>
+ <field name="model_id" ref="model_account_followup_followup"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml
index 4bca00eaa6d..fbe29699e86 100644
--- a/addons/account_payment/security/account_payment_security.xml
+++ b/addons/account_payment/security/account_payment_security.xml
@@ -15,21 +15,21 @@
<record id="payment_mode_comp_rule" model="ir.rule">
<field name="name">Payment Mode company rule</field>
- <field model="ir.model" name="model_id" ref="model_payment_mode"/>
+ <field name="model_id" ref="model_payment_mode"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="payment_order_comp_rule" model="ir.rule">
<field name="name">Payment order multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_payment_order"/>
+ <field name="model_id" ref="model_payment_order"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="payment_line_comp_rule" model="ir.rule">
<field name="name">Payment line multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_payment_line"/>
+ <field name="model_id" ref="model_payment_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index 08d36c45eff..03e25dfbc45 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -23,6 +23,7 @@ import time
from lxml import etree
from openerp.osv import fields, osv
+from openerp.tools.translate import _
class payment_order_create(osv.osv_memory):
"""
@@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory):
context.update({'line_ids': line_ids})
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- return {'name': ('Entrie Lines'),
+ return {'name': _('Entry Lines'),
'context': context,
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/account_test/i18n/ru.po b/addons/account_test/i18n/ru.po
new file mode 100644
index 00000000000..d36d83d2e99
--- /dev/null
+++ b/addons/account_test/i18n/ru.po
@@ -0,0 +1,241 @@
+# 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:05+0000\n"
+"PO-Revision-Date: 2013-06-05 07:09+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-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid ""
+"Code should always set a variable named `result` with the result of your "
+"test, that can be a list or\n"
+"a dictionary. If `result` is an empty list, it means that the test was "
+"succesful. Otherwise it will\n"
+"try to translate and print what is inside `result`.\n"
+"\n"
+"If the result of your test is a dictionary, you can set a variable named "
+"`column_order` to choose in\n"
+"what order you want to print `result`'s content.\n"
+"\n"
+"Should you need them, you can also use the following variables into your "
+"code:\n"
+" * cr: cursor to the database\n"
+" * uid: ID of the current user\n"
+"\n"
+"In any ways, the code must be legal python statements with correct "
+"indentation (if needed).\n"
+"\n"
+"Example: \n"
+" sql = '''SELECT id, name, ref, date\n"
+" FROM account_move_line \n"
+" WHERE account_id IN (SELECT id FROM account_account WHERE type "
+"= 'view')\n"
+" '''\n"
+" cr.execute(sql)\n"
+" result = cr.dictfetchall()"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_02
+msgid "Test 2: Opening a fiscal year"
+msgstr "Проверка 2: Открытие фискального года"
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_05
+msgid ""
+"Check that reconciled invoice for Sales/Purchases has reconciled entries for "
+"Payable and Receivable Accounts"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_03
+msgid ""
+"Check if movement lines are balanced and have the same date and period"
+msgstr ""
+
+#. module: account_test
+#: field:accounting.assert.test,name:0
+msgid "Test Name"
+msgstr ""
+
+#. module: account_test
+#: report:account.test.assert.print:0
+msgid "Accouting tests on"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_01
+msgid "Test 1: General balance"
+msgstr "Проверка 1: Общий баланс"
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_06
+msgid "Check that paid/reconciled invoices are not in 'Open' state"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_05_2
+msgid ""
+"Check that reconciled account moves, that define Payable and Receivable "
+"accounts, are belonging to reconciled invoices"
+msgstr ""
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid "Tests"
+msgstr "Проверки"
+
+#. module: account_test
+#: field:accounting.assert.test,desc:0
+msgid "Test Description"
+msgstr "Описание проверки"
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid "Description"
+msgstr "Описание"
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_06_1
+msgid "Check that there's no move for any account with « View » account type"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_08
+msgid "Test 9 : Accounts and partners on account moves"
+msgstr ""
+
+#. module: account_test
+#: model:ir.actions.act_window,name:account_test.action_accounting_assert
+#: model:ir.actions.report.xml,name:account_test.account_assert_test_report
+#: model:ir.ui.menu,name:account_test.menu_action_license
+msgid "Accounting Tests"
+msgstr ""
+
+#. module: account_test
+#: code:addons/account_test/report/account_test_report.py:74
+#, python-format
+msgid "The test was passed successfully"
+msgstr "Проверка прошла успешно"
+
+#. module: account_test
+#: field:accounting.assert.test,active:0
+msgid "Active"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_06
+msgid "Test 6 : Invoices status"
+msgstr ""
+
+#. module: account_test
+#: model:ir.model,name:account_test.model_accounting_assert_test
+msgid "accounting.assert.test"
+msgstr "accounting.assert.test"
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_05
+msgid ""
+"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices"
+msgstr ""
+
+#. module: account_test
+#: field:accounting.assert.test,code_exec:0
+msgid "Python code"
+msgstr "Код на Python"
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_07
+msgid ""
+"Check on bank statement that the Closing Balance = Starting Balance + sum of "
+"statement lines"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_07
+msgid "Test 8 : Closing balance on bank statements"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_03
+msgid "Test 3: Movement lines"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_05_2
+msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts"
+msgstr ""
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid "Expression"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_04
+msgid "Test 4: Totally reconciled mouvements"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_04
+msgid "Check if the totally reconciled movements are balanced"
+msgstr ""
+
+#. module: account_test
+#: field:accounting.assert.test,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_02
+msgid ""
+"Check if the balance of the new opened fiscal year matches with last year's "
+"balance"
+msgstr ""
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid "Python Code"
+msgstr "Код на Python"
+
+#. module: account_test
+#: model:ir.actions.act_window,help:account_test.action_accounting_assert
+msgid ""
+"<p class=\"oe_view_nocontent_create\">\n"
+" Click to create Accounting Test.\n"
+" </p>\n"
+" "
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_01
+msgid "Check the balance: Debit sum = Credit sum"
+msgstr "Проверяет баланс: сумма дебита = сумма кредита"
+
+#. module: account_test
+#: model:accounting.assert.test,desc:account_test.account_test_08
+msgid "Check that general accounts and partners on account moves are active"
+msgstr ""
+
+#. module: account_test
+#: model:accounting.assert.test,name:account_test.account_test_06_1
+msgid "Test 7: « View  » account type"
+msgstr ""
+
+#. module: account_test
+#: view:accounting.assert.test:0
+msgid "Code Help"
+msgstr ""
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 850162ccf84..81eb76ff3a8 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -1622,7 +1622,7 @@ class account_bank_statement(osv.osv):
for bk_st in self.browse(cr, uid, ids, context=context):
if vals.get('journal_id') and bk_st.line_ids:
if any([x.voucher_id and True or False for x in bk_st.line_ids]):
- raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!'))
+ raise osv.except_osv(_('Unable to Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!'))
return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/account_voucher/html/index.html b/addons/account_voucher/html/index.html
index 581dbb4fb96..d59c110dde5 100644
--- a/addons/account_voucher/html/index.html
+++ b/addons/account_voucher/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
<img src="account_sc_00.png" alt="Online Demo">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -137,4 +136,5 @@ material. Define recurrencies to produce recurring invoice automatically.
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/account_voucher/i18n/ru.po b/addons/account_voucher/i18n/ru.po
index 63cad344ed0..ef38a07e478 100644
--- a/addons/account_voucher/i18n/ru.po
+++ b/addons/account_voucher/i18n/ru.po
@@ -7,24 +7,24 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2012-05-10 17:46+0000\n"
+"PO-Revision-Date: 2013-05-29 13:17+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:33+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-30 05:45+0000\n"
+"X-Generator: Launchpad (build 16652)\n"
#. module: account_voucher
#: field:account.bank.statement.line,voucher_id:0
msgid "Reconciliation"
-msgstr ""
+msgstr "Сверка"
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_config_settings
msgid "account.config.settings"
-msgstr ""
+msgstr "account.config.settings"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:369
@@ -45,7 +45,7 @@ msgstr "Общая сумма"
#. module: account_voucher
#: view:account.voucher:0
msgid "Open Customer Journal Entries"
-msgstr ""
+msgstr "Открыть записи журнала по заказчику"
#. module: account_voucher
#: view:account.voucher:0
@@ -63,7 +63,7 @@ msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "(Update)"
-msgstr ""
+msgstr "(Обновить)"
#. module: account_voucher
#: view:account.voucher:0
@@ -90,7 +90,7 @@ msgstr "Март"
#. module: account_voucher
#: field:account.voucher,message_unread:0
msgid "Unread Messages"
-msgstr ""
+msgstr "Непрочитанные"
#. module: account_voucher
#: view:account.voucher:0
@@ -115,13 +115,13 @@ msgstr "Номер транзакции."
#. module: account_voucher
#: view:sale.receipt.report:0
msgid "Group by year of Invoice Date"
-msgstr ""
+msgstr "Группировать по году в дате счета"
#. module: account_voucher
#: view:sale.receipt.report:0
#: field:sale.receipt.report,user_id:0
msgid "Salesperson"
-msgstr ""
+msgstr "Продавец"
#. module: account_voucher
#: view:account.voucher:0
@@ -135,6 +135,8 @@ msgid ""
"You can not change the journal as you already reconciled some statement "
"lines!"
msgstr ""
+"Вы не можете изменить журнал, так как вы уже сверили некоторые позиции "
+"документа!"
#. module: account_voucher
#: view:account.voucher:0
@@ -145,7 +147,7 @@ msgstr "Утвердить"
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Supplier Payments"
-msgstr ""
+msgstr "Оплаты поставщикам"
#. module: account_voucher
#: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt
@@ -167,7 +169,7 @@ msgstr "Искать ваучеры"
#. module: account_voucher
#: field:account.voucher,writeoff_acc_id:0
msgid "Counterpart Account"
-msgstr ""
+msgstr "Корреспондирующий счет"
#. module: account_voucher
#: field:account.voucher,account_id:0
@@ -189,7 +191,7 @@ msgstr "OK"
#. module: account_voucher
#: field:account.voucher.line,reconcile:0
msgid "Full Reconcile"
-msgstr ""
+msgstr "Полная сверка"
#. module: account_voucher
#: field:account.voucher,date_due:0
@@ -207,7 +209,7 @@ msgstr "Примечания"
#. module: account_voucher
#: field:account.voucher,message_ids:0
msgid "Messages"
-msgstr ""
+msgstr "Сообщения"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt
@@ -225,7 +227,7 @@ msgstr "Элемент журнала"
#: code:addons/account_voucher/account_voucher.py:981
#, python-format
msgid "Error!"
-msgstr ""
+msgstr "Ошибка!"
#. module: account_voucher
#: field:account.voucher.line,amount:0
@@ -235,7 +237,7 @@ msgstr "Суммма"
#. module: account_voucher
#: view:account.voucher:0
msgid "Payment Options"
-msgstr ""
+msgstr "Варианты оплаты"
#. module: account_voucher
#: view:account.voucher:0
@@ -254,6 +256,8 @@ msgstr "Отменено"
msgid ""
"You have to configure account base code and account tax code on the '%s' tax!"
msgstr ""
+"Вы должны настроить код базового счета и код налогового счета для налога "
+"'%s'!"
#. module: account_voucher
#: model:ir.actions.act_window,help:account_voucher.action_sale_receipt
@@ -271,7 +275,7 @@ msgstr ""
#. module: account_voucher
#: help:account.voucher,message_unread:0
msgid "If checked new messages require your attention."
-msgstr ""
+msgstr "Если отмечено, новые сообщения требуют вашего внимания."
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_account_bank_statement_line
@@ -294,12 +298,12 @@ msgstr "Налог"
#: code:addons/account_voucher/account_voucher.py:879
#, python-format
msgid "Invalid Action!"
-msgstr ""
+msgstr "Неверное действие!"
#. module: account_voucher
#: field:account.voucher,comment:0
msgid "Counterpart Comment"
-msgstr ""
+msgstr "Корреспондирующий коментарий"
#. module: account_voucher
#: field:account.voucher.line,account_analytic_id:0
@@ -312,6 +316,8 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
+"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате "
+"html для возможности использования в канбан виде"
#. module: account_voucher
#: view:account.voucher:0
@@ -326,7 +332,7 @@ msgstr "Информация о платеже"
#. module: account_voucher
#: view:account.voucher:0
msgid "(update)"
-msgstr ""
+msgstr "(обновить)"
#. module: account_voucher
#: view:account.voucher:0
@@ -395,7 +401,7 @@ msgstr "Ваучер поставщика"
#. module: account_voucher
#: field:account.voucher,message_follower_ids:0
msgid "Followers"
-msgstr ""
+msgstr "Подписчики"
#. module: account_voucher
#: selection:account.voucher.line,type:0
@@ -406,7 +412,7 @@ msgstr "Дебет"
#: code:addons/account_voucher/account_voucher.py:1547
#, python-format
msgid "Unable to change journal !"
-msgstr ""
+msgstr "Невозможно изменить журнал!"
#. module: account_voucher
#: view:sale.receipt.report:0
@@ -446,7 +452,7 @@ msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "Open Supplier Journal Entries"
-msgstr ""
+msgstr "Открыть журнал проводок по поставщику"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list
@@ -461,7 +467,7 @@ msgstr "Памятка"
#. module: account_voucher
#: view:account.voucher:0
msgid "Are you sure to unreconcile and cancel this record ?"
-msgstr ""
+msgstr "Вы уверены, что надо отменить сверку и саму запись ?"
#. module: account_voucher
#: field:account.voucher,is_multi_currency:0
@@ -494,13 +500,13 @@ msgstr ""
#. module: account_voucher
#: field:account.voucher,writeoff_amount:0
msgid "Difference Amount"
-msgstr ""
+msgstr "Сумма разницы"
#. module: account_voucher
#: view:sale.receipt.report:0
#: field:sale.receipt.report,due_delay:0
msgid "Avg. Due Delay"
-msgstr ""
+msgstr "Средн. задержка"
#. module: account_voucher
#: code:addons/account_voucher/invoice.py:34
@@ -554,7 +560,7 @@ msgstr "Оплаченная сумма"
#. module: account_voucher
#: field:account.voucher,payment_option:0
msgid "Payment Difference"
-msgstr ""
+msgstr "Оплата разницы"
#. module: account_voucher
#: view:account.voucher:0
@@ -568,7 +574,7 @@ msgstr "Для проверки"
#: code:addons/account_voucher/account_voucher.py:1194
#, python-format
msgid "change"
-msgstr ""
+msgstr "изменить"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:1014
@@ -599,7 +605,7 @@ msgstr ""
#. module: account_voucher
#: view:account.invoice:0
msgid "Register Payment"
-msgstr ""
+msgstr "Регистрация оплаты"
#. module: account_voucher
#: field:account.statement.from.invoice.lines,line_ids:0
@@ -614,7 +620,7 @@ msgstr "декабрём"
#. module: account_voucher
#: view:sale.receipt.report:0
msgid "Group by month of Invoice Date"
-msgstr ""
+msgstr "Группировать по месяцу даты счета"
#. module: account_voucher
#: view:sale.receipt.report:0
@@ -647,7 +653,7 @@ msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "Are you sure to unreconcile this record?"
-msgstr ""
+msgstr "Вы уверены в отмене сверки"
#. module: account_voucher
#: field:account.voucher,company_id:0
@@ -665,13 +671,13 @@ msgstr ""
#. module: account_voucher
#: selection:account.voucher,payment_option:0
msgid "Reconcile Payment Balance"
-msgstr ""
+msgstr "Сверка платежного баланса"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:975
#, python-format
msgid "Configuration Error !"
-msgstr ""
+msgstr "Ошибка конфигурации !"
#. module: account_voucher
#: view:account.voucher:0
@@ -695,18 +701,18 @@ msgstr ""
#: field:account.voucher,state:0
#: view:sale.receipt.report:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: account_voucher
#: view:account.voucher:0
msgid "Allocation"
-msgstr ""
+msgstr "Распределение"
#. module: account_voucher
#: view:account.statement.from.invoice.lines:0
#: view:account.voucher:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@@ -716,7 +722,7 @@ msgstr "Август"
#. module: account_voucher
#: view:account.voucher:0
msgid "Validate Payment"
-msgstr ""
+msgstr "Утвердить оплату"
#. module: account_voucher
#: help:account.voucher,audit:0
@@ -724,6 +730,8 @@ msgid ""
"Check this box if you are unsure of that journal entry and if you want to "
"note it as 'to be reviewed' by an accounting expert."
msgstr ""
+"Отметьте, если вы не уверены в этой проводке журнала и хотите отметить её "
+"\"для проверки\" опытному бухгалтеру."
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@@ -734,7 +742,7 @@ msgstr "Октябрь"
#: code:addons/account_voucher/account_voucher.py:976
#, python-format
msgid "Please activate the sequence of selected journal !"
-msgstr ""
+msgstr "Пожалуйста, включите нумерацию выбранного журнала!"
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@@ -749,7 +757,7 @@ msgstr ""
#. module: account_voucher
#: field:account.voucher,paid:0
msgid "Paid"
-msgstr ""
+msgstr "Оплачено"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt
@@ -760,7 +768,7 @@ msgstr ""
#. module: account_voucher
#: field:account.voucher,message_is_follower:0
msgid "Is a Follower"
-msgstr ""
+msgstr "Подписан"
#. module: account_voucher
#: field:account.voucher,analytic_id:0
@@ -787,7 +795,7 @@ msgstr "Расширенные фильтры..."
#. module: account_voucher
#: field:account.voucher,paid_amount_in_company_currency:0
msgid "Paid Amount in Company Currency"
-msgstr ""
+msgstr "Оплаченная сумма в валюте компании"
#. module: account_voucher
#: field:account.bank.statement.line,amount_reconciled:0
@@ -814,7 +822,7 @@ msgstr "Предыдущие платежи ?"
#: code:addons/account_voucher/account_voucher.py:1112
#, python-format
msgid "The invoice you are willing to pay is not valid anymore."
-msgstr ""
+msgstr "Счет, который вы готовы платить, уже не актуален ."
#. module: account_voucher
#: selection:sale.receipt.report,month:0
@@ -830,30 +838,30 @@ msgstr "Журнал ваучеров"
#. module: account_voucher
#: model:ir.model,name:account_voucher.model_res_company
msgid "Companies"
-msgstr ""
+msgstr "Компании"
#. module: account_voucher
#: field:account.voucher,message_summary:0
msgid "Summary"
-msgstr ""
+msgstr "Итог"
#. module: account_voucher
#: field:account.voucher,active:0
msgid "Active"
-msgstr ""
+msgstr "Активно"
#. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:982
#, python-format
msgid "Please define a sequence on the journal."
-msgstr ""
+msgstr "Пожалуйста, определите нумерацию журнала."
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.act_pay_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_receipt
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_receipt
msgid "Customer Payments"
-msgstr ""
+msgstr "Платежи клиентов"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt_report_all
@@ -865,7 +873,7 @@ msgstr ""
#. module: account_voucher
#: view:sale.receipt.report:0
msgid "Group by Invoice Date"
-msgstr ""
+msgstr "Группировать по дате счета"
#. module: account_voucher
#: view:account.voucher:0
diff --git a/addons/account_voucher/security/account_voucher_security.xml b/addons/account_voucher/security/account_voucher_security.xml
index 04540fd8aa0..daa5934b256 100644
--- a/addons/account_voucher/security/account_voucher_security.xml
+++ b/addons/account_voucher/security/account_voucher_security.xml
@@ -3,13 +3,13 @@
<data noupdate="1">
<record id="voucher_comp_rule" model="ir.rule">
<field name="name">Voucher multi-company</field>
- <field model="ir.model" name="model_id" ref="model_account_voucher"/>
+ <field name="model_id" ref="model_account_voucher"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="voucher_line_comp_rule" model="ir.rule">
<field name="name">Voucher Line multi-company</field>
- <field model="ir.model" name="model_id" ref="model_account_voucher_line"/>
+ <field name="model_id" ref="model_account_voucher_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index ac298713b04..ce79c4d5ffb 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -157,7 +157,7 @@ class account_analytic_account(osv.osv):
for account in self.browse(cr, uid, ids, context=context):
if account.company_id:
if account.company_id.currency_id.id != value:
- raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example."))
+ raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really useful for consolidation purposes of several companies charts with different currencies, for example."))
if value:
return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, ))
diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml
index 70688275de2..bf103ca8988 100644
--- a/addons/analytic/security/analytic_security.xml
+++ b/addons/analytic/security/analytic_security.xml
@@ -4,14 +4,14 @@
<record id="analytic_comp_rule" model="ir.rule">
<field name="name">Analytic multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_account_analytic_account"/>
+ <field name="model_id" ref="model_account_analytic_account"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="analytic_line_comp_rule" model="ir.rule">
<field name="name">Analytic line multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_account_analytic_line"/>
+ <field name="model_id" ref="model_account_analytic_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index 0573292c1f6..1adefb2d59d 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -104,7 +104,7 @@ class hr_analytic_timesheet(osv.osv):
a = r.product_id.categ_id.property_account_expense_categ.id
if not a:
raise osv.except_osv(_('Error!'),
- _('There is no expense account define ' \
+ _('There is no expense account defined ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
@@ -133,7 +133,7 @@ class hr_analytic_timesheet(osv.osv):
a = r.product_id.categ_id.property_account_expense_categ.id
if not a:
raise osv.except_osv(_('Error!'),
- _('There is no expense account define ' \
+ _('There is no expense account defined ' \
'for this product: "%s" (id:%d)') % \
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py
index 0477efa5b1f..c82afde103f 100644
--- a/addons/anonymization/anonymization.py
+++ b/addons/anonymization/anonymization.py
@@ -86,11 +86,11 @@ class ir_model_fields_anonymization(osv.osv):
if context.get('manual'):
global_state = self._get_global_state(cr, uid, context=context)
if global_state == 'anonymized':
- raise osv.except_osv('Error !', "The database is currently anonymized, you cannot create, modify or delete fields.")
+ raise osv.except_osv('Error!', "The database is currently anonymized, you cannot create, modify or delete fields.")
elif global_state == 'unstable':
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
return True
@@ -357,7 +357,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
else:
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to do anything else.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
res['arch'] = etree.tostring(eview)
@@ -521,11 +521,11 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# check that all the defined fields are in the 'anonymized' state
state = ir_model_fields_anonymization_model._get_global_state(cr, uid, context=context)
if state == 'clear':
- raise osv.except_osv_('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.")
+ raise osv.except_osv_('Error!', "The database is not currently anonymized, you cannot reverse the anonymization.")
elif state == 'unstable':
msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to do anything.")
- raise osv.except_osv('Error !', msg)
+ raise osv.except_osv('Error!', msg)
wizards = self.browse(cr, uid, ids, context=context)
for wizard in wizards:
diff --git a/addons/auth_openid/i18n/ru.po b/addons/auth_openid/i18n/ru.po
index 6041300fe60..68b36626056 100644
--- a/addons/auth_openid/i18n/ru.po
+++ b/addons/auth_openid/i18n/ru.po
@@ -8,21 +8,21 @@ 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-03-23 11:37+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-05-28 06:19+0000\n"
+"Last-Translator: Глория Хрусталёва <gloriya@hushmail.com>\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-03-24 04:45+0000\n"
-"X-Generator: Launchpad (build 16540)\n"
+"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
#. module: auth_openid
#. openerp-web
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:24
#, python-format
msgid "Username"
-msgstr ""
+msgstr "Имя пользователя"
#. module: auth_openid
#. openerp-web
@@ -30,7 +30,7 @@ msgstr ""
#: view:res.users:0
#, python-format
msgid "OpenID"
-msgstr ""
+msgstr "OpenID"
#. module: auth_openid
#. openerp-web
@@ -46,14 +46,14 @@ msgstr ""
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:10
#, python-format
msgid "Google"
-msgstr ""
+msgstr "Google"
#. module: auth_openid
#. openerp-web
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:11
#, python-format
msgid "Launchpad"
-msgstr ""
+msgstr "Launchpad"
#. module: auth_openid
#: help:res.users,openid_email:0
@@ -82,7 +82,7 @@ msgstr ""
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:8
#, python-format
msgid "Password"
-msgstr ""
+msgstr "Пароль"
#. module: auth_openid
#. openerp-web
@@ -94,4 +94,4 @@ msgstr ""
#. module: auth_openid
#: model:ir.model,name:auth_openid.model_res_users
msgid "Users"
-msgstr ""
+msgstr "Пользователи"
diff --git a/addons/auth_signup/i18n/ru.po b/addons/auth_signup/i18n/ru.po
index bddc6cde1ba..639a1e9bc3c 100644
--- a/addons/auth_signup/i18n/ru.po
+++ b/addons/auth_signup/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-12-11 06:59+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-05-27 12:12+0000\n"
+"Last-Translator: Глория Хрусталёва <gloriya@hushmail.com>\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-03-16 05:52+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-28 05:17+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
#. module: auth_signup
#: field:res.partner,signup_type:0
@@ -25,25 +25,25 @@ msgstr ""
#. module: auth_signup
#: field:base.config.settings,auth_signup_uninvited:0
msgid "Allow external users to sign up"
-msgstr ""
+msgstr "Разрешить регистрацию внешним пользователям"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:16
#, python-format
msgid "Confirm Password"
-msgstr ""
+msgstr "Подтвердите пароль"
#. module: auth_signup
#: help:base.config.settings,auth_signup_uninvited:0
msgid "If unchecked, only invited users may sign up."
msgstr ""
-"Если отмечено, только приглашенные пользователи могут зарегистрироваться"
+"Если не отмечено, только приглашенные пользователи могут зарегистрироваться"
#. module: auth_signup
#: model:ir.model,name:auth_signup.model_base_config_settings
msgid "base.config.settings"
-msgstr ""
+msgstr "base.config.settings"
#. module: auth_signup
#: code:addons/auth_signup/res_users.py:265
@@ -57,17 +57,17 @@ msgstr "Невозможно отправить письмо: у пользовÐ
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:28
#, python-format
msgid "Reset password"
-msgstr ""
+msgstr "Сброс пароля"
#. module: auth_signup
#: field:base.config.settings,auth_signup_template_user_id:0
msgid "Template user for new users created through signup"
-msgstr ""
+msgstr "Шаблон новых пользователей, созданных в процессе регистрации"
#. module: auth_signup
#: model:email.template,subject:auth_signup.reset_password_email
msgid "Password reset"
-msgstr ""
+msgstr "Сброс пароля"
#. module: auth_signup
#. openerp-web
@@ -88,12 +88,12 @@ msgstr ""
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:26
#, python-format
msgid "Sign Up"
-msgstr ""
+msgstr "Регистрация"
#. module: auth_signup
#: selection:res.users,state:0
msgid "New"
-msgstr ""
+msgstr "Новый"
#. module: auth_signup
#: code:addons/auth_signup/res_users.py:258
@@ -104,7 +104,7 @@ msgstr ""
#. module: auth_signup
#: field:res.users,state:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: auth_signup
#: model:email.template,body_html:auth_signup.reset_password_email
@@ -118,18 +118,27 @@ msgid ""
"\n"
"<p>Note: If you do not expect this, you can safely ignore this email.</p>"
msgstr ""
+"\n"
+"<p>Был запрошен сброс пароля для аккаунта OpenERP связанного с этим адресом "
+"эл.почты</p>\n"
+"\n"
+"<p>Вы можете сменить пароль, проследовав по <a "
+"href=\"${object.signup_url}\">ссылке</a>.</p>\n"
+"\n"
+"<p>Примечание: если вы не запрашивали сброс пароля, просто проигнорируйте "
+"данное письмо</p>"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/js/auth_signup.js:111
#, python-format
msgid "Please enter a name."
-msgstr ""
+msgstr "Пожалуйста, введите имя"
#. module: auth_signup
#: model:ir.model,name:auth_signup.model_res_users
msgid "Users"
-msgstr ""
+msgstr "Пользователи"
#. module: auth_signup
#: field:res.partner,signup_url:0
@@ -146,7 +155,7 @@ msgstr "Пожалуйста, введите имя пользователя."
#. module: auth_signup
#: selection:res.users,state:0
msgid "Active"
-msgstr ""
+msgstr "Активен"
#. module: auth_signup
#: code:addons/auth_signup/res_users.py:269
@@ -155,39 +164,41 @@ msgid ""
"Cannot send email: no outgoing email server configured.\n"
"You can configure it under Settings/General Settings."
msgstr ""
+"Невозможно отправить email: не настроены сервера исходящей почты.\n"
+"Вы можете настроить их в меню Настройки/Общие настройки"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:12
#, python-format
msgid "Username"
-msgstr ""
+msgstr "Имя пользователя"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:8
#, python-format
msgid "Name"
-msgstr ""
+msgstr "Имя"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
#, python-format
msgid "Please enter a username or email address."
-msgstr ""
+msgstr "Пожалуйста, введите имя пользователя или адрес эл. почты."
#. module: auth_signup
#: selection:res.users,state:0
msgid "Resetting Password"
-msgstr ""
+msgstr "Переустановка пароля"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:13
#, python-format
msgid "Username (Email)"
-msgstr ""
+msgstr "Имя пользователя (Email)"
#. module: auth_signup
#: field:res.partner,signup_expiration:0
@@ -198,13 +209,15 @@ msgstr ""
#: help:base.config.settings,auth_signup_reset_password:0
msgid "This allows users to trigger a password reset from the Login page."
msgstr ""
+"Это позволяет пользователям запросить сброс пароля со страницы входа в "
+"систему."
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22
#, python-format
msgid "Log in"
-msgstr ""
+msgstr "Вход"
#. module: auth_signup
#: field:res.partner,signup_valid:0
@@ -222,7 +235,7 @@ msgstr ""
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
#, python-format
msgid "Login"
-msgstr ""
+msgstr "Вход"
#. module: auth_signup
#. openerp-web
@@ -236,7 +249,7 @@ msgstr ""
#: code:addons/auth_signup/static/src/js/auth_signup.js:120
#, python-format
msgid "Passwords do not match; please retype them."
-msgstr ""
+msgstr "Пароли не совпадают; пожалуйста, введите их заново."
#. module: auth_signup
#. openerp-web
@@ -244,7 +257,7 @@ msgstr ""
#: code:addons/auth_signup/static/src/js/auth_signup.js:167
#, python-format
msgid "No database selected !"
-msgstr ""
+msgstr "Не выбрана база данных!"
#. module: auth_signup
#: view:res.users:0
@@ -254,14 +267,14 @@ msgstr ""
#. module: auth_signup
#: field:base.config.settings,auth_signup_reset_password:0
msgid "Enable password reset from Login page"
-msgstr ""
+msgstr "Включить сброс пароля со страницы входа"
#. module: auth_signup
#. openerp-web
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:27
#, python-format
msgid "Back to Login"
-msgstr ""
+msgstr "Вернуться к странице входа"
#. module: auth_signup
#. openerp-web
@@ -273,7 +286,7 @@ msgstr ""
#. module: auth_signup
#: model:ir.model,name:auth_signup.model_res_partner
msgid "Partner"
-msgstr ""
+msgstr "Партнер"
#. module: auth_signup
#: field:res.partner,signup_token:0
diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py
index f4a985280ac..891837f8813 100644
--- a/addons/auth_signup/res_users.py
+++ b/addons/auth_signup/res_users.py
@@ -23,6 +23,7 @@ import random
from urllib import urlencode
from urlparse import urljoin
+from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
from openerp.osv import osv, fields
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.safe_eval import safe_eval
@@ -55,19 +56,22 @@ class res_partner(osv.Model):
def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None):
""" generate a signup url for the given partner ids and action, possibly overriding
the url state components (menu_id, id, view_type) """
+ if context is None:
+ context= {}
res = dict.fromkeys(ids, False)
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
for partner in self.browse(cr, uid, ids, context):
# when required, make sure the partner has a valid signup token
- if context and context.get('signup_valid') and not partner.user_ids:
+ if context.get('signup_valid') and not partner.user_ids:
self.signup_prepare(cr, uid, [partner.id], context=context)
partner.refresh()
# the parameters to encode for the query and fragment part of url
query = {'db': cr.dbname}
- fragment = {'action': action, 'type': partner.signup_type}
+ signup_type = context.get('signup_force_type_in_url', partner.signup_type or '')
+ fragment = {'action': action, 'type': signup_type}
- if partner.signup_token:
+ if partner.signup_token and signup_type:
fragment['token'] = partner.signup_token
elif partner.user_ids:
fragment['db'] = cr.dbname
@@ -103,6 +107,9 @@ class res_partner(osv.Model):
def action_signup_prepare(self, cr, uid, ids, context=None):
return self.signup_prepare(cr, uid, ids, context=context)
+ def signup_cancel(self, cr, uid, ids, context=None):
+ return self.write(cr, uid, ids, {'signup_token': False, 'signup_type': False, 'signup_expiration': False}, context=context)
+
def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None):
""" generate a new token for the partners with the given validity, if necessary
:param expiration: the expiration datetime of the token (string, optional)
@@ -202,7 +209,7 @@ class res_users(osv.Model):
})
if partner.company_id:
values['company_id'] = partner.company_id.id
- values['company_ids'] = [(6,0,[partner.company_id.id])]
+ values['company_ids'] = [(6, 0, [partner.company_id.id])]
self._signup_create_user(cr, uid, values, context=context)
else:
# no token, sign up an external user
@@ -259,25 +266,26 @@ class res_users(osv.Model):
pass
if not bool(template):
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email')
- mail_obj = self.pool.get('mail.mail')
assert template._name == 'email.template'
for user in self.browse(cr, uid, ids, context):
if not user.email:
raise osv.except_osv(_("Cannot send email: user has no email address."), user.name)
- mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, True, context=context)
- mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context)
-
- if mail_state and mail_state['state'] == 'exception':
- raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context)
- else:
- return True
+ try:
+ self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, force_send=True, raise_exception=True, context=context)
+ except Exception:
+ raise
def create(self, cr, uid, values, context=None):
+ if context is None:
+ context = {}
# overridden to automatically invite user to sign up
user_id = super(res_users, self).create(cr, uid, values, context=context)
user = self.browse(cr, uid, user_id, context=context)
- if context and context.get('reset_password') and user.email:
- ctx = dict(context, create_user=True)
- self.action_reset_password(cr, uid, [user.id], context=ctx)
+ if user.email and not context.get('no_reset_password'):
+ context.update({'create_user': True})
+ try:
+ self.action_reset_password(cr, uid, [user.id], context=context)
+ except MailDeliveryException:
+ self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
return user_id
diff --git a/addons/auth_signup/res_users_view.xml b/addons/auth_signup/res_users_view.xml
index 28f66eb101d..60c419db737 100644
--- a/addons/auth_signup/res_users_view.xml
+++ b/addons/auth_signup/res_users_view.xml
@@ -31,9 +31,11 @@
<!-- add Reset Password button -->
<xpath expr="//div[@class='oe_right oe_button_box']//button" position="replace">
<button string="Send Reset Password Instructions"
+ class="oe_link"
type="object" name="action_reset_password"
attrs="{'invisible': [('state', '!=', 'active')]}"/>
<button string="Send an Invitation Email"
+ class="oe_link"
type="object" name="action_reset_password" context="{'create_user': 1}"
attrs="{'invisible': [('state', '!=', 'new')]}"/>
</xpath>
diff --git a/addons/auth_signup/static/src/js/auth_signup.js b/addons/auth_signup/static/src/js/auth_signup.js
index 545ee6cf60e..b825d683099 100644
--- a/addons/auth_signup/static/src/js/auth_signup.js
+++ b/addons/auth_signup/static/src/js/auth_signup.js
@@ -7,7 +7,7 @@ openerp.auth_signup = function(instance) {
var self = this;
this.signup_enabled = false;
this.reset_password_enabled = false;
- return this._super().then(function() {
+ return this._super().always(function() {
// Switches the login box to the select mode whith mode == [default|signup|reset]
self.on('change:login_mode', self, function() {
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 9d7d4d34ac4..3497255fa76 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -50,6 +50,7 @@ class base_action_rule(osv.osv):
_name = 'base.action.rule'
_description = 'Action Rules'
+ _order = 'sequence'
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
@@ -61,7 +62,11 @@ class base_action_rule(osv.osv):
help="When unchecked, the rule is hidden and will not be executed."),
'sequence': fields.integer('Sequence',
help="Gives the sequence order when displaying a list of rules."),
+ 'kind': fields.selection(
+ [('on_create', 'On Creation'), ('on_write', 'On Update'), ('on_time', 'Based on Timed Condition')],
+ string='When to Run'),
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
+ help="When should the condition be triggered. If present, will be checked by the scheduler. If empty, will be checked at creation and update.",
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
'trg_date_range': fields.integer('Delay after trigger date',
help="Delay after the trigger date." \
@@ -78,10 +83,10 @@ class base_action_rule(osv.osv):
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
help="If present, this condition must be satisfied before the update of the record."),
- 'filter_id': fields.many2one('ir.filters', string='After Update Filter',
+ 'filter_id': fields.many2one('ir.filters', string='Filter',
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
- help="If present, this condition must be satisfied after the update of the record."),
+ help="If present, this condition must be satisfied before executing the action rule."),
'last_run': fields.datetime('Last Run', readonly=1),
}
@@ -90,7 +95,15 @@ class base_action_rule(osv.osv):
'trg_date_range_type': 'day',
}
- _order = 'sequence'
+ def onchange_kind(self, cr, uid, ids, kind, context=None):
+ clear_fields = []
+ if kind == 'on_create':
+ clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
+ elif kind == 'on_write':
+ clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
+ elif kind == 'on_time':
+ clear_fields = ['filter_pre_id']
+ return {'value': dict.fromkeys(clear_fields, False)}
def _filter(self, cr, uid, action, action_filter, record_ids, context=None):
""" filter the list record_ids that satisfy the action filter """
@@ -105,14 +118,7 @@ class base_action_rule(osv.osv):
def _process(self, cr, uid, action, record_ids, context=None):
""" process the given action on the records """
- # execute server actions
model = self.pool[action.model_id.model]
- if action.server_action_ids:
- server_action_ids = map(int, action.server_action_ids)
- for record in model.browse(cr, uid, record_ids, context):
- action_server_obj = self.pool.get('ir.actions.server')
- ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
- action_server_obj.run(cr, uid, server_action_ids, context=ctx)
# modify records
values = {}
@@ -127,13 +133,21 @@ class base_action_rule(osv.osv):
follower_ids = map(int, action.act_followers)
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
+ # execute server actions
+ if action.server_action_ids:
+ server_action_ids = map(int, action.server_action_ids)
+ for record in model.browse(cr, uid, record_ids, context):
+ action_server_obj = self.pool.get('ir.actions.server')
+ ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
+ action_server_obj.run(cr, uid, server_action_ids, context=ctx)
+
return True
def _wrap_create(self, old_create, model):
""" Return a wrapper around `old_create` calling both `old_create` and
`_process`, in that order.
"""
- def wrapper(cr, uid, vals, context=None):
+ def create(cr, uid, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_create(cr, uid, vals, context=context)
@@ -141,8 +155,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
new_id = old_create(cr, uid, vals, context=context)
- # as it is a new record, we do not consider the actions that have a prefilter
- action_dom = [('model', '=', model), ('trg_date_id', '=', False), ('filter_pre_id', '=', False)]
+ # retrieve the action rules to run on creation
+ action_dom = [('model', '=', model), ('kind', '=', 'on_create')]
action_ids = self.search(cr, uid, action_dom, context=context)
# check postconditions, and execute actions on the records that satisfy them
@@ -151,13 +165,13 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, [new_id], context=context)
return new_id
- return wrapper
+ return create
def _wrap_write(self, old_write, model):
""" Return a wrapper around `old_write` calling both `old_write` and
`_process`, in that order.
"""
- def wrapper(cr, uid, ids, vals, context=None):
+ def write(cr, uid, ids, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_write(cr, uid, ids, vals, context=context)
@@ -165,8 +179,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
ids = [ids] if isinstance(ids, (int, long, str)) else ids
- # retrieve the action rules to possibly execute
- action_dom = [('model', '=', model), ('trg_date_id', '=', False)]
+ # retrieve the action rules to run on update
+ action_dom = [('model', '=', model), ('kind', '=', 'on_write')]
action_ids = self.search(cr, uid, action_dom, context=context)
actions = self.browse(cr, uid, action_ids, context=context)
@@ -185,7 +199,7 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, post_ids, context=context)
return True
- return wrapper
+ return write
def _register_hook(self, cr, ids=None):
""" Wrap the methods `create` and `write` of the models specified by
@@ -224,8 +238,8 @@ class base_action_rule(osv.osv):
def _check(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
""" This Function is called by scheduler. """
context = context or {}
- # retrieve all the action rules that have a trg_date_id and no precondition
- action_dom = [('trg_date_id', '!=', False), ('filter_pre_id', '=', False)]
+ # retrieve all the action rules to run based on a timed condition
+ action_dom = [('kind', '=', 'on_time')]
action_ids = self.search(cr, uid, action_dom, context=context)
for action in self.browse(cr, uid, action_ids, context=context):
now = datetime.now()
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 5eaaf08dad4..c2262adde39 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -26,24 +26,32 @@
<notebook>
<page string="Conditions">
<group>
- <group name="filter" string="Filter Condition">
- <field name="filter_pre_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
- <field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
- </group>
- <group name="timing" string="Timer">
- <field name="trg_date_id"/>
- <label for="trg_date_range" string="Delay After Trigger Date" attrs="{'invisible': [('trg_date_id','=',False)]}"/>
- <div attrs="{'invisible': [('trg_date_id','=',False)]}">
- <field name="trg_date_range" class="oe_inline"/>
- <field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
- </div>
- </group>
+ <field name="kind" required="1"
+ on_change="onchange_kind(kind)"/>
+ <field name="filter_pre_id"
+ domain="[('model_id','=',model), ('user_id', '=', False)]"
+ context="{'default_model_id': model}"
+ attrs="{'invisible': [('kind', '!=', 'on_write')]}"/>
+ <field name="filter_id"
+ domain="[('model_id','=',model), ('user_id', '=', False)]"
+ context="{'default_model_id': model}"/>
+ <field name="trg_date_id"
+ attrs="{'invisible': [('kind', '!=', 'on_time')], 'required': [('kind', '=', 'on_time')]}"/>
+ <label for="trg_date_range" string="Delay After Trigger Date"
+ attrs="{'invisible': [('trg_date_id','=',False)]}"/>
+ <div attrs="{'invisible': [('trg_date_id','=',False)]}">
+ <field name="trg_date_range" class="oe_inline"/>
+ <field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
+ </div>
</group>
- <p class="oe_grey">
- <b>Select a filter or a timer as condition.</b><br/> An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.<br/>
- <b>To create a new filter:</b><br/>
- - Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)<br/>
- - In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"<br/>
+ <p>
+ Select when the action must be run, and add filters and/or timing conditions.
+ <br/>
+ In order to create a new filter:
+ <ul>
+ <li>Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)</li>
+ <li>In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"</li>
+ </ul>
The filter must therefore be available in this page.
</p>
</page>
@@ -76,6 +84,7 @@
<tree string="Action Rule">
<field name="sequence"/>
<field name="name"/>
+ <field name="kind"/>
<field name="filter_id"/>
</tree>
</field>
diff --git a/addons/base_action_rule/i18n/ru.po b/addons/base_action_rule/i18n/ru.po
index c8673c26815..3ca5b1eab04 100644
--- a/addons/base_action_rule/i18n/ru.po
+++ b/addons/base_action_rule/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-05-10 18:17+0000\n"
-"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
+"PO-Revision-Date: 2013-05-31 10:23+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:46+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: base_action_rule
#: selection:base.action.rule.lead.test,state:0
@@ -58,7 +58,7 @@ msgstr "Добавить подписчиков"
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible"
-msgstr ""
+msgstr "Указать ответственного"
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
@@ -71,7 +71,7 @@ msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule_lead_test
msgid "base.action.rule.lead.test"
-msgstr ""
+msgstr "base.action.rule.lead.test"
#. module: base_action_rule
#: selection:base.action.rule.lead.test,state:0
@@ -142,7 +142,7 @@ msgstr "Часы"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "To create a new filter:"
-msgstr ""
+msgstr "Для создания нового фильтра:"
#. module: base_action_rule
#: field:base.action.rule,active:0
@@ -167,7 +167,7 @@ msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Filter Condition"
-msgstr ""
+msgstr "Условие фильтра"
#. module: base_action_rule
#: view:base.action.rule:0
@@ -216,7 +216,7 @@ msgstr "Тип задержки"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server actions to run"
-msgstr ""
+msgstr "Действия сервера для запуска"
#. module: base_action_rule
#: help:base.action.rule,active:0
@@ -246,7 +246,7 @@ msgstr "Минуты"
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Related Document Model"
-msgstr ""
+msgstr "Модель связанного документа"
#. module: base_action_rule
#: help:base.action.rule,filter_pre_id:0
@@ -310,7 +310,7 @@ msgstr "Действия сервера"
#. module: base_action_rule
#: field:base.action.rule.lead.test,name:0
msgid "Subject"
-msgstr ""
+msgstr "Тема"
#~ msgid "Set State to"
#~ msgstr "Уснатовить состояние в"
diff --git a/addons/base_action_rule/tests/base_action_rule_test.py b/addons/base_action_rule/tests/base_action_rule_test.py
index 36c928a84e3..54c72ba0607 100644
--- a/addons/base_action_rule/tests/base_action_rule_test.py
+++ b/addons/base_action_rule/tests/base_action_rule_test.py
@@ -19,8 +19,8 @@ class base_action_rule_test(common.TransactionCase):
'name': "Lead is in done state",
'is_default': False,
'model_id': 'base.action.rule.lead.test',
- 'domain' : "[('state','=','done')]",
- }, context=context)
+ 'domain': "[('state','=','done')]",
+ }, context=context)
def create_filter_draft(self, cr, uid, context=None):
filter_pool = self.registry('ir.filters')
@@ -40,16 +40,16 @@ class base_action_rule_test(common.TransactionCase):
'user_id': self.admin,
}, context=context)
- def create_rule(self, cr, uid, filter_id=False, filter_pre_id=False, context=None):
+ def create_rule(self, cr, uid, kind, filter_id=False, filter_pre_id=False, context=None):
"""
The "Rule 1" says that when a lead goes to the 'draft' state, the responsible for that lead changes to user "demo"
"""
return self.base_action_rule.create(cr,uid,{
- 'name' : "Rule 1",
+ 'name': "Rule 1",
'model_id': self.registry('ir.model').search(cr, uid, [('model','=','base.action.rule.lead.test')], context=context)[0],
- 'active' : 1,
- 'filter_pre_id' : filter_pre_id,
- 'filter_id' : filter_id,
+ 'kind': kind,
+ 'filter_pre_id': filter_pre_id,
+ 'filter_id': filter_id,
'act_user_id': self.demo,
}, context=context)
@@ -64,7 +64,7 @@ class base_action_rule_test(common.TransactionCase):
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft)
+ self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -73,11 +73,11 @@ class base_action_rule_test(common.TransactionCase):
def test_01_check_to_state_draft_post(self):
"""
- Check that a new record (with state = draft) changes its responsible when there is a postcondition filter which check that the state is draft.
+ Check that a new record changes its responsible when there is a postcondition filter which check that the state is draft.
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
- self.create_rule(cr, uid, filter_id=filter_draft)
+ self.create_rule(cr, uid, 'on_create')
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -95,7 +95,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
+ self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@@ -133,7 +133,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
- self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
+ self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
diff --git a/addons/base_setup/i18n/ru.po b/addons/base_setup/i18n/ru.po
index bfc0807f019..93f65355baa 100644
--- a/addons/base_setup/i18n/ru.po
+++ b/addons/base_setup/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2012-12-28 10:09+0000\n"
-"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
+"PO-Revision-Date: 2013-05-27 12:19+0000\n"
+"Last-Translator: leksei <lirgus@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:12+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-28 05:17+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
#. module: base_setup
#: view:sale.config.settings:0
@@ -41,6 +41,8 @@ msgstr "base.config.settings"
msgid ""
"Use external authentication providers, sign in with google, facebook, ..."
msgstr ""
+"Использовать внешние сервисы аутентификации, например, вход через google, "
+"facebook, ..."
#. module: base_setup
#: view:sale.config.settings:0
@@ -68,7 +70,7 @@ msgstr "Участник"
#. module: base_setup
#: view:base.config.settings:0
msgid "Portal access"
-msgstr ""
+msgstr "Доступ к порталу"
#. module: base_setup
#: view:base.config.settings:0
@@ -192,6 +194,9 @@ msgid ""
"When you create a new contact (person or company), you will be able to load "
"all the data from LinkedIn (photos, address, etc)."
msgstr ""
+"Когда вы создаете новый контакт (человека или компанию), у вас есть "
+"возможность загрузить из LinkedIn всю информацию о нем (адреса, фотографии и "
+"т.д.)"
#. module: base_setup
#: help:base.config.settings,module_multi_company:0
@@ -200,6 +205,9 @@ msgid ""
"companies.\n"
" This installs the module multi_company."
msgstr ""
+"Работать в режиме Мульти-компании, с соответствующими правами доступа между "
+"компаниями.\n"
+" Будет установлен модуль multi_company."
#. module: base_setup
#: view:base.config.settings:0
@@ -208,6 +216,9 @@ msgid ""
"You can\n"
" launch the OpenERP Server with the option"
msgstr ""
+"Публичный портал доступен только при использовании одной базы данных. Вы "
+"можете\n"
+" запустить сервер OpenERP с этой опцией"
#. module: base_setup
#: view:base.config.settings:0
@@ -215,6 +226,8 @@ msgid ""
"You will find more options in your company details: address for the header "
"and footer, overdue payments texts, etc."
msgstr ""
+"Больше опций вы можете найти в настройках компании: адреса для "
+"верхнего/нижнего колонтитула, тексты для просроченных платежей и т.д."
#. module: base_setup
#: model:ir.model,name:base_setup.model_sale_config_settings
@@ -238,6 +251,14 @@ msgid ""
"projects,\n"
" etc."
msgstr ""
+"Когда вы отправляете заказчику документы\n"
+" (прайсы, счета), для их получения он "
+"сможет\n"
+" войти на портал, где так же сможет "
+"прочитать\n"
+" новости вашей компании, узнать "
+"обновления по\n"
+" его проектам и т.д."
#. module: base_setup
#: model:ir.model,name:base_setup.model_base_setup_terminology
@@ -252,7 +273,7 @@ msgstr "Клиент"
#. module: base_setup
#: help:base.config.settings,module_portal_anonymous:0
msgid "Enable the public part of openerp, openerp becomes a public website."
-msgstr ""
+msgstr "Включая публичную часть, openerp становится общедоступным сайтом."
#. module: base_setup
#: help:sale.config.settings,module_plugin_thunderbird:0
@@ -274,13 +295,13 @@ msgstr "Контрагент"
#. module: base_setup
#: model:ir.actions.act_window,name:base_setup.action_partner_terminology_config_form
msgid "Use another word to say \"Customer\""
-msgstr ""
+msgstr "Использовать другое слово вместо \"Заказчик\""
#. module: base_setup
#: model:ir.actions.act_window,name:base_setup.action_sale_config
#: view:sale.config.settings:0
msgid "Configure Sales"
-msgstr ""
+msgstr "Настройки продаж"
#. module: base_setup
#: help:sale.config.settings,module_plugin_outlook:0
@@ -297,12 +318,12 @@ msgstr ""
#. module: base_setup
#: view:base.config.settings:0
msgid "Options"
-msgstr ""
+msgstr "Настройки"
#. module: base_setup
#: field:base.config.settings,module_portal:0
msgid "Activate the customer portal"
-msgstr ""
+msgstr "Включить клиентский портал"
#. module: base_setup
#: view:base.config.settings:0
@@ -315,32 +336,32 @@ msgstr ""
#. module: base_setup
#: field:base.config.settings,module_share:0
msgid "Allow documents sharing"
-msgstr ""
+msgstr "Разрешить совместный доступ к документам"
#. module: base_setup
#: view:base.config.settings:0
msgid "(company news, jobs, contact form, etc.)"
-msgstr ""
+msgstr "(новости компании, вакансии, форма обратной связи т.д.)"
#. module: base_setup
#: field:base.config.settings,module_portal_anonymous:0
msgid "Activate the public portal"
-msgstr ""
+msgstr "Включить публичный портал"
#. module: base_setup
#: view:base.config.settings:0
msgid "Configure outgoing email servers"
-msgstr ""
+msgstr "Настроить сервер(а) исходящей почты"
#. module: base_setup
#: view:sale.config.settings:0
msgid "Social Network Integration"
-msgstr ""
+msgstr "Интеграция с социальными сетями"
#. module: base_setup
#: help:base.config.settings,module_portal:0
msgid "Give your customers access to their documents."
-msgstr ""
+msgstr "Разрешить заказчикам доступ к своим документам"
#. module: base_setup
#: view:base.config.settings:0
@@ -352,23 +373,23 @@ msgstr "Отмена"
#: view:base.config.settings:0
#: view:sale.config.settings:0
msgid "Apply"
-msgstr ""
+msgstr "Применить"
#. module: base_setup
#: view:base.setup.terminology:0
msgid "Specify Your Terminology"
-msgstr ""
+msgstr "Определить терминологию"
#. module: base_setup
#: view:base.config.settings:0
#: view:sale.config.settings:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: base_setup
#: view:base.config.settings:0
msgid "Configure your company data"
-msgstr ""
+msgstr "Настроить информацию о компании"
#~ msgid "City"
#~ msgstr "Город"
diff --git a/addons/base_status/base_state.py b/addons/base_status/base_state.py
index b856bbd74ad..3fe59ecbd21 100644
--- a/addons/base_status/base_state.py
+++ b/addons/base_status/base_state.py
@@ -104,7 +104,7 @@ class base_state(object):
if parent_id.change_responsible and parent_id.user_id:
data['user_id'] = parent_id.user_id.id
else:
- raise osv.except_osv(_('Error !'), _('You can not escalate, you are already at the top level regarding your sales-team category.'))
+ raise osv.except_osv(_('Error!'), _('You can not escalate, you are already at the top level regarding your sales-team category.'))
self.write(cr, uid, [case.id], data, context=context)
case.case_escalate_send_note(parent_id, context=context)
return True
diff --git a/addons/base_status/i18n/ru.po b/addons/base_status/i18n/ru.po
index 546f2772af3..2dab7ceaf31 100644
--- a/addons/base_status/i18n/ru.po
+++ b/addons/base_status/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-12-28 10:04+0000\n"
+"PO-Revision-Date: 2013-06-05 07:16+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:52+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: base_status
#: code:addons/base_status/base_state.py:107
@@ -27,13 +27,13 @@ msgstr "Ошибка !"
#: code:addons/base_status/base_state.py:166
#, python-format
msgid "%s has been <b>opened</b>."
-msgstr ""
+msgstr "%s было <b>открыто</b>."
#. module: base_status
#: code:addons/base_status/base_state.py:199
#, python-format
msgid "%s has been <b>renewed</b>."
-msgstr ""
+msgstr "%s было <b>обновлено</b>."
#. module: base_status
#: code:addons/base_status/base_stage.py:210
@@ -55,13 +55,13 @@ msgstr ""
#: code:addons/base_status/base_state.py:193
#, python-format
msgid "%s is now <b>pending</b>."
-msgstr ""
+msgstr "%s сейчас <b>в ожидании</b>."
#. module: base_status
#: code:addons/base_status/base_state.py:187
#, python-format
msgid "%s has been <b>canceled</b>."
-msgstr ""
+msgstr "%s было <b>отменено</b>."
#. module: base_status
#: code:addons/base_status/base_stage.py:210
@@ -70,9 +70,11 @@ msgid ""
"You are already at the top level of your sales-team category.\n"
"Therefore you cannot escalate furthermore."
msgstr ""
+"Вы уже на высшем уровне категории вашей команды продаж.\n"
+"Поэтому вы не можете обострить."
#. module: base_status
#: code:addons/base_status/base_state.py:181
#, python-format
msgid "%s has been <b>closed</b>."
-msgstr ""
+msgstr "%s было <b>закрыто</b>."
diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py
index e7501334997..52db18b7307 100644
--- a/addons/base_vat/base_vat.py
+++ b/addons/base_vat/base_vat.py
@@ -83,6 +83,8 @@ class res_partner(osv.osv):
Check the VAT number depending of the country.
http://sima-pc.com/nif.php
'''
+ if not ustr(country_code).encode('utf-8').isalpha():
+ return False
check_func_name = 'check_vat_' + country_code
check_func = getattr(self, check_func_name, None) or \
getattr(vatnumber, check_func_name, None)
diff --git a/addons/claim_from_delivery/i18n/ru.po b/addons/claim_from_delivery/i18n/ru.po
index 253e824d1e2..ffcf8fc2781 100644
--- a/addons/claim_from_delivery/i18n/ru.po
+++ b/addons/claim_from_delivery/i18n/ru.po
@@ -8,29 +8,29 @@ 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: 2010-09-30 06:47+0000\n"
+"PO-Revision-Date: 2013-06-05 07:11+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:41+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: claim_from_delivery
#: view:stock.picking.out:0
msgid "Claims"
-msgstr ""
+msgstr "Рекламации"
#. module: claim_from_delivery
#: model:res.request.link,name:claim_from_delivery.request_link_claim_from_delivery
msgid "Delivery Order"
-msgstr ""
+msgstr "Заказ доставки"
#. module: claim_from_delivery
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
msgid "Claim From Delivery"
-msgstr ""
+msgstr "Рекламация по доставке"
#~ msgid "Claim from delivery"
#~ msgstr "Претензия из доставки"
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 8e17a882076..e7ab7df27ea 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -81,8 +81,6 @@ Dashboard for CRM will include:
'crm_lead_view.xml',
'crm_lead_menu.xml',
- 'crm_case_section_view.xml',
-
'crm_meeting_menu.xml',
'crm_phonecall_view.xml',
@@ -98,6 +96,8 @@ Dashboard for CRM will include:
'res_config_view.xml',
'base_partner_merge_view.xml',
+
+ 'crm_case_section_view.xml',
],
'demo': [
'crm_demo.xml',
@@ -121,7 +121,8 @@ Dashboard for CRM will include:
'static/src/css/crm.css'
],
'js': [
- 'static/src/js/crm.js'
+ 'static/lib/sparkline/jquery.sparkline.js',
+ 'static/src/js/crm_case_section.js',
],
'installable': True,
'application': True,
diff --git a/addons/crm/base_partner_merge.py b/addons/crm/base_partner_merge.py
index b2645e7fb79..42e1ab7c7ec 100644
--- a/addons/crm/base_partner_merge.py
+++ b/addons/crm/base_partner_merge.py
@@ -13,6 +13,7 @@ from openerp.tools import mute_logger
# Validation Library https://pypi.python.org/pypi/validate_email/1.1
from .validate_email import validate_email
+import openerp
from openerp.osv import osv, orm
from openerp.osv import fields
from openerp.osv.orm import browse_record
@@ -101,14 +102,26 @@ class MergePartnerAutomatic(osv.TransientModel):
'current_line_id': fields.many2one('base.partner.merge.line', 'Current Line'),
'line_ids': fields.one2many('base.partner.merge.line', 'wizard_id', 'Lines'),
'partner_ids': fields.many2many('res.partner', string='Contacts'),
+ 'dst_partner_id': fields.many2one('res.partner', string='Destination Contact'),
'exclude_contact': fields.boolean('A user associated to the contact'),
'exclude_journal_item': fields.boolean('Journal Items associated to the contact'),
'maximum_group': fields.integer("Maximum of Group of Contacts"),
}
+ def default_get(self, cr, uid, fields, context=None):
+ if context is None:
+ context = {}
+ res = super(MergePartnerAutomatic, self).default_get(cr, uid, fields, context)
+ if context.get('active_model') == 'res.partner' and context.get('active_ids'):
+ partner_ids = context['active_ids']
+ res['state'] = 'selection'
+ res['partner_ids'] = partner_ids
+ res['dst_partner_id'] = self._get_ordered_partner(cr, uid, partner_ids, context=context)[-1].id
+ return res
+
_defaults = {
- 'state': 'option',
+ 'state': 'option'
}
def get_fk_on(self, cr, table):
@@ -204,8 +217,8 @@ class MergePartnerAutomatic(osv.TransientModel):
if proxy is None:
return
domain = [(field_model, '=', 'res.partner'), (field_id, '=', src.id)]
- ids = proxy.search(cr, uid, domain, context=context)
- return proxy.write(cr, uid, ids, {field_id: dst_partner.id}, context=context)
+ ids = proxy.search(cr, openerp.SUPERUSER_ID, domain, context=context)
+ return proxy.write(cr, openerp.SUPERUSER_ID, ids, {field_id: dst_partner.id}, context=context)
update_records = functools.partial(update_records, context=context)
@@ -219,9 +232,9 @@ class MergePartnerAutomatic(osv.TransientModel):
proxy = self.pool['ir.model.fields']
domain = [('ttype', '=', 'reference')]
- record_ids = proxy.search(cr, uid, domain, context=context)
+ record_ids = proxy.search(cr, openerp.SUPERUSER_ID, domain, context=context)
- for record in proxy.browse(cr, uid, record_ids, context=context):
+ for record in proxy.browse(cr, openerp.SUPERUSER_ID, record_ids, context=context):
proxy_model = self.pool[record.model]
field_type = proxy_model._columns.get(record.name).__class__._type
@@ -233,11 +246,11 @@ class MergePartnerAutomatic(osv.TransientModel):
domain = [
(record.name, '=', 'res.partner,%d' % partner.id)
]
- model_ids = proxy_model.search(cr, uid, domain, context=context)
+ model_ids = proxy_model.search(cr, openerp.SUPERUSER_ID, domain, context=context)
values = {
record.name: 'res.partner,%d' % dst_partner.id,
}
- proxy_model.write(cr, uid, model_ids, values, context=context)
+ proxy_model.write(cr, openerp.SUPERUSER_ID, model_ids, values, context=context)
def _update_values(self, cr, uid, src_partners, dst_partner, context=None):
_logger.debug('_update_values for dst_partner: %s for src_partners: %r', dst_partner.id, list(map(operator.attrgetter('id'), src_partners)))
@@ -251,7 +264,7 @@ class MergePartnerAutomatic(osv.TransientModel):
values = dict()
for column, field in columns.iteritems():
- if field._type not in ('many2many', 'one2many', 'function'):
+ if field._type not in ('many2many', 'one2many') and not isinstance(field, fields.function):
for item in itertools.chain(src_partners, [dst_partner]):
if item[column]:
values[column] = write_serializer(column, item[column])
@@ -266,22 +279,31 @@ class MergePartnerAutomatic(osv.TransientModel):
_logger.info('Skip recursive partner hierarchies for parent_id %s of partner: %s', parent_id, dst_partner.id)
@mute_logger('openerp.osv.expression', 'openerp.osv.orm')
- def _merge(self, cr, uid, partner_ids, context=None):
+ def _merge(self, cr, uid, partner_ids, dst_partner=None, context=None):
proxy = self.pool.get('res.partner')
partner_ids = proxy.exists(cr, uid, list(partner_ids), context=context)
if len(partner_ids) < 2:
return
- partners = proxy.browse(cr, uid, list(partner_ids), context=context)
- ordered_partners = sorted(sorted(partners,
- key=operator.attrgetter('create_date'), reverse=True),
- key=operator.attrgetter('active'), reverse=True)
+ if len(partner_ids) > 3:
+ raise osv.except_osv(_('Error'), _("For safety reasons, you cannot merge more than 3 contacts together. You can re-open the wizard several times if needed."))
+
+ if openerp.SUPERUSER_ID != uid and len(set(partner.email for partner in proxy.browse(cr, uid, partner_ids, context=context))) > 1:
+ raise osv.except_osv(_('Error'), _("All contacts must have the same email. Only the Administrator can merge contacts with different emails."))
- dst_partner = ordered_partners[-1]
- src_partners = ordered_partners[:-1]
+ if dst_partner and dst_partner.id in partner_ids:
+ src_partners = proxy.browse(cr, uid, [id for id in partner_ids if id != dst_partner.id], context=context)
+ else:
+ ordered_partners = self._get_ordered_partner(cr, uid, partner_ids, context)
+ dst_partner = ordered_partners[-1]
+ src_partners = ordered_partners[:-1]
_logger.info("dst_partner: %s", dst_partner.id)
+ if openerp.SUPERUSER_ID != uid and self._model_is_installed(cr, uid, 'account.move.line', context=context) and \
+ self.pool.get('account.move.line').search(cr, openerp.SUPERUSER_ID, [('partner_id', 'in', [partner.id for partner in src_partners])], context=context):
+ raise osv.except_osv(_('Error'), _("Only the destination contact may be linked to existing Journal Items. Please ask the Administrator if you need to merge several contacts linked to existing Journal Items."))
+
call_it = lambda function: function(cr, uid, src_partners, dst_partner,
context=context)
@@ -289,12 +311,12 @@ class MergePartnerAutomatic(osv.TransientModel):
call_it(self._update_reference_fields)
call_it(self._update_values)
- _logger.info("---merged---")
-
+ _logger.info('(uid = %s) merged the partners %r with %s', uid, list(map(operator.attrgetter('id'), src_partners)), dst_partner.id)
+ dst_partner.message_post(body='%s %s'%(_("Merged with the following partners:"), ", ".join('%s<%s>(ID %s)' % (p.name, p.email or 'n/a', p.id) for p in src_partners)))
+
for partner in src_partners:
partner.unlink()
-
def clean_emails(self, cr, uid, context=None):
"""
Clean the email address of the partner, if there is an email field with
@@ -414,9 +436,16 @@ class MergePartnerAutomatic(osv.TransientModel):
this = self.browse(cr, uid, ids[0], context=context)
if this.current_line_id:
this.current_line_id.unlink()
- return self._next_screen(this)
+ return self._next_screen(cr, uid, this, context)
+
+ def _get_ordered_partner(self, cr, uid, partner_ids, context=None):
+ partners = self.pool.get('res.partner').browse(cr, uid, list(partner_ids), context=context)
+ ordered_partners = sorted(sorted(partners,
+ key=operator.attrgetter('create_date'), reverse=True),
+ key=operator.attrgetter('active'), reverse=True)
+ return ordered_partners
- def _next_screen(self, this):
+ def _next_screen(self, cr, uid, this, context=None):
this.refresh()
values = {}
if this.line_ids:
@@ -426,6 +455,7 @@ class MergePartnerAutomatic(osv.TransientModel):
values.update({
'current_line_id': current_line.id,
'partner_ids': [(6, 0, current_partner_ids)],
+ 'dst_partner_id': self._get_ordered_partner(cr, uid, current_partner_ids, context)[-1].id,
'state': 'selection',
})
else:
@@ -525,7 +555,7 @@ class MergePartnerAutomatic(osv.TransientModel):
query = self._generate_query(groups, this.maximum_group)
self._process_query(cr, uid, ids, query, context=context)
- return self._next_screen(this)
+ return self._next_screen(cr, uid, this, context)
def automatic_process_cb(self, cr, uid, ids, context=None):
assert is_integer_list(ids)
@@ -666,7 +696,7 @@ class MergePartnerAutomatic(osv.TransientModel):
# p1.parent_id = p1.id
# """)
- return self._next_screen(this)
+ return self._next_screen(cr, uid, this, context)
def merge_cb(self, cr, uid, ids, context=None):
assert is_integer_list(ids)
@@ -685,33 +715,12 @@ class MergePartnerAutomatic(osv.TransientModel):
'target': 'new',
}
- self._merge(cr, uid, partner_ids, context=context)
-
- this.current_line_id.unlink()
-
- return self._next_screen(this)
-
- def merge_multi(self, cr, uid, ids, context=None):
-
- active_model = context.get('active_model')
- if active_model != 'res.partner':
- raise osv.except_osv(
- _('Error'),
- _('This wizard can only used with the Partners')
- )
+ self._merge(cr, uid, partner_ids, this.dst_partner_id, context=context)
- partner_ids = context.get('active_ids', [])
-
- MINIMAL_NUMBER = 2
- if len(partner_ids) < MINIMAL_NUMBER:
- raise osv.except_osv(
- _('Error'),
- _("You can't use this wizard with only one Partner")
- )
-
- self._merge(cr, uid, partner_ids, context=context)
+ if this.current_line_id:
+ this.current_line_id.unlink()
- return True
+ return self._next_screen(cr, uid, this, context)
def auto_set_parent_id(self, cr, uid, ids, context=None):
assert is_integer_list(ids)
diff --git a/addons/crm/base_partner_merge_view.xml b/addons/crm/base_partner_merge_view.xml
index 74e7a72d7a8..8ce0b5fd99f 100644
--- a/addons/crm/base_partner_merge_view.xml
+++ b/addons/crm/base_partner_merge_view.xml
@@ -68,9 +68,9 @@
OpenERP will propose you to merge only those having
all these fields in common. (not one of the fields).
</p>
- <group attrs="{'invisible': [('state', 'not in', ('selection', 'finished'))]}">
+ <group attrs="{'invisible': ['|', ('state', 'not in', ('selection', 'finished')), ('number_group', '=', 0)]}">
<field name="state" invisible="1" />
- <field name="number_group" invisible="0" />
+ <field name="number_group"/>
</group>
<group string="Search duplicates based on duplicated data in"
attrs="{'invisible': [('state', 'not in', ('option',))]}">
@@ -98,15 +98,15 @@
redirected to the aggregated contact. You can remove
contacts from this list to avoid merging them.
</p>
+ <field name="dst_partner_id" domain="[('id', 'in', partner_ids and partner_ids[0] and partner_ids[0][2] or False)]" attrs="{'required': [('state', '=', 'selection')]}"/>
<field name="partner_ids" nolabel="1">
<tree string="Partners">
<field name="id" />
- <field name="name" />
+ <field name="display_name" />
<field name="email" />
<field name="is_company" />
<field name="vat" />
<field name="country_id" />
- <field name="parent_id" />
</tree>
</field>
</group>
@@ -114,24 +114,9 @@
</form>
</field>
</record>
-
- <record model="ir.actions.server"
- id="ir_actions_server_merge_automatic">
- <field name="code">pool.get('base.partner.merge.automatic.wizard').merge_multi(cr, uid, None, context)</field>
- <field name="condition">True</field>
- <field name="model_id" ref="base.model_res_partner" />
- <field name="name">Automatic Merge</field>
- <field name="sequence" eval="5" />
- <field name="state">code</field>
- <field name="type">ir.actions.server</field>
- </record>
-
- <record model="ir.values" id="ir_open_merge_automatic">
- <field name="key2" eval="'client_action_multi'" />
- <field name="model">res.partner</field>
- <field name="name">Automatic Merge</field>
- <field name="value" eval="'ir.actions.server,%d' % ir_actions_server_merge_automatic" />
- </record>
+
+ <act_window id="action_partner_merge" res_model="base.partner.merge.automatic.wizard" src_model="res.partner"
+ target="new" multi="True" key2="client_action_multi" view_mode="form" name="Automatic Merge"/>
</data>
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 7b6fe02afa8..4c9a60634a5 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -19,13 +19,12 @@
#
##############################################################################
-import base64
-import time
-from lxml import etree
+from datetime import date, datetime
+from dateutil import relativedelta
+
+from openerp import tools
from openerp.osv import fields
from openerp.osv import osv
-from openerp import tools
-from openerp.tools.translate import _
MAX_LEVEL = 15
AVAILABLE_STATES = [
@@ -106,10 +105,57 @@ class crm_case_section(osv.osv):
_inherit = "mail.thread"
_description = "Sales Teams"
_order = "complete_name"
+ # number of periods for lead/opportunities/... tracking in salesteam kanban dashboard/kanban view
+ _period_number = 5
def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
return dict(self.name_get(cr, uid, ids, context=context))
+ def __get_bar_values(self, cr, uid, obj, domain, read_fields, value_field, groupby_field, context=None):
+ """ Generic method to generate data for bar chart values using SparklineBarWidget.
+ This method performs obj.read_group(cr, uid, domain, read_fields, groupby_field).
+
+ :param obj: the target model (i.e. crm_lead)
+ :param domain: the domain applied to the read_group
+ :param list read_fields: the list of fields to read in the read_group
+ :param str value_field: the field used to compute the value of the bar slice
+ :param str groupby_field: the fields used to group
+
+ :return list section_result: a list of dicts: [
+ { 'value': (int) bar_column_value,
+ 'tootip': (str) bar_column_tooltip,
+ }
+ ]
+ """
+ month_begin = date.today().replace(day=1)
+ section_result = [{
+ 'value': 0,
+ 'tooltip': (month_begin + relativedelta.relativedelta(months=-i)).strftime('%B'),
+ } for i in range(self._period_number - 1, -1, -1)]
+ group_obj = obj.read_group(cr, uid, domain, read_fields, groupby_field, context=context)
+ for group in group_obj:
+ group_begin_date = datetime.strptime(group['__domain'][0][2], tools.DEFAULT_SERVER_DATE_FORMAT)
+ month_delta = relativedelta.relativedelta(month_begin, group_begin_date)
+ section_result[self._period_number - (month_delta.months + 1)] = {'value': group.get(value_field, 0), 'tooltip': group_begin_date.strftime('%B')}
+ return section_result
+
+ def _get_opportunities_data(self, cr, uid, ids, field_name, arg, context=None):
+ """ Get opportunities-related data for salesteam kanban view
+ monthly_open_leads: number of open lead during the last months
+ monthly_planned_revenue: planned revenu of opportunities during the last months
+ """
+ obj = self.pool.get('crm.lead')
+ res = dict.fromkeys(ids, False)
+ month_begin = date.today().replace(day=1)
+ groupby_begin = (month_begin + relativedelta.relativedelta(months=-4)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
+ for id in ids:
+ res[id] = dict()
+ lead_domain = [('type', '=', 'lead'), ('section_id', '=', id), ('create_date', '>=', groupby_begin)]
+ res[id]['monthly_open_leads'] = self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date'], 'create_date_count', 'create_date', context=context)
+ opp_domain = [('type', '=', 'opportunity'), ('section_id', '=', id), ('create_date', '>=', groupby_begin)]
+ res[id]['monthly_planned_revenue'] = self.__get_bar_values(cr, uid, obj, opp_domain, ['planned_revenue', 'create_date'], 'planned_revenue', 'create_date', context=context)
+ return res
+
_columns = {
'name': fields.char('Sales Team', size=64, required=True, translate=True),
'complete_name': fields.function(get_full_name, type='char', size=256, readonly=True, store=True),
@@ -129,15 +175,16 @@ class crm_case_section(osv.osv):
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
help="The email address associated with this team. New emails received will automatically "
"create new leads assigned to the team."),
- 'open_lead_ids': fields.one2many('crm.lead', 'section_id',
- string='Open Leads', readonly=True,
- domain=['&', ('type', '!=', 'opportunity'), ('state', 'not in', ['done', 'cancel'])]),
- 'open_opportunity_ids': fields.one2many('crm.lead', 'section_id',
- string='Open Opportunities', readonly=True,
- domain=['&', '|', ('type', '=', 'opportunity'), ('type', '=', 'both'), ('state', 'not in', ['done', 'cancel'])]),
'color': fields.integer('Color Index'),
'use_leads': fields.boolean('Leads',
- help="This enables the management of leads in the sales team. Otherwise the sales team manages only opportunities."),
+ help="The first contact you get with a potential customer is a lead you qualify before converting it into a real business opportunity. Check this box to manage leads in this sales team."),
+
+ 'monthly_open_leads': fields.function(_get_opportunities_data,
+ type="string", readonly=True, multi='_get_opportunities_data',
+ string='Open Leads per Month'),
+ 'monthly_planned_revenue': fields.function(_get_opportunities_data,
+ type="string", readonly=True, multi='_get_opportunities_data',
+ string='Planned Revenue per Month')
}
def _get_stage_common(self, cr, uid, context):
diff --git a/addons/crm/crm_action_rule_demo.xml b/addons/crm/crm_action_rule_demo.xml
index bf1f7d4082f..7204f666db5 100644
--- a/addons/crm/crm_action_rule_demo.xml
+++ b/addons/crm/crm_action_rule_demo.xml
@@ -26,6 +26,7 @@ Description: [[object.description]]
<field name="name">Set Auto Reminder on leads which are not open since 5 days.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">1</field>
+ <field name="kind">on_time</field>
<field name="filter_id" ref="filter_draft_lead"/>
<field name="trg_date_id" ref="field_crm_lead_create_date"/>
<field name="trg_date_range">5</field>
@@ -54,12 +55,10 @@ object.write({'section_id': sales_team.id})
<field name="name">Set Auto Followers on leads which are urgent and come from USA.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">2</field>
+ <field name="kind">on_create</field>
<field name="filter_id" ref="filter_usa_lead"/>
- <field name="act_followers" eval="[(6,0,[ref('base.res_partner_4'), ref('base.res_partner_5'), ref('base.res_partner_6')])]"/>
<field name="act_user_id" ref="base.user_root"/>
- <field name="trg_date_id" ref="field_crm_lead_create_date"/>
- <field name="trg_date_range">0</field>
- <field name="trg_date_range_type">minutes</field>
+ <field name="act_followers" eval="[(6,0,[ref('base.res_partner_4'), ref('base.res_partner_5'), ref('base.res_partner_6')])]"/>
<field name="server_action_ids" eval="[(6,0,[ref('action_set_team_sales_department')])]"/>
</record>
</data>
diff --git a/addons/crm/crm_case_section_view.xml b/addons/crm/crm_case_section_view.xml
index 703b4ebb254..be5611c03c4 100644
--- a/addons/crm/crm_case_section_view.xml
+++ b/addons/crm/crm_case_section_view.xml
@@ -78,12 +78,12 @@
<field name="note"/>
<field name="alias_id"/>
<field name="color"/>
- <field name="open_lead_ids"/>
- <field name="open_opportunity_ids"/>
+ <field name="monthly_open_leads"/>
+ <field name="monthly_planned_revenue"/>
<templates>
<t t-name="kanban-box">
- <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click oe_kanban_crm_salesteams">
- <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
+ <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_crm_salesteams">
+ <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_sale_manager">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li t-if="widget.view.is_action_enabled('edit')"><a type="edit">Sales Teams Settings</a></li>
@@ -92,25 +92,19 @@
</ul>
</div>
<div class="oe_kanban_content">
- <h4><field name="name"/></h4>
- <div class="oe_kanban_alias" t-if="record.use_leads.raw_value and record.alias_id.value">
- <span class="oe_e">%%</span><small><field name="alias_id"/></small>
+ <h4 class="oe_center"><field name="name"/></h4>
+ <div class="oe_kanban_alias oe_center" t-if="record.use_leads.raw_value and record.alias_id.value">
+ <small><span class="oe_e" style="float: none;">%%</span><t t-raw="record.alias_id.raw_value[1]"/></small>
</div>
<div class="oe_items_list">
- <a t-if="record.use_leads.raw_value" name="%(crm_case_form_view_salesteams_lead)d" type="action">
- <t t-raw="record.open_lead_ids.raw_value.length"/>
- <t t-if="record.open_lead_ids.raw_value.length &gt;= 2">Leads</t>
- <t t-if="record.open_lead_ids.raw_value.length &lt; 2">Lead</t></a>
- <a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">
- <t t-raw="record.open_opportunity_ids.raw_value.length"/>
- <t t-if="record.open_opportunity_ids.raw_value.length &gt;= 2">Opportunities</t>
- <t t-if="record.open_opportunity_ids.raw_value.length &lt; 2">Opportunity</t></a>
- </div>
- <div class="oe_avatars">
- <img t-if="record.user_id.raw_value" t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-data-member_id="record.user_id.raw_value"/>
- <t t-foreach="record.member_ids.raw_value.slice(0,11)" t-as="member">
- <img t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
- </t>
+ <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>
+ </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>
+ </div>
</div>
</div>
</div>
@@ -120,6 +114,27 @@
</field>
</record>
+ <!-- Case Sections Search view -->
+
+ <record id="crm_case_section_salesteams_search" model="ir.ui.view">
+ <field name="name">Case Sections - Search</field>
+ <field name="model">crm.case.section</field>
+ <field name="arch" type="xml">
+ <search string="Salesteams Search">
+ <field name="name"/>
+ <field name="parent_id"/>
+ <field name="user_id"/>
+ <field name="note"/>
+ <field name="code"/>
+ <filter name="personal" string="My Salesteams" domain="['|', ('member_ids', '=', uid), ('user_id', '=', uid)]"/>
+ <group expand="0" string="Group By...">
+ <filter string="Team Leader" domain="[]" context="{'group_by':'user_id'}"/>
+ <filter string="Parent Sales Teams" domain="[]" context="{'group_by':'parent_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
<!-- Case Sections Action -->
<record id="crm_case_section_salesteams_act" model="ir.actions.act_window">
@@ -127,6 +142,7 @@
<field name="res_model">crm.case.section</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
+ <field name="context">{'search_default_personal': True}</field>
<field name="view_id" ref="crm_case_section_salesteams_view_kanban"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
@@ -148,9 +164,9 @@
<form string="Sales Team" version="7.0">
<sheet>
<div class="oe_title">
- <label for="name" class="oe_edit_only" string="Project Name"/>
+ <label for="name" class="oe_edit_only" string="Sales team"/>
<h1>
- <field name="name" string="Project Name"/>
+ <field name="name" string="Salesteam"/>
</h1>
<div name="group_alias"
attrs="{'invisible': [('alias_domain', '=', False)]}">
@@ -169,24 +185,17 @@
</div>
<group>
<group>
- <field name="parent_id"/>
- <field name="resource_calendar_id"/>
- <field name="active"/>
- </group>
- <group>
<field name="user_id"/>
<field name="code"/>
</group>
- <group colspan="4" attrs="{'invisible': [('use_leads', '=', False)]}">
-
+ <group>
+ <field name="parent_id"/>
+ <field name="change_responsible"/>
+ <field name="active"/>
</group>
</group>
<notebook colspan="4">
- <page string="Sales Team">
- <group>
- <field name="change_responsible"/>
- </group>
- <separator string="Team Members"/>
+ <page string="Team Members">
<field name="member_ids" widget="many2many_kanban">
<kanban quick_create="false" create="true">
<field name="name"/>
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index f24aee13c1d..1f1bd74391a 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -27,9 +27,10 @@
</record>
<record model="crm.case.section" id="section_sales_department">
- <field name="name">Sales</field>
- <field name="code">Sales</field>
+ <field name="name">Direct Sales</field>
+ <field name="code">DM</field>
<field name="use_leads">True</field>
+ <field name="alias_name">info</field>
<field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
</record>
diff --git a/addons/crm/crm_demo.xml b/addons/crm/crm_demo.xml
index 203193dc3bc..2858250e86a 100644
--- a/addons/crm/crm_demo.xml
+++ b/addons/crm/crm_demo.xml
@@ -7,27 +7,13 @@
</record>
<record model="crm.case.section" id="crm_case_section_1">
- <field name="name">Sales Marketing Department</field>
- <field name="code">SMD</field>
- <field name="parent_id" ref="crm.section_sales_department"/>
+ <field name="name">Indirect Sales</field>
+ <field name="code">IM</field>
</record>
<record model="crm.case.section" id="crm_case_section_2">
- <field name="name">Support Department</field>
+ <field name="name">Marketing</field>
<field name="code">SPD</field>
- <field name="parent_id" ref="crm.section_sales_department"/>
- </record>
-
- <record model="crm.case.section" id="crm_case_section_3">
- <field name="name">Direct Marketing</field>
- <field name="code">DM</field>
- <field name="parent_id" ref="crm.section_sales_department"/>
- </record>
-
- <record model="crm.case.section" id="crm_case_section_4">
- <field name="name">Online Support</field>
- <field name="code">OS</field>
- <field name="parent_id" ref="crm.crm_case_section_2"/>
</record>
<record model="crm.segmentation" id="crm_segmentation0">
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 40f71ad5d79..b8673e73927 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -77,12 +77,12 @@ class crm_lead(base_stage, format_address, osv.osv):
_track = {
'state': {
- 'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new',
+ 'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'],
'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'cancel',
},
'stage_id': {
- 'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'cancel', 'done'],
+ 'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'cancel', 'done'],
},
}
@@ -103,7 +103,9 @@ class crm_lead(base_stage, format_address, osv.osv):
if vals.get('type'):
ctx['default_type'] = vals['type']
vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
- return super(crm_lead, self).create(cr, uid, vals, context=context)
+ # context: no_log, because subtype already handle this
+ create_context = dict(context, mail_create_nolog=True)
+ return super(crm_lead, self).create(cr, uid, vals, context=create_context)
def _get_default_section_id(self, cr, uid, context=None):
""" Gives default section by checking if present in the context """
@@ -367,8 +369,8 @@ class crm_lead(base_stage, format_address, osv.osv):
def on_change_user(self, cr, uid, ids, user_id, context=None):
""" When changing the user, also set a section_id or restrict section id
to the ones user_id is member of. """
- section_id = False
- if user_id:
+ section_id = self._get_default_section_id(cr, uid, context=context) or False
+ if user_id and not section_id:
section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context)
if section_ids:
section_id = section_ids[0]
@@ -678,8 +680,9 @@ class crm_lead(base_stage, format_address, osv.osv):
merged_data['stage_id'] = section_stage_ids and section_stage_ids[0] or False
# Write merged data into first opportunity
self.write(cr, uid, [highest.id], merged_data, context=context)
- # Delete tail opportunities
- self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context)
+ # Delete tail opportunities
+ # We use the SUPERUSER to avoid access rights issues because as the user had the rights to see the records it should be safe to do so
+ self.unlink(cr, SUPERUSER_ID, [x.id for x in tail_opportunities], context=context)
return highest.id
diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml
index 21d60ad2961..e7e6beae33e 100644
--- a/addons/crm/crm_lead_demo.xml
+++ b/addons/crm/crm_lead_demo.xml
@@ -20,7 +20,7 @@
<field name="categ_ids" eval="[(6, 0, [categ_oppor6])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">1</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hello,
@@ -44,7 +44,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
- <field name="section_id" ref="crm_case_section_3"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@@ -63,7 +63,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">2</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead2"/>
<field eval="1" name="active"/>
@@ -82,7 +82,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead7"/>
<field eval="1" name="active"/>
@@ -133,7 +133,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@@ -152,7 +152,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">5</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead7"/>
<field eval="1" name="active"/>
@@ -197,6 +197,9 @@ Contact: +1 813 494 5005</field>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
+ <record id="crm_case_9" model="crm.lead">
+ <field name="create_date" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
+ </record>
<record id="crm_case_10" model="crm.lead">
<field name="type">lead</field>
@@ -211,7 +214,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">2</field>
- <field name="section_id" ref="crm_case_section_3"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hi,
@@ -235,7 +238,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_direct"/>
<field name="priority">3</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@@ -291,7 +294,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-25')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-12')" name="date_action"/>
<field name="title_action">Meeting for pricing information.</field>
- <field name="section_id" ref="crm_case_section_3"/>
+ <field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@@ -317,7 +320,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@@ -326,7 +329,7 @@ Andrew</field>
<record id="crm_case_15" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Plan to buy RedHat servers</field>
- <field eval="35000" name="planned_revenue"/>
+ <field eval="25000" name="planned_revenue"/>
<field eval="30.0" name="probability"/>
<field name="street">69 rue de Chimay</field>
<field name="country_id" ref="base.be"/>
@@ -339,10 +342,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-12')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Call to ask system requirement</field>
- <field name="section_id" ref="crm_case_section_3"/>
+ <field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
- <field name="stage_id" ref="crm.stage_lead4"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(months=2)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_16" model="crm.lead">
@@ -367,6 +371,7 @@ Andrew</field>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_17" model="crm.lead">
@@ -388,10 +393,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-8')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-3')" name="date_action"/>
<field name="title_action">Send price list regarding our interventions</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
- <field name="stage_id" ref="crm.stage_lead3"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_18" model="crm.lead">
@@ -412,7 +418,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-13')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@@ -438,8 +444,9 @@ Andrew</field>
<field name="title_action">Ask for the good receprion of the proposition</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_root"/>
- <field name="stage_id" ref="crm.stage_lead4"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(months=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_20" model="crm.lead">
@@ -468,10 +475,11 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">3</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
- <field name="stage_id" ref="crm.stage_lead8"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_22" model="crm.lead">
@@ -486,7 +494,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">3</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
@@ -504,14 +512,15 @@ Andrew</field>
<field name="priority">5</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
- <field name="stage_id" ref="crm.stage_lead5"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_24" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Need 20 Days of Consultancy</field>
- <field eval="5025" name="planned_revenue"/>
+ <field eval="6025" name="planned_revenue"/>
<field eval="90.0" name="probability"/>
<field name="email_from">info@mycompany.net</field>
<field name="country_id" ref="base.pe"/>
@@ -525,6 +534,7 @@ Andrew</field>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(month=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_25" model="crm.lead">
@@ -544,7 +554,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="priority">2</field>
<field name="title_action">Conf call with technical service</field>
- <field name="section_id" ref="crm_case_section_2"/>
+ <field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
@@ -569,10 +579,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
- <field name="section_id" ref="crm_case_section_4"/>
+ <field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_demo"/>
- <field name="stage_id" ref="crm.stage_lead3"/>
+ <field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
+ <field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Unsubscribe Admin from case15, subscribe Demo -->
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 225b2ffc292..6ddd06c1c90 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -157,7 +157,8 @@
<label for="section_id" groups="base.group_multi_salesteams"/>
<div groups="base.group_multi_salesteams">
<field name="section_id"/>
- <button name="case_escalate" string="Escalate" type="object"
+ <button name="case_escalate" string="Escalate"
+ type="object" class="oe_link"
attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
</div>
<field name="type" invisible="1"/>
@@ -343,7 +344,7 @@
help="Leads that are assigned to me"/>
<filter string="Assigned to My Team(s)"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
- help="Leads that are assigned to any sales teams I am member of"/>
+ help="Leads that are assigned to any sales teams I am member of" groups="base.group_multi_salesteams"/>
<separator />
<filter string="Available for mass mailing"
name='not_opt_out' domain="[('opt_out', '=', False)]"
@@ -351,7 +352,7 @@
<separator />
<group expand="0" string="Group By...">
<filter string="Salesperson" domain="[]" context="{'group_by':'user_id'}"/>
- <filter string="Team" domain="[]" context="{'group_by':'section_id'}"/>
+ <filter string="Team" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Customer" help="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Country" domain="[]" context="{'group_by':'country_id'}"/>
@@ -362,7 +363,7 @@
</group>
<group string="Display">
<filter string="Show Countries" context="{'invisible_country': False}" help="Show Countries"/>
- <filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
+ <filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team" groups="base.group_multi_salesteams"/>
</group>
</search>
</field>
@@ -556,7 +557,7 @@
<filter string="Lost" name="lost" domain="[('state','=','cancel')]"/>
<filter string="Unassigned" name="unassigned" domain="[('user_id','=', False)]" help="No salesperson"/>
<filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]" help="Unread messages"/>
- <filter string="Mine" name="assigned_to_me"
+ <filter string="My Opportunities" name="assigned_to_me"
domain="[('user_id','=',uid)]" context="{'invisible_section': False}"
help="Opportunities that are assigned to me"/>
<filter string="Assigned to My Team(s)"
@@ -577,7 +578,7 @@
<filter string="Creation" domain="[]" context="{'group_by':'create_date'}"/>
</group>
<group string="Display">
- <filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
+ <filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team" groups="base.group_multi_salesteams"/>
<filter string="Show Countries" context="{'invisible_country': False}" help="Show Countries"/>
</group>
</search>
diff --git a/addons/crm/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml
index f441c29a7e6..4002e18815e 100644
--- a/addons/crm/crm_phonecall_demo.xml
+++ b/addons/crm/crm_phonecall_demo.xml
@@ -37,7 +37,7 @@
<field name="name">Ask for convenient time of meeting</field>
<field name="state">open</field>
<field name="partner_phone">+1 786 525 0724</field>
- <field name="section_id" ref="crm.crm_case_section_3"/>
+ <field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field eval="5.0" name="duration"/>
@@ -50,7 +50,7 @@
<field name="state">done</field>
<field name="partner_phone">(077) 582-4035</field>
<field name="partner_mobile">(077) 341-3591</field>
- <field name="section_id" ref="crm.crm_case_section_4"/>
+ <field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone1"/>
<field eval="5.45" name="duration"/>
@@ -74,7 +74,7 @@
<field name="name">Proposal for discount offer</field>
<field name="state">open</field>
<field name="partner_phone">+34 230 953 485</field>
- <field name="section_id" ref="crm.crm_case_section_3"/>
+ <field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field eval="8.56" name="duration"/>
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 63385fa3e17..a84ae553b4a 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -101,7 +101,7 @@
<field name="type"/>
<field name="on_change"/>
<field name="sequence"/>
- <field name="case_default"/>
+ <field name="case_default" groups="base.group_multi_salesteams"/>
<field name="fold"/>
</group>
<separator string="Requirements"/>
diff --git a/addons/crm/html/index.html b/addons/crm/html/index.html
index 355fdb0be36..5ae542f5c91 100644
--- a/addons/crm/html/index.html
+++ b/addons/crm/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=crm">
<img src="crm_sc_01.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po
index 19ae76e9f46..0029293866c 100644
--- a/addons/crm/i18n/ru.po
+++ b/addons/crm/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-03-01 11:27+0000\n"
-"Last-Translator: Антон Лаврёнов <lavrton@gmail.com>\n"
+"PO-Revision-Date: 2013-06-06 09:56+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:09+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: crm
#: view:crm.lead.report:0
@@ -56,6 +56,11 @@ msgid ""
"Description: [[object.description]]\n"
" "
msgstr ""
+"Внимание, необработанный кандидат создан более 5 дней назад.\n"
+"Название: [[object.name ]]\n"
+"Идентификатор: [[object.id ]]\n"
+"Описание: [[object.description]]\n"
+" "
#. module: crm
#: field:crm.opportunity2phonecall,action:0
@@ -452,7 +457,7 @@ msgstr "# Предложений"
#, python-format
msgid ""
"Please select more than one element (lead or opportunity) from the list view."
-msgstr ""
+msgstr "Пожалуйста, выберите хотя бы один элемент из списка ниже."
#. module: crm
#: view:crm.lead:0
@@ -953,7 +958,7 @@ msgstr "Следующее действие"
#: code:addons/crm/crm_lead.py:763
#, python-format
msgid "<b>Partner</b> set to <em>%s</em>."
-msgstr ""
+msgstr "<b>Партнер</b> установлен как <em>%s</em>."
#. module: crm
#: selection:crm.lead.report,state:0
@@ -1108,7 +1113,7 @@ msgstr "Удалить"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_create
msgid "Opportunity created"
-msgstr ""
+msgstr "Предложение создано"
#. module: crm
#: view:crm.lead:0
@@ -1397,7 +1402,7 @@ msgstr "Сделать"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_lost
msgid "Opportunity lost"
-msgstr ""
+msgstr "Предложение отклонено"
#. module: crm
#: field:crm.lead2opportunity.partner,action:0
@@ -1446,7 +1451,7 @@ msgstr "Пользователи"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_lead_stage
msgid "Stage Changed"
-msgstr ""
+msgstr "Стадия изменена"
#. module: crm
#: field:crm.case.stage,section_ids:0
@@ -1759,7 +1764,7 @@ msgstr "Способ оплаты"
#. module: crm
#: model:ir.model,name:crm.model_crm_lead2opportunity_partner_mass
msgid "Mass Lead To Opportunity Partner"
-msgstr "Массовое проведение предложений партнёру"
+msgstr "Массовое преобразование кандидатов в предложения"
#. module: crm
#: view:sale.config.settings:0
@@ -1894,7 +1899,7 @@ msgstr "Кандидаты"
#: code:addons/crm/crm_lead.py:563
#, python-format
msgid "Merged leads"
-msgstr ""
+msgstr "Объединенные кандидаты"
#. module: crm
#: model:crm.case.categ,name:crm.categ_oppor5
@@ -1917,7 +1922,7 @@ msgstr "Сделать"
#: model:mail.message.subtype,name:crm.mt_lead_convert_to_opportunity
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_opportunity
msgid "Lead to Opportunity"
-msgstr ""
+msgstr "Кандидат в предложение"
#. module: crm
#: field:crm.lead,user_email:0
@@ -2126,7 +2131,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Address"
-msgstr ""
+msgstr "Адрес"
#. module: crm
#: help:crm.case.section,alias_id:0
@@ -2134,6 +2139,8 @@ msgid ""
"The email address associated with this team. New emails received will "
"automatically create new leads assigned to the team."
msgstr ""
+"Адрес эл. почты связанный с этой командой. Новая полученная эл. почта будет "
+"автоматически создавать новые кандидаты связанные с командой."
#. module: crm
#: view:crm.lead:0
@@ -2192,7 +2199,7 @@ msgstr "Продолжение процесса"
#: selection:crm.lead2opportunity.partner.mass,name:0
#: model:ir.actions.act_window,name:crm.action_crm_lead2opportunity_partner
msgid "Convert to opportunity"
-msgstr "Преобразовать в возможность"
+msgstr "Преобразовать в предложение"
#. module: crm
#: field:crm.opportunity2phonecall,user_id:0
@@ -2234,6 +2241,8 @@ msgid ""
"This stage is not visible, for example in status bar or kanban view, when "
"there are no records in that stage to display."
msgstr ""
+"Эта стадия не видима, например в статус-баре или виде канбан, когда нет "
+"записей этой стадии для отображения."
#. module: crm
#: field:crm.lead.report,nbr:0
@@ -2249,7 +2258,7 @@ msgstr "Отдел продаж, которому принадлежит вопÑ
#. module: crm
#: model:crm.case.resource.type,name:crm.type_lead6
msgid "Banner Ads"
-msgstr ""
+msgstr "Баннер"
#. module: crm
#: field:crm.merge.opportunity,opportunity_ids:0
@@ -2279,7 +2288,7 @@ msgstr "Выполняется"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_convert_to_opportunity
msgid "Lead converted into an opportunity"
-msgstr ""
+msgstr "Кандидат превращенный в предложение"
#. module: crm
#: view:crm.lead:0
@@ -2289,7 +2298,7 @@ msgstr "Нераспределенные кандидаты"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_won
msgid "Opportunity won"
-msgstr ""
+msgstr "Предложение принято"
#. module: crm
#: field:crm.case.categ,object_id:0
@@ -2364,7 +2373,7 @@ msgstr ""
#. module: crm
#: field:crm.case.stage,state:0
msgid "Related Status"
-msgstr ""
+msgstr "Связанный статус"
#. module: crm
#: field:crm.phonecall,name:0
@@ -2410,7 +2419,7 @@ msgstr "Подтвердить"
#. module: crm
#: view:crm.lead:0
msgid "Unread messages"
-msgstr ""
+msgstr "Непрочитанные сообщения"
#. module: crm
#: field:crm.phonecall.report,section_id:0
@@ -2501,7 +2510,7 @@ msgstr "Создание предложений из кандидатов"
#. module: crm
#: model:crm.case.resource.type,name:crm.type_lead3
msgid "Email Campaign - Products"
-msgstr ""
+msgstr "Кампания эл. почты - Продукция"
#. module: crm
#: model:ir.actions.act_window,help:crm.crm_case_categ_phone_incoming0
@@ -2578,7 +2587,7 @@ msgstr "Август"
#: model:mail.message.subtype,name:crm.mt_lead_lost
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_lost
msgid "Opportunity Lost"
-msgstr ""
+msgstr "Предложение отклонено"
#. module: crm
#: field:crm.lead.report,deadline_month:0
@@ -2644,7 +2653,7 @@ msgstr "Сотрудники отдела"
#: view:crm.opportunity2phonecall:0
#: view:crm.phonecall2phonecall:0
msgid "Schedule/Log a Call"
-msgstr ""
+msgstr "Запланировать/Описать звонок"
#. module: crm
#: field:crm.lead,planned_cost:0
@@ -2654,7 +2663,7 @@ msgstr "Планируемые затраты"
#. module: crm
#: help:crm.lead,date_deadline:0
msgid "Estimate of the date on which the opportunity will be won."
-msgstr ""
+msgstr "Оценка даты на которую это предложение будет принято."
#. module: crm
#: help:crm.lead,email_cc:0
@@ -2676,7 +2685,7 @@ msgstr "Описанные звонки"
#: model:mail.message.subtype,name:crm.mt_lead_won
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_won
msgid "Opportunity Won"
-msgstr ""
+msgstr "Предложение принято"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_section_act_tree
@@ -2717,7 +2726,7 @@ msgstr "Улица (2-я строка)"
#. module: crm
#: field:sale.config.settings,module_crm_helpdesk:0
msgid "Manage Helpdesk and Support"
-msgstr ""
+msgstr "Управление поддержкой"
#. module: crm
#: field:crm.lead.report,delay_open:0
@@ -2826,7 +2835,7 @@ msgstr "Дата создания"
#. module: crm
#: view:crm.lead:0
msgid "at"
-msgstr ""
+msgstr "в"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead1
@@ -2895,7 +2904,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Internal Notes"
-msgstr ""
+msgstr "Внутренние заметки"
#. module: crm
#: view:crm.lead:0
@@ -2960,6 +2969,7 @@ msgstr "Проиграно"
#, python-format
msgid "Closed/Cancelled leads cannot be converted into opportunities."
msgstr ""
+"Закрытые/Отмененные кандидаты не могут быть конвертированы в возможности."
#. module: crm
#: view:crm.lead:0
@@ -3050,7 +3060,7 @@ msgstr "Рассылка"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_stage
msgid "Opportunity Stage Changed"
-msgstr ""
+msgstr "Этап предложения изменен"
#. module: crm
#: model:ir.actions.act_window,help:crm.crm_lead_stage_act
diff --git a/addons/crm/process/crm_configuration_process.xml b/addons/crm/process/crm_configuration_process.xml
index c56bb8935d9..882c9680268 100644
--- a/addons/crm/process/crm_configuration_process.xml
+++ b/addons/crm/process/crm_configuration_process.xml
@@ -60,24 +60,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creating business opportunities from Leads&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
- <field model="process.node" name="source_node_id" ref="process_node_leads0"/>
+ <field name="target_node_id" ref="process_node_opportunities0"/>
+ <field name="source_node_id" ref="process_node_leads0"/>
</record>
<record id="process_transition_leadpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospect is converting to business partner&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_partner0"/>
- <field model="process.node" name="source_node_id" ref="process_node_leads0"/>
+ <field name="target_node_id" ref="process_node_partner0"/>
+ <field name="source_node_id" ref="process_node_leads0"/>
</record>
<record id="process_transition_opportunitymeeting0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Meeting&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Normal or phone meeting for opportunity&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_meeting0"/>
- <field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
+ <field name="target_node_id" ref="process_node_meeting0"/>
+ <field name="source_node_id" ref="process_node_opportunities0"/>
</record>
</data>
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 759063b3c1d..09853c6379e 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -75,7 +75,7 @@
<filter icon="terp-dialog-close" string="Closed" domain="[('state','=','done')]" help="Leads/Opportunities which are in done state"/>
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]"
- help="Leads/Opportunities that are assigned to one of the sale teams I manage"/>
+ help="Leads/Opportunities that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<separator/>
<filter icon="terp-personal" string="My Case(s)" help="Leads/Opportunities that are assigned to me" domain="[('user_id','=',uid)]"/>
<field name="section_id" context="{'invisible_section': False}"
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 070d574e0cd..aa2162d163a 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -57,7 +57,7 @@
help="Phone calls which are in pending state"/>
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]"
- help="Phone calls that are assigned to one of the sale teams I manage"/>
+ help="Phone calls that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<separator/>
<filter icon="terp-personal" string="My Phone Calls" help="Phone Calls that are assigned to me" domain="[('user_id','=',uid)]" />
<field name="section_id" string="Sales Team" context="{'invisible_section': False}"
diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml
index 547ce1c2ae6..9fd542c9dbd 100644
--- a/addons/crm/res_config_view.xml
+++ b/addons/crm/res_config_view.xml
@@ -22,9 +22,9 @@
</div>
</div>
</group>
- <separator string="Sales Teams Configuration"/>
+ <separator string="Sales Teams"/>
<group>
- <label for="id" string="Use Sales Teams"/>
+ <label for="id" string="Manage Sales Teams"/>
<div>
<field name="group_multi_salesteams" class="oe_inline"/>
<label for="group_multi_salesteams"/>
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index b09c201df2b..cadb8c24550 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -12,7 +12,7 @@ access_crm_phonecall_manager,crm.phonecall.manager,model_crm_phonecall,base.grou
access_crm_case_categ,crm.case.categ,model_crm_case_categ,base.group_user,1,0,0,0
access_crm_lead,crm.lead,model_crm_lead,base.group_sale_salesman,1,1,1,0
access_crm_phonecall,crm.phonecall,model_crm_phonecall,base.group_sale_salesman,1,1,1,0
-access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,1,1,0
+access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,0,0,0
access_crm_case_section_manager,crm.case.section.manager,model_crm_case_section,base.group_sale_manager,1,1,1,1
access_crm_case_stage,crm.case.stage,model_crm_case_stage,,1,0,0,0
access_crm_case_stage_manager,crm.case.stage,model_crm_case_stage,base.group_sale_manager,1,1,1,1
diff --git a/addons/crm/static/lib/sparkline/jquery.sparkline.js b/addons/crm/static/lib/sparkline/jquery.sparkline.js
new file mode 100644
index 00000000000..c003923e03b
--- /dev/null
+++ b/addons/crm/static/lib/sparkline/jquery.sparkline.js
@@ -0,0 +1,3047 @@
+/**
+*
+* jquery.sparkline.js
+*
+* v2.1.1
+* (c) Splunk, Inc
+* Contact: Gareth Watts (gareth@splunk.com)
+* http://omnipotent.net/jquery.sparkline/
+*
+* Generates inline sparkline charts from data supplied either to the method
+* or inline in HTML
+*
+* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
+* (Firefox 2.0+, Safari, Opera, etc)
+*
+* License: New BSD License
+*
+* Copyright (c) 2012, Splunk Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+* * Redistributions of source code must retain the above copyright notice,
+* this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following disclaimer in the documentation
+* and/or other materials provided with the distribution.
+* * Neither the name of Splunk Inc nor the names of its contributors may
+* be used to endorse or promote products derived from this software without
+* specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*
+* Usage:
+* $(selector).sparkline(values, options)
+*
+* If values is undefined or set to 'html' then the data values are read from the specified tag:
+* <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
+* $('.sparkline').sparkline();
+* There must be no spaces in the enclosed data set
+*
+* Otherwise values must be an array of numbers or null values
+* <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
+* $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
+* $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
+*
+* Values can also be specified in an HTML comment, or as a values attribute:
+* <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
+* <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
+* $('.sparkline').sparkline();
+*
+* For line charts, x values can also be specified:
+* <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
+* $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
+*
+* By default, options should be passed in as teh second argument to the sparkline function:
+* $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
+*
+* Options can also be set by passing them on the tag itself. This feature is disabled by default though
+* as there's a slight performance overhead:
+* $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
+* <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
+* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
+*
+* Supported options:
+* lineColor - Color of the line used for the chart
+* fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
+* width - Width of the chart - Defaults to 3 times the number of values in pixels
+* height - Height of the chart - Defaults to the height of the containing element
+* chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
+* chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
+* chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
+* chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
+* chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
+* composite - If true then don't erase any existing chart attached to the tag, but draw
+* another chart over the top - Note that width and height are ignored if an
+* existing chart is detected.
+* tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
+* enableTagOptions - Whether to check tags for sparkline options
+* tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
+* disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
+* hidden dom element, avoding a browser reflow
+* disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
+* making the plugin perform much like it did in 1.x
+* disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
+* disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
+* defaults to false (highlights enabled)
+* highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
+* tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
+* tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
+* tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
+* tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
+* tooltipFormatter - Optional callback that allows you to override the HTML displayed in the tooltip
+* callback is given arguments of (sparkline, options, fields)
+* tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
+* tooltipFormat - A format string or SPFormat object (or an array thereof for multiple entries)
+* to control the format of the tooltip
+* tooltipPrefix - A string to prepend to each field displayed in a tooltip
+* tooltipSuffix - A string to append to each field displayed in a tooltip
+* tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
+* tooltipValueLookups - An object or range map to map field values to tooltip strings
+* (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
+* numberFormatter - Optional callback for formatting numbers in tooltips
+* numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
+* numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
+* numberDigitGroupCount - Number of digits between group separator - Defaults to 3
+*
+* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
+* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
+* line - Line chart. Options:
+* spotColor - Set to '' to not end each line in a circular spot
+* minSpotColor - If set, color of spot at minimum value
+* maxSpotColor - If set, color of spot at maximum value
+* spotRadius - Radius in pixels
+* lineWidth - Width of line in pixels
+* normalRangeMin
+* normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
+* or expected range of values
+* normalRangeColor - Color to use for the above bar
+* drawNormalOnTop - Draw the normal range above the chart fill color if true
+* defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
+* highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
+* highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
+* valueSpots - Specify which points to draw spots on, and in which color. Accepts a range map
+*
+* bar - Bar chart. Options:
+* barColor - Color of bars for postive values
+* negBarColor - Color of bars for negative values
+* zeroColor - Color of bars with zero values
+* nullColor - Color of bars with null values - Defaults to omitting the bar entirely
+* barWidth - Width of bars in pixels
+* colorMap - Optional mappnig of values to colors to override the *BarColor values above
+* can be an Array of values to control the color of individual bars or a range map
+* to specify colors for individual ranges of values
+* barSpacing - Gap between bars in pixels
+* zeroAxis - Centers the y-axis around zero if true
+*
+* tristate - Charts values of win (>0), lose (<0) or draw (=0)
+* posBarColor - Color of win values
+* negBarColor - Color of lose values
+* zeroBarColor - Color of draw values
+* barWidth - Width of bars in pixels
+* barSpacing - Gap between bars in pixels
+* colorMap - Optional mappnig of values to colors to override the *BarColor values above
+* can be an Array of values to control the color of individual bars or a range map
+* to specify colors for individual ranges of values
+*
+* discrete - Options:
+* lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
+* thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
+* thresholdColor
+*
+* bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
+* options:
+* targetColor - The color of the vertical target marker
+* targetWidth - The width of the target marker in pixels
+* performanceColor - The color of the performance measure horizontal bar
+* rangeColors - Colors to use for each qualitative range background color
+*
+* pie - Pie chart. Options:
+* sliceColors - An array of colors to use for pie slices
+* offset - Angle in degrees to offset the first slice - Try -90 or +90
+* borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
+* borderColor - Color to use for the pie chart border - Defaults to #000
+*
+* box - Box plot. Options:
+* raw - Set to true to supply pre-computed plot points as values
+* values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
+* When set to false you can supply any number of values and the box plot will
+* be computed for you. Default is false.
+* showOutliers - Set to true (default) to display outliers as circles
+* outlierIQR - Interquartile range used to determine outliers. Default 1.5
+* boxLineColor - Outline color of the box
+* boxFillColor - Fill color for the box
+* whiskerColor - Line color used for whiskers
+* outlierLineColor - Outline color of outlier circles
+* outlierFillColor - Fill color of the outlier circles
+* spotRadius - Radius of outlier circles
+* medianColor - Line color of the median line
+* target - Draw a target cross hair at the supplied value (default undefined)
+*
+*
+*
+* Examples:
+* $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
+* $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
+* $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
+* $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
+* $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
+* $('#pie').sparkline([1,1,2], { type:'pie' });
+*/
+
+/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
+
+(function(factory) {
+ if(typeof define === 'function' && define.amd) {
+ define(['jquery'], factory);
+ }
+ else {
+ factory(jQuery);
+ }
+}
+(function($) {
+ 'use strict';
+
+ var UNSET_OPTION = {},
+ getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
+ remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
+ MouseHandler, Tooltip, barHighlightMixin,
+ line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
+ VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
+
+ /**
+ * Default configuration settings
+ */
+ getDefaults = function () {
+ return {
+ // Settings common to most/all chart types
+ common: {
+ type: 'line',
+ lineColor: '#00f',
+ fillColor: '#cdf',
+ defaultPixelsPerValue: 3,
+ width: 'auto',
+ height: 'auto',
+ composite: false,
+ tagValuesAttribute: 'values',
+ tagOptionsPrefix: 'spark',
+ enableTagOptions: false,
+ enableHighlight: true,
+ highlightLighten: 1.4,
+ tooltipSkipNull: true,
+ tooltipPrefix: '',
+ tooltipSuffix: '',
+ disableHiddenCheck: false,
+ numberFormatter: false,
+ numberDigitGroupCount: 3,
+ numberDigitGroupSep: ',',
+ numberDecimalMark: '.',
+ disableTooltips: false,
+ disableInteraction: false
+ },
+ // Defaults for line charts
+ line: {
+ spotColor: '#f80',
+ highlightSpotColor: '#5f5',
+ highlightLineColor: '#f22',
+ spotRadius: 1.5,
+ minSpotColor: '#f80',
+ maxSpotColor: '#f80',
+ lineWidth: 1,
+ normalRangeMin: undefined,
+ normalRangeMax: undefined,
+ normalRangeColor: '#ccc',
+ drawNormalOnTop: false,
+ chartRangeMin: undefined,
+ chartRangeMax: undefined,
+ chartRangeMinX: undefined,
+ chartRangeMaxX: undefined,
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')
+ },
+ // Defaults for bar charts
+ bar: {
+ barColor: '#3366cc',
+ negBarColor: '#f44',
+ stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+ '#dd4477', '#0099c6', '#990099'],
+ zeroColor: undefined,
+ nullColor: undefined,
+ zeroAxis: true,
+ barWidth: 4,
+ barSpacing: 1,
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ chartRangeClip: false,
+ colorMap: undefined,
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')
+ },
+ // Defaults for tristate charts
+ tristate: {
+ barWidth: 4,
+ barSpacing: 1,
+ posBarColor: '#6f6',
+ negBarColor: '#f44',
+ zeroBarColor: '#999',
+ colorMap: {},
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),
+ tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
+ },
+ // Defaults for discrete charts
+ discrete: {
+ lineHeight: 'auto',
+ thresholdColor: undefined,
+ thresholdValue: 0,
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ chartRangeClip: false,
+ tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
+ },
+ // Defaults for bullet charts
+ bullet: {
+ targetColor: '#f33',
+ targetWidth: 3, // width of the target bar in pixels
+ performanceColor: '#33f',
+ rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
+ base: undefined, // set this to a number to change the base start number
+ tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
+ tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
+ },
+ // Defaults for pie charts
+ pie: {
+ offset: 0,
+ sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+ '#dd4477', '#0099c6', '#990099'],
+ borderWidth: 0,
+ borderColor: '#000',
+ tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')
+ },
+ // Defaults for box plots
+ box: {
+ raw: false,
+ boxLineColor: '#000',
+ boxFillColor: '#cdf',
+ whiskerColor: '#000',
+ outlierLineColor: '#333',
+ outlierFillColor: '#fff',
+ medianColor: '#f00',
+ showOutliers: true,
+ outlierIQR: 1.5,
+ spotRadius: 1.5,
+ target: undefined,
+ targetColor: '#4a2',
+ chartRangeMax: undefined,
+ chartRangeMin: undefined,
+ tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
+ tooltipFormatFieldlistKey: 'field',
+ tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
+ uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
+ lw: 'Left Whisker', rw: 'Right Whisker'} }
+ }
+ };
+ };
+
+ // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
+ defaultStyles = '.jqstooltip { ' +
+ 'position: absolute;' +
+ 'left: 0px;' +
+ 'top: 0px;' +
+ 'visibility: hidden;' +
+ 'background: rgb(0, 0, 0) transparent;' +
+ 'background-color: rgba(0,0,0,0.6);' +
+ 'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
+ '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
+ 'color: white;' +
+ 'font: 10px arial, san serif;' +
+ 'text-align: left;' +
+ 'white-space: nowrap;' +
+ 'padding: 5px;' +
+ 'border: 1px solid white;' +
+ 'z-index: 10000;' +
+ '}' +
+ '.jqsfield { ' +
+ 'color: white;' +
+ 'font: 10px arial, san serif;' +
+ 'text-align: left;' +
+ '}';
+
+ /**
+ * Utilities
+ */
+
+ createClass = function (/* [baseclass, [mixin, ...]], definition */) {
+ var Class, args;
+ Class = function () {
+ this.init.apply(this, arguments);
+ };
+ if (arguments.length > 1) {
+ if (arguments[0]) {
+ Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
+ Class._super = arguments[0].prototype;
+ } else {
+ Class.prototype = arguments[arguments.length - 1];
+ }
+ if (arguments.length > 2) {
+ args = Array.prototype.slice.call(arguments, 1, -1);
+ args.unshift(Class.prototype);
+ $.extend.apply($, args);
+ }
+ } else {
+ Class.prototype = arguments[0];
+ }
+ Class.prototype.cls = Class;
+ return Class;
+ };
+
+ /**
+ * Wraps a format string for tooltips
+ * {{x}}
+ * {{x.2}
+ * {{x:months}}
+ */
+ $.SPFormatClass = SPFormat = createClass({
+ fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
+ precre: /(\w+)\.(\d+)/,
+
+ init: function (format, fclass) {
+ this.format = format;
+ this.fclass = fclass;
+ },
+
+ render: function (fieldset, lookups, options) {
+ var self = this,
+ fields = fieldset,
+ match, token, lookupkey, fieldvalue, prec;
+ return this.format.replace(this.fre, function () {
+ var lookup;
+ token = arguments[1];
+ lookupkey = arguments[3];
+ match = self.precre.exec(token);
+ if (match) {
+ prec = match[2];
+ token = match[1];
+ } else {
+ prec = false;
+ }
+ fieldvalue = fields[token];
+ if (fieldvalue === undefined) {
+ return '';
+ }
+ if (lookupkey && lookups && lookups[lookupkey]) {
+ lookup = lookups[lookupkey];
+ if (lookup.get) { // RangeMap
+ return lookups[lookupkey].get(fieldvalue) || fieldvalue;
+ } else {
+ return lookups[lookupkey][fieldvalue] || fieldvalue;
+ }
+ }
+ if (isNumber(fieldvalue)) {
+ if (options.get('numberFormatter')) {
+ fieldvalue = options.get('numberFormatter')(fieldvalue);
+ } else {
+ fieldvalue = formatNumber(fieldvalue, prec,
+ options.get('numberDigitGroupCount'),
+ options.get('numberDigitGroupSep'),
+ options.get('numberDecimalMark'));
+ }
+ }
+ return fieldvalue;
+ });
+ }
+ });
+
+ // convience method to avoid needing the new operator
+ $.spformat = function(format, fclass) {
+ return new SPFormat(format, fclass);
+ };
+
+ clipval = function (val, min, max) {
+ if (val < min) {
+ return min;
+ }
+ if (val > max) {
+ return max;
+ }
+ return val;
+ };
+
+ quartile = function (values, q) {
+ var vl;
+ if (q === 2) {
+ vl = Math.floor(values.length / 2);
+ return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;
+ } else {
+ if (values.length % 2 ) { // odd
+ vl = (values.length * q + q) / 4;
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
+ } else { //even
+ vl = (values.length * q + 2) / 4;
+ return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];
+
+ }
+ }
+ };
+
+ normalizeValue = function (val) {
+ var nf;
+ switch (val) {
+ case 'undefined':
+ val = undefined;
+ break;
+ case 'null':
+ val = null;
+ break;
+ case 'true':
+ val = true;
+ break;
+ case 'false':
+ val = false;
+ break;
+ default:
+ nf = parseFloat(val);
+ if (val == nf) {
+ val = nf;
+ }
+ }
+ return val;
+ };
+
+ normalizeValues = function (vals) {
+ var i, result = [];
+ for (i = vals.length; i--;) {
+ result[i] = normalizeValue(vals[i]);
+ }
+ return result;
+ };
+
+ remove = function (vals, filter) {
+ var i, vl, result = [];
+ for (i = 0, vl = vals.length; i < vl; i++) {
+ if (vals[i] !== filter) {
+ result.push(vals[i]);
+ }
+ }
+ return result;
+ };
+
+ isNumber = function (num) {
+ return !isNaN(parseFloat(num)) && isFinite(num);
+ };
+
+ formatNumber = function (num, prec, groupsize, groupsep, decsep) {
+ var p, i;
+ num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
+ p = (p = $.inArray('.', num)) < 0 ? num.length : p;
+ if (p < num.length) {
+ num[p] = decsep;
+ }
+ for (i = p - groupsize; i > 0; i -= groupsize) {
+ num.splice(i, 0, groupsep);
+ }
+ return num.join('');
+ };
+
+ // determine if all values of an array match a value
+ // returns true if the array is empty
+ all = function (val, arr, ignoreNull) {
+ var i;
+ for (i = arr.length; i--; ) {
+ if (ignoreNull && arr[i] === null) continue;
+ if (arr[i] !== val) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ // sums the numeric values in an array, ignoring other values
+ sum = function (vals) {
+ var total = 0, i;
+ for (i = vals.length; i--;) {
+ total += typeof vals[i] === 'number' ? vals[i] : 0;
+ }
+ return total;
+ };
+
+ ensureArray = function (val) {
+ return $.isArray(val) ? val : [val];
+ };
+
+ // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
+ addCSS = function(css) {
+ var tag;
+ //if ('\v' == 'v') /* ie only */ {
+ if (document.createStyleSheet) {
+ document.createStyleSheet().cssText = css;
+ } else {
+ tag = document.createElement('style');
+ tag.type = 'text/css';
+ document.getElementsByTagName('head')[0].appendChild(tag);
+ tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
+ }
+ };
+
+ // Provide a cross-browser interface to a few simple drawing primitives
+ $.fn.simpledraw = function (width, height, useExisting, interact) {
+ var target, mhandler;
+ if (useExisting && (target = this.data('_jqs_vcanvas'))) {
+ return target;
+ }
+ if (width === undefined) {
+ width = $(this).innerWidth();
+ }
+ if (height === undefined) {
+ height = $(this).innerHeight();
+ }
+ if ($.fn.sparkline.hasCanvas) {
+ target = new VCanvas_canvas(width, height, this, interact);
+ } else if ($.fn.sparkline.hasVML) {
+ target = new VCanvas_vml(width, height, this);
+ } else {
+ return false;
+ }
+ mhandler = $(this).data('_jqs_mhandler');
+ if (mhandler) {
+ mhandler.registerCanvas(target);
+ }
+ return target;
+ };
+
+ $.fn.cleardraw = function () {
+ var target = this.data('_jqs_vcanvas');
+ if (target) {
+ target.reset();
+ }
+ };
+
+ $.RangeMapClass = RangeMap = createClass({
+ init: function (map) {
+ var key, range, rangelist = [];
+ for (key in map) {
+ if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
+ range = key.split(':');
+ range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
+ range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
+ range[2] = map[key];
+ rangelist.push(range);
+ }
+ }
+ this.map = map;
+ this.rangelist = rangelist || false;
+ },
+
+ get: function (value) {
+ var rangelist = this.rangelist,
+ i, range, result;
+ if ((result = this.map[value]) !== undefined) {
+ return result;
+ }
+ if (rangelist) {
+ for (i = rangelist.length; i--;) {
+ range = rangelist[i];
+ if (range[0] <= value && range[1] >= value) {
+ return range[2];
+ }
+ }
+ }
+ return undefined;
+ }
+ });
+
+ // Convenience function
+ $.range_map = function(map) {
+ return new RangeMap(map);
+ };
+
+ MouseHandler = createClass({
+ init: function (el, options) {
+ var $el = $(el);
+ this.$el = $el;
+ this.options = options;
+ this.currentPageX = 0;
+ this.currentPageY = 0;
+ this.el = el;
+ this.splist = [];
+ this.tooltip = null;
+ this.over = false;
+ this.displayTooltips = !options.get('disableTooltips');
+ this.highlightEnabled = !options.get('disableHighlight');
+ },
+
+ registerSparkline: function (sp) {
+ this.splist.push(sp);
+ if (this.over) {
+ this.updateDisplay();
+ }
+ },
+
+ registerCanvas: function (canvas) {
+ var $canvas = $(canvas.canvas);
+ this.canvas = canvas;
+ this.$canvas = $canvas;
+ $canvas.mouseenter($.proxy(this.mouseenter, this));
+ $canvas.mouseleave($.proxy(this.mouseleave, this));
+ $canvas.click($.proxy(this.mouseclick, this));
+ },
+
+ reset: function (removeTooltip) {
+ this.splist = [];
+ if (this.tooltip && removeTooltip) {
+ this.tooltip.remove();
+ this.tooltip = undefined;
+ }
+ },
+
+ mouseclick: function (e) {
+ var clickEvent = $.Event('sparklineClick');
+ clickEvent.originalEvent = e;
+ clickEvent.sparklines = this.splist;
+ this.$el.trigger(clickEvent);
+ },
+
+ mouseenter: function (e) {
+ $(document.body).unbind('mousemove.jqs');
+ $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
+ this.over = true;
+ this.currentPageX = e.pageX;
+ this.currentPageY = e.pageY;
+ this.currentEl = e.target;
+ if (!this.tooltip && this.displayTooltips) {
+ this.tooltip = new Tooltip(this.options);
+ this.tooltip.updatePosition(e.pageX, e.pageY);
+ }
+ this.updateDisplay();
+ },
+
+ mouseleave: function () {
+ $(document.body).unbind('mousemove.jqs');
+ var splist = this.splist,
+ spcount = splist.length,
+ needsRefresh = false,
+ sp, i;
+ this.over = false;
+ this.currentEl = null;
+
+ if (this.tooltip) {
+ this.tooltip.remove();
+ this.tooltip = null;
+ }
+
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ if (sp.clearRegionHighlight()) {
+ needsRefresh = true;
+ }
+ }
+
+ if (needsRefresh) {
+ this.canvas.render();
+ }
+ },
+
+ mousemove: function (e) {
+ this.currentPageX = e.pageX;
+ this.currentPageY = e.pageY;
+ this.currentEl = e.target;
+ if (this.tooltip) {
+ this.tooltip.updatePosition(e.pageX, e.pageY);
+ }
+ this.updateDisplay();
+ },
+
+ updateDisplay: function () {
+ var splist = this.splist,
+ spcount = splist.length,
+ needsRefresh = false,
+ offset = this.$canvas.offset(),
+ localX = this.currentPageX - offset.left,
+ localY = this.currentPageY - offset.top,
+ tooltiphtml, sp, i, result, changeEvent;
+ if (!this.over) {
+ return;
+ }
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ result = sp.setRegionHighlight(this.currentEl, localX, localY);
+ if (result) {
+ needsRefresh = true;
+ }
+ }
+ if (needsRefresh) {
+ changeEvent = $.Event('sparklineRegionChange');
+ changeEvent.sparklines = this.splist;
+ this.$el.trigger(changeEvent);
+ if (this.tooltip) {
+ tooltiphtml = '';
+ for (i = 0; i < spcount; i++) {
+ sp = splist[i];
+ tooltiphtml += sp.getCurrentRegionTooltip();
+ }
+ this.tooltip.setContent(tooltiphtml);
+ }
+ if (!this.disableHighlight) {
+ this.canvas.render();
+ }
+ }
+ if (result === null) {
+ this.mouseleave();
+ }
+ }
+ });
+
+
+ Tooltip = createClass({
+ sizeStyle: 'position: static !important;' +
+ 'display: block !important;' +
+ 'visibility: hidden !important;' +
+ 'float: left !important;',
+
+ init: function (options) {
+ var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
+ sizetipStyle = this.sizeStyle,
+ offset;
+ this.container = options.get('tooltipContainer') || document.body;
+ this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
+ this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
+ // remove any previous lingering tooltip
+ $('#jqssizetip').remove();
+ $('#jqstooltip').remove();
+ this.sizetip = $('<div/>', {
+ id: 'jqssizetip',
+ style: sizetipStyle,
+ 'class': tooltipClassname
+ });
+ this.tooltip = $('<div/>', {
+ id: 'jqstooltip',
+ 'class': tooltipClassname
+ }).appendTo(this.container);
+ // account for the container's location
+ offset = this.tooltip.offset();
+ this.offsetLeft = offset.left;
+ this.offsetTop = offset.top;
+ this.hidden = true;
+ $(window).unbind('resize.jqs scroll.jqs');
+ $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
+ this.updateWindowDims();
+ },
+
+ updateWindowDims: function () {
+ this.scrollTop = $(window).scrollTop();
+ this.scrollLeft = $(window).scrollLeft();
+ this.scrollRight = this.scrollLeft + $(window).width();
+ this.updatePosition();
+ },
+
+ getSize: function (content) {
+ this.sizetip.html(content).appendTo(this.container);
+ this.width = this.sizetip.width() + 1;
+ this.height = this.sizetip.height();
+ this.sizetip.remove();
+ },
+
+ setContent: function (content) {
+ if (!content) {
+ this.tooltip.css('visibility', 'hidden');
+ this.hidden = true;
+ return;
+ }
+ this.getSize(content);
+ this.tooltip.html(content)
+ .css({
+ 'width': this.width,
+ 'height': this.height,
+ 'visibility': 'visible'
+ });
+ if (this.hidden) {
+ this.hidden = false;
+ this.updatePosition();
+ }
+ },
+
+ updatePosition: function (x, y) {
+ if (x === undefined) {
+ if (this.mousex === undefined) {
+ return;
+ }
+ x = this.mousex - this.offsetLeft;
+ y = this.mousey - this.offsetTop;
+
+ } else {
+ this.mousex = x = x - this.offsetLeft;
+ this.mousey = y = y - this.offsetTop;
+ }
+ if (!this.height || !this.width || this.hidden) {
+ return;
+ }
+
+ y -= this.height + this.tooltipOffsetY;
+ x += this.tooltipOffsetX;
+
+ if (y < this.scrollTop) {
+ y = this.scrollTop;
+ }
+ if (x < this.scrollLeft) {
+ x = this.scrollLeft;
+ } else if (x + this.width > this.scrollRight) {
+ x = this.scrollRight - this.width;
+ }
+
+ this.tooltip.css({
+ 'left': x,
+ 'top': y
+ });
+ },
+
+ remove: function () {
+ this.tooltip.remove();
+ this.sizetip.remove();
+ this.sizetip = this.tooltip = undefined;
+ $(window).unbind('resize.jqs scroll.jqs');
+ }
+ });
+
+ initStyles = function() {
+ addCSS(defaultStyles);
+ };
+
+ $(initStyles);
+
+ pending = [];
+ $.fn.sparkline = function (userValues, userOptions) {
+ return this.each(function () {
+ var options = new $.fn.sparkline.options(this, userOptions),
+ $this = $(this),
+ render, i;
+ render = function () {
+ var values, width, height, tmp, mhandler, sp, vals;
+ if (userValues === 'html' || userValues === undefined) {
+ vals = this.getAttribute(options.get('tagValuesAttribute'));
+ if (vals === undefined || vals === null) {
+ vals = $this.html();
+ }
+ values = vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g, '').split(',');
+ } else {
+ values = userValues;
+ }
+
+ width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
+ if (options.get('height') === 'auto') {
+ if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
+ // must be a better way to get the line height
+ tmp = document.createElement('span');
+ tmp.innerHTML = 'a';
+ $this.html(tmp);
+ height = $(tmp).innerHeight() || $(tmp).height();
+ $(tmp).remove();
+ tmp = null;
+ }
+ } else {
+ height = options.get('height');
+ }
+
+ if (!options.get('disableInteraction')) {
+ mhandler = $.data(this, '_jqs_mhandler');
+ if (!mhandler) {
+ mhandler = new MouseHandler(this, options);
+ $.data(this, '_jqs_mhandler', mhandler);
+ } else if (!options.get('composite')) {
+ mhandler.reset();
+ }
+ } else {
+ mhandler = false;
+ }
+
+ if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
+ if (!$.data(this, '_jqs_errnotify')) {
+ alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
+ $.data(this, '_jqs_errnotify', true);
+ }
+ return;
+ }
+
+ sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
+
+ sp.render();
+
+ if (mhandler) {
+ mhandler.registerSparkline(sp);
+ }
+ };
+ // jQuery 1.3.0 completely changed the meaning of :hidden :-/
+ if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || ($.fn.jquery < '1.3.0' && $(this).parents().is(':hidden')) || !$(this).parents('body').length) {
+ if (!options.get('composite') && $.data(this, '_jqs_pending')) {
+ // remove any existing references to the element
+ for (i = pending.length; i; i--) {
+ if (pending[i - 1][0] == this) {
+ pending.splice(i - 1, 1);
+ }
+ }
+ }
+ pending.push([this, render]);
+ $.data(this, '_jqs_pending', true);
+ } else {
+ render.call(this);
+ }
+ });
+ };
+
+ $.fn.sparkline.defaults = getDefaults();
+
+
+ $.sparkline_display_visible = function () {
+ var el, i, pl;
+ var done = [];
+ for (i = 0, pl = pending.length; i < pl; i++) {
+ el = pending[i][0];
+ if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
+ pending[i][1].call(el);
+ $.data(pending[i][0], '_jqs_pending', false);
+ done.push(i);
+ } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
+ // element has been inserted and removed from the DOM
+ // If it was not yet inserted into the dom then the .data request
+ // will return true.
+ // removing from the dom causes the data to be removed.
+ $.data(pending[i][0], '_jqs_pending', false);
+ done.push(i);
+ }
+ }
+ for (i = done.length; i; i--) {
+ pending.splice(done[i - 1], 1);
+ }
+ };
+
+
+ /**
+ * User option handler
+ */
+ $.fn.sparkline.options = createClass({
+ init: function (tag, userOptions) {
+ var extendedOptions, defaults, base, tagOptionType;
+ this.userOptions = userOptions = userOptions || {};
+ this.tag = tag;
+ this.tagValCache = {};
+ defaults = $.fn.sparkline.defaults;
+ base = defaults.common;
+ this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
+
+ tagOptionType = this.getTagSetting('type');
+ if (tagOptionType === UNSET_OPTION) {
+ extendedOptions = defaults[userOptions.type || base.type];
+ } else {
+ extendedOptions = defaults[tagOptionType];
+ }
+ this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
+ },
+
+
+ getTagSetting: function (key) {
+ var prefix = this.tagOptionsPrefix,
+ val, i, pairs, keyval;
+ if (prefix === false || prefix === undefined) {
+ return UNSET_OPTION;
+ }
+ if (this.tagValCache.hasOwnProperty(key)) {
+ val = this.tagValCache.key;
+ } else {
+ val = this.tag.getAttribute(prefix + key);
+ if (val === undefined || val === null) {
+ val = UNSET_OPTION;
+ } else if (val.substr(0, 1) === '[') {
+ val = val.substr(1, val.length - 2).split(',');
+ for (i = val.length; i--;) {
+ val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
+ }
+ } else if (val.substr(0, 1) === '{') {
+ pairs = val.substr(1, val.length - 2).split(',');
+ val = {};
+ for (i = pairs.length; i--;) {
+ keyval = pairs[i].split(':', 2);
+ val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
+ }
+ } else {
+ val = normalizeValue(val);
+ }
+ this.tagValCache.key = val;
+ }
+ return val;
+ },
+
+ get: function (key, defaultval) {
+ var tagOption = this.getTagSetting(key),
+ result;
+ if (tagOption !== UNSET_OPTION) {
+ return tagOption;
+ }
+ return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
+ }
+ });
+
+
+ $.fn.sparkline._base = createClass({
+ disabled: false,
+
+ init: function (el, values, options, width, height) {
+ this.el = el;
+ this.$el = $(el);
+ this.values = values;
+ this.options = options;
+ this.width = width;
+ this.height = height;
+ this.currentRegion = undefined;
+ },
+
+ /**
+ * Setup the canvas
+ */
+ initTarget: function () {
+ var interactive = !this.options.get('disableInteraction');
+ if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
+ this.disabled = true;
+ } else {
+ this.canvasWidth = this.target.pixelWidth;
+ this.canvasHeight = this.target.pixelHeight;
+ }
+ },
+
+ /**
+ * Actually render the chart to the canvas
+ */
+ render: function () {
+ if (this.disabled) {
+ this.el.innerHTML = '';
+ return false;
+ }
+ return true;
+ },
+
+ /**
+ * Return a region id for a given x/y co-ordinate
+ */
+ getRegion: function (x, y) {
+ },
+
+ /**
+ * Highlight an item based on the moused-over x,y co-ordinate
+ */
+ setRegionHighlight: function (el, x, y) {
+ var currentRegion = this.currentRegion,
+ highlightEnabled = !this.options.get('disableHighlight'),
+ newRegion;
+ if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
+ return null;
+ }
+ newRegion = this.getRegion(el, x, y);
+ if (currentRegion !== newRegion) {
+ if (currentRegion !== undefined && highlightEnabled) {
+ this.removeHighlight();
+ }
+ this.currentRegion = newRegion;
+ if (newRegion !== undefined && highlightEnabled) {
+ this.renderHighlight();
+ }
+ return true;
+ }
+ return false;
+ },
+
+ /**
+ * Reset any currently highlighted item
+ */
+ clearRegionHighlight: function () {
+ if (this.currentRegion !== undefined) {
+ this.removeHighlight();
+ this.currentRegion = undefined;
+ return true;
+ }
+ return false;
+ },
+
+ renderHighlight: function () {
+ this.changeHighlight(true);
+ },
+
+ removeHighlight: function () {
+ this.changeHighlight(false);
+ },
+
+ changeHighlight: function (highlight) {},
+
+ /**
+ * Fetch the HTML to display as a tooltip
+ */
+ getCurrentRegionTooltip: function () {
+ var options = this.options,
+ header = '',
+ entries = [],
+ fields, formats, formatlen, fclass, text, i,
+ showFields, showFieldsKey, newFields, fv,
+ formatter, format, fieldlen, j;
+ if (this.currentRegion === undefined) {
+ return '';
+ }
+ fields = this.getCurrentRegionFields();
+ formatter = options.get('tooltipFormatter');
+ if (formatter) {
+ return formatter(this, options, fields);
+ }
+ if (options.get('tooltipChartTitle')) {
+ header += '<div class="jqs jqstitle">' + options.get('tooltipChartTitle') + '</div>\n';
+ }
+ formats = this.options.get('tooltipFormat');
+ if (!formats) {
+ return '';
+ }
+ if (!$.isArray(formats)) {
+ formats = [formats];
+ }
+ if (!$.isArray(fields)) {
+ fields = [fields];
+ }
+ showFields = this.options.get('tooltipFormatFieldlist');
+ showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
+ if (showFields && showFieldsKey) {
+ // user-selected ordering of fields
+ newFields = [];
+ for (i = fields.length; i--;) {
+ fv = fields[i][showFieldsKey];
+ if ((j = $.inArray(fv, showFields)) != -1) {
+ newFields[j] = fields[i];
+ }
+ }
+ fields = newFields;
+ }
+ formatlen = formats.length;
+ fieldlen = fields.length;
+ for (i = 0; i < formatlen; i++) {
+ format = formats[i];
+ if (typeof format === 'string') {
+ format = new SPFormat(format);
+ }
+ fclass = format.fclass || 'jqsfield';
+ for (j = 0; j < fieldlen; j++) {
+ if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
+ $.extend(fields[j], {
+ prefix: options.get('tooltipPrefix'),
+ suffix: options.get('tooltipSuffix')
+ });
+ text = format.render(fields[j], options.get('tooltipValueLookups'), options);
+ entries.push('<div class="' + fclass + '">' + text + '</div>');
+ }
+ }
+ }
+ if (entries.length) {
+ return header + entries.join('\n');
+ }
+ return '';
+ },
+
+ getCurrentRegionFields: function () {},
+
+ calcHighlightColor: function (color, options) {
+ var highlightColor = options.get('highlightColor'),
+ lighten = options.get('highlightLighten'),
+ parse, mult, rgbnew, i;
+ if (highlightColor) {
+ return highlightColor;
+ }
+ if (lighten) {
+ // extract RGB values
+ parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
+ if (parse) {
+ rgbnew = [];
+ mult = color.length === 4 ? 16 : 1;
+ for (i = 0; i < 3; i++) {
+ rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);
+ }
+ return 'rgb(' + rgbnew.join(',') + ')';
+ }
+
+ }
+ return color;
+ }
+
+ });
+
+ barHighlightMixin = {
+ changeHighlight: function (highlight) {
+ var currentRegion = this.currentRegion,
+ target = this.target,
+ shapeids = this.regionShapes[currentRegion],
+ newShapes;
+ // will be null if the region value was null
+ if (shapeids) {
+ newShapes = this.renderRegion(currentRegion, highlight);
+ if ($.isArray(newShapes) || $.isArray(shapeids)) {
+ target.replaceWithShapes(shapeids, newShapes);
+ this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {
+ return newShape.id;
+ });
+ } else {
+ target.replaceWithShape(shapeids, newShapes);
+ this.regionShapes[currentRegion] = newShapes.id;
+ }
+ }
+ },
+
+ render: function () {
+ var values = this.values,
+ target = this.target,
+ regionShapes = this.regionShapes,
+ shapes, ids, i, j;
+
+ if (!this.cls._super.render.call(this)) {
+ return;
+ }
+ for (i = values.length; i--;) {
+ shapes = this.renderRegion(i);
+ if (shapes) {
+ if ($.isArray(shapes)) {
+ ids = [];
+ for (j = shapes.length; j--;) {
+ shapes[j].append();
+ ids.push(shapes[j].id);
+ }
+ regionShapes[i] = ids;
+ } else {
+ shapes.append();
+ regionShapes[i] = shapes.id; // store just the shapeid
+ }
+ } else {
+ // null value
+ regionShapes[i] = null;
+ }
+ }
+ target.render();
+ }
+ };
+
+ /**
+ * Line charts
+ */
+ $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {
+ type: 'line',
+
+ init: function (el, values, options, width, height) {
+ line._super.init.call(this, el, values, options, width, height);
+ this.vertices = [];
+ this.regionMap = [];
+ this.xvalues = [];
+ this.yvalues = [];
+ this.yminmax = [];
+ this.hightlightSpotId = null;
+ this.lastShapeId = null;
+ this.initTarget();
+ },
+
+ getRegion: function (el, x, y) {
+ var i,
+ regionMap = this.regionMap; // maps regions to value positions
+ for (i = regionMap.length; i--;) {
+ if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {
+ return regionMap[i][2];
+ }
+ }
+ return undefined;
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion;
+ return {
+ isNull: this.yvalues[currentRegion] === null,
+ x: this.xvalues[currentRegion],
+ y: this.yvalues[currentRegion],
+ color: this.options.get('lineColor'),
+ fillColor: this.options.get('fillColor'),
+ offset: currentRegion
+ };
+ },
+
+ renderHighlight: function () {
+ var currentRegion = this.currentRegion,
+ target = this.target,
+ vertex = this.vertices[currentRegion],
+ options = this.options,
+ spotRadius = options.get('spotRadius'),
+ highlightSpotColor = options.get('highlightSpotColor'),
+ highlightLineColor = options.get('highlightLineColor'),
+ highlightSpot, highlightLine;
+
+ if (!vertex) {
+ return;
+ }
+ if (spotRadius && highlightSpotColor) {
+ highlightSpot = target.drawCircle(vertex[0], vertex[1],
+ spotRadius, undefined, highlightSpotColor);
+ this.highlightSpotId = highlightSpot.id;
+ target.insertAfterShape(this.lastShapeId, highlightSpot);
+ }
+ if (highlightLineColor) {
+ highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],
+ this.canvasTop + this.canvasHeight, highlightLineColor);
+ this.highlightLineId = highlightLine.id;
+ target.insertAfterShape(this.lastShapeId, highlightLine);
+ }
+ },
+
+ removeHighlight: function () {
+ var target = this.target;
+ if (this.highlightSpotId) {
+ target.removeShapeId(this.highlightSpotId);
+ this.highlightSpotId = null;
+ }
+ if (this.highlightLineId) {
+ target.removeShapeId(this.highlightLineId);
+ this.highlightLineId = null;
+ }
+ },
+
+ scanValues: function () {
+ var values = this.values,
+ valcount = values.length,
+ xvalues = this.xvalues,
+ yvalues = this.yvalues,
+ yminmax = this.yminmax,
+ i, val, isStr, isArray, sp;
+ for (i = 0; i < valcount; i++) {
+ val = values[i];
+ isStr = typeof(values[i]) === 'string';
+ isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;
+ sp = isStr && values[i].split(':');
+ if (isStr && sp.length === 2) { // x:y
+ xvalues.push(Number(sp[0]));
+ yvalues.push(Number(sp[1]));
+ yminmax.push(Number(sp[1]));
+ } else if (isArray) {
+ xvalues.push(val[0]);
+ yvalues.push(val[1]);
+ yminmax.push(val[1]);
+ } else {
+ xvalues.push(i);
+ if (values[i] === null || values[i] === 'null') {
+ yvalues.push(null);
+ } else {
+ yvalues.push(Number(val));
+ yminmax.push(Number(val));
+ }
+ }
+ }
+ if (this.options.get('xvalues')) {
+ xvalues = this.options.get('xvalues');
+ }
+
+ this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);
+ this.miny = this.minyorg = Math.min.apply(Math, yminmax);
+
+ this.maxx = Math.max.apply(Math, xvalues);
+ this.minx = Math.min.apply(Math, xvalues);
+
+ this.xvalues = xvalues;
+ this.yvalues = yvalues;
+ this.yminmax = yminmax;
+
+ },
+
+ processRangeOptions: function () {
+ var options = this.options,
+ normalRangeMin = options.get('normalRangeMin'),
+ normalRangeMax = options.get('normalRangeMax');
+
+ if (normalRangeMin !== undefined) {
+ if (normalRangeMin < this.miny) {
+ this.miny = normalRangeMin;
+ }
+ if (normalRangeMax > this.maxy) {
+ this.maxy = normalRangeMax;
+ }
+ }
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {
+ this.miny = options.get('chartRangeMin');
+ }
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {
+ this.maxy = options.get('chartRangeMax');
+ }
+ if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
+ this.minx = options.get('chartRangeMinX');
+ }
+ if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {
+ this.maxx = options.get('chartRangeMaxX');
+ }
+
+ },
+
+ drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {
+ var normalRangeMin = this.options.get('normalRangeMin'),
+ normalRangeMax = this.options.get('normalRangeMax'),
+ ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),
+ height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);
+ this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();
+ },
+
+ render: function () {
+ var options = this.options,
+ target = this.target,
+ canvasWidth = this.canvasWidth,
+ canvasHeight = this.canvasHeight,
+ vertices = this.vertices,
+ spotRadius = options.get('spotRadius'),
+ regionMap = this.regionMap,
+ rangex, rangey, yvallast,
+ canvasTop, canvasLeft,
+ vertex, path, paths, x, y, xnext, xpos, xposnext,
+ last, next, yvalcount, lineShapes, fillShapes, plen,
+ valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;
+
+ if (!line._super.render.call(this)) {
+ return;
+ }
+
+ this.scanValues();
+ this.processRangeOptions();
+
+ xvalues = this.xvalues;
+ yvalues = this.yvalues;
+
+ if (!this.yminmax.length || this.yvalues.length < 2) {
+ // empty or all null valuess
+ return;
+ }
+
+ canvasTop = canvasLeft = 0;
+
+ rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;
+ rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;
+ yvallast = this.yvalues.length - 1;
+
+ if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {
+ spotRadius = 0;
+ }
+ if (spotRadius) {
+ // adjust the canvas size as required so that spots will fit
+ hlSpotsEnabled = options.get('highlightSpotColor') && !options.get('disableInteraction');
+ if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {
+ canvasHeight -= Math.ceil(spotRadius);
+ }
+ if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {
+ canvasHeight -= Math.ceil(spotRadius);
+ canvasTop += Math.ceil(spotRadius);
+ }
+ if (hlSpotsEnabled ||
+ ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {
+ canvasLeft += Math.ceil(spotRadius);
+ canvasWidth -= Math.ceil(spotRadius);
+ }
+ if (hlSpotsEnabled || options.get('spotColor') ||
+ (options.get('minSpotColor') || options.get('maxSpotColor') &&
+ (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
+ canvasWidth -= Math.ceil(spotRadius);
+ }
+ }
+
+
+ canvasHeight--;
+
+ if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {
+ this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+ }
+
+ path = [];
+ paths = [path];
+ last = next = null;
+ yvalcount = yvalues.length;
+ for (i = 0; i < yvalcount; i++) {
+ x = xvalues[i];
+ xnext = xvalues[i + 1];
+ y = yvalues[i];
+ xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));
+ xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;
+ next = xpos + ((xposnext - xpos) / 2);
+ regionMap[i] = [last || 0, next, i];
+ last = next;
+ if (y === null) {
+ if (i) {
+ if (yvalues[i - 1] !== null) {
+ path = [];
+ paths.push(path);
+ }
+ vertices.push(null);
+ }
+ } else {
+ if (y < this.miny) {
+ y = this.miny;
+ }
+ if (y > this.maxy) {
+ y = this.maxy;
+ }
+ if (!path.length) {
+ // previous value was null
+ path.push([xpos, canvasTop + canvasHeight]);
+ }
+ vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];
+ path.push(vertex);
+ vertices.push(vertex);
+ }
+ }
+
+ lineShapes = [];
+ fillShapes = [];
+ plen = paths.length;
+ for (i = 0; i < plen; i++) {
+ path = paths[i];
+ if (path.length) {
+ if (options.get('fillColor')) {
+ path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);
+ fillShapes.push(path.slice(0));
+ path.pop();
+ }
+ // if there's only a single point in this path, then we want to display it
+ // as a vertical line which means we keep path[0] as is
+ if (path.length > 2) {
+ // else we want the first value
+ path[0] = [path[0][0], path[1][1]];
+ }
+ lineShapes.push(path);
+ }
+ }
+
+ // draw the fill first, then optionally the normal range, then the line on top of that
+ plen = fillShapes.length;
+ for (i = 0; i < plen; i++) {
+ target.drawShape(fillShapes[i],
+ options.get('fillColor'), options.get('fillColor')).append();
+ }
+
+ if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {
+ this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+ }
+
+ plen = lineShapes.length;
+ for (i = 0; i < plen; i++) {
+ target.drawShape(lineShapes[i], options.get('lineColor'), undefined,
+ options.get('lineWidth')).append();
+ }
+
+ if (spotRadius && options.get('valueSpots')) {
+ valueSpots = options.get('valueSpots');
+ if (valueSpots.get === undefined) {
+ valueSpots = new RangeMap(valueSpots);
+ }
+ for (i = 0; i < yvalcount; i++) {
+ color = valueSpots.get(yvalues[i]);
+ if (color) {
+ target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),
+ spotRadius, undefined,
+ color).append();
+ }
+ }
+
+ }
+ if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {
+ target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),
+ spotRadius, undefined,
+ options.get('spotColor')).append();
+ }
+ if (this.maxy !== this.minyorg) {
+ if (spotRadius && options.get('minSpotColor')) {
+ x = xvalues[$.inArray(this.minyorg, yvalues)];
+ target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),
+ spotRadius, undefined,
+ options.get('minSpotColor')).append();
+ }
+ if (spotRadius && options.get('maxSpotColor')) {
+ x = xvalues[$.inArray(this.maxyorg, yvalues)];
+ target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+ canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),
+ spotRadius, undefined,
+ options.get('maxSpotColor')).append();
+ }
+ }
+
+ this.lastShapeId = target.getLastShapeId();
+ this.canvasTop = canvasTop;
+ target.render();
+ }
+ });
+
+ /**
+ * Bar charts
+ */
+ $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {
+ type: 'bar',
+
+ init: function (el, values, options, width, height) {
+ var barWidth = parseInt(options.get('barWidth'), 10),
+ barSpacing = parseInt(options.get('barSpacing'), 10),
+ chartRangeMin = options.get('chartRangeMin'),
+ chartRangeMax = options.get('chartRangeMax'),
+ chartRangeClip = options.get('chartRangeClip'),
+ stackMin = Infinity,
+ stackMax = -Infinity,
+ isStackString, groupMin, groupMax, stackRanges,
+ numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,
+ stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;
+ bar._super.init.call(this, el, values, options, width, height);
+
+ // scan values to determine whether to stack bars
+ for (i = 0, vlen = values.length; i < vlen; i++) {
+ val = values[i];
+ isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;
+ if (isStackString || $.isArray(val)) {
+ stacked = true;
+ if (isStackString) {
+ val = values[i] = normalizeValues(val.split(':'));
+ }
+ val = remove(val, null); // min/max will treat null as zero
+ groupMin = Math.min.apply(Math, val);
+ groupMax = Math.max.apply(Math, val);
+ if (groupMin < stackMin) {
+ stackMin = groupMin;
+ }
+ if (groupMax > stackMax) {
+ stackMax = groupMax;
+ }
+ }
+ }
+
+ this.stacked = stacked;
+ this.regionShapes = {};
+ this.barWidth = barWidth;
+ this.barSpacing = barSpacing;
+ this.totalBarWidth = barWidth + barSpacing;
+ this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+ this.initTarget();
+
+ if (chartRangeClip) {
+ clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;
+ clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;
+ }
+
+ numValues = [];
+ stackRanges = stacked ? [] : numValues;
+ var stackTotals = [];
+ var stackRangesNeg = [];
+ for (i = 0, vlen = values.length; i < vlen; i++) {
+ if (stacked) {
+ vlist = values[i];
+ values[i] = svals = [];
+ stackTotals[i] = 0;
+ stackRanges[i] = stackRangesNeg[i] = 0;
+ for (j = 0, slen = vlist.length; j < slen; j++) {
+ val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];
+ if (val !== null) {
+ if (val > 0) {
+ stackTotals[i] += val;
+ }
+ if (stackMin < 0 && stackMax > 0) {
+ if (val < 0) {
+ stackRangesNeg[i] += Math.abs(val);
+ } else {
+ stackRanges[i] += val;
+ }
+ } else {
+ stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));
+ }
+ numValues.push(val);
+ }
+ }
+ } else {
+ val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];
+ val = values[i] = normalizeValue(val);
+ if (val !== null) {
+ numValues.push(val);
+ }
+ }
+ }
+ this.max = max = Math.max.apply(Math, numValues);
+ this.min = min = Math.min.apply(Math, numValues);
+ this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;
+ this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;
+
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {
+ min = options.get('chartRangeMin');
+ }
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {
+ max = options.get('chartRangeMax');
+ }
+
+ this.zeroAxis = zeroAxis = options.get('zeroAxis', true);
+ if (min <= 0 && max >= 0 && zeroAxis) {
+ xaxisOffset = 0;
+ } else if (zeroAxis == false) {
+ xaxisOffset = min;
+ } else if (min > 0) {
+ xaxisOffset = min;
+ } else {
+ xaxisOffset = max;
+ }
+ this.xaxisOffset = xaxisOffset;
+
+ range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;
+
+ // as we plot zero/min values a single pixel line, we add a pixel to all other
+ // values - Reduce the effective canvas size to suit
+ this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;
+
+ if (min < xaxisOffset) {
+ yMaxCalc = (stacked && max >= 0) ? stackMax : max;
+ yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;
+ if (yoffset !== Math.ceil(yoffset)) {
+ this.canvasHeightEf -= 2;
+ yoffset = Math.ceil(yoffset);
+ }
+ } else {
+ yoffset = this.canvasHeight;
+ }
+ this.yoffset = yoffset;
+
+ if ($.isArray(options.get('colorMap'))) {
+ this.colorMapByIndex = options.get('colorMap');
+ this.colorMapByValue = null;
+ } else {
+ this.colorMapByIndex = null;
+ this.colorMapByValue = options.get('colorMap');
+ if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+ this.colorMapByValue = new RangeMap(this.colorMapByValue);
+ }
+ }
+
+ this.range = range;
+ },
+
+ getRegion: function (el, x, y) {
+ var result = Math.floor(x / this.totalBarWidth);
+ return (result < 0 || result >= this.values.length) ? undefined : result;
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion,
+ values = ensureArray(this.values[currentRegion]),
+ result = [],
+ value, i;
+ for (i = values.length; i--;) {
+ value = values[i];
+ result.push({
+ isNull: value === null,
+ value: value,
+ color: this.calcColor(i, value, currentRegion),
+ offset: currentRegion
+ });
+ }
+ return result;
+ },
+
+ calcColor: function (stacknum, value, valuenum) {
+ var colorMapByIndex = this.colorMapByIndex,
+ colorMapByValue = this.colorMapByValue,
+ options = this.options,
+ color, newColor;
+ if (this.stacked) {
+ color = options.get('stackedBarColor');
+ } else {
+ color = (value < 0) ? options.get('negBarColor') : options.get('barColor');
+ }
+ if (value === 0 && options.get('zeroColor') !== undefined) {
+ color = options.get('zeroColor');
+ }
+ if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+ color = newColor;
+ } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+ color = colorMapByIndex[valuenum];
+ }
+ return $.isArray(color) ? color[stacknum % color.length] : color;
+ },
+
+ /**
+ * Render bar(s) for a region
+ */
+ renderRegion: function (valuenum, highlight) {
+ var vals = this.values[valuenum],
+ options = this.options,
+ xaxisOffset = this.xaxisOffset,
+ result = [],
+ range = this.range,
+ stacked = this.stacked,
+ target = this.target,
+ x = valuenum * this.totalBarWidth,
+ canvasHeightEf = this.canvasHeightEf,
+ yoffset = this.yoffset,
+ y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;
+
+ vals = $.isArray(vals) ? vals : [vals];
+ valcount = vals.length;
+ val = vals[0];
+ isNull = all(null, vals);
+ allMin = all(xaxisOffset, vals, true);
+
+ if (isNull) {
+ if (options.get('nullColor')) {
+ color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);
+ y = (yoffset > 0) ? yoffset - 1 : yoffset;
+ return target.drawRect(x, y, this.barWidth - 1, 0, color, color);
+ } else {
+ return undefined;
+ }
+ }
+ yoffsetNeg = yoffset;
+ for (i = 0; i < valcount; i++) {
+ val = vals[i];
+
+ if (stacked && val === xaxisOffset) {
+ if (!allMin || minPlotted) {
+ continue;
+ }
+ minPlotted = true;
+ }
+
+ if (range > 0) {
+ height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;
+ } else {
+ height = 1;
+ }
+ if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {
+ y = yoffsetNeg;
+ yoffsetNeg += height;
+ } else {
+ y = yoffset - height;
+ yoffset -= height;
+ }
+ color = this.calcColor(i, val, valuenum);
+ if (highlight) {
+ color = this.calcHighlightColor(color, options);
+ }
+ result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));
+ }
+ if (result.length === 1) {
+ return result[0];
+ }
+ return result;
+ }
+ });
+
+ /**
+ * Tristate charts
+ */
+ $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {
+ type: 'tristate',
+
+ init: function (el, values, options, width, height) {
+ var barWidth = parseInt(options.get('barWidth'), 10),
+ barSpacing = parseInt(options.get('barSpacing'), 10);
+ tristate._super.init.call(this, el, values, options, width, height);
+
+ this.regionShapes = {};
+ this.barWidth = barWidth;
+ this.barSpacing = barSpacing;
+ this.totalBarWidth = barWidth + barSpacing;
+ this.values = $.map(values, Number);
+ this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+ if ($.isArray(options.get('colorMap'))) {
+ this.colorMapByIndex = options.get('colorMap');
+ this.colorMapByValue = null;
+ } else {
+ this.colorMapByIndex = null;
+ this.colorMapByValue = options.get('colorMap');
+ if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+ this.colorMapByValue = new RangeMap(this.colorMapByValue);
+ }
+ }
+ this.initTarget();
+ },
+
+ getRegion: function (el, x, y) {
+ return Math.floor(x / this.totalBarWidth);
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion;
+ return {
+ isNull: this.values[currentRegion] === undefined,
+ value: this.values[currentRegion],
+ color: this.calcColor(this.values[currentRegion], currentRegion),
+ offset: currentRegion
+ };
+ },
+
+ calcColor: function (value, valuenum) {
+ var values = this.values,
+ options = this.options,
+ colorMapByIndex = this.colorMapByIndex,
+ colorMapByValue = this.colorMapByValue,
+ color, newColor;
+
+ if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+ color = newColor;
+ } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+ color = colorMapByIndex[valuenum];
+ } else if (values[valuenum] < 0) {
+ color = options.get('negBarColor');
+ } else if (values[valuenum] > 0) {
+ color = options.get('posBarColor');
+ } else {
+ color = options.get('zeroBarColor');
+ }
+ return color;
+ },
+
+ renderRegion: function (valuenum, highlight) {
+ var values = this.values,
+ options = this.options,
+ target = this.target,
+ canvasHeight, height, halfHeight,
+ x, y, color;
+
+ canvasHeight = target.pixelHeight;
+ halfHeight = Math.round(canvasHeight / 2);
+
+ x = valuenum * this.totalBarWidth;
+ if (values[valuenum] < 0) {
+ y = halfHeight;
+ height = halfHeight - 1;
+ } else if (values[valuenum] > 0) {
+ y = 0;
+ height = halfHeight - 1;
+ } else {
+ y = halfHeight - 1;
+ height = 2;
+ }
+ color = this.calcColor(values[valuenum], valuenum);
+ if (color === null) {
+ return;
+ }
+ if (highlight) {
+ color = this.calcHighlightColor(color, options);
+ }
+ return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);
+ }
+ });
+
+ /**
+ * Discrete charts
+ */
+ $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {
+ type: 'discrete',
+
+ init: function (el, values, options, width, height) {
+ discrete._super.init.call(this, el, values, options, width, height);
+
+ this.regionShapes = {};
+ this.values = values = $.map(values, Number);
+ this.min = Math.min.apply(Math, values);
+ this.max = Math.max.apply(Math, values);
+ this.range = this.max - this.min;
+ this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;
+ this.interval = Math.floor(width / values.length);
+ this.itemWidth = width / values.length;
+ if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {
+ this.min = options.get('chartRangeMin');
+ }
+ if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {
+ this.max = options.get('chartRangeMax');
+ }
+ this.initTarget();
+ if (this.target) {
+ this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');
+ }
+ },
+
+ getRegion: function (el, x, y) {
+ return Math.floor(x / this.itemWidth);
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion;
+ return {
+ isNull: this.values[currentRegion] === undefined,
+ value: this.values[currentRegion],
+ offset: currentRegion
+ };
+ },
+
+ renderRegion: function (valuenum, highlight) {
+ var values = this.values,
+ options = this.options,
+ min = this.min,
+ max = this.max,
+ range = this.range,
+ interval = this.interval,
+ target = this.target,
+ canvasHeight = this.canvasHeight,
+ lineHeight = this.lineHeight,
+ pheight = canvasHeight - lineHeight,
+ ytop, val, color, x;
+
+ val = clipval(values[valuenum], min, max);
+ x = valuenum * interval;
+ ytop = Math.round(pheight - pheight * ((val - min) / range));
+ color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');
+ if (highlight) {
+ color = this.calcHighlightColor(color, options);
+ }
+ return target.drawLine(x, ytop, x, ytop + lineHeight, color);
+ }
+ });
+
+ /**
+ * Bullet charts
+ */
+ $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {
+ type: 'bullet',
+
+ init: function (el, values, options, width, height) {
+ var min, max, vals;
+ bullet._super.init.call(this, el, values, options, width, height);
+
+ // values: target, performance, range1, range2, range3
+ this.values = values = normalizeValues(values);
+ // target or performance could be null
+ vals = values.slice();
+ vals[0] = vals[0] === null ? vals[2] : vals[0];
+ vals[1] = values[1] === null ? vals[2] : vals[1];
+ min = Math.min.apply(Math, values);
+ max = Math.max.apply(Math, values);
+ if (options.get('base') === undefined) {
+ min = min < 0 ? min : 0;
+ } else {
+ min = options.get('base');
+ }
+ this.min = min;
+ this.max = max;
+ this.range = max - min;
+ this.shapes = {};
+ this.valueShapes = {};
+ this.regiondata = {};
+ this.width = width = options.get('width') === 'auto' ? '4.0em' : width;
+ this.target = this.$el.simpledraw(width, height, options.get('composite'));
+ if (!values.length) {
+ this.disabled = true;
+ }
+ this.initTarget();
+ },
+
+ getRegion: function (el, x, y) {
+ var shapeid = this.target.getShapeAt(el, x, y);
+ return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion;
+ return {
+ fieldkey: currentRegion.substr(0, 1),
+ value: this.values[currentRegion.substr(1)],
+ region: currentRegion
+ };
+ },
+
+ changeHighlight: function (highlight) {
+ var currentRegion = this.currentRegion,
+ shapeid = this.valueShapes[currentRegion],
+ shape;
+ delete this.shapes[shapeid];
+ switch (currentRegion.substr(0, 1)) {
+ case 'r':
+ shape = this.renderRange(currentRegion.substr(1), highlight);
+ break;
+ case 'p':
+ shape = this.renderPerformance(highlight);
+ break;
+ case 't':
+ shape = this.renderTarget(highlight);
+ break;
+ }
+ this.valueShapes[currentRegion] = shape.id;
+ this.shapes[shape.id] = currentRegion;
+ this.target.replaceWithShape(shapeid, shape);
+ },
+
+ renderRange: function (rn, highlight) {
+ var rangeval = this.values[rn],
+ rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),
+ color = this.options.get('rangeColors')[rn - 2];
+ if (highlight) {
+ color = this.calcHighlightColor(color, this.options);
+ }
+ return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);
+ },
+
+ renderPerformance: function (highlight) {
+ var perfval = this.values[1],
+ perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),
+ color = this.options.get('performanceColor');
+ if (highlight) {
+ color = this.calcHighlightColor(color, this.options);
+ }
+ return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,
+ Math.round(this.canvasHeight * 0.4) - 1, color, color);
+ },
+
+ renderTarget: function (highlight) {
+ var targetval = this.values[0],
+ x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),
+ targettop = Math.round(this.canvasHeight * 0.10),
+ targetheight = this.canvasHeight - (targettop * 2),
+ color = this.options.get('targetColor');
+ if (highlight) {
+ color = this.calcHighlightColor(color, this.options);
+ }
+ return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);
+ },
+
+ render: function () {
+ var vlen = this.values.length,
+ target = this.target,
+ i, shape;
+ if (!bullet._super.render.call(this)) {
+ return;
+ }
+ for (i = 2; i < vlen; i++) {
+ shape = this.renderRange(i).append();
+ this.shapes[shape.id] = 'r' + i;
+ this.valueShapes['r' + i] = shape.id;
+ }
+ if (this.values[1] !== null) {
+ shape = this.renderPerformance().append();
+ this.shapes[shape.id] = 'p1';
+ this.valueShapes.p1 = shape.id;
+ }
+ if (this.values[0] !== null) {
+ shape = this.renderTarget().append();
+ this.shapes[shape.id] = 't0';
+ this.valueShapes.t0 = shape.id;
+ }
+ target.render();
+ }
+ });
+
+ /**
+ * Pie charts
+ */
+ $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {
+ type: 'pie',
+
+ init: function (el, values, options, width, height) {
+ var total = 0, i;
+
+ pie._super.init.call(this, el, values, options, width, height);
+
+ this.shapes = {}; // map shape ids to value offsets
+ this.valueShapes = {}; // maps value offsets to shape ids
+ this.values = values = $.map(values, Number);
+
+ if (options.get('width') === 'auto') {
+ this.width = this.height;
+ }
+
+ if (values.length > 0) {
+ for (i = values.length; i--;) {
+ total += values[i];
+ }
+ }
+ this.total = total;
+ this.initTarget();
+ this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);
+ },
+
+ getRegion: function (el, x, y) {
+ var shapeid = this.target.getShapeAt(el, x, y);
+ return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
+ },
+
+ getCurrentRegionFields: function () {
+ var currentRegion = this.currentRegion;
+ return {
+ isNull: this.values[currentRegion] === undefined,
+ value: this.values[currentRegion],
+ percent: this.values[currentRegion] / this.total * 100,
+ color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],
+ offset: currentRegion
+ };
+ },
+
+ changeHighlight: function (highlight) {
+ var currentRegion = this.currentRegion,
+ newslice = this.renderSlice(currentRegion, highlight),
+ shapeid = this.valueShapes[currentRegion];
+ delete this.shapes[shapeid];
+ this.target.replaceWithShape(shapeid, newslice);
+ this.valueShapes[currentRegion] = newslice.id;
+ this.shapes[newslice.id] = currentRegion;
+ },
+
+ renderSlice: function (valuenum, highlight) {
+ var target = this.target,
+ options = this.options,
+ radius = this.radius,
+ borderWidth = options.get('borderWidth'),
+ offset = options.get('offset'),
+ circle = 2 * Math.PI,
+ values = this.values,
+ total = this.total,
+ next = offset ? (2*Math.PI)*(offset/360) : 0,
+ start, end, i, vlen, color;
+
+ vlen = values.length;
+ for (i = 0; i < vlen; i++) {
+ start = next;
+ end = next;
+ if (total > 0) { // avoid divide by zero
+ end = next + (circle * (values[i] / total));
+ }
+ if (valuenum === i) {
+ color = options.get('sliceColors')[i % options.get('sliceColors').length];
+ if (highlight) {
+ color = this.calcHighlightColor(color, options);
+ }
+
+ return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);
+ }
+ next = end;
+ }
+ },
+
+ render: function () {
+ var target = this.target,
+ values = this.values,
+ options = this.options,
+ radius = this.radius,
+ borderWidth = options.get('borderWidth'),
+ shape, i;
+
+ if (!pie._super.render.call(this)) {
+ return;
+ }
+ if (borderWidth) {
+ target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),
+ options.get('borderColor'), undefined, borderWidth).append();
+ }
+ for (i = values.length; i--;) {
+ if (values[i]) { // don't render zero values
+ shape = this.renderSlice(i).append();
+ this.valueShapes[i] = shape.id; // store just the shapeid
+ this.shapes[shape.id] = i;
+ }
+ }
+ target.render();
+ }
+ });
+
+ /**
+ * Box plots
+ */
+ $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {
+ type: 'box',
+
+ init: function (el, values, options, width, height) {
+ box._super.init.call(this, el, values, options, width, height);
+ this.values = $.map(values, Number);
+ this.width = options.get('width') === 'auto' ? '4.0em' : width;
+ this.initTarget();
+ if (!this.values.length) {
+ this.disabled = 1;
+ }
+ },
+
+ /**
+ * Simulate a single region
+ */
+ getRegion: function () {
+ return 1;
+ },
+
+ getCurrentRegionFields: function () {
+ var result = [
+ { field: 'lq', value: this.quartiles[0] },
+ { field: 'med', value: this.quartiles[1] },
+ { field: 'uq', value: this.quartiles[2] }
+ ];
+ if (this.loutlier !== undefined) {
+ result.push({ field: 'lo', value: this.loutlier});
+ }
+ if (this.routlier !== undefined) {
+ result.push({ field: 'ro', value: this.routlier});
+ }
+ if (this.lwhisker !== undefined) {
+ result.push({ field: 'lw', value: this.lwhisker});
+ }
+ if (this.rwhisker !== undefined) {
+ result.push({ field: 'rw', value: this.rwhisker});
+ }
+ return result;
+ },
+
+ render: function () {
+ var target = this.target,
+ values = this.values,
+ vlen = values.length,
+ options = this.options,
+ canvasWidth = this.canvasWidth,
+ canvasHeight = this.canvasHeight,
+ minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),
+ maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),
+ canvasLeft = 0,
+ lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,
+ size, unitSize;
+
+ if (!box._super.render.call(this)) {
+ return;
+ }
+
+ if (options.get('raw')) {
+ if (options.get('showOutliers') && values.length > 5) {
+ loutlier = values[0];
+ lwhisker = values[1];
+ q1 = values[2];
+ q2 = values[3];
+ q3 = values[4];
+ rwhisker = values[5];
+ routlier = values[6];
+ } else {
+ lwhisker = values[0];
+ q1 = values[1];
+ q2 = values[2];
+ q3 = values[3];
+ rwhisker = values[4];
+ }
+ } else {
+ values.sort(function (a, b) { return a - b; });
+ q1 = quartile(values, 1);
+ q2 = quartile(values, 2);
+ q3 = quartile(values, 3);
+ iqr = q3 - q1;
+ if (options.get('showOutliers')) {
+ lwhisker = rwhisker = undefined;
+ for (i = 0; i < vlen; i++) {
+ if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {
+ lwhisker = values[i];
+ }
+ if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {
+ rwhisker = values[i];
+ }
+ }
+ loutlier = values[0];
+ routlier = values[vlen - 1];
+ } else {
+ lwhisker = values[0];
+ rwhisker = values[vlen - 1];
+ }
+ }
+ this.quartiles = [q1, q2, q3];
+ this.lwhisker = lwhisker;
+ this.rwhisker = rwhisker;
+ this.loutlier = loutlier;
+ this.routlier = routlier;
+
+ unitSize = canvasWidth / (maxValue - minValue + 1);
+ if (options.get('showOutliers')) {
+ canvasLeft = Math.ceil(options.get('spotRadius'));
+ canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));
+ unitSize = canvasWidth / (maxValue - minValue + 1);
+ if (loutlier < lwhisker) {
+ target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,
+ canvasHeight / 2,
+ options.get('spotRadius'),
+ options.get('outlierLineColor'),
+ options.get('outlierFillColor')).append();
+ }
+ if (routlier > rwhisker) {
+ target.drawCircle((routlier - minValue) * unitSize + canvasLeft,
+ canvasHeight / 2,
+ options.get('spotRadius'),
+ options.get('outlierLineColor'),
+ options.get('outlierFillColor')).append();
+ }
+ }
+
+ // box
+ target.drawRect(
+ Math.round((q1 - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight * 0.1),
+ Math.round((q3 - q1) * unitSize),
+ Math.round(canvasHeight * 0.8),
+ options.get('boxLineColor'),
+ options.get('boxFillColor')).append();
+ // left whisker
+ target.drawLine(
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 2),
+ Math.round((q1 - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 2),
+ options.get('lineColor')).append();
+ target.drawLine(
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 4),
+ Math.round((lwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight - canvasHeight / 4),
+ options.get('whiskerColor')).append();
+ // right whisker
+ target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 2),
+ Math.round((q3 - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 2),
+ options.get('lineColor')).append();
+ target.drawLine(
+ Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight / 4),
+ Math.round((rwhisker - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight - canvasHeight / 4),
+ options.get('whiskerColor')).append();
+ // median line
+ target.drawLine(
+ Math.round((q2 - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight * 0.1),
+ Math.round((q2 - minValue) * unitSize + canvasLeft),
+ Math.round(canvasHeight * 0.9),
+ options.get('medianColor')).append();
+ if (options.get('target')) {
+ size = Math.ceil(options.get('spotRadius'));
+ target.drawLine(
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
+ Math.round((canvasHeight / 2) - size),
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft),
+ Math.round((canvasHeight / 2) + size),
+ options.get('targetColor')).append();
+ target.drawLine(
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),
+ Math.round(canvasHeight / 2),
+ Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),
+ Math.round(canvasHeight / 2),
+ options.get('targetColor')).append();
+ }
+ target.render();
+ }
+ });
+
+ // Setup a very simple "virtual canvas" to make drawing the few shapes we need easier
+ // This is accessible as $(foo).simpledraw()
+
+ // Detect browser renderer support
+ (function() {
+ if (document.namespaces && !document.namespaces.v) {
+ $.fn.sparkline.hasVML = true;
+ document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');
+ } else {
+ $.fn.sparkline.hasVML = false;
+ }
+
+ var el = document.createElement('canvas');
+ $.fn.sparkline.hasCanvas = !!(el.getContext && el.getContext('2d'));
+
+ })()
+
+ VShape = createClass({
+ init: function (target, id, type, args) {
+ this.target = target;
+ this.id = id;
+ this.type = type;
+ this.args = args;
+ },
+ append: function () {
+ this.target.appendShape(this);
+ return this;
+ }
+ });
+
+ VCanvas_base = createClass({
+ _pxregex: /(\d+)(px)?\s*$/i,
+
+ init: function (width, height, target) {
+ if (!width) {
+ return;
+ }
+ this.width = width;
+ this.height = height;
+ this.target = target;
+ this.lastShapeId = null;
+ if (target[0]) {
+ target = target[0];
+ }
+ $.data(target, '_jqs_vcanvas', this);
+ },
+
+ drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {
+ return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);
+ },
+
+ drawShape: function (path, lineColor, fillColor, lineWidth) {
+ return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);
+ },
+
+ drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {
+ return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);
+ },
+
+ drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+ return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);
+ },
+
+ drawRect: function (x, y, width, height, lineColor, fillColor) {
+ return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);
+ },
+
+ getElement: function () {
+ return this.canvas;
+ },
+
+ /**
+ * Return the most recently inserted shape id
+ */
+ getLastShapeId: function () {
+ return this.lastShapeId;
+ },
+
+ /**
+ * Clear and reset the canvas
+ */
+ reset: function () {
+ alert('reset not implemented');
+ },
+
+ _insert: function (el, target) {
+ $(target).html(el);
+ },
+
+ /**
+ * Calculate the pixel dimensions of the canvas
+ */
+ _calculatePixelDims: function (width, height, canvas) {
+ // XXX This should probably be a configurable option
+ var match;
+ match = this._pxregex.exec(height);
+ if (match) {
+ this.pixelHeight = match[1];
+ } else {
+ this.pixelHeight = $(canvas).height();
+ }
+ match = this._pxregex.exec(width);
+ if (match) {
+ this.pixelWidth = match[1];
+ } else {
+ this.pixelWidth = $(canvas).width();
+ }
+ },
+
+ /**
+ * Generate a shape object and id for later rendering
+ */
+ _genShape: function (shapetype, shapeargs) {
+ var id = shapeCount++;
+ shapeargs.unshift(id);
+ return new VShape(this, id, shapetype, shapeargs);
+ },
+
+ /**
+ * Add a shape to the end of the render queue
+ */
+ appendShape: function (shape) {
+ alert('appendShape not implemented');
+ },
+
+ /**
+ * Replace one shape with another
+ */
+ replaceWithShape: function (shapeid, shape) {
+ alert('replaceWithShape not implemented');
+ },
+
+ /**
+ * Insert one shape after another in the render queue
+ */
+ insertAfterShape: function (shapeid, shape) {
+ alert('insertAfterShape not implemented');
+ },
+
+ /**
+ * Remove a shape from the queue
+ */
+ removeShapeId: function (shapeid) {
+ alert('removeShapeId not implemented');
+ },
+
+ /**
+ * Find a shape at the specified x/y co-ordinates
+ */
+ getShapeAt: function (el, x, y) {
+ alert('getShapeAt not implemented');
+ },
+
+ /**
+ * Render all queued shapes onto the canvas
+ */
+ render: function () {
+ alert('render not implemented');
+ }
+ });
+
+ VCanvas_canvas = createClass(VCanvas_base, {
+ init: function (width, height, target, interact) {
+ VCanvas_canvas._super.init.call(this, width, height, target);
+ this.canvas = document.createElement('canvas');
+ if (target[0]) {
+ target = target[0];
+ }
+ $.data(target, '_jqs_vcanvas', this);
+ $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });
+ this._insert(this.canvas, target);
+ this._calculatePixelDims(width, height, this.canvas);
+ this.canvas.width = this.pixelWidth;
+ this.canvas.height = this.pixelHeight;
+ this.interact = interact;
+ this.shapes = {};
+ this.shapeseq = [];
+ this.currentTargetShapeId = undefined;
+ $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});
+ },
+
+ _getContext: function (lineColor, fillColor, lineWidth) {
+ var context = this.canvas.getContext('2d');
+ if (lineColor !== undefined) {
+ context.strokeStyle = lineColor;
+ }
+ context.lineWidth = lineWidth === undefined ? 1 : lineWidth;
+ if (fillColor !== undefined) {
+ context.fillStyle = fillColor;
+ }
+ return context;
+ },
+
+ reset: function () {
+ var context = this._getContext();
+ context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
+ this.shapes = {};
+ this.shapeseq = [];
+ this.currentTargetShapeId = undefined;
+ },
+
+ _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
+ var context = this._getContext(lineColor, fillColor, lineWidth),
+ i, plen;
+ context.beginPath();
+ context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);
+ for (i = 1, plen = path.length; i < plen; i++) {
+ context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines
+ }
+ if (lineColor !== undefined) {
+ context.stroke();
+ }
+ if (fillColor !== undefined) {
+ context.fill();
+ }
+ if (this.targetX !== undefined && this.targetY !== undefined &&
+ context.isPointInPath(this.targetX, this.targetY)) {
+ this.currentTargetShapeId = shapeid;
+ }
+ },
+
+ _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
+ var context = this._getContext(lineColor, fillColor, lineWidth);
+ context.beginPath();
+ context.arc(x, y, radius, 0, 2 * Math.PI, false);
+ if (this.targetX !== undefined && this.targetY !== undefined &&
+ context.isPointInPath(this.targetX, this.targetY)) {
+ this.currentTargetShapeId = shapeid;
+ }
+ if (lineColor !== undefined) {
+ context.stroke();
+ }
+ if (fillColor !== undefined) {
+ context.fill();
+ }
+ },
+
+ _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+ var context = this._getContext(lineColor, fillColor);
+ context.beginPath();
+ context.moveTo(x, y);
+ context.arc(x, y, radius, startAngle, endAngle, false);
+ context.lineTo(x, y);
+ context.closePath();
+ if (lineColor !== undefined) {
+ context.stroke();
+ }
+ if (fillColor) {
+ context.fill();
+ }
+ if (this.targetX !== undefined && this.targetY !== undefined &&
+ context.isPointInPath(this.targetX, this.targetY)) {
+ this.currentTargetShapeId = shapeid;
+ }
+ },
+
+ _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
+ return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);
+ },
+
+ appendShape: function (shape) {
+ this.shapes[shape.id] = shape;
+ this.shapeseq.push(shape.id);
+ this.lastShapeId = shape.id;
+ return shape.id;
+ },
+
+ replaceWithShape: function (shapeid, shape) {
+ var shapeseq = this.shapeseq,
+ i;
+ this.shapes[shape.id] = shape;
+ for (i = shapeseq.length; i--;) {
+ if (shapeseq[i] == shapeid) {
+ shapeseq[i] = shape.id;
+ }
+ }
+ delete this.shapes[shapeid];
+ },
+
+ replaceWithShapes: function (shapeids, shapes) {
+ var shapeseq = this.shapeseq,
+ shapemap = {},
+ sid, i, first;
+
+ for (i = shapeids.length; i--;) {
+ shapemap[shapeids[i]] = true;
+ }
+ for (i = shapeseq.length; i--;) {
+ sid = shapeseq[i];
+ if (shapemap[sid]) {
+ shapeseq.splice(i, 1);
+ delete this.shapes[sid];
+ first = i;
+ }
+ }
+ for (i = shapes.length; i--;) {
+ shapeseq.splice(first, 0, shapes[i].id);
+ this.shapes[shapes[i].id] = shapes[i];
+ }
+
+ },
+
+ insertAfterShape: function (shapeid, shape) {
+ var shapeseq = this.shapeseq,
+ i;
+ for (i = shapeseq.length; i--;) {
+ if (shapeseq[i] === shapeid) {
+ shapeseq.splice(i + 1, 0, shape.id);
+ this.shapes[shape.id] = shape;
+ return;
+ }
+ }
+ },
+
+ removeShapeId: function (shapeid) {
+ var shapeseq = this.shapeseq,
+ i;
+ for (i = shapeseq.length; i--;) {
+ if (shapeseq[i] === shapeid) {
+ shapeseq.splice(i, 1);
+ break;
+ }
+ }
+ delete this.shapes[shapeid];
+ },
+
+ getShapeAt: function (el, x, y) {
+ this.targetX = x;
+ this.targetY = y;
+ this.render();
+ return this.currentTargetShapeId;
+ },
+
+ render: function () {
+ var shapeseq = this.shapeseq,
+ shapes = this.shapes,
+ shapeCount = shapeseq.length,
+ context = this._getContext(),
+ shapeid, shape, i;
+ context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);
+ for (i = 0; i < shapeCount; i++) {
+ shapeid = shapeseq[i];
+ shape = shapes[shapeid];
+ this['_draw' + shape.type].apply(this, shape.args);
+ }
+ if (!this.interact) {
+ // not interactive so no need to keep the shapes array
+ this.shapes = {};
+ this.shapeseq = [];
+ }
+ }
+
+ });
+
+ VCanvas_vml = createClass(VCanvas_base, {
+ init: function (width, height, target) {
+ var groupel;
+ VCanvas_vml._super.init.call(this, width, height, target);
+ if (target[0]) {
+ target = target[0];
+ }
+ $.data(target, '_jqs_vcanvas', this);
+ this.canvas = document.createElement('span');
+ $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});
+ this._insert(this.canvas, target);
+ this._calculatePixelDims(width, height, this.canvas);
+ this.canvas.width = this.pixelWidth;
+ this.canvas.height = this.pixelHeight;
+ groupel = '<v:group coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '"' +
+ ' style="position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;"></v:group>';
+ this.canvas.insertAdjacentHTML('beforeEnd', groupel);
+ this.group = $(this.canvas).children()[0];
+ this.rendered = false;
+ this.prerender = '';
+ },
+
+ _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
+ var vpath = [],
+ initial, stroke, fill, closed, vel, plen, i;
+ for (i = 0, plen = path.length; i < plen; i++) {
+ vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);
+ }
+ initial = vpath.splice(0, 1);
+ lineWidth = lineWidth === undefined ? 1 : lineWidth;
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+ closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';
+ vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
+ ' id="jqsshape' + shapeid + '" ' +
+ stroke +
+ fill +
+ ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
+ ' path="m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e">' +
+ ' </v:shape>';
+ return vel;
+ },
+
+ _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {
+ var stroke, fill, vel;
+ x -= radius;
+ y -= radius;
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="' + lineWidth + 'px" strokeColor="' + lineColor + '" ';
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+ vel = '<v:oval ' +
+ ' id="jqsshape' + shapeid + '" ' +
+ stroke +
+ fill +
+ ' style="position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px"></v:oval>';
+ return vel;
+
+ },
+
+ _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {
+ var vpath, startx, starty, endx, endy, stroke, fill, vel;
+ if (startAngle === endAngle) {
+ return ''; // VML seems to have problem when start angle equals end angle.
+ }
+ if ((endAngle - startAngle) === (2 * Math.PI)) {
+ startAngle = 0.0; // VML seems to have a problem when drawing a full circle that doesn't start 0
+ endAngle = (2 * Math.PI);
+ }
+
+ startx = x + Math.round(Math.cos(startAngle) * radius);
+ starty = y + Math.round(Math.sin(startAngle) * radius);
+ endx = x + Math.round(Math.cos(endAngle) * radius);
+ endy = y + Math.round(Math.sin(endAngle) * radius);
+
+ if (startx === endx && starty === endy) {
+ if ((endAngle - startAngle) < Math.PI) {
+ // Prevent very small slices from being mistaken as a whole pie
+ return '';
+ }
+ // essentially going to be the entire circle, so ignore startAngle
+ startx = endx = x + radius;
+ starty = endy = y;
+ }
+
+ if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {
+ return '';
+ }
+
+ vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];
+ stroke = lineColor === undefined ? ' stroked="false" ' : ' strokeWeight="1px" strokeColor="' + lineColor + '" ';
+ fill = fillColor === undefined ? ' filled="false"' : ' fillColor="' + fillColor + '" filled="true" ';
+ vel = '<v:shape coordorigin="0 0" coordsize="' + this.pixelWidth + ' ' + this.pixelHeight + '" ' +
+ ' id="jqsshape' + shapeid + '" ' +
+ stroke +
+ fill +
+ ' style="position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;" ' +
+ ' path="m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e">' +
+ ' </v:shape>';
+ return vel;
+ },
+
+ _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {
+ return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);
+ },
+
+ reset: function () {
+ this.group.innerHTML = '';
+ },
+
+ appendShape: function (shape) {
+ var vel = this['_draw' + shape.type].apply(this, shape.args);
+ if (this.rendered) {
+ this.group.insertAdjacentHTML('beforeEnd', vel);
+ } else {
+ this.prerender += vel;
+ }
+ this.lastShapeId = shape.id;
+ return shape.id;
+ },
+
+ replaceWithShape: function (shapeid, shape) {
+ var existing = $('#jqsshape' + shapeid),
+ vel = this['_draw' + shape.type].apply(this, shape.args);
+ existing[0].outerHTML = vel;
+ },
+
+ replaceWithShapes: function (shapeids, shapes) {
+ // replace the first shapeid with all the new shapes then toast the remaining old shapes
+ var existing = $('#jqsshape' + shapeids[0]),
+ replace = '',
+ slen = shapes.length,
+ i;
+ for (i = 0; i < slen; i++) {
+ replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);
+ }
+ existing[0].outerHTML = replace;
+ for (i = 1; i < shapeids.length; i++) {
+ $('#jqsshape' + shapeids[i]).remove();
+ }
+ },
+
+ insertAfterShape: function (shapeid, shape) {
+ var existing = $('#jqsshape' + shapeid),
+ vel = this['_draw' + shape.type].apply(this, shape.args);
+ existing[0].insertAdjacentHTML('afterEnd', vel);
+ },
+
+ removeShapeId: function (shapeid) {
+ var existing = $('#jqsshape' + shapeid);
+ this.group.removeChild(existing[0]);
+ },
+
+ getShapeAt: function (el, x, y) {
+ var shapeid = el.id.substr(8);
+ return shapeid;
+ },
+
+ render: function () {
+ if (!this.rendered) {
+ // batch the intial render into a single repaint
+ this.group.innerHTML = this.prerender;
+ this.rendered = true;
+ }
+ }
+ });
+
+}));
diff --git a/addons/crm/static/src/css/crm.css b/addons/crm/static/src/css/crm.css
index 3ad3840a4e1..ba4473edc26 100644
--- a/addons/crm/static/src/css/crm.css
+++ b/addons/crm/static/src/css/crm.css
@@ -20,15 +20,27 @@
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list {
- margin: 10px 0;
+ position: relative;
+ margin: 10px;
}
-.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a {
- width: 110px;
+.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div {
+ width: 160px;
+ height: 22px;
+ margin: 0 !important;
+ position: relative;
display: inline-block;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a:hover {
text-decoration: underline !important;
}
+.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div a:nth-child(2n) {
+ position: absolute;
+ left: 90px;
+ top: 0;
+}
+.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div:nth-child(2n) a:nth-child(2n) {
+ left: 110px;
+}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center {
text-align: center;
margin: 3px 0;
@@ -40,3 +52,13 @@
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center .oe_subsum {
font-size: 10px;
}
+
+.openerp .oe_kanban_view .oe_justgage {
+ color: black;
+ display: inline-block;
+}
+
+.openerp .oe_kanban_view .oe_sparkline_bar {
+ height: 20px;
+ width: 36px;
+} \ No newline at end of file
diff --git a/addons/crm/static/src/js/crm.js b/addons/crm/static/src/js/crm.js
deleted file mode 100644
index e027313d6dc..00000000000
--- a/addons/crm/static/src/js/crm.js
+++ /dev/null
@@ -1,11 +0,0 @@
-openerp.crm = function(openerp) {
- openerp.web_kanban.KanbanRecord.include({
- on_card_clicked: function() {
- if (this.view.dataset.model === 'crm.case.section') {
- this.$('.oe_kanban_crm_salesteams_list a').first().click();
- } else {
- this._super.apply(this, arguments);
- }
- },
- });
-};
diff --git a/addons/crm/static/src/js/crm_case_section.js b/addons/crm/static/src/js/crm_case_section.js
new file mode 100644
index 00000000000..2b4ca741d75
--- /dev/null
+++ b/addons/crm/static/src/js/crm_case_section.js
@@ -0,0 +1,34 @@
+openerp.crm = function(openerp) {
+ openerp.web_kanban.KanbanRecord.include({
+ on_card_clicked: function() {
+ if (this.view.dataset.model === 'crm.case.section') {
+ this.$('.oe_kanban_crm_salesteams_list a').first().click();
+ } else {
+ this._super.apply(this, arguments);
+ }
+ },
+ });
+
+ 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");
+
+};
diff --git a/addons/crm/test/crm_lead_cancel.yml b/addons/crm/test/crm_lead_cancel.yml
index edaf844952a..8749675bf23 100644
--- a/addons/crm/test/crm_lead_cancel.yml
+++ b/addons/crm/test/crm_lead_cancel.yml
@@ -1,7 +1,9 @@
-
- I cancel unqualified lead.
+ I set a new sale team (with Marketing at parent) and I cancel unqualified lead .
-
!python {model: crm.lead}: |
+ section_id = self.pool.get('crm.case.section').create(cr, uid, {'name': "Phone Marketing", 'parent_id': ref("crm.crm_case_section_2")})
+ self.write(cr, uid, [ref("crm_case_1")], {'section_id': section_id})
self.case_cancel(cr, uid, [ref("crm_case_1")])
-
I check cancelled lead.
@@ -42,4 +44,4 @@
I check the lead is correctly escalated to the parent team.
-
!assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}:
- - section_id.name == "Support Department"
+ - section_id.name == "Marketing"
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index e67b7c0c7be..3c847ade42a 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -86,7 +86,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
lead_obj = self.pool.get('crm.lead')
for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled leads cannot be converted into opportunities."))
+ raise osv.except_osv(_("Warning!"), _("Closed/Cancelled leads cannot be converted into opportunities."))
return False
def _convert_opportunity(self, cr, uid, ids, vals, context=None):
diff --git a/addons/crm_claim/i18n/ru.po b/addons/crm_claim/i18n/ru.po
index afcf4702a67..4579b6d8557 100644
--- a/addons/crm_claim/i18n/ru.po
+++ b/addons/crm_claim/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-10-24 05:01+0000\n"
+"PO-Revision-Date: 2013-05-30 14:03+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:44+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: crm_claim
#: help:crm.claim.stage,fold:0
@@ -23,6 +23,8 @@ msgid ""
"This stage is not visible, for example in status bar or kanban view, when "
"there are no records in that stage to display."
msgstr ""
+"Эта стадия не видима, например в статус-баре или виде канбан, когда нет "
+"записей этой стадии для отображения."
#. module: crm_claim
#: field:crm.claim.report,nbr:0
@@ -46,11 +48,13 @@ msgid ""
"Allows you to configure your incoming mail server, and create claims from "
"incoming emails."
msgstr ""
+"Позволяет настроить сервер входящей почты и создавать претензии из входящих "
+"эл. писем."
#. module: crm_claim
#: model:ir.model,name:crm_claim.model_crm_claim_stage
msgid "Claim stages"
-msgstr ""
+msgstr "Этапы претензии"
#. module: crm_claim
#: selection:crm.claim.report,month:0
@@ -65,7 +69,7 @@ msgstr "Задержка закрытия"
#. module: crm_claim
#: field:crm.claim,message_unread:0
msgid "Unread Messages"
-msgstr ""
+msgstr "Непрочитанные"
#. module: crm_claim
#: field:crm.claim,resolution:0
@@ -100,12 +104,12 @@ msgstr "# претензий"
#. module: crm_claim
#: field:crm.claim.stage,name:0
msgid "Stage Name"
-msgstr ""
+msgstr "Название этапа"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Salesperson"
-msgstr ""
+msgstr "Продавец"
#. module: crm_claim
#: selection:crm.claim,priority:0
@@ -149,7 +153,7 @@ msgstr "Предупредительная мера"
#. module: crm_claim
#: help:crm.claim,message_unread:0
msgid "If checked new messages require your attention."
-msgstr ""
+msgstr "Если отмечено, новые сообщения требуют вашего внимания."
#. module: crm_claim
#: field:crm.claim.report,date_closed:0
@@ -182,6 +186,8 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
+"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате "
+"html для возможности использования в канбан виде"
#. module: crm_claim
#: view:crm.claim:0
@@ -235,12 +241,12 @@ msgstr "Важность"
#. module: crm_claim
#: field:crm.claim.stage,fold:0
msgid "Hide in Views when Empty"
-msgstr ""
+msgstr "Скрыть вид, если пусто"
#. module: crm_claim
#: field:crm.claim,message_follower_ids:0
msgid "Followers"
-msgstr ""
+msgstr "Подписчики"
#. module: crm_claim
#: view:crm.claim:0
@@ -254,7 +260,7 @@ msgstr "Новый"
#. module: crm_claim
#: field:crm.claim.stage,section_ids:0
msgid "Sections"
-msgstr ""
+msgstr "Секции"
#. module: crm_claim
#: field:crm.claim,email_from:0
@@ -290,7 +296,7 @@ msgstr "Предмет претензии"
#. module: crm_claim
#: model:crm.claim.stage,name:crm_claim.stage_claim3
msgid "Rejected"
-msgstr ""
+msgstr "Отклонено"
#. module: crm_claim
#: field:crm.claim,date_action_next:0
@@ -344,7 +350,7 @@ msgstr ""
#: code:addons/crm_claim/crm_claim.py:194
#, python-format
msgid "No Subject"
-msgstr ""
+msgstr "Без темы"
#. module: crm_claim
#: help:crm.claim.stage,state:0
@@ -358,7 +364,7 @@ msgstr ""
#. module: crm_claim
#: view:crm.claim:0
msgid "Settle"
-msgstr ""
+msgstr "Решать"
#. module: crm_claim
#: model:ir.ui.menu,name:crm_claim.menu_claim_stage_view
@@ -384,7 +390,7 @@ msgstr "Отчет о претензиях"
#. module: crm_claim
#: view:sale.config.settings:0
msgid "Configure"
-msgstr ""
+msgstr "Настроить"
#. module: crm_claim
#: model:crm.case.resource.type,name:crm_claim.type_claim1
@@ -430,6 +436,8 @@ msgid ""
"If you check this field, this stage will be proposed by default on each "
"sales team. It will not assign this stage to existing teams."
msgstr ""
+"Если вы отметите это поле, этот этап будет предложен по умолчанию каждому "
+"отделу продаж. Этот этап не будет назначен существующим отделам."
#. module: crm_claim
#: field:crm.claim,categ_id:0
@@ -485,7 +493,7 @@ msgstr "Закрыто"
#. module: crm_claim
#: view:crm.claim:0
msgid "Reject"
-msgstr ""
+msgstr "Отклонить"
#. module: crm_claim
#: view:res.partner:0
@@ -495,7 +503,7 @@ msgstr "Претензии партнера"
#. module: crm_claim
#: view:crm.claim.stage:0
msgid "Claim Stage"
-msgstr ""
+msgstr "Этап претензии"
#. module: crm_claim
#: view:crm.claim:0
@@ -513,7 +521,7 @@ msgstr "Отложено"
#: field:crm.claim.report,state:0
#: field:crm.claim.stage,state:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: crm_claim
#: selection:crm.claim.report,month:0
@@ -529,7 +537,7 @@ msgstr "Обычный"
#. module: crm_claim
#: help:crm.claim.stage,sequence:0
msgid "Used to order stages. Lower is better."
-msgstr ""
+msgstr "Используется для упорядочивания этапов. Меньше - лучше."
#. module: crm_claim
#: selection:crm.claim.report,month:0
@@ -549,7 +557,7 @@ msgstr "Телефон"
#. module: crm_claim
#: field:crm.claim,message_is_follower:0
msgid "Is a Follower"
-msgstr ""
+msgstr "Подписан"
#. module: crm_claim
#: field:crm.claim.report,user_id:0
@@ -581,6 +589,10 @@ msgid ""
"the case needs to be reviewed then the status is set "
"to 'Pending'."
msgstr ""
+"Статус устанавливается в \"Черновик\", при создании дела. Если дело в "
+"процессе, то статус - «Открыт». Когда дело закончено, устанавливается статус "
+"\"Готово\". Если дело должно быть пересмотрено то статус установлен в "
+"'Ожидание'."
#. module: crm_claim
#: field:crm.claim,active:0
@@ -628,7 +640,7 @@ msgstr "Дата претензии"
#. module: crm_claim
#: field:crm.claim,message_summary:0
msgid "Summary"
-msgstr ""
+msgstr "Итог"
#. module: crm_claim
#: model:ir.actions.act_window,name:crm_claim.crm_claim_categ_action
@@ -638,7 +650,7 @@ msgstr "Категории претензий"
#. module: crm_claim
#: field:crm.claim.stage,case_default:0
msgid "Common to All Teams"
-msgstr ""
+msgstr "Общее для всех отделов"
#. module: crm_claim
#: view:crm.claim:0
@@ -677,7 +689,7 @@ msgstr "Претензия"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "My Company"
-msgstr ""
+msgstr "Моя компания"
#. module: crm_claim
#: view:crm.claim.report:0
@@ -807,7 +819,7 @@ msgstr "Февраль"
#. module: crm_claim
#: model:ir.model,name:crm_claim.model_sale_config_settings
msgid "sale.config.settings"
-msgstr ""
+msgstr "sale.config.settings"
#. module: crm_claim
#: view:crm.claim.report:0
@@ -833,22 +845,22 @@ msgstr "Мои дела"
#. module: crm_claim
#: model:crm.claim.stage,name:crm_claim.stage_claim2
msgid "Settled"
-msgstr ""
+msgstr "Решено"
#. module: crm_claim
#: help:crm.claim,message_ids:0
msgid "Messages and communication history"
-msgstr ""
+msgstr "Сообщения и история общения"
#. module: crm_claim
#: field:sale.config.settings,fetchmail_claim:0
msgid "Create claims from incoming mails"
-msgstr ""
+msgstr "Создать претензии из входящей почты"
#. module: crm_claim
#: field:crm.claim.stage,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Нумерация"
#. module: crm_claim
#: view:crm.claim:0
@@ -883,6 +895,8 @@ msgid ""
"Link between stages and sales teams. When set, this limitate the current "
"stage to the selected sales teams."
msgstr ""
+"Связь между этапами и отделами продаж. При установке, ограничивает этап для "
+"выбранного отдела продаж."
#. module: crm_claim
#: help:crm.claim.stage,case_refused:0
diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
index 530eb6061a3..bae02ef8c0c 100644
--- a/addons/crm_claim/report/crm_claim_report_view.xml
+++ b/addons/crm_claim/report/crm_claim_report_view.xml
@@ -55,7 +55,7 @@
<filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]"/>
<separator/>
- <filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" />
+ <filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
<separator/>
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
<separator/>
@@ -78,7 +78,7 @@
</group>
<group expand="1" string="Group By...">
<filter string="Salesperson" name="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
- <filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
+ <filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Partner" name="partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml
index 6e3521be6f2..f97fe654166 100644
--- a/addons/crm_helpdesk/crm_helpdesk_view.xml
+++ b/addons/crm_helpdesk/crm_helpdesk_view.xml
@@ -151,14 +151,14 @@
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="All pending Helpdesk Request" />
<separator/>
<filter string="Assigned to Me or My Sales Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
- help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" />
+ help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
<field name="user_id"/>
<field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" help="Partner" context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal" domain="[]" help="Responsible User" context="{'group_by':'user_id'}" />
- <filter string="Sales Team" icon="terp-personal+" domain="[]" help="Sales Team" context="{'group_by':'section_id'}" />
+ <filter string="Sales Team" icon="terp-personal+" domain="[]" help="Sales Team" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Date" icon="terp-go-month" domain="[]" help="Request Date" context="{'group_by':'date'}" />
diff --git a/addons/crm_helpdesk/i18n/ru.po b/addons/crm_helpdesk/i18n/ru.po
index e8eb90af9d7..bb53c03294f 100644
--- a/addons/crm_helpdesk/i18n/ru.po
+++ b/addons/crm_helpdesk/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-10-24 05:08+0000\n"
+"PO-Revision-Date: 2013-05-30 14:09+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:46+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: crm_helpdesk
#: field:crm.helpdesk.report,delay_close:0
@@ -46,7 +46,7 @@ msgstr "Март"
#. module: crm_helpdesk
#: field:crm.helpdesk,message_unread:0
msgid "Unread Messages"
-msgstr ""
+msgstr "Непрочитанные"
#. module: crm_helpdesk
#: field:crm.helpdesk,company_id:0
@@ -63,7 +63,7 @@ msgstr "Адреса наблюдателей"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Salesperson"
-msgstr ""
+msgstr "Продавец"
#. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0
@@ -106,7 +106,7 @@ msgstr "Отменено"
#. module: crm_helpdesk
#: help:crm.helpdesk,message_unread:0
msgid "If checked new messages require your attention."
-msgstr ""
+msgstr "Если отмечено, новые сообщения требуют вашего внимания."
#. module: crm_helpdesk
#: model:ir.actions.act_window,name:crm_helpdesk.action_report_crm_helpdesk
@@ -136,6 +136,8 @@ msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
+"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате "
+"html для возможности использования в канбан виде"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@@ -176,7 +178,7 @@ msgstr "Приоритет"
#. module: crm_helpdesk
#: field:crm.helpdesk,message_follower_ids:0
msgid "Followers"
-msgstr ""
+msgstr "Подписчики"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@@ -400,7 +402,7 @@ msgstr "В ожидании"
#: view:crm.helpdesk.report:0
#: field:crm.helpdesk.report,state:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: crm_helpdesk
#: selection:crm.helpdesk.report,month:0
@@ -454,7 +456,7 @@ msgstr "Планируемая выручка"
#. module: crm_helpdesk
#: field:crm.helpdesk,message_is_follower:0
msgid "Is a Follower"
-msgstr ""
+msgstr "Подписан"
#. module: crm_helpdesk
#: field:crm.helpdesk.report,user_id:0
@@ -501,7 +503,7 @@ msgstr "Январь"
#. module: crm_helpdesk
#: field:crm.helpdesk,message_summary:0
msgid "Summary"
-msgstr ""
+msgstr "Итог"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@@ -517,7 +519,7 @@ msgstr "Прочее"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "My Company"
-msgstr ""
+msgstr "Моя компания"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@@ -666,7 +668,7 @@ msgstr ""
#. module: crm_helpdesk
#: help:crm.helpdesk,message_ids:0
msgid "Messages and communication history"
-msgstr ""
+msgstr "Сообщения и история общения"
#. module: crm_helpdesk
#: model:ir.actions.act_window,help:crm_helpdesk.crm_helpdesk_categ_action
diff --git a/addons/crm_helpdesk/i18n/zh_CN.po b/addons/crm_helpdesk/i18n/zh_CN.po
index 4a80e7f9385..7c8275f606a 100644
--- a/addons/crm_helpdesk/i18n/zh_CN.po
+++ b/addons/crm_helpdesk/i18n/zh_CN.po
@@ -8,14 +8,14 @@ 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: 2012-12-14 13:33+0000\n"
-"Last-Translator: 盈通 ccdos <ccdos@163.com>\n"
+"PO-Revision-Date: 2013-06-07 05:02+0000\n"
+"Last-Translator: PeterGao <306739889@qq.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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-03-16 05:46+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: crm_helpdesk
#: field:crm.helpdesk.report,delay_close:0
@@ -656,6 +656,12 @@ msgid ""
" \n"
"If the case needs to be reviewed then the status is set to 'Pending'."
msgstr ""
+"当一个“case(事件)\"被新创建后,这个“case(事件)\"的状态为“草稿”状态。 "
+" \n"
+"若这个“case(事件)\"正在处理中,这个“case(事件)\"的状态为“开启”状态。\n"
+"若这个“case(事件)\"已处理完结,这个“case(事件)\"的状态为“结单”状态。 "
+" \n"
+"若这个“case(事件)\"需暂停再议,这个“case(事件)\"的状态为“挂起”状态。"
#. module: crm_helpdesk
#: help:crm.helpdesk,message_ids:0
diff --git a/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml b/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
index 6ce2c60093f..c1ffc00303d 100644
--- a/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
+++ b/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
@@ -56,7 +56,7 @@
<separator/>
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
<separator/>
- <filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" />
+ <filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
<separator/>
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
<field name="user_id" string="Salesperson"/>
@@ -71,7 +71,7 @@
</group>
<group expand="1" string="Group By...">
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
- <filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
+ <filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
diff --git a/addons/crm_helpdesk/test/customer_question.eml b/addons/crm_helpdesk/test/customer_question.eml
index 38a4c95fb0c..9bc7c91cb41 100644
--- a/addons/crm_helpdesk/test/customer_question.eml
+++ b/addons/crm_helpdesk/test/customer_question.eml
@@ -3,7 +3,7 @@ Date: Tue, 25 Oct 2011 13:41:17 +0530
From: Mr. John Right <info@customer.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
MIME-Version: 1.0
-To: info@my.com
+To: _helpdesk@my.com
Subject: Where is download link of user manual of your product ?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
diff --git a/addons/crm_partner_assign/i18n/ru.po b/addons/crm_partner_assign/i18n/ru.po
index f0a7ff509c9..fa995c8e7a1 100644
--- a/addons/crm_partner_assign/i18n/ru.po
+++ b/addons/crm_partner_assign/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2011-03-23 13:46+0000\n"
+"PO-Revision-Date: 2013-06-06 10:24+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:47+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,delay_close:0
@@ -25,7 +25,7 @@ msgstr "Задержка закрытия"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,author_id:0
msgid "Author"
-msgstr ""
+msgstr "Автор"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,planned_revenue:0
@@ -38,6 +38,9 @@ msgid ""
"Message type: email for email message, notification for system message, "
"comment for other messages such as user replies"
msgstr ""
+"Тип сообщения: эл. почта - для эл. почты, уведомление - для системных "
+"сообщений, комментарий - для остальных сообщений таких как сообщения "
+"пользователя"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,nbr:0
@@ -53,7 +56,7 @@ msgstr "Группировать по ..."
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,body:0
msgid "Automatically sanitized HTML contents"
-msgstr ""
+msgstr "Автоматически обработанное HTML содержимое"
#. module: crm_partner_assign
#: view:crm.lead:0
@@ -68,7 +71,7 @@ msgstr "Геолоцировать"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,starred:0
msgid "Starred"
-msgstr ""
+msgstr "Отмеченные"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
@@ -81,6 +84,8 @@ msgid ""
"Email address of the sender. This field is set when no matching partner is "
"found for incoming emails."
msgstr ""
+"Адрес эл. почты отправителя. Это поле устанавливается когда партнер не "
+"определен для входящих писем."
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
@@ -111,7 +116,7 @@ msgstr "Компания"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,notification_ids:0
msgid "Notifications"
-msgstr ""
+msgstr "Уведомления"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,date_assign:0
@@ -123,7 +128,7 @@ msgstr "Дата партнера"
#: view:crm.partner.report.assign:0
#: view:res.partner:0
msgid "Salesperson"
-msgstr ""
+msgstr "Продавец"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0
@@ -170,12 +175,12 @@ msgstr "Географическое назначение"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead_forward_to_partner
msgid "Email composition wizard"
-msgstr ""
+msgstr "Мастер составления эл. почты"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,turnover:0
msgid "Turnover"
-msgstr ""
+msgstr "Оборот"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,date_closed:0
@@ -199,7 +204,7 @@ msgstr ""
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,type:0
msgid "System notification"
-msgstr ""
+msgstr "Системное уведомление"
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:74
@@ -271,7 +276,7 @@ msgstr "Тип"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,type:0
msgid "Email"
-msgstr ""
+msgstr "Эл. почта"
#. module: crm_partner_assign
#: help:crm.lead,partner_assigned_id:0
@@ -286,7 +291,7 @@ msgstr "Низший"
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
msgid "Date Invoice"
-msgstr ""
+msgstr "Дата счета"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,template_id:0
@@ -311,12 +316,12 @@ msgstr "Дата создания"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_res_partner_activation
msgid "res.partner.activation"
-msgstr ""
+msgstr "res.partner.activation"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,parent_id:0
msgid "Parent Message"
-msgstr ""
+msgstr "Родительское сообщение"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,res_id:0
@@ -358,12 +363,12 @@ msgstr "Этап"
#: view:crm.lead.report.assign:0
#: field:crm.lead.report.assign,state:0
msgid "Status"
-msgstr ""
+msgstr "Статус"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,to_read:0
msgid "To read"
-msgstr ""
+msgstr "Прочитать"
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:74
@@ -418,12 +423,12 @@ msgstr "Количество дней, для закрытия вопроса"
#: help:crm.lead.forward.to.partner,notified_partner_ids:0
msgid ""
"Partners that have a notification pushing this message in their mailboxes"
-msgstr ""
+msgstr "Партнеры которые имеют уведомление доставляемое в их почтовые ящики"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,type:0
msgid "Comment"
-msgstr ""
+msgstr "Комментарий"
#. module: crm_partner_assign
#: field:res.partner,partner_weight:0
@@ -451,7 +456,7 @@ msgstr "Декабрь"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,vote_user_ids:0
msgid "Users that voted for this message"
-msgstr ""
+msgstr "Пользователи, которые проголосовали за это сообщение"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@@ -467,7 +472,7 @@ msgstr "Дата открытия"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,child_ids:0
msgid "Child Messages"
-msgstr ""
+msgstr "Связанные сообщения"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,date_review:0
@@ -483,17 +488,17 @@ msgstr "Тема"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,body:0
msgid "Contents"
-msgstr ""
+msgstr "Содержимое"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,vote_user_ids:0
msgid "Votes"
-msgstr ""
+msgstr "Голоса"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@@ -504,6 +509,8 @@ msgstr "# Предложений"
#: help:crm.lead.forward.to.partner,starred:0
msgid "Current user has a starred notification linked to this message"
msgstr ""
+"Текущий пользователь имеет отмеченное уведомление, связанное с этим "
+"сообщением"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,date_partnership:0
@@ -561,7 +568,7 @@ msgstr "Август"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,record_name:0
msgid "Name get of the related document."
-msgstr ""
+msgstr "Название связанного документа."
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0
@@ -663,7 +670,7 @@ msgstr ""
#. module: crm_partner_assign
#: field:crm.partner.report.assign,period_id:0
msgid "Invoice Period"
-msgstr ""
+msgstr "Период счета"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_res_partner_grade
@@ -684,7 +691,7 @@ msgstr "Вложения"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,record_name:0
msgid "Message Record Name"
-msgstr ""
+msgstr "Название записи сообщения"
#. module: crm_partner_assign
#: field:res.partner.activation,sequence:0
@@ -699,6 +706,8 @@ msgid ""
"Cannot contact geolocation servers. Please make sure that your internet "
"connection is up and running (%s)."
msgstr ""
+"Не удается связаться с сервером геолокации. Пожалуйста, убедитесь, что ваше "
+"подключение к интернету работает (%s)."
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,month:0
@@ -724,7 +733,7 @@ msgstr "Открыто"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,subtype_id:0
msgid "Subtype"
-msgstr ""
+msgstr "Подтип"
#. module: crm_partner_assign
#: field:res.partner,date_localization:0
@@ -739,12 +748,12 @@ msgstr "Текущий"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead
msgid "Lead/Opportunity"
-msgstr ""
+msgstr "Кандидат/Предложение"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,notified_partner_ids:0
msgid "Notified partners"
-msgstr ""
+msgstr "Уведомленные партнеры"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
@@ -775,7 +784,7 @@ msgstr "Вероятная выручка"
#: field:res.partner,activation:0
#: view:res.partner.activation:0
msgid "Activation"
-msgstr ""
+msgstr "Активация"
#. module: crm_partner_assign
#: view:crm.lead:0
@@ -792,6 +801,8 @@ msgstr ""
#: help:crm.lead.forward.to.partner,to_read:0
msgid "Current user has an unread notification linked to this message"
msgstr ""
+"Текущий пользователь имеет непрочитанные уведомления, связанные с этим "
+"сообщением"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,type:0
@@ -860,6 +871,8 @@ msgid ""
"Technical field holding the message notifications. Use notified_partner_ids "
"to access notified partners."
msgstr ""
+"Техническое поле, содержащее уведомления. Используйте notified_partner_ids "
+"для доступа к оповещаемым партнерам."
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
@@ -874,12 +887,12 @@ msgstr "CRM - отчет по кандидатам"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,composition_mode:0
msgid "Composition mode"
-msgstr ""
+msgstr "Режим составления"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,model:0
msgid "Related Document Model"
-msgstr ""
+msgstr "Модель связанного документа"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history_mode:0
@@ -892,6 +905,8 @@ msgid ""
"Author of the message. If not set, email_from may hold an email address that "
"did not match any partner."
msgstr ""
+"Автор сообщения. Если не установлен, email_from может содержать адрес почты, "
+"который не соответствует ни одному партнеру."
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_partner_report_assign
@@ -906,12 +921,12 @@ msgstr "Высокий"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,partner_ids:0
msgid "Additional contacts"
-msgstr ""
+msgstr "Дополнительные контакты"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,parent_id:0
msgid "Initial thread message."
-msgstr ""
+msgstr "Первое сообщение цепочки."
#. module: crm_partner_assign
#: field:crm.lead.report.assign,create_date:0
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
index 924f96180cc..724102a84b1 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -124,6 +124,7 @@ class crm_lead_forward_to_partner(osv.TransientModel):
lead_ids = context and context.get('active_ids', []) or []
value = self.default_get(cr, uid, ['body', 'email_to', 'email_cc', 'subject', 'history_mode'], context=context)
value.pop('composition_mode')
+ self.pool.get('crm.lead').message_subscribe(cr, uid, lead_ids, [partner.id for partner in wizard.partner_ids], context=context)
self.write(cr, uid, ids, value, context=context)
return self.send_mail(cr, uid, ids, context=context)
diff --git a/addons/crm_profiling/i18n/ru.po b/addons/crm_profiling/i18n/ru.po
index 8cbe1695e82..a7325d894c5 100644
--- a/addons/crm_profiling/i18n/ru.po
+++ b/addons/crm_profiling/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2012-05-10 17:51+0000\n"
+"PO-Revision-Date: 2013-05-30 14:05+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:32+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: crm_profiling
#: view:crm_profiling.questionnaire:0
@@ -151,7 +151,7 @@ msgstr "Используйте правила профилирования"
#. module: crm_profiling
#: constraint:crm.segmentation:0
msgid "Error ! You cannot create recursive profiles."
-msgstr ""
+msgstr "Ошибка ! Нельзя создать рекурсивный профиль."
#. module: crm_profiling
#: field:crm.segmentation,answer_yes:0
@@ -200,7 +200,7 @@ msgstr "Сохранить данные"
#. module: crm_profiling
#: view:open.questionnaire:0
msgid "or"
-msgstr ""
+msgstr "или"
#~ msgid ""
#~ "The Object name must start with x_ and not contain any special character !"
diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py
index 86a518ebca9..1b797290632 100644
--- a/addons/delivery/sale.py
+++ b/addons/delivery/sale.py
@@ -51,10 +51,10 @@ class sale_order(osv.osv):
for order in self.browse(cr, uid, ids, context=context):
grid_id = carrier_obj.grid_get(cr, uid, [order.carrier_id.id], order.partner_shipping_id.id)
if not grid_id:
- raise osv.except_osv(_('No grid available !'), _('No grid matching for this carrier !'))
+ raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!'))
if not order.state in ('draft'):
- raise osv.except_osv(_('Order not in draft state !'), _('The order state have to be draft to add delivery lines.'))
+ raise osv.except_osv(_('Order not in Draft State!'), _('The order state have to be draft to add delivery lines.'))
grid = grid_obj.browse(cr, uid, grid_id, context=context)
diff --git a/addons/document_page/document_page_view.xml b/addons/document_page/document_page_view.xml
index 08c77647d17..4d0b5596e75 100644
--- a/addons/document_page/document_page_view.xml
+++ b/addons/document_page/document_page_view.xml
@@ -26,6 +26,7 @@
<tree string="Document Page">
<field name="name"/>
<field name="parent_id"/>
+ <field name="create_uid" invisible="1"/>
<field name="write_uid"/>
<field name="write_date"/>
</tree>
diff --git a/addons/document_webdav/webdav_setup.xml b/addons/document_webdav/webdav_setup.xml
index d75c416a93e..dbf6bc8fbcc 100644
--- a/addons/document_webdav/webdav_setup.xml
+++ b/addons/document_webdav/webdav_setup.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--This file contains a typical setup of a WebDAV folders' structure,
@@ -25,7 +24,7 @@
<field eval="0" name="ressource_tree"/>
<field name="user_id" eval="False"/>
<field name="company_id" ref="base.main_company"/>
- <field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
+ <field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">groups</field>
@@ -36,7 +35,7 @@
<field eval="1" name="resource_find_all"/>
<field eval="0" name="ressource_tree"/>
<field name="company_id" ref="base.main_company"/>
- <field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
+ <field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">resources</field>
@@ -48,7 +47,7 @@
<field name="user_id" eval="False"/>
<field name="resource_field" ref="base.field_res_users_login"/>
<field name="company_id" ref="base.main_company"/>
- <field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
+ <field name="parent_id" ref="document_directory_principals0"/>
<field name="type">ressource</field>
<field name="ressource_type_id" ref="base.model_res_users"/>
<field eval="[(6,0,[])]" name="group_ids"/>
@@ -61,7 +60,7 @@
<field name="user_id" eval="False"/>
<field name="resource_field" ref="base.field_res_users_login"/>
<field name="company_id" ref="base.main_company"/>
- <field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
+ <field name="parent_id" ref="document_directory_principals0"/>
<field name="type">ressource</field>
<field name="ressource_type_id" ref="base.model_res_users"/>
<field eval="[(6,0,[])]" name="group_ids"/>
@@ -72,7 +71,7 @@
<field eval="1" name="resource_find_all"/>
<field eval="0" name="ressource_tree"/>
<field name="company_id" ref="base.main_company"/>
- <field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
+ <field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">locations</field>
@@ -91,4 +90,4 @@
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/edi/i18n/ru.po b/addons/edi/i18n/ru.po
index dad4bf0dcda..3ac2689bc57 100644
--- a/addons/edi/i18n/ru.po
+++ b/addons/edi/i18n/ru.po
@@ -8,35 +8,35 @@ 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: 2012-09-10 15:12+0000\n"
+"PO-Revision-Date: 2013-05-30 13:32+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:50+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: edi
#. openerp-web
#: code:addons/edi/static/src/js/edi.js:67
#, python-format
msgid "Reason:"
-msgstr ""
+msgstr "Причина:"
#. module: edi
#. openerp-web
#: code:addons/edi/static/src/js/edi.js:60
#, python-format
msgid "The document has been successfully imported!"
-msgstr ""
+msgstr "Документ был успешно импортирован!"
#. module: edi
#. openerp-web
#: code:addons/edi/static/src/js/edi.js:65
#, python-format
msgid "Sorry, the document could not be imported."
-msgstr ""
+msgstr "Извините, документ не может быть импортирован."
#. module: edi
#: model:ir.model,name:edi.model_res_company
@@ -53,13 +53,13 @@ msgstr "Валюта"
#: code:addons/edi/static/src/js/edi.js:71
#, python-format
msgid "Document Import Notification"
-msgstr ""
+msgstr "Уведомление об импорте документа"
#. module: edi
#: code:addons/edi/models/edi.py:130
#, python-format
msgid "Missing application."
-msgstr ""
+msgstr "Отсутствующее приложение."
#. module: edi
#: code:addons/edi/models/edi.py:131
@@ -69,12 +69,15 @@ msgid ""
"You can install it by connecting as the administrator and opening the "
"configuration assistant."
msgstr ""
+"Документу, который вы пытаетесь импортировать, необходимо OpenERP приложение "
+"'%s'. Вы можете установить его, выполнив вход под администратором и открыв "
+"настройки."
#. module: edi
#: code:addons/edi/models/edi.py:47
#, python-format
msgid "'%s' is an invalid external ID"
-msgstr ""
+msgstr "'%s' это неверный внешний идентификатор"
#. module: edi
#: model:ir.model,name:edi.model_res_partner
@@ -84,7 +87,7 @@ msgstr "Контрагент"
#. module: edi
#: model:ir.model,name:edi.model_edi_edi
msgid "EDI Subsystem"
-msgstr ""
+msgstr "Подсистема электронного документооборота"
#~ msgid "The currency code must be unique per company!"
#~ msgstr "Код валюты должен быть уникальным в компании!"
diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py
index bfd59dae15a..1b9e0c4df08 100644
--- a/addons/edi/models/edi.py
+++ b/addons/edi/models/edi.py
@@ -126,7 +126,7 @@ class edi(osv.AbstractModel):
module = edi_document.get('__import_module') or edi_document.get('__module')
assert module, 'a `__module` or `__import_module` attribute is required in each EDI document.'
if module != 'base' and not ir_module.search(cr, uid, [('name','=',module),('state','=','installed')]):
- raise osv.except_osv(_('Missing application.'),
+ raise osv.except_osv(_('Missing Application.'),
_("The document you are trying to import requires the OpenERP `%s` application. "
"You can install it by connecting as the administrator and opening the configuration assistant.")%(module,))
model = edi_document.get('__import_model') or edi_document.get('__model')
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 4a767457321..2a7990e301b 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -358,7 +358,7 @@ class email_template(osv.osv):
values['attachment_ids'] = attachment_ids
return values
- def send_mail(self, cr, uid, template_id, res_id, force_send=False, context=None):
+ def send_mail(self, cr, uid, template_id, res_id, force_send=False, raise_exception=False, context=None):
"""Generates a new mail message for the given template and record,
and schedules it for delivery through the ``mail`` module's scheduler.
@@ -400,7 +400,7 @@ class email_template(osv.osv):
mail_mail.write(cr, uid, msg_id, {'attachment_ids': [(6, 0, attachment_ids)]}, context=context)
if force_send:
- mail_mail.send(cr, uid, [msg_id], context=context)
+ mail_mail.send(cr, uid, [msg_id], raise_exception=raise_exception, context=context)
return msg_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/i18n/ru.po b/addons/email_template/i18n/ru.po
index e12ebd076cc..b16433fddd5 100644
--- a/addons/email_template/i18n/ru.po
+++ b/addons/email_template/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-12-25 12:16+0000\n"
-"Last-Translator: Olga <chikiro.spam@gmail.com>\n"
+"PO-Revision-Date: 2013-06-05 07:10+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:42+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: email_template
#: field:email.template,email_from:0
@@ -37,7 +37,7 @@ msgstr "Кнопка боковой панели для открытия дейÑ
#. module: email_template
#: field:res.partner,opt_out:0
msgid "Opt-Out"
-msgstr ""
+msgstr "Без уведомлений"
#. module: email_template
#: field:email.template,email_to:0
@@ -254,7 +254,7 @@ msgstr "Просмотр"
#. module: email_template
#: view:email_template.preview:0
msgid "Using sample document"
-msgstr ""
+msgstr "Используя образец документа"
#. module: email_template
#: view:email.template:0
@@ -510,7 +510,7 @@ msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Contents"
-msgstr ""
+msgstr "Содержимое"
#. module: email_template
#: field:email.template,subject:0
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 8efae21f676..4f5e33eeafd 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -6,7 +6,7 @@
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="name">Registrations</field>
- <field name="view_mode">calendar,tree,form,graph</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id}</field>
</record>
@@ -93,6 +93,7 @@
</div>
</group>
<group>
+ <field name="user_id"/>
<field name="type" on_change="onchange_event_type(type,context)" />
<field name="date_begin" on_change="onchange_start_date(date_begin,date_end)"/>
<field name="date_end"/>
@@ -100,19 +101,13 @@
</group>
</group>
<notebook>
- <page string="Email Configuration" groups="base.group_no_one">
- <group>
+ <page string="Event Details" groups="base.group_no_one">
+ <group colspan="4">
<field name="reply_to"/>
- <group>
- <field name="email_registration_id"/>
- </group>
- <group>
- <field name="email_confirmation_id"/>
- </group>
+ <field name="email_registration_id"/>
+ <field name="email_confirmation_id"/>
</group>
- </page>
- <page string="Event Description">
- <field name="note" colspan="4" nolabel="1"/>
+ <field name="note" nolabel="1" placeholder="Event Description..."/>
</page>
<page string="Registrations">
<group>
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index ec583a58cbf..8bacd37fc15 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -70,6 +70,8 @@ class sale_order_line(osv.osv):
'''
create registration with sales order
'''
+ if context is None:
+ context = {}
registration_obj = self.pool.get('event.registration')
sale_obj = self.pool.get('sale.order')
for order_line in self.browse(cr, uid, ids, context=context):
@@ -83,7 +85,8 @@ class sale_order_line(osv.osv):
'origin': order_line.order_id.name,
'event_id': order_line.event_id.id,
}
+ message = _("The registration has been created for event <i>%s</i> from the Sale Order %s. ") % (order_line.event_id.name, order_line.order_id.name)
+ context.update({'mail_create_nolog': True})
registration_id = registration_obj.create(cr, uid, dic, context=context)
- message = _("The registration %s has been created from the Sales Order %s.") % (registration_id, order_line.order_id.name)
registration_obj.message_post(cr, uid, [registration_id], body=message, context=context)
return super(sale_order_line, self).button_confirm(cr, uid, ids, context=context)
diff --git a/addons/fetchmail/security/ir.model.access.csv b/addons/fetchmail/security/ir.model.access.csv
index 7deea6eb9f4..c006546659f 100644
--- a/addons/fetchmail/security/ir.model.access.csv
+++ b/addons/fetchmail/security/ir.model.access.csv
@@ -1,3 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_fetchmail_server,fetchmail.server,model_fetchmail_server,,1,0,0,0
access_fetchmail_server,fetchmail.server,model_fetchmail_server,base.group_system,1,1,1,1
diff --git a/addons/fleet/i18n/de.po b/addons/fleet/i18n/de.po
index f9f0523056e..b47b8ba2074 100644
--- a/addons/fleet/i18n/de.po
+++ b/addons/fleet/i18n/de.po
@@ -8,14 +8,14 @@ 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-01-06 11:09+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-06-03 05:25+0000\n"
+"Last-Translator: Armin GREGOR <armin.gregor@gmail.com>\n"
"Language-Team: German <de@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-03-16 05:52+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: fleet
#: selection:fleet.vehicle,fuel_type:0
@@ -35,7 +35,7 @@ msgstr "Ersatz Kälteklimakompressor"
#. module: fleet
#: help:fleet.vehicle,vin_sn:0
msgid "Unique number written on the vehicle motor (VIN/SN number)"
-msgstr "Eindeutige Fahrzeug-Identifizierungsnummer (FIN)"
+msgstr "Fahrgestellnummer"
#. module: fleet
#: selection:fleet.service.type,category:0
@@ -157,7 +157,7 @@ msgstr "Batterie Inspektion"
#. module: fleet
#: field:fleet.vehicle,company_id:0
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Firma"
#. module: fleet
#: view:fleet.vehicle.log.contract:0
@@ -324,7 +324,7 @@ msgstr "Ersatz Luftfilter"
#. module: fleet
#: model:ir.model,name:fleet.model_fleet_vehicle_tag
msgid "fleet.vehicle.tag"
-msgstr ""
+msgstr "fleet.vehicle.tag"
#. module: fleet
#: view:fleet.vehicle:0
@@ -339,7 +339,7 @@ msgstr "Bezeichnung des zu erneuernden Vertrags"
#. module: fleet
#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_senior
msgid "Senior"
-msgstr ""
+msgstr "Senior"
#. module: fleet
#: help:fleet.vehicle.log.contract,state:0
@@ -490,6 +490,8 @@ msgid ""
"$('.oe_picture').load(function() { if($(this).width() > $(this).height()) { "
"$(this).addClass('oe_employee_picture_wide') } });"
msgstr ""
+"$('.oe_picture').load(function() { if($(this).width() > $(this).height()) { "
+"$(this).addClass('oe_employee_picture_wide') } });"
#. module: fleet
#: view:board.board:0
@@ -737,7 +739,7 @@ msgstr "Aktueller Fahrzeugzustand"
#. module: fleet
#: selection:fleet.vehicle,transmission:0
msgid "Manual"
-msgstr "Betriebsanleitung"
+msgstr "Handbuch"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_52
@@ -917,7 +919,7 @@ msgstr "Kaufdatum des Fahrzeugs"
#. module: fleet
#: view:fleet.vehicle.model:0
msgid "Models"
-msgstr "Modell"
+msgstr "Modelle"
#. module: fleet
#: view:fleet.vehicle.log.contract:0
@@ -1055,7 +1057,7 @@ msgstr "Kraftstoffart"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_22
msgid "Fuel Injector Replacement"
-msgstr "Ersatz Einfüllstutzen"
+msgstr "Ersatz Einspritzdüse"
#. module: fleet
#: model:ir.actions.act_window,name:fleet.fleet_vehicle_state_act
@@ -1101,7 +1103,7 @@ msgstr "Datum Vertragsbeginn"
#. module: fleet
#: selection:fleet.vehicle,fuel_type:0
msgid "Electric"
-msgstr "Elektrisch"
+msgstr "Elektrik"
#. module: fleet
#: field:fleet.vehicle,tag_ids:0
@@ -1174,7 +1176,7 @@ msgstr "Ersatz Lichtmaschine"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_3
msgid "A/C Diagnosis"
-msgstr "Diagnose Batterie"
+msgstr "Diagnose Klimaanlage"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_23
@@ -1199,7 +1201,7 @@ msgstr "Ersatz Wärmepumpe"
#. module: fleet
#: view:fleet.vehicle:0
msgid "show all the costs for this vehicle"
-msgstr "gesamte Kostenübersicht der Fahrzeuge"
+msgstr "gesamte Kostenübersicht des Fahrzeugs"
#. module: fleet
#: view:fleet.vehicle.odometer:0
@@ -1534,7 +1536,7 @@ msgstr "Achsvermessung"
#. module: fleet
#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_purchased
msgid "Purchased"
-msgstr "Ersatzteil"
+msgstr "Eingekauft"
#. module: fleet
#: model:ir.actions.act_window,help:fleet.fleet_vehicle_odometer_act
@@ -1747,7 +1749,7 @@ msgstr "Preis"
#: field:fleet.vehicle.cost,odometer:0
#: field:fleet.vehicle.odometer,value:0
msgid "Odometer Value"
-msgstr "Tachostand"
+msgstr "Kilometerstand"
#. module: fleet
#: view:fleet.vehicle:0
@@ -1805,7 +1807,7 @@ msgstr "Schreiben Sie hier alle erforderlichen Zusatzinformationen auf."
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_29
msgid "Ignition Coil Replacement"
-msgstr "Ersatz Zündkerzen"
+msgstr "Ersatz Zündspule"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_service_16
@@ -1815,7 +1817,7 @@ msgstr "Optionen"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_contract_repairing
msgid "Repairing"
-msgstr "Reparieren"
+msgstr "Wird repariert"
#. module: fleet
#: model:ir.actions.act_window,name:fleet.action_fleet_reporting_costs
@@ -1853,7 +1855,7 @@ msgstr "Getriebe"
#. module: fleet
#: field:fleet.vehicle,vin_sn:0
msgid "Chassis Number"
-msgstr "Fahrzeuqinformationsnummer"
+msgstr "Fahrgestellnummer"
#. module: fleet
#: help:fleet.vehicle,color:0
@@ -2009,7 +2011,7 @@ msgstr "Reifenwechsel"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_42
msgid "Starter Replacement"
-msgstr "Erstinspektion"
+msgstr "Ersatz Anlasser"
#. module: fleet
#: view:fleet.vehicle.cost:0
diff --git a/addons/google_docs/i18n/ln.po b/addons/google_docs/i18n/ln.po
new file mode 100644
index 00000000000..24c26b98920
--- /dev/null
+++ b/addons/google_docs/i18n/ln.po
@@ -0,0 +1,188 @@
+# Lingala 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-06-05 13:00+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Lingala <ln@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-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:167
+#, python-format
+msgid "Key Error!"
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid ""
+"for a presentation (slide show) document with url like "
+"`https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id"
+".p`, the ID is `presentation:123456789`"
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid ""
+"for a text document with url like "
+"`https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is "
+"`document:123456789`"
+msgstr ""
+
+#. module: google_docs
+#: field:google.docs.config,gdocs_resource_id:0
+msgid "Google Resource ID to Use as Template"
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid ""
+"for a drawing document with url like "
+"`https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is "
+"`drawings:123456789`"
+msgstr ""
+
+#. module: google_docs
+#. openerp-web
+#: code:addons/google_docs/static/src/xml/gdocs.xml:6
+#, python-format
+msgid "Add Google Doc..."
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid ""
+"This is the id of the template document, on google side. You can find it "
+"thanks to its URL:"
+msgstr ""
+
+#. module: google_docs
+#: model:ir.model,name:google_docs.model_google_docs_config
+msgid "Google Docs templates config"
+msgstr ""
+
+#. module: google_docs
+#. openerp-web
+#: code:addons/google_docs/static/src/js/gdocs.js:25
+#, python-format
+msgid ""
+"The user google credentials are not set yet. Contact your administrator for "
+"help."
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid ""
+"for a spreadsheet document with url like "
+"`https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, "
+"the ID is `spreadsheet:123456789`"
+msgstr ""
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:129
+#, python-format
+msgid ""
+"Your resource id is not correct. You can find the id in the google docs URL."
+msgstr ""
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:153
+#, python-format
+msgid "Creating google docs may only be done by one at a time."
+msgstr ""
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:83
+#: code:addons/google_docs/google_docs.py:129
+#: code:addons/google_docs/google_docs.py:153
+#, python-format
+msgid "Google Docs Error!"
+msgstr ""
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:83
+#, python-format
+msgid "Check your google configuration in Users/Users/Synchronization tab."
+msgstr ""
+
+#. module: google_docs
+#: model:ir.ui.menu,name:google_docs.menu_gdocs_config
+msgid "Google Docs configuration"
+msgstr ""
+
+#. module: google_docs
+#: model:ir.actions.act_window,name:google_docs.action_google_docs_users_config
+#: model:ir.ui.menu,name:google_docs.menu_gdocs_model_config
+msgid "Models configuration"
+msgstr ""
+
+#. module: google_docs
+#: field:google.docs.config,model_id:0
+msgid "Model"
+msgstr ""
+
+#. module: google_docs
+#. openerp-web
+#: code:addons/google_docs/static/src/js/gdocs.js:28
+#, python-format
+msgid "User Google credentials are not yet set."
+msgstr ""
+
+#. module: google_docs
+#: code:addons/google_docs/google_docs.py:167
+#, python-format
+msgid "Your Google Doc Name Pattern's key does not found in object."
+msgstr ""
+
+#. module: google_docs
+#: help:google.docs.config,name_template:0
+msgid ""
+"Choose how the new google docs will be named, on google side. Eg. "
+"gdoc_%(field_name)s"
+msgstr ""
+
+#. module: google_docs
+#: view:google.docs.config:0
+msgid "Google Docs Configuration"
+msgstr ""
+
+#. module: google_docs
+#: help:google.docs.config,gdocs_resource_id:0
+msgid ""
+"\n"
+"This is the id of the template document, on google side. You can find it "
+"thanks to its URL: \n"
+"*for a text document with url like "
+"`https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is "
+"`document:123456789`\n"
+"*for a spreadsheet document with url like "
+"`https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, "
+"the ID is `spreadsheet:123456789`\n"
+"*for a presentation (slide show) document with url like "
+"`https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id"
+".p`, the ID is `presentation:123456789`\n"
+"*for a drawing document with url like "
+"`https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is "
+"`drawings:123456789`\n"
+"...\n"
+msgstr ""
+
+#. module: google_docs
+#: model:ir.model,name:google_docs.model_ir_attachment
+msgid "ir.attachment"
+msgstr ""
+
+#. module: google_docs
+#: field:google.docs.config,name_template:0
+msgid "Google Doc Name Pattern"
+msgstr ""
diff --git a/addons/hr/html/index.html b/addons/hr/html/index.html
index acfa5041a9d..0bc3db084a4 100644
--- a/addons/hr/html/index.html
+++ b/addons/hr/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=hr">
<img src="hr_kanban.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml
index edefb3be0a2..548df39905c 100644
--- a/addons/hr/process/hr_process.xml
+++ b/addons/hr/process/hr_process.xml
@@ -54,17 +54,17 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link a user to an employee&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Related user field on the Employee form allows to link the OpenERP user (and her rights) to the employee.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_openerpuser0"/>
- <field model="process.node" name="source_node_id" ref="process_node_employee0"/>
+ <field name="target_node_id" ref="process_node_openerpuser0"/>
+ <field name="source_node_id" ref="process_node_employee0"/>
</record>
<record id="process_transition_contactofemployee0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link the employee to information&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In the Employee form, there are different kind of information like Contact information.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_employeecontact0"/>
- <field model="process.node" name="source_node_id" ref="process_node_employee0"/>
+ <field name="target_node_id" ref="process_node_employeecontact0"/>
+ <field name="source_node_id" ref="process_node_employee0"/>
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml
index 8f3697f234a..4383f2d6c74 100644
--- a/addons/hr/security/hr_security.xml
+++ b/addons/hr/security/hr_security.xml
@@ -25,13 +25,13 @@
<record id="hr_dept_comp_rule" model="ir.rule">
<field name="name">Department multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_department"/>
+ <field name="model_id" ref="model_hr_department"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_job_comp_rule" model="ir.rule">
<field name="name">Job multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_job"/>
+ <field name="model_id" ref="model_hr_job"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/hr_attendance/security/ir_rule.xml b/addons/hr_attendance/security/ir_rule.xml
index 857fc2f54ae..0bf3b73d76e 100644
--- a/addons/hr_attendance/security/ir_rule.xml
+++ b/addons/hr_attendance/security/ir_rule.xml
@@ -9,13 +9,13 @@
<record id="property_rule_attendace_manager" model="ir.rule">
<field name="name">Manager Attendance</field>
- <field model="ir.model" name="model_id" ref="model_hr_attendance"/>
+ <field name="model_id" ref="model_hr_attendance"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_attendace_employee" model="ir.rule">
<field name="name">Employee Attendance</field>
- <field model="ir.model" name="model_id" ref="model_hr_attendance"/>
+ <field name="model_id" ref="model_hr_attendance"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
diff --git a/addons/hr_attendance/wizard/hr_attendance_error.py b/addons/hr_attendance/wizard/hr_attendance_error.py
index 137bac30215..82d75149428 100644
--- a/addons/hr_attendance/wizard/hr_attendance_error.py
+++ b/addons/hr_attendance/wizard/hr_attendance_error.py
@@ -46,7 +46,7 @@ class hr_attendance_error(osv.osv_memory):
cr.execute("SELECT id FROM hr_attendance WHERE employee_id IN %s AND to_char(name,'YYYY-mm-dd')<=%s AND to_char(name,'YYYY-mm-dd')>=%s AND action IN %s ORDER BY name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out'])))
attendance_ids = [x[0] for x in cr.fetchall()]
if not attendance_ids:
- raise osv.except_osv(_('No Data Available !'), _('No records are found for your selection!'))
+ raise osv.except_osv(_('No Data Available!'), _('No records are found for your selection!'))
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context)
for rec in attendance_records:
diff --git a/addons/hr_evaluation/security/hr_evaluation_security.xml b/addons/hr_evaluation/security/hr_evaluation_security.xml
index 7c7d6f43ee3..209ca281396 100644
--- a/addons/hr_evaluation/security/hr_evaluation_security.xml
+++ b/addons/hr_evaluation/security/hr_evaluation_security.xml
@@ -31,14 +31,14 @@
<record id="hr_evaluation_plan_comp_rule" model="ir.rule">
<field name="name">Evaluation Plan multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_evaluation_plan"/>
+ <field name="model_id" ref="model_hr_evaluation_plan"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_evaluation_plan_phase_comp_rule" model="ir.rule">
<field name="name">Evaluation Plan Phase multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_evaluation_plan_phase"/>
+ <field name="model_id" ref="model_hr_evaluation_plan_phase"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 73daa64f841..8d707baa50e 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -57,10 +57,7 @@ class hr_expense_expense(osv.osv):
def _get_currency(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, [uid], context=context)[0]
- if user.company_id:
- return user.company_id.currency_id.id
- else:
- return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)], context=context)[0]
+ return user.company_id.currency_id.id
_name = "hr.expense.expense"
_inherit = ['mail.thread']
@@ -99,11 +96,13 @@ class hr_expense_expense(osv.osv):
('cancelled', 'Refused'),
('confirm', 'Waiting Approval'),
('accepted', 'Approved'),
- ('done', 'Done'),
+ ('done', 'Waiting Payment'),
+ ('paid', 'Paid'),
],
'Status', readonly=True, track_visibility='onchange',
help='When the expense request is created the status is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the status is \'Waiting Confirmation\'.\
- \nIf the admin accepts it, the status is \'Accepted\'.\n If a receipt is made for the expense request, the status is \'Done\'.'),
+ \nIf the admin accepts it, the status is \'Accepted\'.\n If the accounting entries are made for the expense request, the status is \'Waiting Payment\'.'),
+
}
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.employee', context=c),
@@ -114,6 +113,12 @@ class hr_expense_expense(osv.osv):
'currency_id': _get_currency,
}
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ default.update(account_move_id=False)
+ return super(hr_expense_expense, self).copy(cr, uid, id, default=default, context=context)
+
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state != 'draft':
@@ -282,7 +287,6 @@ class hr_expense_expense(osv.osv):
tax_code_found= False
#Calculate tax according to default tax on product
-
taxes = []
#Taken from product_id_onchange in account.invoice
if line.product_id:
@@ -319,8 +323,11 @@ class hr_expense_expense(osv.osv):
tax_code_found = True
res[-1]['tax_code_id'] = tax_code_id
res[-1]['tax_amount'] = cur_obj.compute(cr, uid, exp.currency_id.id, company_currency, tax_amount, context={'date': exp.date_confirm})
-
- #Will create the tax here as we don't have the access
+ ##
+ is_price_include = tax_obj.read(cr,uid,tax['id'],['price_include'],context)['price_include']
+ if is_price_include:
+ ## We need to deduce the price for the tax
+ res[-1]['price'] = res[-1]['price'] - (tax['amount'] * tax['base_sign'] or 0.0)
assoc_tax = {
'type':'tax',
'name':tax['name'],
@@ -449,4 +456,26 @@ class hr_expense_line(osv.osv):
return res
+class account_move_line(osv.osv):
+ _inherit = "account.move.line"
+
+ def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
+ res = super(account_move_line, self).reconcile(cr, uid, ids, type=type, writeoff_acc_id=writeoff_acc_id, writeoff_period_id=writeoff_period_id, writeoff_journal_id=writeoff_journal_id, context=context)
+ #when making a full reconciliation of account move lines 'ids', we may need to recompute the state of some hr.expense
+ account_move_ids = [aml.move_id.id for aml in self.browse(cr, uid, ids, context=context)]
+ expense_obj = self.pool.get('hr.expense.expense')
+ currency_obj = self.pool.get('res.currency')
+ if account_move_ids:
+ expense_ids = expense_obj.search(cr, uid, [('account_move_id', 'in', account_move_ids)], context=context)
+ for expense in expense_obj.browse(cr, uid, expense_ids, context=context):
+ if expense.state == 'done':
+ #making the postulate it has to be set paid, then trying to invalidate it
+ new_status_is_paid = True
+ for aml in expense.account_move_id.line_id:
+ if aml.account_id.type == 'payable' and not currency_obj.is_zero(cr, uid, expense.company_id.currency_id, aml.amount_residual):
+ new_status_is_paid = False
+ if new_status_is_paid:
+ expense_obj.write(cr, uid, [expense.id], {'state': 'paid'}, context=context)
+ return res
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index 10abe95d892..ca882406d63 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -68,7 +68,7 @@
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" />
<button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice"/>
- <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
+ <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done,paid" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
</header>
<sheet>
<group>
diff --git a/addons/hr_expense/process/hr_expense_process.xml b/addons/hr_expense/process/hr_expense_process.xml
index 242fe6393c2..3ade1f1daca 100644
--- a/addons/hr_expense/process/hr_expense_process.xml
+++ b/addons/hr_expense/process/hr_expense_process.xml
@@ -101,48 +101,48 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is confirmed.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_confirmedexpenses0"/>
- <field model="process.node" name="source_node_id" ref="process_node_draftexpenses0"/>
+ <field name="target_node_id" ref="process_node_confirmedexpenses0"/>
+ <field name="source_node_id" ref="process_node_draftexpenses0"/>
</record>
<record id="process_transition_refuseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refuse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is refused.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_refused0"/>
- <field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
+ <field name="target_node_id" ref="process_node_refused0"/>
+ <field name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approve expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is approved.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_approved0"/>
- <field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
+ <field name="target_node_id" ref="process_node_approved0"/>
+ <field name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Supplier Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creates supplier invoice.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplierinvoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_approved0"/>
+ <field name="target_node_id" ref="process_node_supplierinvoice0"/>
+ <field name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_reimburseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reimburse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After creating invoice, reimburse expenses&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_reimbursement0"/>
- <field model="process.node" name="source_node_id" ref="process_node_supplierinvoice0"/>
+ <field name="target_node_id" ref="process_node_reimbursement0"/>
+ <field name="source_node_id" ref="process_node_supplierinvoice0"/>
</record>
<record id="process_transition_reimbursereinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reinvoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Create Customer invoice&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_reinvoicing0"/>
- <field model="process.node" name="source_node_id" ref="process_node_reimbursement0"/>
+ <field name="target_node_id" ref="process_node_reinvoicing0"/>
+ <field name="source_node_id" ref="process_node_reimbursement0"/>
</record>
<!--
@@ -178,4 +178,4 @@
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/hr_expense/security/ir_rule.xml b/addons/hr_expense/security/ir_rule.xml
index b9ad5778d1e..3c3cb018489 100644
--- a/addons/hr_expense/security/ir_rule.xml
+++ b/addons/hr_expense/security/ir_rule.xml
@@ -4,19 +4,19 @@
<record id="property_rule_expense_manager" model="ir.rule">
<field name="name">Manager Expense</field>
- <field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
+ <field name="model_id" ref="model_hr_expense_expense"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_expense_employee" model="ir.rule">
<field name="name">Employee Expense</field>
- <field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
+ <field name="model_id" ref="model_hr_expense_expense"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_expense_comp_rule" model="ir.rule">
<field name="name">Expense multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
+ <field name="model_id" ref="model_hr_expense_expense"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 5828790c152..5ffbff10040 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -40,8 +40,8 @@
<field name="name">Leave Request</field>
<field name="model">hr.holidays</field>
<field name="arch" type="xml">
- <calendar string="Leave Request" color="user_id" date_start="date_from" date_stop="date_to">
- <field name="user_id"/>
+ <calendar string="Leave Request" color="employee_id" date_start="date_from" date_stop="date_to">
+ <field name="employee_id"/>
<field name="holiday_status_id"/>
</calendar>
</field>
diff --git a/addons/hr_holidays/process/hr_holidays_process.xml b/addons/hr_holidays/process/hr_holidays_process.xml
index 5c10fdff749..79029e45e09 100644
--- a/addons/hr_holidays/process/hr_holidays_process.xml
+++ b/addons/hr_holidays/process/hr_holidays_process.xml
@@ -100,48 +100,48 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Declaration&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Document for employee&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_legaldeclaration0"/>
- <field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
+ <field name="target_node_id" ref="process_node_legaldeclaration0"/>
+ <field name="source_node_id" ref="hr.process_node_employee0"/>
</record>
<record id="process_transition_holidaysdefrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Holidays def Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If holidays available, employee can take it and fill it.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_holidaysrequest0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysdefinition0"/>
+ <field name="target_node_id" ref="process_node_holidaysrequest0"/>
+ <field name="source_node_id" ref="process_node_holidaysdefinition0"/>
</record>
<record id="process_transition_refusedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refused Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is refused.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_refused0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0" />
+ <field name="target_node_id" ref="process_node_refused0"/>
+ <field name="source_node_id" ref="process_node_holidaysrequest0" />
</record>
<record id="process_transition_approvedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approved Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is approved.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_approved0"/>
- <field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0"/>
+ <field name="target_node_id" ref="process_node_approved0"/>
+ <field name="source_node_id" ref="process_node_holidaysrequest0"/>
</record>
<record id="process_transition_setholiday0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Set Holiday&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Holiday is set in the calendar.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_calendar0"/>
- <field model="process.node" name="source_node_id" ref="process_node_approved0"/>
+ <field name="target_node_id" ref="process_node_calendar0"/>
+ <field name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_employeeholidays0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Holidays&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get holidays&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_holidays0"/>
- <field model="process.node" name="source_node_id" ref="process_node_legaldeclaration0"/>
+ <field name="target_node_id" ref="process_node_holidays0"/>
+ <field name="source_node_id" ref="process_node_legaldeclaration0"/>
</record>
<!--
@@ -170,4 +170,4 @@
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/hr_holidays/security/ir_rule.xml b/addons/hr_holidays/security/ir_rule.xml
index ff0270026a4..e2c0ffb1a6f 100644
--- a/addons/hr_holidays/security/ir_rule.xml
+++ b/addons/hr_holidays/security/ir_rule.xml
@@ -3,14 +3,14 @@
<data>
<record id="property_rule_holidays_employee" model="ir.rule">
<field name="name">Employee Holidays</field>
- <field model="ir.model" name="model_id" ref="model_hr_holidays"/>
+ <field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="property_rule_holidays_officer" model="ir.rule">
<field name="name">Holidays Officer</field>
- <field model="ir.model" name="model_id" ref="model_hr_holidays"/>
+ <field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
diff --git a/addons/hr_payroll/security/hr_security.xml b/addons/hr_payroll/security/hr_security.xml
index d55f1c81cce..e410eae7250 100644
--- a/addons/hr_payroll/security/hr_security.xml
+++ b/addons/hr_payroll/security/hr_security.xml
@@ -8,10 +8,10 @@
<record id="property_rule_employee_payslip" model="ir.rule">
<field name="name">Employee Payslip</field>
- <field model="ir.model" name="model_id" ref="model_hr_payslip"/>
+ <field name="model_id" ref="model_hr_payslip"/>
<field name="domain_force">['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
index 5837472be5f..3bf8b339300 100644
--- a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
+++ b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
@@ -49,7 +49,7 @@ class hr_payslip_employees(osv.osv_memory):
to_date = run_data.get('date_end', False)
credit_note = run_data.get('credit_note', False)
if not data['employee_ids']:
- raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s)."))
+ raise osv.except_osv(_("Warning!"), _("You must select employee(s) to generate payslip(s)."))
for emp in emp_pool.browse(cr, uid, data['employee_ids'], context=context):
slip_data = slip_pool.onchange_employee_id(cr, uid, [], from_date, to_date, emp.id, contract_id=False, context=context)
res = {
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index 749af25e765..e83c546af04 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -57,9 +57,9 @@ You can define the different phases of interviews and easily rate the applicant
'board_hr_recruitment_statistical_view.xml',
'hr_recruitment_installer_view.xml',
'res_config_view.xml',
- 'hr_recruitment_data.xml'
+ 'hr_recruitment_data.xml',
],
- 'demo': ['hr_recruitment_demo.yml'],
+ 'demo': ['hr_recruitment_demo.xml'],
'test': ['test/recruitment_process.yml'],
'installable': True,
'auto_install': False,
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 6dd5bf45812..e26c96d41d9 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -355,10 +355,12 @@ class hr_applicant(base_stage, osv.Model):
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
+ val = msg.get('from').split('<')[0]
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
+ 'partner_name':val,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index a0b16f042bc..f3f1b3e712d 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -485,6 +485,18 @@
<field name="default" eval="False"/>
<field name="description">Applicant refused</field>
</record>
-
+ <!-- Applicant Categories(Tag) -->
+ <record id="tag_applicant_reserve" model="hr.applicant_category">
+ <field name="name">Reserve</field>
+ </record>
+ <record id="tag_applicant_manager" model="hr.applicant_category">
+ <field name="name">Manager</field>
+ </record>
+ <record id="tag_applicant_it" model="hr.applicant_category">
+ <field name="name">IT</field>
+ </record>
+ <record id="tag_applicant_sales" model="hr.applicant_category">
+ <field name="name">Sales</field>
+ </record>
</data>
</openerp>
diff --git a/addons/hr_recruitment/hr_recruitment_demo.xml b/addons/hr_recruitment/hr_recruitment_demo.xml
new file mode 100644
index 00000000000..c15e0deb188
--- /dev/null
+++ b/addons/hr_recruitment/hr_recruitment_demo.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<openerp>
+ <data noupdate="1">
+ <record id="hr_case_salesman0" model="hr.applicant">
+ <field name="name">Salesperson</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_graduate"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_sales')])]"/>
+ <field eval= "time.strftime('%Y-%m-01 10:35:50')" name="date"/>
+ <field name="priority">2</field>
+ <field name="partner_name">Enrique Jones</field>
+ <field name="partner_mobile">9963214587</field>
+ <field name="stage_id" ref="stage_job1"/>
+ <field eval="time.strftime('%Y-%m-15 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_traineemca0" model="hr.applicant">
+ <field name="name">Trainee - MCA</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_bac5"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_manager')])]"/>
+ <field eval="time.strftime('%Y-%m-10 18:15:00')" name="date"/>
+ <field name="user_id" ref="base.user_demo"/>
+ <field name="priority">3</field>
+ <field name="partner_name">Marie Justine</field>
+ <field name="partner_mobile">9988774455</field>
+ <field name="stage_id" ref="stage_job4"/>
+ <field name="partner_phone">6633225</field>
+ <field eval="time.strftime('%Y-%m-10 18:15:00')" name="date_action"/>
+ <field name="title_action">Call to define real needs about training</field>
+ </record>
+ <record id="hr_case_fresher0" model="hr.applicant">
+ <field name="name">Fresher</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_licenced"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_it')])]"/>
+ <field eval="time.strftime('%Y-%m-10 18:15:00')" name="date"/>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="priority">1</field>
+ <field name="partner_name">Jose</field>
+ <field name="stage_id" ref="stage_job3"/>
+ <field name="partner_phone">999666735</field>
+ <field eval="time.strftime('%Y-%m-5 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_yrsexperienceinphp0" model="hr.applicant">
+ <field name="name">Marketing Job</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_bac5"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_manager')])]"/>
+ <field eval="time.strftime('%Y-%m-25 16:25:52')" name="date"/>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="partner_name">John Bruno</field>
+ <field name="stage_id" ref="stage_job5"/>
+ <field eval="time.strftime('%Y-%m-24 18:15:00')" name="date_action"/>
+ <field name="title_action">Call to define real needs about training</field>
+ </record>
+ <record id="hr_case_marketingjob0" model="hr.applicant">
+ <field name="name">More than 5 yrs Experience in PHP</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_licenced"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/>
+ <field eval="time.strftime('%Y-%m-26 17:15:32')" name="date"/>
+ <field name="user_id" ref="base.user_demo"/>
+ <field name="partner_name">Sandra Elvis</field>
+ <field name="stage_id" ref="stage_job6"/>
+ <field eval="time.strftime('%Y-%m-20 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_financejob0" model="hr.applicant">
+ <field name="name">Finance Job</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_licenced"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/>
+ <field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="priority">4</field>
+ <field name="partner_name">David Armstrong</field>
+ <field name="stage_id" ref="stage_job2"/>
+ <field name="partner_phone">33968745</field>
+ <field eval="time.strftime('%Y-%m-18 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_traineemca1" model="hr.applicant">
+ <field name="name">Trainee - MCA</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_bac5"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_sales')])]"/>
+ <field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
+ <field name="partner_name">Tina Augustie</field>
+ <field name="partner_mobile">9898745745</field>
+ <field name="stage_id" ref="stage_job4"/>
+ <field name="partner_phone">6630125</field>
+ <field eval="time.strftime('%Y-%m-15 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_programmer" model="hr.applicant">
+ <field name="name">Programmer</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_bac5"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_it')])]"/>
+ <field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
+ <field name="partner_name">Shane Williams</field>
+ <field name="partner_mobile">9812398524</field>
+ <field name="stage_id" ref="stage_job4"/>
+ <field name="partner_phone">6630125</field>
+ <field name="salary_expected">11000.0</field>
+ <field eval="time.strftime('%Y-%m-24 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+ <record id="hr_case_advertisement" model="hr.applicant">
+ <field name="name">Advertisement</field>
+ <field name="job_id" ref="hr.job_developer"/>
+ <field name="type_id" ref="degree_licenced"/>
+ <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_it')])]"/>
+ <field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
+ <field name="partner_name">David Armstrong</field>
+ <field name="partner_mobile">9988774455</field>
+ <field name="stage_id" ref="stage_job2"/>
+ <field name="salary_expected">11000.0</field>
+ <field eval="time.strftime('%Y-%m-15 18:15:00')" name="date_action"/>
+ <field name="title_action">Send mail regarding our interview</field>
+ </record>
+
+ <record id="hr.job_developer" model="hr.job">
+ <field name="survey_id" ref="survey_job_0"/>
+ </record>
+ </data>
+</openerp> \ No newline at end of file
diff --git a/addons/hr_recruitment/hr_recruitment_demo.yml b/addons/hr_recruitment/hr_recruitment_demo.yml
deleted file mode 100644
index 2554c690c15..00000000000
--- a/addons/hr_recruitment/hr_recruitment_demo.yml
+++ /dev/null
@@ -1,102 +0,0 @@
--
- !record {model: hr.applicant, id: hr_case_salesman0}:
- date: !eval time.strftime('%Y-%m-01 10:35:50')
- type_id: degree_graduate
- priority: '2'
- partner_name: 'Enrique Jones'
- partner_mobile: '9963214587'
- job_id: hr.job_developer
- stage_id: stage_job1
- name: 'Salesperson'
- partner_phone: '1236547890'
-
--
- !record {model: hr.applicant, id: hr_case_traineemca0}:
- date: !eval time.strftime('%Y-%m-10 18:15:00')
- type_id: degree_bac5
- priority: '3'
- user_id: base.user_demo
- partner_name: 'Marie Justine'
- partner_mobile: '9988774455'
- job_id: hr.job_developer
- stage_id: stage_job4
- name: 'Trainee - MCA'
- partner_phone: '6633225'
--
- !record {model: hr.applicant, id: hr_case_fresher0}:
- date: !eval time.strftime('%Y-%m-15 16:10:00')
- type_id: degree_licenced
- priority: '1'
- user_id: base.user_root
- partner_name: 'Jose'
- job_id: hr.job_developer
- stage_id: stage_job3
- name: 'Fresher'
- partner_phone: '999666735'
--
- !record {model: hr.applicant, id: hr_case_yrsexperienceinphp0}:
- date: !eval time.strftime('%Y-%m-25 16:25:52')
- job_id: hr.job_developer
- type_id: degree_bac5
- user_id: base.user_root
- partner_name: 'Sandra Elvis'
- stage_id: stage_job6
- name: 'More than 5 yrs Experience in PHP'
--
- !record {model: hr.applicant, id: hr_case_marketingjob0}:
- date: !eval time.strftime('%Y-%m-26 17:15:32')
- type_id: degree_licenced
- user_id: base.user_demo
- partner_name: 'John Bruno'
- job_id: hr.job_developer
- color: 5
- stage_id: stage_job5
- name: 'Marketing Job'
--
- !record {model: hr.applicant, id: hr_case_financejob0}:
- date: !eval time.strftime('%Y-%m-26 17:39:42')
- type_id: degree_licenced
- priority: '4'
- partner_name: 'David Armstrong'
- partner_mobile: '9966332214'
- job_id: hr.job_developer
- stage_id: stage_job2
- name: 'Finance Job'
- partner_phone: '33968745'
--
- !record {model: hr.applicant, id: hr_case_traineemca1}:
- date: !eval time.strftime('%Y-%m-12 17:49:19')
- type_id: degree_bac5
- partner_name: 'Tina Augustie'
- partner_mobile: '9898745745'
- job_id: hr.job_developer
- stage_id: stage_job4
- name: 'Trainee - MCA'
- partner_phone: '6630125'
-
--
- !record {model: hr.applicant, id: hr_case_programmer}:
- date: !eval time.strftime('%Y-%m-12 17:49:19')
- type_id: degree_bac5
- partner_name: 'Shane Williams'
- partner_mobile: '9812398524'
- stage_id: stage_job4
- name: 'Programmer'
- partner_phone: '6630125'
- job_id: hr.job_developer
- department_id: hr.dep_rd
- salary_expected: 11000.0
-
--
- !record {model: hr.applicant, id: hr_case_advertisement}:
- date: !eval time.strftime('%Y-%m-26 17:39:42')
- type_id: degree_licenced
- partner_name: 'David Armstrong'
- job_id: hr.job_developer
- stage_id: stage_job2
- color: 4
- name: 'Advertisement'
- salary_expected: 11000.0
--
- !record {model: hr.job, id: hr.job_developer}:
- survey_id: hr_recruitment.survey_job_0
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index 716c1cba8d5..f6fb202252c 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -263,9 +263,14 @@
<i><field name="name"/></i><br/>
<field name="job_id"/><br/>
<t t-if="record.partner_mobile.raw_value">Mobile: <field name="partner_mobile"/><br/></t>
- <t t-if="record.title_action.raw_value"><field name="title_action"/><br/></t>
- <field name="date_action"/>
</div>
+ <div style="padding-left: 0.5em">
+ <t t-if="record.date_action.raw_value and record.date_action.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
+ <span t-attf-class="#{red || ''}"><field name="date_action"/></span>
+ <t t-if="record.date_action.raw_value"> : </t>
+ <field name="title_action"/>
+ </div>
+ <div style="width:240px"><field name="categ_ids"/></div>
<div class="oe_kanban_right">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3">
@@ -285,7 +290,6 @@
</div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
<t t-raw="record.message_summary.raw_value"/>
- <field name="categ_ids"/>
</div>
</div>
<div class="oe_clear"></div>
diff --git a/addons/hr_recruitment/security/hr_recruitment_security.xml b/addons/hr_recruitment/security/hr_recruitment_security.xml
index 570b0f036cd..4fccca1a791 100644
--- a/addons/hr_recruitment/security/hr_recruitment_security.xml
+++ b/addons/hr_recruitment/security/hr_recruitment_security.xml
@@ -4,7 +4,7 @@
<record id="hr_applicant_comp_rule" model="ir.rule">
<field name="name">Applicant multi company rule</field>
- <field model="ir.model" name="model_id" ref="model_hr_applicant"/>
+ <field name="model_id" ref="model_hr_applicant"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py
index bff25e8e55d..fa14c45f84a 100644
--- a/addons/hr_timesheet/__openerp__.py
+++ b/addons/hr_timesheet/__openerp__.py
@@ -21,7 +21,7 @@
{
- 'name': 'Timesheets',
+ 'name': 'Time Tracking',
'version': '1.0',
'category': 'Human Resources',
'sequence': 23,
diff --git a/addons/hr_timesheet/hr_timesheet_demo.xml b/addons/hr_timesheet/hr_timesheet_demo.xml
index b6773dbbdd6..2abea3ada67 100644
--- a/addons/hr_timesheet/hr_timesheet_demo.xml
+++ b/addons/hr_timesheet/hr_timesheet_demo.xml
@@ -34,7 +34,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-60.00" name="amount"/>
- <field name="general_account_id" model="account.account" ref="account.a_expense"/>
+ <field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@@ -47,7 +47,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
- <field name="general_account_id" model="account.account" ref="account.a_expense"/>
+ <field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@@ -60,7 +60,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-90.00" name="amount"/>
- <field name="general_account_id" model="account.account" ref="account.a_expense"/>
+ <field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@@ -73,7 +73,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
- <field name="general_account_id" model="account.account" ref="account.a_expense"/>
+ <field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@@ -86,7 +86,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
- <field name="general_account_id" model="account.account" ref="account.a_expense"/>
+ <field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
diff --git a/addons/hr_timesheet/security/hr_timesheet_security.xml b/addons/hr_timesheet/security/hr_timesheet_security.xml
index d7cf34fa1fd..c5549d1ed27 100644
--- a/addons/hr_timesheet/security/hr_timesheet_security.xml
+++ b/addons/hr_timesheet/security/hr_timesheet_security.xml
@@ -4,14 +4,14 @@
<record id="property_rule_timesheet_manager" model="ir.rule">
<field name="name">Manager HR Analytic Timesheet</field>
- <field model="ir.model" name="model_id" ref="model_hr_analytic_timesheet"/>
+ <field name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_timesheet_employee" model="ir.rule">
<field name="name">Employee HR Analytic Timesheet</field>
- <field model="ir.model" name="model_id" ref="model_hr_analytic_timesheet"/>
+ <field name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index f8c27bded5e..6c4f6022c39 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -181,7 +181,7 @@ class account_analytic_line(osv.osv):
for account in analytic_account_obj.browse(cr, uid, list(account_ids), context=context):
partner = account.partner_id
if (not partner) or not (account.pricelist_id):
- raise osv.except_osv(_('Analytic Account incomplete !'),
+ raise osv.except_osv(_('Analytic Account Incomplete!'),
_('Contract incomplete. Please fill in the Customer and Pricelist fields.'))
date_due = False
diff --git a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml
index 628cc2097ae..7ebec9ab228 100644
--- a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml
+++ b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml
@@ -100,24 +100,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee signs in and signs out.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
+ <field name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
+ <field name="source_node_id" ref="process_node_attendance0"/>
</record>
<record id="process_transition_timesheetdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The timesheet line represents the time spent by the employee on a specific service provided.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
+ <field name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
+ <field name="source_node_id" ref="process_node_timesheet0"/>
</record>
<record id="process_transition_confirmtimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee periodically confirms his own timesheets.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_confirmedtimesheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
+ <field name="target_node_id" ref="process_node_confirmedtimesheet0"/>
+ <field name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
<field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
</record>
@@ -125,24 +125,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The project manager validates the timesheets.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
+ <field name="target_node_id" ref="process_node_validatedtimesheet0"/>
+ <field name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_invoiceontimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Billing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created based on the timesheet.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
- <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
+ <field name="target_node_id" ref="process_node_invoiceonwork0"/>
+ <field name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_tasktimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
+ <field name="target_node_id" ref="process_node_timesheet0"/>
+ <field name="source_node_id" ref="process_node_workontask0"/>
</record>
<!--
diff --git a/addons/hr_timesheet_sheet/static/src/js/timesheet.js b/addons/hr_timesheet_sheet/static/src/js/timesheet.js
index fe7d0c82767..e7d13c425b6 100644
--- a/addons/hr_timesheet_sheet/static/src/js/timesheet.js
+++ b/addons/hr_timesheet_sheet/static/src/js/timesheet.js
@@ -163,24 +163,42 @@ openerp.hr_timesheet_sheet = function(instance) {
this.dfm = undefined;
}
},
+ is_valid_value:function(value){
+ var split_value = value.split(":");
+ var valid_value = true;
+ if (split_value.length > 2)
+ return false;
+ _.detect(split_value,function(num){
+ if(isNaN(num)){
+ valid_value = false;
+ }
+ });
+ return valid_value;
+ },
display_data: function() {
var self = this;
self.$el.html(QWeb.render("hr_timesheet_sheet.WeeklyTimesheet", {widget: self}));
_.each(self.accounts, function(account) {
_.each(_.range(account.days.length), function(day_count) {
if (!self.get('effective_readonly')) {
- self.get_box(account, day_count).val(self.sum_box(account, day_count)).change(function() {
- var num = Number($(this).val());
+ self.get_box(account, day_count).val(self.sum_box(account, day_count, true)).change(function() {
+ var num = $(this).val();
+ if (self.is_valid_value(num)){
+ num = (num == 0)?0:Number(self.parse_client(num));
+ }
if (isNaN(num)) {
- $(this).val(self.sum_box(account, day_count));
+ $(this).val(self.sum_box(account, day_count, true));
} else {
account.days[day_count].lines[0].unit_amount += num - self.sum_box(account, day_count);
self.display_totals();
self.sync();
+ if(!isNaN($(this).val())){
+ $(this).val(self.sum_box(account, day_count, true));
+ }
}
});
} else {
- self.get_box(account, day_count).html(self.sum_box(account, day_count));
+ self.get_box(account, day_count).html(self.sum_box(account, day_count, true));
}
});
});
@@ -247,12 +265,12 @@ openerp.hr_timesheet_sheet = function(instance) {
get_super_total: function() {
return this.$('.oe_timesheet_weekly_supertotal');
},
- sum_box: function(account, day_count) {
+ sum_box: function(account, day_count, show_value_in_hour) {
var line_total = 0;
_.each(account.days[day_count].lines, function(line) {
line_total += line.unit_amount;
});
- return line_total;
+ return (show_value_in_hour && line_total != 0)?this.format_client(line_total):line_total;
},
display_totals: function() {
var self = this;
@@ -266,12 +284,12 @@ openerp.hr_timesheet_sheet = function(instance) {
day_tots[day_count] += sum;
super_tot += sum;
});
- self.get_total(account).html(acc_tot);
+ self.get_total(account).html(self.format_client(acc_tot));
});
_.each(_.range(self.dates.length), function(day_count) {
- self.get_day_total(day_count).html(day_tots[day_count]);
+ self.get_day_total(day_count).html(self.format_client(day_tots[day_count]));
});
- self.get_super_total().html(super_tot);
+ self.get_super_total().html(self.format_client(super_tot));
},
sync: function() {
var self = this;
@@ -279,6 +297,14 @@ openerp.hr_timesheet_sheet = function(instance) {
self.set({sheets: this.generate_o2m_value()});
self.setting = false;
},
+ //converts hour value to float
+ parse_client: function(value) {
+ return instance.web.parse_value(value, { type:"float_time" });
+ },
+ //converts float value to hour
+ format_client:function(value){
+ return instance.web.format_value(value, { type:"float_time" });
+ },
generate_o2m_value: function() {
var self = this;
var ops = [];
diff --git a/addons/im/im.py b/addons/im/im.py
index 0de9ea8c79b..cee1705ec35 100644
--- a/addons/im/im.py
+++ b/addons/im/im.py
@@ -90,79 +90,6 @@ POLL_TIMER = 30
DISCONNECTION_TIMER = POLL_TIMER + 5
WATCHER_ERROR_DELAY = 10
-if openerp.evented:
- import gevent
- import gevent.event
-
- class ImWatcher(object):
- watchers = {}
-
- @staticmethod
- def get_watcher(db_name):
- if not ImWatcher.watchers.get(db_name):
- ImWatcher(db_name)
- return ImWatcher.watchers[db_name]
-
- def __init__(self, db_name):
- self.db_name = db_name
- ImWatcher.watchers[db_name] = self
- self.waiting = 0
- self.wait_id = 0
- self.users = {}
- self.users_watch = {}
- gevent.spawn(self.loop)
-
- def loop(self):
- _logger.info("Begin watching on channel im_channel for database " + self.db_name)
- stop = False
- while not stop:
- try:
- registry = openerp.modules.registry.RegistryManager.get(self.db_name)
- with registry.cursor() as cr:
- listen_channel(cr, "im_channel", self.handle_message, self.check_stop)
- stop = True
- except:
- # if something crash, we wait some time then try again
- _logger.exception("Exception during watcher activity")
- time.sleep(WATCHER_ERROR_DELAY)
- _logger.info("End watching on channel im_channel for database " + self.db_name)
- del ImWatcher.watchers[self.db_name]
-
- def handle_message(self, message):
- if message["type"] == "message":
- for waiter in self.users.get(message["receiver"], {}).values():
- waiter.set()
- else: #type status
- for waiter in self.users_watch.get(message["user"], {}).values():
- waiter.set()
-
- def check_stop(self):
- return self.waiting == 0
-
- def _get_wait_id(self):
- self.wait_id += 1
- return self.wait_id
-
- def stop(self, user_id, watch_users, timeout=None):
- wait_id = self._get_wait_id()
- event = gevent.event.Event()
- self.waiting += 1
- self.users.setdefault(user_id, {})[wait_id] = event
- for watch in watch_users:
- self.users_watch.setdefault(watch, {})[wait_id] = event
- try:
- event.wait(timeout)
- finally:
- for watch in watch_users:
- del self.users_watch[watch][wait_id]
- if len(self.users_watch[watch]) == 0:
- del self.users_watch[watch]
- del self.users[user_id][wait_id]
- if len(self.users[user_id]) == 0:
- del self.users[user_id]
- self.waiting -= 1
-
-
class LongPollingController(openerp.addons.web.http.Controller):
_cp_path = '/longpolling/im'
@@ -171,6 +98,7 @@ class LongPollingController(openerp.addons.web.http.Controller):
assert_uuid(uuid)
if not openerp.evented:
raise Exception("Not usable in a server not running gevent")
+ from openerp.addons.im.watcher import ImWatcher
if db is not None:
req.session._db = db
req.session._uid = uid
diff --git a/addons/im/security/ir.model.access.csv b/addons/im/security/ir.model.access.csv
index ed639353e21..db3fe77f690 100644
--- a/addons/im/security/ir.model.access.csv
+++ b/addons/im/security/ir.model.access.csv
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_im_message,im.message,model_im_message,base.group_user,1,0,1,0
-access_im_user,im.user,model_im_user,base.group_user,1,1,1,0 \ No newline at end of file
+access_im_user,im.user,model_im_user,,1,1,1,0 \ No newline at end of file
diff --git a/addons/im/static/src/audio/Ting.mp3 b/addons/im/static/src/audio/Ting.mp3
index 6fd090a89ce..ffbb77144b2 100644
--- a/addons/im/static/src/audio/Ting.mp3
+++ b/addons/im/static/src/audio/Ting.mp3
Binary files differ
diff --git a/addons/im/static/src/audio/Ting.ogg b/addons/im/static/src/audio/Ting.ogg
index 8d17ea85bd3..74ee13a4e5a 100644
--- a/addons/im/static/src/audio/Ting.ogg
+++ b/addons/im/static/src/audio/Ting.ogg
Binary files differ
diff --git a/addons/im/static/src/js/im.js b/addons/im/static/src/js/im.js
index b21a339cb84..a271c9eccf0 100644
--- a/addons/im/static/src/js/im.js
+++ b/addons/im/static/src/js/im.js
@@ -284,6 +284,10 @@ openerp.im = function(instance) {
return this.activated;
},
create_ting: function() {
+ if (typeof(Audio) === "undefined") {
+ this.ting = {play: function() {}};
+ return;
+ }
var kitten = jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined;
this.ting = new Audio(instance.webclient.session.origin + "/im/static/src/audio/" + (kitten ? "purr" : "Ting") +
(new Audio().canPlayType("audio/ogg; codecs=vorbis") ? ".ogg" : ".mp3"));
@@ -408,6 +412,9 @@ openerp.im = function(instance) {
return;
}
var mes = this.$("input").val();
+ if (! mes.trim()) {
+ return;
+ }
this.$("input").val("");
var send_it = _.bind(function() {
var model = new instance.web.Model("im.message");
diff --git a/addons/im/watcher.py b/addons/im/watcher.py
new file mode 100644
index 00000000000..b8cb74df5ba
--- /dev/null
+++ b/addons/im/watcher.py
@@ -0,0 +1,84 @@
+
+import openerp
+import openerp.tools.config
+import openerp.modules.registry
+from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
+import datetime
+from openerp.osv import osv, fields
+import time
+import logging
+import json
+import select
+import gevent
+import gevent.event
+from openerp.addons.im.im import *
+
+_logger = logging.getLogger(__name__)
+
+class ImWatcher(object):
+ watchers = {}
+
+ @staticmethod
+ def get_watcher(db_name):
+ if not ImWatcher.watchers.get(db_name):
+ ImWatcher(db_name)
+ return ImWatcher.watchers[db_name]
+
+ def __init__(self, db_name):
+ self.db_name = db_name
+ ImWatcher.watchers[db_name] = self
+ self.waiting = 0
+ self.wait_id = 0
+ self.users = {}
+ self.users_watch = {}
+ gevent.spawn(self.loop)
+
+ def loop(self):
+ _logger.info("Begin watching on channel im_channel for database " + self.db_name)
+ stop = False
+ while not stop:
+ try:
+ registry = openerp.modules.registry.RegistryManager.get(self.db_name)
+ with registry.cursor() as cr:
+ listen_channel(cr, "im_channel", self.handle_message, self.check_stop)
+ stop = True
+ except:
+ # if something crash, we wait some time then try again
+ _logger.exception("Exception during watcher activity")
+ time.sleep(WATCHER_ERROR_DELAY)
+ _logger.info("End watching on channel im_channel for database " + self.db_name)
+ del ImWatcher.watchers[self.db_name]
+
+ def handle_message(self, message):
+ if message["type"] == "message":
+ for waiter in self.users.get(message["receiver"], {}).values():
+ waiter.set()
+ else: #type status
+ for waiter in self.users_watch.get(message["user"], {}).values():
+ waiter.set()
+
+ def check_stop(self):
+ return self.waiting == 0
+
+ def _get_wait_id(self):
+ self.wait_id += 1
+ return self.wait_id
+
+ def stop(self, user_id, watch_users, timeout=None):
+ wait_id = self._get_wait_id()
+ event = gevent.event.Event()
+ self.waiting += 1
+ self.users.setdefault(user_id, {})[wait_id] = event
+ for watch in watch_users:
+ self.users_watch.setdefault(watch, {})[wait_id] = event
+ try:
+ event.wait(timeout)
+ finally:
+ for watch in watch_users:
+ del self.users_watch[watch][wait_id]
+ if len(self.users_watch[watch]) == 0:
+ del self.users_watch[watch]
+ del self.users[user_id][wait_id]
+ if len(self.users[user_id]) == 0:
+ del self.users[user_id]
+ self.waiting -= 1
diff --git a/addons/im_livechat/security/ir.model.access.csv b/addons/im_livechat/security/ir.model.access.csv
index 6e17c1a127f..0dcf0bdee6f 100644
--- a/addons/im_livechat/security/ir.model.access.csv
+++ b/addons/im_livechat/security/ir.model.access.csv
@@ -2,5 +2,7 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ls_chann1,im_livechat.channel,model_im_livechat_channel,,1,0,0,0
access_ls_chann2,im_livechat.channel,model_im_livechat_channel,group_im_livechat,1,1,1,0
access_ls_chann3,im_livechat.channel,model_im_livechat_channel,group_im_livechat_manager,1,1,1,1
+access_ls_message_portal,im_livechat.im.message.portal,im.model_im_message,portal.group_portal,0,0,0,0
+access_im_user_portal,im_livechat.im.user.portal,im.model_im_user,portal.group_portal,1,0,0,0
access_ls_message,im_livechat.im.message,im.model_im_message,portal.group_anonymous,0,0,0,0
access_im_user,im_livechat.im.user,im.model_im_user,portal.group_anonymous,1,0,0,0 \ No newline at end of file
diff --git a/addons/im_livechat/static/ext/static/audio/Ting.mp3 b/addons/im_livechat/static/ext/static/audio/Ting.mp3
index 6fd090a89ce..ffbb77144b2 100644
--- a/addons/im_livechat/static/ext/static/audio/Ting.mp3
+++ b/addons/im_livechat/static/ext/static/audio/Ting.mp3
Binary files differ
diff --git a/addons/im_livechat/static/ext/static/audio/Ting.ogg b/addons/im_livechat/static/ext/static/audio/Ting.ogg
index 8d17ea85bd3..74ee13a4e5a 100644
--- a/addons/im_livechat/static/ext/static/audio/Ting.ogg
+++ b/addons/im_livechat/static/ext/static/audio/Ting.ogg
Binary files differ
diff --git a/addons/im_livechat/static/ext/static/js/livesupport.js b/addons/im_livechat/static/ext/static/js/livesupport.js
index 0b9e52d2c07..c45e9588c83 100644
--- a/addons/im_livechat/static/ext/static/js/livesupport.js
+++ b/addons/im_livechat/static/ext/static/js/livesupport.js
@@ -268,6 +268,10 @@ define(["nova", "underscore", "oeclient", "require", "jquery",
return this.activated;
},
create_ting: function() {
+ if (typeof(Audio) === "undefined") {
+ this.ting = {play: function() {}};
+ return;
+ }
this.ting = new Audio(new Audio().canPlayType("audio/ogg; codecs=vorbis") ?
require.toUrl("../audio/Ting.ogg") :
require.toUrl("../audio/Ting.mp3")
@@ -395,6 +399,9 @@ define(["nova", "underscore", "oeclient", "require", "jquery",
return;
}
var mes = this.$("input").val();
+ if (! mes.trim()) {
+ return;
+ }
this.$("input").val("");
var send_it = _.bind(function() {
var model = connection.getModel("im.message");
diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
index b74cfa21b8a..0576e1d5f8f 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
@@ -84,7 +84,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
obj_company = obj_user.browse(cr, uid, uid, context=context).company_id
vat_no = obj_company.partner_id.vat
if not vat_no:
- raise osv.except_osv(_('insufficient data!'), _('No VAT number associated with your company.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No VAT number associated with your company.'))
vat_no = vat_no.replace(' ','').upper()
vat = vat_no[2:]
diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
index 29a1a1508a4..0ffa0c16a24 100644
--- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
@@ -60,12 +60,12 @@ class partner_vat(osv.osv_memory):
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
period_ids = obj_period.search(cr, uid, [('date_start' ,'>=', date_start), ('date_stop','<=',date_stop), ('company_id','=',company_id)])
if not period_ids:
- raise osv.except_osv(_('insufficient data!'), _('No data for the selected year.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No data for the selected year.'))
partners = []
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
if not partner_ids:
- raise osv.except_osv(_('Error'),_('No belgian contact with a VAT number in your database.'))
+ raise osv.except_osv(_('Error'),_('No belgium contact with a VAT number in your database.'))
cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount
FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover
FROM account_move_line l
@@ -90,7 +90,7 @@ class partner_vat(osv.osv_memory):
partners.append(id_client)
if not partners:
- raise osv.except_osv(_('insufficient data!'), _('No data found for the selected year.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No data found for the selected year.'))
context.update({'partner_ids': partners, 'year': data['year'], 'limit_amount': data['limit_amount']})
model_data_ids = obj_model_data.search(cr, uid, [('model','=','ir.ui.view'), ('name','=','view_vat_listing')])
resource_id = obj_model_data.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index 703ab9db59b..a572c3b83b4 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -108,7 +108,7 @@ class partner_vat_intra(osv.osv_memory):
# Get Company vat
company_vat = data_company.partner_id.vat
if not company_vat:
- raise osv.except_osv(_('insufficient data!'),_('No VAT number associated with your company.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with your company.'))
company_vat = company_vat.replace(' ','').upper()
issued_by = company_vat[:2]
@@ -120,7 +120,7 @@ class partner_vat_intra(osv.osv_memory):
p_id_list = obj_partner.search(cr, uid, [('vat','!=',False)], context=context)
if not p_id_list:
- raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number asociated with him.'))
+ raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number associated with him.'))
seq_declarantnum = obj_sequence.get(cr, uid, 'declarantnum')
dnum = company_vat[2:] + seq_declarantnum[-4:]
diff --git a/addons/l10n_ca/__openerp__.py b/addons/l10n_ca/__openerp__.py
index 05279b6ef8e..945327a06bc 100644
--- a/addons/l10n_ca/__openerp__.py
+++ b/addons/l10n_ca/__openerp__.py
@@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Canada - Accounting',
- 'version': '1.0',
+ 'version': '1.1',
'author': 'Savoir-faire Linux',
'website': 'http://www.savoirfairelinux.com',
'category': 'Localization/Account Charts',
@@ -49,7 +49,7 @@ Canadian accounting charts and localizations.
'account_chart_template_fr.xml',
'account_tax_fr.xml',
'fiscal_templates_fr.xml',
- 'l10n_ca_wizard.xml',
+ 'l10n_ca_wizard.xml'
],
'demo': [],
'installable': True,
diff --git a/addons/l10n_ca/account_tax_en.xml b/addons/l10n_ca/account_tax_en.xml
index 1ff884ac361..afe505f27f5 100644
--- a/addons/l10n_ca/account_tax_en.xml
+++ b/addons/l10n_ca/account_tax_en.xml
@@ -12,7 +12,6 @@
<field name="description">GSTPST_MB_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -39,7 +38,7 @@
<field name="name">PST for sales - 7%</field>
<field name="description">PST</field>
<field name="type_tax_use">sale</field>
- <field name="amount">0.700000</field>
+ <field name="amount">0.070000</field>
<field name="type">percent</field>
<field name="sequence">2</field>
<field name="account_collected_id" ref="chart2132_en"/>
@@ -106,7 +105,6 @@
<field name="description">GSTTVQ_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -152,7 +150,6 @@
<field name="description">GSTPST_SK_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -281,7 +278,6 @@
<field name="description">GSTPST_MB_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -308,7 +304,7 @@
<field name="name">PST for purchases - 7%</field>
<field name="description">PST</field>
<field name="type_tax_use">purchase</field>
- <field name="amount">0.700000</field>
+ <field name="amount">0.070000</field>
<field name="type">percent</field>
<field name="sequence">2</field>
<field name="account_collected_id" ref="chart1182_en"/>
@@ -375,7 +371,6 @@
<field name="description">GSTTVQ_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -421,7 +416,6 @@
<field name="description">GSTPST_SK_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
diff --git a/addons/l10n_ca/account_tax_fr.xml b/addons/l10n_ca/account_tax_fr.xml
index b344feeec83..c34f329be3a 100644
--- a/addons/l10n_ca/account_tax_fr.xml
+++ b/addons/l10n_ca/account_tax_fr.xml
@@ -12,7 +12,6 @@
<field name="description">TPSTVP_MB_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -39,7 +38,7 @@
<field name="name">TVP sur les ventes - 7%</field>
<field name="description">TVP</field>
<field name="type_tax_use">sale</field>
- <field name="amount">0.700000</field>
+ <field name="amount">0.070000</field>
<field name="type">percent</field>
<field name="sequence">2</field>
<field name="account_collected_id" ref="chart2132_fr"/>
@@ -106,7 +105,6 @@
<field name="description">TPSTVQ_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -152,7 +150,6 @@
<field name="description">TPSTVP_SK_SALE</field>
<field name="type_tax_use">sale</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -281,7 +278,6 @@
<field name="description">TPSTVP_MB_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -308,7 +304,7 @@
<field name="name">TVP sur les achats - 7%</field>
<field name="description">TVP</field>
<field name="type_tax_use">purchase</field>
- <field name="amount">0.700000</field>
+ <field name="amount">0.070000</field>
<field name="type">percent</field>
<field name="sequence">2</field>
<field name="account_collected_id" ref="chart1182_fr"/>
@@ -375,7 +371,6 @@
<field name="description">TPSTVQ_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
@@ -421,7 +416,6 @@
<field name="description">TPSTVP_SK_PURC</field>
<field name="type_tax_use">purchase</field>
<field name="amount">1</field>
- <field name="child_depend">1</field>
<field name="type">percent</field>
</record>
diff --git a/addons/l10n_ca/fiscal_templates_en.xml b/addons/l10n_ca/fiscal_templates_en.xml
index 68e881c3541..a3bab5b89dd 100644
--- a/addons/l10n_ca/fiscal_templates_en.xml
+++ b/addons/l10n_ca/fiscal_templates_en.xml
@@ -5,17 +5,17 @@
<!-- Fiscal Position Templates -->
<record id="fiscal_position_template_1_en" model="account.fiscal.position.template">
- <field name="name">Provincial Regime</field>
+ <field name="name">Provincial Regime (PROV)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
<record id="fiscal_position_template_21_en" model="account.fiscal.position.template">
- <field name="name">Harmonized Provinces Regime (12%)</field>
+ <field name="name">Harmonized Provinces Regime (12%) (BC)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
<record id="fiscal_position_template_22_en" model="account.fiscal.position.template">
- <field name="name">Harmonized Provinces Regime (13%)</field>
+ <field name="name">Harmonized Provinces Regime (13%) (ON, NB, NL)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
@@ -25,17 +25,17 @@
</record>
<record id="fiscal_position_template_24_en" model="account.fiscal.position.template">
- <field name="name">Harmonized Provinces Regime (15%)</field>
+ <field name="name">Harmonized Provinces Regime (15%) (NS)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
<record id="fiscal_position_template_3_en" model="account.fiscal.position.template">
- <field name="name">Non-Harmonized Provinces Regime</field>
+ <field name="name">Non-Harmonized Provinces Regime (AB, MB, SK, PE, NT, NU, YT)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
<record id="fiscal_position_template_4_en" model="account.fiscal.position.template">
- <field name="name">International Regime</field>
+ <field name="name">International Regime (INTL)</field>
<field name="chart_template_id" ref="ca_en_chart_template_en"/>
</record>
diff --git a/addons/l10n_ca/fiscal_templates_fr.xml b/addons/l10n_ca/fiscal_templates_fr.xml
index 3ba13d6642e..b01ab0985ea 100644
--- a/addons/l10n_ca/fiscal_templates_fr.xml
+++ b/addons/l10n_ca/fiscal_templates_fr.xml
@@ -5,7 +5,7 @@
<!-- Fiscal Position Templates -->
<record id="fiscal_position_template_1_fr" model="account.fiscal.position.template">
- <field name="name">Régime Provincial</field>
+ <field name="name">Régime Provincial (PROV)</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
@@ -30,12 +30,12 @@
</record>
<record id="fiscal_position_template_3_fr" model="account.fiscal.position.template">
- <field name="name">Régime Provinces Non-Harmonisées</field>
+ <field name="name">Régime Provinces Non-Harmonisées (AB, MB, SK, PE, NT, NU, YT)</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
<record id="fiscal_position_template_4_fr" model="account.fiscal.position.template">
- <field name="name">Régime International</field>
+ <field name="name">Régime International (INTL)</field>
<field name="chart_template_id" ref="ca_fr_chart_template_fr"/>
</record>
diff --git a/addons/l10n_cr/l10n_cr_base_data.xml b/addons/l10n_cr/l10n_cr_base_data.xml
index 2268ecb37ed..28674185a85 100644
--- a/addons/l10n_cr/l10n_cr_base_data.xml
+++ b/addons/l10n_cr/l10n_cr_base_data.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
@@ -8,38 +7,38 @@
-->
<record id="state_SJ" model="res.country.state">
<field name="code">SJ</field>
- <field name="name">San José</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="name">San Jos&#233;</field>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_A" model="res.country.state">
<field name="code">A</field>
<field name="name">Alajuela</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_H" model="res.country.state">
<field name="code">H</field>
<field name="name">Heredia</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_C" model="res.country.state">
<field name="code">C</field>
<field name="name">Cartago</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_P" model="res.country.state">
<field name="code">P</field>
<field name="name">Puntarenas</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_G" model="res.country.state">
<field name="code">G</field>
<field name="name">Guanacaste</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="country_id" ref="base.cr"/>
</record>
<record id="state_L" model="res.country.state">
<field name="code">L</field>
- <field name="name">Limón</field>
- <field model="res.country" name="country_id" ref="base.cr"/>
+ <field name="name">Lim&#243;n</field>
+ <field name="country_id" ref="base.cr"/>
</record>
<!--
Resource: res.partner.title
@@ -71,7 +70,7 @@
<field name="domain">contact</field>
</record>
<record id="res_partner_title_sal" model="res.partner.title">
- <field name="name">Sociedad Anónima Laboral</field>
+ <field name="name">Sociedad An&#243;nima Laboral</field>
<field name="shortcut">S.A.L.</field>
<field name="domain">partner</field>
</record>
@@ -136,4 +135,4 @@
<field name="domain">contact</field>
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
index 348bb71c95e..fc715ece5b8 100644
--- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
+++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
@@ -103,7 +103,7 @@ class payroll_advice(osv.osv):
slip_ids = payslip_pool.search(cr, uid, [('date_from', '<=', advice.date), ('date_to', '>=', advice.date), ('state', '=', 'done')], context=context)
for slip in payslip_pool.browse(cr, uid, slip_ids, context=context):
if not slip.employee_id.bank_account_id and not slip.employee_id.bank_account_id.acc_number:
- raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
+ raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
line_ids = payslip_line_pool.search(cr, uid, [ ('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context)
if line_ids:
line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0]
@@ -129,7 +129,7 @@ class payroll_advice(osv.osv):
seq_obj = self.pool.get('ir.sequence')
for advice in self.browse(cr, uid, ids, context=context):
if not advice.line_ids:
- raise osv.except_osv(_('Error !'), _('You can not confirm Payment advice without advice lines.'))
+ raise osv.except_osv(_('Error!'), _('You can not confirm Payment advice without advice lines.'))
advice_date = datetime.strptime(advice.date, DATETIME_FORMAT)
advice_year = advice_date.strftime('%m') + '-' + advice_date.strftime('%Y')
number = seq_obj.get(cr, uid, 'payment.advice')
@@ -183,7 +183,7 @@ class hr_payslip_run(osv.osv):
users = self.pool.get('res.users').browse(cr, uid, [uid], context=context)
for run in self.browse(cr, uid, ids, context=context):
if run.available_advice:
- raise osv.except_osv(_('Error !'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name))
+ raise osv.except_osv(_('Error!'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name))
advice_data = {
'batch_id': run.id,
'company_id': users[0].company_id.id,
@@ -201,7 +201,7 @@ class hr_payslip_run(osv.osv):
for slip in payslip_pool.browse(cr, uid, slip_ids, context=context):
if not slip.employee_id.bank_account_id or not slip.employee_id.bank_account_id.acc_number:
- raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
+ raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name))
line_ids = payslip_line_pool.search(cr, uid, [('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context)
if line_ids:
line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0]
diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py
index 00ba19e9c42..686fb5ff0d4 100644
--- a/addons/l10n_it/__openerp__.py
+++ b/addons/l10n_it/__openerp__.py
@@ -29,7 +29,7 @@
{
'name': 'Italy - Accounting',
- 'version': '0.1',
+ 'version': '0.2',
'depends': ['base_vat','account_chart','base_iban'],
'author': 'OpenERP Italian Community',
'description': """
diff --git a/addons/l10n_it/data/account.tax.code.template.csv b/addons/l10n_it/data/account.tax.code.template.csv
index d6d6667f43b..e5435945556 100644
--- a/addons/l10n_it/data/account.tax.code.template.csv
+++ b/addons/l10n_it/data/account.tax.code.template.csv
@@ -1,28 +1,37 @@
code,id,name,parent_id:id
,vat_code_chart_root,Tassazione,
IVC,template_ivacode_pagata,IVA a credito,vat_code_chart_root
-IVC0,template_ivacode_pagata_0,Esente IVA (credito),template_ivacode_pagata
+IVCN,template_ivacode_pagata_ind,IVA a credito indetraibile,vat_code_chart_root
+IVC0,template_ivacode_pagata_0,Fuori Campo IVA (credito),template_ivacode_pagata
IVCI,template_impcode_pagata,IVA a credito (imponibile),vat_code_chart_root
-IVC0I,template_impcode_pagata_0,Esente IVA a credito (imponibile),template_impcode_pagata
+IVC0I,template_impcode_pagata_0,Fuori Campo IVA (credito) (imponibile),template_impcode_pagata
+IVCart15,template_ivacode_pagata_art15,Escluso Art.15 (credito),template_ivacode_pagata
+IVCart15I,template_impcode_pagata_art15,Escluso Art.15. (credito) (imponibile),template_impcode_pagata
IVC10,template_ivacode_pagata_10,IVA a credito 10%,template_ivacode_pagata
IVC10I,template_impcode_pagata_10,IVA a credito 10% (imponibile),template_impcode_pagata
-IVC10ind,template_ivacode_pagata_10ind,IVA a credito 10% indetraibile,template_ivacode_pagata
+IVC10ind,template_ivacode_pagata_10ind,IVA a credito 10% indetraibile,template_ivacode_pagata_ind
IVC10Iind,template_impcode_pagata_10ind,IVA a credito 10% indetraibile (imponibile),template_impcode_pagata
-IVC20ind,template_ivacode_pagata_20ind,IVA a credito 20% indetraibile,template_ivacode_pagata
+IVC20ind,template_ivacode_pagata_20ind,IVA a credito 20% indetraibile,template_ivacode_pagata_ind
IVC20Iind,template_impcode_pagata_20ind,IVA a credito 20% indetraibile (imponibile),template_impcode_pagata
-IVC4ind,template_ivacode_pagata_4ind,IVA a credito 4% indetraibile,template_ivacode_pagata
+IVC4ind,template_ivacode_pagata_4ind,IVA a credito 4% indetraibile,template_ivacode_pagata_ind
IVC4Iind,template_impcode_pagata_4ind,IVA a credito 4% indetraibile (imponibile),template_impcode_pagata
IVC20det10,template_ivacode_pagata_20det10,IVA a credito 20% detraibile 10%,template_ivacode_pagata
+IVC20Ndet10,template_ivacode_pagata_20det10ind,IVA a credito 20% detraibile 10% (indetraibile),template_ivacode_pagata_ind
IVC20Idet10,template_impcode_pagata_20det10,IVA a credito 20% detraibile 10% (imponibile),template_impcode_pagata
IVC20det15,template_ivacode_pagata_20det15,IVA a credito 20% detraibile 15%,template_ivacode_pagata
+IVC20Ndet15,template_ivacode_pagata_20det15ind,IVA a credito 20% detraibile 15% (indetraibile),template_ivacode_pagata_ind
IVC20Idet15,template_impcode_pagata_20det15,IVA a credito 20% detraibile 15% (imponibile),template_impcode_pagata
IVC20det40,template_ivacode_pagata_20det40,IVA a credito 20% detraibile 40%,template_ivacode_pagata
+IVC20Ndet40,template_ivacode_pagata_20det40ind,IVA a credito 20% detraibile 40% (indetraibile),template_ivacode_pagata_ind
IVC20Idet40,template_impcode_pagata_20det40,IVA a credito 20% detraibile 40% (imponibile),template_impcode_pagata
IVC20det50,template_ivacode_pagata_20det50,IVA a credito 20% detraibile 50%,template_ivacode_pagata
+IVC20Ndet50,template_ivacode_pagata_20det50ind,IVA a credito 20% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC20Idet50,template_impcode_pagata_20det50,IVA a credito 20% detraibile 50% (imponibile),template_impcode_pagata
IVC10det50,template_ivacode_pagata_10det50,IVA a credito 10% detraibile 50%,template_ivacode_pagata
+IVC10Ndet50,template_ivacode_pagata_10det50ind,IVA a credito 10% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC10Idet50,template_impcode_pagata_10det50,IVA a credito 10% detraibile 50% (imponibile),template_impcode_pagata
IVC4det50,template_ivacode_pagata_4det50,IVA a credito 4% detraibile 50%,template_ivacode_pagata
+IVC4Ndet50,template_ivacode_pagata_4det50ind,IVA a credito 4% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC4Idet50,template_impcode_pagata_4det50,IVA a credito 4% detraibile 50% (imponibile),template_impcode_pagata
IVC20,template_ivacode_pagata_20,IVA a credito 20%,template_ivacode_pagata
IVC20I,template_impcode_pagata_20,IVA a credito 20% (imponibile),template_impcode_pagata
@@ -35,9 +44,11 @@ IVC12I,template_impcode_pagata_12,IVA a credito 12% (imponibile),template_impco
IVC2,template_ivacode_pagata_2,IVA a credito 2%,template_ivacode_pagata
IVC2I,template_impcode_pagata_2,IVA a credito 2% (imponibile),template_impcode_pagata
IVD,template_ivacode_riscossa,IVA a debito,vat_code_chart_root
-IVD0,template_ivacode_riscossa_0,Esente IVA (debito),template_ivacode_riscossa
+IVD0,template_ivacode_riscossa_0,Fuori Campo IVA (debito),template_ivacode_riscossa
IVDI,template_impcode_riscossa,IVA a debito (imponibile),vat_code_chart_root
-IVD0I,template_impcode_riscossa_0,Esente IVA a debito (imponibile),template_impcode_riscossa
+IVD0I,template_impcode_riscossa_0,Fuori Campo IVA (debito) (imponibile),template_impcode_riscossa
+IVDart15,template_ivacode_riscossa_art15,Escluso Art.15 (debito),template_ivacode_riscossa
+IVDart15I,template_impcode_riscossa_art15,Escluso Art.15 (debito) (imponibile),template_impcode_riscossa
IVD10,template_ivacode_riscossa_10,IVA a debito 10%,template_ivacode_riscossa
IVD10I,template_impcode_riscossa_10,IVA a debito 10% (imponibile),template_impcode_riscossa
IVD20,template_ivacode_riscossa_20,IVA a debito 20%,template_ivacode_riscossa
@@ -50,13 +61,17 @@ IVD12,template_ivacode_riscossa_12,IVA a debito 12%,template_ivacode_riscossa
IVD12I,template_impcode_riscossa_12,IVA a debito 12% (imponibile),template_impcode_riscossa
IVD2,template_ivacode_riscossa_2,IVA a debito 2%,template_ivacode_riscossa
IVD2I,template_impcode_riscossa_2,IVA a debito 2% (imponibile),template_impcode_riscossa
-IVC21ind,template_ivacode_pagata_21ind,IVA a credito 21% indetraibile,template_ivacode_pagata
+IVC21ind,template_ivacode_pagata_21ind,IVA a credito 21% indetraibile,template_ivacode_pagata_ind
IVC21Iind,template_impcode_pagata_21ind,IVA a credito 21% indetraibile (imponibile),template_impcode_pagata
IVC21det10,template_ivacode_pagata_21det10,IVA a credito 21% detraibile 10%,template_ivacode_pagata
+IVC21Ndet10,template_ivacode_pagata_21det10ind,IVA a credito 21% detraibile 10% (indetraibile),template_ivacode_pagata_ind
IVC21Idet10,template_impcode_pagata_21det10,IVA a credito 21% detraibile 10% (imponibile),template_impcode_pagata
IVC21det15,template_ivacode_pagata_21det15,IVA a credito 21% detraibile 15%,template_ivacode_pagata
+IVC21Ndet15,template_ivacode_pagata_21det15ind,IVA a credito 21% detraibile 15% (indetraibile),template_ivacode_pagata_ind
IVC21Idet15,template_impcode_pagata_21det15,IVA a credito 21% detraibile 15% (imponibile),template_impcode_pagata
IVC21det40,template_ivacode_pagata_21det40,IVA a credito 21% detraibile 40%,template_ivacode_pagata
+IVC21Ndet40,template_ivacode_pagata_21det40ind,IVA a credito 21% detraibile 40% (indetraibile),template_ivacode_pagata_ind
IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (imponibile),template_impcode_pagata
IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata
+IVC21Ndet50,template_ivacode_pagata_21det50ind,IVA a credito 21% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata
diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv
index e003afd1a23..5654b32e5e9 100644
--- a/addons/l10n_it/data/account.tax.template.csv
+++ b/addons/l10n_it/data/account.tax.template.csv
@@ -1,71 +1,66 @@
id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depend,type,account_collected_id:id,account_paid_id:id,type_tax_use,base_code_id:id,tax_code_id:id,ref_base_code_id:id,ref_tax_code_id:id,ref_base_sign,ref_tax_sign,price_include,base_sign,tax_sign
-21a,21a,l10n_it_chart_template_generic,Iva al 21% (debito),,0.21,,False,percent,2601,2601,sale,template_impcode_riscossa_21,template_ivacode_riscossa_21,template_impcode_riscossa_21,template_ivacode_riscossa_21,-1,-1,False,,
-21b,21b,l10n_it_chart_template_generic,Iva al 21% (credito),,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,,,False,-1,-1
-20a,20a,l10n_it_chart_template_generic,Iva al 20% (debito),,0.2,,False,percent,2601,2601,sale,template_impcode_riscossa_20,template_ivacode_riscossa_20,template_impcode_riscossa_20,template_ivacode_riscossa_20,-1,-1,False,,
-20b,20b,l10n_it_chart_template_generic,Iva al 20% (credito),,0.2,,False,percent,1601,1601,purchase,template_impcode_pagata_20,template_ivacode_pagata_20,template_impcode_pagata_20,template_ivacode_pagata_20,,,False,-1,-1
-10a,10a,l10n_it_chart_template_generic,Iva al 10% (debito),,0.1,,False,percent,2601,2601,sale,template_impcode_riscossa_10,template_ivacode_riscossa_10,template_impcode_riscossa_10,template_ivacode_riscossa_10,-1,-1,False,,
-10b,10b,l10n_it_chart_template_generic,Iva al 10% (credito),,0.1,,False,percent,1601,1601,purchase,template_impcode_pagata_10,template_ivacode_pagata_10,template_impcode_pagata_10,template_ivacode_pagata_10,,,False,-1,-1
-10AO,10AO,l10n_it_chart_template_generic,Iva al 10% indetraibile,,0.1,,True,percent,,,purchase,template_impcode_pagata_10ind,,template_impcode_pagata_10ind,,,,False,-1,-1
-10AOa,10AOa,l10n_it_chart_template_generic,Iva al 10% indetraibile (D),2,0,10AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_10ind,,template_ivacode_pagata_10ind,,,False,,
-10AOb,10AOb,l10n_it_chart_template_generic,Iva al 10% indetraibile (I),1,1,10AO,False,percent,,,purchase,,,,,,,False,,
-12a,12a,l10n_it_chart_template_generic,Iva 12% (debito),,0.12,,False,percent,2601,2601,sale,template_impcode_riscossa_12,template_ivacode_riscossa_12,template_impcode_riscossa_12,template_ivacode_riscossa_12,-1,-1,False,,
-12b,12b,l10n_it_chart_template_generic,Iva 12% (credito),,0.12,,False,percent,1601,1601,purchase,template_impcode_pagata_12,template_ivacode_pagata_12,template_impcode_pagata_12,template_ivacode_pagata_12,,,False,-1,-1
-2010,2010,l10n_it_chart_template_generic,Iva al 20% detraibile 10%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det10,,template_impcode_pagata_20det10,,,,False,-1,-1
-2010a,2010a,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (D),2,0,2010,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det10,,template_ivacode_pagata_20det10,,,False,,
-2010b,2010b,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (I),1,0.9,2010,False,percent,,,purchase,,,,,,,False,,
-2015,2015,l10n_it_chart_template_generic,Iva al 20% detraibile 15%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det15,,template_impcode_pagata_20det15,,,,False,-1,-1
-2015a,2015a,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (D),2,0,2015,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det15,,template_ivacode_pagata_20det15,,,False,,
-2015b,2015b,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (I),1,0.85,2015,False,percent,,,purchase,,,,,,,False,,
-2040,2040,l10n_it_chart_template_generic,Iva al 20% detraibile 40%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det40,,template_impcode_pagata_20det40,,,,False,-1,-1
-2040a,2040a,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (D),2,0,2040,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det40,,template_ivacode_pagata_20det40,,,False,,
-2040b,2040b,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (I),1,0.6,2040,False,percent,,,purchase,,,,,,,False,,
-20AO,20AO,l10n_it_chart_template_generic,Iva al 20% indetraibile,,0.2,,True,percent,,,purchase,template_impcode_pagata_20ind,,template_impcode_pagata_20ind,,,,False,-1,-1
-20AOa,20AOa,l10n_it_chart_template_generic,Iva al 20% indetraibile (D),2,0,20AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,,,False,,
-20AOb,20AOb,l10n_it_chart_template_generic,Iva al 20% indetraibile (I),1,1,20AO,False,percent,,,purchase,,,,,,,False,,
-20I5,20I5,l10n_it_chart_template_generic,IVA al 20% detraibile al 50%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det50,,template_impcode_pagata_20det50,,,,False,-1,-1
-20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),1,0.5,20I5,False,percent,,,purchase,,,,,,,False,,
-20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),2,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,,,False,,
-22a,22a,l10n_it_chart_template_generic,Iva 2% (debito),,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,,
-22b,22b,l10n_it_chart_template_generic,Iva 2% (credito),,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,,,False,-1,-1
-4a,4a,l10n_it_chart_template_generic,Iva 4% (debito),,0.04,,False,percent,2601,2601,sale,template_impcode_riscossa_4,template_ivacode_riscossa_4,template_impcode_riscossa_4,template_ivacode_riscossa_4,-1,-1,False,,
-4b,4b,l10n_it_chart_template_generic,Iva 4% (credito),,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,,,False,-1,-1
-4AO,4AO,l10n_it_chart_template_generic,Iva al 4% indetraibile,,0.04,,True,percent,,,purchase,template_impcode_pagata_4ind,,template_impcode_pagata_4ind,,,,False,-1,-1
-4AOa,4AOa,l10n_it_chart_template_generic,Iva al 4% indetraibile (D),2,0,4AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,,,False,,
-4AOb,4AOb,l10n_it_chart_template_generic,Iva al 4% indetraibile (I),1,1,4AO,False,percent,,,purchase,,,,,,,False,,
-10I5,10I5,l10n_it_chart_template_generic,IVA al 10% detraibile al 50%,,0.1,,True,percent,,,purchase,template_impcode_pagata_10det50,,template_impcode_pagata_10det50,,,,False,-1,-1
-10I5a,10I5a,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (D),2,0,10I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_10det50,,template_ivacode_pagata_10det50,,,False,,
-10I5b,10I5b,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (I),1,0.5,10I5,False,percent,,,purchase,,,,,,,False,,
-4I5,4I5,l10n_it_chart_template_generic,IVA al 4% detraibile al 50%,,0.04,,True,percent,,,purchase,template_impcode_pagata_4det50,,template_impcode_pagata_4det50,,,,False,-1,-1
-4I5a,4I5a,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (D),2,0,4I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_4det50,,template_ivacode_pagata_4det50,,,False,,
-4I5b,4I5b,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (I),1,0.5,4I5,False,percent,,,purchase,,,,,,,False,,
-00a,00a,l10n_it_chart_template_generic,Esente IVA (debito),,0,,False,percent,2601,2601,sale,template_impcode_riscossa_0,template_ivacode_riscossa_0,template_impcode_riscossa_0,template_ivacode_riscossa_0,-1,-1,False,,
-00b,00b,l10n_it_chart_template_generic,Esente IVA (credito),,0,,False,percent,1601,1601,purchase,template_impcode_pagata_0,template_ivacode_pagata_0,template_impcode_pagata_0,template_ivacode_pagata_0,,,False,-1,-1
-21a INC,21a INC,l10n_it_chart_template_generic,Iva al 21% (debito) INC,,0.21,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,-1,-1,True,,
-21b INC,21b INC,l10n_it_chart_template_generic,Iva al 21% (credito) INC,,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,,,True,-1,-1
-20a INC,20a INC,l10n_it_chart_template_generic,Iva al 20% (debito) INC,,0.2,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,-1,-1,True,,
-20b INC,20b INC,l10n_it_chart_template_generic,Iva al 20% (credito) INC,,0.2,,False,percent,1601,1601,purchase,template_impcode_pagata_20,template_ivacode_pagata_20,template_impcode_pagata_20,template_ivacode_pagata_20,,,True,-1,-1
-10a INC,10a INC,l10n_it_chart_template_generic,Iva al 10% (debito) INC,,0.1,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,-1,-1,True,,
-10b INC,10b INC,l10n_it_chart_template_generic,Iva al 10% (credito) INC,,0.1,,False,percent,1601,1601,purchase,template_impcode_pagata_10,template_ivacode_pagata_10,template_impcode_pagata_10,template_ivacode_pagata_10,,,True,-1,-1
-12a INC,12a INC,l10n_it_chart_template_generic,Iva 12% (debito) INC,,0.12,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,-1,-1,True,,
-12b INC,12b INC,l10n_it_chart_template_generic,Iva 12% (credito) INC,,0.12,,False,percent,1601,1601,purchase,template_impcode_pagata_12,template_ivacode_pagata_12,template_impcode_pagata_12,template_ivacode_pagata_12,,,True,-1,-1
-22a INC,22a INC,l10n_it_chart_template_generic,Iva 2% (debito) INC,,0.02,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,-1,-1,True,,
-22b INC,22b INC,l10n_it_chart_template_generic,Iva 2% (credito) INC,,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,,,True,-1,-1
-4a INC,4a INC,l10n_it_chart_template_generic,Iva 4% (debito) INC,,0.04,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,-1,-1,True,,
-4b INC,4b INC,l10n_it_chart_template_generic,Iva 4% (credito) INC,,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,,,True,-1,-1
-00a INC,00a INC,l10n_it_chart_template_generic,Esente IVA (debito) INC,,0,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,-1,-1,True,,
-2110,2110,l10n_it_chart_template_generic,Iva al 21% detraibile 10%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det10,,template_impcode_pagata_21det10,,,,False,-1,-1
-2110a,2110a,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (D),2,0,2110,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det10,,template_ivacode_pagata_21det10,,,False,,
-2110b,2110b,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (I),1,0.9,2110,False,percent,,,purchase,,,,,,,False,,
-2115,2115,l10n_it_chart_template_generic,Iva al 21% detraibile 15%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det15,,template_impcode_pagata_21det15,,,,False,-1,-1
-2115a,2115a,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (D),2,0,2115,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det15,,template_ivacode_pagata_21det15,,,False,,
-2115b,2115b,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (I),1,0.85,2115,False,percent,,,purchase,,,,,,,False,,
-2140,2140,l10n_it_chart_template_generic,Iva al 21% detraibile 40%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det40,,template_impcode_pagata_21det40,,,,False,-1,-1
-2140a,2140a,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (D),2,0,2140,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det40,,template_ivacode_pagata_21det40,,,False,,
-2140b,2140b,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (I),1,0.6,2140,False,percent,,,purchase,,,,,,,False,,
-21AO,21AO,l10n_it_chart_template_generic,Iva al 21% indetraibile,,0.21,,True,percent,,,purchase,template_impcode_pagata_21ind,,template_impcode_pagata_21ind,,,,False,-1,-1
-21AOa,21AOa,l10n_it_chart_template_generic,Iva al 21% indetraibile (D),2,0,21AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,,,False,,
-21AOb,21AOb,l10n_it_chart_template_generic,Iva al 21% indetraibile (I),1,1,21AO,False,percent,,,purchase,,,,,,,False,,
-21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,,,False,-1,-1
-21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),1,0.5,21I5,False,percent,,,purchase,,,,,,,False,,
-21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),2,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,,,False,,
-
+21v,21v,l10n_it_chart_template_generic,Iva al 21% (debito),1,0.21,,False,percent,2601,2601,sale,template_impcode_riscossa_21,template_ivacode_riscossa_21,template_impcode_riscossa_21,template_ivacode_riscossa_21,-1,-1,False,1,1
+21a,21a,l10n_it_chart_template_generic,Iva al 21% (credito),2,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,1,1,False,-1,-1
+20v,20v,l10n_it_chart_template_generic,Iva al 20% (debito),3,0.2,,False,percent,2601,2601,sale,template_impcode_riscossa_20,template_ivacode_riscossa_20,template_impcode_riscossa_20,template_ivacode_riscossa_20,-1,-1,False,1,1
+20a,20a,l10n_it_chart_template_generic,Iva al 20% (credito),4,0.2,,False,percent,1601,1601,purchase,template_impcode_pagata_20,template_ivacode_pagata_20,template_impcode_pagata_20,template_ivacode_pagata_20,1,1,False,-1,-1
+10v,10v,l10n_it_chart_template_generic,Iva al 10% (debito),5,0.1,,False,percent,2601,2601,sale,template_impcode_riscossa_10,template_ivacode_riscossa_10,template_impcode_riscossa_10,template_ivacode_riscossa_10,-1,-1,False,1,1
+10a,10a,l10n_it_chart_template_generic,Iva al 10% (credito),6,0.1,,False,percent,1601,1601,purchase,template_impcode_pagata_10,template_ivacode_pagata_10,template_impcode_pagata_10,template_ivacode_pagata_10,1,1,False,-1,-1
+10AO,10AO,l10n_it_chart_template_generic,Iva al 10% indetraibile,7,0.1,,True,percent,,,purchase,template_impcode_pagata_10ind,,template_impcode_pagata_10ind,,1,1,False,-1,-1
+10AOb,10AOb,l10n_it_chart_template_generic,Iva al 10% indetraibile (D),200,0,10AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_10,,template_ivacode_pagata_10,1,1,False,-1,-1
+10AOa,10AOa,l10n_it_chart_template_generic,Iva al 10% indetraibile (I),100,1,10AO,False,percent,,,purchase,,template_ivacode_pagata_10ind,,template_ivacode_pagata_10ind,1,1,False,-1,-1
+12v,12v,l10n_it_chart_template_generic,Iva 12% (debito),8,0.12,,False,percent,2601,2601,sale,template_impcode_riscossa_12,template_ivacode_riscossa_12,template_impcode_riscossa_12,template_ivacode_riscossa_12,-1,-1,False,1,1
+12a,12a,l10n_it_chart_template_generic,Iva 12% (credito),9,0.12,,False,percent,1601,1601,purchase,template_impcode_pagata_12,template_ivacode_pagata_12,template_impcode_pagata_12,template_ivacode_pagata_12,1,1,False,-1,-1
+2010,2010,l10n_it_chart_template_generic,Iva al 20% detraibile 10%,10,0.2,,True,percent,,,purchase,template_impcode_pagata_20det10,,template_impcode_pagata_20det10,,1,1,False,-1,-1
+2010b,2010b,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (D),200,0,2010,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det10,,template_ivacode_pagata_20det10,1,1,False,-1,-1
+2010a,2010a,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (I),100,0.9,2010,False,percent,,,purchase,,template_ivacode_pagata_20det10ind,,template_ivacode_pagata_20det10ind,1,1,False,-1,-1
+2015,2015,l10n_it_chart_template_generic,Iva al 20% detraibile 15%,11,0.2,,True,percent,,,purchase,template_impcode_pagata_20det15,,template_impcode_pagata_20det15,,1,1,False,-1,-1
+2015b,2015b,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (D),200,0,2015,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det15,,template_ivacode_pagata_20det15,1,1,False,-1,-1
+2015a,2015a,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (I),100,0.85,2015,False,percent,,,purchase,,template_ivacode_pagata_20det15ind,,template_ivacode_pagata_20det15ind,1,1,False,-1,-1
+2040,2040,l10n_it_chart_template_generic,Iva al 20% detraibile 40%,12,0.2,,True,percent,,,purchase,template_impcode_pagata_20det40,,template_impcode_pagata_20det40,,1,1,False,-1,-1
+2040b,2040b,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (D),200,0,2040,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det40,,template_ivacode_pagata_20det40,1,1,False,-1,-1
+2040a,2040a,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (I),100,0.6,2040,False,percent,,,purchase,,template_ivacode_pagata_20det40ind,,template_ivacode_pagata_20det40ind,1,1,False,-1,-1
+20AO,20AO,l10n_it_chart_template_generic,Iva al 20% indetraibile,13,0.2,,True,percent,,,purchase,template_impcode_pagata_20ind,,template_impcode_pagata_20ind,,1,1,False,-1,-1
+20AOb,20AOb,l10n_it_chart_template_generic,Iva al 20% indetraibile (D),200,0,20AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,1,1,False,-1,-1
+20AOa,20AOa,l10n_it_chart_template_generic,Iva al 20% indetraibile (I),100,1,20AO,False,percent,,,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,1,1,False,-1,-1
+20I5,20I5,l10n_it_chart_template_generic,IVA al 20% detraibile al 50%,14,0.2,,True,percent,,,purchase,template_impcode_pagata_20det50,,template_impcode_pagata_20det50,,1,1,False,-1,-1
+20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),200,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,1,1,False,-1,-1
+20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),100,0.5,20I5,False,percent,,,purchase,,template_ivacode_pagata_20det50ind,,template_ivacode_pagata_20det50ind,1,1,False,-1,-1
+22v,22v,l10n_it_chart_template_generic,Iva 2% (debito),15,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,1,1
+22a,22a,l10n_it_chart_template_generic,Iva 2% (credito),16,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,1,1,False,-1,-1
+4v,4v,l10n_it_chart_template_generic,Iva 4% (debito),17,0.04,,False,percent,2601,2601,sale,template_impcode_riscossa_4,template_ivacode_riscossa_4,template_impcode_riscossa_4,template_ivacode_riscossa_4,-1,-1,False,1,1
+4a,4a,l10n_it_chart_template_generic,Iva 4% (credito),18,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,1,1,False,-1,-1
+4AO,4AO,l10n_it_chart_template_generic,Iva al 4% indetraibile,19,0.04,,True,percent,,,purchase,template_impcode_pagata_4ind,,template_impcode_pagata_4ind,,1,1,False,-1,-1
+4AOb,4AOb,l10n_it_chart_template_generic,Iva al 4% indetraibile (D),200,0,4AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,1,1,False,-1,-1
+4AOa,4AOa,l10n_it_chart_template_generic,Iva al 4% indetraibile (I),100,1,4AO,False,percent,,,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,1,1,False,-1,-1
+10I5,10I5,l10n_it_chart_template_generic,IVA al 10% detraibile al 50%,20,0.1,,True,percent,,,purchase,template_impcode_pagata_10det50,,template_impcode_pagata_10det50,,1,1,False,-1,-1
+10I5b,10I5b,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (D),200,0,10I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_10det50,,template_ivacode_pagata_10det50,1,1,False,-1,-1
+10I5a,10I5a,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (I),100,0.5,10I5,False,percent,,,purchase,,template_ivacode_pagata_10det50ind,,template_ivacode_pagata_10det50ind,1,1,False,-1,-1
+4I5,4I5,l10n_it_chart_template_generic,IVA al 4% detraibile al 50%,21,0.04,,True,percent,,,purchase,template_impcode_pagata_4det50,,template_impcode_pagata_4det50,,1,1,False,-1,-1
+4I5b,4I5b,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (D),200,0,4I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_4det50,,template_ivacode_pagata_4det50,1,1,False,-1,-1
+4I5a,4I5a,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (I),100,0.5,4I5,False,percent,,,purchase,,template_ivacode_pagata_4det50ind,,template_ivacode_pagata_4det50ind,1,1,False,-1,-1
+00v,00v,l10n_it_chart_template_generic,Fuori Campo IVA (debito),22,0,,False,percent,2601,2601,sale,template_impcode_riscossa_0,template_ivacode_riscossa_0,template_impcode_riscossa_0,template_ivacode_riscossa_0,-1,-1,False,1,1
+00a,00a,l10n_it_chart_template_generic,Fuori Campo IVA (credito),23,0,,False,percent,1601,1601,purchase,template_impcode_pagata_0,template_ivacode_pagata_0,template_impcode_pagata_0,template_ivacode_pagata_0,1,1,False,-1,-1
+00art15v,00art15v,l10n_it_chart_template_generic,Imponibile Escluso Art.15 (debito),22,0,,False,percent,2601,2601,sale,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,-1,-1,False,1,1
+00art15a,00art15a,l10n_it_chart_template_generic,Imponibile Escluso Art.15 (credito),23,0,,False,percent,1601,1601,purchase,template_impcode_pagata_art15,template_ivacode_pagata_art15,template_impcode_pagata_art15,template_ivacode_pagata_art15,1,1,False,-1,-1
+21v INC,21v INC,l10n_it_chart_template_generic,Iva al 21% (debito) INC,24,0.21,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,-1,-1,True,1,1
+20v INC,20v INC,l10n_it_chart_template_generic,Iva al 20% (debito) INC,25,0.2,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,-1,-1,True,1,1
+10v INC,10v INC,l10n_it_chart_template_generic,Iva al 10% (debito) INC,26,0.1,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,-1,-1,True,1,1
+12v INC,12v INC,l10n_it_chart_template_generic,Iva 12% (debito) INC,27,0.12,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,-1,-1,True,1,1
+22v INC,22v INC,l10n_it_chart_template_generic,Iva 2% (debito) INC,28,0.02,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,-1,-1,True,1,1
+4v INC,4v INC,l10n_it_chart_template_generic,Iva 4% (debito) INC,29,0.04,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,-1,-1,True,1,1
+00v INC,00v INC,l10n_it_chart_template_generic,Fuori Campo IVA (debito) INC,30,0,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,-1,-1,True,1,1
+2110,2110,l10n_it_chart_template_generic,Iva al 21% detraibile 10%,31,0.21,,True,percent,,,purchase,template_impcode_pagata_21det10,,template_impcode_pagata_21det10,,1,1,False,-1,-1
+2110b,2110b,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (D),200,0,2110,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det10,,template_ivacode_pagata_21det10,1,1,False,-1,-1
+2110a,2110a,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (I),100,0.9,2110,False,percent,,,purchase,,template_ivacode_pagata_21det10ind,,template_ivacode_pagata_21det10ind,1,1,False,-1,-1
+2115,2115,l10n_it_chart_template_generic,Iva al 21% detraibile 15%,32,0.21,,True,percent,,,purchase,template_impcode_pagata_21det15,,template_impcode_pagata_21det15,,1,1,False,-1,-1
+2115b,2115b,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (D),200,0,2115,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det15,,template_ivacode_pagata_21det15,1,1,False,-1,-1
+2115a,2115a,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (I),100,0.85,2115,False,percent,,,purchase,,template_ivacode_pagata_21det15ind,,template_ivacode_pagata_21det15ind,1,1,False,-1,-1
+2140,2140,l10n_it_chart_template_generic,Iva al 21% detraibile 40%,33,0.21,,True,percent,,,purchase,template_impcode_pagata_21det40,,template_impcode_pagata_21det40,,1,1,False,-1,-1
+2140b,2140b,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (D),200,0,2140,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det40,,template_ivacode_pagata_21det40,1,1,False,-1,-1
+2140a,2140a,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (I),100,0.6,2140,False,percent,,,purchase,,template_ivacode_pagata_21det40ind,,template_ivacode_pagata_21det40ind,1,1,False,-1,-1
+21AO,21AO,l10n_it_chart_template_generic,Iva al 21% indetraibile,34,0.21,,True,percent,,,purchase,template_impcode_pagata_21ind,,template_impcode_pagata_21ind,,1,1,False,-1,-1
+21AOb,21AOb,l10n_it_chart_template_generic,Iva al 21% indetraibile (D),200,0,21AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,1,1,False,-1,-1
+21AOa,21AOa,l10n_it_chart_template_generic,Iva al 21% indetraibile (I),100,1,21AO,False,percent,,,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,1,1,False,-1,-1
+21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,35,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,1,1,False,-1,-1
+21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),200,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,1,1,False,-1,-1
+21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),100,0.5,21I5,False,percent,,,purchase,,template_ivacode_pagata_21det50ind,,template_ivacode_pagata_21det50ind,1,1,False,-1,-1
diff --git a/addons/l10n_lu/account_financial_report.xml b/addons/l10n_lu/account_financial_report.xml
index b39b0ceb15f..62a7a8c8d7e 100644
--- a/addons/l10n_lu/account_financial_report.xml
+++ b/addons/l10n_lu/account_financial_report.xml
@@ -84,7 +84,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_23">
- <field name="name">2. Concessions, brevets, licences, marques, ainsi que droits et valeurs similaires s&#8217;ils ont &#233;t&#233;</field>
+ <field name="name">2. Concessions, brevets, licences, marques, ainsi que droits et valeurs similaires s&#8217;ils ont &#233;t&#233;</field>
<field name="sequence">115</field>
<field name="sign" eval="1"/>
<field name="display_detail">detail_flat</field>
@@ -256,7 +256,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_42">
- <field name="name">I. Stocks </field>
+ <field name="name">I. Stocks</field>
<field name="sequence">153</field>
<field name="sign" eval="1"/>
<field name="display_detail">detail_flat</field>
@@ -292,7 +292,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_46">
- <field name="name">4. Acomptes vers&#233;s </field>
+ <field name="name">4. Acomptes vers&#233;s</field>
<field name="sequence">161</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -301,7 +301,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_47">
- <field name="name">II. Cr&#233;ances </field>
+ <field name="name">II. Cr&#233;ances</field>
<field name="sequence">163</field>
<field name="sign" eval="1"/>
<field name="display_detail">detail_flat</field>
@@ -364,7 +364,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_54">
- <field name="name">3. Cr&#233;ances sur des entreprises avec lesquelles la soci&#233;t&#233; a un</field>
+ <field name="name">3. Cr&#233;ances sur des entreprises avec lesquelles la soci&#233;t&#233; a un lien de participation</field>
<field name="sequence">177</field>
<field name="sign" eval="1"/>
<field name="display_detail">detail_flat</field>
@@ -436,7 +436,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_62">
- <field name="name">2. Actions propres ou parts propres </field>
+ <field name="name">2. Actions propres ou parts propres</field>
<field name="sequence">193</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -445,7 +445,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_63">
- <field name="name">3. Autres valeurs mobili&#232;res </field>
+ <field name="name">3. Autres valeurs mobili&#232;res</field>
<field name="sequence">195</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -963,7 +963,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_119">
- <field name="name">CHARGES</field>
+ <field name="name">A. CHARGES</field>
<field name="sequence">641</field>
<field name="sign" eval="1"/>
<field name="display_detail">detail_flat</field>
@@ -972,7 +972,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_120">
- <field name="name">1. Consommation de marchandises et de mati&#232;res premi&#232;res et consommables</field>
+ <field name="name">1. Consommation de marchandises et de mati&#232;res premi&#232;res et consommables</field>
<field name="sequence">601</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -1044,7 +1044,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_128">
- <field name="name">a) sur frais d'&#233;tablissement et sur immobilisations corporelles</field>
+ <field name="name">a) sur frais d'&#233;tablissement et sur immobilisations corporelles et incorporelles</field>
<field name="sequence">617</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -1071,7 +1071,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_131">
- <field name="name">6. Corrections de valeur sur immobilisations financi&#232;res et aj</field>
+ <field name="name">6. Corrections de valeur sur immobilisations financi&#232;res et ajustement de juste valeur sur immobilisations financières</field>
<field name="sequence">623</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -1080,7 +1080,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_132">
- <field name="name">7. Corrections de valeur et ajustement de juste valeur sur &#233;l&#233;m</field>
+ <field name="name">7. Corrections de valeur et ajustement de juste valeur sur &#233;l&#233;ments financiers de l'actif circulant. Moins-values de cessions des valeurs mobilières</field>
<field name="sequence">625</field>
<field name="sign" eval="1"/>
<field name="display_detail">no_detail</field>
@@ -1143,7 +1143,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_140">
- <field name="name">PRODUITS</field>
+ <field name="name">B. PRODUITS</field>
<field name="sequence">737</field>
<field name="sign" eval="-1"/>
<field name="display_detail">detail_flat</field>
@@ -1161,7 +1161,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_142">
- <field name="name">2. Variation des stocks de produits finis, et de produits et de commandes en cours</field>
+ <field name="name">2. Variation des stocks de produits finis, et de produits et de commandes en cours</field>
<field name="sequence">703</field>
<field name="sign" eval="-1"/>
<field name="display_detail">no_detail</field>
@@ -1188,7 +1188,7 @@
</record>
<record model="account.financial.report" id="account_financial_report_145">
- <field name="name">a) sur frais d'&#233;tablissement et sur immobilisations corporelles</field>
+ <field name="name">a) sur frais d'&#233;tablissement et sur immobilisations corporelles et incorporelles</field>
<field name="sequence">709</field>
<field name="sign" eval="-1"/>
<field name="display_detail">no_detail</field>
diff --git a/addons/l10n_lu/wizard/print_vat.py b/addons/l10n_lu/wizard/print_vat.py
index bfa058720d3..04d4fe9a3b7 100644
--- a/addons/l10n_lu/wizard/print_vat.py
+++ b/addons/l10n_lu/wizard/print_vat.py
@@ -64,7 +64,7 @@ class report_custom(report_int):
self.obj.render()
return (self.obj.pdf, 'pdf')
except Exception:
- raise osv.except_osv(_('pdf not created !'), _('Please check if package pdftk is installed!'))
+ raise osv.except_osv(_('PDF Not Created!'), _('Please check if package pdftk is installed!'))
report_custom('report.l10n_lu.tax.report.print')
diff --git a/addons/mail/html/index.html b/addons/mail/html/index.html
index be3a04ab30c..b564cf3ab1e 100644
--- a/addons/mail/html/index.html
+++ b/addons/mail/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=crm">
<img src="mail_sc_00.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -175,4 +174,5 @@ for your own company. Follow people, share best practices, 'like' top ideas, etc
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py
index 7b2eff5e743..bd2b9c3f18a 100644
--- a/addons/mail/mail_mail.py
+++ b/addons/mail/mail_mail.py
@@ -27,6 +27,7 @@ from urlparse import urljoin
from openerp import tools
from openerp import SUPERUSER_ID
+from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
from openerp.osv import fields, osv
from openerp.tools.translate import _
@@ -59,9 +60,6 @@ class mail_mail(osv.Model):
'recipient_ids': fields.many2many('res.partner', string='To (Partners)'),
'email_cc': fields.char('Cc', help='Carbon copy message recipients'),
'body_html': fields.text('Rich-text Contents', help="Rich-text/HTML message"),
- # If not set in create values, auto-detected based on create values (res_id, model, email_from)
- 'reply_to': fields.char('Reply-To',
- help='Preferred response address for the message'),
# Auto-detected based on create() - if 'mail_message_id' was passed then this mail is a notification
# and during unlink() we will not cascade delete the parent and its attachments
'notification': fields.boolean('Is Notification',
@@ -292,7 +290,7 @@ class mail_mail(osv.Model):
'email_to': email_to,
}
- def send(self, cr, uid, ids, auto_commit=False, context=None):
+ def send(self, cr, uid, ids, auto_commit=False, raise_exception=False, context=None):
""" Sends the selected emails immediately, ignoring their current
state (mails that have already been sent should not be passed
unless they should actually be re-sent).
@@ -303,6 +301,8 @@ class mail_mail(osv.Model):
:param bool auto_commit: whether to force a commit of the mail status
after sending each mail (meant only for scheduler processing);
should never be True during normal transactions (default: False)
+ :param bool raise_exception: whether to raise an exception if the
+ email sending process has failed
:return: True
"""
ir_mail_server = self.pool.get('ir.mail_server')
@@ -348,9 +348,16 @@ class mail_mail(osv.Model):
# see revid:odo@openerp.com-20120622152536-42b2s28lvdv3odyr in 6.1
if mail_sent:
self._postprocess_sent_message(cr, uid, mail, context=context)
- except Exception:
+ except Exception as e:
_logger.exception('failed sending mail.mail %s', mail.id)
mail.write({'state': 'exception'})
+ if raise_exception:
+ if isinstance(e, AssertionError):
+ # get the args of the original error, wrap into a value and throw a MailDeliveryException
+ # that is an except_orm, with name and value as arguments
+ value = '. '.join(e.args)
+ raise MailDeliveryException(_("Mail Delivery Failed"), value)
+ raise
if auto_commit == True:
cr.commit()
diff --git a/addons/mail/mail_mail_view.xml b/addons/mail/mail_mail_view.xml
index 1ff9a2a292e..7384cc24a75 100644
--- a/addons/mail/mail_mail_view.xml
+++ b/addons/mail/mail_mail_view.xml
@@ -6,6 +6,11 @@
<field name="model">mail.mail</field>
<field name="arch" type="xml">
<form string="Email message" version="7.0">
+ <header>
+ <button name="send" string="Send Now" type="object" states='outgoing' class="oe_highlight"/>
+ <button name="mark_outgoing" string="Retry" type="object" states='exception,cancel'/>
+ <button name="cancel" string="Cancel" type="object" states='outgoing'/>
+ </header>
<sheet>
<label for="subject" class="oe_edit_only"/>
<h2><field name="subject"/></h2>
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 0b6a4aebd18..252179614c6 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -27,6 +27,7 @@ from openerp import SUPERUSER_ID
from openerp.osv import osv, orm, fields
from openerp.tools import html_email_clean
from openerp.tools.translate import _
+from HTMLParser import HTMLParser
_logger = logging.getLogger(__name__)
@@ -43,6 +44,19 @@ def decode(text):
text = decode_header(text.replace('\r', ''))
return ''.join([tools.ustr(x[0], x[1]) for x in text])
+class MLStripper(HTMLParser):
+ def __init__(self):
+ self.reset()
+ self.fed = []
+ def handle_data(self, d):
+ self.fed.append(d)
+ def get_data(self):
+ return ''.join(self.fed)
+
+def strip_tags(html):
+ s = MLStripper()
+ s.feed(html)
+ return s.get_data()
class mail_message(osv.Model):
""" Messages model: system notification (replacing res.log notifications),
@@ -125,7 +139,7 @@ class mail_message(osv.Model):
ids = [ids]
res = []
for message in self.browse(cr, uid, ids, context=context):
- name = '%s: %s' % (message.subject or '', message.body or '')
+ name = '%s: %s' % (message.subject or '', strip_tags(message.body or '') or '')
res.append((message.id, self._shorten_name(name.lstrip(' :'))))
return res
@@ -144,6 +158,7 @@ class mail_message(osv.Model):
'author_id': fields.many2one('res.partner', 'Author', select=1,
ondelete='set null',
help="Author of the message. If not set, email_from may hold an email address that did not match any partner."),
+ 'author_avatar': fields.related('author_id', 'image_small', type="binary", string="Author's Avatar"),
'partner_ids': fields.many2many('res.partner', string='Recipients'),
'notified_partner_ids': fields.many2many('res.partner', 'mail_notification',
'message_id', 'partner_id', 'Notified partners',
@@ -277,7 +292,7 @@ class mail_message(osv.Model):
}
if starred:
values['read'] = False
-
+
notif_ids = notification_obj.search(cr, uid, domain, context=context)
# all message have notifications: already set them as (un)starred
@@ -384,6 +399,7 @@ class mail_message(osv.Model):
'parent_id': parent_id,
'is_private': is_private,
'author_id': False,
+ 'author_avatar': message.author_avatar,
'is_author': False,
'partner_ids': [],
'vote_nb': vote_nb,
@@ -514,7 +530,6 @@ class mail_message(osv.Model):
message_unload_ids = message_unload_ids if message_unload_ids is not None else []
if message_unload_ids:
domain += [('id', 'not in', message_unload_ids)]
- notification_obj = self.pool.get('mail.notification')
limit = limit or self._message_read_limit
message_tree = {}
message_list = []
@@ -724,12 +739,10 @@ class mail_message(osv.Model):
for model, doc_dict in model_record_ids.items():
model_obj = self.pool[model]
mids = model_obj.exists(cr, uid, doc_dict.keys())
- if operation in ['create', 'write', 'unlink']:
- model_obj.check_access_rights(cr, uid, 'write')
- model_obj.check_access_rule(cr, uid, mids, 'write', context=context)
+ if hasattr(model_obj, 'check_mail_message_access'):
+ model_obj.check_mail_message_access(cr, uid, mids, operation, context=context)
else:
- model_obj.check_access_rights(cr, uid, operation)
- model_obj.check_access_rule(cr, uid, mids, operation, context=context)
+ self.pool['mail.thread'].check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
document_related_ids += [mid for mid, message in message_values.iteritems()
if message.get('model') == model and message.get('res_id') in mids]
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index 80df8ad6e99..a46f416f44b 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -101,12 +101,16 @@ class mail_thread(osv.AbstractModel):
if catchall_domain and model and res_id: # specific res_id -> find its alias (i.e. section_id specified)
object_id = self.pool.get(model).browse(cr, uid, res_id, context=context)
- alias = object_id.alias_id
+ # check that the alias effectively creates new records
+ if object_id.alias_id and object_id.alias_id.alias_model_id and \
+ object_id.alias_id.alias_model_id.model == self._name and \
+ object_id.alias_id.alias_force_thread_id == 0:
+ alias = object_id.alias_id
elif catchall_domain and model: # no specific res_id given -> generic help message, take an example alias (i.e. alias of some section_id)
model_id = self.pool.get('ir.model').search(cr, uid, [("model", "=", self._name)], context=context)[0]
alias_obj = self.pool.get('mail.alias')
- alias_ids = alias_obj.search(cr, uid, [("alias_model_id", "=", model_id)], context=context, limit=1, order='id ASC')
- if alias_ids:
+ alias_ids = alias_obj.search(cr, uid, [("alias_model_id", "=", model_id), ('alias_force_thread_id', '=', 0)], context=context, order='id ASC')
+ if alias_ids and len(alias_ids) == 1: # if several aliases -> incoherent to propose one guessed from nowhere, therefore avoid if several aliases
alias = alias_obj.browse(cr, uid, alias_ids[0], context=context)
if alias:
@@ -281,14 +285,21 @@ class mail_thread(osv.AbstractModel):
context = {}
thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
+ # automatic logging unless asked not to (mainly for various testing purpose)
+ if not context.get('mail_create_nolog'):
+ self.message_post(cr, uid, thread_id, body=_('%s created') % (self._description), context=context)
+
# subscribe uid unless asked not to
if not context.get('mail_create_nosubscribe'):
self.message_subscribe_users(cr, uid, [thread_id], [uid], context=context)
self.message_auto_subscribe(cr, uid, [thread_id], values.keys(), context=context)
- # automatic logging unless asked not to (mainly for various testing purpose)
- if not context.get('mail_create_nolog'):
- self.message_post(cr, uid, thread_id, body=_('%s created') % (self._description), context=context)
+ # track values
+ tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=context)
+ if tracked_fields:
+ initial_values = {thread_id: dict((item, False) for item in tracked_fields)}
+ self.message_track(cr, uid, [thread_id], tracked_fields, initial_values, context=context)
+
return thread_id
def write(self, cr, uid, ids, values, context=None):
@@ -449,6 +460,20 @@ class mail_thread(osv.AbstractModel):
ir_attachment_obj.unlink(cr, uid, attach_ids, context=context)
return True
+ def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
+ """ mail.message check permission rules for related document. This method is
+ meant to be inherited in order to implement addons-specific behavior.
+ A common behavior would be to allow creating messages when having read
+ access rule on the document, for portal document such as issues. """
+ if not model_obj:
+ model_obj = self
+ if operation in ['create', 'write', 'unlink']:
+ model_obj.check_access_rights(cr, uid, 'write')
+ model_obj.check_access_rule(cr, uid, mids, 'write', context=context)
+ else:
+ model_obj.check_access_rights(cr, uid, operation)
+ model_obj.check_access_rule(cr, uid, mids, operation, context=context)
+
def _get_formview_action(self, cr, uid, id, model=None, context=None):
""" Return an action to open the document. This method is meant to be
overridden in addons that want to give specific view ids for example.
diff --git a/addons/mail/res_users_view.xml b/addons/mail/res_users_view.xml
index f49ff72194a..1cacadfc898 100644
--- a/addons/mail/res_users_view.xml
+++ b/addons/mail/res_users_view.xml
@@ -26,7 +26,7 @@
<field name="signature" position="before">
<field name="notification_email_send"/>
</field>
- <field name="email" position="after">
+ <field name="signature" position="before">
<field name="alias_domain" invisible="1"/>
<field name="alias_id" readonly="1" required="0" attrs="{'invisible': [('alias_domain', '=', False)]}"/>
</field>
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 8631bc70baa..7df6cdbef0d 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -219,6 +219,7 @@ openerp.mail = function (session) {
this.type = datasets.type || false,
this.subtype = datasets.subtype || false,
this.is_author = datasets.is_author || false,
+ this.author_avatar = datasets.author_avatar || false,
this.is_private = datasets.is_private || false,
this.subject = datasets.subject || false,
this.name = datasets.name || false,
@@ -260,8 +261,10 @@ openerp.mail = function (session) {
this.date = this.date ? session.web.str_to_datetime(this.date) : false;
if (this.date && new Date().getTime()-this.date.getTime() < 7*24*60*60*1000) {
this.timerelative = $.timeago(this.date);
- }
- if (this.type == 'email' && (!this.author_id || !this.author_id[0])) {
+ }
+ if (this.author_avatar) {
+ this.avatar = "data:image/png;base64," + this.author_avatar;
+ } else if (this.type == 'email' && (!this.author_id || !this.author_id[0])) {
this.avatar = ('/mail/static/src/img/email_icon.png');
} else if (this.author_id && this.template != 'mail.compose_message') {
this.avatar = mail.ChatterUtils.get_image(this.session, 'res.partner', 'image_small', this.author_id[0]);
@@ -850,9 +853,9 @@ openerp.mail = function (session) {
on_checked_recipient: function (event) {
var $input = $(event.target);
- var email = $input.attr("data");
+ var full_name = $input.attr("data");
_.each(this.recipients, function (recipient) {
- if (recipient.email_address == email) {
+ if (recipient.full_name == full_name) {
recipient.checked = $input.is(":checked");
}
});
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index ab82d650f30..f5004941a8d 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -143,7 +143,7 @@
<div class="oe_recipients" t-if="!widget.is_log">
<t t-foreach='widget.recipients' t-as='recipient'>
<label t-attf-title="Add as recipient and follower (reason: #{recipient.reason})">
- <input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.email_address"/>
+ <input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.full_name"/>
<t t-raw="recipient.name"/>
<t t-if="recipient.email_address">(<t t-raw="recipient.email_address"/>)</t>
<t t-if="!recipient.email_address">(no email address)</t>
diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py
index ee166b82dde..5615e22b2c2 100644
--- a/addons/mail/tests/test_mail_gateway.py
+++ b/addons/mail/tests/test_mail_gateway.py
@@ -147,6 +147,8 @@ class TestMailgateway(TestMailBase):
self.assertEqual(mail.reply_to, 'other@example.com',
'mail_mail: reply_to should be equal to the one coming from creation values')
# Do: create a mail_mail with the previous mail_message
+ self.mail_message.write(cr, uid, [msg_id], {'reply_to': 'custom@example.com'})
+ msg.refresh()
mail_id = self.mail_mail.create(cr, uid, {'mail_message_id': msg_id, 'state': 'cancel'})
mail = self.mail_mail.browse(cr, uid, mail_id)
# Test: mail_mail content
@@ -177,12 +179,15 @@ class TestMailgateway(TestMailBase):
mail = self.mail_mail.browse(cr, uid, mail_id)
# Test: mail_mail content
self.assertEqual(mail.reply_to, msg.email_from,
- 'mail_mail: reply_to should equal to mail_message.email_from when having no document or default alias')
+ 'mail_mail: reply_to should be equal to mail_message.email_from when having no document or default alias')
# Data: set catchall domain
self.registry('ir.config_parameter').set_param(cr, uid, 'mail.catchall.domain', 'schlouby.fr')
self.registry('ir.config_parameter').unlink(cr, uid, self.registry('ir.config_parameter').search(cr, uid, [('key', '=', 'mail.catchall.alias')]))
+ # Update message
+ self.mail_message.write(cr, uid, [msg_id], {'email_from': False, 'reply_to': False})
+ msg.refresh()
# Do: create a mail_mail based on the previous mail_message
mail_id = self.mail_mail.create(cr, uid, {'mail_message_id': msg_id, 'state': 'cancel'})
mail = self.mail_mail.browse(cr, uid, mail_id)
@@ -191,7 +196,7 @@ class TestMailgateway(TestMailBase):
'mail_mail: reply_to should equal the mail.group alias')
# Update message
- self.mail_message.write(cr, uid, [msg_id], {'res_id': False, 'email_from': 'someone@schlouby.fr'})
+ self.mail_message.write(cr, uid, [msg_id], {'res_id': False, 'email_from': 'someone@schlouby.fr', 'reply_to': False})
msg.refresh()
# Do: create a mail_mail based on the previous mail_message
mail_id = self.mail_mail.create(cr, uid, {'mail_message_id': msg_id, 'state': 'cancel'})
@@ -203,6 +208,9 @@ class TestMailgateway(TestMailBase):
# Data: set catchall alias
self.registry('ir.config_parameter').set_param(self.cr, self.uid, 'mail.catchall.alias', 'gateway')
+ # Update message
+ self.mail_message.write(cr, uid, [msg_id], {'email_from': False, 'reply_to': False})
+ msg.refresh()
# Do: create a mail_mail based on the previous mail_message
mail_id = self.mail_mail.create(cr, uid, {'mail_message_id': msg_id, 'state': 'cancel'})
mail = self.mail_mail.browse(cr, uid, mail_id)
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index dfda3038de8..7bf4d47d1ff 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -270,6 +270,7 @@ class mail_compose_message(osv.TransientModel):
context.pop('default_partner_ids', None)
# post the message
if mass_mail_mode and not wizard.post:
+ post_values['body_html'] = post_values.get('body', '')
post_values['recipient_ids'] = [(4, id) for id in post_values.pop('partner_ids', [])]
self.pool.get('mail.mail').create(cr, uid, post_values, context=context)
else:
diff --git a/addons/marketing_campaign/marketing_campaign_demo.xml b/addons/marketing_campaign/marketing_campaign_demo.xml
index 92443fe987d..89a299e3a85 100644
--- a/addons/marketing_campaign/marketing_campaign_demo.xml
+++ b/addons/marketing_campaign/marketing_campaign_demo.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" ?>
<openerp>
<data>
<!-- Email tempalte -->
@@ -66,13 +65,13 @@
<!-- Transition -->
<record id="marketing_campaign_transition_0" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_0"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_1"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_0"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_1"/>
</record>
<record id="marketing_campaign_transition_1" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_1"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_2"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_1"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_2"/>
</record>
<!-- Segment -->
@@ -85,9 +84,9 @@
<field eval="time.strftime('%Y-%m-%d %H:%M:%S')" name="date_run"/>
<field name="name">OpenERP Partner</field>
<field name="sync_mode">create_date</field>
- <field name="ir_filter_id" ref="filter0"></field>
+ <field name="ir_filter_id" ref="filter0"/>
<field name="campaign_id" ref="marketing_campaign_openerppartnerchannel"/>
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
index 141981a21d6..f6eb8a1d905 100644
--- a/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
+++ b/addons/marketing_campaign_crm_demo/marketing_campaign_demo.xml
@@ -1,11 +1,10 @@
-<?xml version="1.0" ?>
<openerp>
<data>
<record id="action_dummy" model="ir.actions.server">
<field name="name">Dummy Action</field>
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="state">dummy</field>
- <field name="code"></field>
+ <field name="code"/>
<field eval="5" name="sequence"/>
<field eval="True" name="condition"/>
</record>
@@ -40,10 +39,10 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>Thanks for the genuine interest you have shown in OpenERP.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;Thanks for the genuine interest you have shown in OpenERP.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">For OpenERP OnDemand Free Trial 2010</field>
</record>
<record id="email_template_2" model="email.template">
@@ -53,11 +52,11 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>We have very good offer that might suit you.
- We suggest you subscribe to the OpenERP Discovery Day on May 2010.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;We have very good offer that might suit you.
+ We suggest you subscribe to the OpenERP Discovery Day on May 2010.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">For OpenERP Discovery Day on May 2010</field>
</record>
@@ -68,10 +67,10 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>Thanks for showing interest and for subscribing to the OpenERP Discovery Day.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;Thanks for showing interest and for subscribing to the OpenERP Discovery Day.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">For OpenERP Discovery Day</field>
</record>
@@ -82,10 +81,10 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>Thanks for showing interest and buying the OpenERP book.</p>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;Thanks for showing interest and buying the OpenERP book.&lt;/p&gt;
If any further information required kindly revert back.
- <p>Regards,OpenERP Team,</p>]]></field>
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">For OpenERP book</field>
</record>
@@ -95,11 +94,11 @@
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>We have very good offer that might suit you.
- For our gold partners,We are arranging free technical training on june,2010.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;We have very good offer that might suit you.
+ For our gold partners,We are arranging free technical training on june,2010.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">technical training to gold partners</field>
</record>
@@ -110,11 +109,11 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>We have very good offer that might suit you.
- For our silver partners,We are paid technical training on june,2010.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;We have very good offer that might suit you.
+ For our silver partners,We are paid technical training on june,2010.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">training to silver partners</field>
</record>
@@ -125,11 +124,11 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>We have very good offer that might suit you.
- For our silver partners, we are offering Gold partnership.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;We have very good offer that might suit you.
+ For our silver partners, we are offering Gold partnership.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">gold partnership to silver partners</field>
</record>
@@ -140,11 +139,11 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="model_id" ref="crm.model_crm_lead"/>
<field eval="0" name="user_signature"/>
- <field name="body_html"><![CDATA[<p>Hello,</p>
- <p>Thanks for showing interest and for subscribing to technical training.</p>
- If any further information required kindly revert back.I really appreciate your co-operation on this.</p>
- <p>If any further information is required, do not hesitate to reply to this message.</p>
- <p>Regards,OpenERP Team,</p>]]></field>
+ <field name="body_html">&lt;p&gt;Hello,&lt;/p&gt;
+ &lt;p&gt;Thanks for showing interest and for subscribing to technical training.&lt;/p&gt;
+ If any further information required kindly revert back.I really appreciate your co-operation on this.&lt;/p&gt;
+ &lt;p&gt;If any further information is required, do not hesitate to reply to this message.&lt;/p&gt;
+ &lt;p&gt;Regards,OpenERP Team,&lt;/p&gt;</field>
<field name="name">subscribing to technical training</field>
</record>
<!-- Report -->
@@ -171,7 +170,7 @@
<record id="marketing_campaign_activity_0" model="marketing.campaign.activity">
<field name="name">Propose a 1 month free trial for an OnDemand offer</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="report_directory_id" ref="document_directory_campaign1"/>
<field name="type">report</field>
<field eval="1" name="start"/>
@@ -180,27 +179,27 @@
<record id="marketing_campaign_activity_1" model="marketing.campaign.activity">
<field name="name">Thanks for showing interest</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_1"/>
</record>
<record id="marketing_campaign_activity_2" model="marketing.campaign.activity">
<field name="name">Propose to subscribe to the OpenERP Discovery Day on May 2010</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_2"/>
</record>
<record id="marketing_campaign_activity_3" model="marketing.campaign.activity">
<field name="name">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_3"/>
</record>
<record id="marketing_campaign_activity_4" model="marketing.campaign.activity">
<field name="name">Propose to buy the OpenERP Book</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="report_directory_id" ref="document_directory_campaign1"/>
<field name="type">report</field>
<field name="report_id" ref="mc_crm_lead_demo_report"/>
@@ -209,81 +208,81 @@
<record id="marketing_campaign_activity_5" model="marketing.campaign.activity">
<field name="name">Thanks for buying the OpenERP book</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_4"/>
</record>
<record id="marketing_campaign_activity_6" model="marketing.campaign.activity">
<field name="name">Propose a free technical training to Gold partners</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_5"/>
</record>
<record id="marketing_campaign_activity_7" model="marketing.campaign.activity">
<field name="name">Propose paid training to Silver partners</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_6"/>
</record>
<record id="marketing_campaign_activity_8" model="marketing.campaign.activity">
<field name="name">Propose gold partnership to silver partners</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_7"/>
</record>
<record id="marketing_campaign_activity_9" model="marketing.campaign.activity">
<field name="name">Thanks for subscribing to technical training</field>
<field name="server_action_id" ref="action_dummy"/>
- <field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
+ <field name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_8"/>
</record>
<!-- Tranisition -->
<record id="marketing_campaign_transition_0" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_0"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_1"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_0"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_1"/>
</record>
<record id="marketing_campaign_transition_1" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_0"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_2"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_0"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_2"/>
</record>
<record id="marketing_campaign_transition_2" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_2"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_3"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_2"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_3"/>
</record>
<record id="marketing_campaign_transition_3" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_2"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_4"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_2"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_4"/>
</record>
<record id="marketing_campaign_transition_4" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_4"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_5"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_4"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_5"/>
</record>
<record id="marketing_campaign_transition_5" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_4"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_6"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_4"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_6"/>
</record>
<record id="marketing_campaign_transition_6" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_4"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_7"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_4"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_7"/>
</record>
<record id="marketing_campaign_transition_7" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_6"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_9"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_6"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_9"/>
</record>
<record id="marketing_campaign_transition_8" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_7"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_8"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_7"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_8"/>
</record>
<record id="marketing_campaign_transition_9" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_7"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_9"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_7"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_9"/>
</record>
<record id="marketing_campaign_transition_10" model="marketing.campaign.transition">
- <field model="marketing.campaign.activity" name="activity_from_id" ref = "marketing_campaign_activity_9"/>
- <field model="marketing.campaign.activity" name="activity_to_id" ref = "marketing_campaign_activity_1"/>
+ <field name="activity_from_id" ref="marketing_campaign_activity_9"/>
+ <field name="activity_to_id" ref="marketing_campaign_activity_1"/>
</record>
<!-- Segment -->
@@ -296,4 +295,4 @@
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/membership/process/membership_process.xml b/addons/membership/process/membership_process.xml
index d67ee864b34..b3ba426ff4a 100644
--- a/addons/membership/process/membership_process.xml
+++ b/addons/membership/process/membership_process.xml
@@ -87,16 +87,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Product to member&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Define product for membership.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_waitingmember0"/>
- <field model="process.node" name="source_node_id" ref="process_node_membershipproduct0"/>
+ <field name="target_node_id" ref="process_node_waitingmember0"/>
+ <field name="source_node_id" ref="process_node_membershipproduct0"/>
</record>
<record id="process_transition_waitingtoinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Waiting to invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoice is now open.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoicedmember0"/>
- <field model="process.node" name="source_node_id" ref="process_node_waitingmember0"/>
+ <field name="target_node_id" ref="process_node_invoicedmember0"/>
+ <field name="source_node_id" ref="process_node_waitingmember0"/>
</record>
<record id="process_transition_action_create0" model="process.transition.action">
@@ -110,25 +110,25 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice to paid&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoice is be paid.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_paidmember0"/>
- <field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
+ <field name="target_node_id" ref="process_node_paidmember0"/>
+ <field name="source_node_id" ref="process_node_invoicedmember0"/>
</record>
<record id="process_transition_invoicetoassociate0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;invoice to associate&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoiced member may be Associated member.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
- <field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
+ <field name="target_node_id" ref="process_node_associatedmember0"/>
+ <field name="source_node_id" ref="process_node_invoicedmember0"/>
</record>
<record id="process_transition_associationpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Association Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Associated partner.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
- <field model="process.node" name="source_node_id" ref="process_node_setassociation0"/>
+ <field name="target_node_id" ref="process_node_associatedmember0"/>
+ <field name="source_node_id" ref="process_node_setassociation0"/>
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/mrp/html/index.html b/addons/mrp/html/index.html
index 3ee973d7874..5777eb5f147 100644
--- a/addons/mrp/html/index.html
+++ b/addons/mrp/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=mrp">
<img src="mrp_product.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -190,4 +189,5 @@ manufacturing operations.
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/mrp/i18n/mn.po b/addons/mrp/i18n/mn.po
index 8d3c0aee785..53f793c1804 100644
--- a/addons/mrp/i18n/mn.po
+++ b/addons/mrp/i18n/mn.po
@@ -8,14 +8,14 @@ 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: 2012-07-21 12:33+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2013-06-04 04:00+0000\n"
+"Last-Translator: erdenebold <erdenebold10@gmail.com>\n"
"Language-Team: Mongolian <mn@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-03-16 05:01+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-05 05:32+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: mrp
#: help:mrp.config.settings,module_mrp_repair:0
@@ -48,7 +48,7 @@ msgstr "Дамжлагуудын Ашиглалт"
#. module: mrp
#: view:mrp.routing.workcenter:0
msgid "Routing Work Centers"
-msgstr "Дамжлагуудын маршрут"
+msgstr "Шугамын дамжлагууд"
#. module: mrp
#: field:mrp.production.workcenter.line,cycle:0
@@ -86,12 +86,12 @@ msgstr ""
#: model:ir.actions.act_window,name:mrp.mrp_routing_action
#: model:ir.ui.menu,name:mrp.menu_mrp_routing_action
msgid "Routings"
-msgstr "Маршрут"
+msgstr "Шугам"
#. module: mrp
#: view:mrp.bom:0
msgid "Search Bill Of Material"
-msgstr "Жор Хайх"
+msgstr "Орц Хайх"
#. module: mrp
#: model:process.node,note:mrp.process_node_stockproduct1
@@ -112,8 +112,8 @@ msgid ""
"Number of iterations this work center has to do in the specified operation "
"of the routing."
msgstr ""
-"Үйлдвэрлэлийн нэг маршрутын хувьд уг дамжлага өөрийн үйлдлийг давтан "
-"гүйцэтгэх давтамжын тоо."
+"Үйлдвэрлэлийн нэг шугамын хувьд уг дамжлага өөрийн үйлдлийг давтан гүйцэтгэх "
+"давтамжын тоо."
#. module: mrp
#: view:product.product:0
@@ -214,7 +214,7 @@ msgstr ""
#: code:addons/mrp/mrp.py:633
#, python-format
msgid "Cannot cancel manufacturing order!"
-msgstr ""
+msgstr "Үйлдвэрийн захиалгыг цуцлах боломжгүй!"
#. module: mrp
#: field:mrp.workcenter,costs_cycle_account_id:0
@@ -337,7 +337,7 @@ msgstr "Бараа Үйлдвэрлэх"
#. module: mrp
#: constraint:mrp.bom:0
msgid "Error ! You cannot create recursive BoM."
-msgstr "Алдаа ! Тойрог хамааралтай жор үүсгэж болохгүй."
+msgstr "Алдаа ! Тойрог хамааралтай орц үүсгэж болохгүй."
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_routing_workcenter
@@ -423,7 +423,7 @@ msgstr ""
#: field:mrp.production,product_qty:0
#: field:mrp.production.product.line,product_qty:0
msgid "Product Quantity"
-msgstr ""
+msgstr "Барааны тоо"
#. module: mrp
#: help:mrp.production,picking_id:0
@@ -491,13 +491,13 @@ msgstr "Товлогдсон огноо"
#: code:addons/mrp/procurement.py:124
#, python-format
msgid "Manufacturing Order <em>%s</em> created."
-msgstr ""
+msgstr "Үйлдвэрлэлийн захиалга <em>%s</em> үүсгэгдлээ."
#. module: mrp
#: view:mrp.bom:0
#: report:mrp.production.order:0
msgid "Bill Of Material"
-msgstr "Жор"
+msgstr "Орц"
#. module: mrp
#: help:mrp.routing,location_id:0
@@ -518,7 +518,7 @@ msgstr "Нөөцийн Үнийн Хазайлт"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.action2
msgid "Bill of Materials Structure"
-msgstr "Жорын Бүтэц"
+msgstr "Орцын Бүтэц"
#. module: mrp
#: model:process.node,note:mrp.process_node_serviceproduct0
@@ -560,7 +560,7 @@ msgstr ""
msgid ""
"The Bill of Material is linked to a routing, i.e. the succession of work "
"centers."
-msgstr "Жор нь маршруттай холбогдсон, ө.х. дамжлагуудын цуваанууд"
+msgstr "Орц нь шугамтай холбогдсон, ө.х. дамжлагуудын цуваанууд"
#. module: mrp
#: view:mrp.production:0
@@ -592,7 +592,7 @@ msgstr "Нөөцийн үнэ"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.action_product_bom_structure
msgid "Product BoM Structure"
-msgstr "Барааны Жорын Бүтэц"
+msgstr "Барааны Орцын Бүтэц"
#. module: mrp
#: view:mrp.production:0
@@ -603,12 +603,12 @@ msgstr "Үйлдвэрлэл Хайх"
#: help:mrp.routing.workcenter,sequence:0
msgid ""
"Gives the sequence order when displaying a list of routing Work Centers."
-msgstr "Маршруутын дамжлагуудыг жагсаалтаар харуулах дэс дарааллыг өгнө."
+msgstr "Шугамын дамжлагуудыг жагсаалтаар харуулах дэс дарааллыг өгнө."
#. module: mrp
#: field:mrp.bom,child_complete_ids:0
msgid "BoM Hierarchy"
-msgstr "Жорын удамшил"
+msgstr "Орцын удамшил"
#. module: mrp
#: model:process.transition,name:mrp.process_transition_stockproduction0
@@ -637,7 +637,7 @@ msgstr "Бэлтгэлтийн Сондгойрол"
#. module: mrp
#: field:mrp.bom,bom_lines:0
msgid "BoM Lines"
-msgstr "Жорын мөрүүд"
+msgstr "Орцын мөрүүд"
#. module: mrp
#: field:mrp.workcenter,time_start:0
@@ -650,13 +650,13 @@ msgid ""
"If the active field is set to False, it will allow you to hide the routing "
"without removing it."
msgstr ""
-"Идэвхтэй талбар нь худал буюу тэмдэглэгдээгүй байвал машрутыг устгалгүйгээр "
+"Идэвхтэй талбар нь худал буюу тэмдэглэгдээгүй байвал шугамыг устгалгүйгээр "
"нуудаг."
#. module: mrp
#: model:process.transition,name:mrp.process_transition_billofmaterialrouting0
msgid "Material Routing"
-msgstr "Материалын Машрут"
+msgstr "Материалын Шугам"
#. module: mrp
#: view:mrp.production:0
@@ -676,13 +676,13 @@ msgstr "Дамжлагын Ачаалал"
#: code:addons/mrp/procurement.py:50
#, python-format
msgid "No BoM defined for this product !"
-msgstr "Энэ бараанд жор тодорхойлогдоогүй байна !"
+msgstr "Энэ бараанд орц тодорхойлогдоогүй байна !"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_bom_form_action2
#: model:ir.ui.menu,name:mrp.menu_mrp_bom_form_action2
msgid "Bill of Material Components"
-msgstr "Жорын бүрдэлүүд"
+msgstr "Орцын бүрдэлүүд"
#. module: mrp
#: model:ir.model,name:mrp.model_stock_move
@@ -708,7 +708,7 @@ msgid ""
"operations and to plan future loads on work centers based on production "
"plannification."
msgstr ""
-"Эцсийн барааг үйлдвэрлэх үйлдлүүд (дамжлагууд)-н жагсаалт. Машрут гэдэг нь "
+"Эцсийн барааг үйлдвэрлэх үйлдлүүд (дамжлагууд)-н жагсаалт. Шугам гэдэг нь "
"үндсэндээ дамжлагуудын өртөгийг тооцоолох болон ажлын ачааллыг тооцоолоход "
"үйлдвэрлэлийн төлөвлөгөөн дээр суурилан бодоход хэрэглэгддэг."
@@ -734,7 +734,7 @@ msgstr ""
#. module: mrp
#: constraint:mrp.bom:0
msgid "BoM line product should not be same as BoM product."
-msgstr "Жорын мөр нь жорын бараатайгаа ижил байж болохгүй."
+msgstr "Орцын мөр нь орцын бараатайгаа ижил байж болохгүй."
#. module: mrp
#: view:mrp.production:0
@@ -744,7 +744,7 @@ msgstr "Үйлдвэрлэгдэж буй"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_property
msgid "Master Bill of Materials"
-msgstr "Мастер жор"
+msgstr "Мастер орц"
#. module: mrp
#: help:mrp.config.settings,module_product_manufacturer:0
@@ -907,7 +907,7 @@ msgid ""
"All product quantities must be greater than 0.\n"
"You should install the mrp_byproduct module if you want to manage extra "
"products on BoMs !"
-msgstr ""
+msgstr "Бүх бүтээгдэхүүнийг тоог 0-оос эхэлж үүсгэнэ."
#. module: mrp
#: view:mrp.production:0
@@ -954,7 +954,7 @@ msgstr ""
#. module: mrp
#: field:mrp.bom,type:0
msgid "BoM Type"
-msgstr "Жорын төрөл"
+msgstr "Орцын төрөл"
#. module: mrp
#: code:addons/mrp/procurement.py:52
@@ -962,7 +962,7 @@ msgstr "Жорын төрөл"
msgid ""
"Procurement '%s' has an exception: 'No BoM defined for this product !'"
msgstr ""
-"'%s' татан авалтад сондгойрол байна: 'Бараанд жор тодорхойлогдоогүй !'"
+"'%s' татан авалтад сондгойрол байна: 'Бараанд орц тодорхойлогдоогүй !'"
#. module: mrp
#: view:mrp.property:0
@@ -1077,7 +1077,7 @@ msgstr "Нөөцлүүлэх"
#. module: mrp
#: report:bom.structure:0
msgid "BOM Name"
-msgstr "Жорын нэр"
+msgstr "Орцын нэр"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.act_product_manufacturing_open
@@ -1167,7 +1167,7 @@ msgstr "Хийгдэж байгаа үйлдвэрлэлийн захиалгуÑ
#. module: mrp
#: model:ir.actions.client,name:mrp.action_client_mrp_menu
msgid "Open MRP Menu"
-msgstr ""
+msgstr "Нээлттэй MRP цэс"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_production_action4
@@ -1194,7 +1194,7 @@ msgstr "Циклийн Өртөг"
#: code:addons/mrp/wizard/change_production_qty.py:88
#, python-format
msgid "Cannot find bill of material for this product."
-msgstr ""
+msgstr "Энэ бараа материалаар хайх боломжгүй."
#. module: mrp
#: selection:mrp.workcenter.load,measure_unit:0
@@ -1216,8 +1216,7 @@ msgstr "Нөөцүүд"
msgid ""
"Time in hours for this Work Center to achieve the operation of the specified "
"routing."
-msgstr ""
-"Заагдсан маршрутын үйлдлийг гүйцэтгэхэд энэ дамжлагын хугацаа цагаар."
+msgstr "Заагдсан шугамын үйлдлийг гүйцэтгэхэд энэ дамжлагын хугацаа цагаар."
#. module: mrp
#: field:mrp.workcenter,costs_journal_id:0
@@ -1272,7 +1271,7 @@ msgstr "Үйлдвэрлэлийг эхлүүлэхэд бэлэн ҮйлдвэÑ
#: field:mrp.production,bom_id:0
#: model:process.node,name:mrp.process_node_billofmaterial0
msgid "Bill of Material"
-msgstr "Жор"
+msgstr "Орц"
#. module: mrp
#: view:mrp.workcenter.load:0
@@ -1304,9 +1303,9 @@ msgid ""
"Routing is indicated then,the third tab of a production order (Work Centers) "
"will be automatically pre-completed."
msgstr ""
-"Маршрут нь дамжлагууд ямар хугацаагаар хэдэн циклээр ашиглагдахыг "
-"илэрхийлдэг. Хэрэв маршрут байгаа бол гурав дахь үйлдвэрлэлийн дарааллын "
-"хавтас автоматаар бөглөгддөг."
+"Шугам нь дамжлагууд ямар хугацаагаар хэдэн циклээр ашиглагдахыг илэрхийлдэг. "
+"Хэрэв шугам байгаа бол гурав дахь үйлдвэрлэлийн дарааллын хавтас автоматаар "
+"бөглөгддөг."
#. module: mrp
#: code:addons/mrp/mrp.py:505
@@ -1431,7 +1430,7 @@ msgstr "Үйлдвэрлэлийн дамжлагыг хайх"
#. module: mrp
#: view:mrp.bom:0
msgid "BoM Structure"
-msgstr "Жорын бүтэц"
+msgstr "Орцын бүтэц"
#. module: mrp
#: field:mrp.production,date_start:0
@@ -1541,7 +1540,7 @@ msgstr "БЗ Дугаар"
#: code:addons/mrp/mrp.py:505
#, python-format
msgid "Cannot delete a manufacturing order in state '%s'."
-msgstr ""
+msgstr "Үйлдвэрлэлийн захиалгын '%s' төлөвт устгах боломжгүй."
#. module: mrp
#: selection:mrp.production,state:0
@@ -1689,7 +1688,7 @@ msgstr "Нөөц"
#: help:mrp.bom,date_stop:0
msgid "Validity of this BoM or component. Keep empty if it's always valid."
msgstr ""
-"Энэ жор эсвэл бүрэлдхүүний зөв эсэхийн шалгалт. Хэрэв байнга зөв бол хоосон "
+"Орц эсвэл бүрэлдэхүүний зөв эсэхийн шалгалт. Хэрэв байнга зөв бол хоосон "
"үлдээнэ."
#. module: mrp
@@ -1710,7 +1709,7 @@ msgid ""
"operations and to plan future loads on work centers based on production "
"planning."
msgstr ""
-"Барааг үйлдвэрлэх үйлдлийн жагсаалт (дамжлагын жагсаалт). Машрут нь "
+"Барааг үйлдвэрлэх үйлдлийн жагсаалт (дамжлагын жагсаалт). Шугам нь "
"үйлдвэрлэлийн захиалга дээр үндэслэн дамжлагуудын өртөгийг тооцох, ажлын "
"ирээдүйн ачааллыг тооцоолох зэрэгт голчлон хэрэглэгддэг."
@@ -1816,8 +1815,8 @@ msgid ""
"are products themselves) can also have their own Bill of Material (multi-"
"level)."
msgstr ""
-"Жор гэдэг нь барааны задаргаа юм. Бүрэлдхүүнүүд (мөн бараанууд) нь мөн "
-"өөрийн жортой буюу олон түвшний жор байж болно."
+"Орц гэдэг нь барааны задаргаа юм. Бүрэлдэхүүнүүд (мөн бараанууд) нь мөн "
+"өөрийн орцтой буюу олон түвшний орц байж болно."
#. module: mrp
#: field:mrp.bom,company_id:0
@@ -1882,7 +1881,7 @@ msgstr "Бүрэлдэхүүнүүд"
#: report:bom.structure:0
#: model:ir.actions.report.xml,name:mrp.report_bom_structure
msgid "BOM Structure"
-msgstr "Жорын бүтэц"
+msgstr "Орцын бүтэц"
#. module: mrp
#: field:mrp.config.settings,module_mrp_jit:0
@@ -1902,7 +1901,7 @@ msgstr "Хүчинтэй байх эхлэл"
#. module: mrp
#: selection:mrp.bom,type:0
msgid "Normal BoM"
-msgstr "Хэвийн жор"
+msgstr "Хэвийн орц"
#. module: mrp
#: field:res.company,manufacturing_lead:0
@@ -1958,7 +1957,7 @@ msgid ""
"If the active field is set to False, it will allow you to hide the bills of "
"material without removing it."
msgstr ""
-"Идэвхтэй талбар худал буюу тэмдэглэгдээгүй бол жорыг устгалгүйгээр нууна."
+"Идэвхтэй талбар худал буюу тэмдэглэгдээгүй бол орцыг устгалгүйгээр нууна."
#. module: mrp
#: field:mrp.bom,product_rounding:0
@@ -2083,7 +2082,7 @@ msgstr ""
#. module: mrp
#: field:procurement.order,bom_id:0
msgid "BoM"
-msgstr "Жор"
+msgstr "Орц"
#. module: mrp
#: model:ir.model,name:mrp.model_report_mrp_inout
@@ -2145,12 +2144,12 @@ msgstr "Хангах болон Үйлдвэрлэх"
#. module: mrp
#: field:mrp.bom,bom_id:0
msgid "Parent BoM"
-msgstr "Эцэг жор"
+msgstr "Эцэг орц"
#. module: mrp
#: report:bom.structure:0
msgid "BOM Ref"
-msgstr "Жорын код"
+msgstr "Орцын код"
#. module: mrp
#: code:addons/mrp/mrp.py:765
@@ -2190,7 +2189,7 @@ msgstr "Тоо хэмжээг сонго"
#: view:product.product:0
#: field:product.product,bom_ids:0
msgid "Bill of Materials"
-msgstr "Жорууд"
+msgstr "Орцууд"
#. module: mrp
#: code:addons/mrp/mrp.py:610
@@ -2322,7 +2321,7 @@ msgstr ""
msgid ""
"a manufacturing\n"
" order"
-msgstr ""
+msgstr "үйлдвэрлэл"
#. module: mrp
#: field:mrp.config.settings,group_mrp_properties:0
@@ -2344,7 +2343,7 @@ msgstr "Үзүүлэлтийн бүлэгүүд"
#: view:mrp.routing:0
#: model:process.node,name:mrp.process_node_routing0
msgid "Routing"
-msgstr "Маршрут"
+msgstr "Шугам"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_procurestockableproduct0
@@ -2390,8 +2389,8 @@ msgid ""
"the BOM, through a run of the schedulers (MRP)."
msgstr ""
"Түүхий эдийг хангахын тулд (худалдан авах эсвэл үйлдвэрлэх) үйлдвэрлэлийн "
-"захиалга нь жорд тодорхойлогдсон бүрдлүүдээр татан авах захиалга үүсгэдэг ба "
-"энэ нь товлогчийг ажиллахад үүсдэг."
+"захиалга нь орцонд тодорхойлогдсон бүрдлүүдээр татан авах захиалга үүсгэдэг "
+"ба энэ нь товлогчийг ажиллахад үүсдэг."
#. module: mrp
#: help:mrp.product_price,number:0
@@ -2423,7 +2422,7 @@ msgstr "Нөөцийн Амралт, Чөлөө"
#. module: mrp
#: help:mrp.bom,sequence:0
msgid "Gives the sequence order when displaying a list of bills of material."
-msgstr "Жорын жагсаалтыг харуулах дэс дарааллыг өгдөг."
+msgstr "Орцын жагсаалтыг харуулах дэс дарааллыг өгдөг."
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_config_settings
diff --git a/addons/mrp/i18n/ru.po b/addons/mrp/i18n/ru.po
index 5f7bf67a0e1..ef4cdb8675b 100644
--- a/addons/mrp/i18n/ru.po
+++ b/addons/mrp/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2012-09-14 07:17+0000\n"
-"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
+"PO-Revision-Date: 2013-05-27 12:24+0000\n"
+"Last-Translator: Pavel <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:01+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-28 05:16+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
#. module: mrp
#: help:mrp.config.settings,module_mrp_repair:0
@@ -131,7 +131,7 @@ msgstr "Конечный продукт"
#. module: mrp
#: view:mrp.production:0
msgid "Manufacturing Orders which are currently in production."
-msgstr ""
+msgstr "Производственные заказы, которые в настоящее время в изготовлении."
#. module: mrp
#: help:mrp.bom,message_summary:0
@@ -156,7 +156,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "Products to Finish"
-msgstr ""
+msgstr "Конечная продукция"
#. module: mrp
#: selection:mrp.bom,method:0
@@ -195,7 +195,7 @@ msgstr "Для приобретенного материала"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_production_order_action
msgid "Order Planning"
-msgstr ""
+msgstr "Планирование заказов"
#. module: mrp
#: field:mrp.config.settings,module_mrp_operations:0
@@ -206,7 +206,7 @@ msgstr ""
#: code:addons/mrp/mrp.py:633
#, python-format
msgid "Cannot cancel manufacturing order!"
-msgstr ""
+msgstr "Нельзя отменить производственый заказ!"
#. module: mrp
#: field:mrp.workcenter,costs_cycle_account_id:0
@@ -253,7 +253,7 @@ msgstr ""
#: view:mrp.production:0
#: field:mrp.production,move_created_ids2:0
msgid "Produced Products"
-msgstr ""
+msgstr "Производимая продукция"
#. module: mrp
#: report:mrp.production.order:0
@@ -268,7 +268,7 @@ msgstr "Основные данные"
#. module: mrp
#: field:mrp.config.settings,module_mrp_byproduct:0
msgid "Produce several products from one manufacturing order"
-msgstr ""
+msgstr "Изготовить несколько продуктов по одному производственному заказу"
#. module: mrp
#: help:mrp.config.settings,group_mrp_properties:0
@@ -329,7 +329,7 @@ msgstr "Производимый продукт"
#. module: mrp
#: constraint:mrp.bom:0
msgid "Error ! You cannot create recursive BoM."
-msgstr ""
+msgstr "Ошибка! Вы не можете создавать рекурсивную спецификацию."
#. module: mrp
#: model:ir.model,name:mrp.model_mrp_routing_workcenter
@@ -381,6 +381,8 @@ msgid ""
"Fill this product to easily track your production costs in the analytic "
"accounting."
msgstr ""
+"Заполнив этот продукт легко отслеживать ваши производственные издержки в "
+"аналитическом учете."
#. module: mrp
#: field:mrp.workcenter,product_id:0
diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml
index b827a2731c9..dd52268e2d1 100644
--- a/addons/mrp/process/procurement_process.xml
+++ b/addons/mrp/process/procurement_process.xml
@@ -131,96 +131,96 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If the service has a 'Produce' supply method, this creates a task in the project management module of OpenERP.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="procurement.process_node_serviceonorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_serviceproduct1"/>
+ <field name="target_node_id" ref="procurement.process_node_serviceonorder0"/>
+ <field name="source_node_id" ref="process_node_serviceproduct1"/>
</record>
<record id="process_transition_servicemts0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Stock&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;This is used in case of a service without any impact in the system, a training session for instance.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="mrp.process_node_servicemts0"/>
- <field model="process.node" name="source_node_id" ref="process_node_serviceproduct1"/>
+ <field name="target_node_id" ref="mrp.process_node_servicemts0"/>
+ <field name="source_node_id" ref="process_node_serviceproduct1"/>
</record>
<record id="process_transition_stockmts0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Stock&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system waits for the products to be available in the stock. These products are typically procured manually or through a minimum stock rule.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="mrp.process_node_mts0"/>
- <field model="process.node" name="source_node_id" ref="process_node_stockproduct1"/>
+ <field name="target_node_id" ref="mrp.process_node_mts0"/>
+ <field name="source_node_id" ref="process_node_stockproduct1"/>
</record>
<record id="process_transition_stockproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system creates an order (production or purchased) depending on the sold quantity and the products parameters.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="mrp.process_node_stock0"/>
- <field model="process.node" name="source_node_id" ref="process_node_stockproduct1"/>
+ <field name="target_node_id" ref="mrp.process_node_stock0"/>
+ <field name="source_node_id" ref="process_node_stockproduct1"/>
</record>
<record id="process_transition_productionprocureproducts0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of raw material&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In order to supply raw material (to be purchased or produced), the production order creates as much procurement orders as components listed in the BOM, through a run of the schedulers (MRP).&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_procureproducts0"/>
- <field model="process.node" name="source_node_id" ref="process_node_productionorder0"/>
+ <field name="target_node_id" ref="process_node_procureproducts0"/>
+ <field name="source_node_id" ref="process_node_productionorder0"/>
</record>
<record id="process_transition_minimumstockprocure0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;'Minimum stock rule' material&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The 'Minimum stock rule' allows the system to create procurement orders automatically as soon as the minimum stock is reached.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_procureproducts0"/>
- <field model="process.node" name="source_node_id" ref="process_node_minimumstockrule0"/>
+ <field name="target_node_id" ref="process_node_procureproducts0"/>
+ <field name="source_node_id" ref="process_node_minimumstockrule0"/>
</record>
<record id="process_transition_procurestockableproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of stockable Products&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the chosen method to supply the stockable products, the procurement order creates a RFQ, a production order, ... &quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_stockproduct0"/>
- <field model="process.node" name="source_node_id" ref="process_node_procureproducts0"/>
+ <field name="target_node_id" ref="process_node_stockproduct0"/>
+ <field name="source_node_id" ref="process_node_procureproducts0"/>
</record>
<record id="process_transition_procureserviceproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of services&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the chosen method to 'supply' the service, the procurement order creates a RFQ for a subcontracting purchase order or waits until the service is done (= the delivery of the products).&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_serviceproduct0"/>
- <field model="process.node" name="source_node_id" ref="process_node_procureproducts0"/>
+ <field name="target_node_id" ref="process_node_serviceproduct0"/>
+ <field name="source_node_id" ref="process_node_procureproducts0"/>
</record>
<record id="process_transition_purchaseprocure0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic RFQ&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system launches automatically a RFQ to the preferred supplier.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="purchase.process_node_draftpurchaseorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_purchaseprocure0"/>
+ <field name="target_node_id" ref="purchase.process_node_draftpurchaseorder0"/>
+ <field name="source_node_id" ref="process_node_purchaseprocure0"/>
</record>
<record id="process_transition_producttostockrules0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement rule&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Minimum Stock Rule is an automatic procurement rule based on a mini and maxi quantity. It's available in the Inventory management menu and configured by product.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_productminimumstockrule0"/>
- <field model="process.node" name="source_node_id" ref="product.process_node_product0"/>
+ <field name="target_node_id" ref="process_node_productminimumstockrule0"/>
+ <field name="source_node_id" ref="product.process_node_product0"/>
</record>
<record id="process_transition_billofmaterialrouting0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Material Routing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Bill of Material is linked to a routing, i.e. the succession of work centers.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_routing0"/>
- <field model="process.node" name="source_node_id" ref="process_node_billofmaterial0"/>
+ <field name="target_node_id" ref="process_node_routing0"/>
+ <field name="source_node_id" ref="process_node_billofmaterial0"/>
</record>
<record id="process_transition_bom0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Manufacturing decomposition&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Bill of Material is the product's decomposition. The components (that are products themselves) can also have their own Bill of Material (multi-level).&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_billofmaterial0"/>
- <field model="process.node" name="source_node_id" ref="product.process_node_product0"/>
+ <field name="target_node_id" ref="process_node_billofmaterial0"/>
+ <field name="source_node_id" ref="product.process_node_product0"/>
</record>
</data>
diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml
index 965f3f57d69..0005be6f48c 100644
--- a/addons/mrp/process/service_product_process.xml
+++ b/addons/mrp/process/service_product_process.xml
@@ -39,9 +39,9 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Buy&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If the service has a 'Buy' supply method, this creates a RFQ, a subcontracting demand for instance.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_orderrfq0"/>
- <field model="process.node" name="source_node_id" ref="procurement.process_node_serviceonorder0"/>
+ <field name="target_node_id" ref="process_node_orderrfq0"/>
+ <field name="source_node_id" ref="procurement.process_node_serviceonorder0"/>
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml
index e3fa1136822..a43a09313b8 100644
--- a/addons/mrp/process/stockable_product_process.xml
+++ b/addons/mrp/process/stockable_product_process.xml
@@ -69,16 +69,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Buy&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case the Supply method of the product is Buy, the system creates a purchase order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_rfq0"/>
- <field model="process.node" name="source_node_id" ref="process_node_stock0"/>
+ <field name="target_node_id" ref="process_node_rfq0"/>
+ <field name="source_node_id" ref="process_node_stock0"/>
</record>
<record id="process_transition_stockproduction0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Produce&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case the Supply method of the product is Produce, the system creates a production order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_production0"/>
- <field model="process.node" name="source_node_id" ref="process_node_stock0"/>
+ <field name="target_node_id" ref="process_node_production0"/>
+ <field name="source_node_id" ref="process_node_stock0"/>
</record>
</data>
diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py
index 3ad7155dad6..6347e22d576 100644
--- a/addons/mrp/procurement.py
+++ b/addons/mrp/procurement.py
@@ -33,6 +33,11 @@ class procurement_order(osv.osv):
'production_id': fields.many2one('mrp.production', 'Manufacturing Order'),
}
+ def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
+ result = super(procurement_order, self)._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context)
+ result['property_ids'] = [(6, 0, [x.id for x in line.property_ids])]
+ return result
+
def check_produce_product(self, cr, uid, procurement, context=None):
''' Depict the capacity of the procurement workflow to produce products (not services)'''
return True
diff --git a/addons/mrp/report/order.rml b/addons/mrp/report/order.rml
index 8833d08e596..f413a6cfc70 100644
--- a/addons/mrp/report/order.rml
+++ b/addons/mrp/report/order.rml
@@ -139,37 +139,18 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
- <paraStyle name="Standard" fontName="Helvetica"/>
- <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Contents" fontName="Helvetica"/>
- <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
- <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Index" fontName="Helvetica"/>
- <paraStyle name="Footer" fontName="Helvetica"/>
- <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
- <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_space" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_2" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@@ -178,16 +159,16 @@
<blockTable colWidths="256.0,61.0,107.0,104.0" style="Table8">
<tr>
<td>
- <para style="terp_tblheader_Details">Product </para>
+ <para style="terp_tblheader_Details"><b>Product </b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Quantity</para>
+ <para style="terp_tblheader_Details_Centre"><b>Quantity</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Source Location</para>
+ <para style="terp_tblheader_Details_Centre"><b>Source Location</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Destination Location</para>
+ <para style="terp_tblheader_Details_Centre"><b>Destination Location</b></para>
</td>
</tr>
</blockTable>
@@ -196,20 +177,20 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
- <para style="terp_header">Production Order N° : [[ o.name ]]</para>
+ <para style="terp_header"><b>Production Order N° : [[ o.name ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="193.0,206.0,129.0" style="Table3">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Source Document</para>
+ <para style="terp_tblheader_General_Centre"><b>Source Document</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Product </para>
+ <para style="terp_tblheader_General_Centre"><b>Product </b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Quantity</para>
+ <para style="terp_tblheader_General_Centre"><b>Quantity</b></para>
</td>
</tr>
</blockTable>
@@ -232,16 +213,16 @@
<blockTable colWidths="193.0,92.0,114.0,129.0" repeatRows="1" style="Table1">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Scheduled Date</para>
+ <para style="terp_tblheader_General_Centre"><b>Scheduled Date</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Printing date</para>
+ <para style="terp_tblheader_General_Centre"><b>Printing date</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Partner Ref</para>
+ <para style="terp_tblheader_General_Centre"><b>Partner Ref</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">SO Number</para>
+ <para style="terp_tblheader_General_Centre"><b>SO Number</b></para>
</td>
</tr>
</blockTable>
@@ -266,26 +247,26 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
- <para style="terp_default_Bold_8">Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]]</para>
+ <para style="terp_default_Bold_8"><b>Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="74.0,212.0,112.0,66.0,64.0" style="Table6">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Sequence</para>
+ <para style="terp_tblheader_General_Centre"><b>Sequence</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]</para>
+ <para style="terp_tblheader_Details_Centre"><b>Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">WorkCenter</para>
+ <para style="terp_tblheader_General_Centre"><b>WorkCenter</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">No. Of Cycles</para>
+ <para style="terp_tblheader_General_Centre"><b>No. Of Cycles</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">No. Of Hours</para>
+ <para style="terp_tblheader_General_Centre"><b>No. Of Hours</b></para>
</td>
</tr>
</blockTable>
@@ -317,28 +298,28 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
- <para style="terp_default_Bold_9">Bill Of Material </para>
+ <para style="terp_default_Bold_9"><b>Bill Of Material </b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="256.0,61.0,107.0,104.0" style="Table8">
<tr>
<td>
- <para style="terp_tblheader_Details">Product </para>
+ <para style="terp_tblheader_Details"><b>Product </b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Quantity</para>
+ <para style="terp_tblheader_Details_Centre"><b>Quantity</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Source Location</para>
+ <para style="terp_tblheader_Details_Centre"><b>Source Location</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Destination Location</para>
+ <para style="terp_tblheader_Details_Centre"><b>Destination Location</b></para>
</td>
</tr>
</blockTable>
<section>
- <para style="terp_default_Bold_9">Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]]</para>
+ <para style="terp_default_Bold_9"><b>Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]]</b></para>
<section>
<para style="terp_default_2">[[ repeatIn(o.move_lines,'line') ]]</para>
<blockTable colWidths="250.0,65.0,108.0,104.0" style="Table9">
@@ -363,7 +344,7 @@
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
- <para style="terp_default_Bold_9">Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]]</para>
+ <para style="terp_default_Bold_9"><b>Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]]</b></para>
<section>
<para style="terp_default_2">[[ repeatIn(o.move_lines2,'line2') ]]</para>
<blockTable colWidths="251.0,66.0,106.0,104.0" style="Table10">
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index d6f026530dc..87861ba8fc6 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -128,7 +128,7 @@ class mrp_production_workcenter_line(osv.osv):
elif prod_obj.state =='in_production':
return
else:
- raise osv.except_osv(_('Error!'),_('Manufacturing order cannot start in state "%s"!') % (prod_obj.state,))
+ raise osv.except_osv(_('Error!'),_('Manufacturing order cannot be started in state "%s"!') % (prod_obj.state,))
else:
oper_ids = self.search(cr,uid,[('production_id','=',prod_obj.id)])
obj = self.browse(cr,uid,oper_ids)
@@ -443,7 +443,7 @@ class mrp_operations_operation(osv.osv):
if not oper_objs:
if code.start_stop!='start':
- raise osv.except_osv(_('Sorry!'),_('Operation is not started yet !'))
+ raise osv.except_osv(_('Sorry!'),_('Operation is not started yet!'))
return False
else:
for oper in oper_objs:
diff --git a/addons/mrp_operations/process/mrp_operation_process.xml b/addons/mrp_operations/process/mrp_operation_process.xml
index 452434bbe92..d448b6a299a 100644
--- a/addons/mrp_operations/process/mrp_operation_process.xml
+++ b/addons/mrp_operations/process/mrp_operation_process.xml
@@ -75,32 +75,32 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Creation of the work order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The work orders are created on the basis of the production order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_startoperation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_productionorder0"/>
+ <field name="target_node_id" ref="process_node_startoperation0"/>
+ <field name="source_node_id" ref="process_node_productionorder0"/>
</record>
<record id="process_transition_workstartoperation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Details of the work order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;There is 1 work order per work center. The information about the number of cycles or the cycle time.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_startoperation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_workorder0"/>
+ <field name="target_node_id" ref="process_node_startoperation0"/>
+ <field name="source_node_id" ref="process_node_workorder0"/>
</record>
<record id="process_transition_startdoneoperation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Operation done&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When the operation is finished, the operator updates the system by finishing the work order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_doneoperation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_startoperation0"/>
+ <field name="target_node_id" ref="process_node_doneoperation0"/>
+ <field name="source_node_id" ref="process_node_startoperation0"/>
</record>
<record id="process_transition_startcanceloperation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Operation cancelled&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When the operation needs to be cancelled, you can do it in the work order form.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_canceloperation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_startoperation0"/>
+ <field name="target_node_id" ref="process_node_canceloperation0"/>
+ <field name="source_node_id" ref="process_node_startoperation0"/>
</record>
</data>
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index 43ee34b0c05..f7b082db74b 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -365,7 +365,7 @@ class mrp_repair(osv.osv):
if repair.state in ('draft','cancel') or repair.invoice_id:
continue
if not (repair.partner_id.id and repair.partner_invoice_id.id):
- raise osv.except_osv(_('No partner !'),_('You have to select a Partner Invoice Address in the repair form !'))
+ raise osv.except_osv(_('No partner!'),_('You have to select a Partner Invoice Address in the repair form!'))
comment = repair.quotation_notes
if (repair.invoice_method != 'none'):
if group and repair.partner_invoice_id.id in invoices_group:
@@ -582,7 +582,7 @@ class ProductChangeMixin(object):
result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id or False
if not pricelist:
warning = {
- 'title':'No Pricelist !',
+ 'title':'No Pricelist!',
'message':
'You have to select a pricelist in the Repair form !\n'
'Please set one before choosing a product.'
diff --git a/addons/mrp_repair/security/mrp_repair_security.xml b/addons/mrp_repair/security/mrp_repair_security.xml
index 0b34310fc4e..e94b675b57f 100644
--- a/addons/mrp_repair/security/mrp_repair_security.xml
+++ b/addons/mrp_repair/security/mrp_repair_security.xml
@@ -11,4 +11,4 @@
</record>
</data>
-</openerp> \ No newline at end of file
+</openerp>
diff --git a/addons/multi_company/i18n/ru.po b/addons/multi_company/i18n/ru.po
index 3dea680c371..e1665d9c838 100644
--- a/addons/multi_company/i18n/ru.po
+++ b/addons/multi_company/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2012-08-17 11:09+0000\n"
+"PO-Revision-Date: 2013-06-06 10:25+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:36+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
@@ -45,6 +45,16 @@ msgid ""
"Thank you in advance for your cooperation.\n"
"Best Regards,"
msgstr ""
+"Уважаемые господа,\n"
+"\n"
+"Наши записи зафиксировали что некоторые платежи остаются неоплаченными. "
+"Пожалуйста ознакомьтесь с подробностями ниже.\n"
+"Если сумма уже была оплачена, пожалуйста проигнорируйте это оповещение. В "
+"ином случае, пожалуйста перечислите нам всю сумму отображенную ниже.\n"
+"Если у вас есть какие-либо замечания, пожалуйста свяжитесь с нами.\n"
+"\n"
+"Заранее благодарим за сотрудничество.\n"
+"С наилучшими пожеланиями,"
#. module: multi_company
#: view:multi_company.default:0
diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml
index 088aa35e915..c772a8fd67d 100644
--- a/addons/multi_company/multi_company_demo.xml
+++ b/addons/multi_company/multi_company_demo.xml
@@ -192,8 +192,8 @@
<field name="code">SAJ-OpenERP IN</field>
<field name="type">sale</field>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -204,8 +204,8 @@
<field name="code">SCNJ-OpenERP IN</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -216,8 +216,8 @@
<field name="code">EXJ-OpenERP IN</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="account.sequence_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -228,8 +228,8 @@
<field name="code">ECNJ-OpenERP IN</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="account.sequence_refund_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -240,8 +240,8 @@
<field name="code">BNK-OpenERP IN</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_bank_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -252,8 +252,8 @@
<field name="code">CHK-OpenERP IN</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_check_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -264,8 +264,8 @@
<field name="code">CSH-OpenERP IN</field>
<field name="type">cash</field>
<field name="sequence_id" ref="account.sequence_cash_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_in"/>
@@ -277,8 +277,8 @@
<field name="code">SAJ-OpenERP US</field>
<field name="type">sale</field>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -289,8 +289,8 @@
<field name="code">SCNJ-OpenERP US</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -301,8 +301,8 @@
<field name="code">EXJ-OpenERP US</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="account.sequence_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -313,8 +313,8 @@
<field name="code">ECNJ-OpenERP US</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="account.sequence_refund_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -325,8 +325,8 @@
<field name="code">BNK-OpenERP US</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_bank_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -337,8 +337,8 @@
<field name="code">CHK-OpenERP US</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_check_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -349,8 +349,8 @@
<field name="code">CSH-OpenERP US</field>
<field name="type">cash</field>
<field name="sequence_id" ref="account.sequence_cash_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_us"/>
@@ -363,8 +363,8 @@
<field name="code">SAJ-OpenERP BE</field>
<field name="type">sale</field>
<field name="sequence_id" ref="account.sequence_sale_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -375,8 +375,8 @@
<field name="code">SCNJ-OpenERP BE</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_sale"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_sale"/>
+ <field name="default_credit_account_id" ref="account.a_sale"/>
+ <field name="default_debit_account_id" ref="account.a_sale"/>
<field name="analytic_journal_id" ref="account.cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -387,8 +387,8 @@
<field name="code">EXJ-OpenERP BE</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="account.sequence_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -399,8 +399,8 @@
<field name="code">ECNJ-OpenERP BE</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="account.sequence_refund_purchase_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.a_expense"/>
- <field model="account.account" name="default_credit_account_id" ref="account.a_expense"/>
+ <field name="default_debit_account_id" ref="account.a_expense"/>
+ <field name="default_credit_account_id" ref="account.a_expense"/>
<field name="analytic_journal_id" ref="account.exp"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -411,8 +411,8 @@
<field name="code">BNK-OpenERP BE</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_bank_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -423,8 +423,8 @@
<field name="code">CHK-OpenERP BE</field>
<field name="type">bank</field>
<field name="sequence_id" ref="account.sequence_check_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
@@ -435,8 +435,8 @@
<field name="code">CSH-OpenERP BE</field>
<field name="type">cash</field>
<field name="sequence_id" ref="account.sequence_cash_journal"/>
- <field model="account.account" name="default_debit_account_id" ref="account.cash"/>
- <field model="account.account" name="default_credit_account_id" ref="account.cash"/>
+ <field name="default_debit_account_id" ref="account.cash"/>
+ <field name="default_credit_account_id" ref="account.cash"/>
<field name="analytic_journal_id" ref="account.sit"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="res_company_oerp_be"/>
diff --git a/addons/note/html/index.html b/addons/note/html/index.html
index 97736520f2f..7ef37c646e9 100644
--- a/addons/note/html/index.html
+++ b/addons/note/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=note">
<img src="notes_sc_00.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -113,4 +112,5 @@ The real time collaborative writings on notes makes it the perfect tool to colla
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/note/i18n/ru.po b/addons/note/i18n/ru.po
new file mode 100644
index 00000000000..ef2cd6be0c1
--- /dev/null
+++ b/addons/note/i18n/ru.po
@@ -0,0 +1,286 @@
+# 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:04+0000\n"
+"PO-Revision-Date: 2013-06-06 10:35+0000\n"
+"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
+
+#. module: note
+#: field:note.note,memo:0
+msgid "Note Content"
+msgstr "Содержание заметки"
+
+#. module: note
+#: view:note.stage:0
+msgid "Stages of Notes"
+msgstr "Этапы заметок"
+
+#. module: note
+#: model:note.stage,name:note.demo_note_stage_04
+#: model:note.stage,name:note.note_stage_02
+msgid "This Week"
+msgstr "Эта неделя"
+
+#. module: note
+#: model:ir.model,name:note.model_base_config_settings
+msgid "base.config.settings"
+msgstr "base.config.settings"
+
+#. module: note
+#: model:ir.model,name:note.model_note_tag
+msgid "Note Tag"
+msgstr "Тег заметки"
+
+#. module: note
+#: model:res.groups,name:note.group_note_fancy
+msgid "Notes / Fancy mode"
+msgstr ""
+
+#. module: note
+#: model:ir.model,name:note.model_note_note
+#: view:note.note:0
+msgid "Note"
+msgstr "Заметка"
+
+#. module: note
+#: view:note.note:0
+msgid "Group By..."
+msgstr "Группировать по ..."
+
+#. module: note
+#: field:note.note,message_follower_ids:0
+msgid "Followers"
+msgstr "Подписчики"
+
+#. module: note
+#: model:ir.actions.act_window,help:note.action_note_note
+msgid ""
+"<p class=\"oe_view_nocontent_create\">\n"
+" Click to add a personal note.\n"
+" </p><p>\n"
+" Use notes to organize personal tasks or notes. All\n"
+" notes are private; no one else will be able to see them. "
+"However\n"
+" you can share some notes with other people by inviting "
+"followers\n"
+" on the note. (Useful for meeting minutes, especially if\n"
+" you activate the pad feature for collaborative writings).\n"
+" </p><p>\n"
+" You can customize how you process your notes/tasks by adding,\n"
+" removing or modifying columns.\n"
+" </p>\n"
+" "
+msgstr ""
+
+#. module: note
+#: model:note.stage,name:note.demo_note_stage_01
+#: model:note.stage,name:note.note_stage_01
+msgid "Today"
+msgstr "Сегодня"
+
+#. module: note
+#: model:ir.model,name:note.model_res_users
+msgid "Users"
+msgstr "Пользователи"
+
+#. module: note
+#: view:note.note:0
+msgid "í"
+msgstr ""
+
+#. module: note
+#: view:note.stage:0
+msgid "Stage of Notes"
+msgstr "Этап заметок"
+
+#. module: note
+#: field:note.note,message_unread:0
+msgid "Unread Messages"
+msgstr "Непрочитанные"
+
+#. module: note
+#: field:note.note,current_partner_id:0
+msgid "unknown"
+msgstr "неизвестно"
+
+#. module: note
+#: view:note.note:0
+msgid "By sticky note Category"
+msgstr ""
+
+#. module: note
+#: help:note.note,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr "Если отмечено, новые сообщения требуют вашего внимания."
+
+#. module: note
+#: field:note.stage,name:0
+msgid "Stage Name"
+msgstr "Название этапа"
+
+#. module: note
+#: field:note.note,message_is_follower:0
+msgid "Is a Follower"
+msgstr "Подписан"
+
+#. module: note
+#: model:note.stage,name:note.demo_note_stage_02
+msgid "Tomorrow"
+msgstr "Завтра"
+
+#. module: note
+#: view:note.note:0
+#: field:note.note,open:0
+msgid "Active"
+msgstr "Активно"
+
+#. module: note
+#: help:note.stage,user_id:0
+msgid "Owner of the note stage."
+msgstr "Владелец этапа заметки"
+
+#. module: note
+#: model:ir.ui.menu,name:note.menu_notes_stage
+msgid "Categories"
+msgstr "Категории"
+
+#. module: note
+#: view:note.note:0
+#: field:note.note,stage_id:0
+msgid "Stage"
+msgstr "Этап"
+
+#. module: note
+#: field:note.tag,name:0
+msgid "Tag Name"
+msgstr "Название тега"
+
+#. module: note
+#: field:note.note,message_ids:0
+msgid "Messages"
+msgstr "Сообщения"
+
+#. module: note
+#: view:base.config.settings:0
+#: model:ir.actions.act_window,name:note.action_note_note
+#: model:ir.ui.menu,name:note.menu_note_notes
+#: view:note.note:0
+#: model:note.stage,name:note.note_stage_04
+msgid "Notes"
+msgstr "Заметки"
+
+#. module: note
+#: model:note.stage,name:note.demo_note_stage_03
+#: model:note.stage,name:note.note_stage_03
+msgid "Later"
+msgstr "Позже"
+
+#. module: note
+#: model:ir.model,name:note.model_note_stage
+msgid "Note Stage"
+msgstr "Этап заметки"
+
+#. module: note
+#: field:note.note,message_summary:0
+msgid "Summary"
+msgstr "Итог"
+
+#. module: note
+#: field:note.note,stage_ids:0
+msgid "Stages of Users"
+msgstr "Этапы пользователей"
+
+#. module: note
+#: field:note.note,name:0
+msgid "Note Summary"
+msgstr "Заметка - кратко"
+
+#. module: note
+#: model:ir.actions.act_window,name:note.action_note_stage
+#: view:note.note:0
+msgid "Stages"
+msgstr "Этапы"
+
+#. module: note
+#: help:note.note,message_ids:0
+msgid "Messages and communication history"
+msgstr "Сообщения и история общения"
+
+#. module: note
+#: view:note.note:0
+msgid "Delete"
+msgstr "Удалить"
+
+#. module: note
+#: field:note.note,color:0
+msgid "Color Index"
+msgstr "Цветовая палитра"
+
+#. module: note
+#: field:note.note,sequence:0
+#: field:note.stage,sequence:0
+msgid "Sequence"
+msgstr "Нумерация"
+
+#. module: note
+#: view:note.note:0
+#: field:note.note,tag_ids:0
+msgid "Tags"
+msgstr "Теги"
+
+#. module: note
+#: view:note.note:0
+msgid "Archive"
+msgstr "Архив"
+
+#. module: note
+#: field:base.config.settings,module_note_pad:0
+msgid "Use collaborative pads (etherpad)"
+msgstr "Используйте совместный планшет (etherpad)"
+
+#. module: note
+#: help:note.note,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 ""
+"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате "
+"html для возможности использования в канбан виде"
+
+#. module: note
+#: field:base.config.settings,group_note_fancy:0
+msgid "Use fancy layouts for notes"
+msgstr ""
+
+#. module: note
+#: field:note.note,current_partner_id:0
+#: field:note.stage,user_id:0
+msgid "Owner"
+msgstr "Владелец"
+
+#. module: note
+#: help:note.stage,sequence:0
+msgid "Used to order the note stages"
+msgstr "Используется для сортировки этапов заметок"
+
+#. module: note
+#: field:note.note,date_done:0
+msgid "Date done"
+msgstr "Дата выполнения"
+
+#. module: note
+#: field:note.stage,fold:0
+msgid "Folded by Default"
+msgstr "Свернуто по умолчанию"
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index 68ec6bfc4f7..f3b9e4669c7 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -175,7 +175,7 @@
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_note_note_filter"/>
- <field name="context">{'search_default_open_true':True}</field>
+ <field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a personal note.
diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml
index b0c79561355..2c6e9f3bc7f 100644
--- a/addons/note/security/ir.rule.xml
+++ b/addons/note/security/ir.rule.xml
@@ -3,7 +3,7 @@
<data>
<record id="note_note_rule_global" model="ir.rule">
<field name="name">Only followers can access a sticky notes</field>
- <field model="ir.model" ref="model_note_note" name="model_id"/>
+ <field ref="model_note_note" name="model_id"/>
<field name="domain_force">[('message_follower_ids','=',user.partner_id.id)]</field>
<field eval="True" name="global"/>
<field eval="1" name="perm_unlink"/>
@@ -14,7 +14,7 @@
<record id="note_stage_rule_global" model="ir.rule">
<field name="name">Each user have his stage name</field>
- <field model="ir.model" ref="model_note_stage" name="model_id"/>
+ <field ref="model_note_stage" name="model_id"/>
<field name="domain_force">['|',('user_id','=',False),('user_id','=',user.id)]</field>
<field eval="True" name="global"/>
</record>
diff --git a/addons/point_of_sale/html/index.html b/addons/point_of_sale/html/index.html
index 41f935d8ad9..130806ddb11 100644
--- a/addons/point_of_sale/html/index.html
+++ b/addons/point_of_sale/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=point_of_sale">
<img src="pos_sc_02.jpg">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 349ad8b4f81..089c577e940 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -407,7 +407,7 @@ class pos_session(osv.osv):
# The pos manager can close statements with maximums.
if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"):
raise osv.except_osv( _('Error!'),
- _("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff))
+ _("Your ending balance is too different from the theoretical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff))
if (st.journal_id.type not in ['bank', 'cash']):
raise osv.except_osv(_('Error!'),
_("The type of the journal for your payment method should be bank or cash "))
@@ -545,7 +545,7 @@ class pos_order(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state not in ('draft','cancel'):
- raise osv.except_osv(_('Unable to Delete !'), _('In order to delete a sale, it must be new or cancelled.'))
+ raise osv.except_osv(_('Unable to Delete!'), _('In order to delete a sale, it must be new or cancelled.'))
return super(pos_order, self).unlink(cr, uid, ids, context=context)
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
@@ -1163,7 +1163,7 @@ class pos_order_line(osv.osv):
if not product_id:
return {}
if not pricelist:
- raise osv.except_osv(_('No Pricelist !'),
+ raise osv.except_osv(_('No Pricelist!'),
_('You have to select a pricelist in the sale form !\n' \
'Please set one before choosing a product.'))
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index e4bf004c00f..a533f0a8ee6 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -319,6 +319,14 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
this.payment_line.set_amount(amount);
}
},
+ checkAmount: function(e){
+ if (e.which !== 0 && e.charCode !== 0) {
+ if(isNaN(String.fromCharCode(e.charCode))){
+ return (String.fromCharCode(e.charCode) === "." && e.currentTarget.value.toString().split(".").length < 2)?true:false;
+ }
+ }
+ return true
+ },
changedAmount: function() {
if (this.amount !== this.payment_line.get_amount()){
this.renderElement();
@@ -328,7 +336,8 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
var self = this;
this.name = this.payment_line.get_cashregister().get('journal_id')[1];
this._super();
- this.$('input').keyup(function(event){
+ this.$('input').keypress(_.bind(this.checkAmount, this))
+ .keyup(function(event){
self.changeAmount(event);
});
this.$('.delete-payment-line').click(function() {
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 97ffad805b7..30e407d2ad0 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -46,7 +46,7 @@ class pos_open_statement(osv.osv_memory):
st_ids = []
j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context)
if not j_ids:
- raise osv.except_osv(_('No Cash Register Defined !'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".'))
+ raise osv.except_osv(_('No Cash Register Defined!'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".'))
for journal in journal_obj.browse(cr, uid, j_ids, context=context):
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml
index b2a76800023..02080bdc0ab 100644
--- a/addons/portal/security/portal_security.xml
+++ b/addons/portal/security/portal_security.xml
@@ -5,7 +5,7 @@
<record id="portal_read_own_res_partner" model="ir.rule">
<field name="name">res_partner: read access on my partner</field>
<field name="model_id" ref="base.model_res_partner"/>
- <field name="domain_force">[('user_ids', 'in', user.id)]</field>
+ <field name="domain_force">[('id', 'child_of', user.commercial_partner_id.id)]</field>
<field name="groups" eval="[(4, ref('group_portal')), (4, ref('group_anonymous'))]"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index e3047cd5edb..3ec2850b4aa 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -20,7 +20,6 @@
##############################################################################
import logging
-import random
from openerp.osv import fields, osv
from openerp.tools.translate import _
@@ -34,14 +33,15 @@ _logger = logging.getLogger(__name__)
WELCOME_EMAIL_SUBJECT = _("Your OpenERP account at %(company)s")
WELCOME_EMAIL_BODY = _("""Dear %(name)s,
-You have been given access to %(portal)s.
+You have been given access to %(company)s's %(portal)s.
Your login account data is:
-Database: %(db)s
-Username: %(login)s
+ Username: %(login)s
+ Portal: %(portal_url)s
+ Database: %(db)s
-In order to complete the signin process, click on the following url:
-%(url)s
+You can set or change your password via the following url:
+ %(signup_url)s
%(welcome_message)s
@@ -116,24 +116,57 @@ class wizard_user(osv.osv_memory):
_description = 'Portal User Config'
_columns = {
- 'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True),
+ 'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True, ondelete='cascade'),
'partner_id': fields.many2one('res.partner', string='Contact', required=True, readonly=True),
'email': fields.char(size=240, string='Email'),
'in_portal': fields.boolean('In Portal'),
}
- def create(self, cr, uid, values, context=None):
- """ overridden to update the partner's email (if necessary) """
- id = super(wizard_user, self).create(cr, uid, values, context)
- wuser = self.browse(cr, uid, id, context)
- if wuser.partner_id.email != wuser.email:
- wuser.partner_id.write({'email': wuser.email})
- return id
+ def get_error_messages(self, cr, uid, ids, context=None):
+ res_users = self.pool.get('res.users')
+ emails = []
+ error_empty = []
+ error_emails = []
+ error_user = []
+ ctx = dict(context or {}, active_test=False)
+ for wizard_user in self.browse(cr, SUPERUSER_ID, ids, context):
+ if wizard_user.in_portal and not self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context):
+ email = extract_email(wizard_user.email)
+ if not email:
+ error_empty.append(wizard_user.partner_id)
+ elif email in emails and email not in error_emails:
+ error_emails.append(wizard_user.partner_id)
+ user = res_users.search(cr, SUPERUSER_ID, [('login', '=', email)], context=ctx)
+ if user:
+ error_user.append(wizard_user.partner_id)
+ emails.append(email)
+
+ error_msg = []
+ if error_empty:
+ error_msg.append("%s\n- %s" % (_("Some contacts don't have a valid email: "),
+ '\n- '.join(['%s' % (p.display_name,) for p in error_empty])))
+ if error_emails:
+ error_msg.append("%s\n- %s" % (_("Several contacts have the same email: "),
+ '\n- '.join([p.email for p in error_emails])))
+ if error_user:
+ error_msg.append("%s\n- %s" % (_("Some contacts have the same email as an existing portal user:"),
+ '\n- '.join(['%s <%s>' % (p.display_name, p.email) for p in error_user])))
+ if error_msg:
+ error_msg.append(_("To resolve this error, you can: \n"
+ "- Correct the emails of the relevant contacts\n"
+ "- Grant access only to contacts with unique emails"))
+ return error_msg
def action_apply(self, cr, uid, ids, context=None):
+ error_msg = self.get_error_messages(cr, uid, ids, context=context)
+ if error_msg:
+ raise osv.except_osv(_('Contacts Error'), "\n\n".join(error_msg))
+
for wizard_user in self.browse(cr, SUPERUSER_ID, ids, context):
portal = wizard_user.wizard_id.portal_id
user = self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context)
+ if wizard_user.partner_id.email != wizard_user.email:
+ wizard_user.partner_id.write({'email': wizard_user.email})
if wizard_user.in_portal:
# create a user if necessary, and make sure it is in the portal group
if not user:
@@ -142,8 +175,8 @@ class wizard_user(osv.osv_memory):
user.write({'active': True, 'groups_id': [(4, portal.id)]})
# prepare for the signup process
user.partner_id.signup_prepare()
- wizard_user = self.browse(cr, SUPERUSER_ID, wizard_user.id, context)
- self._send_email(cr, uid, wizard_user, context)
+ wizard_user.refresh()
+ self._send_email(cr, uid, wizard_user, context)
else:
# remove the user (if it exists) from the portal group
if user and (portal in user.groups_id):
@@ -158,13 +191,11 @@ class wizard_user(osv.osv_memory):
@param wizard_user: browse record of model portal.wizard.user
@return: browse record of model res.users
"""
- if wizard_user.partner_id.user_ids:
- return wizard_user.partner_id.user_ids[0]
- # the user may be inactive, search for it
+ context = dict(context or {}, active_test=False)
res_users = self.pool.get('res.users')
- domain = [('partner_id', '=', wizard_user.partner_id.id), ('active', '=', False)]
- user_ids = res_users.search(cr, uid, domain)
- return user_ids and res_users.browse(cr, uid, user_ids[0], context) or False
+ domain = [('partner_id', '=', wizard_user.partner_id.id)]
+ user_ids = res_users.search(cr, uid, domain, context=context)
+ return user_ids and res_users.browse(cr, uid, user_ids[0], context=context) or False
def _create_user(self, cr, uid, wizard_user, context=None):
""" create a new user for wizard_user.partner_id
@@ -172,8 +203,9 @@ class wizard_user(osv.osv_memory):
@return: browse record of model res.users
"""
res_users = self.pool.get('res.users')
- create_context = dict(context or {}, noshortcut=True) # to prevent shortcut creation
+ create_context = dict(context or {}, noshortcut=True, no_reset_password=True) # to prevent shortcut creation
values = {
+ 'email': extract_email(wizard_user.email),
'login': extract_email(wizard_user.email),
'partner_id': wizard_user.partner_id.id,
'groups_id': [(6, 0, [])],
@@ -187,15 +219,22 @@ class wizard_user(osv.osv_memory):
@param wizard_user: browse record of model portal.wizard.user
@return: the id of the created mail.mail record
"""
+ res_partner = self.pool['res.partner']
this_context = context
this_user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context)
if not this_user.email:
- raise osv.except_osv(_('Email required'),
+ raise osv.except_osv(_('Email Required'),
_('You must have an email address in your User Preferences to send emails.'))
# determine subject and body in the portal user's language
user = self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context)
context = dict(this_context or {}, lang=user.lang)
+ ctx_portal_url = dict(context, signup_force_type_in_url='')
+ portal_url = res_partner._get_signup_url_for_action(cr, uid,
+ [user.partner_id.id],
+ context=ctx_portal_url)[user.partner_id.id]
+ res_partner.signup_prepare(cr, uid, [user.partner_id.id], context=context)
+
data = {
'company': this_user.company_id.name,
'portal': wizard_user.wizard_id.portal_id.name,
@@ -203,7 +242,8 @@ class wizard_user(osv.osv_memory):
'db': cr.dbname,
'name': user.name,
'login': user.login,
- 'url': user.signup_url,
+ 'signup_url': user.signup_url,
+ 'portal_url': portal_url,
}
mail_mail = self.pool.get('mail.mail')
mail_values = {
diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml
index ace0daaff87..eca13258ff9 100644
--- a/addons/portal_hr_employees/hr_employee_view.xml
+++ b/addons/portal_hr_employees/hr_employee_view.xml
@@ -33,8 +33,9 @@
</record>
<record model="ir.ui.view" id="portal_hr_kanban_view_employees">
- <field name="name">HR - Employess Kanban</field>
+ <field name="name">HR - Employees Kanban</field>
<field name="model">hr.employee</field>
+ <field name="inherit_id" eval="False"/>
<field name="arch" type="xml">
<kanban>
<field name="last_login"/>
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 672859db909..93b9417bded 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -307,7 +307,7 @@ class procurement_order(osv.osv):
move_obj = self.pool.get('stock.move')
for procurement in self.browse(cr, uid, ids, context=context):
if procurement.product_qty <= 0.00:
- raise osv.except_osv(_('Data Insufficient !'),
+ raise osv.except_osv(_('Data Insufficient!'),
_('Please check the quantity in procurement order(s) for the product "%s", it should not be 0 or less!' % procurement.product_id.name))
if procurement.product_id.type in ('product', 'consu'):
if not procurement.move_id:
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index 7f0a28d94dc..76432157555 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -18,6 +18,7 @@
<field name="product_uom" string="Unit of Measure"/>
<field name="procure_method"/>
<field name="state"/>
+ <field name="name" invisible="1"/>
<field name="message"/>
</tree>
</field>
diff --git a/addons/procurement/stock_orderpoint.xml b/addons/procurement/stock_orderpoint.xml
index 31c48046d64..67d610c65c9 100644
--- a/addons/procurement/stock_orderpoint.xml
+++ b/addons/procurement/stock_orderpoint.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
@@ -7,50 +6,50 @@
<record id="stock_warehouse_orderpoint_0" model="stock.warehouse.orderpoint">
<field name="product_max_qty">25.0</field>
<field name="product_min_qty">5.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_dozen"/>
+ <field name="product_uom" ref="product.product_uom_dozen"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_36"/>
+ <field name="product_id" ref="product.product_product_36"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint">
<field name="product_max_qty">10.0</field>
<field name="product_min_qty">5.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_unit"/>
+ <field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_28"/>
+ <field name="product_id" ref="product.product_product_28"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint">
<field name="product_max_qty">12.0</field>
<field name="product_min_qty">5.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_unit"/>
+ <field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_20"/>
+ <field name="product_id" ref="product.product_product_20"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_warehouse_orderpoint_3" model="stock.warehouse.orderpoint">
<field name="product_max_qty">50.0</field>
<field name="product_min_qty">10.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_unit"/>
+ <field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_46"/>
+ <field name="product_id" ref="product.product_product_46"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_warehouse_orderpoint_4" model="stock.warehouse.orderpoint">
<field name="product_max_qty">15.0</field>
<field name="product_min_qty">5.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_unit"/>
+ <field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_23"/>
+ <field name="product_id" ref="product.product_product_23"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint">
<field name="product_max_qty">5.0</field>
<field name="product_min_qty">3.0</field>
- <field model="product.uom" name="product_uom" ref="product.product_uom_unit"/>
+ <field name="product_uom" ref="product.product_uom_unit"/>
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
- <field model="product.product" name="product_id" ref="product.product_product_48"/>
+ <field name="product_id" ref="product.product_product_48"/>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml
index 03ce904abad..652710fac94 100644
--- a/addons/product/process/product_process.xml
+++ b/addons/product/process/product_process.xml
@@ -43,8 +43,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Supplier of the product&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;1 or several supplier(s) can be linked to a product. All information stands in the product form.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_supplier0"/>
- <field model="process.node" name="source_node_id" ref="process_node_product0"/>
+ <field name="target_node_id" ref="process_node_supplier0"/>
+ <field name="source_node_id" ref="process_node_product0"/>
</record>
</data>
diff --git a/addons/product/product.py b/addons/product/product.py
index 518e455ddc1..656812bebbb 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -292,9 +292,14 @@ class product_template(osv.osv):
_columns = {
'name': fields.char('Name', size=128, required=True, translate=True, select=True),
'product_manager': fields.many2one('res.users','Product Manager'),
- 'description': fields.text('Description',translate=True),
- 'description_purchase': fields.text('Purchase Description',translate=True),
- 'description_sale': fields.text('Sale Description',translate=True),
+ 'description': fields.text('Description',translate=True,
+ help="A precise description of the Product, used only for internal information purposes."),
+ 'description_purchase': fields.text('Purchase Description',translate=True,
+ help="A description of the Product that you want to communicate to your suppliers. "
+ "This description will be copied to every Purchase Order, Reception and Supplier Invoice/Refund."),
+ 'description_sale': fields.text('Sale Description',translate=True,
+ help="A description of the Product that you want to communicate to your customers. "
+ "This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"),
'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),
'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
'rental': fields.boolean('Can be Rent'),
diff --git a/addons/project/html/index.html b/addons/project/html/index.html
index 072f279447f..93f1be8a41d 100644
--- a/addons/project/html/index.html
+++ b/addons/project/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=project">
<img src="project_01.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -194,4 +193,5 @@ accurate reports on your team's performance.
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/project/i18n/ru.po b/addons/project/i18n/ru.po
index 1743d66e55d..b64662f916b 100644
--- a/addons/project/i18n/ru.po
+++ b/addons/project/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-03-14 06:44+0000\n"
+"PO-Revision-Date: 2013-05-28 06:22+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 04:56+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
#. module: project
#: view:project.project:0
@@ -27,6 +27,8 @@ msgid ""
"If checked, this contract will be available in the project menu and you will "
"be able to manage tasks or track issues"
msgstr ""
+"Если выбрано, этот контракт станет активным в меню проекта, и вы сможете "
+"редактировать задачи или отслеживать проблемы"
#. module: project
#: field:project.project,progress_rate:0
@@ -217,7 +219,7 @@ msgstr "Предложение контакта"
#. module: project
#: help:project.config.settings,group_time_work_estimation_tasks:0
msgid "Allows you to compute Time Estimation on tasks."
-msgstr ""
+msgstr "Позволяет вычислить расход времени на задачи."
#. module: project
#: field:report.project.task.user,user_id:0
@@ -913,6 +915,8 @@ msgid ""
"Provides management of issues/bugs in projects.\n"
" This installs the module project_issue."
msgstr ""
+"Обеспечивает управление проблем / ошибок в проектах.\n"
+" Устанавливает модуль project_issue."
#. module: project
#: help:project.task,kanban_state:0
@@ -927,7 +931,7 @@ msgstr ""
#. module: project
#: view:project.task:0
msgid "10"
-msgstr ""
+msgstr "10"
#. module: project
#: help:project.project,analytic_account_id:0
@@ -953,7 +957,7 @@ msgstr "Отменить"
#. module: project
#: view:project.project:0
msgid "Other Info"
-msgstr ""
+msgstr "Прочая информация"
#. module: project
#: view:project.task.delegate:0
@@ -981,6 +985,8 @@ msgid ""
"Follow this project to automatically track the events associated to tasks "
"and issues of this project."
msgstr ""
+"Позволяет проекту автоматически отслеживать события, связанные с задачами и "
+"проблемами этого проекта."
#. module: project
#: view:project.task:0
@@ -990,7 +996,7 @@ msgstr "Исполнитель"
#. module: project
#: model:mail.message.subtype,name:project.mt_task_stage
msgid "Stage Changed"
-msgstr ""
+msgstr "Стадия изменена"
#. module: project
#: view:project.project:0
@@ -1006,7 +1012,7 @@ msgstr "Важное"
#. module: project
#: field:project.category,name:0
msgid "Name"
-msgstr ""
+msgstr "Название"
#. module: project
#: selection:report.project.task.user,month:0
@@ -1033,7 +1039,7 @@ msgstr "Общие"
#: help:project.project,message_ids:0
#: help:project.task,message_ids:0
msgid "Messages and communication history"
-msgstr ""
+msgstr "Сообщения и история общения"
#. module: project
#: view:project.project:0
@@ -1041,6 +1047,8 @@ msgid ""
"To invoice or setup invoicing and renewal options, go to the related "
"contract:"
msgstr ""
+"Для выставления счета или изменения счета и обновления вариантов, перейти к "
+"соответствующему контракту:"
#. module: project
#: field:project.task.delegate,state:0
@@ -1097,7 +1105,7 @@ msgstr "Порученные задания"
#: view:project.task:0
#: field:project.task,message_unread:0
msgid "Unread Messages"
-msgstr ""
+msgstr "Непрочитанные"
#. module: project
#: view:project.task:0
@@ -1139,7 +1147,7 @@ msgstr "Показывать только срочные задания"
#. module: project
#: model:project.category,name:project.project_category_04
msgid "Usability"
-msgstr ""
+msgstr "Удобство использования"
#. module: project
#: view:report.project.task.user:0
@@ -1156,7 +1164,7 @@ msgstr "Выполнил(а)"
#: code:addons/project/project.py:181
#, python-format
msgid "Invalid Action!"
-msgstr ""
+msgstr "Неверное действие!"
#. module: project
#: help:project.task.type,state:0
@@ -1165,6 +1173,9 @@ msgid ""
"stage. For example, if a stage is related to the status 'Close', when your "
"document reaches this stage, it is automatically closed."
msgstr ""
+"Статус документа автоматически изменяется по выбранному этапу. Например, "
+"если стадия связана со статусом «Закрыть» , когда ваш документ достигает "
+"этой стадии, оно автоматически закрывается."
#. module: project
#: view:project.task:0
@@ -1174,7 +1185,7 @@ msgstr "Доп. информация"
#. module: project
#: view:project.task:0
msgid "Edit..."
-msgstr ""
+msgstr "Изменить..."
#. module: project
#: view:report.project.task.user:0
@@ -1185,7 +1196,7 @@ msgstr "№ задачи"
#. module: project
#: field:project.project,doc_count:0
msgid "Number of documents attached"
-msgstr ""
+msgstr "Количество прикрепленных документов"
#. module: project
#: field:project.task,priority:0
@@ -1205,6 +1216,9 @@ msgid ""
"automatically synchronizedwith Tasks (or optionally Issues if the Issue "
"Tracker module is installed)."
msgstr ""
+"Внутренние e-mail, связанный с этим проектом. Входящие письма автоматически "
+"синхронизируются с заданиями (или проблемами, если модуль Issue Tracker "
+"установлен)."
#. module: project
#: model:ir.actions.act_window,help:project.open_task_type_form
@@ -1237,7 +1251,7 @@ msgstr "%s (копия)"
#. module: project
#: model:mail.message.subtype,name:project.mt_project_task_stage
msgid "Task Stage Changed"
-msgstr ""
+msgstr "Этап задачи изменен"
#. module: project
#: view:project.task:0
@@ -1269,12 +1283,12 @@ msgstr "Время отсрочки"
#. module: project
#: view:project.project:0
msgid "Team"
-msgstr ""
+msgstr "Группа"
#. module: project
#: help:project.config.settings,time_unit:0
msgid "This will set the unit of measure used in projects and tasks."
-msgstr ""
+msgstr "Установить единицу измерения, используемую в проектах и задачах."
#. module: project
#: selection:project.task,priority:0
@@ -1328,7 +1342,7 @@ msgstr "Заголовок вашего проверочного задания"
#. module: project
#: field:project.config.settings,time_unit:0
msgid "Working time unit"
-msgstr ""
+msgstr "Единица рабочего времени"
#. module: project
#: view:project.project:0
@@ -1344,7 +1358,7 @@ msgstr "Низкий"
#. module: project
#: selection:project.project,state:0
msgid "Closed"
-msgstr ""
+msgstr "Закрыто"
#. module: project
#: view:project.project:0
@@ -1366,7 +1380,7 @@ msgstr "В ожидании"
#: view:project.category:0
#: field:project.task,categ_ids:0
msgid "Tags"
-msgstr ""
+msgstr "Теги"
#. module: project
#: model:ir.model,name:project.model_project_task_history
@@ -1386,7 +1400,7 @@ msgstr ""
#. module: project
#: help:project.config.settings,group_manage_delegation_task:0
msgid "Allows you to delegate tasks to other users."
-msgstr ""
+msgstr "Позволяет делегировать задачи другим пользователям."
#. module: project
#: field:project.project,active:0
@@ -1415,7 +1429,7 @@ msgstr ""
#. module: project
#: view:project.config.settings:0
msgid "Helpdesk & Support"
-msgstr ""
+msgstr "Поддержка"
#. module: project
#: help:report.project.task.user,opening_days:0
@@ -1441,7 +1455,7 @@ msgstr ""
#: code:addons/project/project.py:220
#, python-format
msgid "Attachments"
-msgstr ""
+msgstr "Вложения"
#. module: project
#: view:project.task:0
@@ -1464,6 +1478,8 @@ msgid ""
"You cannot delete a project containing tasks. You can either delete all the "
"project's tasks and then delete the project or simply deactivate the project."
msgstr ""
+"Вы не можете удалить проект, содержащий задачи. Вы можете либо удалить все "
+"задачи проекта, а затем удалить проект или просто сделать проект неактивным."
#. module: project
#: model:process.transition.action,name:project.process_transition_action_draftopentask0
@@ -1474,7 +1490,7 @@ msgstr "Открытые"
#. module: project
#: field:project.project,privacy_visibility:0
msgid "Privacy / Visibility"
-msgstr ""
+msgstr "Безопасность/Видимость"
#. module: project
#: view:project.task:0
@@ -1488,7 +1504,7 @@ msgstr "Оставшееся время"
#. module: project
#: model:mail.message.subtype,description:project.mt_task_stage
msgid "Stage changed"
-msgstr ""
+msgstr "Этап изменен"
#. module: project
#: constraint:project.task:0
@@ -1521,7 +1537,7 @@ msgstr "Общее время"
#. module: project
#: model:ir.model,name:project.model_project_config_settings
msgid "project.config.settings"
-msgstr ""
+msgstr "project.config.settings"
#. module: project
#: model:project.task.type,name:project.project_tt_development
@@ -1586,12 +1602,12 @@ msgstr "Назначить на"
#. module: project
#: model:res.groups,name:project.group_time_work_estimation_tasks
msgid "Time Estimation on Tasks"
-msgstr ""
+msgstr "Оценка времени на задачи"
#. module: project
#: field:project.task,total_hours:0
msgid "Total"
-msgstr ""
+msgstr "Всего"
#. module: project
#: model:process.node,note:project.process_node_taskbydelegate0
@@ -1601,7 +1617,7 @@ msgstr "Поручить ваше задание другому пользова
#. module: project
#: model:mail.message.subtype,description:project.mt_task_started
msgid "Task started"
-msgstr ""
+msgstr "Задание начато"
#. module: project
#: help:project.task.reevaluate,remaining_hours:0
@@ -1614,6 +1630,8 @@ msgid ""
"This stage is not visible, for example in status bar or kanban view, when "
"there are no records in that stage to display."
msgstr ""
+"Эта стадия не видима, например в статус-баре или виде канбан, когда нет "
+"записей на этой стадии для отображения."
#. module: project
#: view:project.task:0
@@ -1643,7 +1661,7 @@ msgstr "Проекты в ожидании"
#. module: project
#: view:project.task:0
msgid "Remaining"
-msgstr ""
+msgstr "Осталось"
#. module: project
#: field:project.task,progress:0
@@ -1672,17 +1690,17 @@ msgstr ""
#. module: project
#: field:project.config.settings,module_project_issue:0
msgid "Track issues and bugs"
-msgstr ""
+msgstr "Отслеживание проблем и ошибок"
#. module: project
#: field:project.config.settings,module_project_mrp:0
msgid "Generate tasks from sale orders"
-msgstr ""
+msgstr "Создание задач из заказов"
#. module: project
#: model:ir.ui.menu,name:project.menu_task_types_view
msgid "Task Stages"
-msgstr ""
+msgstr "Этапы задач"
#. module: project
#: model:process.node,note:project.process_node_drafttask0
@@ -1693,7 +1711,7 @@ msgstr "Определить требования и установить зап
#: field:project.project,message_ids:0
#: field:project.task,message_ids:0
msgid "Messages"
-msgstr ""
+msgstr "Сообщения"
#. module: project
#: field:project.project,color:0
@@ -1752,17 +1770,17 @@ msgstr "Дата окончания"
#. module: project
#: field:project.task.type,state:0
msgid "Related Status"
-msgstr ""
+msgstr "Связанный статус"
#. module: project
#: view:project.project:0
msgid "Documents"
-msgstr ""
+msgstr "Документы"
#. module: project
#: model:mail.message.subtype,description:project.mt_task_new
msgid "Task created"
-msgstr ""
+msgstr "Задача создана"
#. module: project
#: view:report.project.task.user:0
@@ -1774,7 +1792,7 @@ msgstr "# дней"
#: field:project.project,message_follower_ids:0
#: field:project.task,message_follower_ids:0
msgid "Followers"
-msgstr ""
+msgstr "Подписчики"
#. module: project
#: selection:project.project,state:0
@@ -1812,7 +1830,7 @@ msgstr "Проверка задания"
#. module: project
#: field:project.config.settings,module_project_long_term:0
msgid "Manage resources planning on gantt view"
-msgstr ""
+msgstr "Управление планированием ресурсов на диаграмме Ганта"
#. module: project
#: view:project.task:0
@@ -1871,7 +1889,7 @@ msgstr "Проекты"
#. module: project
#: model:res.groups,name:project.group_tasks_work_on_tasks
msgid "Task's Work on Tasks"
-msgstr ""
+msgstr "Задачи, работающие на задачи"
#. module: project
#: help:project.task.delegate,name:0
@@ -1914,7 +1932,7 @@ msgstr "Декабрь"
#: view:project.task.delegate:0
#: view:project.task.reevaluate:0
msgid "or"
-msgstr ""
+msgstr "или"
#. module: project
#: help:project.config.settings,module_project_mrp:0
@@ -1938,7 +1956,7 @@ msgstr ""
#. module: project
#: model:project.category,name:project.project_category_03
msgid "Experiment"
-msgstr ""
+msgstr "Эксперимент"
#. module: project
#: model:process.transition.action,name:project.process_transition_action_opendrafttask0
@@ -1998,7 +2016,7 @@ msgstr ""
#: model:ir.actions.act_window,name:project.action_config_settings
#: view:project.config.settings:0
msgid "Configure Project"
-msgstr ""
+msgstr "Настроить проект"
#. module: project
#: view:project.task.history.cumulative:0
@@ -2030,7 +2048,7 @@ msgstr "Пожалуйста, сначала удалите проект, ссы
#: model:mail.message.subtype,name:project.mt_project_task_new
#: model:mail.message.subtype,name:project.mt_task_new
msgid "Task Created"
-msgstr ""
+msgstr "Задание создано"
#. module: project
#: view:report.project.task.user:0
@@ -2048,12 +2066,12 @@ msgstr "Проекты, в которых я менеджер"
#: selection:project.task.history,kanban_state:0
#: selection:project.task.history.cumulative,kanban_state:0
msgid "Ready for next stage"
-msgstr ""
+msgstr "Готово к следующей стадии"
#. module: project
#: field:project.task.type,case_default:0
msgid "Default for New Projects"
-msgstr ""
+msgstr "По умолчанию для нового проекта"
#. module: project
#: view:project.task:0
@@ -2098,7 +2116,7 @@ msgstr ""
#. module: project
#: model:mail.message.subtype,description:project.mt_task_closed
msgid "Task closed"
-msgstr ""
+msgstr "Задание закрыто"
#. module: project
#: selection:report.project.task.user,month:0
@@ -2130,13 +2148,13 @@ msgstr ""
#. module: project
#: selection:project.project,privacy_visibility:0
msgid "Followers Only"
-msgstr ""
+msgstr "Только для подписчиков"
#. module: project
#: view:board.board:0
#: field:project.project,task_count:0
msgid "Open Tasks"
-msgstr ""
+msgstr "Открытые задачи"
#. module: project
#: field:project.project,priority:0
diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml
index 4a73bfd00d1..9955fe1ffe1 100644
--- a/addons/project/process/task_process.xml
+++ b/addons/project/process/task_process.xml
@@ -68,24 +68,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Delegate&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Delegates tasks to the other user&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_drafttask0"/>
- <field model="process.node" name="source_node_id" ref="process_node_taskbydelegate0"/>
+ <field name="target_node_id" ref="process_node_drafttask0"/>
+ <field name="source_node_id" ref="process_node_taskbydelegate0"/>
</record>
<record id="process_transition_draftopentask0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Draft Open task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From draft state, it will come into the open state.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_opentask0"/>
- <field model="process.node" name="source_node_id" ref="process_node_drafttask0"/>
+ <field name="target_node_id" ref="process_node_opentask0"/>
+ <field name="source_node_id" ref="process_node_drafttask0"/>
</record>
<record id="process_transition_opendonetask0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Open Done Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When task is completed, it will come into the done state.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_donetask0"/>
- <field model="process.node" name="source_node_id" ref="process_node_opentask0"/>
+ <field name="target_node_id" ref="process_node_donetask0"/>
+ <field name="source_node_id" ref="process_node_opentask0"/>
</record>
diff --git a/addons/project/project.py b/addons/project/project.py
index 5d5abce3066..28e4bd6e5d2 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -85,7 +85,7 @@ class project(osv.osv):
if context and context.get('user_preference'):
cr.execute("""SELECT project.id FROM project_project project
LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id
- LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id
+ LEFT JOIN project_user_rel rel ON rel.project_id = project.id
WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user))
return [(r[0]) for r in cr.fetchall()]
return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order,
@@ -450,7 +450,7 @@ class project(osv.osv):
for project in projects:
if (not project.members) and force_members:
- raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,))
+ raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s'!") % (project.name,))
resource_pool = self.pool.get('resource.resource')
@@ -581,12 +581,12 @@ class task(base_stage, osv.osv):
_track = {
'state': {
- 'project.mt_task_new': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new',
+ 'project.mt_task_new': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'],
'project.mt_task_started': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open',
'project.mt_task_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
},
'stage_id': {
- 'project.mt_task_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'done', 'open'],
+ 'project.mt_task_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'done', 'open'],
},
'kanban_state': { # kanban state: tracked, but only block subtype
'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj['kanban_state'] == 'blocked',
@@ -956,7 +956,7 @@ class task(base_stage, osv.osv):
if task.child_ids:
for child in task.child_ids:
if child.state in ['draft', 'open', 'pending']:
- raise osv.except_osv(_("Warning !"), _("Child task still open.\nPlease cancel or complete child task first."))
+ raise osv.except_osv(_("Warning!"), _("Child task still open.\nPlease cancel or complete child task first."))
return True
def action_close(self, cr, uid, ids, context=None):
@@ -1120,10 +1120,12 @@ class task(base_stage, osv.osv):
context = {}
if not vals.get('stage_id'):
ctx = context.copy()
- if vals.get('project_id'):
+ if vals.get('project_id'):
ctx['default_project_id'] = vals['project_id']
vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
- task_id = super(task, self).create(cr, uid, vals, context=context)
+ # context: no_log, because subtype already handle this
+ create_context = dict(context, mail_create_nolog=True)
+ task_id = super(task, self).create(cr, uid, vals, context=create_context)
self._store_history(cr, uid, [task_id], context=context)
return task_id
@@ -1197,6 +1199,17 @@ class task(base_stage, osv.osv):
return [task.project_id.message_get_reply_to()[0] if task.project_id else False
for task in self.browse(cr, uid, ids, context=context)]
+ def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
+ """ mail.message document permission rule: can post a new message if can read
+ because of portal document. """
+ if not model_obj:
+ model_obj = self
+ if operation == 'create':
+ model_obj.check_access_rights(cr, uid, 'read')
+ model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
+ else:
+ return super(task, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
+
def message_new(self, cr, uid, msg, custom_values=None, context=None):
""" Override to updates the document according to the email. """
if custom_values is None: custom_values = {}
@@ -1205,7 +1218,7 @@ class task(base_stage, osv.osv):
'planned_hours': 0.0,
}
defaults.update(custom_values)
- return super(task,self).message_new(cr, uid, msg, custom_values=defaults, context=context)
+ return super(task, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
""" Override to update the task according to the email. """
diff --git a/addons/project/report/project_cumulative.xml b/addons/project/report/project_cumulative.xml
index c30c91fe6c0..17e059c8de7 100644
--- a/addons/project/report/project_cumulative.xml
+++ b/addons/project/report/project_cumulative.xml
@@ -6,7 +6,7 @@
<field name="name">project.task.history.cumulative.tree</field>
<field name="model">project.task.history.cumulative</field>
<field name="arch" type="xml">
- <tree string="Tasks's Cumulative Flow">
+ <tree string="Tasks's Cumulative Flow" create="false">
<field name="date"/>
<field name="project_id"/>
<field name="task_id"/>
diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py
index 36c64cbc224..3233e2534af 100644
--- a/addons/project_gtd/wizard/project_gtd_empty.py
+++ b/addons/project_gtd/wizard/project_gtd_empty.py
@@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory):
ids = obj_tb.search(cr, uid, [], context=context)
if not len(ids):
- raise osv.except_osv(_('Error!'), _('No timebox child of this one !'))
+ raise osv.except_osv(_('Error!'), _('No timebox child of this one!'))
tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])])
for task in obj_task.browse(cr, uid, tids, context):
if (task.state in ('cancel','done')) or (task.user_id.id <> uid):
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index a008c670138..8bcac4581c3 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -19,11 +19,12 @@
#
##############################################################################
+from openerp import SUPERUSER_ID
from openerp.addons.base_status.base_stage import base_stage
from openerp.addons.project.project import _TASK_STATE
from openerp.addons.crm import crm
from datetime import datetime
-from openerp.osv import fields,osv
+from openerp.osv import fields, osv, orm
from openerp.tools.translate import _
import binascii
import time
@@ -49,12 +50,12 @@ class project_issue(base_stage, osv.osv):
_track = {
'state': {
- 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new',
+ 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'],
'project_issue.mt_issue_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
'project_issue.mt_issue_started': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open',
},
'stage_id': {
- 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'done', 'open'],
+ 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'done', 'open'],
},
'kanban_state': {
'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj['kanban_state'] == 'blocked',
@@ -69,7 +70,9 @@ class project_issue(base_stage, osv.osv):
if vals.get('project_id'):
ctx['default_project_id'] = vals['project_id']
vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
- return super(project_issue, self).create(cr, uid, vals, context=context)
+ # context: no_log, because subtype already handle this
+ create_context = dict(context, mail_create_nolog=True)
+ return super(project_issue, self).create(cr, uid, vals, context=create_context)
def _get_default_project_id(self, cr, uid, context=None):
""" Gives default project by checking if present in the context """
@@ -492,13 +495,27 @@ class project_issue(base_stage, osv.osv):
return [issue.project_id.message_get_reply_to()[0] if issue.project_id else False
for issue in self.browse(cr, uid, ids, context=context)]
+ def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
+ """ mail.message document permission rule: can post a new message if can read
+ because of portal document. """
+ if not model_obj:
+ model_obj = self
+ if operation == 'create':
+ model_obj.check_access_rights(cr, uid, 'read')
+ model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
+ else:
+ return super(project_issue, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
+
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
recipients = super(project_issue, self).message_get_suggested_recipients(cr, uid, ids, context=context)
- for issue in self.browse(cr, uid, ids, context=context):
- if issue.email_from:
- self._message_add_suggested_recipient(cr, uid, recipients, issue, email=issue.email_from, reason=_('Customer Email'))
- elif issue.partner_id:
- self._message_add_suggested_recipient(cr, uid, recipients, issue, partner=issue.partner_id, reason=_('Customer'))
+ try:
+ for issue in self.browse(cr, uid, ids, context=context):
+ if issue.partner_id:
+ self._message_add_suggested_recipient(cr, uid, recipients, issue, partner=issue.partner_id, reason=_('Customer'))
+ elif issue.email_from:
+ self._message_add_suggested_recipient(cr, uid, recipients, issue, email=issue.email_from, reason=_('Customer Email'))
+ except (osv.except_osv, orm.except_orm): # no read access rights -> just ignore suggested recipients because this imply modifying followers
+ pass
return recipients
def message_new(self, cr, uid, msg, custom_values=None, context=None):
@@ -560,13 +577,10 @@ class project_issue(base_stage, osv.osv):
"""
if context is None:
context = {}
-
res = super(project_issue, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs)
-
if thread_id:
- self.write(cr, uid, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context)
-
- return res
+ self.write(cr, SUPERUSER_ID, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context)
+ return res
class project(osv.Model):
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index f15355e9cc8..46caba0021e 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -68,15 +68,16 @@
<label for="categ_ids" class="oe_edit_only"/>
<field name="categ_ids" widget="many2many_tags"/>
<group>
- <group groups="base.group_user">
+ <group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'project.group_project_user']}"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<field name="email_from"/>
- <label for="project_id" groups="base.group_user"/>
- <div groups="base.group_user">
+ <label for="project_id"/>
+ <div>
<field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
- <button name="case_escalate" string="⇒ Escalate" type="object" states="draft,open,pending" class="oe_link"/>
+ <button name="case_escalate" string="⇒ Escalate" type="object" states="draft,open,pending" class="oe_link"
+ groups="base.group_user"/>
</div>
</group>
<group>
@@ -150,8 +151,8 @@
<field name="id"/>
<filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
- <filter string="New" icon="terp-document-new" domain="[('state','=','draft')]" help="New Issues"/>
- <filter string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-check"/>
+ <filter name="filter_new" string="New" icon="terp-document-new" domain="[('state','=','draft')]" help="New Issues"/>
+ <filter name="filter_open" string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-check"/>
<separator/>
<filter string="Unassigned Issues" domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-"/>
<separator/>
@@ -160,13 +161,13 @@
<field name="categ_ids"/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<group expand="0" string="Group By..." >
- <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
- <filter string="Contact" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
- <filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
- <filter string="Version" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'version_id'}"/>
- <filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
- <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
- <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
+ <filter string="Responsible" name="group_user_id" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+ <filter string="Contact" name="group_partner_id" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+ <filter string="Project" name="group_project_id" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
+ <filter string="Version" name="group_version" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'version_id'}"/>
+ <filter string="Priority" name="group_priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
+ <filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
+ <filter string="Month" name="group_create_date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
</group>
</search>
</field>
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index fb245a0510a..4911cac8f25 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -19,7 +19,8 @@
</field>
<xpath expr="//notebook/page[@string='Extra Info']" position="before">
<page string="Worklogs">
- <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
+ <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}"
+ groups="base.group_user">
<tree editable="top" string="Timesheets">
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index 4066b6133c1..e61af0c6c32 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -120,7 +120,8 @@
</field>
<xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
<a t-if="record.use_phases.raw_value"
- name="%(act_project_phases)d" type="action">
+ name="%(act_project_phases)d" type="action"
+ groups="base.group_user">
<span t-if="record.phase_count.raw_value gt 1"><field name="phase_count"/> Phases</span>
<span t-if="record.phase_count.raw_value lt 2"><field name="phase_count"/> Phase</span>
</a>
@@ -322,7 +323,7 @@
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<field name="user_id" position="before">
- <field name="phase_id"/>
+ <field name="phase_id" domain="[]"/>
</field>
</field>
</record>
diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml
index e2195c6f61b..c25cd264538 100644
--- a/addons/project_mrp/process/project_mrp_process.xml
+++ b/addons/project_mrp/process/project_mrp_process.xml
@@ -50,24 +50,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;if product type is 'service' then it creates the task.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_procuretasktask0"/>
- <field model="process.node" name="source_node_id" ref="sale_stock.process_node_saleprocurement0"/>
+ <field name="target_node_id" ref="process_node_procuretasktask0"/>
+ <field name="source_node_id" ref="sale_stock.process_node_saleprocurement0"/>
</record>
<record id="process_transition_createtask0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Product type is service, then its creates the task.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="project.process_node_drafttask0"/>
- <field model="process.node" name="source_node_id" ref="process_node_saleordertask0"/>
+ <field name="target_node_id" ref="project.process_node_drafttask0"/>
+ <field name="source_node_id" ref="process_node_saleordertask0"/>
</record>
<record id="process_transition_ordertask0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Order Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If procurement method is Make to order and supply method is produce&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_mrptask0"/>
- <field model="process.node" name="source_node_id" ref="procurement.process_node_serviceonorder0"/>
+ <field name="target_node_id" ref="process_node_mrptask0"/>
+ <field name="source_node_id" ref="procurement.process_node_serviceonorder0"/>
</record>
</data>
diff --git a/addons/project_timesheet/__openerp__.py b/addons/project_timesheet/__openerp__.py
index 0651d7b9ce4..4dff3695c5c 100644
--- a/addons/project_timesheet/__openerp__.py
+++ b/addons/project_timesheet/__openerp__.py
@@ -34,7 +34,7 @@ with the effect of creating, editing and deleting either ways.
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/invoice_task_work.jpeg', 'images/my_timesheet.jpeg', 'images/working_hour.jpeg'],
- 'depends': ['project', 'hr_timesheet_sheet', 'hr_timesheet_invoice', 'account_analytic_analysis'],
+ 'depends': ['resource', 'project', 'hr_timesheet_sheet', 'hr_timesheet_invoice', 'account_analytic_analysis'],
'data': [
'security/ir.model.access.csv',
'security/project_timesheet_security.xml',
diff --git a/addons/project_timesheet/process/project_timesheet_process.xml b/addons/project_timesheet/process/project_timesheet_process.xml
index 1bff69b603e..17dd35dcad2 100644
--- a/addons/project_timesheet/process/project_timesheet_process.xml
+++ b/addons/project_timesheet/process/project_timesheet_process.xml
@@ -46,24 +46,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Fill Timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Task summary is comes into the timesheet line&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_timesheettask0"/>
- <field model="process.node" name="source_node_id" ref="project.process_node_opentask0"/>
+ <field name="target_node_id" ref="process_node_timesheettask0"/>
+ <field name="source_node_id" ref="project.process_node_opentask0"/>
</record>
<record id="process_transition_taskencoding0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task encoding&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Encode how much time u spent on your task&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="hr_timesheet_sheet.process_node_timesheet0"/>
- <field model="process.node" name="source_node_id" ref="process_node_taskwork0"/>
+ <field name="target_node_id" ref="hr_timesheet_sheet.process_node_timesheet0"/>
+ <field name="source_node_id" ref="process_node_taskwork0"/>
</record>
<record id="process_transition_taskinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After task is completed, Create its invoice.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_triggerinvoice0"/>
- <field model="process.node" name="source_node_id" ref="project.process_node_donetask0"/>
+ <field name="target_node_id" ref="process_node_triggerinvoice0"/>
+ <field name="source_node_id" ref="project.process_node_donetask0"/>
</record>
</data>
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index ffee600f5a7..767cb4893b5 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -79,22 +79,22 @@ class project_work(osv.osv):
emp_id = emp_obj.search(cr, uid, [('user_id', '=', user_id)])
if not emp_id:
user_name = self.pool.get('res.users').read(cr, uid, [user_id], ['name'])[0]['name']
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define employee for user "%s". You must create one.')% (user_name,))
emp = emp_obj.browse(cr, uid, emp_id[0])
if not emp.product_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define product and product category property account on the related employee.\nFill in the HR Settings tab of the employee form.'))
if not emp.journal_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define journal on the related employee.\nFill in the timesheet tab of the employee form.'))
acc_id = emp.product_id.property_account_expense.id
if not acc_id:
acc_id = emp.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
- raise osv.except_osv(_('Bad Configuration !'),
+ raise osv.except_osv(_('Bad Configuration!'),
_('Please define product and product category property account on the related employee.\nFill in the timesheet tab of the employee form.'))
res['product_id'] = emp.product_id.id
@@ -286,7 +286,7 @@ class account_analytic_line(osv.osv):
st = acc.to_invoice.id
res['value']['to_invoice'] = st or False
if acc.state == 'close' or acc.state == 'cancelled':
- raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
+ raise osv.except_osv(_('Invalid Analytic Account!'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
return res
diff --git a/addons/purchase/html/index.html b/addons/purchase/html/index.html
index 9134c1ab9d2..67b122ac557 100644
--- a/addons/purchase/html/index.html
+++ b/addons/purchase/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=purchase">
<img src="purchase_po.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml
index c6b6805351a..7feb47690e0 100644
--- a/addons/purchase/process/purchase_process.xml
+++ b/addons/purchase/process/purchase_process.xml
@@ -154,16 +154,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From a Pick list&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A Pick list generates a supplier invoice. Depending on the Invoicing control of the purchase order, the invoice is based on received or on ordered quantities.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="account.process_node_supplierdraftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_productrecept0"/>
+ <field name="target_node_id" ref="account.process_node_supplierdraftinvoices0"/>
+ <field name="source_node_id" ref="process_node_productrecept0"/>
</record>
<record id="process_transition_confirmingpurchaseorder0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The buyer has to approve the RFQ before being sent to the supplier. The RFQ becomes a confirmed Purchase Order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_confirmpurchaseorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_draftpurchaseorder0"/>
+ <field name="target_node_id" ref="process_node_confirmpurchaseorder0"/>
+ <field name="source_node_id" ref="process_node_draftpurchaseorder0"/>
<field eval="[(6,0,[ref('purchase.trans_draft_confirmed')])]" name="transition_ids"/>
</record>
@@ -171,24 +171,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case there is no supplier for this product, the buyer can fill the form manually and confirm it. The RFQ becomes a confirmed Purchase Order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_confirmpurchaseorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_draftpurchaseorder1"/>
+ <field name="target_node_id" ref="process_node_confirmpurchaseorder0"/>
+ <field name="source_node_id" ref="process_node_draftpurchaseorder1"/>
</record>
<record id="process_transition_approvingpurchaseorder0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approbation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The supplier approves the Purchase Order.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_approvepurchaseorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_confirmpurchaseorder0" />
+ <field name="target_node_id" ref="process_node_approvepurchaseorder0"/>
+ <field name="source_node_id" ref="process_node_confirmpurchaseorder0" />
</record>
<record id="process_transition_invoicefrompurchase0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created automatically if the Invoice control of the purchase order is 'On order'. The invoice can also be generated manually by the accountant (Invoice control = Manual).&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoicecontrol0"/>
- <field model="process.node" name="source_node_id" ref="process_node_approvepurchaseorder0"/>
+ <field name="target_node_id" ref="process_node_invoicecontrol0"/>
+ <field name="source_node_id" ref="process_node_approvepurchaseorder0"/>
<field eval="[(6,0,[ref('purchase.trans_router_invoice')])]" name="transition_ids"/>
</record>
@@ -196,32 +196,32 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Pick list generated&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A pick list is generated to track the incoming products.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_packinglist0"/>
- <field model="process.node" name="source_node_id" ref="process_node_approvepurchaseorder0"/>
+ <field name="target_node_id" ref="process_node_packinglist0"/>
+ <field name="source_node_id" ref="process_node_approvepurchaseorder0"/>
</record>
<record id="process_transition_invoicefrompackinglist0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created automatically if the Invoice control of the purchase order is 'On picking'. The invoice can also be generated manually by the accountant (Invoice control = Manual).&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoiceafterpacking0"/>
- <field model="process.node" name="source_node_id" ref="process_node_packinglist0"/>
+ <field name="target_node_id" ref="process_node_invoiceafterpacking0"/>
+ <field name="source_node_id" ref="process_node_packinglist0"/>
</record>
<record id="process_transition_purchaseinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From a purchase order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A purchase order generates a supplier invoice, as soon as it is confirmed by the buyer. Depending on the Invoicing control of the purchase order, the invoice is based on received or on ordered quantities.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="account.process_node_supplierdraftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_purchaseorder0"/>
+ <field name="target_node_id" ref="account.process_node_supplierdraftinvoices0"/>
+ <field name="source_node_id" ref="process_node_purchaseorder0"/>
</record>
<record id="process_transition_packinginvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From a Pick list&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A Pick list generates an invoice. Depending on the Invoicing control of the sales order, the invoice is based on delivered or on ordered quantities.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="account.process_node_draftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_packinginvoice0"/>
+ <field name="target_node_id" ref="account.process_node_draftinvoices0"/>
+ <field name="source_node_id" ref="process_node_packinginvoice0"/>
</record>
<!--
diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml
index 11936db0bed..68a6cd12733 100644
--- a/addons/purchase/purchase_workflow.xml
+++ b/addons/purchase/purchase_workflow.xml
@@ -57,7 +57,7 @@
<field name="wkf_id" ref="purchase_order"/>
<field name="name">invoice</field>
<field name="kind">subflow</field>
- <field name="subflow_id" search="[('osv','=','account.invoice')]" type="int"/>
+ <field name="subflow_id" search="[('osv','=','account.invoice')]"/>
<field name="action">action_invoice_create()</field>
</record>
<record id="act_invoice_done" model="workflow.activity">
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index 1794bea19c4..6eb1b2167ee 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -94,38 +94,16 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
- <paraStyle name="Standard" fontName="Helvetica"/>
- <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Contents" fontName="Helvetica"/>
- <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
- <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Index" fontName="Helvetica"/>
- <paraStyle name="Footer" fontName="Helvetica"/>
- <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
- <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@@ -136,22 +114,22 @@
<blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr>
<td>
- <para style="terp_tblheader_General">Description</para>
+ <para style="terp_tblheader_General"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_General">Taxes</para>
+ <para style="terp_tblheader_General"><b>Taxes</b></para>
</td>
<td>
- <para style="terp_tblheader_General">Date Req.</para>
+ <para style="terp_tblheader_General"><b>Date Req.</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Qty</para>
+ <para style="terp_tblheader_General_Right"><b>Qty</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Unit Price</para>
+ <para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Net Price</para>
+ <para style="terp_tblheader_General_Right"><b>Net Price</b></para>
</td>
</tr>
</blockTable>
@@ -165,7 +143,7 @@
<blockTable colWidths="253.0" style="Tableau2">
<tr>
<td>
- <para style="terp_default_Bold_9">Shipping address :</para>
+ <para style="terp_default_Bold_9"><b>Shipping address :</b></para>
<para style="terp_default_9">[[ (o.dest_address_id and o.dest_address_id.name) or (o.warehouse_id and o.warehouse_id.name) or '']]</para>
<para style="terp_default_9">[[ (o.dest_address_id and display_address(o.dest_address_id)) or (o.warehouse_id and display_address(o.warehouse_id.partner_id)) or '']]</para>
</td>
@@ -195,24 +173,24 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
- <para style="terp_header">[[ o.state=='draft' and removeParentNode('para') ]] Purchase Order Confirmation N° [[ o.name ]]</para>
- <para style="terp_header">[[ o.state&lt;&gt;'draft' and removeParentNode('para') ]] Request for Quotation N° [[ o.name ]]</para>
+ <para style="terp_header"><b>[[ o.state=='draft' and removeParentNode('para') ]] Purchase Order Confirmation N° [[ o.name ]]</b></para>
+ <para style="terp_header"><b>[[ o.state&lt;&gt;'draft' and removeParentNode('para') ]] Request for Quotation N° [[ o.name ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="136.0,132.0,133.0,133.0" style="Header_Order_Reference_Tbl">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Our Order Reference</para>
+ <para style="terp_tblheader_General_Centre"><b>Our Order Reference</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Your Order Reference</para>
+ <para style="terp_tblheader_General_Centre"><b>Your Order Reference</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Order Date</para>
+ <para style="terp_tblheader_General_Centre"><b>Order Date</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Validated By</para>
+ <para style="terp_tblheader_General_Centre"><b>Validated By</b></para>
</td>
</tr>
</blockTable>
@@ -238,22 +216,22 @@
<blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr>
<td>
- <para style="terp_tblheader_General">Description</para>
+ <para style="terp_tblheader_General"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_General">Taxes</para>
+ <para style="terp_tblheader_General"><b>Taxes</b></para>
</td>
<td>
- <para style="terp_tblheader_General">Date Req.</para>
+ <para style="terp_tblheader_General"><b>Date Req.</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Qty</para>
+ <para style="terp_tblheader_General_Right"><b>Qty</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Unit Price</para>
+ <para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Right">Net Price</para>
+ <para style="terp_tblheader_General_Right"><b>Net Price</b></para>
</td>
</tr>
</blockTable>
@@ -316,10 +294,10 @@
</para>
</td>
<td>
- <para style="terp_default_Bold_9">Total :</para>
+ <para style="terp_default_Bold_9"><b>Total :</b></para>
</td>
<td>
- <para style="terp_default_Bold_9_Right">[[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]</para>
+ <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]</b></para>
</td>
</tr>
</blockTable>
diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml
index 8e5e73ee588..b7b4776d635 100644
--- a/addons/purchase/report/request_quotation.rml
+++ b/addons/purchase/report/request_quotation.rml
@@ -36,40 +36,17 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
- <paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="Standard" fontName="Helvetica"/>
- <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Contents" fontName="Helvetica"/>
- <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
- <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Index" fontName="Helvetica"/>
- <paraStyle name="Footer" fontName="Helvetica"/>
- <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
- <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_8_italic" rightIndent="0.0" leftIndent="20.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="Space bet user and signature" fontName="Helvetica" fontSize="4.0" leading="5" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="P1" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Standard"/>
+ <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="Space bet user and signature" fontSize="4.0" leading="5" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@@ -84,7 +61,7 @@
<blockTable colWidths="250.0" style="Tableau2">
<tr>
<td>
- <para style="terp_default_Bold_9">Expected Delivery address:</para>
+ <para style="terp_default_Bold_9"><b>Expected Delivery address:</b></para>
<para style="terp_default_9">[[ (order.dest_address_id and order.dest_address_id.name) or (order.warehouse_id and order.warehouse_id.name) or '']]</para>
<para style="P1">[[ order.dest_address_id and display_address(order.dest_address_id) ]]</para>
</td>
@@ -114,20 +91,20 @@
<para style="Standard">
<font color="white"> </font>
</para>
- <para style="terp_header">Request for Quotation : [[order.name]]</para>
+ <para style="terp_header"><b>Request for Quotation : [[order.name]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
<tr>
<td>
- <para style="terp_tblheader_Details">Description</para>
+ <para style="terp_tblheader_Details"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Expected Date</para>
+ <para style="terp_tblheader_Details_Centre"><b>Expected Date</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Qty</para>
+ <para style="terp_tblheader_Details_Centre"><b>Qty</b></para>
</td>
</tr>
</blockTable>
diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py
index 82061daa758..5e65afaae25 100644
--- a/addons/report_webkit/webkit_report.py
+++ b/addons/report_webkit/webkit_report.py
@@ -280,7 +280,7 @@ class WebKitParser(report_sxw):
template = False
if report_xml.report_file :
- path = get_module_resource(*report_xml.report_file.split(os.path.sep))
+ path = get_module_resource(*report_xml.report_file.split('/'))
if path and os.path.exists(path) :
template = file(path).read()
if not template and report_xml.report_webkit_data :
diff --git a/addons/sale/html/index.html b/addons/sale/html/index.html
index e10c3abb9a0..1eb6215db2f 100644
--- a/addons/sale/html/index.html
+++ b/addons/sale/html/index.html
@@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=sale">
<img src="sale_invoice.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -293,4 +292,5 @@ reports that anyone can create and share.
</div>
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po
index 405ac210af5..7ca635be446 100644
--- a/addons/sale/i18n/ru.po
+++ b/addons/sale/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2012-12-28 14:12+0000\n"
+"PO-Revision-Date: 2013-06-06 11:38+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:22+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: sale
#: model:res.groups,name:sale.group_analytic_accounting
@@ -89,6 +89,8 @@ msgid ""
"${(object.name or '').replace('/','_')}_${object.state == 'draft' and "
"'draft' or ''}"
msgstr ""
+"${(object.name or '').replace('/','_')}_${object.state == 'draft' and "
+"'draft' or ''}"
#. module: sale
#: view:sale.order.line:0
@@ -189,7 +191,7 @@ msgstr "Счет аналитики"
#: field:sale.config.settings,module_sale_journal:0
msgid "Allow batch invoicing of delivery orders through journals"
msgstr ""
-"Разрешить групповое выставление счета из заказов на доставку через журналы"
+"Разрешить групповое выставление счетов из заказов доставки через журналы"
#. module: sale
#: field:sale.order.line,price_subtotal:0
@@ -221,7 +223,7 @@ msgstr "Особенности склада"
#. module: sale
#: field:sale.config.settings,time_unit:0
msgid "The default working time unit for services is"
-msgstr ""
+msgstr "Единица измерения времени для услуг"
#. module: sale
#: field:sale.order.line,product_uom:0
@@ -558,6 +560,7 @@ msgstr "Подготовить счета основанные на распис
#, python-format
msgid "You cannot cancel a sales order line that has already been invoiced."
msgstr ""
+"Нельзя отменить позиции заказа продажи на которые был выставлен счет."
#. module: sale
#: view:account.invoice.report:0
@@ -1550,7 +1553,7 @@ msgstr "Искать позиции без счетов"
#. module: sale
#: model:ir.model,name:sale.model_account_config_settings
msgid "account.config.settings"
-msgstr ""
+msgstr "account.config.settings"
#. module: sale
#: sql_constraint:sale.order:0
@@ -1876,7 +1879,7 @@ msgstr ""
#. module: sale
#: view:res.partner:0
msgid "sale.group_delivery_invoice_address"
-msgstr ""
+msgstr "sale.group_delivery_invoice_address"
#. module: sale
#: code:addons/sale/sale.py:781
diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml
index 706d42913de..b3034cafa28 100644
--- a/addons/sale/process/sale_process.xml
+++ b/addons/sale/process/sale_process.xml
@@ -70,8 +70,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm Quotation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The salesman confirms the quotation. The state of the sales order becomes 'In progress' or 'Manual in progress'.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_saleorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_quotation0"/>
+ <field name="target_node_id" ref="process_node_saleorder0"/>
+ <field name="source_node_id" ref="process_node_quotation0"/>
<field eval="[(6,0,[ref('sale.trans_draft_router')])]" name="transition_ids"/>
</record>
@@ -80,8 +80,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Salesman creates an invoice manually, if the sales order shipping policy is 'Shipping and Manual in Progress'. The invoice is created automatically if the shipping policy is 'Payment before Delivery'.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoice0"/>
- <field model="process.node" name="source_node_id" ref="process_node_saleorder0"/>
+ <field name="target_node_id" ref="process_node_invoice0"/>
+ <field name="source_node_id" ref="process_node_saleorder0"/>
<field eval="[(6,0,[ref('sale.trans_wait_invoice_invoice_manual')])]" name="transition_ids"/>
</record>
@@ -90,8 +90,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From a sales order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the Invoicing control of the sales order, the invoice can be based on delivered or on ordered quantities. Thus, a sales order can generates an invoice or a delivery order as soon as it is confirmed by the salesman.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="account.process_node_draftinvoices0"/>
- <field model="process.node" name="source_node_id" ref="process_node_order0"/>
+ <field name="target_node_id" ref="account.process_node_draftinvoices0"/>
+ <field name="source_node_id" ref="process_node_order0"/>
</record>
<!--
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 130220535f9..3bddf81ade8 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -89,40 +89,19 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
- <paraStyle name="Standard" fontName="Helvetica"/>
- <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
- <paraStyle name="Table Contents" fontName="Helvetica"/>
- <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
- <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Index" fontName="Helvetica"/>
- <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="Footer" fontName="Helvetica"/>
- <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
- <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
- <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Italic" rightIndent="0.0" leftIndent="20.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
- <paraStyle name="terp_default_Centre_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_header" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_1" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+ <paraStyle name="terp_default_Right_9_Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@@ -133,22 +112,22 @@
<blockTable colWidths="181.0,70.0,80.0,70.0,50.0,85.0" repeatRows="1" style="Table4">
<tr>
<td>
- <para style="terp_tblheader_Details">Description</para>
+ <para style="terp_tblheader_Details"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Tax</para>
+ <para style="terp_tblheader_Details_Centre"><b>Tax</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Quantity</para>
+ <para style="terp_tblheader_Details_Right"><b>Quantity</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Unit Price</para>
+ <para style="terp_tblheader_Details_Right"><b>Unit Price</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Disc.(%)</para>
+ <para style="terp_tblheader_Details_Centre"><b>Disc.(%)</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Price</para>
+ <para style="terp_tblheader_Details_Right"><b>Price</b></para>
</td>
</tr>
</blockTable>
@@ -162,13 +141,13 @@
<blockTable colWidths="265.0,51.0,225.0" style="Table1">
<tr>
<td>
- <para style="terp_default_Bold_9">Shipping address :</para>
+ <para style="terp_default_Bold_9"><b>Shipping address :</b></para>
<para style="terp_default_9">[[ (o.partner_shipping_id and o.partner_id.title and o.partner_shipping_id.title.name) or '' ]] [[ (o.partner_shipping_id and o.partner_shipping_id.name) or '' ]]</para>
<para style="terp_default_9">[[ o.partner_shipping_id and display_address(o.partner_shipping_id) ]]</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
- <para style="terp_default_Bold_9">Invoice address :</para>
+ <para style="terp_default_Bold_9"><b>Invoice address :</b></para>
<para style="terp_default_9">[[ (o.partner_invoice_id and o.partner_invoice_id.title and o.partner_invoice_id.title.name) or '' ]] [[ (o.partner_invoice_id and o.partner_invoice_id.name) or '' ]]</para>
<para style="terp_default_9">[[ o.partner_invoice_id and display_address(o.partner_invoice_id) ]] </para>
</td>
@@ -195,25 +174,25 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
- <para style="terp_header">[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation N° [[ o.name ]]</para>
- <para style="terp_header">[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Order N° [[ o.name ]]</para>
+ <para style="terp_header"><b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation N° [[ o.name ]]</b></para>
+ <para style="terp_header"><b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Order N° [[ o.name ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="132.0,134.0,135.0,135.0" style="Table2">
<tr>
<td>
- <para style="terp_tblheader_General_Centre">Your Reference </para>
+ <para style="terp_tblheader_General_Centre"><b>Your Reference </b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Date Ordered</para>
- <para style="terp_tblheader_General_Centre">[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation Date</para>
+ <para style="terp_tblheader_General_Centre"><b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Date Ordered</b></para>
+ <para style="terp_tblheader_General_Centre"><b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation Date</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Salesperson</para>
+ <para style="terp_tblheader_General_Centre"><b>Salesperson</b></para>
</td>
<td>
- <para style="terp_tblheader_General_Centre">Payment Term</para>
+ <para style="terp_tblheader_General_Centre"><b>Payment Term</b></para>
</td>
</tr>
</blockTable>
@@ -239,22 +218,22 @@
<blockTable colWidths="181.0,70.0,80.0,70.0,50.0,85.0" repeatRows="1" style="Table4">
<tr>
<td>
- <para style="terp_tblheader_Details">Description</para>
+ <para style="terp_tblheader_Details"><b>Description</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">Tax</para>
+ <para style="terp_tblheader_Details_Centre"><b>Tax</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Quantity</para>
+ <para style="terp_tblheader_Details_Right"><b>Quantity</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Unit Price</para>
+ <para style="terp_tblheader_Details_Right"><b>Unit Price</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Centre">[[not show_discount(user.id) and removeParentNode('para') ]]Disc.(%)</para>
+ <para style="terp_tblheader_Details_Centre"><b>[[not show_discount(user.id) and removeParentNode('para') ]]Disc.(%)</b></para>
</td>
<td>
- <para style="terp_tblheader_Details_Right">Price</para>
+ <para style="terp_tblheader_Details_Right"><b>Price</b></para>
</td>
</tr>
</blockTable>
@@ -317,10 +296,10 @@
</para>
</td>
<td>
- <para style="terp_default_Bold_9">Total :</para>
+ <para style="terp_default_Bold_9"><b>Total :</b></para>
</td>
<td>
- <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
+ <para style="terp_default_Right_9_Bold"><b>[[ formatLang(o.amount_total, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</b></para>
</td>
</tr>
</blockTable>
diff --git a/addons/sale/res_partner.py b/addons/sale/res_partner.py
index 1b37b609179..8201e147e34 100644
--- a/addons/sale/res_partner.py
+++ b/addons/sale/res_partner.py
@@ -41,7 +41,7 @@ class res_partner(osv.osv):
default.update({'sale_order_ids': []})
- super(res_partner, self).copy(cr, uid, record_id, default, context)
+ return super(res_partner, self).copy(cr, uid, record_id, default, context)
_columns = {
'sale_order_count': fields.function(_sale_order_count, string='# of Sales Order', type='integer'),
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 210e4dd3be6..f34137f8231 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -273,7 +273,7 @@ class sale_order(osv.osv):
if s['state'] in ['draft', 'cancel']:
unlink_ids.append(s['id'])
else:
- raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before !'))
+ raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before!'))
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
@@ -695,7 +695,7 @@ class sale_order_line(osv.osv):
_description = 'Sales Order Line'
_columns = {
'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'name': fields.text('Description', required=True, select=True, readonly=True, states={'draft': [('readonly', False)]}),
+ 'name': fields.text('Description', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sales order lines."),
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
@@ -870,7 +870,7 @@ class sale_order_line(osv.osv):
context = context or {}
lang = lang or context.get('lang',False)
if not partner_id:
- raise osv.except_osv(_('No Customer Defined !'), _('Before choosing a product,\n select a customer in the sales form.'))
+ raise osv.except_osv(_('No Customer Defined!'), _('Before choosing a product,\n select a customer in the sales form.'))
warning = {}
product_uom_obj = self.pool.get('product.uom')
partner_obj = self.pool.get('res.partner')
diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml
index 428b586ffa8..eb937199aba 100644
--- a/addons/sale/sale_demo.xml
+++ b/addons/sale/sale_demo.xml
@@ -288,6 +288,8 @@
</record>
<!-- Confirm some Sale Orders-->
+ <workflow action="order_confirm" model="sale.order" ref="sale_order_4"/>
+
<workflow action="order_confirm" model="sale.order" ref="sale_order_7"/>
<record id="message_sale_1" model="mail.message">
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e24a6e45fe0..d8d038eb002 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -307,7 +307,7 @@
<filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
<filter icon="terp-dolar_ok!" string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
<separator/>
- <filter string="My Sales Orders" domain="[('user_id','=',uid)]" help="My Sales Orders" icon="terp-personal" name="my_sale_orders_filter"/>
+ <filter string="My" domain="[('user_id','=',uid)]" help="My Sales Orders" icon="terp-personal" name="my_sale_orders_filter"/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="user_id"/>
<field name="project_id"/>
diff --git a/addons/sale_analytic_plans/i18n/ru.po b/addons/sale_analytic_plans/i18n/ru.po
index 90d9eb5c3b9..8995b7b45c0 100644
--- a/addons/sale_analytic_plans/i18n/ru.po
+++ b/addons/sale_analytic_plans/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-25 22:14+0000\n"
+"PO-Revision-Date: 2013-06-03 08:05+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:32+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: sale_analytic_plans
#: field:sale.order.line,analytics_id:0
@@ -24,7 +24,7 @@ msgstr "Разнесение аналитики"
#. module: sale_analytic_plans
#: model:ir.model,name:sale_analytic_plans.model_sale_order
msgid "Sales Order"
-msgstr ""
+msgstr "Заказ продаж"
#. module: sale_analytic_plans
#: model:ir.model,name:sale_analytic_plans.model_sale_order_line
diff --git a/addons/sale_crm/__openerp__.py b/addons/sale_crm/__openerp__.py
index 6591589342e..7db1aa1eff0 100644
--- a/addons/sale_crm/__openerp__.py
+++ b/addons/sale_crm/__openerp__.py
@@ -47,7 +47,11 @@ modules.
'security/ir.model.access.csv',
'report/sale_crm_account_invoice_report_view.xml',
],
- 'demo': [],
+ 'js': [
+ 'static/lib/justgage.js',
+ 'static/src/js/sale_crm.js',
+ ],
+ 'demo': ['sale_crm_demo.xml'],
'test': ['test/sale_crm.yml'],
'installable': True,
'auto_install': True,
diff --git a/addons/sale_crm/i18n/ru.po b/addons/sale_crm/i18n/ru.po
index 8ae90e42303..f6266edf8ca 100644
--- a/addons/sale_crm/i18n/ru.po
+++ b/addons/sale_crm/i18n/ru.po
@@ -7,20 +7,20 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-03-23 13:50+0000\n"
+"PO-Revision-Date: 2013-06-03 08:05+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:10+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:90
#, python-format
msgid "Insufficient Data!"
-msgstr ""
+msgstr "Недостаточно данных!"
#. module: sale_crm
#: view:crm.lead:0
@@ -31,12 +31,12 @@ msgstr "Преобразовать в предложение"
#. module: sale_crm
#: model:ir.model,name:sale_crm.model_account_invoice_report
msgid "Invoices Statistics"
-msgstr ""
+msgstr "Статистика по счетам"
#. module: sale_crm
#: field:crm.make.sale,close:0
msgid "Mark Won"
-msgstr ""
+msgstr "Отметить \"Выиграна\""
#. module: sale_crm
#: field:res.users,default_section_id:0
@@ -51,23 +51,23 @@ msgstr "Мои отделы продаж"
#. module: sale_crm
#: model:ir.model,name:sale_crm.model_res_users
msgid "Users"
-msgstr ""
+msgstr "Пользователи"
#. module: sale_crm
#: help:crm.make.sale,close:0
msgid ""
"Check this to close the opportunity after having created the sales order."
-msgstr ""
+msgstr "Отметьте, для закрытия предложения после создания заказа продажи."
#. module: sale_crm
#: model:mail.message.subtype,name:sale_crm.mt_salesteam_order_sent
msgid "Quotation Send"
-msgstr ""
+msgstr "Отправить предложение"
#. module: sale_crm
#: field:sale.order,categ_ids:0
msgid "Categories"
-msgstr ""
+msgstr "Категории"
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:124
@@ -94,7 +94,7 @@ msgstr "Продать"
#. module: sale_crm
#: model:ir.model,name:sale_crm.model_account_invoice
msgid "Invoice"
-msgstr ""
+msgstr "Счет"
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:93
@@ -106,7 +106,7 @@ msgstr "Предложение: %s"
#: code:addons/sale_crm/wizard/crm_make_sale.py:110
#, python-format
msgid "Opportunity has been <b>converted</b> to the quotation <em>%s</em>."
-msgstr ""
+msgstr "Предложение <b>преобразовано</b> в заявку <em>%s</em>."
#. module: sale_crm
#: field:crm.make.sale,shop_id:0
@@ -117,12 +117,12 @@ msgstr "Магазин"
#: code:addons/sale_crm/wizard/crm_make_sale.py:90
#, python-format
msgid "No addresse(s) defined for this customer."
-msgstr ""
+msgstr "Не задан адрес для этого заказчика"
#. module: sale_crm
#: model:mail.message.subtype,name:sale_crm.mt_salesteam_order_confirmed
msgid "Sales Order Confirmed"
-msgstr ""
+msgstr "Заказ продаж подтвержден"
#. module: sale_crm
#: view:account.invoice:0
@@ -136,7 +136,7 @@ msgstr "Отдел продаж"
#. module: sale_crm
#: view:crm.lead:0
msgid "Create Quotation"
-msgstr ""
+msgstr "Создать заявку"
#. module: sale_crm
#: model:ir.actions.act_window,name:sale_crm.action_crm_make_sale
@@ -156,7 +156,7 @@ msgstr "Заказ продаж"
#. module: sale_crm
#: view:crm.make.sale:0
msgid "or"
-msgstr ""
+msgstr "или"
#~ msgid "Create"
#~ msgstr "Создать"
diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml
index 721508a2ba5..21297e12dbd 100644
--- a/addons/sale_crm/process/sale_crm_process.xml
+++ b/addons/sale_crm/process/sale_crm_process.xml
@@ -42,8 +42,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Crm opportunity quotation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Opportunity goes into the quotation&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="sale.process_node_quotation0"/>
- <field model="process.node" name="source_node_id" ref="process_node_crmopportunity0"/>
+ <field name="target_node_id" ref="sale.process_node_quotation0"/>
+ <field name="source_node_id" ref="process_node_crmopportunity0"/>
</record>
@@ -51,24 +51,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Quotation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Opportunity convert into quotation&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_crmquotation0"/>
- <field model="process.node" name="source_node_id" ref="crm.process_node_opportunities0"/>
+ <field name="target_node_id" ref="process_node_crmquotation0"/>
+ <field name="source_node_id" ref="crm.process_node_opportunities0"/>
</record>
<record id="process_transition_opportunitypricelist0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Pricelist&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Opporunity convert to the Pricelist&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_contractpricelist0"/>
- <field model="process.node" name="source_node_id" ref="crm.process_node_opportunities0"/>
+ <field name="target_node_id" ref="process_node_contractpricelist0"/>
+ <field name="source_node_id" ref="crm.process_node_opportunities0"/>
</record>
<record id="process_transition_opportunityanalytic0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Analytic&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic Account&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_contractanalytic0"/>
- <field model="process.node" name="source_node_id" ref="crm.process_node_opportunities0"/>
+ <field name="target_node_id" ref="process_node_contractanalytic0"/>
+ <field name="source_node_id" ref="crm.process_node_opportunities0"/>
</record>
-->
diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py
index 3172999c545..97c5f4579e0 100644
--- a/addons/sale_crm/sale_crm.py
+++ b/addons/sale_crm/sale_crm.py
@@ -19,7 +19,10 @@
#
##############################################################################
-from datetime import datetime
+from datetime import date
+from dateutil import relativedelta
+
+from openerp import tools
from openerp.osv import osv, fields
@@ -41,31 +44,51 @@ class sale_order(osv.osv):
class crm_case_section(osv.osv):
_inherit = 'crm.case.section'
- def _get_sum_month_invoice(self, cr, uid, ids, field_name, arg, context=None):
- res = dict.fromkeys(ids, 0)
+ def _get_sale_orders_data(self, cr, uid, ids, field_name, arg, context=None):
+ obj = self.pool.get('sale.order')
+ res = dict.fromkeys(ids, False)
+ month_begin = date.today().replace(day=1)
+ groupby_begin = (month_begin + relativedelta.relativedelta(months=-4)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
+ for id in ids:
+ res[id] = dict()
+ created_domain = [('section_id', '=', id), ('state', 'in', ['draft', 'sent']), ('date_order', '>=', groupby_begin)]
+ res[id]['monthly_quoted'] = self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)
+ validated_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'sent']), ('date_confirm', '>=', groupby_begin)]
+ res[id]['monthly_confirmed'] = self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_total', 'date_confirm'], 'amount_total', 'date_confirm', context=context)
+ return res
+
+ def _get_invoices_data(self, cr, uid, ids, field_name, arg, context=None):
obj = self.pool.get('account.invoice.report')
- when = datetime.today()
- for section_id in ids:
- invoice_ids = obj.search(cr, uid, [("section_id", "=", section_id), ('state', 'not in', ['draft', 'cancel']), ('year', '=', when.year), ('month', '=', when.month > 9 and when.month or "0%s" % when.month)], context=context)
- for invoice in obj.browse(cr, uid, invoice_ids, context=context):
- res[section_id] += invoice.price_total
+ res = dict.fromkeys(ids, False)
+ month_begin = date.today().replace(day=1)
+ groupby_begin = (month_begin + relativedelta.relativedelta(months=-4)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
+ for id in ids:
+ created_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'cancel']), ('date', '>=', groupby_begin)]
+ res[id] = self.__get_bar_values(cr, uid, obj, created_domain, ['price_total', 'date'], 'price_total', 'date', context=context)
return res
_columns = {
- 'quotation_ids': fields.one2many('sale.order', 'section_id',
- string='Quotations', readonly=True,
- domain=[('state', 'in', ['draft', 'sent', 'cancel'])]),
- 'sale_order_ids': fields.one2many('sale.order', 'section_id',
- string='Sale Orders', readonly=True,
- domain=[('state', 'not in', ['draft', 'sent', 'cancel'])]),
- 'invoice_ids': fields.one2many('account.invoice', 'section_id',
- string='Invoices', readonly=True,
- domain=[('state', 'not in', ['draft', 'cancel'])]),
- 'sum_month_invoice': fields.function(_get_sum_month_invoice,
- string='Total invoiced this month',
- type='integer', readonly=True),
+ 'invoiced_forecast': fields.integer(string='Invoice Forecast',
+ help="Forecast of the invoice revenue for the current month. This is the amount the sales \n"
+ "team should invoice this month. It is used to compute the progression ratio \n"
+ " of the current and forecast revenue on the kanban view."),
+ 'invoiced_target': fields.integer(string='Invoice Target',
+ help="Target of invoice revenue for the current month. This is the amount the sales \n"
+ "team estimates to be able to invoice this month."),
+ 'monthly_quoted': fields.function(_get_sale_orders_data,
+ type='string', readonly=True, multi='_get_sale_orders_data',
+ string='Rate of created quotation per duration'),
+ 'monthly_confirmed': fields.function(_get_sale_orders_data,
+ type='string', readonly=True, multi='_get_sale_orders_data',
+ string='Rate of validate sales orders per duration'),
+ 'monthly_invoiced': fields.function(_get_invoices_data,
+ type='string', readonly=True,
+ string='Rate of sent invoices per duration'),
}
+ def action_forecast(self, cr, uid, id, value, context=None):
+ return self.write(cr, uid, [id], {'invoiced_forecast': value}, context=context)
+
class res_users(osv.Model):
_inherit = 'res.users'
diff --git a/addons/sale_crm/sale_crm_demo.xml b/addons/sale_crm/sale_crm_demo.xml
new file mode 100644
index 00000000000..0c2822719dd
--- /dev/null
+++ b/addons/sale_crm/sale_crm_demo.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="crm.case.section" id="crm.section_sales_department">
+ <field name="invoiced_forecast">52700</field>
+ <field name="invoiced_target">60000</field>
+ </record>
+
+ <record model="crm.case.section" id="crm.crm_case_section_1">
+ <field name="name">Indirect Sales</field>
+ <field name="code">IM</field>
+ <field name="invoiced_forecast">36000</field>
+ <field name="invoiced_target">40000</field>
+ </record>
+
+ <!-- Invoice for Direct Marketing -->
+
+ <record id="test_crm_sale_invoice_1" model="account.invoice">
+ <field name="currency_id" ref="base.EUR"/>
+ <field name="company_id" ref="base.main_company"/>
+ <field name="partner_id" ref="base.res_partner_1"/>
+ <field name="journal_id" ref="account.sales_journal"/>
+ <field name="section_id" ref="crm.section_sales_department"/>
+ <field name="state">draft</field>
+ <field name="type">out_invoice</field>
+ <field name="account_id" ref="account.a_recv"/>
+ <field name="name">Test invoice 1</field>
+ </record>
+ <record id="test_crm_sale_invoice_1_line_1" model="account.invoice.line">
+ <field name="name">Basic computer with Dvorak keyboard and left-handed mouse</field>
+ <field name="invoice_id" ref="test_crm_sale_invoice_1"/>
+ <field name="price_unit">250</field>
+ <field name="quantity">1</field>
+ <field name="account_id" ref="account.a_sale"/>
+ </record>
+ <record id="test_crm_sale_invoice_1_line_2" model="account.invoice.line">
+ <field name="name">Little server with raid 1 and 512ECC ram</field>
+ <field name="invoice_id" ref="test_crm_sale_invoice_1"/>
+ <field name="price_unit">800</field>
+ <field name="quantity">2</field>
+ <field name="account_id" ref="account.a_sale"/>
+ </record>
+ <record id="test_crm_sale_invoice_1_line_2" model="account.invoice.line">
+ <field name="name">Server with raid 10 and 2048ECC ram</field>
+ <field name="invoice_id" ref="test_crm_sale_invoice_1"/>
+ <field name="price_unit">4800</field>
+ <field name="quantity">4</field>
+ <field name="account_id" ref="account.a_sale"/>
+ </record>
+ <workflow action="invoice_open" model="account.invoice" ref="test_crm_sale_invoice_1"/>
+ <function model="account.invoice" name="pay_and_reconcile">
+ <!-- ids = --> <value eval="[ref('test_crm_sale_invoice_1')]"/>
+ <!-- pay_amount = --> <value eval="1850"/>
+ <!-- pay_account_id = --> <value eval="ref('account.cash')"/>
+ <!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
+ <!-- pay_journal_id = --> <value eval="ref('account.bank_journal')"/>
+ <!-- writeoff_acc_id = --> <value eval="ref('account.cash')"/>
+ <!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
+ <!-- writeoff_journal_id = --> <value eval="ref('account.bank_journal')"/>
+ <!-- context = --> <value eval="{}"/>
+ <!-- name = --> <value eval="str('Payment from ASUStek')"/>
+ </function>
+
+ <!-- Invoice for Indirect Marketing -->
+
+ <record id="test_crm_sale_invoice_2" model="account.invoice">
+ <field name="currency_id" ref="base.EUR"/>
+ <field name="company_id" ref="base.main_company"/>
+ <field name="partner_id" ref="base.res_partner_1"/>
+ <field name="journal_id" ref="account.sales_journal"/>
+ <field name="section_id" ref="crm.crm_case_section_1"/>
+ <field name="state">draft</field>
+ <field name="type">out_invoice</field>
+ <field name="account_id" ref="account.a_recv"/>
+ <field name="name">Test invoice 1</field>
+ </record>
+ <record id="test_crm_sale_invoice_2_line_1" model="account.invoice.line">
+ <field name="name">Basic formation with Dvorak</field>
+ <field name="invoice_id" ref="test_crm_sale_invoice_2"/>
+ <field name="price_unit">500</field>
+ <field name="quantity">1</field>
+ <field name="account_id" ref="account.a_sale"/>
+ </record>
+ <workflow action="invoice_open" model="account.invoice" ref="test_crm_sale_invoice_2"/>
+ <function model="account.invoice" name="pay_and_reconcile">
+ <!-- ids = --> <value eval="[ref('test_crm_sale_invoice_2')]"/>
+ <!-- pay_amount = --> <value eval="500"/>
+ <!-- pay_account_id = --> <value eval="ref('account.cash')"/>
+ <!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
+ <!-- pay_journal_id = --> <value eval="ref('account.bank_journal')"/>
+ <!-- writeoff_acc_id = --> <value eval="ref('account.cash')"/>
+ <!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
+ <!-- writeoff_journal_id = --> <value eval="ref('account.bank_journal')"/>
+ <!-- context = --> <value eval="{}"/>
+ <!-- name = --> <value eval="str('Payment from ASUStek')"/>
+ </function>
+
+
+ <record id="sale.sale_order_1" model="sale.order">
+ <field name="section_id" ref="crm.section_sales_department"/>
+ <field name="date_order" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
+ </record>
+ <record id="sale.sale_order_2" model="sale.order">
+ <field name="section_id" ref="crm.section_sales_department"/>
+ <field name="date_order" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
+ </record>
+ <record id="sale.sale_order_3" model="sale.order">
+ <field name="section_id" ref="crm.section_sales_department"/>
+ </record>
+ <record id="sale.sale_order_4" model="sale.order">
+ <field name="section_id" ref="crm.section_sales_department"/>
+ </record>
+ <record id="sale.sale_order_5" model="sale.order">
+ <field name="section_id" ref="crm.crm_case_section_1"/>
+ <field name="date_order" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
+ </record>
+ <record id="sale.sale_order_6" model="sale.order">
+ <field name="section_id" ref="crm.crm_case_section_1"/>
+ </record>
+ <record id="sale.sale_order_7" model="sale.order">
+ <field name="section_id" ref="crm.section_sales_department"/>
+ <field name="date_confirm" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
+ </record>
+ <record id="sale.sale_order_8" model="sale.order">
+ <field name="section_id" ref="crm.crm_case_section_1"/>
+ </record>
+
+ </data>
+</openerp>
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index 31c0317969a..ae21934ce61 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -43,7 +43,7 @@
<filter string="My Sales Team(s)"
icon="terp-personal+"
domain="[('section_id.user_id','=',uid)]"
- help="My Sales Team(s)"/>
+ help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
</xpath>
<xpath expr="//field[@name='user_id']" position="after">
<field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
@@ -75,7 +75,7 @@
<field name="section_id"/>
</xpath>
<xpath expr="//group/filter[@string='Due Date']" position="after">
- <filter string="Sales Team" domain="[]" context="{'group_by':'section_id'}"/>
+ <filter string="Sales Team" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
</xpath>
</field>
</record>
@@ -101,7 +101,7 @@
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<data>
- <xpath expr="//field[@name='email']" position="after">
+ <xpath expr="//field[@name='tz']" position="after">
<field name="default_section_id"/>
</xpath>
</data>
@@ -135,7 +135,6 @@
<field name="context">{
'search_default_section_id': [active_id],
'default_section_id': active_id,
- 'search_default_my_sale_orders_filter': 1,
}
</field>
<field name="help" type="html">
@@ -158,8 +157,8 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{
'search_default_section_id': [active_id],
- 'default_section_id': active_id, 'show_address': 1,
- 'search_default_my_sale_orders_filter': 1
+ 'default_section_id': active_id,
+ 'show_address': 1,
}
</field>
<field name="domain">[('state','in',('draft','sent','cancel'))]</field>
@@ -190,7 +189,7 @@
('type', '=', 'out_invoice')]</field>
<field name="context">{
'search_default_section_id': [active_id],
- 'default_section_id': active_id},
+ 'default_section_id': active_id,
'default_type':'out_invoice',
'type':'out_invoice',
'journal_type': 'sale',
@@ -212,38 +211,68 @@
<field name="act_window_id" ref="sale_crm.action_invoice_salesteams"/>
</record>
+ <record id="crm_case_section_salesteams_view_form" model="ir.ui.view">
+ <field name="name">crm.case.section.form</field>
+ <field name="model">crm.case.section</field>
+ <field name="inherit_id" ref="crm.crm_case_section_view_form"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//field[@name='code']" position="after">
+ <field name="invoiced_target"/>
+ <field name="invoiced_forecast"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+
<record id="crm_case_section_salesteams_view_kanban" model="ir.ui.view">
<field name="name">crm.case.section.kanban</field>
<field name="model">crm.case.section</field>
<field name="inherit_id" ref="crm.crm_case_section_salesteams_view_kanban"/>
<field name="arch" type="xml">
<data>
- <xpath expr="//field[@name='open_opportunity_ids']" position="after">
- <field name="quotation_ids"/>
- <field name="sale_order_ids"/>
- <field name="invoice_ids"/>
+ <xpath expr="//field[@name='name']" position="after">
+ <field name="monthly_quoted"/>
+ <field name="monthly_confirmed"/>
+ <field name="monthly_invoiced"/>
+ <field name="invoiced_forecast"/>
+ <field name="invoiced_target"/>
</xpath>
- <xpath expr="//div[@class='oe_items_list']" position="inside">
- <a name="%(action_quotations_salesteams)d" type="action">
- <t t-raw="record.quotation_ids.raw_value.length"/>
- <t t-if="record.quotation_ids.raw_value.length &gt;= 2">Quotations</t>
- <t t-if="record.quotation_ids.raw_value.length &lt; 2">Quotation</t>
- </a>
- <a name="%(action_orders_salesteams)d" type="action">
- <t t-raw="record.sale_order_ids.raw_value.length"/>
- <t t-if="record.sale_order_ids.raw_value.length &gt;= 2">Sales Orders</t>
- <t t-if="record.sale_order_ids.raw_value.length &lt; 2">Sales Order</t>
- </a>
- <a name="%(action_invoice_salesteams)d" type="action" groups="account.group_account_invoice">
- <t t-raw="record.invoice_ids.raw_value.length"/>
- <t t-if="record.invoice_ids.raw_value.length &gt;= 2">Invoices</t>
- <t t-if="record.invoice_ids.raw_value.length &lt; 2">Invoice</t>
- </a>
+ <xpath expr="//div[@class='oe_salesteams_leads']" position="after">
+ <div class="oe_salesteams_orders">
+ <a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
+ <a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar_link">
+ <field name="monthly_confirmed" widget="sparkline_bar">
+ Revenue of confirmed sales orders per month.<br/>Click the acces to Sales Analysis
+ </field>
+ </a>
+ </div>
+ </xpath>
+ <xpath expr="//div[@class='oe_salesteams_opportunities']" position="after">
+ <div class="oe_salesteams_invoices">
+ <a name="%(action_invoice_salesteams)d" type="action" groups="account.group_account_invoice">Invoices</a>
+ <a name="%(account.action_account_invoice_report_all)d" type="action" class="oe_sparkline_bar_link">
+ <field name="monthly_invoiced" widget="sparkline_bar">
+ Revenue of sent invoices per month.<br/>Click to see a detailed analysis of invoices.
+ </field>
+ </a>
+ </div>
+ <div class="oe_salesteams_quotations">
+ <a name="%(action_quotations_salesteams)d" type="action" class="oe_sparkline_bar_link">Quotations</a>
+ <a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar_link">
+ <field name="monthly_quoted" widget="sparkline_bar">
+ Revenue of created quotation per month.<br/>Click to see a detailed analysis of sales.
+ </field>
+ </a>
+ </div>
</xpath>
<xpath expr="//div[@class='oe_items_list']" position="after">
- <div class="oe_center">
- <div class="oe_sum"><field name="sum_month_invoice"/></div>
- <div class="oe_subsum">Invoiced this month</div>
+ <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>
+ </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.
</div>
</xpath>
</data>
diff --git a/addons/sale_crm/static/lib/justgage.js b/addons/sale_crm/static/lib/justgage.js
new file mode 100644
index 00000000000..52b5c6ea0c3
--- /dev/null
+++ b/addons/sale_crm/static/lib/justgage.js
@@ -0,0 +1,883 @@
+/**
+ * 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;
+}()); \ No newline at end of file
diff --git a/addons/sale_crm/static/src/js/sale_crm.js b/addons/sale_crm/static/src/js/sale_crm.js
new file mode 100644
index 00000000000..207ac959af3
--- /dev/null
+++ b/addons/sale_crm/static/src/js/sale_crm.js
@@ -0,0 +1,108 @@
+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");
+
+};
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 6bea6286456..da770af6d82 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -87,7 +87,7 @@ class crm_make_sale(osv.osv_memory):
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
if False in partner_addr.values():
- raise osv.except_osv(_('Insufficient Data!'), _('No addresse(s) defined for this customer.'))
+ raise osv.except_osv(_('Insufficient Data!'), _('No address(es) defined for this customer.'))
vals = {
'origin': _('Opportunity: %s') % str(case.id),
diff --git a/addons/sale_journal/i18n/ru.po b/addons/sale_journal/i18n/ru.po
index b4830dcfcd7..9a4370f5d61 100644
--- a/addons/sale_journal/i18n/ru.po
+++ b/addons/sale_journal/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-20 08:56+0000\n"
+"PO-Revision-Date: 2013-06-05 11:29+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:27+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: sale_journal
#: field:sale_journal.invoice.type,note:0
@@ -31,6 +31,8 @@ msgstr "Способ выставления счета"
msgid ""
"This invoicing type will be used, by default, to invoice the current partner."
msgstr ""
+"Этот тип счета будет использоваться по умолчанию для выставления текущего "
+"счета партнера."
#. module: sale_journal
#: view:res.partner:0
@@ -45,7 +47,7 @@ msgstr "Выставление счета"
#. module: sale_journal
#: model:ir.model,name:sale_journal.model_stock_picking_in
msgid "Incoming Shipments"
-msgstr ""
+msgstr "Поступающие ТМЦ"
#. module: sale_journal
#: help:sale_journal.invoice.type,active:0
@@ -103,7 +105,7 @@ msgstr ""
#. module: sale_journal
#: help:sale.order,invoice_type_id:0
msgid "Generate invoice based on the selected option."
-msgstr ""
+msgstr "Генерировать счет на основе выбранного варианта."
#. module: sale_journal
#: view:sale.order:0
@@ -137,7 +139,7 @@ msgstr "Заказ продаж"
#. module: sale_journal
#: model:ir.model,name:sale_journal.model_stock_picking_out
msgid "Delivery Orders"
-msgstr ""
+msgstr "Заказы доставки"
#~ msgid "Monthly sales"
#~ msgstr "Продажи в месяце"
diff --git a/addons/sale_margin/i18n/ru.po b/addons/sale_margin/i18n/ru.po
index 7c764c89223..cac4fe13548 100644
--- a/addons/sale_margin/i18n/ru.po
+++ b/addons/sale_margin/i18n/ru.po
@@ -8,14 +8,14 @@ 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: 2011-01-20 08:51+0000\n"
+"PO-Revision-Date: 2013-06-04 13:50+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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-03-16 05:40+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-05 05:32+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: sale_margin
#: field:sale.order.line,purchase_price:0
@@ -44,6 +44,7 @@ msgid ""
"It gives profitability by calculating the difference between the Unit Price "
"and the cost price."
msgstr ""
+"Дает прибыльность как разницу между стоимостью единицы и себестоимостью."
#~ msgid "Customer Invoice"
#~ msgstr "Счета клиентам"
diff --git a/addons/sale_margin/sale_margin_view.xml b/addons/sale_margin/sale_margin_view.xml
index 88647ea3c46..be16429526a 100644
--- a/addons/sale_margin/sale_margin_view.xml
+++ b/addons/sale_margin/sale_margin_view.xml
@@ -9,7 +9,7 @@
<field name="arch" type="xml">
<xpath expr="//group[@name='sale_total']" position="after">
<group name="sale_margin_grp">
- <field name="margin" widget='monetary' options="{'currency_field': 'currency_id'}"/>
+ <field name="margin" widget='monetary' options="{'currency_field': 'currency_id'}" groups="base.group_user"/>
</group>
</xpath>
</field>
diff --git a/addons/sale_stock/i18n/ru.po b/addons/sale_stock/i18n/ru.po
index f5c54417077..28f156fb871 100644
--- a/addons/sale_stock/i18n/ru.po
+++ b/addons/sale_stock/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2013-01-04 16:04+0000\n"
+"PO-Revision-Date: 2013-06-06 11:30+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
#. module: sale_stock
#: help:sale.config.settings,group_invoice_deli_orders:0
@@ -22,11 +22,13 @@ msgid ""
"To allow your salesman to make invoices for Delivery Orders using the menu "
"'Deliveries to Invoice'."
msgstr ""
+"Позволяет вашему продавцу создавать счета для заказов доставки используя "
+"меню \"Доставки в счета\"."
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_deliveryorder0
msgid "Delivery Order"
-msgstr "Заказ на доставку"
+msgstr "Заказ доставки"
#. module: sale_stock
#: model:ir.actions.act_window,name:sale_stock.outgoing_picking_list_to_invoice
@@ -86,12 +88,12 @@ msgstr ""
#. module: sale_stock
#: model:process.transition,name:sale_stock.process_transition_saleprocurement0
msgid "Create Procurement Order"
-msgstr "Создать заказ на снабжение"
+msgstr "Создать заказ снабжения"
#. module: sale_stock
#: field:stock.picking.out,sale_id:0
msgid "Sale Order"
-msgstr "Заказ"
+msgstr "Заказ продажи"
#. module: sale_stock
#: model:process.transition,note:sale_stock.process_transition_saleorderprocurement0
@@ -99,8 +101,8 @@ msgid ""
"For every sales order line, a procurement order is created to supply the "
"sold product."
msgstr ""
-"Для каждой позиции заказа на продажу создается заказ на снабжение для "
-"поставки проданных ТМЦ."
+"Для каждой позиции заказа продаж создается заказ снабжения для поставки "
+"проданных ТМЦ."
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:615
@@ -129,8 +131,7 @@ msgstr "Магазин"
#. module: sale_stock
#: model:process.node,note:sale_stock.process_node_saleorderprocurement0
msgid "Drives procurement orders for every sales order line."
-msgstr ""
-"Управление заказами на снабжение для каждой позиции заказа на продажу."
+msgstr "Управление заказами снабжения для каждой позиции заказа продаж."
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_stock_move
@@ -151,7 +152,7 @@ msgstr "Табель проекта"
#. module: sale_stock
#: field:sale.config.settings,group_sale_delivery_address:0
msgid "Allow a different address for delivery and invoicing "
-msgstr ""
+msgstr "Разрешить различные адреса для доставки и выставления счета "
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:546
@@ -163,18 +164,18 @@ msgstr "Ошибка конфигурации!"
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_saleprocurement0
msgid "Procurement Order"
-msgstr "Заказ на закупку"
+msgstr "Заказ снабжения"
#. module: sale_stock
#: selection:sale.config.settings,default_order_policy:0
msgid "Invoice based on deliveries"
-msgstr "Счет основанный на отгрузке"
+msgstr "Счет основанный на доставках"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_order
#: field:stock.picking,sale_id:0
msgid "Sales Order"
-msgstr "Заказ на продажу"
+msgstr "Заказ продаж"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_stock_picking_out
@@ -185,7 +186,7 @@ msgstr "Заказы доставки"
#: model:ir.model,name:sale_stock.model_sale_order_line
#: field:stock.move,sale_line_id:0
msgid "Sales Order Line"
-msgstr "Позиция заказа на продажу"
+msgstr "Позиция заказа продаж"
#. module: sale_stock
#: model:process.transition,note:sale_stock.process_transition_packing0
@@ -195,11 +196,11 @@ msgid ""
"parts to the sales order. There is 1 pick list by sales order line which "
"evolves with the availability of parts."
msgstr ""
-"Форма комплектовочного листа создастся как только заказ на продажу будет "
-"подтвержден, в одно время с заказом на снабжение. Он представляет собой "
-"определение комплектующих для заказа на продажу. Один комплектовочный лист "
-"на позицию заказа на продажу, который будет меняться в соответствии с "
-"наличием комплектующих."
+"Форма комплектовочного листа создастся как только заказ продаж будет "
+"подтвержден, в одно время с заказом снабжения. Он представляет собой "
+"определение комплектующих для заказа продаж. Один комплектовочный лист на "
+"позицию заказа продаж, который будет меняться в соответствии с наличием "
+"комплектующих."
#. module: sale_stock
#: help:res.company,security_lead:0
@@ -240,7 +241,7 @@ msgstr "Документ перемещения к заказчику."
#. module: sale_stock
#: view:sale.order:0
msgid "View Delivery Order"
-msgstr ""
+msgstr "Вид заказа доставки"
#. module: sale_stock
#: field:sale.order.line,move_ids:0
@@ -276,7 +277,7 @@ msgstr "Снабжение"
#: field:sale.report,shipped:0
#: field:sale.report,shipped_qty_1:0
msgid "Shipped"
-msgstr "Доставлено"
+msgstr "Отправлено"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:240
@@ -292,24 +293,24 @@ msgid ""
"production of products regarding to the rules and to the sales order's "
"parameters. "
msgstr ""
-"Заказ на снабжение создастся автоматически как только заказ на продажу будет "
+"Заказ снабжения создастся автоматически как только заказ продаж будет "
"подтвержден или счет будет оплачен. Он определяет закупку и производство ТМЦ "
-"по правилам и параметрам заказа на продажу. "
+"по правилам и параметрам заказа продаж. "
#. module: sale_stock
#: help:sale.config.settings,group_mrp_properties:0
msgid "Allows you to tag sales order lines with properties."
-msgstr ""
+msgstr "Позволяет отмечать тегами позиции заказа продажи со свойствами"
#. module: sale_stock
#: field:sale.config.settings,group_invoice_deli_orders:0
msgid "Generate invoices after and based on delivery orders"
-msgstr ""
+msgstr "Генерировать счета после и из заказов доставки"
#. module: sale_stock
#: field:sale.config.settings,module_delivery:0
msgid "Allow adding shipping costs"
-msgstr ""
+msgstr "Позволяет добавлять стоимость доставки"
#. module: sale_stock
#: view:sale.order:0
@@ -327,6 +328,8 @@ msgid ""
"International Commercial Terms are a series of predefined commercial terms "
"used in international transactions."
msgstr ""
+"Международные правила по толкованию наиболее широко используемых торговых "
+"терминов в области внешней торговли."
#. module: sale_stock
#: help:sale.config.settings,module_delivery:0
@@ -345,7 +348,7 @@ msgstr "Доставка всего сразу, если все готово."
#. module: sale_stock
#: model:res.groups,name:sale_stock.group_invoice_deli_orders
msgid "Enable Invoicing Delivery orders"
-msgstr ""
+msgstr "Разрешить выставлять счета на заказы доставки"
#. module: sale_stock
#: field:res.company,security_lead:0
@@ -362,6 +365,8 @@ msgstr "Закупка проданного материала"
msgid ""
"Pick 'Deliver each product when available' if you allow partial delivery."
msgstr ""
+"Выбрать \"Доставить каждый товар по готовности\" если вы разрешили частичную "
+"доставки"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:206
@@ -380,7 +385,7 @@ msgid ""
"It indicates that the sales order has been delivered. This field is updated "
"only after the scheduler(s) have been launched."
msgstr ""
-"Показывает, что заказ на продажу был доставлен. Это поле обновляется только "
+"Показывает, что заказ продаж был доставлен. Это поле обновляется только "
"после запуска планировщика."
#. module: sale_stock
@@ -398,12 +403,12 @@ msgstr "Свойства изделия в позиции заказа"
msgid ""
"You can generate invoices based on sales orders or based on shippings."
msgstr ""
-"Вы можете создать счет на основе заказов на продажу или на основе доставок."
+"Вы можете создать счет на основе заказов продаж или на основе доставок."
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_report
msgid "Sales Orders Statistics"
-msgstr "Статистика заказов на продажу"
+msgstr "Статистика заказов продаж"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_res_company
@@ -428,6 +433,8 @@ msgid ""
"Allows you to specify different delivery and invoice addresses on a sales "
"order."
msgstr ""
+"Позволяет задавать разные адреса для доставки и выставления счета в заказе "
+"продажи."
#. module: sale_stock
#: model:process.node,note:sale_stock.process_node_saleprocurement0
@@ -435,7 +442,7 @@ msgid ""
"One Procurement order for each sales order line and for each of the "
"components."
msgstr ""
-"Один заказ на снабжение для каждой позиции заказа на продажу и для каждого "
+"Один заказ снабжения для каждой позиции заказа продаж и для каждого "
"компонента."
#. module: sale_stock
@@ -455,6 +462,7 @@ msgid ""
"Number of days between the order confirmation and the shipping of the "
"products to the customer"
msgstr ""
+"Количество дней между подтверждением заказа и отгрузкой продукции заказчику"
#. module: sale_stock
#: help:sale.config.settings,default_picking_policy:0
@@ -467,7 +475,7 @@ msgstr ""
#. module: sale_stock
#: selection:sale.config.settings,default_order_policy:0
msgid "Invoice based on sales orders"
-msgstr ""
+msgstr "Счет основан на заказах продаж"
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_invoiceafterdelivery0
@@ -487,6 +495,9 @@ msgid ""
"In order to delete a confirmed sales order, you must cancel it.\n"
"To do so, you must first cancel related picking for delivery orders."
msgstr ""
+"Для того, чтобы удалить подтвержденный заказ, вы должны отменить его.\n"
+"Чтобы сделать это, Вы должны сначала отменить комплектование для заказов "
+"доставки."
#. module: sale_stock
#: field:sale.order.line,number_packages:0
@@ -506,7 +517,7 @@ msgstr "Создать счет"
#. module: sale_stock
#: field:sale.config.settings,task_work:0
msgid "Prepare invoices based on task's activities"
-msgstr ""
+msgstr "Подготовка счетов основанных на действиях по задачам"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_advance_payment_inv
@@ -519,7 +530,7 @@ msgstr "Счет на авансовый платеж"
msgid "You must first cancel stock moves attached to this sales order line."
msgstr ""
"Сначала вы должны отменить перемещения ТМЦ связанные с этой позицией заказа "
-"на продажу."
+"продаж."
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:535
@@ -536,7 +547,7 @@ msgstr "Инкотерм"
#: code:addons/sale_stock/sale_stock.py:496
#, python-format
msgid "Cannot cancel sales order line!"
-msgstr ""
+msgstr "Нельзя отменить позицию заказа продаж!"
#. module: sale_stock
#: model:process.transition.action,name:sale_stock.process_transition_action_cancelassignation0
@@ -551,7 +562,7 @@ msgstr "На основании отгруженного или заказанн
#. module: sale_stock
#: selection:sale.order,picking_policy:0
msgid "Deliver all products at once"
-msgstr "Отгрузка всех товаров за раз"
+msgstr "Доставка всех товаров за раз"
#. module: sale_stock
#: field:sale.order,picking_ids:0
@@ -561,7 +572,7 @@ msgstr "Связанное комплектование"
#. module: sale_stock
#: model:ir.model,name:sale_stock.model_sale_config_settings
msgid "sale.config.settings"
-msgstr ""
+msgstr "sale.config.settings"
#. module: sale_stock
#: help:sale.order,picking_ids:0
@@ -569,21 +580,22 @@ msgid ""
"This is a list of delivery orders that has been generated for this sales "
"order."
msgstr ""
+"Это список заказов доставки который был создан для этого заказа продажи."
#. module: sale_stock
#: model:process.node,name:sale_stock.process_node_saleorderprocurement0
msgid "Sales Order Requisition"
-msgstr "Запрос заказа на продажу"
+msgstr "Запрос заказа продаж"
#. module: sale_stock
#: model:process.transition,name:sale_stock.process_transition_deliver0
msgid "Create Delivery Order"
-msgstr "Создать заказ на доставку"
+msgstr "Создать заказ доставки"
#. module: sale_stock
#: view:sale.order:0
msgid "Ignore Exception"
-msgstr "Игнорировать исключение"
+msgstr "Игнорировать исключительную ситуацию"
#. module: sale_stock
#: code:addons/sale_stock/sale_stock.py:588
@@ -598,12 +610,12 @@ msgstr ""
#. module: sale_stock
#: view:sale.order:0
msgid "Recreate Delivery Order"
-msgstr ""
+msgstr "Воссоздать заказ доставки"
#. module: sale_stock
#: help:sale.config.settings,group_multiple_shops:0
msgid "This allows to configure and use multiple shops."
-msgstr ""
+msgstr "Это позволяет настроить и использовать несколько магазинов."
#. module: sale_stock
#: field:sale.order,picked_rate:0
@@ -628,5 +640,5 @@ msgid ""
"automatically."
msgstr ""
"В зависимости от настройки исходящего места хранения, перемещение между "
-"зоной отгрузки и заказчиком выполняется с помощью заказа на доставку вручную "
+"зоной отгрузки и заказчиком выполняется с помощью заказа доставки вручную "
"или автоматически."
diff --git a/addons/sale_stock/process/sale_stock_process.xml b/addons/sale_stock/process/sale_stock_process.xml
index c10b34c8866..1ebebec7809 100644
--- a/addons/sale_stock/process/sale_stock_process.xml
+++ b/addons/sale_stock/process/sale_stock_process.xml
@@ -72,40 +72,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Procurement Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A procurement order is automatically created as soon as a sales order is confirmed or as the invoice is paid. It drives the purchasing and the production of products regarding to the rules and to the sales order's parameters. &quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_saleprocurement0"/>
- <field model="process.node" name="source_node_id" ref="sale.process_node_saleorder0"/>
+ <field name="target_node_id" ref="process_node_saleprocurement0"/>
+ <field name="source_node_id" ref="sale.process_node_saleorder0"/>
</record>
<record id="process_transition_packing0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Pick List&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Pick List form is created as soon as the sales order is confirmed, in the same time as the procurement order. It represents the assignment of parts to the sales order. There is 1 pick list by sales order line which evolves with the availability of parts.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_packinglist0"/>
- <field model="process.node" name="source_node_id" ref="process_node_saleprocurement0"/>
+ <field name="target_node_id" ref="process_node_packinglist0"/>
+ <field name="source_node_id" ref="process_node_saleprocurement0"/>
</record>
<record id="process_transition_deliver0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Delivery Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the configuration of the location Output, the move between the output area and the customer is done through the Delivery Order manually or automatically.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_deliveryorder0"/>
- <field model="process.node" name="source_node_id" ref="process_node_packinglist0"/>
+ <field name="target_node_id" ref="process_node_deliveryorder0"/>
+ <field name="source_node_id" ref="process_node_packinglist0"/>
</record>
<record id="process_transition_invoiceafterdelivery0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If the sale order was set to create the invoice 'On Delivery Order', then an invoice is automatically created based on what you delivered. If you rather want to create your invoice based on your sale order, you can set the sale order to create invoice 'On Demand', then track and process the sales order that have been fully delivered and invoice them from there.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="process_node_invoiceafterdelivery0"/>
- <field model="process.node" name="source_node_id" ref="process_node_packinglist0"/>
+ <field name="target_node_id" ref="process_node_invoiceafterdelivery0"/>
+ <field name="source_node_id" ref="process_node_packinglist0"/>
</record>
<record id="process_transition_saleorderprocurement0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of sold material&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;For every sales order line, a procurement order is created to supply the sold product.&quot;&quot;&quot;" name="note"/>
- <field model="process.node" name="target_node_id" ref="procurement.process_node_procureproducts0"/>
- <field model="process.node" name="source_node_id" ref="process_node_saleorderprocurement0"/>
+ <field name="target_node_id" ref="procurement.process_node_procureproducts0"/>
+ <field name="source_node_id" ref="process_node_saleorderprocurement0"/>
</record>
<!--
diff --git a/addons/sale_stock/test/cancel_order_sale_stock.yml b/addons/sale_stock/test/cancel_order_sale_stock.yml
index 9081cac9fa3..d970e0c9cad 100644
--- a/addons/sale_stock/test/cancel_order_sale_stock.yml
+++ b/addons/sale_stock/test/cancel_order_sale_stock.yml
@@ -8,7 +8,7 @@
-
!python {model: stock.picking}: |
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
- first_picking = self.browse(cr, uid, delivery_orders[0], context=context)
+ first_picking = self.browse(cr, uid, delivery_orders[-1], context=context)
if first_picking.force_assign(cr, uid, first_picking):
first_move = first_picking.move_lines[0]
values = {'move%s'%(first_move.id): {'product_qty': 2, 'product_uom':ref('product.product_uom_unit')}}
@@ -18,7 +18,7 @@
-
!python {model: stock.picking}: |
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
- last_delivery_order_id = delivery_orders[0]
+ last_delivery_order_id = delivery_orders[-1]
self.pool.get('stock.picking').signal_button_cancel(cr, uid, [last_delivery_order_id])
-
I run the scheduler.
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 3a26dcb9e6b..22ed7c3e39c 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -230,6 +230,7 @@ class share_wizard(osv.TransientModel):
current_user = user_obj.browse(cr, UID_ROOT, uid, context=context)
# modify context to disable shortcuts when creating share users
context['noshortcut'] = True
+ context['no_reset_password'] = True
created_ids = []
existing_ids = []
if wizard_data.user_type == 'emails':
@@ -413,7 +414,8 @@ class share_wizard(osv.TransientModel):
relation_model_id = model_obj.search(cr, UID_ROOT, [('model','=',coldef._obj)])[0]
relation_model_browse = model_obj.browse(cr, UID_ROOT, relation_model_id, context=context)
relation_osv = self.pool[coldef._obj]
- if coltype == 'one2many':
+ #skip virtual one2many fields (related, ...) as there is no reverse relationship
+ if coltype == 'one2many' and hasattr(coldef, '_fields_id'):
# don't record reverse path if it's not a real m2o (that happens, but rarely)
dest_model_ci = relation_osv._all_columns
reverse_rel = coldef._fields_id
@@ -831,7 +833,7 @@ class share_wizard(osv.TransientModel):
notification_obj = self.pool.get('mail.notification')
user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
if not user.email:
- raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
+ raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
# TODO: also send an HTML version of this mail
for result_line in wizard_data.result_line_ids:
@@ -862,7 +864,7 @@ class share_wizard(osv.TransientModel):
mail_mail = self.pool.get('mail.mail')
user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
if not user.email:
- raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
+ raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
# TODO: also send an HTML version of this mail
mail_ids = []
diff --git a/addons/stock/html/index.html b/addons/stock/html/index.html
index 476de95bfe5..aac71e529ae 100644
--- a/addons/stock/html/index.html
+++ b/addons/stock/html/index.html
@@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=stock">
<img src="stock_main.png">
</a>
- <span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
@@ -237,4 +236,5 @@ real-time reports that anyone can create and share.
</div>
</section>
-<section class="oe_container oe_separator"/>
+<section class="oe_container oe_separator">
+</section>
diff --git a/addons/stock/i18n/ru.po b/addons/stock/i18n/ru.po
index 4a79cec4b89..817b8aceaa5 100644
--- a/addons/stock/i18n/ru.po
+++ b/addons/stock/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-01-22 08:16+0000\n"
+"PO-Revision-Date: 2013-06-04 12:52+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 04:58+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-05 05:32+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: stock
#: field:stock.inventory.line.split,line_exist_ids:0
@@ -660,6 +660,8 @@ msgid ""
"Forces to specify a Serial Number for all moves containing this product and "
"going to a Customer Location"
msgstr ""
+"Принудительно установить порядковый номер для всех перемещений этой "
+"продукции в место хранения заказчика"
#. module: stock
#: model:ir.ui.menu,name:stock.menu_stock_products_moves
@@ -845,6 +847,8 @@ msgid ""
"Forces to specify a Serial Number for all moves containing this product and "
"coming from a Supplier Location"
msgstr ""
+"Принудительно установить порядковый номер для всех перемещений этой "
+"продукции из мест хранения поставщика"
#. module: stock
#: help:stock.config.settings,group_uos:0
@@ -1973,7 +1977,7 @@ msgstr "Полка 2"
#: code:addons/stock/stock.py:529
#, python-format
msgid "You cannot remove a lot line."
-msgstr ""
+msgstr "Нельзя удалить позицию партии"
#. module: stock
#: help:stock.location,posx:0
@@ -2402,7 +2406,7 @@ msgstr "Место хранения поставщика"
#. module: stock
#: view:stock.location.product:0
msgid "View Products Inventory"
-msgstr ""
+msgstr "Новая инвентаризация продукции"
#. module: stock
#: view:stock.move:0
@@ -2535,6 +2539,7 @@ msgid ""
"Current quantity of products with this Serial Number available in company "
"warehouses"
msgstr ""
+"Текущее количество продукции с этим серийный номером на складах компании"
#. module: stock
#: view:stock.inventory:0
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index db73bae3b6c..d5fb48a60f0 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -543,6 +543,7 @@ class stock_picking(osv.osv):
_name = "stock.picking"
_inherit = ['mail.thread']
_description = "Picking List"
+ _order = "id desc"
def _set_maximum_date(self, cr, uid, ids, name, value, arg, context=None):
""" Calculates planned date if it is greater than 'value'.
@@ -1109,7 +1110,7 @@ class stock_picking(osv.osv):
if isinstance(partner, int):
partner = partner_obj.browse(cr, uid, [partner], context=context)[0]
if not partner:
- raise osv.except_osv(_('Error, no partner !'),
+ raise osv.except_osv(_('Error, no partner!'),
_('Please put a partner on the picking list if you want to generate invoice.'))
if not inv_type:
@@ -1763,7 +1764,7 @@ class stock_move(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
if move.state == 'done':
if frozen_fields.intersection(vals):
- raise osv.except_osv(_('Operation forbidden !'),
+ raise osv.except_osv(_('Operation Forbidden!'),
_('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).'))
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index 47599d5f99e..8c2c5839989 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -144,7 +144,7 @@ class stock_partial_picking(osv.osv_memory):
def _partial_move_for(self, cr, uid, move):
partial_move = {
'product_id' : move.product_id.id,
- 'quantity' : move.product_qty if move.state in ('assigned','draft','confirmed') else 0,
+ 'quantity' : move.product_qty if move.state == 'assigned' else 0,
'product_uom' : move.product_uom.id,
'prodlot_id' : move.prodlot_id.id,
'move_id' : move.id,
@@ -178,7 +178,7 @@ class stock_partial_picking(osv.osv_memory):
if line_uom.factor and line_uom.factor <> 0:
if float_compare(qty_in_line_uom, wizard_line.quantity, precision_rounding=line_uom.rounding) != 0:
- raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only rounding of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
if move_id:
#Check rounding Quantity.ex.
#picking: 1kg, uom kg rounding = 0.01 (rounding to 10g),
@@ -189,7 +189,7 @@ class stock_partial_picking(osv.osv_memory):
qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id)
without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor
if float_compare(qty_in_initial_uom, without_rounding_qty, precision_rounding=initial_uom.rounding) != 0:
- raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
+ raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only rounding of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name))
else:
seq_obj_name = 'stock.picking.' + picking_type
move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name),
diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml
index 6578a961ff3..d9a220daef6 100644
--- a/addons/stock_location/stock_location_demo_cpu1.xml
+++ b/addons/stock_location/stock_location_demo_cpu1.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<record id="product.product_product_9" model="product.product">
@@ -73,7 +72,7 @@
<field name="company_id" ref="stock.res_company_1"/>
<field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
<field name="location_id" ref="stock.stock_location_shop0"/>
- <field model="product.product" name="product_id" ref="product.product_product_9"/>
+ <field name="product_id" ref="product.product_product_9"/>
</record>
<record id="sale_shop2" model="sale.shop">
@@ -89,4 +88,4 @@
<field model="account.payment.term" name="payment_default_id" search="[]"/>
</record>
</data>
-</openerp>
+</openerp> \ No newline at end of file
diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py
index b7ae720c187..98e1d78b3be 100644
--- a/addons/subscription/subscription.py
+++ b/addons/subscription/subscription.py
@@ -115,7 +115,7 @@ class subscription_subscription(osv.osv):
id = int(id)
model = self.pool[model_name]
except:
- raise osv.except_osv(_('Wrong Source Document !'), _('Please provide another source document.\nThis one does not exist !'))
+ raise osv.except_osv(_('Wrong Source Document!'), _('Please provide another source document.\nThis one does not exist!'))
default = {'state':'draft'}
doc_obj = self.pool.get('subscription.document')
@@ -142,7 +142,7 @@ class subscription_subscription(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for record in self.browse(cr, uid, ids, context or {}):
if record.state=="running":
- raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription !'))
+ raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription!'))
return super(subscription_subscription, self).unlink(cr, uid, ids, context)
def set_done(self, cr, uid, ids, context=None):
diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py
index ca6a8e4b15d..44d3bec7f6e 100644
--- a/addons/survey/wizard/survey_send_invitation.py
+++ b/addons/survey/wizard/survey_send_invitation.py
@@ -191,7 +191,8 @@ Thanks,''') % (name, self.pool.get('ir.config_parameter').get_param(cr, uid, 'we
'action_id': act_id[0],
'survey_id': [[6, 0, survey_ids]]
}
- user = user_ref.create(cr, uid, res_data)
+ create_ctx = dict(context, no_reset_password=True)
+ user = user_ref.create(cr, uid, res_data, context=create_ctx)
if user not in new_user:
new_user.append(user)
created+= "- %s (Login: %s, Password: %s)\n" % (partner.name or _('Unknown'),\
diff --git a/addons/warning/warning.py b/addons/warning/warning.py
index e9e9161bacb..8e1168e5d35 100644
--- a/addons/warning/warning.py
+++ b/addons/warning/warning.py
@@ -63,7 +63,7 @@ class sale_order(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, part, context=context)
if partner.sale_warn != 'no-message':
if partner.sale_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.sale_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.sale_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.sale_warn_msg
warning = {
@@ -91,7 +91,7 @@ class purchase_order(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, part)
if partner.purchase_warn != 'no-message':
if partner.purchase_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.purchase_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.purchase_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.purchase_warn_msg
warning = {
@@ -124,7 +124,7 @@ class account_invoice(osv.osv):
partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
if partner.invoice_warn != 'no-message':
if partner.invoice_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.invoice_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.invoice_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.invoice_warn_msg
@@ -155,7 +155,7 @@ class stock_picking(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -184,7 +184,7 @@ class stock_picking_in(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -210,7 +210,7 @@ class stock_picking_out(osv.osv):
message = False
if partner.picking_warn != 'no-message':
if partner.picking_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg)
title = _("Warning for %s") % partner.name
message = partner.picking_warn_msg
warning = {
@@ -257,7 +257,7 @@ class sale_order_line(osv.osv):
if product_info.sale_line_warn != 'no-message':
if product_info.sale_line_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.sale_line_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.sale_line_warn_msg)
title = _("Warning for %s") % product_info.name
message = product_info.sale_line_warn_msg
warning['title'] = title
@@ -289,7 +289,7 @@ class purchase_order_line(osv.osv):
if product_info.purchase_line_warn != 'no-message':
if product_info.purchase_line_warn == 'block':
- raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.purchase_line_warn_msg)
+ raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.purchase_line_warn_msg)
title = _("Warning for %s") % product_info.name
message = product_info.purchase_line_warn_msg
warning['title'] = title