diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index 43aaa2f58c1..a380a69dc03 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -99,7 +99,6 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/wizard/project_account_analytic_line_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',
- 'partner_view.xml',
'data/account_data.xml',
'data/data_account_type.xml',
'data/configurable_account_chart.xml',
@@ -112,6 +111,7 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/wizard/account_analytic_journal_report_view.xml',
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
'project/wizard/account_analytic_chart_view.xml',
+ 'partner_view.xml',
'product_view.xml',
'account_assert_test.xml',
'process/statement_process.xml',
diff --git a/addons/account/account.py b/addons/account/account.py
index 3959799f1bb..d65c5d62c0a 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -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):
@@ -1670,7 +1680,7 @@ class account_move_reconcile(osv.osv):
elif reconcile.line_partial_ids:
first_partner = reconcile.line_partial_ids[0].partner_id.id
move_lines = reconcile.line_partial_ids
- if any([line.partner_id.id != first_partner for line in move_lines]):
+ if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]):
return False
return True
@@ -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 = {
@@ -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_financial_report_data.xml b/addons/account/account_financial_report_data.xml
index 6410a5e887c..e8ff33151c3 100644
--- a/addons/account/account_financial_report_data.xml
+++ b/addons/account/account_financial_report_data.xml
@@ -6,16 +6,19 @@
-->
Profit and Loss
+ sumIncome
+ detail_with_hierarchyaccount_typeExpense
+ detail_with_hierarchyaccount_type
diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml
index 58e824a6250..b03babc63ac 100644
--- a/addons/account/account_installer.xml
+++ b/addons/account/account_installer.xml
@@ -20,10 +20,11 @@
+
-
+
-
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index c47cf70b673..0c49bed2fb5 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -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
@@ -635,6 +665,26 @@ class account_invoice(osv.osv):
self.create_workflow(cr, uid, ids)
return True
+ # ----------------------------------------
+ # Mail related methods
+ # ----------------------------------------
+
+ def _get_formview_action(self, cr, uid, id, context=None):
+ """ Update form view id of action to open the invoice """
+ action = super(account_invoice, self)._get_formview_action(cr, uid, id, context=context)
+ obj = self.browse(cr, uid, id, context=context)
+ if obj.type == 'in_invoice':
+ model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
+ action.update({
+ 'views': [(view_id, 'form')],
+ })
+ else:
+ model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_form')
+ action.update({
+ 'views': [(view_id, 'form')],
+ })
+ return action
+
# Workflow stuff
#################
@@ -722,7 +772,7 @@ class account_invoice(osv.osv):
inv = self.browse(cr, uid, id)
cur_obj = self.pool.get('res.currency')
- company_currency = inv.company_id.currency_id.id
+ company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
if inv.type in ('out_invoice', 'in_refund'):
sign = 1
else:
@@ -769,6 +819,7 @@ class account_invoice(osv.osv):
return move_lines
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
+ company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id
if not inv.tax_line:
for tax in compute_taxes.values():
ait_obj.create(cr, uid, tax)
@@ -782,7 +833,7 @@ class account_invoice(osv.osv):
if not key in compute_taxes:
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
base = compute_taxes[key]['base']
- if abs(base - tax.base) > inv.company_id.currency_id.rounding:
+ if abs(base - tax.base) > company_currency.rounding:
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
for key in compute_taxes:
if not key in tax_key:
@@ -869,7 +920,7 @@ class account_invoice(osv.osv):
ctx.update({'lang': inv.partner_id.lang})
if not inv.date_invoice:
self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
- company_currency = inv.company_id.currency_id.id
+ company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
# create the analytical lines
# one move line per invoice line
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
@@ -985,7 +1036,8 @@ class account_invoice(osv.osv):
'line_id': line,
'journal_id': journal_id,
'date': date,
- 'narration':inv.comment
+ 'narration': inv.comment,
+ 'company_id': inv.company_id.id,
}
period_id = inv.period_id and inv.period_id.id or False
ctx.update(company_id=inv.company_id.id)
@@ -1438,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:
@@ -1452,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)]}
@@ -1517,8 +1572,7 @@ class account_invoice_line(osv.osv):
if context is None:
context = {}
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
- company_currency = inv.company_id.currency_id.id
-
+ company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
for line in inv.invoice_line:
mres = self.move_line_get_item(cr, uid, line, context)
if not mres:
@@ -1662,8 +1716,7 @@ class account_invoice_tax(osv.osv):
cur_obj = self.pool.get('res.currency')
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
cur = inv.currency_id
- company_currency = inv.company_id.currency_id.id
-
+ company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
for line in inv.invoice_line:
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
val={}
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 @@
@@ -320,7 +320,7 @@
@@ -353,7 +353,7 @@
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 006e2c55f5f..d6c25364784 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -626,7 +626,7 @@ class account_move_line(osv.osv):
(_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']),
(_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']),
(_check_currency_and_amount, "You cannot create journal items with a secondary currency without recording both 'currency' and 'amount currency' field.", ['currency_id','amount_currency']),
- (_check_currency_amount, 'The amount expressed in the secondary currency must be positif when journal item are debit and negatif when journal item are credit.', ['amount_currency']),
+ (_check_currency_amount, 'The amount expressed in the secondary currency must be positive when the journal item is a debit and negative when if it is a credit.', ['amount_currency']),
(_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']),
]
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 13bc694a1cc..e921e639642 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -907,9 +907,7 @@
-
-
+
@@ -2111,10 +2109,8 @@
-
-
-
+
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 @@
TSAJsale
-
-
+
+
@@ -323,8 +323,8 @@
TSCNJsale_refund
-
-
+
+
@@ -334,8 +334,8 @@
TEXJpurchase
-
-
+
+
@@ -344,8 +344,8 @@
TECNJpurchase_refund
-
-
+
+
@@ -355,8 +355,8 @@
TBNKbank
-
-
+
+
@@ -365,8 +365,8 @@
TCHKbank
-
-
+
+
@@ -374,9 +374,9 @@
Cash Journal - (test)TCSHcash
-
-
-
+
+
+
-
-
+
+
@@ -403,8 +403,8 @@
TOEJsituation
-
-
+
+
@@ -413,8 +413,8 @@
USD Bank Journal - (test)TUBKbank
-
-
+
+ formtree,form
diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py
index 498cb1369a8..4f712ad58cc 100644
--- a/addons/account/report/account_general_ledger.py
+++ b/addons/account/report/account_general_ledger.py
@@ -23,7 +23,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
##############################################################################
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 799b9b1c9fb..d8dc45f9a3b 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -99,12 +99,13 @@ class account_invoice_report(osv.osv):
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual': fields.float('Total Residual', readonly=True),
'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
+ 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
}
_order = 'date desc'
def _select(self):
select_str = """
- SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id,
+ SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, sub.country_id,
sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id,
sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state,
sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
@@ -172,7 +173,8 @@ class account_invoice_report(osv.osv):
WHERE a.id = ai.id)
ELSE 1::bigint
END::numeric AS residual,
- ai.commercial_partner_id as commercial_partner_id
+ ai.commercial_partner_id as commercial_partner_id,
+ partner.country_id
"""
return select_str
@@ -180,6 +182,7 @@ class account_invoice_report(osv.osv):
from_str = """
FROM account_invoice_line ail
JOIN account_invoice ai ON ai.id = ail.invoice_id
+ JOIN res_partner partner ON ai.commercial_partner_id = partner.id
LEFT JOIN product_product pr ON pr.id = ail.product_id
left JOIN product_template pt ON pt.id = pr.product_tmpl_id
LEFT JOIN product_uom u ON u.id = ail.uos_id
@@ -195,7 +198,7 @@ class account_invoice_report(osv.osv):
ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id,
ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id,
ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual,
- ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id
+ ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id, partner.country_id
"""
return group_by_str
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 96dc948b09a..5f38db5e71f 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -15,6 +15,7 @@
+
@@ -68,6 +69,7 @@
+
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -144,12 +141,12 @@
-
Description
-
Taxes
-
Quantity
-
Unit Price
-
Disc.(%)
-
Price
+
Description
+
Taxes
+
Quantity
+
Unit Price
+
Disc.(%)
+
Price
@@ -172,29 +169,29 @@
- Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]
- PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]
- Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]
- Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]
- Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]
- Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]
- Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]
+ Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]
+ PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]
+ Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]
+ Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]
+ Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]
+ Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]
+ Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]
\n"
+" From this report, you can have an overview on all depreciation. "
+"The\n"
+" tool search can also be used to personalise your Assets reports "
+"and\n"
+" so, match this analysis to your needs;\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: account_asset
+#: field:account.asset.asset,purchase_value:0
+msgid "Gross Value"
+msgstr ""
+
+#. module: account_asset
+#: field:account.asset.category,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_asset
+#: help:account.asset.category,open_asset:0
+msgid ""
+"Check this if you want to automatically confirm the assets of this category "
+"when created by invoices."
+msgstr ""
+
+#. module: account_asset
+#: field:asset.asset.report,name:0
+msgid "Year"
+msgstr ""
+
+#. module: account_asset
+#: model:ir.model,name:account_asset.model_account_asset_depreciation_line
+msgid "Asset depreciation line"
+msgstr ""
+
+#. module: account_asset
+#: view:account.asset.category:0
+#: field:asset.asset.report,asset_category_id:0
+#: model:ir.model,name:account_asset.model_account_asset_category
+msgid "Asset category"
+msgstr ""
+
+#. module: account_asset
+#: view:asset.asset.report:0
+#: field:asset.asset.report,depreciation_value:0
+msgid "Amount of Depreciation Lines"
+msgstr ""
+
+#. module: account_asset
+#: code:addons/account_asset/wizard/wizard_asset_compute.py:49
+#, python-format
+msgid "Created Asset Moves"
+msgstr ""
+
+#. module: account_asset
+#: field:account.asset.depreciation.line,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: account_asset
+#: help:account.asset.category,method_period:0
+msgid "State here the time between 2 depreciations, in months"
+msgstr ""
+
+#. module: account_asset
+#: field:account.asset.history,date:0
+msgid "Date"
+msgstr ""
+
+#. module: account_asset
+#: field:account.asset.asset,method_number:0
+#: selection:account.asset.asset,method_time:0
+#: field:account.asset.category,method_number:0
+#: selection:account.asset.category,method_time:0
+#: field:account.asset.history,method_number:0
+#: selection:account.asset.history,method_time:0
+#: field:asset.modify,method_number:0
+msgid "Number of Depreciations"
+msgstr ""
+
+#. module: account_asset
+#: view:account.asset.asset:0
+msgid "Create Move"
+msgstr ""
+
+#. module: account_asset
+#: view:account.asset.asset:0
+msgid "Confirm Asset"
+msgstr ""
+
+#. module: account_asset
+#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
+#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
+msgid "Asset Hierarchy"
+msgstr ""
diff --git a/addons/account_asset/security/ir.model.access.csv b/addons/account_asset/security/ir.model.access.csv
old mode 100755
new mode 100644
diff --git a/addons/account_asset/wizard/__init__.py b/addons/account_asset/wizard/__init__.py
old mode 100755
new mode 100644
diff --git a/addons/account_asset/wizard/account_asset_change_duration.py b/addons/account_asset/wizard/account_asset_change_duration.py
old mode 100755
new mode 100644
diff --git a/addons/account_asset/wizard/wizard_asset_compute.py b/addons/account_asset/wizard/wizard_asset_compute.py
old mode 100755
new mode 100644
diff --git a/addons/account_cancel/i18n/th.po b/addons/account_cancel/i18n/th.po
new file mode 100644
index 00000000000..eabcc0814dd
--- /dev/null
+++ b/addons/account_cancel/i18n/th.po
@@ -0,0 +1,23 @@
+# Thai 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-05-15 07:04+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+
+#. module: account_cancel
+#: view:account.invoice:0
+msgid "Cancel"
+msgstr ""
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 \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 \n"
+"PO-Revision-Date: 2013-06-03 07:47+0000\n"
+"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \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.py b/addons/account_followup/account_followup.py
index 036feaaf0e5..715860cab83 100644
--- a/addons/account_followup/account_followup.py
+++ b/addons/account_followup/account_followup.py
@@ -165,9 +165,8 @@ class res_partner(osv.osv):
else:
action_text = partner.latest_followup_level_id_without_lit.manual_action_note or ''
- #Check date: put the minimum date if it existed already
- action_date = (partner.payment_next_action_date and min(partner.payment_next_action_date, fields.date.context_today(self, cr, uid, context=context))
- ) or fields.date.context_today(self, cr, uid, context=context)
+ #Check date: only change when it did not exist already
+ action_date = partner.payment_next_action_date or fields.date.context_today(self, cr, uid, context=context)
# Check responsible: if partner has not got a responsible already, take from follow-up
responsible_id = False
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 @@
res.partner
-
+
+
@@ -97,7 +98,7 @@
+ groups="account.group_account_user"/>
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) \n"
+"PO-Revision-Date: 2013-05-31 10:28+0000\n"
+"Last-Translator: Chertykov Denis \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 @@
account_followup.stat.treeaccount_followup.stat
-
+
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 @@
Account Follow-up multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
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 @@
Payment Mode company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Payment order multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]Payment line multi company rule
-
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
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/account_test.py b/addons/account_test/account_test.py
index 98e27380837..cc60108bf20 100644
--- a/addons/account_test/account_test.py
+++ b/addons/account_test/account_test.py
@@ -24,7 +24,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
##############################################################################
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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \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 \n"
+"Language-Team: Russian \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 ""
+"
\n"
+" Click to create Accounting Test.\n"
+"
\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/__openerp__.py b/addons/account_voucher/__openerp__.py
index 345c3378aa0..a043b15a518 100644
--- a/addons/account_voucher/__openerp__.py
+++ b/addons/account_voucher/__openerp__.py
@@ -67,6 +67,7 @@ This module manages:
'test/sales_payment.yml',
'test/account_voucher_report.yml',
'test/case1_usd_usd.yml',
+ 'test/case1_usd_usd_payment_rate.yml',
'test/case2_usd_eur_debtor_in_eur.yml',
'test/case2_usd_eur_debtor_in_usd.yml',
'test/case3_eur_eur.yml',
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index b176c3b8fd9..850162ccf84 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -26,6 +26,19 @@ from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
from openerp.tools import float_compare
+from openerp.report import report_sxw
+
+class res_currency(osv.osv):
+ _inherit = "res.currency"
+
+ def _get_current_rate(self, cr, uid, ids, name, arg, context=None):
+ if context is None:
+ context = {}
+ res = super(res_currency, self)._get_current_rate(cr, uid, ids, name, arg, context=context)
+ if context.get('voucher_special_currency') in ids and context.get('voucher_special_currency_rate'):
+ res[context.get('voucher_special_currency')] = context.get('voucher_special_currency_rate')
+ return res
+
class res_company(osv.osv):
_inherit = "res.company"
@@ -153,7 +166,7 @@ class account_voucher(osv.osv):
journal = journal_pool.browse(cr, uid, journal_id, context=context)
if journal.currency:
return journal.currency.id
- return False
+ return self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
def _get_partner(self, cr, uid, context=None):
if context is None: context = {}
@@ -222,26 +235,26 @@ class account_voucher(osv.osv):
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, type, context=None):
context = context or {}
if not line_dr_ids and not line_cr_ids:
- return {'value':{}}
+ return {'value':{'writeoff_amount': 0.0}}
line_osv = self.pool.get("account.voucher.line")
line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context)
line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context)
-
#compute the field is_multi_currency that is used to hide/display options linked to secondary currency on the voucher
is_multi_currency = False
- if voucher_currency:
- # if the voucher currency is not False, it means it is different than the company currency and we need to display the options
- is_multi_currency = True
- else:
- #loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to define the options
- for voucher_line in line_dr_ids+line_cr_ids:
- company_currency = False
- company_currency = voucher_line.get('move_line_id', False) and self.pool.get('account.move.line').browse(cr, uid, voucher_line.get('move_line_id'), context=context).company_id.currency_id.id
- if voucher_line.get('currency_id', company_currency) != company_currency:
- is_multi_currency = True
- break
+ #loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to see the options
+ for voucher_line in line_dr_ids+line_cr_ids:
+ line_id = voucher_line.get('id') and self.pool.get('account.voucher.line').browse(cr, uid, voucher_line['id'], context=context).move_line_id.id or voucher_line.get('move_line_id')
+ if line_id and self.pool.get('account.move.line').browse(cr, uid, line_id, context=context).currency_id:
+ is_multi_currency = True
+ break
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, type), 'is_multi_currency': is_multi_currency}}
+ def _get_journal_currency(self, cr, uid, ids, name, args, context=None):
+ res = {}
+ for voucher in self.browse(cr, uid, ids, context=context):
+ res[voucher.id] = voucher.journal_id.currency and voucher.journal_id.currency.id or voucher.company_id.currency_id.id
+ return res
+
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
if not ids: return {}
currency_obj = self.pool.get('res.currency')
@@ -258,20 +271,48 @@ class account_voucher(osv.osv):
return res
def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
- if not ids: return {}
+ if context is None:
+ context = {}
+ res = {}
+ ctx = context.copy()
+ for v in self.browse(cr, uid, ids, context=context):
+ ctx.update({'date': v.date})
+ #make a new call to browse in order to have the right date in the context, to get the right currency rate
+ voucher = self.browse(cr, uid, v.id, context=ctx)
+ ctx.update({
+ 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,
+ 'voucher_special_currency_rate': voucher.currency_id.rate * voucher.payment_rate,})
+ res[voucher.id] = self.pool.get('res.currency').compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, voucher.amount, context=ctx)
+ return res
+
+ def _get_currency_help_label(self, cr, uid, currency_id, payment_rate, payment_rate_currency_id, context=None):
+ """
+ This function builds a string to help the users to understand the behavior of the payment rate fields they can specify on the voucher.
+ This string is only used to improve the usability in the voucher form view and has no other effect.
+
+ :param currency_id: the voucher currency
+ :type currency_id: integer
+ :param payment_rate: the value of the payment_rate field of the voucher
+ :type payment_rate: float
+ :param payment_rate_currency_id: the value of the payment_rate_currency_id field of the voucher
+ :type payment_rate_currency_id: integer
+ :return: translated string giving a tip on what's the effect of the current payment rate specified
+ :rtype: str
+ """
+ rml_parser = report_sxw.rml_parse(cr, uid, 'currency_help_label', context=context)
+ currency_pool = self.pool.get('res.currency')
+ currency_str = payment_rate_str = ''
+ if currency_id:
+ currency_str = rml_parser.formatLang(1, currency_obj=currency_pool.browse(cr, uid, currency_id, context=context))
+ if payment_rate_currency_id:
+ payment_rate_str = rml_parser.formatLang(payment_rate, currency_obj=currency_pool.browse(cr, uid, payment_rate_currency_id, context=context))
+ currency_help_label = _('At the operation date, the exchange rate was\n%s = %s') % (currency_str, payment_rate_str)
+ return currency_help_label
+
+ def _fnct_currency_help_label(self, cr, uid, ids, name, args, context=None):
res = {}
- rate = 1.0
for voucher in self.browse(cr, uid, ids, context=context):
- if voucher.currency_id:
- if voucher.company_id.currency_id.id == voucher.payment_rate_currency_id.id:
- rate = 1 / voucher.payment_rate
- else:
- ctx = context.copy()
- ctx.update({'date': voucher.date})
- voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate
- company_currency_rate = voucher.company_id.currency_id.rate
- rate = voucher_rate * company_currency_rate
- res[voucher.id] = voucher.amount / rate
+ res[voucher.id] = self._get_currency_help_label(cr, uid, voucher.currency_id.id, voucher.payment_rate, voucher.payment_rate_currency_id.id, context=context)
return res
_name = 'account.voucher'
@@ -304,8 +345,7 @@ class account_voucher(osv.osv):
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
-# 'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', readonly=True),
+ 'currency_id': fields.function(_get_journal_currency, type='many2one', relation='res.currency', string='Currency', readonly=True, required=True),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state':fields.selection(
[('draft','Draft'),
@@ -346,6 +386,7 @@ class account_voucher(osv.osv):
help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
'paid_amount_in_company_currency': fields.function(_paid_amount_in_company_currency, string='Paid Amount in Company Currency', type='float', readonly=True),
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
+ 'currency_help_label': fields.function(_fnct_currency_help_label, type='text', string="Helping Sentence", help="This sentence helps you to know how to specify the payment rate by giving you the direct effect it has"),
}
_defaults = {
'active': True,
@@ -422,6 +463,8 @@ class account_voucher(osv.osv):
partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position')
line_pool = self.pool.get('account.voucher.line')
+ if not line_ids:
+ line_ids = []
res = {
'tax_amount': False,
'amount': False,
@@ -516,23 +559,26 @@ class account_voucher(osv.osv):
return default
def onchange_rate(self, cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=None):
- res = {'value': {'paid_amount_in_company_currency': amount}}
- company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id
- if rate and amount and currency_id:# and currency_id == payment_rate_currency_id:
- voucher_rate = self.pool.get('res.currency').browse(cr, uid, currency_id, context).rate
- if company_currency.id == payment_rate_currency_id:
- company_rate = rate
- else:
- company_rate = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.rate
- res['value']['paid_amount_in_company_currency'] = amount / voucher_rate * company_rate
+ res = {'value': {'paid_amount_in_company_currency': amount, 'currency_help_label': self._get_currency_help_label(cr, uid, currency_id, rate, payment_rate_currency_id, context=context)}}
+ if rate and amount and currency_id:
+ company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id
+ #context should contain the date, the payment currency and the payment rate specified on the voucher
+ amount_in_company_currency = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency.id, amount, context=context)
+ res['value']['paid_amount_in_company_currency'] = amount_in_company_currency
return res
def onchange_amount(self, cr, uid, ids, amount, rate, partner_id, journal_id, currency_id, ttype, date, payment_rate_currency_id, company_id, context=None):
if context is None:
context = {}
- res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
ctx = context.copy()
ctx.update({'date': date})
+ #read the voucher rate with the right date in the context
+ currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
+ voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
+ ctx.update({
+ 'voucher_special_currency': payment_rate_currency_id,
+ 'voucher_special_currency_rate': rate * voucher_rate})
+ res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx)
vals = self.onchange_rate(cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
for key in vals.keys():
res[key].update(vals[key])
@@ -546,6 +592,7 @@ class account_voucher(osv.osv):
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
company_id = journal.company_id.id
payment_rate = 1.0
+ currency_id = currency_id or journal.company_id.currency_id.id
payment_rate_currency_id = currency_id
ctx = context.copy()
ctx.update({'date': date})
@@ -561,24 +608,62 @@ class account_voucher(osv.osv):
# is not in the voucher currency
payment_rate_currency_id = voucher_line['currency_id']
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
- voucher_currency_id = currency_id or journal.company_id.currency_id.id
- payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate
+ payment_rate = tmp / currency_obj.browse(cr, uid, currency_id, context=ctx).rate
break
+ vals['value'].update({
+ 'payment_rate': payment_rate,
+ 'currency_id': currency_id,
+ 'payment_rate_currency_id': payment_rate_currency_id
+ })
+ #read the voucher rate with the right date in the context
+ voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
+ ctx.update({
+ 'voucher_special_currency_rate': payment_rate * voucher_rate,
+ 'voucher_special_currency': payment_rate_currency_id})
res = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
for key in res.keys():
vals[key].update(res[key])
- vals['value'].update({'payment_rate': payment_rate})
- if payment_rate_currency_id:
- vals['value'].update({'payment_rate_currency_id': payment_rate_currency_id})
return vals
+ def basic_onchange_partner(self, cr, uid, ids, partner_id, journal_id, ttype, context=None):
+ partner_pool = self.pool.get('res.partner')
+ journal_pool = self.pool.get('account.journal')
+ res = {'value': {'account_id': False}}
+ if not partner_id or not journal_id:
+ return res
+
+ journal = journal_pool.browse(cr, uid, journal_id, context=context)
+ partner = partner_pool.browse(cr, uid, partner_id, context=context)
+ account_id = False
+ if journal.type in ('sale','sale_refund'):
+ account_id = partner.property_account_receivable.id
+ elif journal.type in ('purchase', 'purchase_refund','expense'):
+ account_id = partner.property_account_payable.id
+ else:
+ account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
+
+ res['value']['account_id'] = account_id
+ return res
+
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=None):
if not journal_id:
return {}
- res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
- vals = self.recompute_payment_rate(cr, uid, ids, res, currency_id, date, ttype, journal_id, amount, context=context)
+ if context is None:
+ context = {}
+ #TODO: comment me and use me directly in the sales/purchases views
+ res = self.basic_onchange_partner(cr, uid, ids, partner_id, journal_id, ttype, context=context)
+ if ttype in ['sale', 'purchase']:
+ return res
+ ctx = context.copy()
+ # not passing the payment_rate currency and the payment_rate in the context but it's ok because they are reset in recompute_payment_rate
+ ctx.update({'date': date})
+ vals = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx)
+ vals2 = self.recompute_payment_rate(cr, uid, ids, vals, currency_id, date, ttype, journal_id, amount, context=context)
for key in vals.keys():
res[key].update(vals[key])
+ for key in vals2.keys():
+ res[key].update(vals2[key])
+ #TODO: can probably be removed now
#TODO: onchange_partner_id() should not returns [pre_line, line_dr_ids, payment_rate...] for type sale, and not
# [pre_line, line_cr_ids, payment_rate...] for type purchase.
# We should definitively split account.voucher object in two and make distinct on_change functions. In the
@@ -621,8 +706,6 @@ class account_voucher(osv.osv):
if context is None:
context = {}
context_multi_currency = context.copy()
- if date:
- context_multi_currency.update({'date': date})
currency_pool = self.pool.get('res.currency')
move_line_pool = self.pool.get('account.move.line')
@@ -646,18 +729,6 @@ class account_voucher(osv.osv):
journal = journal_pool.browse(cr, uid, journal_id, context=context)
partner = partner_pool.browse(cr, uid, partner_id, context=context)
currency_id = currency_id or journal.company_id.currency_id.id
- account_id = False
- if journal.type in ('sale','sale_refund'):
- account_id = partner.property_account_receivable.id
- elif journal.type in ('purchase', 'purchase_refund','expense'):
- account_id = partner.property_account_payable.id
- else:
- account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
-
- default['value']['account_id'] = account_id
-
- if journal.type not in ('cash', 'bank'):
- return default
total_credit = 0.0
total_debit = 0.0
@@ -715,12 +786,13 @@ class account_voucher(osv.osv):
if _remove_noise_in_o2m():
continue
- if line.currency_id and currency_id==line.currency_id.id:
+ if line.currency_id and currency_id == line.currency_id.id:
amount_original = abs(line.amount_currency)
amount_unreconciled = abs(line.amount_residual_currency)
else:
- amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0)
- amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual))
+ #always use the amount booked in the company currency as the basis of the conversion into the voucher currency
+ amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0, context=context_multi_currency)
+ amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual), context=context_multi_currency)
line_currency_id = line.currency_id and line.currency_id.id or company_currency
rs = {
'name':line.move_id.name,
@@ -766,10 +838,15 @@ class account_voucher(osv.osv):
if context is None:
context = {}
res = {'value': {}}
- #set the default payment rate of the voucher and compute the paid amount in company currency
- if currency_id and currency_id == payment_rate_currency_id:
+ if currency_id:
+ #set the default payment rate of the voucher and compute the paid amount in company currency
ctx = context.copy()
ctx.update({'date': date})
+ #read the voucher rate with the right date in the context
+ voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
+ ctx.update({
+ 'voucher_special_currency_rate': payment_rate * voucher_rate,
+ 'voucher_special_currency': payment_rate_currency_id})
vals = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
for key in vals.keys():
res[key].update(vals[key])
@@ -789,7 +866,8 @@ class account_voucher(osv.osv):
period_pool = self.pool.get('account.period')
currency_obj = self.pool.get('res.currency')
ctx = context.copy()
- ctx.update({'company_id': company_id})
+ ctx.update({'company_id': company_id, 'account_period_prefer_normal': True})
+ voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
pids = period_pool.find(cr, uid, date, context=ctx)
if pids:
res['value'].update({'period_id':pids[0]})
@@ -798,9 +876,8 @@ class account_voucher(osv.osv):
payment_rate = 1.0
if payment_rate_currency_id != currency_id:
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
- voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate
- vals = self.onchange_payment_rate_currency(cr, uid, ids, currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context)
+ vals = self.onchange_payment_rate_currency(cr, uid, ids, voucher_currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context)
vals['value'].update({'payment_rate': payment_rate})
for key in vals.keys():
res[key].update(vals[key])
@@ -823,7 +900,15 @@ class account_voucher(osv.osv):
currency_id = False
if journal.currency:
currency_id = journal.currency.id
+ else:
+ currency_id = journal.company_id.currency_id.id
vals['value'].update({'currency_id': currency_id})
+ #in case we want to register the payment directly from an invoice, it's confusing to allow to switch the journal
+ #without seeing that the amount is expressed in the journal currency, and not in the invoice currency. So to avoid
+ #this common mistake, we simply reset the amount to 0 if the currency is not the invoice currency.
+ if context.get('payment_expected_currency') and currency_id != context.get('payment_expected_currency'):
+ vals['value']['amount'] = 0
+ amount = 0
res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context)
for key in res.keys():
vals[key].update(res[key])
@@ -905,8 +990,8 @@ class account_voucher(osv.osv):
current_currency = self._get_current_currency(cr, uid, voucher_id, context)
if current_currency <> company_currency:
context_multi_currency = context.copy()
- voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
- context_multi_currency.update({'date': voucher_brw.date})
+ voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
+ context_multi_currency.update({'date': voucher.date})
return context_multi_currency
return context
@@ -921,33 +1006,33 @@ class account_voucher(osv.osv):
:return: mapping between fieldname and value of account move line to create
:rtype: dict
'''
- voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
+ voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
debit = credit = 0.0
# TODO: is there any other alternative then the voucher type ??
# ANSWER: We can have payment and receipt "In Advance".
# TODO: Make this logic available.
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
- if voucher_brw.type in ('purchase', 'payment'):
- credit = voucher_brw.paid_amount_in_company_currency
- elif voucher_brw.type in ('sale', 'receipt'):
- debit = voucher_brw.paid_amount_in_company_currency
+ if voucher.type in ('purchase', 'payment'):
+ credit = voucher.paid_amount_in_company_currency
+ elif voucher.type in ('sale', 'receipt'):
+ debit = voucher.paid_amount_in_company_currency
if debit < 0: credit = -debit; debit = 0.0
if credit < 0: debit = -credit; credit = 0.0
sign = debit - credit < 0 and -1 or 1
#set the first line of the voucher
move_line = {
- 'name': voucher_brw.name or '/',
+ 'name': voucher.name or '/',
'debit': debit,
'credit': credit,
- 'account_id': voucher_brw.account_id.id,
+ 'account_id': voucher.account_id.id,
'move_id': move_id,
- 'journal_id': voucher_brw.journal_id.id,
- 'period_id': voucher_brw.period_id.id,
- 'partner_id': voucher_brw.partner_id.id,
+ 'journal_id': voucher.journal_id.id,
+ 'period_id': voucher.period_id.id,
+ 'partner_id': voucher.partner_id.id,
'currency_id': company_currency <> current_currency and current_currency or False,
- 'amount_currency': company_currency <> current_currency and sign * voucher_brw.amount or 0.0,
- 'date': voucher_brw.date,
- 'date_maturity': voucher_brw.date_due
+ 'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0,
+ 'date': voucher.date,
+ 'date_maturity': voucher.date_due
}
return move_line
@@ -960,31 +1045,31 @@ class account_voucher(osv.osv):
:rtype: dict
'''
seq_obj = self.pool.get('ir.sequence')
- voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
- if voucher_brw.number:
- name = voucher_brw.number
- elif voucher_brw.journal_id.sequence_id:
- if not voucher_brw.journal_id.sequence_id.active:
+ voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
+ if voucher.number:
+ name = voucher.number
+ elif voucher.journal_id.sequence_id:
+ if not voucher.journal_id.sequence_id.active:
raise osv.except_osv(_('Configuration Error !'),
_('Please activate the sequence of selected journal !'))
c = dict(context)
- c.update({'fiscalyear_id': voucher_brw.period_id.fiscalyear_id.id})
- name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=c)
+ c.update({'fiscalyear_id': voucher.period_id.fiscalyear_id.id})
+ name = seq_obj.next_by_id(cr, uid, voucher.journal_id.sequence_id.id, context=c)
else:
raise osv.except_osv(_('Error!'),
_('Please define a sequence on the journal.'))
- if not voucher_brw.reference:
+ if not voucher.reference:
ref = name.replace('/','')
else:
- ref = voucher_brw.reference
+ ref = voucher.reference
move = {
'name': name,
- 'journal_id': voucher_brw.journal_id.id,
- 'narration': voucher_brw.narration,
- 'date': voucher_brw.date,
+ 'journal_id': voucher.journal_id.id,
+ 'narration': voucher.narration,
+ 'date': voucher.date,
'ref': ref,
- 'period_id': voucher_brw.period_id.id,
+ 'period_id': voucher.period_id.id,
}
return move
@@ -1011,7 +1096,10 @@ class account_voucher(osv.osv):
raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
# the receivable/payable account may have a secondary currency, which render this field mandatory
- account_currency_id = company_currency <> current_currency and current_currency or False
+ if line.account_id.currency_id:
+ account_currency_id = line.account_id.currency_id.id
+ else:
+ account_currency_id = company_currency <> current_currency and current_currency or False
move_line = {
'journal_id': line.voucher_id.journal_id.id,
'period_id': line.voucher_id.period_id.id,
@@ -1054,16 +1142,11 @@ class account_voucher(osv.osv):
:return: the amount in the currency of the voucher's company
:rtype: float
'''
+ if context is None:
+ context = {}
currency_obj = self.pool.get('res.currency')
voucher = self.browse(cr, uid, voucher_id, context=context)
- res = amount
- if voucher.payment_rate_currency_id.id == voucher.company_id.currency_id.id:
- # the rate specified on the voucher is for the company currency
- res = currency_obj.round(cr, uid, voucher.company_id.currency_id, (amount * voucher.payment_rate))
- else:
- # the rate specified on the voucher is not relevant, we use all the rates in the system
- res = currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context)
- return res
+ return currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context)
def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None):
'''
@@ -1087,39 +1170,45 @@ class account_voucher(osv.osv):
tot_line = line_total
rec_lst_ids = []
- voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
+ date = self.read(cr, uid, voucher_id, ['date'], context=context)['date']
ctx = context.copy()
- ctx.update({'date': voucher_brw.date})
+ ctx.update({'date': date})
+ voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context=ctx)
+ voucher_currency = voucher.journal_id.currency or voucher.company_id.currency_id
+ ctx.update({
+ 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
+ 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
- for line in voucher_brw.line_ids:
+ for line in voucher.line_ids:
#create one move line per voucher line where amount is not 0.0
# AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
if not line.amount and not (line.move_line_id and not float_compare(line.move_line_id.debit, line.move_line_id.credit, precision_rounding=prec) and not float_compare(line.move_line_id.debit, 0.0, precision_rounding=prec)):
continue
# convert the amount set on the voucher line into the currency of the voucher's company
- amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher_brw.id, context=ctx)
+ # this calls res_curreny.compute() with the right context, so that it will take either the rate on the voucher if it is relevant or will use the default behaviour
+ amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher.id, context=ctx)
# if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the
# currency rate difference
if line.amount == line.amount_unreconciled:
if not line.move_line_id:
raise osv.except_osv(_('Wrong voucher line'),_("The invoice you are willing to pay is not valid anymore."))
- sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
+ sign = voucher.type in ('payment', 'purchase') and -1 or 1
currency_rate_difference = sign * (line.move_line_id.amount_residual - amount)
else:
currency_rate_difference = 0.0
move_line = {
- 'journal_id': voucher_brw.journal_id.id,
- 'period_id': voucher_brw.period_id.id,
+ 'journal_id': voucher.journal_id.id,
+ 'period_id': voucher.period_id.id,
'name': line.name or '/',
'account_id': line.account_id.id,
'move_id': move_id,
- 'partner_id': voucher_brw.partner_id.id,
+ 'partner_id': voucher.partner_id.id,
'currency_id': line.move_line_id and (company_currency <> line.move_line_id.currency_id.id and line.move_line_id.currency_id.id) or False,
'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
'quantity': 1,
'credit': 0.0,
'debit': 0.0,
- 'date': voucher_brw.date
+ 'date': voucher.date
}
if amount < 0:
amount = -amount
@@ -1135,9 +1224,9 @@ class account_voucher(osv.osv):
tot_line -= amount
move_line['credit'] = amount
- if voucher_brw.tax_id and voucher_brw.type in ('sale', 'purchase'):
+ if voucher.tax_id and voucher.type in ('sale', 'purchase'):
move_line.update({
- 'account_tax_id': voucher_brw.tax_id.id,
+ 'account_tax_id': voucher.tax_id.id,
})
if move_line.get('account_tax_id', False):
@@ -1149,7 +1238,6 @@ class account_voucher(osv.osv):
foreign_currency_diff = 0.0
amount_currency = False
if line.move_line_id:
- voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id
# We want to set it on the account move line as soon as the original line had a foreign currency
if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
# we compute the amount in that foreign currency.
@@ -1157,22 +1245,19 @@ class account_voucher(osv.osv):
# if the voucher and the voucher line share the same currency, there is no computation to do
sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
amount_currency = sign * (line.amount)
- elif line.move_line_id.currency_id.id == voucher_brw.payment_rate_currency_id.id:
- # if the rate is specified on the voucher, we must use it
- voucher_rate = currency_obj.browse(cr, uid, voucher_currency, context=ctx).rate
- amount_currency = (move_line['debit'] - move_line['credit']) * voucher_brw.payment_rate * voucher_rate
else:
- # otherwise we use the rates of the system (giving the voucher date in the context)
+ # if the rate is specified on the voucher, it will be used thanks to the special keys in the context
+ # otherwise we use the rates of the system
amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
- if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:
- sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
+ if line.amount == line.amount_unreconciled:
+ sign = voucher.type in ('payment', 'purchase') and -1 or 1
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
move_line['amount_currency'] = amount_currency
voucher_line = move_line_obj.create(cr, uid, move_line)
rec_ids = [voucher_line, line.move_line_id.id]
- if not currency_obj.is_zero(cr, uid, voucher_brw.company_id.currency_id, currency_rate_difference):
+ if not currency_obj.is_zero(cr, uid, voucher.company_id.currency_id, currency_rate_difference):
# Change difference entry in company currency
exch_lines = self._get_exchange_lines(cr, uid, line, move_id, currency_rate_difference, company_currency, current_currency, context=context)
new_id = move_line_obj.create(cr, uid, exch_lines[0],context)
@@ -1219,32 +1304,32 @@ class account_voucher(osv.osv):
currency_obj = self.pool.get('res.currency')
move_line = {}
- voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
- current_currency_obj = voucher_brw.currency_id or voucher_brw.journal_id.company_id.currency_id
+ voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
+ current_currency_obj = voucher.currency_id or voucher.journal_id.company_id.currency_id
if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total):
diff = line_total
account_id = False
write_off_name = ''
- if voucher_brw.payment_option == 'with_writeoff':
- account_id = voucher_brw.writeoff_acc_id.id
- write_off_name = voucher_brw.comment
- elif voucher_brw.type in ('sale', 'receipt'):
- account_id = voucher_brw.partner_id.property_account_receivable.id
+ if voucher.payment_option == 'with_writeoff':
+ account_id = voucher.writeoff_acc_id.id
+ write_off_name = voucher.comment
+ elif voucher.type in ('sale', 'receipt'):
+ account_id = voucher.partner_id.property_account_receivable.id
else:
- account_id = voucher_brw.partner_id.property_account_payable.id
- sign = voucher_brw.type == 'payment' and -1 or 1
+ account_id = voucher.partner_id.property_account_payable.id
+ sign = voucher.type == 'payment' and -1 or 1
move_line = {
'name': write_off_name or name,
'account_id': account_id,
'move_id': move_id,
- 'partner_id': voucher_brw.partner_id.id,
- 'date': voucher_brw.date,
+ 'partner_id': voucher.partner_id.id,
+ 'date': voucher.date,
'credit': diff > 0 and diff or 0.0,
'debit': diff < 0 and -diff or 0.0,
- 'amount_currency': company_currency <> current_currency and (sign * -1 * voucher_brw.writeoff_amount) or False,
+ 'amount_currency': company_currency <> current_currency and (sign * -1 * voucher.writeoff_amount) or False,
'currency_id': company_currency <> current_currency and current_currency or False,
- 'analytic_account_id': voucher_brw.analytic_id and voucher_brw.analytic_id.id or False,
+ 'analytic_account_id': voucher.analytic_id and voucher.analytic_id.id or False,
}
return move_line
@@ -1345,13 +1430,17 @@ class account_voucher_line(osv.osv):
_order = "move_line_id"
# If the payment is in the same currency than the invoice, we keep the same amount
- # Otherwise, we compute from company currency to payment currency
+ # Otherwise, we compute from invoice currency to payment currency
def _compute_balance(self, cr, uid, ids, name, args, context=None):
currency_pool = self.pool.get('res.currency')
rs_data = {}
for line in self.browse(cr, uid, ids, context=context):
ctx = context.copy()
ctx.update({'date': line.voucher_id.date})
+ voucher_rate = self.pool.get('res.currency').read(cr, uid, line.voucher_id.currency_id.id, ['rate'], context=ctx)['rate']
+ ctx.update({
+ 'voucher_special_currency': line.voucher_id.payment_rate_currency_id and line.voucher_id.payment_rate_currency_id.id or False,
+ 'voucher_special_currency_rate': line.voucher_id.payment_rate * voucher_rate})
res = {}
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
voucher_currency = line.voucher_id.currency_id and line.voucher_id.currency_id.id or company_currency
@@ -1361,13 +1450,11 @@ class account_voucher_line(osv.osv):
res['amount_original'] = 0.0
res['amount_unreconciled'] = 0.0
elif move_line.currency_id and voucher_currency==move_line.currency_id.id:
- res['amount_original'] = currency_pool.compute(cr, uid, move_line.currency_id.id, voucher_currency, abs(move_line.amount_currency), context=ctx)
- res['amount_unreconciled'] = currency_pool.compute(cr, uid, move_line.currency_id and move_line.currency_id.id or company_currency, voucher_currency, abs(move_line.amount_residual_currency), context=ctx)
- elif move_line and move_line.credit > 0:
- res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit, context=ctx)
- res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx)
+ res['amount_original'] = abs(move_line.amount_currency)
+ res['amount_unreconciled'] = abs(move_line.amount_residual_currency)
else:
- res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit, context=ctx)
+ #always use the amount booked in the company currency as the basis of the conversion into the voucher currency
+ res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit or move_line.debit or 0.0, context=ctx)
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx)
rs_data[line.id] = res
diff --git a/addons/account_voucher/html/account_illu_01.png b/addons/account_voucher/html/account_illu_01.png
new file mode 100644
index 00000000000..2e0dbf4aac2
Binary files /dev/null and b/addons/account_voucher/html/account_illu_01.png differ
diff --git a/addons/account_voucher/html/account_sc_00.png b/addons/account_voucher/html/account_sc_00.png
new file mode 100644
index 00000000000..63332b46575
Binary files /dev/null and b/addons/account_voucher/html/account_sc_00.png differ
diff --git a/addons/account_voucher/html/account_sc_02.png b/addons/account_voucher/html/account_sc_02.png
new file mode 100644
index 00000000000..709e444ba0d
Binary files /dev/null and b/addons/account_voucher/html/account_sc_02.png differ
diff --git a/addons/account_voucher/html/account_sc_03.png b/addons/account_voucher/html/account_sc_03.png
new file mode 100644
index 00000000000..a3e3afc34c0
Binary files /dev/null and b/addons/account_voucher/html/account_sc_03.png differ
diff --git a/addons/account_voucher/html/account_sc_04.png b/addons/account_voucher/html/account_sc_04.png
new file mode 100644
index 00000000000..458c8280c26
Binary files /dev/null and b/addons/account_voucher/html/account_sc_04.png differ
diff --git a/addons/account_voucher/html/account_sc_06.png b/addons/account_voucher/html/account_sc_06.png
new file mode 100644
index 00000000000..9605506c6a5
Binary files /dev/null and b/addons/account_voucher/html/account_sc_06.png differ
diff --git a/addons/account_voucher/html/bazile.png b/addons/account_voucher/html/bazile.png
new file mode 100644
index 00000000000..30f37e70b4a
Binary files /dev/null and b/addons/account_voucher/html/bazile.png differ
diff --git a/addons/account_voucher/html/index.html b/addons/account_voucher/html/index.html
new file mode 100644
index 00000000000..d59c110dde5
--- /dev/null
+++ b/addons/account_voucher/html/index.html
@@ -0,0 +1,140 @@
+
+
+ Create and send professional looking invoices & get paid
+ online. It automatically integrates with other apps to bill
+ automatically based on your activities.
+
+ Send invoices directly to your clients in just a click. The
+ invoice is automatically attached to the email as a PDF file.
+
+
+
+
+
+
+
+
+
+
+
Get Paid Faster
+
Electronic invoicing and automated follow-ups
+
+
+
+
+
+
+Get paid online with paypal or other payment processing service. Get rid of
+the stress of having to constantly remind your debtors. Simply set-up and
+automate follow-ups to get paid quickly.
+
+
+
+
+
+
+
+
+
Connect Your Bank Accounts
+
+
+Import your bank statements and reconcile them in just a few clicks. Prepare
+payment orders based on your supplier invoices and payment terms.
+
+
+
+
+
+
+
+
+
+
+
+
Analyse Your Sales & Costs
+
+
+
+
+
+Get direct access to key information with dynamic and customizable dashboards.
+Analyse your invoicing by product, customer, salesperson, etc.
+
+
+
+
+
+
+
+
Integration With Other Apps
+
+
+Bill automatically based on sales orders, delivery orders, contracts or on time and
+material. Define recurrencies to produce recurring invoice automatically.
+
+
+
+
+
+
+
+
+
+
+
+
Many companies already enjoy it
+
Hear what they have to say !
+
+
+
+
+ OpenERP allowed us to automate sending 10.000 invoices per month.
+
+
+
+
Примечание: если вы не запрашивали сброс пароля, просто проигнорируйте "
+"данное письмо
"
#. 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 @@
diff --git a/addons/auth_signup/static/src/js/auth_signup.js b/addons/auth_signup/static/src/js/auth_signup.js
index bbaf907c625..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() {
@@ -57,14 +57,14 @@ openerp.auth_signup = function(instance) {
self.signup_enabled = result.signup;
self.reset_password_enabled = result.reset_password;
if (!self.signup_enabled || self.$("form input[name=login]").val()){
- self.set('login_mode', 'default');
+ self.set('login_mode', self.params.type || 'default');
} else {
self.set('login_mode', 'signup');
}
});
} else {
// TODO: support multiple database mode
- self.set('login_mode', 'default');
+ self.set('login_mode', self.params.type || 'default');
}
});
},
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
- Select a filter or a timer as condition. 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.
- To create a new filter:
- - 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)
- - 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"
+
+ Select when the action must be run, and add filters and/or timing conditions.
+
+ In order to create a new filter:
+
+
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)
+
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"
+
The filter must therefore be available in this page.
@@ -76,6 +84,7 @@
+
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 \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) \n"
+"PO-Revision-Date: 2013-05-31 10:23+0000\n"
+"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \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_import/static/lib/select2/README.md b/addons/base_import/static/lib/select2/README.md
old mode 100755
new mode 100644
diff --git a/addons/base_import/static/lib/select2/select2.css b/addons/base_import/static/lib/select2/select2.css
old mode 100755
new mode 100644
diff --git a/addons/base_import/static/lib/select2/select2.js b/addons/base_import/static/lib/select2/select2.js
old mode 100755
new mode 100644
diff --git a/addons/base_import/static/lib/select2/spinner.gif b/addons/base_import/static/lib/select2/spinner.gif
old mode 100755
new mode 100644
diff --git a/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py b/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py
old mode 100644
new mode 100755
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
index 43b452b82e2..9fb6cd11219 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import uno
from com.sun.star.task import XJobExecutor
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
index ba69174ffc6..2dce1750e34 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import os
import uno
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
index b85a9d9bb06..e0b66780e8b 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import string
import unohelper
@@ -72,7 +49,7 @@ class Change( unohelper.Base, XJobExecutor ):
'XML-RPC': 'http://',
'XML-RPC secure': 'https://',
'NET-RPC': 'socket://',
- }
+ }
host=port=protocol=''
if docinfo.getUserFieldValue(0):
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', docinfo.getUserFieldValue(0) or '')
@@ -80,7 +57,7 @@ class Change( unohelper.Base, XJobExecutor ):
port = m.group(3)
protocol = m.group(1)
if protocol:
- for (key, value) in self.protocol.iteritems():
+ for (key, value) in self.protocol.iteritems():
if value==protocol:
protocol=key
break
@@ -102,7 +79,7 @@ class Change( unohelper.Base, XJobExecutor ):
self.win.addButton( 'btnNext', -2, -5, 30, 15, 'Next', actionListenerProc = self.btnNext_clicked )
self.win.addButton( 'btnCancel', -2 - 30 - 5 ,-5, 30, 15, 'Cancel', actionListenerProc = self.btnCancel_clicked )
-
+
for i in self.protocol.keys():
self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() )
self.win.doModalDialog( "lstProtocol", protocol)
@@ -110,27 +87,27 @@ class Change( unohelper.Base, XJobExecutor ):
def btnNext_clicked(self, oActionEvent):
global url
aVal=''
- #aVal= Fetature used
+ #aVal= Fetature used
try:
url = self.protocol[self.win.getListBoxSelectedItem("lstProtocol")]+self.win.getEditText("txtHost")+":"+self.win.getEditText("txtPort")
self.sock=RPCSession(url)
desktop=getDesktop()
doc = desktop.getCurrentComponent()
- docinfo=doc.getDocumentInfo()
+ docinfo=doc.getDocumentInfo()
docinfo.setUserFieldValue(0,url)
res=self.sock.listdb()
self.win.endExecute()
ServerParameter(aVal,url)
except :
- import traceback,sys
+ import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
- self.logobj.log_write('ServerParameter', LOG_ERROR, info)
+ self.logobj.log_write('ServerParameter', LOG_ERROR, info)
ErrorDialog("Connection to server is fail. Please check your Server Parameter.", "", "Error!")
self.win.endExecute()
-
+
def btnCancel_clicked(self,oActionEvent):
self.win.endExecute()
-
+
if __name__<>"package" and __name__=="__main__":
Change(None)
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
index c1fa8b22a85..17cc25687b1 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import unohelper
import string
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
index ffa88a8cd06..b8abcb1dc6c 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import uno
import unohelper
@@ -81,7 +57,7 @@ class ConvertFieldsToBraces( unohelper.Base, XJobExecutor ):
if __name__<>"package":
ConvertFieldsToBraces(None)
else:
- g_ImplementationHelper.addImplementation( ConvertFieldsToBraces, "org.openoffice.openerp.report.convertFB", ("com.sun.star.task.Job",),)
+ g_ImplementationHelper.addImplementation( ConvertFieldsToBraces, "org.openoffice.openerp.report.convertFB", ("com.sun.star.task.Job",),)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
index d2605ce73e4..a12becdc68c 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import os
import uno
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
index 9e3b175b67b..896a5954c7d 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import string
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
index 90f85e57a0d..8ed4d2c25e8 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
@@ -1,50 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
-
+#############################################################################
import uno
import string
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
index 85059d7712c..11c74555447 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
if __name__<>"package":
from ServerParameter import *
from lib.gui import *
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
index bc7d439c76d..ef1d3548a6e 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import uno
import string
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
index 138c68b690e..3c6316d9fdb 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import string
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
index f5e0972d2dd..b6edaecdc44 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import string
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
index 7e83910a427..dbd0a51d66d 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import uno
import string
@@ -201,7 +177,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
if self.win.getListBoxSelectedItem("lstResourceType")=='OpenOffice':
params['report_type']=file_type
self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'write', int(docinfo.getUserFieldValue(2)), params)
-
+
# Call upload_report as the *last* step, as it will call register_all() and cause the report service
# to be loaded - which requires all the data to be correct in the database
self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'upload_report', int(docinfo.getUserFieldValue(2)),base64.encodestring(data),file_type,{})
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
index c399634bfe5..b09b02699b0 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import uno
import string
import unohelper
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
index 05f81a5c5b2..132882e0932 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import uno
import string
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
index 0ccd1c9d011..d7f93351fac 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import Expression
import lib
import Fields
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
index 4740c61b178..897f9abd00c 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
@@ -1,49 +1,26 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
+
import compileall
compileall.compile_dir('package')
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
index 8511bb8343d..cf82d0e1a76 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
@@ -1,47 +1,23 @@
##########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
##############################################################################
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
index cb86f5f429a..f44404eaa16 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
@@ -1,47 +1,23 @@
##########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
##############################################################################
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
index 1d10f0f6a4c..52af0821790 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
@@ -1,47 +1,23 @@
##########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
##############################################################################
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
index d75469ca658..92b5ab750ca 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
@@ -1,47 +1,23 @@
##########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
+# See: http://www.gnu.org/licenses/lgpl.html
#
##############################################################################
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
index 60edbc71d96..f8d90c30d75 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
@@ -1,49 +1,25 @@
-##########################################################################
+#########################################################################
#
-# Portions of this file are under the following copyright and license:
+# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
+# Copyright (C) 2004-2010 OpenERP SA ().
#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# See: http://www.gnu.org/licenses/lgpl.html
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#
-# and other portions are under the following copyright and license:
-#
-#
-# OpenERP, Open Source Management Solution>..
-# Copyright (C) 2004-2010 OpenERP SA ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-#
-##############################################################################
+#############################################################################
import re
import uno
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 \n"
+"PO-Revision-Date: 2013-05-27 12:19+0000\n"
+"Last-Translator: leksei \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_setup/res_config_view.xml b/addons/base_setup/res_config_view.xml
index 9e026184c9d..8c48f5d7a6b 100644
--- a/addons/base_setup/res_config_view.xml
+++ b/addons/base_setup/res_config_view.xml
@@ -31,7 +31,7 @@
-
+
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 \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 \n"
"Language-Team: Russian \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 opened."
-msgstr ""
+msgstr "%s было открыто."
#. module: base_status
#: code:addons/base_status/base_state.py:199
#, python-format
msgid "%s has been renewed."
-msgstr ""
+msgstr "%s было обновлено."
#. 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 pending."
-msgstr ""
+msgstr "%s сейчас в ожидании."
#. module: base_status
#: code:addons/base_status/base_state.py:187
#, python-format
msgid "%s has been canceled."
-msgstr ""
+msgstr "%s было отменено."
#. 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 closed."
-msgstr ""
+msgstr "%s было закрыто."
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 \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 \n"
"Language-Team: Russian \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/contacts/i18n/th.po b/addons/contacts/i18n/th.po
new file mode 100644
index 00000000000..a75ecac2237
--- /dev/null
+++ b/addons/contacts/i18n/th.po
@@ -0,0 +1,37 @@
+# Thai 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-05-15 07:10+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+" Click to add a contact in your address book.\n"
+"
\n"
+" OpenERP helps you easily track all activities related to\n"
+" a customer; discussions, history of business opportunities,\n"
+" documents, etc.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: contacts
+#: model:ir.actions.act_window,name:contacts.action_contacts
+#: model:ir.ui.menu,name:contacts.menu_contacts
+msgid "Contacts"
+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."))
- dst_partner = ordered_partners[-1]
- src_partners = ordered_partners[:-1]
+ 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."))
+
+ 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 _next_screen(self, this):
+ 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, 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)
+ self._merge(cr, uid, partner_ids, this.dst_partner_id, context=context)
- this.current_line_id.unlink()
+ if this.current_line_id:
+ 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')
- )
-
- 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)
-
- 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).
-
+
-
+
@@ -98,15 +98,15 @@
redirected to the aggregated contact. You can remove
contacts from this list to avoid merging them.
+
-
+
-
@@ -114,24 +114,9 @@
-
-
- pool.get('base.partner.merge.automatic.wizard').merge_multi(cr, uid, None, context)
- True
-
- Automatic Merge
-
- code
- ir.actions.server
-
-
-
-
- res.partner
- Automatic Merge
-
-
+
+
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]]
Set Auto Reminder on leads which are not open since 5 days.1
+ on_time5
@@ -54,12 +55,10 @@ object.write({'section_id': sales_team.id})
Set Auto Followers on leads which are urgent and come from USA.2
+ on_create
-
-
- 0
- minutes
+
diff --git a/addons/crm/crm_case_section_view.xml b/addons/crm/crm_case_section_view.xml
index c788872b47e..be5611c03c4 100644
--- a/addons/crm/crm_case_section_view.xml
+++ b/addons/crm/crm_case_section_view.xml
@@ -43,8 +43,7 @@
{
'search_default_section_id': [active_id],
- 'search_default_new': 1,
- 'search_default_open': 1,
+ 'search_default_assigned_to_me': 1,
'default_section_id': active_id,
'stage_type': 'opportunity',
'default_type': 'opportunity',
@@ -79,12 +78,12 @@
-
-
+
+
-
+Manage your sales funnel with no effort. Attract leads, follow-up on phone calls and meetings. Analyse the quality of your leads to make informed decisions and save time by integrating emails directly into the application.
+
+Track your opportunities pipeline with the revolutionary kanban view. Work inside your sales funnel and get instant visual information about next actions, new messages, top opportunities and expected revenues.
+
+
+
+
+
+
+
+
+
+
+
+
+
Social Network Integration
+
+
+
+
+
+
+
+Bring social intelligence to your sales process. Gain insights from social media site LinkedIn to find prospects easily and load their data automatically into your address book.
+
+
+
+
+
+
+
+
+
Lead Management Made Easy
+
+
+Create leads automatically from incoming emails. Analyse leads efficiency and compare performance by campaigns, channels or sales team.
+
+
+Find duplicates, merge leads and assign them to the right salesperson in one operation. Spend less time on administration and more time on qualifying leads.
+
+
+
+
+
+
+
+
+
+
+
+
+
Organize Your Opportunities
+
A clean user interface with everything in one screen
+
+
+
+
+
+
+
+Get your opportunities organized to stay focused on the best deals. Manage all your customer interactions from the opportunity like emails, phone calls, internal notes, meetings and quotations.
+
+Follow opportunities that interrests you to get notified upon specific events: deal won or lost, stage changed, new customer demand, etc.
+
+
+
+
+
+
+
+
Email Integration and Automation
+
+
+Work with the email applications you already use every day. Whether your company uses Microsoft Outlook or Gmail, no one needs to change the way they work, so everyone stays productive.
+
+Route, sort and filter incoming emails automatically. OpenERP CRM handles incoming emails and route them to the right opportunities or sales team. New leads are created on the fly and interested salespersons are notified automatically.
+
+
+
+
+
+
+
+
+
+
+
+
+
Collaborative Agenda
+
+
+
+
+
+
+
+Schedule your meetings and phone calls using the integrated calendar. You can see your agenda and your colleagues' in one view. As a manager, it's easy to see what your team is busy with.
+
+
+
+
+
+
+
+
Lead Automation and Marketing Campaigns
+
Drive performance by automating tasks
+
+
+ Use our marketing campaigns to automate lead acquisition, follow ups and promotions. Define automated actions (e.g. ask a salesperson to call, send an email, ...) based on triggers (no activity since 20 days, answered a promotional email, etc.)
+
+ Optimize campaigns from lead to close, on every channel. Make smarter decisions about where to invest and show the impact of your marketing activities on your company's bottom line.
+
+
+
+
+
+
+
+
+
+
+
+
+
Customize Your Sales Cycle
+
It Fits Your Sales Approach
+
+Customize your sales cycle by configuring sales stages that perfectly fit your sales approach. Control statistics to get accurate forecasts to improve your sales performance at every stage of your customer relationship.
+
+
+
+
+
+
+
+
+
+
+
+
+
Reporting and Dashboards
+
Get access to the right information to take smart decisions
+
+
+
+
+
+
+
+Get the insights you need to make smarter decisions. Design custom dashboards to get a picture of your business at a glance. Dig deeper with real-time reports that anyone can create and share.
+
+
+
+
+
+
+
+
Drive Engagement with Gamification
+
Leverage sales' natural desire for competition
+
+ Reinforce good habits and improve win rates with real-time recognition and rewards inspired by game mechanics. Align sales teams around clear business objectives with challenges, personal objectives and team leader boards.
+
+
+
Leaderboards
+
+
+
+
+ Promote leaders and competition amongst sales team with performance ratios.
+
+
+
+
Personnal Objectives
+
+
+
+
+ Assign clear goals to users to align them with the company objectives.
+
+
+
+
Team Targets
+
+
+
+
+ Compare revenues with forecasts and budgets in real time.
+
+
+
+
+
+
+
+
+
Many companies already enjoy it
+
Hear what they have to say !
+
+
+
+
+ With OpenERP CRM I keep all the information about leads and customers
+ in a single place, and share it with my colleagues. It's great and effective.
+
+
+
+
+
diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po
index 19ae76e9f46..ec2a9f35ee5 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: Антон Лаврёнов \n"
+"PO-Revision-Date: 2013-05-30 13:52+0000\n"
+"Last-Translator: Chertykov Denis \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-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\n"
#. module: crm
#: view:crm.lead.report:0
@@ -452,7 +452,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
@@ -1108,7 +1108,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 +1397,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 +1446,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 +1759,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
@@ -1917,7 +1917,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 +2126,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Address"
-msgstr ""
+msgstr "Адрес"
#. module: crm
#: help:crm.case.section,alias_id:0
@@ -2134,6 +2134,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 +2194,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 +2236,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 +2253,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 +2283,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 +2293,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 +2368,7 @@ msgstr ""
#. module: crm
#: field:crm.case.stage,state:0
msgid "Related Status"
-msgstr ""
+msgstr "Связанный статус"
#. module: crm
#: field:crm.phonecall,name:0
@@ -2410,7 +2414,7 @@ msgstr "Подтвердить"
#. module: crm
#: view:crm.lead:0
msgid "Unread messages"
-msgstr ""
+msgstr "Непрочитанные сообщения"
#. module: crm
#: field:crm.phonecall.report,section_id:0
@@ -2501,7 +2505,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 +2582,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 +2648,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 +2658,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 +2680,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
@@ -2895,7 +2899,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Internal Notes"
-msgstr ""
+msgstr "Внутренние заметки"
#. module: crm
#: view:crm.lead:0
@@ -2960,6 +2964,7 @@ msgstr "Проиграно"
#, python-format
msgid "Closed/Cancelled leads cannot be converted into opportunities."
msgstr ""
+"Закрытые/Отмененные кандидаты не могут быть конвертированы в возможности."
#. module: crm
#: view:crm.lead:0
@@ -3050,7 +3055,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 @@
-
-
+
+
-
-
+
+
-
-
+
+
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 @@
+ help="Leads/Opportunities that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
+ help="Phone calls that are assigned to one of the sale teams I manage" groups="base.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:
+*
Sparkline: 1,4,6,6,8,5,3,5
+* $('.sparkline').sparkline();
+* There must be no spaces in the enclosed data set
+*
+* Otherwise values must be an array of numbers or null values
+*
Sparkline: This text replaced if the browser is compatible
+* $('#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:
+*
Sparkline:
+*
Sparkline:
+* $('.sparkline').sparkline();
+*
+* For line charts, x values can also be specified:
+*
Sparkline: 1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5
+* $('#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})
+*
Sparkline: loading
+* 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('● {{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('● {{prefix}}{{value}}{{suffix}}')
+ },
+ // Defaults for tristate charts
+ tristate: {
+ barWidth: 4,
+ barSpacing: 1,
+ posBarColor: '#6f6',
+ negBarColor: '#f44',
+ zeroBarColor: '#999',
+ colorMap: {},
+ tooltipFormat: new SPFormat('● {{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('● {{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 = $('', {
+ id: 'jqssizetip',
+ style: sizetipStyle,
+ 'class': tooltipClassname
+ });
+ this.tooltip = $('', {
+ 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 += '
' + options.get('tooltipChartTitle') + '
\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('
' + text + '
');
+ }
+ }
+ }
+ 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 = '';
+ 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 = '' +
+ ' ';
+ 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 = '';
+ 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 = '' +
+ ' ';
+ 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_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index 275d9edaab4..774571b0314 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -105,7 +105,7 @@ class crm_claim(base_stage, osv.osv):
'email_from': fields.char('Email', size=128, help="Destination email for email gateway."),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.claim.stage', 'Stage', track_visibility='onchange',
- domain="['&',('fold', '=', False),'|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
+ domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
'cause': fields.text('Root Cause'),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="Status", readonly=True,
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 \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 \n"
"Language-Team: Russian \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 @@
-
+
@@ -78,7 +78,7 @@
-
+
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 @@
+ help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
-
+
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 \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 \n"
"Language-Team: Russian \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/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 @@
-
+
@@ -71,7 +71,7 @@
-
+
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
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..53a2929be4e 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 \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-05-30 14:10+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \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-05-31 05:38+0000\n"
+"X-Generator: Launchpad (build 16660)\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
@@ -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
@@ -724,7 +731,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 +746,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 +782,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 +799,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 +869,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 +885,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 +903,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 +919,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 91d462de015..724102a84b1 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -105,10 +105,17 @@ class crm_lead_forward_to_partner(osv.TransientModel):
""" Forward the lead to a partner """
if context is None:
context = {}
+ # TDE FIX in 7.0: force mass_mailing mode; this way, the message will be
+ # send only to partners; default subtype of mass_mailing is indeed False
+ # Chatter will show 'logged a note', but partner_ids (aka, the assigned partner)
+ # will effectively receive the message if present in the composition window
+ self.write(cr, uid, ids, {'composition_mode': 'mass_mail'}, context=context)
res = {'type': 'ir.actions.act_window_close'}
wizard = self.browse(cr, uid, ids[0], context=context)
if wizard.model not in ('crm.lead'):
return res
+ if context.get('active_ids') is None:
+ context['active_ids'] = [wizard.res_id]
lead = self.pool[wizard.model]
lead_ids = wizard.res_id and [wizard.res_id] or []
@@ -116,6 +123,8 @@ class crm_lead_forward_to_partner(osv.TransientModel):
if wizard.composition_mode == 'mass_mail':
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 \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/document/odt2txt.py b/addons/document/odt2txt.py
old mode 100644
new mode 100755
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 @@
+
diff --git a/addons/document_webdav/__openerp__.py b/addons/document_webdav/__openerp__.py
index ec112ec7c38..befb87829ed 100644
--- a/addons/document_webdav/__openerp__.py
+++ b/addons/document_webdav/__openerp__.py
@@ -24,7 +24,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
##############################################################################
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py
index 058dc1c748d..f3a8b35b582 100644
--- a/addons/document_webdav/test_davclient.py
+++ b/addons/document_webdav/test_davclient.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright P. Christeas 2008,2009
@@ -24,7 +23,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
###############################################################################
""" A trivial HTTP/WebDAV client, used for testing the server
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index f67de272e29..e495f5c9f2f 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -30,7 +30,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
###############################################################################
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 @@
-
+ on_change="onchange_template_id(template_id, composition_mode, model, res_id, context)" domain="[('model_id.model','=',model)]"/>
+
@@ -100,19 +101,13 @@
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
+
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 %s 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/fetchmail_view.xml b/addons/fetchmail/fetchmail_view.xml
index 4e653adce28..5ee17c61b6f 100644
--- a/addons/fetchmail/fetchmail_view.xml
+++ b/addons/fetchmail/fetchmail_view.xml
@@ -97,15 +97,17 @@
General Settingsbase.config.settings
-
-
-
+Connect with experts, follow what interests you, share documents and promote
+best practices. Get work done with effective collaboration across departments,
+geographies, documents and business applications. All of this while decreasing
+email overload.
+
+
+Next time you have a question for the marketing, sales, R&D or any other
+department, don't send an email blast-post the question to OpenERP and get
+answers from the right persons.
+
+
+
+
+
+
+
+
+
+
+
+
+
Follow what interests you
+
Make the information flow across your company
+
+
+
+
+
+
+
+Want to get informed about new product features, hot deals, bottlenecks in projects or any other event? Just follow what interests you to get the information you need what you need; no more, no less.
+
+
+
+
+
+
+
+
+
Get Things Done
+
Your inbox is a todo list
+
+
+You can process (not only read) the inbox and easily mark messages for future actions. Start feeling the pleasure of having an empty inbox every day; no more overload of information.
+
+
+
+
+
+
+
+
+
+
+
+
+
Promote best practices
+
Discussion groups at your fingertips
+
+
+
+
+
+
+
+Cut back on meetings and email chains by working together in groups of interests. Create a group to let people share files, discuss ideas, and vote to promote best practices.
+
+
+
+
+
+
+
+
Improve Access to Information and Expertise
+
Easily find the information you need
+
+
+Break down information silos. Search across your existing systems to find the answers and expertise you need to complete projects quickly.
+
+
+
+
+
+
+
+
+
+
+
+
+
Collaborate securely
+
+
+
+
+
+
+
+Set the right security policy; public, private or on invitation only -- according to the information sensitivity.
+
+
+
+
+
+
+
+
+
A Twitter-like Network For Your Company
+
+
+Make every employee feel more connected and engaged with twitter-like features
+for your own company. Follow people, share best practices, 'like' top ideas, etc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Trusted by millions worldwide
+
+
+
+
+ Emails make me waste my time. But I need them. Reading my inbox
+ is the most unproductive task I do on a daily basis. I have to
+ spend one or two full hours a day to process my emails. All the
+ junk flows in the same inbox; spams, information that doesn't
+ matter, quoted answers of quoted answers, etc. At the end of
+ the hour, only 10 emails actually requested an answer from me.
+ Since I use OpenERP, I can do the same job in only 10 minutes!
+
+
+
+
Luc de Keyser
+
+
+
+
+
+
+
diff --git a/addons/mail/html/mail_illustration.png b/addons/mail/html/mail_illustration.png
new file mode 100644
index 00000000000..4fff4837faa
Binary files /dev/null and b/addons/mail/html/mail_illustration.png differ
diff --git a/addons/mail/html/mail_sc_00.png b/addons/mail/html/mail_sc_00.png
new file mode 100644
index 00000000000..3011ef129b5
Binary files /dev/null and b/addons/mail/html/mail_sc_00.png differ
diff --git a/addons/mail/html/mail_sc_01.png b/addons/mail/html/mail_sc_01.png
new file mode 100644
index 00000000000..1b1099f6536
Binary files /dev/null and b/addons/mail/html/mail_sc_01.png differ
diff --git a/addons/mail/html/mail_sc_02.png b/addons/mail/html/mail_sc_02.png
new file mode 100644
index 00000000000..4e59c9d1e0f
Binary files /dev/null and b/addons/mail/html/mail_sc_02.png differ
diff --git a/addons/mail/html/mail_sc_03.png b/addons/mail/html/mail_sc_03.png
new file mode 100644
index 00000000000..dbb14b4da36
Binary files /dev/null and b/addons/mail/html/mail_sc_03.png differ
diff --git a/addons/mail/html/mail_sc_04.png b/addons/mail/html/mail_sc_04.png
new file mode 100644
index 00000000000..b8f47ba2935
Binary files /dev/null and b/addons/mail/html/mail_sc_04.png differ
diff --git a/addons/mail/html/mail_sc_05.png b/addons/mail/html/mail_sc_05.png
new file mode 100644
index 00000000000..251b4ebc676
Binary files /dev/null and b/addons/mail/html/mail_sc_05.png differ
diff --git a/addons/mail/html/mail_sc_06.png b/addons/mail/html/mail_sc_06.png
new file mode 100644
index 00000000000..251b4ebc676
Binary files /dev/null and b/addons/mail/html/mail_sc_06.png differ
diff --git a/addons/mail/html/mail_sc_07.png b/addons/mail/html/mail_sc_07.png
new file mode 100644
index 00000000000..9a33332817e
Binary files /dev/null and b/addons/mail/html/mail_sc_07.png differ
diff --git a/addons/mail/html/photo.png b/addons/mail/html/photo.png
new file mode 100644
index 00000000000..e605e5c6f8e
Binary files /dev/null and b/addons/mail/html/photo.png differ
diff --git a/addons/mail/mail_alias.py b/addons/mail/mail_alias.py
index 8730599ad72..870695e074e 100644
--- a/addons/mail/mail_alias.py
+++ b/addons/mail/mail_alias.py
@@ -139,7 +139,7 @@ class mail_alias(osv.Model):
return new_name
def migrate_to_alias(self, cr, child_model_name, child_table_name, child_model_auto_init_fct,
- alias_id_column, alias_key, alias_prefix = '', alias_force_key = '', alias_defaults = {}, context=None):
+ alias_id_column, alias_key, alias_prefix='', alias_force_key='', alias_defaults={}, context=None):
""" Installation hook to create aliases for all users and avoid constraint errors.
:param child_model_name: model name of the child class (i.e. res.users)
@@ -154,8 +154,10 @@ class mail_alias(osv.Model):
:param alias_defaults: dict, keys = mail.alias columns, values = child
model column name used for default values (i.e. {'job_id': 'id'})
"""
+ if context is None:
+ context = {}
- # disable the unique alias_id not null constraint, to avoid spurious warning during
+ # disable the unique alias_id not null constraint, to avoid spurious warning during
# super.auto_init. We'll reinstall it afterwards.
alias_id_column.required = False
@@ -165,14 +167,14 @@ class mail_alias(osv.Model):
registry = RegistryManager.get(cr.dbname)
mail_alias = registry.get('mail.alias')
child_class_model = registry[child_model_name]
- no_alias_ids = child_class_model.search(cr, SUPERUSER_ID, [('alias_id', '=', False)], context={'active_test':False})
+ no_alias_ids = child_class_model.search(cr, SUPERUSER_ID, [('alias_id', '=', False)], context={'active_test': False})
# Use read() not browse(), to avoid prefetching uninitialized inherited fields
for obj_data in child_class_model.read(cr, SUPERUSER_ID, no_alias_ids, [alias_key]):
- alias_vals = {'alias_name': '%s%s' % (alias_prefix, obj_data[alias_key]) }
+ alias_vals = {'alias_name': '%s%s' % (alias_prefix, obj_data[alias_key])}
if alias_force_key:
alias_vals['alias_force_thread_id'] = obj_data[alias_force_key]
- alias_vals['alias_defaults'] = dict( (k, obj_data[v]) for k, v in alias_defaults.iteritems())
- alias_id = mail_alias.create_unique_alias(cr, SUPERUSER_ID, alias_vals, model_name=child_model_name)
+ alias_vals['alias_defaults'] = dict((k, obj_data[v]) for k, v in alias_defaults.iteritems())
+ alias_id = mail_alias.create_unique_alias(cr, SUPERUSER_ID, alias_vals, model_name=context.get('alias_model_name', child_model_name))
child_class_model.write(cr, SUPERUSER_ID, obj_data['id'], {'alias_id': alias_id})
_logger.info('Mail alias created for %s %s (uid %s)', child_model_name, obj_data[alias_key], obj_data['id'])
diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py
index 152b9704fd7..98e88b664e6 100644
--- a/addons/mail/mail_followers.py
+++ b/addons/mail/mail_followers.py
@@ -90,7 +90,7 @@ class mail_notification(osv.Model):
continue
partner = notification.partner_id
# If partners_to_notify specified: restrict to them
- if partners_to_notify and partner.id not in partners_to_notify:
+ if partners_to_notify is not None and partner.id not in partners_to_notify:
continue
# Do not send to partners without email address defined
if not partner.email:
@@ -135,14 +135,17 @@ class mail_notification(osv.Model):
footer = tools.append_content_to_html(footer, signature, plaintext=False, container_tag='p')
# add company signature
- if user.company_id:
- company = user.company_id.website and "%s" % (user.company_id.website, user.company_id.name) or user.company_id.name
+ if user.company_id.website:
+ website_url = ('http://%s' % user.company_id.website) if not user.company_id.website.lower().startswith(('http:', 'https:')) \
+ else user.company_id.website
+ company = "%s" % (website_url, user.company_id.name)
else:
- company = user.name
- signature_company = _('Sent by %(company)s using %(openerp)s.') % {
+ company = user.company_id.name
+ sent_by = _('Sent by %(company)s using %(openerp)s.')
+ signature_company = '%s' % (sent_by % {
'company': company,
'openerp': "OpenERP"
- }
+ })
footer = tools.append_content_to_html(footer, signature_company, plaintext=False, container_tag='div')
return footer
diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py
index 95fbac478d6..bd2b9c3f18a 100644
--- a/addons/mail/mail_mail.py
+++ b/addons/mail/mail_mail.py
@@ -27,8 +27,8 @@ 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.osv.orm import except_orm
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
@@ -60,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',
@@ -93,31 +90,41 @@ class mail_mail(osv.Model):
""" Return a specific reply_to: alias of the document through message_get_reply_to
or take the email_from
"""
+ # if value specified: directly return it
if values.get('reply_to'):
return values.get('reply_to')
- email_reply_to = False
- # model, res_id: comes from values OR related message
- model = values.get('model')
- res_id = values.get('res_id')
- if values.get('mail_message_id') and (not model or not res_id):
+ mailgateway = True # tells whether the answer will go through the mailgateway, leading to the formatting of reply_to
+ ir_config_parameter = self.pool.get("ir.config_parameter")
+ catchall_domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context)
+
+ # model, res_id, email_from, reply_to: comes from values OR related message
+ message = None
+ if values.get('mail_message_id'):
message = self.pool.get('mail.message').browse(cr, uid, values.get('mail_message_id'), context=context)
- if not model:
- model = message.model
- if not res_id:
- res_id = message.res_id
+ model = values.get('model', message and message.model or False)
+ res_id = values.get('res_id', message and message.res_id or False)
+ email_from = values.get('email_from', message and message.email_from or False)
+ email_reply_to = message and message.reply_to or False
# if model and res_id: try to use ``message_get_reply_to`` that returns the document alias
- if model and res_id and hasattr(self.pool[model], 'message_get_reply_to'):
+ if not email_reply_to and model and res_id and hasattr(self.pool[model], 'message_get_reply_to'):
email_reply_to = self.pool[model].message_get_reply_to(cr, uid, [res_id], context=context)[0]
+ # no alias reply_to -> catchall alias
+ if not email_reply_to:
+ catchall_alias = ir_config_parameter.get_param(cr, uid, "mail.catchall.alias", context=context)
+ if catchall_domain and catchall_alias:
+ email_reply_to = '%s@%s' % (catchall_alias, catchall_domain)
# no alias reply_to -> reply_to will be the email_from, only the email part
- if not email_reply_to and values.get('email_from'):
- emails = tools.email_split(values.get('email_from'))
+ if not email_reply_to and email_from:
+ emails = tools.email_split(email_from)
if emails:
email_reply_to = emails[0]
+ if emails[0].split('@')[1] != catchall_domain:
+ mailgateway = False
# format 'Document name '
- if email_reply_to and model and res_id:
+ if email_reply_to and model and res_id and mailgateway:
document_name = self.pool[model].name_get(cr, SUPERUSER_ID, [res_id], context=context)[0]
if document_name:
# sanitize document name
@@ -195,6 +202,36 @@ class mail_mail(osv.Model):
self.unlink(cr, SUPERUSER_ID, [mail.id], context=context)
return True
+ #------------------------------------------------------
+ # mail_mail formatting, tools and send mechanism
+ #------------------------------------------------------
+
+ # TODO in 8.0(+): maybe factorize this to enable in modules link generation
+ # independently of mail_mail model
+ # TODO in 8.0(+): factorize doc name sanitized and 'Followers of ...' formatting
+ # because it begins to appear everywhere
+
+ def _get_partner_access_link(self, cr, uid, mail, partner=None, context=None):
+ """ Generate URLs for links in mails:
+ - partner is an user and has read access to the document: direct link to document with model, res_id
+ """
+ if partner and partner.user_ids:
+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
+ # the parameters to encode for the query and fragment part of url
+ query = {'db': cr.dbname}
+ fragment = {
+ 'login': partner.user_ids[0].login,
+ 'action': 'mail.action_mail_redirect',
+ }
+ if mail.notification:
+ fragment.update({
+ 'message_id': mail.mail_message_id.id,
+ })
+ url = urljoin(base_url, "?%s#%s" % (urlencode(query), urlencode(fragment)))
+ return _("""Access your messages and documents in OpenERP""") % url
+ else:
+ return None
+
def send_get_mail_subject(self, cr, uid, mail, force=False, partner=None, context=None):
""" If subject is void and record_name defined: ' posted on '
@@ -208,32 +245,6 @@ class mail_mail(osv.Model):
return 'Re: %s' % (mail.parent_id.subject)
return mail.subject
- def send_get_mail_body_footer(self, cr, uid, mail, partner=None, context=None):
- """ Return a specific footer for the ir_email body. The main purpose of this method
- is to be inherited by Portal, to add modify the link for signing in, in
- each notification email a partner receives.
- """
- body_footer = ""
- # partner is a user, link to a related document (incentive to install portal)
- if partner and partner.user_ids and mail.model and mail.res_id \
- and self.check_access_rights(cr, partner.user_ids[0].id, 'read', raise_exception=False):
- related_user = partner.user_ids[0]
- try:
- self.pool[mail.model].check_access_rule(cr, related_user.id, [mail.res_id], 'read', context=context)
- base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
- # the parameters to encode for the query and fragment part of url
- query = {'db': cr.dbname}
- fragment = {
- 'login': related_user.login,
- 'model': mail.model,
- 'id': mail.res_id,
- }
- url = urljoin(base_url, "?%s#%s" % (urlencode(query), urlencode(fragment)))
- body_footer = _("""Access this document directly in OpenERP""") % url
- except except_orm, e:
- pass
- return body_footer
-
def send_get_mail_body(self, cr, uid, mail, partner=None, context=None):
""" Return a specific ir_email body. The main purpose of this method
is to be inherited to add custom content depending on some module.
@@ -243,9 +254,10 @@ class mail_mail(osv.Model):
"""
body = mail.body_html
- # add footer
- body_footer = self.send_get_mail_body_footer(cr, uid, mail, partner=partner, context=context)
- body = tools.append_content_to_html(body, body_footer, plaintext=False, container_tag='div')
+ # generate footer
+ link = self._get_partner_access_link(cr, uid, mail, partner, context=context)
+ if link:
+ body = tools.append_content_to_html(body, link, plaintext=False, container_tag='div')
return body
def send_get_email_dict(self, cr, uid, mail, partner=None, context=None):
@@ -278,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).
@@ -289,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')
@@ -334,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 @@
mail.mail
+
diff --git a/addons/mail/res_config.py b/addons/mail/res_config.py
index 91606e1c720..c19eb4a38ee 100644
--- a/addons/mail/res_config.py
+++ b/addons/mail/res_config.py
@@ -23,11 +23,12 @@ import urlparse
from openerp.osv import osv, fields
+
class project_configuration(osv.TransientModel):
_inherit = 'base.config.settings'
_columns = {
- 'alias_domain' : fields.char('Alias Domain',
+ 'alias_domain': fields.char('Alias Domain',
help="If you have setup a catch-all email domain redirected to "
"the OpenERP server, enter the domain name here."),
}
diff --git a/addons/mail/res_users_view.xml b/addons/mail/res_users_view.xml
index 5b08ba9edd8..babe922d975 100644
--- a/addons/mail/res_users_view.xml
+++ b/addons/mail/res_users_view.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/addons/mail/static/scripts/openerp_mailgate.py b/addons/mail/static/scripts/openerp_mailgate.py
old mode 100644
new mode 100755
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index f3869b6a5a4..c969d3f3b16 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -564,13 +564,6 @@
text-align: center;
width:100%;
}
-.openerp .oe_followers button.oe_invite{
- margin: 5px 0;
- padding: 2px 8px;
- font-size: 12px;
- text-shadow: none;
- width: 100%;
-}
.openerp .oe_followers button.oe_follower.oe_following{
color: white;
background-color: #3465A4;
@@ -624,8 +617,12 @@
margin-top: 12px;
margin-bottom: 4px;
}
+.openerp .oe_followers .oe_invite{
+ float: right;
+}
.openerp .oe_followers .oe_partner {
height: 32px;
+ margin-right: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
diff --git a/addons/mail/static/src/img/email_icon.png b/addons/mail/static/src/img/email_icon.png
old mode 100755
new mode 100644
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 3338954d417..230655cd364 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,
@@ -269,7 +270,9 @@ openerp.mail = function (session) {
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, 'mail.message', 'image_small', this.id);
@@ -858,9 +861,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");
}
});
@@ -1064,9 +1067,7 @@ openerp.mail = function (session) {
msg.renderElement();
msg.start();
}
- if( self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails ) {
- self.options.root_thread.__parentedParent.__parentedParent.do_reload_menu_emails();
- }
+ self.options.root_thread.MailWidget.do_reload_menu_emails();
});
});
@@ -1206,6 +1207,7 @@ openerp.mail = function (session) {
init: function (parent, datasets, options) {
var self = this;
this._super(parent, options);
+ this.MailWidget = parent.__proto__ == mail.Widget.prototype ? parent : false;
this.domain = options.domain || [];
this.context = _.extend(options.context || {});
@@ -1439,11 +1441,16 @@ openerp.mail = function (session) {
message_fetch_set_read: function (message_list) {
if (! this.context.mail_read_set_read) return;
- this.render_mutex.exec(_.bind(function() {
+ var self = this;
+ this.render_mutex.exec(function() {
msg_ids = _.pluck(message_list, 'id');
- return this.ds_message.call('set_message_read', [
- msg_ids, true, false, this.context]);
- }, this));
+ return self.ds_message.call('set_message_read', [msg_ids, true, false, self.context])
+ .then(function (nb_read) {
+ if (nb_read) {
+ self.options.root_thread.MailWidget.do_reload_menu_emails();
+ }
+ });
+ });
},
/**
@@ -1708,6 +1715,22 @@ openerp.mail = function (session) {
this.bind_events();
},
+ /**
+ * create an object "related_menu"
+ * contains the menu widget and the sub menu related of this wall
+ */
+ do_reload_menu_emails: function () {
+ var menu = session.webclient.menu;
+ if (!menu || !menu.current_menu) {
+ return $.when();
+ }
+ return menu.rpc("/web/menu/load_needaction", {'menu_ids': [menu.current_menu]}).done(function(r) {
+ menu.on_needaction_loaded(r);
+ }).then(function () {
+ menu.trigger("need_action_reloaded");
+ });
+ },
+
/**
*Create the root thread and display this object in the DOM.
* Call the no_message method then c all the message_fetch method
@@ -1757,6 +1780,7 @@ openerp.mail = function (session) {
init: function (parent, node) {
this._super.apply(this, arguments);
+ this.ParentViewManager = parent;
this.node = _.clone(node);
this.node.params = _.extend({
'display_indented_thread': -1,
@@ -1776,7 +1800,7 @@ openerp.mail = function (session) {
this.domain = this.node.params && this.node.params.domain || [];
- if (!this.__parentedParent.is_action_enabled('edit')) {
+ if (!this.ParentViewManager.is_action_enabled('edit')) {
this.node.params.show_link = false;
}
},
@@ -1860,12 +1884,20 @@ openerp.mail = function (session) {
*/
init: function (parent, action) {
this._super(parent, action);
+ this.ActionManager = parent;
this.action = _.clone(action);
this.domain = this.action.params.domain || this.action.domain || [];
this.context = _.extend(this.action.params.context || {}, this.action.context || {});
+ // filter some parameters that we will propagate as search_default
this.defaults = {};
+ for (var key in this.action.context.params) {
+ if (_.indexOf(['model', 'res_id'], key) == -1) {
+ continue;
+ }
+ this.context['search_default_' + key] = this.action.context.params[key];
+ }
for (var key in this.context) {
if (key.match(/^search_default_/)) {
this.defaults[key.replace(/^search_default_/, '')] = this.context[key];
@@ -1895,23 +1927,6 @@ openerp.mail = function (session) {
wall_sidebar.appendTo(this.$el.find('.oe_mail_wall_aside'));
},
- /**
- * crete an object "related_menu"
- * contain the menu widget and the the sub menu related of this wall
- */
- do_reload_menu_emails: function () {
- var menu = this.__parentedParent.__parentedParent.menu;
- // return this.rpc("/web/menu/load", {'menu_id': 100}).done(function(r) {
- // _.each(menu.data.data.children, function (val) {
- // if (val.id == 100) {
- // val.children = _.find(r.data.children, function (r_val) {return r_val.id == 100;}).children;
- // }
- // });
- // var r = menu.data;
- // window.setTimeout(function(){menu.do_reload();}, 0);
- // });
- },
-
/**
* Load the mail.message search view
* @param {Object} defaults ??
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index 1ee1af68fff..5062491ecbb 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -145,8 +145,10 @@
diff --git a/addons/mail/tests/test_mail_features.py b/addons/mail/tests/test_mail_features.py
index 7eea66b3b90..46f4555349d 100644
--- a/addons/mail/tests/test_mail_features.py
+++ b/addons/mail/tests/test_mail_features.py
@@ -19,12 +19,15 @@
#
##############################################################################
+from openerp.addons.mail.mail_mail import mail_mail
+from openerp.addons.mail.mail_thread import mail_thread
from openerp.addons.mail.tests.test_mail_base import TestMailBase
+from openerp.tools import mute_logger
from openerp.tools.mail import html_sanitize
class test_mail(TestMailBase):
-
+
def test_000_alias_setup(self):
""" Test basic mail.alias setup works, before trying to use them for routing """
cr, uid = self.cr, self.uid
@@ -43,7 +46,6 @@ class test_mail(TestMailBase):
self.user_barty = self.res_users.browse(cr, uid, self.user_barty_id)
self.assertEquals(self.user_barty.alias_name, 'b4r+_-_r3wl-', 'Disallowed chars should be replaced by hyphens')
-
def test_00_followers_function_field(self):
""" Tests designed for the many2many function field 'follower_ids'.
We will test to perform writes using the many2many commands 0, 3, 4,
@@ -116,18 +118,66 @@ class test_mail(TestMailBase):
# CASE1: test subscriptions with subtypes
# ----------------------------------------
- # Do: Subscribe Raoul three times (niak niak) through message_subscribe_users
+ # Do: subscribe Raoul, should have default subtypes
+ group_pigs.message_subscribe_users([user_raoul.id])
+ group_pigs.refresh()
+ # Test: 2 followers (Admin and Raoul)
+ follower_ids = [follower.id for follower in group_pigs.message_follower_ids]
+ self.assertEqual(set(follower_ids), set([user_raoul.partner_id.id, user_admin.partner_id.id]),
+ 'message_subscribe: Admin and Raoul should be the only 2 Pigs fans')
+ # Raoul follows default subtypes
+ fol_ids = self.mail_followers.search(cr, uid, [
+ ('res_model', '=', 'mail.group'),
+ ('res_id', '=', self.group_pigs_id),
+ ('partner_id', '=', user_raoul.partner_id.id)
+ ])
+ fol_obj = self.mail_followers.browse(cr, uid, fol_ids)[0]
+ fol_subtype_ids = set([subtype.id for subtype in fol_obj.subtype_ids])
+ self.assertEqual(set(fol_subtype_ids), set(default_group_subtypes),
+ 'message_subscribe: Raoul subscription subtypes are incorrect, should be all default ones')
+
+ # Do: subscribe Raoul with specified new subtypes
+ group_pigs.message_subscribe_users([user_raoul.id], subtype_ids=[mt_mg_nodef])
+ # Test: 2 followers (Admin and Raoul)
+ follower_ids = [follower.id for follower in group_pigs.message_follower_ids]
+ self.assertEqual(set(follower_ids), set([user_raoul.partner_id.id, user_admin.partner_id.id]),
+ 'message_subscribe: Admin and Raoul should be the only 2 Pigs fans')
+ # Test: 2 lines in mail.followers (no duplicate for Raoul)
+ fol_ids = self.mail_followers.search(cr, uid, [
+ ('res_model', '=', 'mail.group'),
+ ('res_id', '=', self.group_pigs_id),
+ ])
+ self.assertEqual(len(fol_ids), 2,
+ 'message_subscribe: subscribing an already-existing follower should not create new entries in mail.followers')
+ # Test: Raoul follows only specified subtypes
+ fol_ids = self.mail_followers.search(cr, uid, [
+ ('res_model', '=', 'mail.group'),
+ ('res_id', '=', self.group_pigs_id),
+ ('partner_id', '=', user_raoul.partner_id.id)
+ ])
+ fol_obj = self.mail_followers.browse(cr, uid, fol_ids)[0]
+ fol_subtype_ids = set([subtype.id for subtype in fol_obj.subtype_ids])
+ self.assertEqual(set(fol_subtype_ids), set([mt_mg_nodef]),
+ 'message_subscribe: Raoul subscription subtypes are incorrect, should be only specified')
+
+ # Do: Subscribe Raoul without specified subtypes: should not erase existing subscription subtypes
group_pigs.message_subscribe_users([user_raoul.id, user_raoul.id])
group_pigs.message_subscribe_users([user_raoul.id])
group_pigs.refresh()
# Test: 2 followers (Admin and Raoul)
follower_ids = [follower.id for follower in group_pigs.message_follower_ids]
- self.assertEqual(set(follower_ids), set([user_raoul.partner_id.id, user_admin.partner_id.id]), 'Admin and Raoul should be the only 2 Pigs fans')
+ self.assertEqual(set(follower_ids), set([user_raoul.partner_id.id, user_admin.partner_id.id]),
+ 'message_subscribe: Admin and Raoul should be the only 2 Pigs fans')
# Test: Raoul follows default subtypes
- fol_ids = self.mail_followers.search(cr, uid, [('res_model', '=', 'mail.group'), ('res_id', '=', self.group_pigs_id), ('partner_id', '=', user_raoul.partner_id.id)])
+ fol_ids = self.mail_followers.search(cr, uid, [
+ ('res_model', '=', 'mail.group'),
+ ('res_id', '=', self.group_pigs_id),
+ ('partner_id', '=', user_raoul.partner_id.id)
+ ])
fol_obj = self.mail_followers.browse(cr, uid, fol_ids)[0]
fol_subtype_ids = set([subtype.id for subtype in fol_obj.subtype_ids])
- self.assertEqual(set(fol_subtype_ids), set(default_group_subtypes), 'subscription subtypes are incorrect')
+ self.assertEqual(set(fol_subtype_ids), set([mt_mg_nodef]),
+ 'message_subscribe: Raoul subscription subtypes are incorrect, should be only specified')
# Do: Unsubscribe Raoul twice through message_unsubscribe_users
group_pigs.message_unsubscribe_users([user_raoul.id, user_raoul.id])
@@ -135,6 +185,13 @@ class test_mail(TestMailBase):
# Test: 1 follower (Admin)
follower_ids = [follower.id for follower in group_pigs.message_follower_ids]
self.assertEqual(follower_ids, [user_admin.partner_id.id], 'Admin must be the only Pigs fan')
+ # Test: 1 lines in mail.followers (no duplicate for Raoul)
+ fol_ids = self.mail_followers.search(cr, uid, [
+ ('res_model', '=', 'mail.group'),
+ ('res_id', '=', self.group_pigs_id)
+ ])
+ self.assertEqual(len(fol_ids), 1,
+ 'message_subscribe: group should have only 1 entry in mail.follower for 1 follower')
# Do: subscribe Admin with subtype_ids
group_pigs.message_subscribe_users([uid], [mt_mg_nodef, mt_all_nodef])
@@ -171,6 +228,64 @@ class test_mail(TestMailBase):
self.assertNotIn('First answer, should not be displayed', result, 'Old answer should not be in quote.')
self.assertNotIn('My answer I am propagating', result, 'Thread header content should be in quote.')
+ def test_11_notification_url(self):
+ """ Tests designed to test the URL added in notification emails. """
+ cr, uid, group_pigs = self.cr, self.uid, self.group_pigs
+
+ # Partner data
+ partner_raoul = self.res_partner.browse(cr, uid, self.partner_raoul_id)
+ partner_bert_id = self.res_partner.create(cr, uid, {'name': 'bert'})
+ partner_bert = self.res_partner.browse(cr, uid, partner_bert_id)
+ # Mail data
+ mail_mail_id = self.mail_mail.create(cr, uid, {'state': 'exception'})
+ mail = self.mail_mail.browse(cr, uid, mail_mail_id)
+
+ # Test: link for nobody -> None
+ url = mail_mail._get_partner_access_link(self.mail_mail, cr, uid, mail)
+ self.assertEqual(url, None,
+ 'notification email: mails not send to a specific partner should not have any URL')
+
+ # Test: link for partner -> None
+ url = mail_mail._get_partner_access_link(self.mail_mail, cr, uid, mail, partner=partner_bert)
+ self.assertEqual(url, None,
+ 'notification email: mails send to a not-user partner should not have any URL')
+
+ # Test: link for user -> signin
+ url = mail_mail._get_partner_access_link(self.mail_mail, cr, uid, mail, partner=partner_raoul)
+ self.assertIn('action=mail.action_mail_redirect', url,
+ 'notification email: link should contain the redirect action')
+ self.assertIn('login=%s' % partner_raoul.user_ids[0].login, url,
+ 'notification email: link should contain the user login')
+
+ @mute_logger('openerp.addons.mail.mail_thread', 'openerp.osv.orm')
+ def test_12_inbox_redirection(self):
+ """ Tests designed to test the inbox redirection of emails notification URLs. """
+ cr, uid, user_admin, group_pigs = self.cr, self.uid, self.user_admin, self.group_pigs
+ model, act_id = self.ir_model_data.get_object_reference(cr, uid, 'mail', 'action_mail_inbox_feeds')
+ # Data: post a message on pigs
+ msg_id = self.group_pigs.message_post(body='My body', partner_ids=[self.partner_bert_id], type='comment', subtype='mail.mt_comment')
+
+ # No specific parameters -> should redirect to Inbox
+ action = mail_thread.message_redirect_action(self.mail_thread, cr, self.user_raoul_id, {'params': {}})
+ self.assertEqual(action.get('type'), 'ir.actions.client',
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+ self.assertEqual(action.get('id'), act_id,
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+
+ # Bert has read access to Pigs -> should redirect to form view of Pigs
+ action = mail_thread.message_redirect_action(self.mail_thread, cr, self.user_raoul_id, {'params': {'message_id': msg_id}})
+ self.assertEqual(action.get('type'), 'ir.actions.act_window',
+ 'URL redirection: action with message_id for read-accredited user should redirect to Pigs')
+ self.assertEqual(action.get('res_id'), group_pigs.id,
+ 'URL redirection: action with message_id for read-accredited user should redirect to Pigs')
+
+ # Bert has no read access to Pigs -> should redirect to Inbox
+ action = mail_thread.message_redirect_action(self.mail_thread, cr, self.user_bert_id, {'params': {'message_id': msg_id}})
+ self.assertEqual(action.get('type'), 'ir.actions.client',
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+ self.assertEqual(action.get('id'), act_id,
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+
def test_20_message_post(self):
""" Tests designed for message_post. """
cr, uid, user_raoul, group_pigs = self.cr, self.uid, self.user_raoul, self.group_pigs
@@ -364,8 +479,8 @@ class test_mail(TestMailBase):
'message_post: notification email sent to more than one email address instead of a precise partner')
self.assertIn(sent_email['email_to'][0], test_emailto,
'message_post: notification email email_to incorrect')
- self.assertEqual(sent_email['reply_to'], '"Followers of Pigs" ',
- 'message_post: notification email reply_to incorrect: should name Followers of Pigs, and have raoul email')
+ self.assertEqual(sent_email['reply_to'], 'r@r', # was '"Followers of Pigs" ', but makes no sense
+ 'message_post: notification email reply_to incorrect: should have raoul email')
self.assertEqual(_mail_subject, sent_email['subject'],
'message_post: notification email subject incorrect')
self.assertIn(html_sanitize(_body2), sent_email['body'],
diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py
index e4269d59d8b..5615e22b2c2 100644
--- a/addons/mail/tests/test_mail_gateway.py
+++ b/addons/mail/tests/test_mail_gateway.py
@@ -20,6 +20,7 @@
##############################################################################
from openerp.addons.mail.tests.test_mail_base import TestMailBase
+from openerp.tools import mute_logger
MAIL_TEMPLATE = """Return-Path:
To: {to}
@@ -123,6 +124,115 @@ class TestMailgateway(TestMailBase):
self.assertEqual(partner_info['partner_id'], p_b_id,
'mail_thread: message_find_partner_from_emails wrong partner found')
+ def test_05_mail_message_mail_mail(self):
+ """ Tests designed for testing email values based on mail.message, aliases, ... """
+ cr, uid = self.cr, self.uid
+
+ # Data: clean catchall domain
+ param_ids = self.registry('ir.config_parameter').search(cr, uid, [('key', '=', 'mail.catchall.domain')])
+ self.registry('ir.config_parameter').unlink(cr, uid, param_ids)
+
+ # Do: create a mail_message with a reply_to, without message-id
+ msg_id = self.mail_message.create(cr, uid, {'subject': 'Subject', 'body': 'Body', 'reply_to': 'custom@example.com'})
+ msg = self.mail_message.browse(cr, uid, msg_id)
+ # Test: message content
+ self.assertIn('reply_to', msg.message_id,
+ 'mail_message: message_id should be specific to a mail_message with a given reply_to')
+ self.assertEqual('custom@example.com', msg.reply_to,
+ 'mail_message: incorrect reply_to')
+ # Do: create a mail_mail with the previous mail_message and specified reply_to
+ mail_id = self.mail_mail.create(cr, uid, {'mail_message_id': msg_id, 'reply_to': 'other@example.com', 'state': 'cancel'})
+ mail = self.mail_mail.browse(cr, uid, mail_id)
+ # Test: mail_mail content
+ 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
+ self.assertEqual(mail.reply_to, msg.reply_to,
+ 'mail_mail: reply_to should be equal to the one coming from the mail_message')
+
+ # Do: create a mail_message without a reply_to
+ msg_id = self.mail_message.create(cr, uid, {'subject': 'Subject', 'body': 'Body', 'model': 'mail.group', 'res_id': self.group_pigs_id, 'email_from': False})
+ msg = self.mail_message.browse(cr, uid, msg_id)
+ # Test: message content
+ self.assertIn('mail.group', msg.message_id,
+ 'mail_message: message_id should contain model')
+ self.assertIn('%s' % self.group_pigs_id, msg.message_id,
+ 'mail_message: message_id should contain res_id')
+ self.assertFalse(msg.reply_to,
+ 'mail_message: should not generate a reply_to address when not specified')
+ # 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)
+ # Test: mail_mail content
+ self.assertFalse(mail.reply_to,
+ 'mail_mail: reply_to should not have been guessed')
+ # Update message
+ self.mail_message.write(cr, uid, [msg_id], {'email_from': 'someone@example.com'})
+ 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)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, msg.email_from,
+ '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)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, '"Followers of Pigs" ',
+ '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', '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)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, msg.email_from,
+ 'mail_mail: reply_to should equal the mail_message email_from')
+
+ # 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)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, 'gateway@schlouby.fr',
+ 'mail_mail: reply_to should equal the catchall email alias')
+
+ # Do: create a mail_mail
+ mail_id = self.mail_mail.create(cr, uid, {'state': 'cancel'})
+ mail = self.mail_mail.browse(cr, uid, mail_id)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, 'gateway@schlouby.fr',
+ 'mail_mail: reply_to should equal the catchall email alias')
+
+ # Do: create a mail_mail
+ mail_id = self.mail_mail.create(cr, uid, {'state': 'cancel', 'reply_to': 'someone@example.com'})
+ mail = self.mail_mail.browse(cr, uid, mail_id)
+ # Test: mail_mail content
+ self.assertEqual(mail.reply_to, 'someone@example.com',
+ 'mail_mail: reply_to should equal the rpely_to given to create')
+
+ @mute_logger('openerp.addons.mail.mail_thread', 'openerp.osv.orm')
def test_10_message_process(self):
""" Testing incoming emails processing. """
cr, uid, user_raoul = self.cr, self.uid, self.user_raoul
@@ -365,6 +475,7 @@ class TestMailgateway(TestMailBase):
self.assertEqual(msg.body, '
\nPlease call me as soon as possible this afternoon!\n\n--\nSylvie\n
',
'message_process: plaintext incoming email incorrectly parsed')
+ @mute_logger('openerp.addons.mail.mail_thread', 'openerp.osv.orm')
def test_20_thread_parent_resolution(self):
""" Testing parent/child relationships are correctly established when processing incoming mails """
cr, uid = self.cr, self.uid
diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py
index 4ff6584d789..a6bfc34c213 100644
--- a/addons/mail/wizard/invite.py
+++ b/addons/mail/wizard/invite.py
@@ -75,7 +75,7 @@ class invite_wizard(osv.osv_memory):
model_name = ir_model.name_get(cr, uid, model_ids, context=context)[0][1]
# send an email if option checked and if a message exists (do not send void emails)
- if wizard.send_mail and wizard.message:
+ if wizard.send_mail and wizard.message and not wizard.message == ' ': # when deleting the message, cleditor keeps a
# add signature
# FIXME 8.0: use notification_email_send, send a wall message and let mail handle email notification + message box
signature_company = self.pool.get('mail.notification').get_signature_footer(cr, uid, user_id=uid, res_model=wizard.res_model, res_id=wizard.res_id, context=context)
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 @@
-
@@ -66,13 +65,13 @@
-
-
+
+
-
-
+
+
@@ -85,9 +84,9 @@
OpenERP Partnercreate_date
-
+
-
+
\ 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 @@
-
Dummy Actiondummy
-
+
@@ -40,10 +39,10 @@
- Hello,
-
Thanks for the genuine interest you have shown in OpenERP.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>For OpenERP OnDemand Free Trial 2010
@@ -53,11 +52,11 @@
- Hello,
-
We have very good offer that might suit you.
- We suggest you subscribe to the OpenERP Discovery Day on May 2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>For OpenERP Discovery Day on May 2010
@@ -68,10 +67,10 @@
- Hello,
-
Thanks for showing interest and for subscribing to the OpenERP Discovery Day.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>For OpenERP Discovery Day
@@ -82,10 +81,10 @@
- Hello,
-
Thanks for showing interest and buying the OpenERP book.
+ <p>Hello,</p>
+ <p>Thanks for showing interest and buying the OpenERP book.</p>
If any further information required kindly revert back.
-
We have very good offer that might suit you.
- For our gold partners,We are arranging free technical training on june,2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>technical training to gold partners
@@ -110,11 +109,11 @@
- Hello,
-
We have very good offer that might suit you.
- For our silver partners,We are paid technical training on june,2010.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>training to silver partners
@@ -125,11 +124,11 @@
- Hello,
-
We have very good offer that might suit you.
- For our silver partners, we are offering Gold partnership.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>gold partnership to silver partners
@@ -140,11 +139,11 @@
- Hello,
-
Thanks for showing interest and for subscribing to technical training.
- If any further information required kindly revert back.I really appreciate your co-operation on this.
-
If any further information is required, do not hesitate to reply to this message.
-
Regards,OpenERP Team,
]]>
+ <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>subscribing to technical training
@@ -171,7 +170,7 @@
Propose a 1 month free trial for an OnDemand offer
-
+ report
@@ -180,27 +179,27 @@
Thanks for showing interest
-
+ Propose to subscribe to the OpenERP Discovery Day on May 2010
-
+ Thanks for subscribing to the OpenERP Discovery Day
-
+ Propose to buy the OpenERP Book
-
+ report
@@ -209,81 +208,81 @@
Thanks for buying the OpenERP book
-
+ Propose a free technical training to Gold partners
-
+ Propose paid training to Silver partners
-
+ Propose gold partnership to silver partners
-
+ Thanks for subscribing to technical training
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -296,4 +295,4 @@
-
+
\ 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 @@
-
-
+
+
-
-
+
+
@@ -110,25 +110,25 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
\ No newline at end of file
+
diff --git a/addons/mrp/html/coppernic.png b/addons/mrp/html/coppernic.png
new file mode 100644
index 00000000000..692230a5198
Binary files /dev/null and b/addons/mrp/html/coppernic.png differ
diff --git a/addons/mrp/html/index.html b/addons/mrp/html/index.html
new file mode 100644
index 00000000000..5777eb5f147
--- /dev/null
+++ b/addons/mrp/html/index.html
@@ -0,0 +1,193 @@
+
+
+
+
Manufacturing Resource Planning
+
Manage Bill of Materials, Plan Manufacturing Orders, Track Work Orders
+Get all your assembly or manufacturing operations managed by OpenERP. Schedule
+manufacturing orders and work orders automatically. Review the proposed
+planning with the smart kanban and gantt views. Use the advanced analytics
+features to detect bottleneck in resources capacities and inventory locations.
+
+Get manufacturing orders and work orders scheduled automatically based on your
+procurement rules, quantities forecasted and dependent demand (demand for this
+part based on another part consuming it).
+
+
+
+
+
+
+
+
+
+
+
+
Define Flexible Master Data
+
Products, Bill of Materials and Routings
+
+
+
+
+
+Get the flexibility to create multi-level bill of materials, optional routing,
+version changes and phantom bill of materials. You can use BoM for kits or for
+manufacturing orders.
+
+
+
+
+
+
+
+
Get Flexibility In All Opertions
+
+
+ Edit manually all proposed operations at any level of the progress.
+ With OpenERP, you will not be frustrated by a rigid system.
+
+
+
+
+
+
+
+
+
+
+
+
Schedule Work Orders
+
Check resources capacities and fix bottlenecks
+
+
+
+
+
+
+
+Define routings and plan the working time and capacity of your resources.
+Quickly identify resource requirements and bottlenecks to ensure your production
+meets your delivery schedule dates.
+
+Organize manufacturing orders and work orders the way you like it. Process next
+orders from the list view, control inthe calendar view and edit the proposed
+schedule in the Gantt view.
+
+
+
+
Lists
+
+
+
+
+
+
Gantt Charts
+
+
+
+
+
Calendar
+
+
+
+
+
+
+
+
Inventory & Manufacturing Analytics
+
+
+
+
+
+
+
+Track the evolution of the stock value, according to the level of manufacturing
+activities as they progress in the transformation process.
+
+
+
+
+
+
+
+
Fully Integrated with Operations
+
Sales, Purchases and Accounting integration
+
+
+Get your manufacturing resource planning accurate with it's full integration
+with sales and purchases apps. The accounting integration allows real time
+accounting valuation and deeper reporting on costs and revenues on your
+manufacturing operations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Many companies already enjoy it
+
Hear what they have to say !
+
+
+
+
+ OpenERP allowed our company to efficiently manage a growth from a turnover of 2.4m€ to 15m€ in 4 years.
+
+
+
+
+
+
+
diff --git a/addons/mrp/html/manufacturing_illu_01.png b/addons/mrp/html/manufacturing_illu_01.png
new file mode 100644
index 00000000000..771223a8dd9
Binary files /dev/null and b/addons/mrp/html/manufacturing_illu_01.png differ
diff --git a/addons/mrp/html/manufacturing_illu_02.png b/addons/mrp/html/manufacturing_illu_02.png
new file mode 100644
index 00000000000..4a1910c0b73
Binary files /dev/null and b/addons/mrp/html/manufacturing_illu_02.png differ
diff --git a/addons/mrp/html/mrp_bom.png b/addons/mrp/html/mrp_bom.png
new file mode 100644
index 00000000000..29b0fd48ca9
Binary files /dev/null and b/addons/mrp/html/mrp_bom.png differ
diff --git a/addons/mrp/html/mrp_calendar.png b/addons/mrp/html/mrp_calendar.png
new file mode 100644
index 00000000000..a2d52775a0e
Binary files /dev/null and b/addons/mrp/html/mrp_calendar.png differ
diff --git a/addons/mrp/html/mrp_gantt.png b/addons/mrp/html/mrp_gantt.png
new file mode 100644
index 00000000000..05c9315d5cd
Binary files /dev/null and b/addons/mrp/html/mrp_gantt.png differ
diff --git a/addons/mrp/html/mrp_integrate.png b/addons/mrp/html/mrp_integrate.png
new file mode 100644
index 00000000000..954f54953cb
Binary files /dev/null and b/addons/mrp/html/mrp_integrate.png differ
diff --git a/addons/mrp/html/mrp_list.png b/addons/mrp/html/mrp_list.png
new file mode 100644
index 00000000000..5813c32e6b7
Binary files /dev/null and b/addons/mrp/html/mrp_list.png differ
diff --git a/addons/mrp/html/mrp_mo.png b/addons/mrp/html/mrp_mo.png
new file mode 100644
index 00000000000..6138973570f
Binary files /dev/null and b/addons/mrp/html/mrp_mo.png differ
diff --git a/addons/mrp/html/mrp_product.png b/addons/mrp/html/mrp_product.png
new file mode 100644
index 00000000000..cbfd054d72e
Binary files /dev/null and b/addons/mrp/html/mrp_product.png differ
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 \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 \n"
+"PO-Revision-Date: 2013-06-04 04:00+0000\n"
+"Last-Translator: erdenebold \n"
"Language-Team: Mongolian \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 %s created."
-msgstr ""
+msgstr "Үйлдвэрлэлийн захиалга %s үүсгэгдлээ."
#. 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 \n"
+"PO-Revision-Date: 2013-05-27 12:24+0000\n"
+"Last-Translator: Pavel \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 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
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 @@
-
-
+
+
-
\ No newline at end of file
+
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 @@
-
-
+
+
-
-
+
+
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -178,16 +159,16 @@
- Product
+ Product
- Quantity
+ Quantity
- Source Location
+ Source Location
- Destination Location
+ Destination Location
@@ -196,20 +177,20 @@
- Production Order N° : [[ o.name ]]
+ Production Order N° : [[ o.name ]]
- Source Document
+ Source Document
- Product
+ Product
- Quantity
+ Quantity
@@ -232,16 +213,16 @@
- Scheduled Date
+ Scheduled Date
- Printing date
+ Printing date
- Partner Ref
+ Partner Ref
- SO Number
+ SO Number
@@ -266,26 +247,26 @@
- Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]]
+ Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]]
- Sequence
+ Sequence
- Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]
+ Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]]
- WorkCenter
+ WorkCenter
- No. Of Cycles
+ No. Of Cycles
- No. Of Hours
+ No. Of Hours
@@ -317,28 +298,28 @@
- Bill Of Material
+ Bill Of Material
+Organize yourself with efficient todo lists and notes. From personnal tasks to collaborative meeting minutes, increase your user's productivity by giving them the tools to prioritize their work, share their ideas and collaborate on documents.
+
+Quickly create to-dos, organize horizontally for the mid-term (today, this week, this month, ...), prioritize vertically for the short term and group by assigning colors. The kanban approach allows a simple visual organization of your to-dos.
+
+
+
+
+
+
+
Beat Work Overload
+
+ Feel how good it is to rely on a structured way to organize your work instead of keeping everything in memory. Use notes to Get Things Done.
+
+
+
+
Prioritize Efficiently
+
+ Most people are lost in the flow of urgent daily tasks and have difficulties to work on important, long-term tasks. Notes gives you a simple way to allocate time very day to do important, but less urgent tasks.
+
+
+
+
Find Motivation to Close Tasks
+
+ People used to work on tasks they like and not on important tasks. Start feeling good by checking tasks as done.
+
+
+
+
+
+
+
Adapts to Your Creative Process
+
Customize to your own workflow
+
+Everyone has their own way to organize activities. OpenERP Notes' smart kanban approach allows every user to customize their own steps to process it's to-dos and notes.
+
+
+
+
+
A Creative Person
+
+A creative person will organize notes based on idea's maturity level: Draft Ideas Mature Ideas Specified To Do
+
+
+
A Frequent Traveler
+
+ An employee travelling a lot can organize their tasks based on the context to perform the task: U.S. Office | London's Office | To Review during Flights | At Home
+
+
+
+
A Manager
+
+ A manager will organize their high number of tasks based on prioritizations: Todo Today | This Week | This Month | Later
+
+
+
+
+
+
+
+
Personnal Notes
+
Notes are private but can be shared
+
+
+
+
+
+
+
+Write down your ideas in pads, keep your notes at your finger tips, attach related documents and use tags and colors to organize the information. Once your ideas are mature, you can share them to others users, start discussing it and collaborate by improving the specification in the pad.
+
+
+
+
+
+
+
+
Collaborative Meeting Minutes
+
Real-time sharing and edition of notes
+
+
+The real time collaborative writings on notes makes it the perfect tool to collaborate on meeting minutes. Attendees will be able to contribute to the minutes, attach important documents or discuss on the related thread.
+
+
+
+
+
+
+
+
+
diff --git a/addons/note/html/notes_illu_01.png b/addons/note/html/notes_illu_01.png
new file mode 100644
index 00000000000..a7d4197561d
Binary files /dev/null and b/addons/note/html/notes_illu_01.png differ
diff --git a/addons/note/html/notes_sc_00.png b/addons/note/html/notes_sc_00.png
new file mode 100644
index 00000000000..7bb4f95a640
Binary files /dev/null and b/addons/note/html/notes_sc_00.png differ
diff --git a/addons/note/html/notes_sc_01.png b/addons/note/html/notes_sc_01.png
new file mode 100644
index 00000000000..ce9367abf9b
Binary files /dev/null and b/addons/note/html/notes_sc_01.png differ
diff --git a/addons/note/html/notes_sc_02.png b/addons/note/html/notes_sc_02.png
new file mode 100644
index 00000000000..e47889b33fc
Binary files /dev/null and b/addons/note/html/notes_sc_02.png differ
diff --git a/addons/note/html/notes_sc_03.png b/addons/note/html/notes_sc_03.png
new file mode 100644
index 00000000000..6d59d7e5df8
Binary files /dev/null and b/addons/note/html/notes_sc_03.png differ
diff --git a/addons/note/note.py b/addons/note/note.py
index 2d95b15107a..eb9a6397d18 100644
--- a/addons/note/note.py
+++ b/addons/note/note.py
@@ -141,12 +141,19 @@ class note_note(osv.osv):
#note without user's stage
nb_notes_ws = self.search(cr,uid, domain+[('stage_ids', 'not in', current_stage_ids)], context=context, count=True)
if nb_notes_ws:
- result += [{ #notes for unknown stage and if stage_ids is not empty
- '__context': {'group_by': groupby[1:]},
- '__domain': domain + [('stage_ids', 'not in', current_stage_ids)],
- 'stage_id': (0, 'Unknown'),
- 'stage_id_count':nb_notes_ws
- }]
+ # add note to the first column if it's the first stage
+ dom_not_in = ('stage_ids', 'not in', current_stage_ids)
+ if result and result[0]['stage_id'][0] == current_stage_ids[0]:
+ dom_in = result[0]['__domain'].pop()
+ result[0]['__domain'] = domain + ['|', dom_in, dom_not_in]
+ else:
+ # add the first stage column
+ result = [{
+ '__context': {'group_by': groupby[1:]},
+ '__domain': domain + [dom_not_in],
+ 'stage_id': (current_stage_ids[0], stage_name[current_stage_ids[0]]),
+ 'stage_id_count':nb_notes_ws
+ }] + result
else: # if stage_ids is empty
@@ -156,7 +163,7 @@ class note_note(osv.osv):
result = [{ #notes for unknown stage
'__context': {'group_by': groupby[1:]},
'__domain': domain,
- 'stage_id': (0, 'Unknown'),
+ 'stage_id': False,
'stage_id_count':nb_notes_ws
}]
else:
@@ -187,9 +194,12 @@ class res_users(osv.Model):
model_id = data_obj.get_object_reference(cr, uid, 'base', 'group_user') #Employee Group
group_id = model_id and model_id[1] or False
if group_id in [x.id for x in user.groups_id]:
- for note_xml_id in ['note_stage_01','note_stage_02','note_stage_03','note_stage_04']:
- data_id = data_obj._get_id(cr, uid, 'note', note_xml_id)
+ for note_xml_id in ['note_stage_00','note_stage_01','note_stage_02','note_stage_03','note_stage_04']:
+ try:
+ data_id = data_obj._get_id(cr, uid, 'note', note_xml_id)
+ except ValueError:
+ continue
stage_id = data_obj.browse(cr, uid, data_id, context=context).res_id
note_obj.copy(cr, uid, stage_id, default = {
'user_id': user_id}, context=context)
- return user_id
\ No newline at end of file
+ return user_id
diff --git a/addons/note/note_data.xml b/addons/note/note_data.xml
index 592292788b3..376b8e9053f 100644
--- a/addons/note/note_data.xml
+++ b/addons/note/note_data.xml
@@ -2,6 +2,12 @@
+
+ New
+
+
+
+
Today1
diff --git a/addons/note/note_view.xml b/addons/note/note_view.xml
index 49a154d10cc..f3b9e4669c7 100644
--- a/addons/note/note_view.xml
+++ b/addons/note/note_view.xml
@@ -175,7 +175,7 @@
formkanban,tree,form
- {'search_default_open_true':True}
+ {}
+ OpenERP's Point of Sale introduces a super clean interface with no installation required
+ that runs online and offline on modern hardwares.
+
+
+ It's full integration with the company inventory and accounting, gives you real time statistics and
+ consolidations amongst all shops without the hassle of integrating several applications.
+
+ OpenERP's POS is a web application that can run on any device that can
+ display websites with little to no setup required.
+
+
+
+
Touchscreen or Keyboard ?
+
+ The Point of Sale works perfectly on any kind of touch enabled device, whether it's
+ multi-touch tablets like an iPad or keyboardless resistive touchscreen terminals.
+
+
+
+
Scales and Printers
+
+ Barcode scanners and printers are supported out of the box with no setup required.
+ Scales, cashboxes, and other peripherals can be used with the
+ proxy API.
+
+
+
+
+
+
+
+
+
Online and Offline
+
OpenERP's POS stays reliable even if your connection isn't
+
+
+
+
+
+
+
+
+ Deploy new stores with just an internet connection:
+ no installation, no specific hardware required. It works with any
+ iPad, Tablet PC, laptop or industrial POS machine.
+
+ While an internet connection is required to start the Point of Sale,
+ it will stay operational even after a complete disconnection.
+
+ Say goodbye to ugly, outdated POS software and enjoy the OpenERP
+ web interface designed for modern retailer.
+
+
+
+
+
Designed for Productivity
+
+ Whether it's for a restaurant or a shop, you can activate the multiple
+ tickets in parallel to not make your customers wait.
+
+
+
+
+
Blasting fast search
+
+ Scan products, browse through hyerarchical categories, or get quick
+ information about products with the blasting fast filter accross
+ all your products.
+
+
+
+
+
+
+
+
Integrated Inventory Management
+
+
+
+
+
+ Consolidate all your sales channel in real time: stores, ecommerce, sales teams.
+ Get real time control of the inventory and accurate forecasts to manage procurements.
+
+
+ A full warehouse management system at your fingertips: get information
+ about products availabilities, trigger procurement requests, etc.
+
+
+
+
+
+
+
+
Deliver in-store customer services
+
Repairs, warantees, deliveries, etc.
+
+
+ Give your shopper a strong experience by integrating in-store
+ customer services. Handle reparations, track warantees, follow
+ customer claims, plan delivery orders, etc.
+
+
+
+
+
+
+
+
+
+
+
Invoicing & Accounting Integration
+
+
+
+
+
+ Produce customer invoices in just a few clicks. Control sales and
+ cash in real time and use OpenERP's powerful reporting to make
+ smarter decisions to improve your store's efficiency.
+
+ No more hassle of having to integrate softwares: get all your sales
+ and inventory operations automatically posted in your G/L.
+
+
+
+
+
+
+
+
Self-checkout Interface
+
+
+ Reduce costs by limitting the number of required cashiers.
+ The self-checkout mode allows customers to scan products and pay by
+ themselves with a dedicated and super easy user interface.
+
+
+ Use lights and sounds to control the checkout distantly.
+
+
+
+
+
+
+
+
+
+
+
+
Unified Data Amongst All Shops
+
Sync products, prices, customers with no effort
+
+
+
+
+
+ Get new products, pricing strategies and promotions applied automatically to
+ selected stores. Work on a unified customer base. No complex interface is
+ required to pilot a global strategy amongst all your stores.
+
+
+ With OpenERP as a backend, you have a system proven to be perfectly
+ suitable for small stores or large multinationals.
+
+
+
+
+
+
+
+
Know your customers - in store and out
+
+
+ Successful brands integrates all their customer relationship accross all their
+ channels to develop accurate customer profile and communicate with shoppers
+ as they make buying decisions, in store or online.
+
+
+ With OpenERP, you get a 360° customer view, including cross-channel sales,
+ interaction history, profiles, and more.
+
+
+
+
+
+
+
diff --git a/addons/point_of_sale/html/pos_checkout.jpg b/addons/point_of_sale/html/pos_checkout.jpg
new file mode 100644
index 00000000000..d87e5b8499d
Binary files /dev/null and b/addons/point_of_sale/html/pos_checkout.jpg differ
diff --git a/addons/point_of_sale/html/pos_customer_form.png b/addons/point_of_sale/html/pos_customer_form.png
new file mode 100644
index 00000000000..4e89d43c4c3
Binary files /dev/null and b/addons/point_of_sale/html/pos_customer_form.png differ
diff --git a/addons/point_of_sale/html/pos_customers.png b/addons/point_of_sale/html/pos_customers.png
new file mode 100644
index 00000000000..6448074c3d9
Binary files /dev/null and b/addons/point_of_sale/html/pos_customers.png differ
diff --git a/addons/point_of_sale/html/pos_devices.png b/addons/point_of_sale/html/pos_devices.png
new file mode 100644
index 00000000000..a021a87bfac
Binary files /dev/null and b/addons/point_of_sale/html/pos_devices.png differ
diff --git a/addons/point_of_sale/html/pos_invoice.png b/addons/point_of_sale/html/pos_invoice.png
new file mode 100644
index 00000000000..aae4f6d38a5
Binary files /dev/null and b/addons/point_of_sale/html/pos_invoice.png differ
diff --git a/addons/point_of_sale/html/pos_offline.png b/addons/point_of_sale/html/pos_offline.png
new file mode 100644
index 00000000000..764cda88e87
Binary files /dev/null and b/addons/point_of_sale/html/pos_offline.png differ
diff --git a/addons/point_of_sale/html/pos_product_form.png b/addons/point_of_sale/html/pos_product_form.png
new file mode 100644
index 00000000000..a25c85b6496
Binary files /dev/null and b/addons/point_of_sale/html/pos_product_form.png differ
diff --git a/addons/point_of_sale/html/pos_products.png b/addons/point_of_sale/html/pos_products.png
new file mode 100644
index 00000000000..cbfd054d72e
Binary files /dev/null and b/addons/point_of_sale/html/pos_products.png differ
diff --git a/addons/point_of_sale/html/pos_sc_01.jpg b/addons/point_of_sale/html/pos_sc_01.jpg
new file mode 100644
index 00000000000..8fc97e00672
Binary files /dev/null and b/addons/point_of_sale/html/pos_sc_01.jpg differ
diff --git a/addons/point_of_sale/html/pos_sc_02.jpg b/addons/point_of_sale/html/pos_sc_02.jpg
new file mode 100644
index 00000000000..d26e0504933
Binary files /dev/null and b/addons/point_of_sale/html/pos_sc_02.jpg differ
diff --git a/addons/point_of_sale/html/pos_sc_03.jpg b/addons/point_of_sale/html/pos_sc_03.jpg
new file mode 100644
index 00000000000..8eb7e312791
Binary files /dev/null and b/addons/point_of_sale/html/pos_sc_03.jpg differ
diff --git a/addons/point_of_sale/html/pos_ui_01.png b/addons/point_of_sale/html/pos_ui_01.png
new file mode 100644
index 00000000000..1725f91d6f2
Binary files /dev/null and b/addons/point_of_sale/html/pos_ui_01.png differ
diff --git a/addons/point_of_sale/html/pos_ui_02.png b/addons/point_of_sale/html/pos_ui_02.png
new file mode 100644
index 00000000000..aa0eb51c0f1
Binary files /dev/null and b/addons/point_of_sale/html/pos_ui_02.png differ
diff --git a/addons/point_of_sale/html/pos_ui_03.png b/addons/point_of_sale/html/pos_ui_03.png
new file mode 100644
index 00000000000..f25f2a49c00
Binary files /dev/null and b/addons/point_of_sale/html/pos_ui_03.png differ
diff --git a/addons/point_of_sale/res_partner.py b/addons/point_of_sale/res_partner.py
index 81a0f6083be..d7969b0e21a 100644
--- a/addons/point_of_sale/res_partner.py
+++ b/addons/point_of_sale/res_partner.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import math
diff --git a/addons/point_of_sale/res_users.py b/addons/point_of_sale/res_users.py
index 05e49a5545d..ed2c6fae598 100644
--- a/addons/point_of_sale/res_users.py
+++ b/addons/point_of_sale/res_users.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import math
diff --git a/addons/point_of_sale/static/lib/mousewheel/jquery.mousewheel-3.0.6.js b/addons/point_of_sale/static/lib/mousewheel/jquery.mousewheel-3.0.6.js
old mode 100755
new mode 100644
diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js
index a79b111b5c5..e47ce66f648 100644
--- a/addons/point_of_sale/static/src/js/db.js
+++ b/addons/point_of_sale/static/src/js/db.js
@@ -204,8 +204,8 @@ function openerp_pos_db(instance, module){
this.packagings_by_product_id[pack.product_id[0]] = [];
}
this.packagings_by_product_id[pack.product_id[0]].push(pack);
- if(pack.ean13){
- this.packagings_by_ean13[pack.ean13] = pack;
+ if(pack.ean){
+ this.packagings_by_ean13[pack.ean] = pack;
}
}
},
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 98ba49c8856..13003bcf19f 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -323,7 +323,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
module.Product = Backbone.Model.extend({
get_image_url: function(){
- return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image', id: this.get('id')});
+ return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image_medium', id: this.get('id')});
},
});
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index cec48dbe72f..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() {
@@ -498,7 +507,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
},
get_image_url: function(category){
- return instance.session.url('/web/binary/image', {model: 'pos.category', field: 'image', id: category.id});
+ return instance.session.url('/web/binary/image', {model: 'pos.category', field: 'image_medium', id: category.id});
},
renderElement: function(){
diff --git a/addons/point_of_sale/wizard/pos_box.py b/addons/point_of_sale/wizard/pos_box.py
index 471153695f4..e1fa90844d7 100644
--- a/addons/point_of_sale/wizard/pos_box.py
+++ b/addons/point_of_sale/wizard/pos_box.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
from openerp.osv import osv, fields
from openerp.tools.translate import _
diff --git a/addons/point_of_sale/wizard/pos_payment.xml b/addons/point_of_sale/wizard/pos_payment.xml
index 3b1cde3e488..2e828521757 100644
--- a/addons/point_of_sale/wizard/pos_payment.xml
+++ b/addons/point_of_sale/wizard/pos_payment.xml
@@ -15,7 +15,7 @@
diff --git a/addons/point_of_sale/wizard/pos_session_opening.py b/addons/point_of_sale/wizard/pos_session_opening.py
index 039dd90ae6b..39e7c564831 100644
--- a/addons/point_of_sale/wizard/pos_session_opening.py
+++ b/addons/point_of_sale/wizard/pos_session_opening.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
from openerp.osv import osv, fields
from openerp.tools.translate import _
diff --git a/addons/portal/__init__.py b/addons/portal/__init__.py
index 0045a557a49..1f60accc83d 100644
--- a/addons/portal/__init__.py
+++ b/addons/portal/__init__.py
@@ -20,7 +20,9 @@
##############################################################################
import portal
+import mail_thread
import mail_mail
+import mail_message
import wizard
import acquirer
diff --git a/addons/portal/mail_mail.py b/addons/portal/mail_mail.py
index 73d8cadb577..84823bab747 100644
--- a/addons/portal/mail_mail.py
+++ b/addons/portal/mail_mail.py
@@ -21,7 +21,6 @@
from openerp import SUPERUSER_ID
from openerp.osv import osv
-from openerp.osv.orm import except_orm
from openerp.tools.translate import _
@@ -29,31 +28,22 @@ class mail_mail(osv.Model):
""" Update of mail_mail class, to add the signin URL to notifications. """
_inherit = 'mail.mail'
- def send_get_mail_body_footer(self, cr, uid, mail, partner=None, context=None):
- """ add a signin link inside the body of a mail.mail
- :param mail: mail.mail browse_record
- :param partner: browse_record of the specific recipient partner
- :return: the resulting body_html
+ def _get_partner_access_link(self, cr, uid, mail, partner=None, context=None):
+ """ Generate URLs for links in mails:
+ - partner is not an user: signup_url
+ - partner is an user: fallback on classic URL
"""
+ if context is None:
+ context = {}
partner_obj = self.pool.get('res.partner')
- if partner:
- contex_signup = dict(context or {}, signup_valid=True)
- partner = partner_obj.browse(cr, SUPERUSER_ID, partner.id, context=contex_signup)
- body_footer = _("""Access your messages and documents through our Customer Portal""") % partner.signup_url
- # partner is an user: add a link to the document if read access
- if partner.user_ids and mail.model and mail.res_id \
- and self.check_access_rights(cr, partner.user_ids[0].id, 'read', raise_exception=False):
- related_user = partner.user_ids[0]
- try:
- self.pool[mail.model].check_access_rule(cr, related_user.id, [mail.res_id], 'read', context=context)
- url = partner_obj._get_signup_url_for_action(cr, related_user.id, [partner.id], action='', res_id=mail.res_id, model=mail.model, context=context)[partner.id]
- text = _("""Access this document directly in OpenERP""") % url
- except except_orm, e:
- pass
- return body_footer
+ if partner and not partner.user_ids:
+ contex_signup = dict(context, signup_valid=True)
+ signup_url = partner_obj._get_signup_url_for_action(cr, SUPERUSER_ID, [partner.id],
+ action='login', model=mail.model, res_id=mail.res_id,
+ context=contex_signup)[partner.id]
+ return _("""Access your messages and documents through our Customer Portal""") % signup_url
else:
- return super(mail_mail, self).send_get_mail_body_footer(cr, uid, mail, partner=partner, context=context)
-
+ return super(mail_mail, self)._get_partner_access_link(cr, uid, mail, partner=partner, context=context)
class mail_thread_portal(osv.AbstractModel):
diff --git a/addons/portal/mail_message.py b/addons/portal/mail_message.py
new file mode 100644
index 00000000000..d6a38f27378
--- /dev/null
+++ b/addons/portal/mail_message.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2011 OpenERP S.A ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from openerp.osv import osv, orm
+from openerp.tools.translate import _
+
+
+class mail_message(osv.Model):
+ """ Update of mail_message class, to restrict mail access. """
+ _inherit = 'mail.message'
+
+ def _search(self, cr, uid, args, offset=0, limit=None, order=None,
+ context=None, count=False, access_rights_uid=None):
+ """ Override that adds specific access rights of mail.message, to remove
+ all internal notes if uid is a non-employee
+ """
+ group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
+ group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_user')[1]
+ if group_user_id not in [group.id for group in group_ids]:
+ args = ['&', '|', ('type', '!=', 'comment'), ('subtype_id', '!=', False)] + list(args)
+
+ return super(mail_message, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
+ context=context, count=False, access_rights_uid=access_rights_uid)
+
+ def check_access_rule(self, cr, uid, ids, operation, context=None):
+ """ Add Access rules of mail.message for non-employee user:
+ - read:
+ - raise if the type is comment and subtype NULL (internal note)
+ """
+ group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
+ group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_user')[1]
+ if group_user_id not in [group.id for group in group_ids]:
+ cr.execute('SELECT DISTINCT id FROM "%s" WHERE type = %%s AND subtype_id IS NULL AND id = ANY (%%s)' % (self._table), ('comment', ids,))
+ if cr.fetchall():
+ raise orm.except_orm(_('Access Denied'),
+ _('The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: %s, Operation: %s)') % \
+ (self._description, operation))
+
+ return super(mail_message, self).check_access_rule(cr, uid, ids=ids, operation=operation, context=context)
diff --git a/addons/portal/mail_thread.py b/addons/portal/mail_thread.py
new file mode 100644
index 00000000000..44bc4d0bde8
--- /dev/null
+++ b/addons/portal/mail_thread.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2013-TODAY OpenERP S.A ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from openerp import SUPERUSER_ID
+from openerp.osv import osv
+
+
+class mail_thread(osv.AbstractModel):
+ """ Update of mail_mail class, to add the signin URL to notifications. """
+ _inherit = 'mail.thread'
+
+ def _get_inbox_action_xml_id(self, cr, uid, context=None):
+ """ For a given message, return an action that either
+ - opens the form view of the related document if model, res_id, and
+ read access to the document
+ - opens the Inbox with a default search on the conversation if model,
+ res_id
+ - opens the Inbox with context propagated
+ """
+ cur_user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context)
+ # if uid is a portal user -> action is different
+ if any(group.is_portal for group in cur_user.groups_id):
+ return ('portal', 'action_mail_inbox_feeds_portal')
+ else:
+ return super(mail_thread, self)._get_inbox_action_xml_id(cr, uid, context=context)
diff --git a/addons/portal/portal_demo.xml b/addons/portal/portal_demo.xml
index c05189fd2ab..3660754b4ad 100644
--- a/addons/portal/portal_demo.xml
+++ b/addons/portal/portal_demo.xml
@@ -40,7 +40,7 @@ Mr Demo Portal
mail.group
- As your first portal member, I am very pleased to be able to be able to communicate directly with you. Be sure I'll read all news carefully!]]>
+ As your first portal member, I am very pleased to be able to communicate directly with you. Be sure I'll read all news carefully!]]>comment
diff --git a/addons/portal/security/ir.model.access.csv b/addons/portal/security/ir.model.access.csv
index 31bd7332c2f..26b0b4895e8 100644
--- a/addons/portal/security/ir.model.access.csv
+++ b/addons/portal/security/ir.model.access.csv
@@ -3,7 +3,7 @@ access_mail_message_portal,mail.message.portal,mail.model_mail_message,group_por
access_mail_mail_portal,mail.mail.portal,mail.model_mail_mail,group_portal,1,1,1,0
access_mail_notification_portal,mail.notification.portal,mail.model_mail_notification,group_portal,1,1,1,0
access_mail_followers_portal,mail.followers.portal,mail.model_mail_followers,group_portal,1,1,0,0
-access_res_partner,res.partner,base.model_res_partner,portal.group_portal,1,0,0,0
+access_res_partner_portal,res.partner.portal,base.model_res_partner,portal.group_portal,1,0,0,0
access_acquirer,portal.payment.acquirer,portal.model_portal_payment_acquirer,,1,0,0,0
access_acquirer_all,portal.payment.acquirer,portal.model_portal_payment_acquirer,base.group_system,1,1,1,1
access_ir_attachment_group_portal,ir.attachment group_portal,base.model_ir_attachment,portal.group_portal,1,0,1,0
\ No newline at end of file
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 @@
res_partner: read access on my partner
- [('user_ids', 'in', user.id)]
+ [('id', 'child_of', user.commercial_partner_id.id)]
diff --git a/addons/portal/tests/test_portal.py b/addons/portal/tests/test_portal.py
index 07becf5cdd9..e2b66e65af6 100644
--- a/addons/portal/tests/test_portal.py
+++ b/addons/portal/tests/test_portal.py
@@ -40,7 +40,9 @@ class test_portal(TestMailBase):
self.partner_chell_id = self.user_chell.partner_id.id
# Create a PigsPortal group
- self.group_port_id = self.mail_group.create(cr, uid, {'name': 'PigsPortal', 'public': 'groups', 'group_public_id': self.group_portal_id})
+ self.group_port_id = self.mail_group.create(cr, uid,
+ {'name': 'PigsPortal', 'public': 'groups', 'group_public_id': self.group_portal_id},
+ {'mail_create_nolog': True})
# Set an email address for the user running the tests, used as Sender for outgoing mails
self.res_users.write(cr, uid, uid, {'email': 'test@localhost'})
@@ -130,3 +132,94 @@ class test_portal(TestMailBase):
'invite: body of invitation email is incorrect')
self.assertTrue(partner_carine.signup_url in sent_email.get('body'),
'invite: body of invitation email does not contain signup url')
+
+ def test_20_notification_url(self):
+ """ Tests designed to test the URL added in notification emails. """
+ cr, uid, group_pigs = self.cr, self.uid, self.group_pigs
+
+ # Partner data
+ partner_raoul = self.res_partner.browse(cr, uid, self.partner_raoul_id)
+ partner_bert_id = self.res_partner.create(cr, uid, {'name': 'bert'})
+ partner_bert = self.res_partner.browse(cr, uid, partner_bert_id)
+ # Mail data
+ mail_mail_id = self.mail_mail.create(cr, uid, {'state': 'exception'})
+ mail = self.mail_mail.browse(cr, uid, mail_mail_id)
+
+ # Test: link for nobody -> None
+ url = self.mail_mail._get_partner_access_link(cr, uid, mail)
+ self.assertEqual(url, None,
+ 'notification email: mails not send to a specific partner should not have any URL')
+
+ # Test: link for partner -> signup URL
+ url = self.mail_mail._get_partner_access_link(cr, uid, mail, partner=partner_bert)
+ self.assertIn(partner_bert.signup_url, url,
+ 'notification email: mails send to a not-user partner should contain the signup URL')
+
+ # Test: link for user -> signin
+ url = self.mail_mail._get_partner_access_link(cr, uid, mail, partner=partner_raoul)
+ self.assertIn('action=mail.action_mail_redirect', url,
+ 'notification email: link should contain the redirect action')
+ self.assertIn('login=%s' % partner_raoul.user_ids[0].login, url,
+ 'notification email: link should contain the user login')
+
+ @mute_logger('openerp.addons.mail.mail_thread', 'openerp.osv.orm')
+ def test_21_inbox_redirection(self):
+ """ Tests designed to test the inbox redirection of emails notification URLs. """
+ cr, uid, user_admin, group_pigs = self.cr, self.uid, self.user_admin, self.group_pigs
+ model, act_id = self.ir_model_data.get_object_reference(cr, uid, 'mail', 'action_mail_inbox_feeds')
+ model, port_act_id = self.ir_model_data.get_object_reference(cr, uid, 'portal', 'action_mail_inbox_feeds_portal')
+ # Data: post a message on pigs
+ msg_id = self.group_pigs.message_post(body='My body', partner_ids=[self.partner_bert_id, self.partner_chell_id], type='comment', subtype='mail.mt_comment')
+
+ # No specific parameters -> should redirect to Inbox
+ action = self.mail_thread.message_redirect_action(cr, self.user_raoul_id, {'params': {}})
+ self.assertEqual(action.get('type'), 'ir.actions.client',
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+ self.assertEqual(action.get('id'), act_id,
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+
+ # Bert has read access to Pigs -> should redirect to form view of Pigs
+ action = self.mail_thread.message_redirect_action(cr, self.user_raoul_id, {'params': {'message_id': msg_id}})
+ self.assertEqual(action.get('type'), 'ir.actions.act_window',
+ 'URL redirection: action with message_id for read-accredited user should redirect to Pigs')
+ self.assertEqual(action.get('res_id'), group_pigs.id,
+ 'URL redirection: action with message_id for read-accredited user should redirect to Pigs')
+
+ # Bert has no read access to Pigs -> should redirect to Inbox
+ action = self.mail_thread.message_redirect_action(cr, self.user_bert_id, {'params': {'message_id': msg_id}})
+ self.assertEqual(action.get('type'), 'ir.actions.client',
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+ self.assertEqual(action.get('id'), act_id,
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+
+ # Chell has no read access to pigs -> should redirect to Portal Inbox
+ action = self.mail_thread.message_redirect_action(cr, self.user_chell_id, {'params': {'message_id': msg_id}})
+ self.assertEqual(action.get('type'), 'ir.actions.client',
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+ self.assertEqual(action.get('id'), port_act_id,
+ 'URL redirection: action without parameters should redirect to client action Inbox')
+
+ def test_30_message_read(self):
+ cr, uid, group_port_id = self.cr, self.uid, self.group_port_id
+
+ # Data: custom subtypes
+ mt_group_public_id = self.mail_message_subtype.create(cr, uid, {'name': 'group_public', 'description': 'Group changed'})
+ self.ir_model_data.create(cr, uid, {'name': 'mt_group_public', 'model': 'mail.message.subtype', 'module': 'mail', 'res_id': mt_group_public_id})
+ # Data: post messages with various subtypes
+ msg1_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body1', type='comment', subtype='mail.mt_comment')
+ msg2_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body2', type='comment', subtype='mail.mt_group_public')
+ msg3_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body3', type='comment', subtype='mail.mt_comment')
+ msg4_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body4', type='comment')
+ msg5_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body5', type='notification')
+
+ # Do: Chell search messages: should not see internal notes (comment without subtype)
+ msg_ids = self.mail_message.search(cr, self.user_chell_id, [('model', '=', 'mail.group'), ('res_id', '=', group_port_id)])
+ self.assertEqual(set(msg_ids), set([msg1_id, msg2_id, msg3_id, msg5_id]),
+ 'mail_message: portal user has access to messages he should not read')
+
+ # Do: Chell read messages she can read
+ self.mail_message.read(cr, self.user_chell_id, msg_ids, ['body', 'type', 'subtype_id'])
+
+ # Do: Chell read a message she should not be able to read
+ with self.assertRaises(except_orm):
+ self.mail_message.read(cr, self.user_chell_id, [msg4_id], ['body', 'type', 'subtype_id'])
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index e3047cd5edb..dc3211d0a71 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,6 +219,7 @@ 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:
@@ -196,6 +229,12 @@ class wizard_user(osv.osv_memory):
# 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_crm/i18n/fr.po b/addons/portal_crm/i18n/fr.po
new file mode 100644
index 00000000000..a0633c60306
--- /dev/null
+++ b/addons/portal_crm/i18n/fr.po
@@ -0,0 +1,546 @@
+# French 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-05-22 16:34+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-23 05:19+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,type:0
+msgid "Lead"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,title:0
+msgid "Title"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,probability:0
+msgid "Success Rate (%)"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Contact us"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_action:0
+msgid "Next Action Date"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,fax:0
+msgid "Fax"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,zip:0
+msgid "Zip"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,message_unread:0
+msgid "Unread Messages"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,day_open:0
+msgid "Days to Open"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Thank you for your interest, we'll respond to your request shortly."
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,priority:0
+msgid "Highest"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,mobile:0
+msgid "Mobile"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,description:0
+msgid "Notes"
+msgstr "Notes"
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,color:0
+msgid "Color Index"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_latitude:0
+msgid "Geo Latitude"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_name:0
+msgid "Customer Name"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,channel_id:0
+msgid "Communication channel (mail, direct, phone, ...)"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,type_id:0
+msgid "Campaign"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,ref:0
+msgid "Reference"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_action_next:0
+#: field:portal_crm.crm_contact_us,title_action:0
+msgid "Next Action"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,message_summary:0
+msgid ""
+"Holds the Chatter summary (number of messages, ...). This summary is "
+"directly in html format in order to be inserted in kanban views."
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_id:0
+msgid "Partner"
+msgstr ""
+
+#. module: portal_crm
+#: model:ir.actions.act_window,name:portal_crm.action_contact_us
+msgid "Contact Us"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,name:0
+msgid "Subject"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,opt_out:0
+msgid "Opt-Out"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,priority:0
+msgid "Priority"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,state_id:0
+msgid "State"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,message_follower_ids:0
+msgid "Followers"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,partner_id:0
+msgid "Linked partner (optional). Usually created when converting the lead."
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,payment_mode:0
+msgid "Payment Mode"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,state:0
+msgid "New"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,type:0
+msgid "Type"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,email_from:0
+msgid "Email"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,channel_id:0
+msgid "Channel"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Name"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,priority:0
+msgid "Lowest"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,create_date:0
+msgid "Creation Date"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Close"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,type:0
+msgid "Type is used to separate Leads and Opportunities"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,categ_ids:0
+msgid "Categories"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,stage_id:0
+msgid "Stage"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,user_login:0
+msgid "User Login"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,opt_out:0
+msgid ""
+"If opt-out is checked, this contact has refused to receive emails or "
+"unsubscribed to a campaign."
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,contact_name:0
+msgid "Contact Name"
+msgstr ""
+
+#. module: portal_crm
+#: model:ir.ui.menu,name:portal_crm.portal_company_contact
+msgid "Contact"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_address_email:0
+msgid "Partner Contact Email"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,planned_revenue:0
+msgid "Expected Revenue"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,task_ids:0
+msgid "Tasks"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Contact form"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,company_currency:0
+msgid "Currency"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,write_date:0
+msgid "Update Date"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_deadline:0
+msgid "Expected Closing"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,ref2:0
+msgid "Reference 2"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,user_email:0
+msgid "User Email"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_open:0
+msgid "Opened"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,state:0
+msgid "In Progress"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,partner_name:0
+msgid ""
+"The name of the future partner company that will be created while converting "
+"the lead into opportunity"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,planned_cost:0
+msgid "Planned Costs"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,date_deadline:0
+msgid "Estimate of the date on which the opportunity will be won."
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,email_cc:0
+msgid ""
+"These email addresses will be added to the CC field of all inbound and "
+"outbound emails for this record before being sent. Separate multiple email "
+"addresses with a comma"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,priority:0
+msgid "Low"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_closed:0
+#: selection:portal_crm.crm_contact_us,state:0
+msgid "Closed"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_assign:0
+msgid "Assignation Date"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,state:0
+msgid "Status"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,priority:0
+msgid "Normal"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,email_cc:0
+msgid "Global CC"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,street2:0
+msgid "Street2"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,id:0
+msgid "ID"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,phone:0
+msgid "Phone"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,message_is_follower:0
+msgid "Is a Follower"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,active:0
+msgid "Active"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,user_id:0
+msgid "Salesperson"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,day_close:0
+msgid "Days to Close"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,company_ids:0
+msgid "Companies"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,message_summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,section_id:0
+msgid ""
+"When sending mails, the default email address is taken from the sales team."
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_address_name:0
+msgid "Partner Contact Name"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_longitude:0
+msgid "Geo Longitude"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,date_assign:0
+msgid "Last date this case was forwarded/assigned to a partner"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,email_from:0
+msgid "Email address of the contact"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,city:0
+msgid "City"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Submit"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,function:0
+msgid "Function"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,referred:0
+msgid "Referred By"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,partner_assigned_id:0
+msgid "Assigned Partner"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,type:0
+msgid "Opportunity"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,partner_assigned_id:0
+msgid "Partner this case has been forwarded/assigned to."
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,country_id:0
+msgid "Country"
+msgstr ""
+
+#. module: portal_crm
+#: view:portal_crm.crm_contact_us:0
+msgid "Thank you"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,state:0
+msgid ""
+"The Status is set to 'Draft', when a case is created. If the case is in "
+"progress the Status is set to 'Open'. When the case is over, the Status is "
+"set to 'Done'. If the case needs to be reviewed then the Status is set to "
+"'Pending'."
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,message_ids:0
+msgid "Messages and communication history"
+msgstr ""
+
+#. module: portal_crm
+#: help:portal_crm.crm_contact_us,type_id:0
+msgid ""
+"From which campaign (seminar, marketing campaign, mass mailing, ...) did "
+"this contact come from?"
+msgstr ""
+
+#. module: portal_crm
+#: selection:portal_crm.crm_contact_us,priority:0
+msgid "High"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,section_id:0
+msgid "Sales Team"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,street:0
+msgid "Street"
+msgstr ""
+
+#. module: portal_crm
+#: field:portal_crm.crm_contact_us,date_action_last:0
+msgid "Last Action"
+msgstr ""
+
+#. module: portal_crm
+#: model:ir.model,name:portal_crm.model_portal_crm_crm_contact_us
+msgid "Contact form for the portal"
+msgstr ""
diff --git a/addons/portal_event/i18n/fr.po b/addons/portal_event/i18n/fr.po
new file mode 100644
index 00000000000..81c0a603fc6
--- /dev/null
+++ b/addons/portal_event/i18n/fr.po
@@ -0,0 +1,59 @@
+# French 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-05-22 16:32+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-23 05:19+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
+
+#. module: portal_event
+#: view:event.event:0
+msgid "Portal Settings"
+msgstr ""
+
+#. module: portal_event
+#: model:ir.actions.act_window,help:portal_event.action_event_view
+msgid "There are no public events."
+msgstr ""
+
+#. module: portal_event
+#: selection:event.event,visibility:0
+msgid "Private"
+msgstr ""
+
+#. module: portal_event
+#: model:ir.model,name:portal_event.model_event_event
+msgid "Event"
+msgstr ""
+
+#. module: portal_event
+#: model:ir.actions.act_window,name:portal_event.action_event_view
+#: model:ir.ui.menu,name:portal_event.portal_company_events
+msgid "Events"
+msgstr ""
+
+#. module: portal_event
+#: field:event.event,visibility:0
+msgid "Visibility"
+msgstr ""
+
+#. module: portal_event
+#: help:event.event,visibility:0
+msgid "Event's visibility in the portal's contact page"
+msgstr ""
+
+#. module: portal_event
+#: selection:event.event,visibility:0
+msgid "Public"
+msgstr ""
diff --git a/addons/portal_event/portal_event_view.xml b/addons/portal_event/portal_event_view.xml
old mode 100755
new mode 100644
diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml
index a3182cd5b1c..eca13258ff9 100644
--- a/addons/portal_hr_employees/hr_employee_view.xml
+++ b/addons/portal_hr_employees/hr_employee_view.xml
@@ -33,13 +33,38 @@
- HR - Employess Kanban
+ HR - Employees Kanbanhr.employee
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Tel:
+
Mobile:
+
+
+
+
+
+
+
+
+
diff --git a/addons/portal_hr_employees/i18n/fr.po b/addons/portal_hr_employees/i18n/fr.po
new file mode 100644
index 00000000000..3fdc48a35de
--- /dev/null
+++ b/addons/portal_hr_employees/i18n/fr.po
@@ -0,0 +1,95 @@
+# French 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:05+0000\n"
+"PO-Revision-Date: 2013-05-22 16:29+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-23 05:19+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Coach"
+msgstr ""
+
+#. module: portal_hr_employees
+#: model:ir.actions.act_window,name:portal_hr_employees.action_team
+#: view:portal_crm.crm_contact_us:0
+msgid "Our Team"
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Group By..."
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Company"
+msgstr ""
+
+#. module: portal_hr_employees
+#: selection:hr.employee,visibility:0
+msgid "Public"
+msgstr ""
+
+#. module: portal_hr_employees
+#: help:hr.employee,visibility:0
+msgid "Employee's visibility in the portal's contact page"
+msgstr ""
+
+#. module: portal_hr_employees
+#: selection:hr.employee,visibility:0
+msgid "Private"
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Manager"
+msgstr ""
+
+#. module: portal_hr_employees
+#: model:ir.model,name:portal_hr_employees.model_hr_employee
+msgid "Employee"
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Job"
+msgstr ""
+
+#. module: portal_hr_employees
+#: field:hr.employee,visibility:0
+msgid "Visibility"
+msgstr ""
+
+#. module: portal_hr_employees
+#: field:hr.employee,public_info:0
+msgid "Public Info"
+msgstr ""
+
+#. module: portal_hr_employees
+#: model:ir.model,name:portal_hr_employees.model_portal_crm_crm_contact_us
+msgid "Contact form for the portal"
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+msgid "Department"
+msgstr ""
+
+#. module: portal_hr_employees
+#: view:hr.employee:0
+#: field:portal_crm.crm_contact_us,employee_ids:0
+msgid "Employees"
+msgstr ""
diff --git a/addons/portal_project/security/portal_security.xml b/addons/portal_project/security/portal_security.xml
index 8d58ed70aeb..67e57766ebd 100644
--- a/addons/portal_project/security/portal_security.xml
+++ b/addons/portal_project/security/portal_security.xml
@@ -33,27 +33,26 @@
- Project/Task: employees: public, portal, employee or following or assigned
+ Project/Task: employees: public, portal, employee or (followers and following)['|',
- ('user_id', '=', user.id),
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.partner_id.id]),
+ ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
- Project/Task: portal users: public or portal and following
+ Project/Task: portal users: public or (portal and colleagues following) or (followers and following)
- ['|',
- ('project_id.privacy_visibility', '=', 'public'),
+ ['|', '|',
+ ('project_id.privacy_visibility', 'in', ['public']),
'&',
- ('project_id.privacy_visibility', 'in', ['portal', 'followers']),
- '|',
- ('message_follower_ids','in', [user.partner_id.id]),
- ('user_id', '=', user.id),
+ ('project_id.privacy_visibility', '=', 'portal'),
+ ('message_follower_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
diff --git a/addons/portal_project_issue/i18n/fr.po b/addons/portal_project_issue/i18n/fr.po
new file mode 100644
index 00000000000..48fc9e2ea59
--- /dev/null
+++ b/addons/portal_project_issue/i18n/fr.po
@@ -0,0 +1,40 @@
+# French 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:06+0000\n"
+"PO-Revision-Date: 2013-05-22 08:03+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-23 05:19+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
+
+#. module: portal_project_issue
+#: view:project.issue:0
+msgid "Creation:"
+msgstr ""
+
+#. module: portal_project_issue
+#: model:ir.actions.act_window,help:portal_project_issue.project_issue_categ_act0
+msgid ""
+"
\n"
+" Click to create an issue.\n"
+"
\n"
+" You can track your issues from this menu and the action we\n"
+" will take.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: portal_project_issue
+#: model:ir.actions.act_window,name:portal_project_issue.project_issue_categ_act0
+msgid "Issues"
+msgstr ""
diff --git a/addons/portal_project_issue/security/portal_security.xml b/addons/portal_project_issue/security/portal_security.xml
index f6cd8d89be7..598c1620a82 100644
--- a/addons/portal_project_issue/security/portal_security.xml
+++ b/addons/portal_project_issue/security/portal_security.xml
@@ -3,28 +3,27 @@
- Project/Issue: portal users: public or portal and following
+ Project/Issue: portal users: public or (portal and colleagues following) or (followers and following)
- ['|',
- ('project_id.privacy_visibility', '=', 'public'),
+ ['|', '|',
+ ('project_id.privacy_visibility', 'in', ['public']),
'&',
- ('project_id.privacy_visibility', 'in', ['portal', 'followers']),
- '|',
- ('message_follower_ids','in', [user.partner_id.id]),
- ('user_id', '=', user.id),
+ ('project_id.privacy_visibility', '=', 'portal'),
+ ('message_follower_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
- Project/Issue: employees: public, portal, employee or following or assigned
+ Project/Issue: employees: public, portal, employee or (followers and following)['|',
- ('user_id', '=', user.id),
- '|',
- ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
- '&',
- ('project_id.privacy_visibility', '=', 'followers'),
- ('message_follower_ids', 'in', [user.partner_id.id]),
+ ('project_id.privacy_visibility', 'in', ['public', 'portal', 'employees']),
+ '&',
+ ('project_id.privacy_visibility', '=', 'followers'),
+ ('message_follower_ids', 'in', [user.partner_id.id]),
]
diff --git a/addons/portal_project_long_term/security/portal_security.xml b/addons/portal_project_long_term/security/portal_security.xml
index eab70ebe734..d8aec542847 100644
--- a/addons/portal_project_long_term/security/portal_security.xml
+++ b/addons/portal_project_long_term/security/portal_security.xml
@@ -3,16 +3,9 @@
- Project/Phase: portal users: public or portal and following
+ Project/Phase: portal users: public or (portal and colleagues following) or (followers and following)
- ['|',
- ('project_id.privacy_visibility', '=', 'public'),
- '&',
- ('project_id.privacy_visibility', 'in', ['portal', 'followers']),
- '|',
- ('message_follower_ids','in', [user.partner_id.id]),
- ('user_id', '=', user.id),
- ]
+ [('project_id.privacy_visibility', 'in', ['public', 'portal'])]
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py
index cd3b702d3c5..07300c5d463 100644
--- a/addons/portal_sale/portal_sale.py
+++ b/addons/portal_sale/portal_sale.py
@@ -104,25 +104,6 @@ class account_invoice(osv.Model):
pass
return action_dict
- def invoice_validate(self, cr, uid, ids, context=None):
- # fetch the partner's id and subscribe the partner to the invoice
- document = self.browse(cr, uid, ids[0], context=context)
- partner = document.partner_id
- # TDE note: this code should be improved: used a real invite wizard instead of an ugly email
- if partner.id not in document.message_follower_ids:
- self.message_subscribe(cr, uid, ids, [partner.id], context=context)
- mail_values = {
- 'recipient_ids': [(4, partner.id)],
- 'subject': 'Invitation to follow %s' % document.name_get()[0][1],
- 'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
- 'auto_delete': True,
- 'type': 'email',
- }
- mail_obj = self.pool.get('mail.mail')
- mail_id = mail_obj.create(cr, uid, mail_values, context=context)
- mail_obj.send(cr, uid, [mail_id], context=context)
- return super(account_invoice, self).invoice_validate(cr, uid, ids, context=context)
-
def get_signup_url(self, cr, uid, ids, context=None):
assert len(ids) == 1
document = self.browse(cr, uid, ids[0], context=context)
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 @@
+
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 @@
-
@@ -7,50 +6,50 @@
25.05.0
-
+
-
+ 10.05.0
-
+
-
+ 12.05.0
-
+
-
+ 50.010.0
-
+
-
+ 15.05.0
-
+
-
+ 5.03.0
-
+
-
+
-
+
\ 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 @@
-
-
+
+
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/product/report/product_label.xsl b/addons/product/report/product_label.xsl
index 641db73ea7d..5dbb2d64a28 100644
--- a/addons/product/report/product_label.xsl
+++ b/addons/product/report/product_label.xsl
@@ -67,7 +67,7 @@
-
+
diff --git a/addons/project/html/Mario-Riva.png b/addons/project/html/Mario-Riva.png
new file mode 100644
index 00000000000..35b030a4265
Binary files /dev/null and b/addons/project/html/Mario-Riva.png differ
diff --git a/addons/project/html/Yoshi-Tashiro.png b/addons/project/html/Yoshi-Tashiro.png
new file mode 100644
index 00000000000..f3457a9088e
Binary files /dev/null and b/addons/project/html/Yoshi-Tashiro.png differ
diff --git a/addons/project/html/index.html b/addons/project/html/index.html
new file mode 100644
index 00000000000..93f1be8a41d
--- /dev/null
+++ b/addons/project/html/index.html
@@ -0,0 +1,197 @@
+
+
+OpenERP's collaborative and realtime project management helps your team get
+work done. Keep track of everything, from the big picture to the minute
+details, from the customer contract to the billing.
+
+Organize projects around your own processes. Work on tasks and issues using the kanban view, schedule tasks using the gantt chart
+and control deadlines in the calendar view. Every project may have it's own stages
+allowing teams to optimize their job.
+
+
+
+
Kanban
+
+
+
+
+
+
Gantt Charts
+
+
+
+
+
Calendar
+
+
+
+
+
+
+
+
Easy to use
+
+
+
+
+
+Get organized as fast as you can think. The easy-to-use interface takes no time
+to learn, and every action is instantaneous, so there’s nothing standing
+between you and your sweet productive flow.
+
+
+
+
+
+
+
Work Together
+
Real time chats, document sharing, email integration
+
+
+
+Use open chatter to communicate with your team or customers and share comments
+and documents on tasks and issues. Integrate discussion fast with the email
+integration.
+
+Talk to others users or customers with the live chat feature.
+
+
+
+
+
+
+
+
+
+
+
Collaborative Writing
+
The power of etherpad, inside your tasks
+
+
+
+
+
+Collaboratively edit the same specifications or meeting minutes right inside the
+application. The incorporated etherpad feature allows several people to work
+on the same tasks, at the same time.
+
+
+This is very efficient for scrum meetings, meeting minutes or complex
+specifications. Every user has their own color and you can replay the whole
+creation of the content.
+
+
+
+
+
+
+
+
Get Work Done
+
+
+Get alerts on followed events to stay up to date with what interests you. Use
+instant green/red visual indicators to scan through what has been done and what
+requires your attention.
+
+
+
+
+
+
+
+
+
+
+
Timesheets, Contracts & Invoicing
+
+
+
+
+
+Projects are automatically integrated with customer contracts allowing you to
+invoice based on time & materials and record timesheets easily.
+
+
+
+
+
+
+
+
+
Track Issues
+
Support services, helpdesk, bug tracker, etc.
+
+
+Single out the issues that arise in a project in order to have a better focus
+on resolving them. Integrate customer interaction on every issue and get
+accurate reports on your team's performance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Many companies already enjoy it
+
Hear what they have to say !
+
+
+
+
+ OpenERP provides essential platform for our project management.
+ Things are better organized and much more visible with it.
+
+
+
+
+
+ The possibility to link the Project Management to Sales and Manufacturing widely
+ extends the range of possible applications beyond the needs of service companies.
+
+
+
+
+
+
+
diff --git a/addons/project/html/project_01.png b/addons/project/html/project_01.png
new file mode 100644
index 00000000000..0c86a2965d5
Binary files /dev/null and b/addons/project/html/project_01.png differ
diff --git a/addons/project/html/project_calendar.png b/addons/project/html/project_calendar.png
new file mode 100644
index 00000000000..f8c8fca7662
Binary files /dev/null and b/addons/project/html/project_calendar.png differ
diff --git a/addons/project/html/project_chat.png b/addons/project/html/project_chat.png
new file mode 100644
index 00000000000..8cb771e876f
Binary files /dev/null and b/addons/project/html/project_chat.png differ
diff --git a/addons/project/html/project_easy.png b/addons/project/html/project_easy.png
new file mode 100644
index 00000000000..4ffde14b42b
Binary files /dev/null and b/addons/project/html/project_easy.png differ
diff --git a/addons/project/html/project_etherpad.png b/addons/project/html/project_etherpad.png
new file mode 100644
index 00000000000..038b210ee18
Binary files /dev/null and b/addons/project/html/project_etherpad.png differ
diff --git a/addons/project/html/project_gantt.png b/addons/project/html/project_gantt.png
new file mode 100644
index 00000000000..34486b98558
Binary files /dev/null and b/addons/project/html/project_gantt.png differ
diff --git a/addons/project/html/project_illu_01.png b/addons/project/html/project_illu_01.png
new file mode 100644
index 00000000000..4fff4837faa
Binary files /dev/null and b/addons/project/html/project_illu_01.png differ
diff --git a/addons/project/html/project_kanban.png b/addons/project/html/project_kanban.png
new file mode 100644
index 00000000000..c541d3b5d08
Binary files /dev/null and b/addons/project/html/project_kanban.png differ
diff --git a/addons/project/html/project_kpi.png b/addons/project/html/project_kpi.png
new file mode 100644
index 00000000000..c58f8176098
Binary files /dev/null and b/addons/project/html/project_kpi.png differ
diff --git a/addons/project/html/project_timesheet.png b/addons/project/html/project_timesheet.png
new file mode 100644
index 00000000000..d06c3a924ec
Binary files /dev/null and b/addons/project/html/project_timesheet.png differ
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 \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/i18n/th.po b/addons/project/i18n/th.po
new file mode 100644
index 00000000000..7dfd58eee63
--- /dev/null
+++ b/addons/project/i18n/th.po
@@ -0,0 +1,2109 @@
+# Thai 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 , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-12-21 17:04+0000\n"
+"PO-Revision-Date: 2013-05-15 07:02+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+
+#. module: project
+#: view:project.project:0
+msgid "Email Interface"
+msgstr ""
+
+#. module: project
+#: help:account.analytic.account,use_tasks:0
+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
+#: view:report.project.task.user:0
+#: field:report.project.task.user,progress:0
+msgid "Progress"
+msgstr ""
+
+#. module: project
+#: model:process.node,name:project.process_node_taskbydelegate0
+msgid "Task by delegate"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Parent"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.dblc_proj
+msgid "Project's tasks"
+msgstr ""
+
+#. module: project
+#: field:project.task.type,name:0
+msgid "Stage Name"
+msgstr ""
+
+#. module: project
+#: model:process.transition.action,name:project.process_transition_action_openpendingtask0
+msgid "Set pending"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "New Project Based on Template"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,day:0
+msgid "Day"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_merge
+msgid "Merge"
+msgstr ""
+
+#. module: project
+#: view:res.partner:0
+msgid "Start Task"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:932
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: project
+#: help:project.project,message_unread:0
+#: help:project.task,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: project
+#: model:process.node,name:project.process_node_donetask0
+msgid "Done task"
+msgstr ""
+
+#. module: project
+#: model:process.node,note:project.process_node_donetask0
+msgid "Task is Completed"
+msgstr ""
+
+#. module: project
+#: view:res.partner:0
+msgid "False"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_testing
+msgid "Testing"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_account_analytic_account
+msgid "Analytic Account"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,group_time_work_estimation_tasks:0
+msgid "Manage time estimation on tasks"
+msgstr ""
+
+#. module: project
+#: help:project.project,message_summary:0
+#: help:project.task,message_summary:0
+msgid ""
+"Holds the Chatter summary (number of messages, ...). This summary is "
+"directly in html format in order to be inserted in kanban views."
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:432
+#: code:addons/project/project.py:1318
+#, python-format
+msgid "Warning!"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,group_manage_delegation_task:0
+msgid "Allow task delegation"
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,planned_hours:0
+#: view:report.project.task.user:0
+#: field:report.project.task.user,hours_planned:0
+msgid "Planned Hours"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Reset as Project"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "In progress tasks"
+msgstr ""
+
+#. module: project
+#: help:project.project,progress_rate:0
+msgid "Percent of tasks closed according to the total of tasks todo."
+msgstr ""
+
+#. module: project
+#: model:ir.actions.client,name:project.action_client_project_menu
+msgid "Open Project Menu"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,help:project.action_project_task_user_tree
+msgid ""
+"This report allows you to analyse the performance of your projects and "
+"users. You can analyse the quantities of tasks, the hours spent compared to "
+"the planned hours, the average number of days to open or close a task, etc."
+msgstr ""
+
+#. module: project
+#: view:project.task.delegate:0
+msgid "Validation Task Title"
+msgstr ""
+
+#. module: project
+#: model:res.groups,name:project.group_delegate_task
+msgid "Task Delegation"
+msgstr ""
+
+#. module: project
+#: field:project.project,planned_hours:0
+#: field:project.task.history,planned_hours:0
+#: field:project.task.history.cumulative,planned_hours:0
+msgid "Planned Time"
+msgstr ""
+
+#. module: project
+#: selection:project.project,privacy_visibility:0
+msgid "Public"
+msgstr ""
+
+#. module: project
+#: model:project.category,name:project.project_category_01
+msgid "Contact's suggestion"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,group_time_work_estimation_tasks:0
+msgid "Allows you to compute Time Estimation on tasks."
+msgstr ""
+
+#. module: project
+#: field:report.project.task.user,user_id:0
+msgid "Assigned To"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_project_task_closed
+#: model:mail.message.subtype,name:project.mt_task_closed
+msgid "Task Done"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: view:report.project.task.user:0
+#: field:report.project.task.user,partner_id:0
+msgid "Contact"
+msgstr ""
+
+#. module: project
+#: model:process.transition,name:project.process_transition_delegate0
+#: view:project.task:0
+msgid "Delegate"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.open_view_template_project
+#: view:project.project:0
+msgid "Templates of Projects"
+msgstr ""
+
+#. module: project
+#: field:project.project,analytic_account_id:0
+msgid "Contract/Analytic"
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+msgid "Project Management"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_project_task_delegate
+#: view:project.task.delegate:0
+msgid "Project Task Delegate"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_project_task_started
+#: model:mail.message.subtype,name:project.mt_task_started
+msgid "Task Started"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Very Important"
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+msgid "Support"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Member"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Cancel Task"
+msgstr ""
+
+#. module: project
+#: help:project.project,members:0
+msgid ""
+"Project's members are users who can have an access to the tasks related to "
+"this project."
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: field:project.task,manager_id:0
+msgid "Project Manager"
+msgstr ""
+
+#. module: project
+#: field:project.project,state:0
+#: field:project.task,state:0
+#: field:project.task.history,state:0
+#: field:project.task.history.cumulative,state:0
+#: field:report.project.task.user,state:0
+msgid "Status"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "August"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: field:project.project,complete_name:0
+msgid "Project Name"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "June"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "October"
+msgstr ""
+
+#. module: project
+#: help:project.project,total_hours:0
+msgid ""
+"Sum of total hours of all tasks related to this project and its child "
+"projects."
+msgstr ""
+
+#. module: project
+#: help:project.project,active:0
+msgid ""
+"If the active field is set to False, it will allow you to hide the project "
+"without removing it."
+msgstr ""
+
+#. module: project
+#: model:process.transition,note:project.process_transition_opendonetask0
+msgid "When task is completed, it will come into the done state."
+msgstr ""
+
+#. module: project
+#: field:project.project,message_summary:0
+#: field:project.task,message_summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Append this project to another one using analytic accounts hierarchy"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+msgid "In Progress Tasks"
+msgstr ""
+
+#. module: project
+#: help:res.company,project_time_mode_id:0
+msgid ""
+"This will set the unit of measure used in projects and tasks.\n"
+"If you use the timesheet linked to projects (project_timesheet module), "
+"don't forget to setup the right unit of measure in your employees."
+msgstr ""
+
+#. module: project
+#: field:project.task,user_id:0
+#: view:report.project.task.user:0
+msgid "Assigned to"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:1021
+#, python-format
+msgid "Delegated User should be specified"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Project(s) Manager"
+msgstr ""
+
+#. module: project
+#: selection:project.project,state:0
+#: view:project.task:0
+#: selection:project.task,state:0
+#: selection:project.task.history,state:0
+#: selection:project.task.history.cumulative,state:0
+#: selection:project.task.type,state:0
+#: selection:report.project.task.user,state:0
+msgid "In Progress"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Reactivate"
+msgstr ""
+
+#. module: project
+#: field:project.project,resource_calendar_id:0
+msgid "Working Time"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_project_task_reevaluate
+msgid "Re-evaluate Task"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Validate planned time"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_pad:0
+msgid "Use integrated collaborative note pads on task"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_project_task_blocked
+#: model:mail.message.subtype,name:project.mt_task_blocked
+msgid "Task Blocked"
+msgstr ""
+
+#. module: project
+#: model:process.node,note:project.process_node_opentask0
+msgid "Encode your working hours."
+msgstr ""
+
+#. module: project
+#: field:project.project,alias_id:0
+msgid "Alias"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "oe_kanban_text_red"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,description:project.mt_task_blocked
+msgid "Task blocked"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Delegation"
+msgstr ""
+
+#. module: project
+#: field:project.task,create_date:0
+msgid "Create Date"
+msgstr ""
+
+#. module: project
+#: view:res.partner:0
+msgid "For changing to open state"
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+msgid "Apply"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task_delegate
+msgid "Task Delegate"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,new_task_description:0
+msgid "Reinclude the description of the task in the task of the user"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Project Settings"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "My tasks"
+msgstr ""
+
+#. module: project
+#: model:process.transition,name:project.process_transition_opendonetask0
+msgid "Open Done Task"
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,planned_hours_me:0
+msgid "Hours to Validate"
+msgstr ""
+
+#. module: project
+#: help:project.task,remaining_hours:0
+msgid ""
+"Total remaining time, can be re-estimated periodically by the assignee of "
+"the task."
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "March"
+msgstr ""
+
+#. module: project
+#: view:board.board:0
+#: model:ir.actions.act_window,name:project.my_open_tasks_action
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+msgid "My Tasks"
+msgstr ""
+
+#. module: project
+#: constraint:project.task:0
+msgid "Error ! You cannot create recursive tasks."
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "Pending tasks"
+msgstr ""
+
+#. module: project
+#: view:project.task.reevaluate:0
+msgid "_Evaluate"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,opening_days:0
+msgid "Days to Open"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,priority:0
+msgid "Very urgent"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,project_id:0
+#: help:project.task.delegate,user_id:0
+msgid "User you want to delegate this task to"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Set as Template"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task
+#: view:project.config.settings:0
+#: view:project.project:0
+#: view:project.task:0
+#: field:project.task.history,task_id:0
+#: field:project.task.history.cumulative,task_id:0
+#: field:project.task.work,task_id:0
+#: view:report.project.task.user:0
+msgid "Task"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,group_tasks_work_on_tasks:0
+msgid "Allows you to compute work on tasks."
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Administration"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,group_tasks_work_on_tasks:0
+msgid "Log work activities on tasks"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_analysis
+msgid "Analysis"
+msgstr ""
+
+#. module: project
+#: field:project.task,name:0
+#: field:report.project.task.user,name:0
+msgid "Task Summary"
+msgstr ""
+
+#. module: project
+#: field:project.task,active:0
+msgid "Not a Template Task"
+msgstr ""
+
+#. module: project
+#: field:project.task,planned_hours:0
+msgid "Initially Planned Hours"
+msgstr ""
+
+#. module: project
+#: model:process.transition,note:project.process_transition_delegate0
+msgid "Delegates tasks to the other user"
+msgstr ""
+
+#. module: project
+#: help:project.task,effective_hours:0
+msgid "Computed using the sum of the task work done."
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,help:project.open_view_project_all
+msgid ""
+"
\n"
+" Click to start a new project.\n"
+"
\n"
+" Projects are used to organize your activities; plan\n"
+" tasks, track issues, invoice timesheets. You can define\n"
+" internal projects (R&D, Improve Sales Process),\n"
+" private projects (My Todos) or customer ones.\n"
+"
\n"
+" You will be able collaborate with internal users on\n"
+" projects or invite customers to share your activities.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+msgid "Planning"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task,date_deadline:0
+#: field:report.project.task.user,date_deadline:0
+msgid "Deadline"
+msgstr ""
+
+#. module: project
+#: view:project.task.history.cumulative:0
+msgid "Ready"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "New Tasks"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_project_issue_sheet:0
+msgid "Invoice working time on issues"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: view:project.task:0
+#: field:project.task.history,end_date:0
+#: field:project.task.history.cumulative,end_date:0
+msgid "End Date"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_specification
+msgid "Specification"
+msgstr ""
+
+#. module: project
+#: model:process.transition,note:project.process_transition_draftopentask0
+msgid "From draft state, it will come into the open state."
+msgstr ""
+
+#. module: project
+#: view:project.task.history.cumulative:0
+msgid "Task's Analysis"
+msgstr ""
+
+#. module: project
+#: view:project.task.delegate:0
+#: field:project.task.delegate,new_task_description:0
+msgid "New Task Description"
+msgstr ""
+
+#. module: project
+#: field:report.project.task.user,delay_endings_days:0
+msgid "Overpassed Deadline"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "New tasks"
+msgstr ""
+
+#. module: project
+#: selection:project.task,priority:0
+#: selection:report.project.task.user,priority:0
+msgid "Medium"
+msgstr ""
+
+#. module: project
+#: field:project.project,total_hours:0
+msgid "Total Time"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "Creation Date"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Miscellaneous"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task,stage_id:0
+#: field:project.task.history,type_id:0
+#: field:project.task.history.cumulative,type_id:0
+msgid "Stage"
+msgstr ""
+
+#. module: project
+#: model:process.transition,name:project.process_transition_draftopentask0
+msgid "Draft Open task"
+msgstr ""
+
+#. module: project
+#: field:project.project,alias_model:0
+msgid "Alias Model"
+msgstr ""
+
+#. module: project
+#: help:report.project.task.user,closing_days:0
+msgid "Number of Days to close the task"
+msgstr ""
+
+#. module: project
+#: view:board.board:0
+msgid "My Board"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.open_task_type_form
+msgid "Stages"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: view:project.task:0
+msgid "Delete"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "In progress"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "September"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,priority:0
+msgid "Urgent"
+msgstr ""
+
+#. module: project
+#: model:project.category,name:project.project_category_02
+msgid "Feature request"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Delegated tasks"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task_work
+msgid "Project Task Work"
+msgstr ""
+
+#. module: project
+#: code:addons/project/wizard/project_task_delegate.py:81
+#, python-format
+msgid "CHECK: %s"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Close Project"
+msgstr ""
+
+#. module: project
+#: field:project.project,tasks:0
+msgid "Task Activities"
+msgstr ""
+
+#. module: project
+#: field:project.project,effective_hours:0
+#: field:project.task.work,hours:0
+msgid "Time Spent"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: view:project.task:0
+msgid "í"
+msgstr ""
+
+#. module: project
+#: field:account.analytic.account,company_uom_id:0
+msgid "unknown"
+msgstr ""
+
+#. module: project
+#: field:project.project,message_is_follower:0
+#: field:project.task,message_is_follower:0
+msgid "Is a Follower"
+msgstr ""
+
+#. module: project
+#: field:project.task,work_ids:0
+msgid "Work done"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "Extended Filters..."
+msgstr ""
+
+#. module: project
+#: model:ir.ui.menu,name:project.menu_tasks_config
+msgid "GTD"
+msgstr ""
+
+#. module: project
+#: help:project.task,state:0
+msgid ""
+"The status is set to 'Draft', when a case is created. "
+"If the case is in progress the status is set to 'Open'. "
+"When the case is over, the status is set to 'Done'. If "
+"the case needs to be reviewed then the status is set "
+"to 'Pending'."
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: project
+#: field:project.task.type,fold:0
+msgid "Folded by Default"
+msgstr ""
+
+#. module: project
+#: field:project.task.history,date:0
+#: field:project.task.history.cumulative,date:0
+#: field:project.task.work,date:0
+msgid "Date"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_project_issue:0
+msgid ""
+"Provides management of issues/bugs in projects.\n"
+" This installs the module project_issue."
+msgstr ""
+
+#. module: project
+#: help:project.task,kanban_state:0
+msgid ""
+"A task's kanban state indicates special situations affecting it:\n"
+" * Normal is the default situation\n"
+" * Blocked indicates something is preventing the progress of this task\n"
+" * Ready for next stage indicates the task is ready to be pulled to the next "
+"stage"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "10"
+msgstr ""
+
+#. module: project
+#: help:project.project,analytic_account_id:0
+msgid ""
+"Link this project to an analytic account if you need financial management on "
+"projects. It enables you to connect projects with budgets, planning, cost "
+"and revenue analysis, timesheets on projects, etc."
+msgstr ""
+
+#. module: project
+#: model:process.transition.action,name:project.process_transition_action_draftcanceltask0
+#: model:process.transition.action,name:project.process_transition_action_opencanceltask0
+#: view:project.config.settings:0
+#: view:project.task.delegate:0
+#: view:project.task.reevaluate:0
+msgid "Cancel"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Other Info"
+msgstr ""
+
+#. module: project
+#: view:project.task.delegate:0
+msgid "_Delegate"
+msgstr ""
+
+#. module: project
+#: selection:project.task,priority:0
+#: selection:report.project.task.user,priority:0
+msgid "Very Low"
+msgstr ""
+
+#. module: project
+#: help:project.project,effective_hours:0
+msgid ""
+"Sum of spent hours of all tasks related to this project and its child "
+"projects."
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid ""
+"Follow this project to automatically track the events associated to tasks "
+"and issues of this project."
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Users"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_task_stage
+msgid "Stage Changed"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: model:res.groups,name:project.group_project_manager
+msgid "Manager"
+msgstr ""
+
+#. module: project
+#: selection:project.task,priority:0
+msgid "Important"
+msgstr ""
+
+#. module: project
+#: field:project.category,name:0
+msgid "Name"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "November"
+msgstr ""
+
+#. module: project
+#: view:project.task.reevaluate:0
+msgid "Reevaluate Task"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task_type
+#: view:project.task.type:0
+msgid "Task Stage"
+msgstr ""
+
+#. module: project
+#: view:project.task.type:0
+msgid "Common"
+msgstr ""
+
+#. module: project
+#: help:project.project,message_ids:0
+#: help:project.task,message_ids:0
+msgid "Messages and communication history"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid ""
+"To invoice or setup invoicing and renewal options, go to the related "
+"contract:"
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,state:0
+msgid "Validation State"
+msgstr ""
+
+#. module: project
+#: field:project.task.work,name:0
+msgid "Work summary"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: view:project.task:0
+#: view:report.project.task.user:0
+msgid "Group By..."
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: selection:project.project,state:0
+msgid "Template"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Re-open project"
+msgstr ""
+
+#. module: project
+#: help:project.project,priority:0
+msgid "Gives the sequence order when displaying the list of projects"
+msgstr ""
+
+#. module: project
+#: constraint:project.project:0
+msgid "Error! project start-date must be lower then project end-date."
+msgstr ""
+
+#. module: project
+#: field:project.project,members:0
+msgid "Project Members"
+msgstr ""
+
+#. module: project
+#: field:project.task,child_ids:0
+msgid "Delegated Tasks"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: field:project.project,message_unread:0
+#: view:project.task:0
+#: field:project.task,message_unread:0
+msgid "Unread Messages"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task,parent_ids:0
+msgid "Parent Tasks"
+msgstr ""
+
+#. module: project
+#: model:process.node,name:project.process_node_opentask0
+msgid "Open task"
+msgstr ""
+
+#. module: project
+#: view:project.task.type:0
+msgid "Stages common to all projects"
+msgstr ""
+
+#. module: project
+#: model:process.node,name:project.process_node_drafttask0
+msgid "Draft task"
+msgstr ""
+
+#. module: project
+#: field:project.task,notes:0
+msgid "Notes"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+msgid "Pending Tasks"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Show only tasks having a deadline"
+msgstr ""
+
+#. module: project
+#: model:project.category,name:project.project_category_04
+msgid "Usability"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,hours_delay:0
+msgid "Avg. Plan.-Eff."
+msgstr ""
+
+#. module: project
+#: field:project.task.work,user_id:0
+msgid "Done by"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:181
+#, python-format
+msgid "Invalid Action!"
+msgstr ""
+
+#. module: project
+#: help:project.task.type,state:0
+msgid ""
+"The status of your document is automatically changed regarding the selected "
+"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
+msgid "Extra Info"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Edit..."
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,nbr:0
+msgid "# of tasks"
+msgstr ""
+
+#. module: project
+#: field:project.project,doc_count:0
+msgid "Number of documents attached"
+msgstr ""
+
+#. module: project
+#: field:project.task,priority:0
+#: field:report.project.task.user,priority:0
+msgid "Priority"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Open Projects"
+msgstr ""
+
+#. module: project
+#: help:project.project,alias_id:0
+msgid ""
+"Internal email associated with this project. Incoming emails are "
+"automatically synchronizedwith Tasks (or optionally Issues if the Issue "
+"Tracker module is installed)."
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,help:project.open_task_type_form
+msgid ""
+"
\n"
+" Click to add a stage in the task pipeline.\n"
+"
\n"
+" Define the steps that will be used in the project from the\n"
+" creation of the task, up to the closing of the task or "
+"issue.\n"
+" You will use these stages in order to track the progress in\n"
+" solving a task or an issue.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: project
+#: help:project.task,total_hours:0
+msgid "Computed as: Time Spent + Remaining Time."
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:356
+#: code:addons/project/project.py:377
+#: code:addons/project/project.py:709
+#, python-format
+msgid "%s (copy)"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_project_task_stage
+msgid "Task Stage Changed"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task.history,remaining_hours:0
+#: field:project.task.history.cumulative,remaining_hours:0
+msgid "Remaining Time"
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,name:0
+msgid "Delegated Title"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "July"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task_reevaluate
+msgid "project.task.reevaluate"
+msgstr ""
+
+#. module: project
+#: field:project.task,delay_hours:0
+msgid "Delay Hours"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Team"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,time_unit:0
+msgid "This will set the unit of measure used in projects and tasks."
+msgstr ""
+
+#. module: project
+#: selection:project.task,priority:0
+msgid "Very important"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,month:0
+msgid "Month"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_design
+msgid "Design"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Start Date"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: selection:project.task,kanban_state:0
+#: selection:project.task.history,kanban_state:0
+#: view:project.task.history.cumulative:0
+#: selection:project.task.history.cumulative,kanban_state:0
+msgid "Blocked"
+msgstr ""
+
+#. module: project
+#: help:project.task,progress:0
+msgid ""
+"If the task has a progress of 99.99% you should close the task if it's "
+"finished or reevaluate the time"
+msgstr ""
+
+#. module: project
+#: field:project.task,user_email:0
+msgid "User Email"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,prefix:0
+msgid "Title for your validation task"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,time_unit:0
+msgid "Working time unit"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Projects in which I am a member."
+msgstr ""
+
+#. module: project
+#: selection:project.task,priority:0
+#: selection:report.project.task.user,priority:0
+msgid "Low"
+msgstr ""
+
+#. module: project
+#: selection:project.project,state:0
+msgid "Closed"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+#: selection:project.project,state:0
+#: view:project.task:0
+#: selection:project.task,state:0
+#: selection:project.task.delegate,state:0
+#: selection:project.task.history,state:0
+#: selection:project.task.history.cumulative,state:0
+#: selection:project.task.type,state:0
+#: view:report.project.task.user:0
+#: selection:report.project.task.user,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.project_category_action
+#: model:ir.ui.menu,name:project.menu_project_category_act
+#: view:project.category:0
+#: field:project.task,categ_ids:0
+msgid "Tags"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_task_history
+#: model:ir.model,name:project.model_project_task_history_cumulative
+msgid "History of Tasks"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,state:0
+msgid ""
+"New state of your own task. Pending will be reopened automatically when the "
+"delegated task is closed"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,group_manage_delegation_task:0
+msgid "Allows you to delegate tasks to other users."
+msgstr ""
+
+#. module: project
+#: field:project.project,active:0
+msgid "Active"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_category
+msgid "Category of project's task, issue, ..."
+msgstr ""
+
+#. module: project
+#: help:project.project,resource_calendar_id:0
+msgid "Timetable working hours to adjust the gantt diagram report"
+msgstr ""
+
+#. module: project
+#: help:project.task,delay_hours:0
+msgid ""
+"Computed as difference between planned hours by the project manager and the "
+"total hours of the task."
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+msgid "Helpdesk & Support"
+msgstr ""
+
+#. module: project
+#: help:report.project.task.user,opening_days:0
+msgid "Number of Days to Open the task"
+msgstr ""
+
+#. module: project
+#: field:project.task,delegated_user_id:0
+msgid "Delegated To"
+msgstr ""
+
+#. module: project
+#: help:project.task,planned_hours:0
+msgid ""
+"Estimated time to do the task, usually set by the project manager when the "
+"task is in draft state."
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:220
+#, python-format
+msgid "Attachments"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: selection:project.task,state:0
+#: selection:project.task.delegate,state:0
+#: selection:project.task.history,state:0
+#: selection:project.task.history.cumulative,state:0
+#: model:project.task.type,name:project.project_tt_deployment
+#: selection:project.task.type,state:0
+#: view:report.project.task.user:0
+#: selection:report.project.task.user,state:0
+#: view:res.partner:0
+msgid "Done"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:182
+#, python-format
+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
+#: view:project.project:0
+msgid "Open"
+msgstr ""
+
+#. module: project
+#: field:project.project,privacy_visibility:0
+msgid "Privacy / Visibility"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task,remaining_hours:0
+#: field:project.task.reevaluate,remaining_hours:0
+#: view:report.project.task.user:0
+#: field:report.project.task.user,remaining_hours:0
+msgid "Remaining Hours"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,description:project.mt_task_stage
+msgid "Stage changed"
+msgstr ""
+
+#. module: project
+#: constraint:project.task:0
+msgid "Error ! Task end-date must be greater then task start-date"
+msgstr ""
+
+#. module: project
+#: field:project.task.history,user_id:0
+#: field:project.task.history.cumulative,user_id:0
+msgid "Responsible"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Search Project"
+msgstr ""
+
+#. module: project
+#: view:project.task.delegate:0
+msgid "Delegated Task"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,total_hours:0
+msgid "Total Hours"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_project_config_settings
+msgid "project.config.settings"
+msgstr ""
+
+#. module: project
+#: model:project.task.type,name:project.project_tt_development
+msgid "Development"
+msgstr ""
+
+#. module: project
+#: help:project.task,active:0
+msgid ""
+"This field is computed automatically and have the same behavior than the "
+"boolean 'active' field: if the task is linked to a template or unactivated "
+"project, it will be hidden unless specifically asked."
+msgstr ""
+
+#. module: project
+#: model:res.request.link,name:project.req_link_task
+msgid "Project task"
+msgstr ""
+
+#. module: project
+#: field:project.task,effective_hours:0
+msgid "Hours Spent"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_pad:0
+msgid ""
+"Lets the company customize which Pad installation should be used to link to "
+"new pads\n"
+" (by default, http://ietherpad.com/).\n"
+" This installs the module pad."
+msgstr ""
+
+#. module: project
+#: field:project.task,id:0
+msgid "ID"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_view_task_overpassed_draft
+msgid "Overpassed Tasks"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:932
+#, python-format
+msgid ""
+"Child task still open.\n"
+"Please cancel or complete child task first."
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,user_id:0
+msgid "Assign To"
+msgstr ""
+
+#. module: project
+#: model:res.groups,name:project.group_time_work_estimation_tasks
+msgid "Time Estimation on Tasks"
+msgstr ""
+
+#. module: project
+#: field:project.task,total_hours:0
+msgid "Total"
+msgstr ""
+
+#. module: project
+#: model:process.node,note:project.process_node_taskbydelegate0
+msgid "Delegate your task to the other user"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,description:project.mt_task_started
+msgid "Task started"
+msgstr ""
+
+#. module: project
+#: help:project.task.reevaluate,remaining_hours:0
+msgid "Put here the remaining hours required to close the task."
+msgstr ""
+
+#. module: project
+#: help:project.task.type,fold:0
+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
+msgid "Deadlines"
+msgstr ""
+
+#. module: project
+#: code:addons/project/wizard/project_task_delegate.py:69
+#: code:addons/project/wizard/project_task_delegate.py:70
+#: code:addons/project/wizard/project_task_delegate.py:77
+#: code:addons/project/wizard/project_task_delegate.py:78
+#, python-format
+msgid "CHECK: "
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:432
+#, python-format
+msgid "You must assign members on the project '%s' !"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Pending Projects"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Remaining"
+msgstr ""
+
+#. module: project
+#: field:project.task,progress:0
+msgid "Progress (%)"
+msgstr ""
+
+#. module: project
+#: field:project.task,company_id:0
+#: field:project.task.work,company_id:0
+#: view:report.project.task.user:0
+#: field:report.project.task.user,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_project_timesheet:0
+msgid ""
+"This allows you to transfer the entries under tasks defined for Project "
+"Management to\n"
+" the timesheet line entries for particular date and user, "
+"with the effect of creating,\n"
+" editing and deleting either ways.\n"
+" This installs the module project_timesheet."
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_project_issue:0
+msgid "Track issues and bugs"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_project_mrp:0
+msgid "Generate tasks from sale orders"
+msgstr ""
+
+#. module: project
+#: model:ir.ui.menu,name:project.menu_task_types_view
+msgid "Task Stages"
+msgstr ""
+
+#. module: project
+#: model:process.node,note:project.process_node_drafttask0
+msgid "Define the Requirements and Set Planned Hours."
+msgstr ""
+
+#. module: project
+#: field:project.project,message_ids:0
+#: field:project.task,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: project
+#: field:project.project,color:0
+#: field:project.task,color:0
+msgid "Color Index"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.open_board_project
+#: model:ir.model,name:project.model_project_project
+#: model:ir.ui.menu,name:project.menu_project_dashboard
+#: model:ir.ui.menu,name:project.menu_project_management
+#: view:project.project:0
+#: view:project.task:0
+#: field:project.task,project_id:0
+#: field:project.task.delegate,project_id:0
+#: field:project.task.history.cumulative,project_id:0
+#: view:report.project.task.user:0
+#: field:report.project.task.user,project_id:0
+#: model:res.request.link,name:project.req_link_project
+msgid "Project"
+msgstr ""
+
+#. module: project
+#: selection:project.project,state:0
+#: selection:project.task,state:0
+#: selection:project.task.history,state:0
+#: selection:project.task.history.cumulative,state:0
+#: model:project.task.type,name:project.project_tt_cancel
+#: selection:project.task.type,state:0
+#: selection:report.project.task.user,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,help:project.act_project_project_2_project_task_all
+#: model:ir.actions.act_window,help:project.action_view_task
+msgid ""
+"
\n"
+" Click to create a new task.\n"
+"
\n"
+" OpenERP's project management allows you to manage the "
+"pipeline\n"
+" of tasks in order to get things done efficiently. You can\n"
+" track progress, discuss on tasks, attach documents, etc.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: project
+#: field:project.task,date_end:0
+#: field:report.project.task.user,date_end:0
+msgid "Ending Date"
+msgstr ""
+
+#. module: project
+#: field:project.task.type,state:0
+msgid "Related Status"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Documents"
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,description:project.mt_task_new
+msgid "Task created"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,no_of_days:0
+msgid "# of Days"
+msgstr ""
+
+#. module: project
+#: field:project.project,message_follower_ids:0
+#: field:project.task,message_follower_ids:0
+msgid "Followers"
+msgstr ""
+
+#. module: project
+#: selection:project.project,state:0
+#: view:project.task:0
+#: selection:project.task,state:0
+#: selection:project.task.history,state:0
+#: selection:project.task.history.cumulative,state:0
+#: selection:project.task.type,state:0
+#: view:report.project.task.user:0
+msgid "New"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_view_task_history_cumulative
+#: model:ir.ui.menu,name:project.menu_action_view_task_history_cumulative
+msgid "Cumulative Flow"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,hours_effective:0
+msgid "Effective Hours"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "OverPass delay"
+msgstr ""
+
+#. module: project
+#: view:project.task.delegate:0
+msgid "Validation Task"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_project_long_term:0
+msgid "Manage resources planning on gantt view"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+msgid "Unassigned Tasks"
+msgstr ""
+
+#. module: project
+#: help:project.project,planned_hours:0
+msgid ""
+"Sum of planned hours of all tasks related to this project and its child "
+"projects."
+msgstr ""
+
+#. module: project
+#: view:res.partner:0
+msgid "For changing to done state"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "My Task"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+#: view:report.project.task.user:0
+msgid "My Projects"
+msgstr ""
+
+#. module: project
+#: help:project.task,sequence:0
+msgid "Gives the sequence order when displaying a list of tasks."
+msgstr ""
+
+#. module: project
+#: field:project.task,date_start:0
+#: field:report.project.task.user,date_start:0
+msgid "Starting Date"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:398
+#: model:ir.actions.act_window,name:project.open_view_project_all
+#: model:ir.ui.menu,name:project.menu_projects
+#: view:project.project:0
+#: field:project.task.type,project_ids:0
+#: view:res.company:0
+#, python-format
+msgid "Projects"
+msgstr ""
+
+#. module: project
+#: model:res.groups,name:project.group_tasks_work_on_tasks
+msgid "Task's Work on Tasks"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,name:0
+msgid "New title of the task delegated to the user"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_project_task_user_tree
+#: model:ir.ui.menu,name:project.menu_project_task_user_tree
+#: view:report.project.task.user:0
+msgid "Tasks Analysis"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.history.cumulative:0
+msgid "Project Tasks"
+msgstr ""
+
+#. module: project
+#: field:account.analytic.account,use_tasks:0
+#: model:ir.actions.act_window,name:project.act_project_project_2_project_task_all
+#: model:ir.actions.act_window,name:project.action_view_task
+#: model:ir.ui.menu,name:project.menu_action_view_task
+#: model:process.process,name:project.process_process_tasksprocess0
+#: view:project.project:0
+#: view:project.task:0
+#: view:res.partner:0
+#: field:res.partner,task_ids:0
+msgid "Tasks"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "December"
+msgstr ""
+
+#. module: project
+#: view:project.config.settings:0
+#: view:project.task.delegate:0
+#: view:project.task.reevaluate:0
+msgid "or"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_project_mrp:0
+msgid ""
+"This feature automatically creates project tasks from service products in "
+"sale orders.\n"
+" More precisely, tasks are created for procurement lines with "
+"product of type 'Service',\n"
+" procurement method 'Make to Order', and supply method "
+"'Manufacture'.\n"
+" This installs the module project_mrp."
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,planned_hours:0
+msgid "Estimated time to close this task by the delegated user"
+msgstr ""
+
+#. module: project
+#: model:project.category,name:project.project_category_03
+msgid "Experiment"
+msgstr ""
+
+#. module: project
+#: model:process.transition.action,name:project.process_transition_action_opendrafttask0
+#: selection:report.project.task.user,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: project
+#: field:project.task,kanban_state:0
+#: field:project.task.history,kanban_state:0
+#: field:project.task.history.cumulative,kanban_state:0
+msgid "Kanban State"
+msgstr ""
+
+#. module: project
+#: field:project.config.settings,module_project_timesheet:0
+msgid "Record timesheet lines per tasks"
+msgstr ""
+
+#. module: project
+#: model:ir.model,name:project.model_report_project_task_user
+msgid "Tasks by user and project"
+msgstr ""
+
+#. module: project
+#: field:res.company,project_time_mode_id:0
+msgid "Project Time Unit"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: selection:project.task,kanban_state:0
+#: selection:project.task.history,kanban_state:0
+#: selection:project.task.history.cumulative,kanban_state:0
+msgid "Normal"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,closing_days:0
+msgid "Days to Close"
+msgstr ""
+
+#. module: project
+#: model:res.groups,name:project.group_project_user
+msgid "User"
+msgstr ""
+
+#. module: project
+#: help:project.project,alias_model:0
+msgid ""
+"The kind of document created when an email is received on this project's "
+"email alias"
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.action_config_settings
+#: view:project.config.settings:0
+msgid "Configure Project"
+msgstr ""
+
+#. module: project
+#: view:project.task.history.cumulative:0
+msgid "Tasks's Cumulative Flow"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "January"
+msgstr ""
+
+#. module: project
+#: field:project.task.delegate,prefix:0
+msgid "Your Task Title"
+msgstr ""
+
+#. module: project
+#: view:project.task.reevaluate:0
+msgid "Reevaluation Task"
+msgstr ""
+
+#. module: project
+#: code:addons/project/project.py:1318
+#, python-format
+msgid "Please delete the project linked with this account first."
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,name:project.mt_project_task_new
+#: model:mail.message.subtype,name:project.mt_task_new
+msgid "Task Created"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+msgid "Non Assigned Tasks to users"
+msgstr ""
+
+#. module: project
+#: view:project.project:0
+msgid "Projects in which I am a manager"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: selection:project.task,kanban_state:0
+#: selection:project.task.history,kanban_state:0
+#: selection:project.task.history.cumulative,kanban_state:0
+msgid "Ready for next stage"
+msgstr ""
+
+#. module: project
+#: field:project.task.type,case_default:0
+msgid "Default for New Projects"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: field:project.task,description:0
+#: field:project.task.type,description:0
+msgid "Description"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "May"
+msgstr ""
+
+#. module: project
+#: help:project.task.type,case_default:0
+msgid ""
+"If you check this field, this stage will be proposed by default on each new "
+"project. It will not assign this stage to existing projects."
+msgstr ""
+
+#. module: project
+#: field:project.task,partner_id:0
+msgid "Customer"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "February"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_project_long_term:0
+msgid ""
+"A long term project management module that tracks planning, scheduling, and "
+"resource allocation.\n"
+" This installs the module project_long_term."
+msgstr ""
+
+#. module: project
+#: model:mail.message.subtype,description:project.mt_task_closed
+msgid "Task closed"
+msgstr ""
+
+#. module: project
+#: selection:report.project.task.user,month:0
+msgid "April"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+msgid "Spent Hours"
+msgstr ""
+
+#. module: project
+#: help:project.project,sequence:0
+msgid "Gives the sequence order when displaying a list of Projects."
+msgstr ""
+
+#. module: project
+#: model:ir.actions.act_window,name:project.act_res_users_2_project_task_opened
+msgid "Assigned Tasks"
+msgstr ""
+
+#. module: project
+#: help:project.config.settings,module_project_issue_sheet:0
+msgid ""
+"Provides timesheet support for the issues/bugs management in project.\n"
+" This installs the module project_issue_sheet."
+msgstr ""
+
+#. module: project
+#: selection:project.project,privacy_visibility:0
+msgid "Followers Only"
+msgstr ""
+
+#. module: project
+#: view:board.board:0
+#: field:project.project,task_count:0
+msgid "Open Tasks"
+msgstr ""
+
+#. module: project
+#: field:project.project,priority:0
+#: field:project.project,sequence:0
+#: field:project.task,sequence:0
+#: field:project.task.type,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: project
+#: view:project.task:0
+#: view:project.task.work:0
+msgid "Task Work"
+msgstr ""
+
+#. module: project
+#: help:project.task.delegate,planned_hours_me:0
+msgid ""
+"Estimated time for you to validate the work done by the user to whom you "
+"delegate this task"
+msgstr ""
+
+#. module: project
+#: view:report.project.task.user:0
+#: field:report.project.task.user,year:0
+msgid "Year"
+msgstr ""
+
+#. module: project
+#: field:project.project,type_ids:0
+#: view:project.task.type:0
+msgid "Tasks Stages"
+msgstr ""
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 @@
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/addons/project/project.py b/addons/project/project.py
index 0b99356a9de..e907e4b3652 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,
@@ -198,8 +198,12 @@ class project(osv.osv):
return res
def _task_count(self, cr, uid, ids, field_name, arg, context=None):
+ if context is None:
+ context = {}
res = dict.fromkeys(ids, 0)
- task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
+ ctx = context.copy()
+ ctx['active_test'] = False
+ task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)], context=ctx)
for task in self.pool.get('project.task').browse(cr, uid, task_ids, context):
res[task.project_id.id] += 1
return res
@@ -210,7 +214,7 @@ class project(osv.osv):
def _get_visibility_selection(self, cr, uid, context=None):
""" Overriden in portal_project to offer more options """
- return [('public', 'All Users'),
+ return [('public', 'Public'),
('employees', 'Employees Only'),
('followers', 'Followers Only')]
@@ -275,7 +279,17 @@ class project(osv.osv):
"with Tasks (or optionally Issues if the Issue Tracker module is installed)."),
'alias_model': fields.selection(_alias_models, "Alias Model", select=True, required=True,
help="The kind of document created when an email is received on this project's email alias"),
- 'privacy_visibility': fields.selection(_visibility_selection, 'Privacy / Visibility', required=True),
+ 'privacy_visibility': fields.selection(_visibility_selection, 'Privacy / Visibility', required=True,
+ help="Holds visibility of the tasks or issues that belong to the current project:\n"
+ "- Public: everybody sees everything; if portal is activated, portal users\n"
+ " see all tasks or issues; if anonymous portal is activated, visitors\n"
+ " see all tasks or issues\n"
+ "- Portal (only available if Portal is installed): employees see everything;\n"
+ " if portal is activated, portal users see the tasks or issues followed by\n"
+ " them or by someone of their company\n"
+ "- Employees Only: employees see all tasks or issues\n"
+ "- Followers Only: employees see only the followed tasks or issues; if portal\n"
+ " is activated, portal users see the followed tasks or issues."),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
}
@@ -293,7 +307,7 @@ class project(osv.osv):
'sequence': 10,
'type_ids': _get_type_common,
'alias_model': 'project.task',
- 'privacy_visibility': 'public',
+ 'privacy_visibility': 'employees',
}
# TODO: Why not using a SQL contraints ?
@@ -567,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',
@@ -612,7 +626,8 @@ class task(base_stage, osv.osv):
search_domain = []
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
if project_id:
- search_domain += [('project_ids', '=', project_id)]
+ search_domain += ['|', ('project_ids', '=', project_id)]
+ search_domain += [('id', 'in', ids)]
stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
@@ -738,7 +753,7 @@ class task(base_stage, osv.osv):
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange',
- domain="['&', ('fold', '=', False), ('project_ids', '=', project_id)]"),
+ domain="[('project_ids', '=', project_id)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=_TASK_STATE, string="Status", readonly=True,
help='The status is set to \'Draft\', when a case is created.\
@@ -1105,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
@@ -1182,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 = {}
@@ -1190,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/project_demo.xml b/addons/project/project_demo.xml
index f5fbf878fd0..b7dcc2bdb83 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -62,7 +62,7 @@
E-Learning Integrationproject.task
- public
+ employees
@@ -76,6 +76,7 @@
Website Design Templatesproject.task
+ employees
@@ -89,6 +90,7 @@
Data Import/Export Pluginproject.task
+ followers
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 298355d4c82..eb042e5f0c7 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -52,7 +52,8 @@
kanban,tree,form,calendar,gantt,graph{
'search_default_project_id': [active_id],
- 'default_project_id': active_id,
+ 'default_project_id': active_id,
+ 'active_test': False,
}
@@ -509,6 +510,7 @@
+Get the right purchase proposition at the right time to reduce your inventory level. Improve your purchase and inventory performance with procurement rules depending on stock levels, logistic rules, sales orders, forecasted manufacturing orders, etc.
+
+Send requests for quotations or purchase orders to your supplier in one click. Get access to product receptions and invoices from your purchase order.
+
+
+
+
+
+
+
+
+
+
+
Purchase Tenders
+
Get the best price by negotiating with several suppliers
+
+
+
+
+
+Launch purchase tenders, integrate supplier's answers in the process and compare propositions. Choose the best offer and send purchase orders easily. Use reporting to analyse the quality of your suppliers afterwards.
+
+Integrate all supplier's communications on the purchase orders (or RfQs) to get a strong traceability on the negotiation or after sales service issues. Use the claim management module to track issues related to suppliers.
+
+
+
+
+
+
+
+
+
+
+
+
Standard Price, Average Price, FIFO
+
+
+
+
+
+Use the costing method that reflects your business: standard price, average price, fifo or lifo. Get your accounting entries and the right inventory valuation in real-time; OpenERP manages everything for you, transparently.
+
+
+
+
+
+
+
+
+
Import Supplier Pricelists
+
Take smart purchase decisions using the best prices
+
+
+Easily import supplier's pricelists to make smarter purchase decisions based on promotions, prices depending on quantities and special contract conditions. You can even base your sales price depending on your supplier's prices.
+
+
+
+
+
+
+
+
+
+
+
Control Products and Invoices
+
+
+
+
+
+
+
+No product or order is left behind, the inventory control allows you to manage back orders, refunds, product reception and quality control. Choose the right control method according to your need.
+
+
+Control supplier invoices with no effort. Choose the right method according to your need: pre-generate draft invoices based on purchase orders, on products receptions, create invoices manually and import lines from purchase orders, etc.
+
+
+
+
+
+
+
+
Get Statistics On Your Purchases
+
+
+Get accurate statistics on the performance of your suppliers through flexible reporting: delivery delays, negotiated discount on prices, quantities purchased, etc. Integrate purchases with the analytic accounting to analyse your contracts profitability.
+