diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 42f3effd6f9..06e59232ac9 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -114,7 +114,7 @@ class account_invoice(osv.osv): #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: + if line.invoice and invoice.type == line.invoice.type: 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) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 790f34a4f7f..8f4d66e65ec 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1453,7 +1453,7 @@ diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index a0d14e889cb..b73dad2d385 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -664,13 +664,20 @@ class account_analytic_account(osv.osv): partner_payment_term = contract.partner_id.property_payment_term and contract.partner_id.property_payment_term.id or False + currency_id = False + if contract.pricelist_id: + currency_id = contract.pricelist_id.currency_id.id + elif contract.partner_id.property_product_pricelist: + currency_id = contract.partner_id.property_product_pricelist.currency_id.id + elif contract.company_id: + currency_id = contract.company_id.currency_id.id inv_data = { 'reference': contract.code or False, 'account_id': contract.partner_id.property_account_receivable.id, 'type': 'out_invoice', 'partner_id': contract.partner_id.id, - 'currency_id': contract.partner_id.property_product_pricelist.id or False, + 'currency_id': currency_id, 'journal_id': len(journal_ids) and journal_ids[0] or False, 'date_invoice': contract.recurring_next_date, 'origin': contract.name, diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index c9516b6135f..5d0ed8297c2 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -911,9 +911,10 @@ class account_voucher(osv.osv): 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]) + if partner_id: + 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]) return vals def button_proforma_voucher(self, cr, uid, ids, context=None): @@ -965,7 +966,7 @@ class account_voucher(osv.osv): res = {} if not partner_id: return res - res = {'account_id':False} + res = {} partner_pool = self.pool.get('res.partner') journal_pool = self.pool.get('account.journal') if pay_now == 'pay_later': @@ -977,7 +978,8 @@ class account_voucher(osv.osv): account_id = partner.property_account_payable.id else: account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id - res['account_id'] = account_id + if account_id: + res['account_id'] = account_id return {'value':res} def _sel_context(self, cr, uid, voucher_id, context=None): @@ -1366,6 +1368,7 @@ class account_voucher(osv.osv): move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') for voucher in self.browse(cr, uid, ids, context=context): + local_context = dict(context, force_company=voucher.journal_id.company_id.id) if voucher.move_id: continue company_currency = self._get_company_currency(cr, uid, voucher.id, context) @@ -1380,7 +1383,7 @@ class account_voucher(osv.osv): # Get the name of the account_move just created name = move_pool.browse(cr, uid, move_id, context=context).name # Create the first line of the voucher - move_line_id = move_line_pool.create(cr, uid, self.first_move_line_get(cr,uid,voucher.id, move_id, company_currency, current_currency, context), context) + move_line_id = move_line_pool.create(cr, uid, self.first_move_line_get(cr,uid,voucher.id, move_id, company_currency, current_currency, local_context), local_context) move_line_brw = move_line_pool.browse(cr, uid, move_line_id, context=context) line_total = move_line_brw.debit - move_line_brw.credit rec_list_ids = [] @@ -1392,9 +1395,9 @@ class account_voucher(osv.osv): line_total, rec_list_ids = self.voucher_move_line_create(cr, uid, voucher.id, line_total, move_id, company_currency, current_currency, context) # Create the writeoff line if needed - ml_writeoff = self.writeoff_move_line_get(cr, uid, voucher.id, line_total, move_id, name, company_currency, current_currency, context) + ml_writeoff = self.writeoff_move_line_get(cr, uid, voucher.id, line_total, move_id, name, company_currency, current_currency, local_context) if ml_writeoff: - move_line_pool.create(cr, uid, ml_writeoff, context) + move_line_pool.create(cr, uid, ml_writeoff, local_context) # We post the voucher. self.write(cr, uid, [voucher.id], { 'move_id': move_id, @@ -1605,7 +1608,11 @@ class account_bank_statement(osv.osv): bank_st_line_obj = self.pool.get('account.bank.statement.line') st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context) if st_line.voucher_id: - voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context) + voucher_obj.write(cr, uid, [st_line.voucher_id.id], + {'number': next_number, + 'date': st_line.date, + 'period_id': st_line.statement_id.period_id.id}, + context=context) if st_line.voucher_id.state == 'cancel': voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context) voucher_obj.signal_proforma_voucher(cr, uid, [st_line.voucher_id.id]) diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index e35061e1836..97f96f75901 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -73,8 +73,14 @@ - + + + + + @@ -112,15 +118,6 @@ - - - - - - @@ -224,11 +221,11 @@

- + diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index de5121a819b..059989801d1 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -94,7 +94,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'account_id': result['value'].get('account_id', statement.journal_id.default_credit_account_id.id), 'company_id': statement.company_id.id, 'currency_id': statement.currency.id, - 'date': line.date, + 'date': statement.date, 'amount': sign*amount, 'payment_rate': result['value']['payment_rate'], 'payment_rate_currency_id': result['value']['payment_rate_currency_id'], @@ -119,7 +119,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'statement_id': statement_id, 'ref': line.ref, 'voucher_id': voucher_id, - 'date': time.strftime('%Y-%m-%d'), + 'date': statement.date, }, context=context) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 159baf3a9e7..ca4a15bca6e 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -268,10 +268,14 @@ def log_fct(cr, uid_orig, model, method, fct_src, *args, **kw): new_values = get_data(cr, uid_orig, pool, res_ids, model, method) elif method == 'read': res = fct_src(cr, uid_orig, model.model, method, *args, **kw) + if isinstance(res, dict): + records = [res] + else: + records = res # build the res_ids and the old_values dict. Here we don't use get_data() to # avoid performing an additional read() res_ids = [] - for record in res: + for record in records: res_ids.append(record['id']) old_values[(model.id, record['id'])] = {'value': record, 'text': record} # log only the fields read @@ -279,7 +283,9 @@ def log_fct(cr, uid_orig, model, method, fct_src, *args, **kw): elif method == 'unlink': res_ids = args[0] old_values = get_data(cr, uid_orig, pool, res_ids, model, method) - res = fct_src(cr, uid_orig, model.model, method, *args, **kw) + # process_data first as fct_src will unlink the record + self.process_data(cr, uid_orig, pool, res_ids, model, method, old_values, new_values, field_list) + return fct_src(cr, uid_orig, model.model, method, *args, **kw) else: # method is write, action or workflow action res_ids = [] if args: @@ -322,7 +328,7 @@ def get_data(cr, uid, pool, res_ids, model, method): data = {} resource_pool = pool[model.model] # read all the fields of the given resources in super admin mode - for resource in resource_pool.read(cr, SUPERUSER_ID, res_ids): + for resource in resource_pool.read(cr, SUPERUSER_ID, res_ids, resource_pool._all_columns): values = {} values_text = {} resource_id = resource['id'] @@ -456,7 +462,9 @@ def process_data(cr, uid, pool, res_ids, model, method, old_values=None, new_val # if at least one modification has been found for model_id, resource_id in lines: - name = pool[model.model].name_get(cr, uid, [resource_id])[0][1] + line_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, model_id).model + name = pool.get(line_model).name_get(cr, uid, [resource_id])[0][1] + vals = { 'method': method, 'object_id': model_id, diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index ba044530468..16baa97d018 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -96,8 +96,9 @@ class AuthSignup(openerp.addons.web.controllers.main.Home): def _signup_with_values(self, token, values): db, login, password = request.registry['res.users'].signup(request.cr, openerp.SUPERUSER_ID, values, token) + request.cr.commit() # as authenticate will use its own cursor we need to commit the current transaction uid = request.session.authenticate(db, login, password) - if uid is not False: + if not uid: raise SignupError(_('Authentification Failed.')) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 58728a77aef..e48533ebeb4 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -275,6 +275,13 @@ class base_action_rule(osv.osv): if action.filter_id: domain = eval(action.filter_id.domain) ctx.update(eval(action.filter_id.context)) + if 'lang' not in ctx: + # Filters might be language-sensitive, attempt to reuse creator lang + # as we are usually running this as super-user in background + [filter_meta] = action.filter_id.perm_read() + user_id = filter_meta['write_uid'] and filter_meta['write_uid'][0] or \ + filter_meta['create_uid'][0] + ctx['lang'] = self.pool['res.users'].browse(cr, uid, user_id).lang record_ids = model.search(cr, uid, domain, context=ctx) # determine when action should occur for the records diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index c728404d9ce..e76a7a9124d 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -343,6 +343,7 @@ help="Leads that are assigned to any sales teams I am member of"/> + + diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index a027a910520..9675913a0b5 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -171,6 +171,7 @@ + diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml index 5429341e154..4f7828cb531 100644 --- a/addons/email_template/email_template_view.xml +++ b/addons/email_template/email_template_view.xml @@ -60,7 +60,7 @@

Body

- +
diff --git a/addons/gamification/i18n/gamification.pot b/addons/gamification/i18n/gamification.pot new file mode 100644 index 00000000000..03fcc645bec --- /dev/null +++ b/addons/gamification/i18n/gamification.pot @@ -0,0 +1,1733 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * gamification +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.saas~3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-02-13 15:03+0000\n" +"PO-Revision-Date: 2014-02-13 15:03+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Search Goals" +msgstr "" + +#. module: gamification +#: model:gamification.goal.definition,name:gamification.definition_base_company_data +msgid "Set your Company Data" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,report_message_frequency:0 +msgid "Never" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,computation_mode:0 +msgid "Defined how will be computed the goals. The result of the operation will be stored in the field 'Current'." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: view:gamification.goal:0 +#: field:gamification.goal.wizard,goal_id:0 +msgid "Goal" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,period:0 +msgid "Non recurring" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,next_report_date:0 +msgid "Next Report Date" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,monetary:0 +msgid "Monetary Value" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "My Goals" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,condition:0 +msgid "The lower the better" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +#: view:gamification.goal.wizard:0 +msgid "Grant Badge To" +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_count_distinct:0 +msgid "The number of time this badge has been received by unique users." +msgstr "" + +#. module: gamification +#: help:gamification.badge,unique_owner_ids:0 +msgid "The list of unique users having received this badge." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: view:gamification.goal:0 +#: view:gamification.goal.definition:0 +msgid "Group By..." +msgstr "" + +#. module: gamification +#: model:gamification.challenge,name:gamification.challenge_base_configure +msgid "Setup your Company" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "/∞" +msgstr "" + +#. module: gamification +#: code:addons/gamification/wizard/grant_badge.py:44 +#, python-format +msgid "You can not grant a badge to yourself" +msgstr "" + +#. module: gamification +#: field:gamification.goal,completeness:0 +msgid "Completeness" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,field_date_id:0 +msgid "Date Field" +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_my_this_month:0 +msgid "The number of time the current user has received this badge this month." +msgstr "" + +#. module: gamification +#: selection:gamification.challenge.line,condition:0 +msgid ">=" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,name:gamification.challenge_wizard +msgid "Challenge Description" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_badge_user_wizard +msgid "gamification.badge.user.wizard" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Reward" +msgstr "" + +#. module: gamification +#: help:gamification.badge,message_ids:0 +#: help:gamification.challenge,message_ids:0 +#: help:gamification.goal,message_ids:0 +msgid "Messages and communication history" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,category:0 +msgid "Define the visibility of the challenge through menus" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Refresh Challenge" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_challenge_line +msgid "Gamification generic goal for challenge" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "e.g. result = pool.get('mail.followers').search(cr, uid, [('res_model', '=', 'mail.group'), ('partner_id', '=', object.user_id.partner_id.id)], count=True, context=context)" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,definition_monetary:0 +msgid "Monetary" +msgstr "" + +#. module: gamification +#: selection:gamification.goal,state:0 +msgid "In progress (to update)" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_goal_definition +msgid "Gamification goal definition" +msgstr "" + +#. module: gamification +#: help:gamification.badge,remaining_sending:0 +msgid "If a maxium is set" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,invited_user_ids:0 +msgid "Suggest to users" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: model:ir.actions.act_window,name:gamification.goal_list_action +#: model:ir.ui.menu,name:gamification.gamification_goal_menu +msgid "Goals" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Badge Description" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "than the target." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Badges are granted when a challenge is finished. This is either at the end of a running period (eg: end of the month for a monthly challenge), at the end date of a challenge (if no periodicity is set) or when the challenge is manually closed." +msgstr "" + +#. module: gamification +#: help:gamification.challenge,manager_id:0 +msgid "The user responsible for the challenge." +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/goal.py:385 +#, python-format +msgid "Update %s" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,description:0 +msgid "Goal Description" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "this month" +msgstr "" + +#. module: gamification +#: field:gamification.badge,owner_ids:0 +msgid "Owners" +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,sender_id:0 +msgid "Sender" +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_my_this_month:0 +msgid "My Monthly Total" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,remind_update_delay:0 +msgid "Never reminded if no value or zero is specified." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: field:gamification.challenge.line,challenge_id:0 +#: field:gamification.goal,challenge_id:0 +msgid "Challenge" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,condition:0 +msgid "Goal Performance" +msgstr "" + +#. module: gamification +#: field:gamification.badge,message_ids:0 +#: field:gamification.challenge,message_ids:0 +#: field:gamification.goal,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "badges this month" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:517 +#: code:addons/gamification/models/goal.py:351 +#, python-format +msgid "Error!" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,line_ids:0 +msgid "Lines" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user:0 +msgid "Granted by" +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_count_distinct:0 +msgid "Number of users" +msgstr "" + +#. module: gamification +#: help:gamification.badge,message_unread:0 +#: help:gamification.challenge,message_unread:0 +#: help:gamification.goal,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,name:gamification.action_new_simplified_res_users +msgid "Create User" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,period:0 +#: selection:gamification.challenge,report_message_frequency:0 +msgid "Yearly" +msgstr "" + +#. module: gamification +#: selection:gamification.badge,rule_auth:0 +msgid "People having some badges" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "granted," +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,definition_full_suffix:0 +#: field:gamification.goal,definition_suffix:0 +#: field:gamification.goal.definition,suffix:0 +msgid "Suffix" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Reference" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,autojoin_group_id:0 +msgid "Auto-subscription Group" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "refresh" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Even if the challenge is failed, best challengers will be rewarded" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,reward_id:0 +msgid "For Every Succeding User" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,target_goal:0 +msgid "Target Value to Reach" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,start_date:0 +msgid "The day a new challenge will be automatically started. If no periodicity is set, will use this date as the goal start date." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Notification Messages" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,manager_id:0 +msgid "Responsible" +msgstr "" + +#. module: gamification +#. openerp-web +#: code:addons/gamification/static/src/xml/gamification.xml:108 +#, python-format +msgid "more details..." +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,name:gamification.badge_list_action +#: model:ir.ui.menu,name:gamification.gamification_badge_menu +msgid "Badges" +msgstr "" + +#. module: gamification +#: help:gamification.badge,rule_auth_badge_ids:0 +msgid "Only the people having these badges can give this badge" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,computation_mode:0 +msgid "Recorded manually" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Statistics" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "From" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Granting" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Grant" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "e.g. days" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,definition_id:0 +#: view:gamification.goal:0 +#: field:gamification.goal,definition_id:0 +#: field:gamification.goal.definition,name:0 +msgid "Goal Definition" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: gamification +#: selection:gamification.goal,state:0 +msgid "Failed" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: field:gamification.challenge,state:0 +#: view:gamification.goal:0 +#: field:gamification.goal,state:0 +msgid "State" +msgstr "" + +#. module: gamification +#: field:gamification.badge,message_follower_ids:0 +#: field:gamification.challenge,message_follower_ids:0 +#: field:gamification.goal,message_follower_ids:0 +msgid "Followers" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,reward_first_id:0 +msgid "For 1st user" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Can not grant" +msgstr "" + +#. module: gamification +#: field:gamification.badge,message_unread:0 +#: field:gamification.challenge,message_unread:0 +#: field:gamification.goal,message_unread:0 +msgid "Unread Messages" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,display_mode:0 +msgid "Displayed as" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +#: field:gamification.badge,name:0 +#: field:gamification.badge.user,badge_id:0 +#: field:gamification.badge.user.wizard,badge_id:0 +msgid "Badge" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,suffix:0 +msgid "The unit of the target and current values" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: model:ir.actions.act_window,name:gamification.goals_from_challenge_act +msgid "Related Goals" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Subscriptions" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +#: model:ir.actions.act_window,name:gamification.action_grant_wizard +msgid "Grant Badge" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:683 +#, python-format +msgid "
Reward (badge %s) for every succeeding user was sent to %s." +msgstr "" + +#. module: gamification +#: help:gamification.badge,message_summary:0 +#: help:gamification.challenge,message_summary:0 +#: help:gamification.goal,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: gamification +#: field:gamification.challenge,report_message_group_id:0 +msgid "Send a copy to" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.challenge_list_action +msgid "

\n" +" Click to create a challenge. \n" +"

\n" +"

\n" +" Assign a list of goals to chosen users to evaluate them.\n" +" The challenge can use a period (weekly, monthly...) for automatic creation of goals.\n" +" The goals are created for the specified users or member of the group.\n" +"

\n" +" " +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:695 +#, python-format +msgid "Nobody reached the required conditions to receive special badges." +msgstr "" + +#. module: gamification +#. openerp-web +#: code:addons/gamification/static/src/xml/gamification.xml:35 +#: code:addons/gamification/static/src/xml/gamification.xml:57 +#, python-format +msgid "Target: <=" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Reminders for Manual Goals" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/goal.py:265 +#, python-format +msgid "Invalid return content from the evaluation of %s" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +#: field:gamification.goal.definition,computation_mode:0 +msgid "Computation Mode" +msgstr "" + +#. module: gamification +#: model:email.template,body_html:gamification.simple_report_template +msgid "
${object.name}\n" +"

The following message contains the current progress for the challenge ${object.name}

\n" +"\n" +"% if object.visibility_mode == 'personal':\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" % for line in ctx[\"challenge_lines\"]:\n" +" = 100:\n" +" style=\"font-weight:bold;\"\n" +" % endif\n" +" >\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" % endfor\n" +"
GoalTargetCurrentCompleteness
${line['name']}${line['target']}\n" +" % if line['suffix']:\n" +" ${line['suffix']}\n" +" % endif\n" +" ${line['current']}\n" +" % if line['suffix']:\n" +" ${line['suffix']}\n" +" % endif\n" +" ${line['completeness']} %
\n" +"% else:\n" +" % for line in ctx[\"challenge_lines\"]:\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" % for goal in line['goals']:\n" +" = 100:\n" +" style=\"font-weight:bold;\"\n" +" % endif\n" +" >\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" % endfor\n" +"
${line['name']}
#PersonCompletenessCurrent
${goal['rank']}${goal['name']}${goal['completeness']}%${goal['current']}/${line['target']}\n" +" % if line['suffix']:\n" +" ${line['suffix']}\n" +" % endif\n" +"


\n" +"\n" +" % endfor\n" +"% endif\n" +" " +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,condition:0 +msgid "A goal is considered as completed when the current value is compared to the value to reach" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,remind_update_delay:0 +msgid "Non-updated manual goals will be reminded after" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,full_suffix:0 +msgid "The currency and suffix field" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,display_mode:0 +msgid "Exclusive (done or not-done)" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/badge.py:223 +#: code:addons/gamification/models/badge.py:225 +#: code:addons/gamification/models/badge.py:227 +#: code:addons/gamification/models/badge.py:229 +#: code:addons/gamification/wizard/grant_badge.py:44 +#, python-format +msgid "Warning!" +msgstr "" + +#. module: gamification +#: field:gamification.goal,last_update:0 +msgid "Last Update" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,report_message_frequency:0 +msgid "Report Frequency" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,field_id:0 +msgid "The field containing the value to evaluate" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,end_date:0 +msgid "The day a new challenge will be automatically closed. If no periodicity is set, will use this date as the goal end date." +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,create_date:0 +msgid "Created" +msgstr "" + +#. module: gamification +#: model:gamification.badge,name:gamification.badge_idea +msgid "Brilliant" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,visibility_mode:0 +msgid "Individual Goals" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Invited" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,report_message_frequency:0 +msgid "On change" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,period:0 +#: selection:gamification.challenge,report_message_frequency:0 +msgid "Daily" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: view:gamification.goal.definition:0 +msgid "Goal definitions" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Participating" +msgstr "" + +#. module: gamification +#: help:gamification.badge,rule_auth:0 +msgid "Who can grant this badge" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,last_report_date:0 +msgid "Last Report Date" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,computation_mode:0 +msgid "Automatic: execute a specific Python code" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_goal_wizard +msgid "gamification.goal.wizard" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_badge_user +msgid "Gamification user badge" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Describe the challenge: what is does, who it targets, why it matters..." +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Goal List" +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,comment:0 +#: field:gamification.badge.user.wizard,comment:0 +msgid "Comment" +msgstr "" + +#. module: gamification +#: selection:gamification.goal,state:0 +msgid "In progress" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Search Challenges" +msgstr "" + +#. module: gamification +#: selection:gamification.badge,rule_auth:0 +msgid "No one, assigned through challenges" +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_my:0 +msgid "My Total" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "reply later" +msgstr "" + +#. module: gamification +#: field:gamification.badge,image:0 +msgid "Image" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Running Challenges" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,category:0 +msgid "Appears in" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Passed" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "Clickable Goals" +msgstr "" + +#. module: gamification +#: selection:gamification.goal,state:0 +msgid "Canceled" +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,badge_name:0 +msgid "Badge Name" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,definition_suffix:0 +msgid "Unit" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/badge.py:229 +#, python-format +msgid "You have already sent this badge too many time this month." +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_my_monthly_sending:0 +msgid "My Monthly Sending Total" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Check Badge" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,period:0 +#: selection:gamification.challenge,report_message_frequency:0 +msgid "Weekly" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Assign Challenge To" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +#: view:gamification.challenge:0 +#: view:gamification.goal.wizard:0 +msgid "or" +msgstr "" + +#. module: gamification +#: help:gamification.challenge.line,sequence:0 +msgid "Sequence number for ordering" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Category" +msgstr "" + +#. module: gamification +#: field:gamification.goal,current:0 +msgid "Current Value" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,field_date_id:0 +msgid "The date to use for the time period evaluated" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.goals_from_challenge_act +msgid "

\n" +" There is no goals associated to this challenge matching your search.\n" +" Make sure that your challenge is active and assigned to at least one user.\n" +"

\n" +" " +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.badge_list_action +msgid "

\n" +" Click to create a badge. \n" +"

\n" +"

\n" +" A badge is a symbolic token granted to a user as a sign of reward.\n" +" It can be deserved automatically when some conditions are met or manually by users.\n" +" Some badges are harder than others to get with specific conditions.\n" +"

\n" +" " +msgstr "" + +#. module: gamification +#: field:gamification.badge,rule_auth_badge_ids:0 +msgid "Required Badges" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Line List" +msgstr "" + +#. module: gamification +#: field:gamification.badge,rule_max:0 +msgid "Monthly Limited Sending" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:517 +#, python-format +msgid "Retrieving progress for personal challenge without user information" +msgstr "" + +#. module: gamification +#: model:gamification.goal.definition,name:gamification.definition_base_timezone +msgid "Set your Timezone" +msgstr "" + +#. module: gamification +#: help:gamification.badge,goal_definition_ids:0 +msgid "The users that have succeeded theses goals will receive automatically the badge." +msgstr "" + +#. module: gamification +#: help:gamification.badge,image:0 +msgid "This field holds the image used for the badge, limited to 256x256" +msgstr "" + +#. module: gamification +#: view:gamification.goal.wizard:0 +msgid "Update" +msgstr "" + +#. module: gamification +#: field:gamification.goal,line_id:0 +msgid "Goal Line" +msgstr "" + +#. module: gamification +#: field:gamification.badge,rule_max_number:0 +msgid "Limitation Number" +msgstr "" + +#. module: gamification +#: model:ir.module.category,name:gamification.module_goal_category +msgid "Gamification" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,state:0 +#: view:gamification.goal:0 +#: selection:gamification.goal,state:0 +msgid "Draft" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Reject" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,model_id:0 +msgid "The model object for the field to evaluate" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.goal_definition_list_action +msgid "

\n" +" Click to create a goal definition. \n" +"

\n" +"

\n" +" A goal definition is a technical model of goal defining a condition to reach.\n" +" The dates, values to reach or users are defined in goal instance.\n" +"

\n" +" " +msgstr "" + +#. module: gamification +#: help:gamification.badge.user,sender_id:0 +msgid "The user who has send the badge" +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_count:0 +msgid "The number of time this badge has been received." +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +#: field:gamification.goal.definition,model_id:0 +msgid "Model" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_challenge +msgid "Gamification challenge" +msgstr "" + +#. module: gamification +#: help:gamification.badge,rule_max:0 +msgid "Check to set a monthly limit per person of sending this badge" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_badge +msgid "Gamification badge" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.action_new_simplified_res_users +msgid "Create and manage users that will connect to the system. Users can be deactivated should there be a period of time during which they will/should not connect to the system. You can assign them groups in order to give them specific access to the applications they need to use in the system." +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Security rules to define who is allowed to manually grant badges. Not enforced for administrator." +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,display_mode:0 +msgid "Progressive (using numerical values)" +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_gamification_goal +msgid "Gamification goal instance" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:685 +#, python-format +msgid "
Nobody has succeeded to reach every goal, no badge is rewared for this challenge." +msgstr "" + +#. module: gamification +#: field:gamification.badge,message_is_follower:0 +#: field:gamification.challenge,message_is_follower:0 +#: field:gamification.goal,message_is_follower:0 +msgid "Is a Follower" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,full_suffix:0 +msgid "Full Suffix" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Advanced Options" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,start_date:0 +#: field:gamification.goal,start_date:0 +msgid "Start Date" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,reward_second_id:0 +msgid "For 2nd user" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Data" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,condition:0 +msgid "Condition" +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,user_id:0 +#: field:gamification.badge.user.wizard,user_id:0 +#: view:gamification.goal:0 +#: field:gamification.goal,user_id:0 +msgid "User" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,domain:0 +msgid "Filter Domain" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Schedule" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,computation_mode:0 +msgid "Automatic: number of records" +msgstr "" + +#. module: gamification +#: help:gamification.badge,rule_max_number:0 +msgid "The maximum number of time this badge can be sent per month per person." +msgstr "" + +#. module: gamification +#: model:ir.model,name:gamification.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "Formating Options" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,compute_code:0 +msgid "Python code to be executed for each user. 'result' should contains the new current value. Evaluated user can be access through object.user_id." +msgstr "" + +#. module: gamification +#: field:gamification.challenge,user_ids:0 +#: model:ir.model,name:gamification.model_res_users +msgid "Users" +msgstr "" + +#. module: gamification +#: selection:gamification.badge,rule_auth:0 +msgid "A selected list of users" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: view:gamification.challenge.line:0 +msgid "Challenge Lines" +msgstr "" + +#. module: gamification +#: help:gamification.badge,rule_auth_user_ids:0 +msgid "Only these people can give this badge" +msgstr "" + +#. module: gamification +#: field:gamification.badge,active:0 +msgid "Active" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,action_id:0 +msgid "The action that will be called to update the goal value." +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "You can still grant" +msgstr "" + +#. module: gamification +#: field:gamification.goal,computation_mode:0 +msgid "Computation mode" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,action_id:0 +msgid "Action" +msgstr "" + +#. module: gamification +#: model:gamification.goal.definition,name:gamification.definition_base_invite +msgid "Invite new Users" +msgstr "" + +#. module: gamification +#: field:gamification.goal,definition_description:0 +msgid "Definition Description" +msgstr "" + +#. module: gamification +#: model:gamification.badge,name:gamification.badge_problem_solver +msgid "Problem Solver" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Target: less than" +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_this_month:0 +msgid "The number of time this badge has been received this month." +msgstr "" + +#. module: gamification +#: help:gamification.goal,last_update:0 +msgid "In case of manual goal, reminders are sent if the goal as not been updated for a while (defined in challenge). Ignored in case of non-manual goal or goal not linked to a challenge." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Depending on the Display mode, reports will be individual or shared." +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Start goal" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,period:0 +msgid "Periodicity" +msgstr "" + +#. module: gamification +#: field:gamification.badge.user,create_uid:0 +msgid "Creator" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:692 +#, python-format +msgid "
Special rewards were sent to the top competing users. The ranking for this challenge is :" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,compute_code:0 +msgid "Python Code" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Rewards for challenges" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Send Report" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Period" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,name:0 +msgid "Challenge Name" +msgstr "" + +#. module: gamification +#: model:ir.ui.menu,name:gamification.gamification_menu +msgid "Gamification Tools" +msgstr "" + +#. module: gamification +#: field:gamification.badge,goal_definition_ids:0 +msgid "Rewarded by" +msgstr "" + +#. module: gamification +#: field:gamification.badge,remaining_sending:0 +msgid "Remaining Sending Allowed" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,state:0 +msgid "Done" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,visibility_mode:0 +#: field:gamification.goal,definition_display:0 +msgid "Display Mode" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +#: view:gamification.goal.wizard:0 +msgid "Cancel" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "There is no reward upon completion of this challenge." +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,monetary:0 +msgid "The target and current value are defined in the company currency." +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,condition:0 +msgid "The higher the better" +msgstr "" + +#. module: gamification +#: model:gamification.goal.definition,name:gamification.definition_base_company_logo +msgid "Set your Company Logo" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,state:0 +msgid "In Progress" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Goal Reached" +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_my:0 +msgid "The number of time the current user has received this badge." +msgstr "" + +#. module: gamification +#: help:gamification.challenge,report_message_group_id:0 +msgid "Group that will receive a copy of the report in addition to the user" +msgstr "" + +#. module: gamification +#: field:gamification.goal,target_goal:0 +msgid "To Reach" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,res_id_field:0 +msgid "The field name on the user profile (res.users) containing the value for res_id for action." +msgstr "" + +#. module: gamification +#: help:gamification.goal,remind_update_delay:0 +msgid "The number of days after which the user assigned to a manual goal will be reminded. Never reminded if no value is specified." +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +msgid "Who would you like to reward?" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge.line,condition:0 +msgid "<=" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Configure Challenge" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,period:0 +#: selection:gamification.challenge,report_message_frequency:0 +msgid "Monthly" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,user_ids:0 +msgid "List of users participating to the challenge" +msgstr "" + +#. module: gamification +#: model:email.template,body_html:gamification.email_template_goal_reminder +msgid "
Reminder ${object.name}\n" +"

You have not updated your progress for the goal ${object.definition_id.name} (currently reached at ${object.completeness}%) for at least ${object.remind_update_delay} days. Do not forget to do it.

\n" +"\n" +"

If you have not changed your score yet, you can use the button \"The current value is up to date\" to indicate so.

" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +#: field:gamification.goal.wizard,current:0 +msgid "Current" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "To" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/badge.py:225 +#, python-format +msgid "You are not in the user allowed list." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "í" +msgstr "" + +#. module: gamification +#: field:gamification.badge,challenge_ids:0 +msgid "Reward of Challenges" +msgstr "" + +#. module: gamification +#: field:gamification.goal,definition_condition:0 +msgid "Definition Condition" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,autojoin_group_id:0 +msgid "Group of users whose members will be automatically added to user_ids once the challenge is started" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +#: model:ir.actions.act_window,name:gamification.goal_definition_list_action +#: model:ir.ui.menu,name:gamification.gamification_definition_menu +msgid "Goal Definitions" +msgstr "" + +#. module: gamification +#: model:gamification.badge,name:gamification.badge_hidden +msgid "Hidden" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: view:gamification.goal:0 +msgid "days" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,report_template_id:0 +msgid "Report Template" +msgstr "" + +#. module: gamification +#: field:gamification.badge,rule_auth:0 +msgid "Allowance to Grant" +msgstr "" + +#. module: gamification +#: selection:gamification.goal.definition,computation_mode:0 +msgid "Automatic: sum on a field" +msgstr "" + +#. module: gamification +#: model:gamification.challenge,name:gamification.challenge_base_discover +msgid "Complete your Profile" +msgstr "" + +#. module: gamification +#: field:gamification.badge,description:0 +#: field:gamification.challenge,description:0 +msgid "Description" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/badge.py:223 +#, python-format +msgid "This badge can not be sent by users." +msgstr "" + +#. module: gamification +#: model:email.template,body_html:gamification.email_template_badge_received +msgid "

Congratulation, you have received the badge ${object.badge_id.name} !\n" +" % if object.sender_id\n" +" This badge was granted by ${object.sender_id.name}.\n" +" % endif\n" +"

\n" +"\n" +" % if object.comment\n" +"

${object.comment}

\n" +" % endif\n" +" " +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_this_month:0 +msgid "Monthly total" +msgstr "" + +#. module: gamification +#: field:gamification.challenge,reward_third_id:0 +msgid "For 3rd user" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user.wizard:0 +msgid "Describe what they did and why it matters (will be public)" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/badge.py:227 +#, python-format +msgid "You do not have the required badges." +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "e.g. Monthly Sales Objectives" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,line_ids:0 +msgid "List of goals that will be set" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Badge List" +msgstr "" + +#. module: gamification +#: selection:gamification.challenge,visibility_mode:0 +msgid "Leader Board (Group Ranking)" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Reached when current value is" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/goal.py:351 +#, python-format +msgid "Can not modify the configuration of a started goal" +msgstr "" + +#. module: gamification +#: field:gamification.badge,unique_owner_ids:0 +msgid "Unique Owners" +msgstr "" + +#. module: gamification +#: code:addons/gamification/models/challenge.py:665 +#, python-format +msgid "The challenge %s is finished." +msgstr "" + +#. module: gamification +#: field:gamification.challenge,end_date:0 +#: view:gamification.goal:0 +#: field:gamification.goal,end_date:0 +msgid "End Date" +msgstr "" + +#. module: gamification +#: help:gamification.badge,owner_ids:0 +msgid "The list of instances of this badge granted to users" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Goal Failed" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,res_id_field:0 +msgid "ID Field of user" +msgstr "" + +#. module: gamification +#: field:gamification.challenge.line,name:0 +msgid "Name" +msgstr "" + +#. module: gamification +#. openerp-web +#: code:addons/gamification/static/src/xml/gamification.xml:105 +#, python-format +msgid "Invited Challenges" +msgstr "" + +#. module: gamification +#: view:gamification.goal:0 +msgid "Reset Completion" +msgstr "" + +#. module: gamification +#: help:gamification.goal.definition,domain:0 +msgid "Domain for filtering records. The rule can contain reference to 'user' that is a browse record of the current user, e.g. [('user_id', '=', user.id)]." +msgstr "" + +#. module: gamification +#: help:gamification.badge,stat_my_monthly_sending:0 +msgid "The number of time the current user has sent this badge this month." +msgstr "" + +#. module: gamification +#: help:gamification.goal,challenge_id:0 +msgid "Challenge that generated the goal, assign challenge to users to generate goals with a value in this field." +msgstr "" + +#. module: gamification +#: field:gamification.badge,rule_auth_user_ids:0 +msgid "Authorized Users" +msgstr "" + +#. module: gamification +#: model:ir.actions.act_window,help:gamification.goal_list_action +msgid "

\n" +" Click to create a goal. \n" +"

\n" +"

\n" +" A goal is defined by a user and a goal definition.\n" +" Goals can be created automatically by using challenges.\n" +"

\n" +" " +msgstr "" + +#. module: gamification +#: field:gamification.challenge,reward_failure:0 +msgid "Reward Bests if not Succeeded?" +msgstr "" + +#. module: gamification +#: field:gamification.goal.definition,field_id:0 +msgid "Field to Sum" +msgstr "" + +#. module: gamification +#: field:gamification.badge,message_summary:0 +#: field:gamification.challenge,message_summary:0 +#: field:gamification.goal,message_summary:0 +msgid "Summary" +msgstr "" + +#. module: gamification +#: model:gamification.badge,name:gamification.badge_good_job +msgid "Good Job" +msgstr "" + +#. module: gamification +#. openerp-web +#: code:addons/gamification/static/src/xml/gamification.xml:32 +#: code:addons/gamification/static/src/xml/gamification.xml:54 +#, python-format +msgid "Target:" +msgstr "" + +#. module: gamification +#: view:gamification.goal.wizard:0 +msgid "Set the current value you have reached for this goal" +msgstr "" + +#. module: gamification +#: selection:gamification.badge,rule_auth:0 +msgid "Everyone" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "How to compute the goal?" +msgstr "" + +#. module: gamification +#: view:gamification.goal.definition:0 +msgid "Search Goal Definitions" +msgstr "" + +#. module: gamification +#: model:gamification.goal.definition,name:gamification.definition_nbr_following +msgid "Mail Group Following" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "Accept" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "Grant this Badge" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +#: model:ir.actions.act_window,name:gamification.challenge_list_action +#: model:ir.ui.menu,name:gamification.gamification_challenge_menu +msgid "Challenges" +msgstr "" + +#. module: gamification +#: model:res.groups,name:gamification.group_goal_manager +msgid "Manager" +msgstr "" + +#. module: gamification +#: view:gamification.challenge:0 +msgid "HR Challenges" +msgstr "" + +#. module: gamification +#: field:gamification.goal,remind_update_delay:0 +msgid "Remind delay" +msgstr "" + +#. module: gamification +#: view:gamification.badge:0 +msgid "No monthly sending limit" +msgstr "" + +#. module: gamification +#: selection:gamification.goal,state:0 +msgid "Reached" +msgstr "" + +#. module: gamification +#: view:gamification.badge.user:0 +msgid "the" +msgstr "" + +#. module: gamification +#: field:gamification.badge,stat_count:0 +msgid "Total" +msgstr "" + +#. module: gamification +#: help:gamification.challenge,period:0 +msgid "Period of automatic goal assigment. If none is selected, should be launched manually." +msgstr "" + diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index ee4dcac5414..f60ee1a2a3f 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -369,10 +369,11 @@ class mail_thread(osv.AbstractModel): track_ctx = dict(context) if 'lang' not in track_ctx: track_ctx['lang'] = self.pool.get('res.users').browse(cr, uid, uid, context=context).lang - tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=track_ctx) - if tracked_fields: - initial_values = {thread_id: dict((item, False) for item in tracked_fields)} - self.message_track(cr, uid, [thread_id], tracked_fields, initial_values, context=track_ctx) + if not context.get('mail_notrack'): + tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=track_ctx) + if tracked_fields: + initial_values = {thread_id: dict((item, False) for item in tracked_fields)} + self.message_track(cr, uid, [thread_id], tracked_fields, initial_values, context=track_ctx) return thread_id def write(self, cr, uid, ids, values, context=None): @@ -393,7 +394,11 @@ class mail_thread(osv.AbstractModel): result = super(mail_thread, self).write(cr, uid, ids, values, context=context) self.message_auto_subscribe(cr, uid, ids, values.keys(), context=context, values=values) - # Perform the tracking + if not context.get('mail_notrack'): + # Perform the tracking + tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=context) + else: + tracked_fields = None if tracked_fields: self.message_track(cr, uid, ids, tracked_fields, initial_values, context=track_ctx) return result @@ -414,6 +419,9 @@ class mail_thread(osv.AbstractModel): return res def copy(self, cr, uid, id, default=None, context=None): + # avoid tracking multiple temporary changes during copy + context = dict(context or {}, mail_notrack=True) + default = default or {} default['message_ids'] = [] default['message_follower_ids'] = [] @@ -1549,18 +1557,23 @@ class mail_thread(osv.AbstractModel): """ Add partners to the records followers. """ if context is None: context = {} + # not necessary for computation, but saves an access right check + if not partner_ids: + return True mail_followers_obj = self.pool.get('mail.followers') subtype_obj = self.pool.get('mail.message.subtype') user_pid = self.pool.get('res.users').browse(cr, uid, uid, context=context).partner_id.id if set(partner_ids) == set([user_pid]): - if context.get('operation', '') != 'create': - try: - self.check_access_rights(cr, uid, 'read') + try: + self.check_access_rights(cr, uid, 'read') + if context.get('operation', '') == 'create': + self.check_access_rule(cr, uid, ids, 'create') + else: self.check_access_rule(cr, uid, ids, 'read') - except (osv.except_osv, orm.except_orm): - return False + except (osv.except_osv, orm.except_orm): + return False else: self.check_access_rights(cr, uid, 'write') self.check_access_rule(cr, uid, ids, 'write') @@ -1605,6 +1618,9 @@ class mail_thread(osv.AbstractModel): def message_unsubscribe(self, cr, uid, ids, partner_ids, context=None): """ Remove partners from the records followers. """ + # not necessary for computation, but saves an access right check + if not partner_ids: + return True user_pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0] if set(partner_ids) == set([user_pid]): self.check_access_rights(cr, uid, 'read') diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 938d6a01f6d..c103e4d4ab2 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -197,6 +197,7 @@ openerp_mail_followers = function(session, mail) { // clean and display title var node_user_list = this.$('.oe_follower_list').empty(); this.$('.oe_follower_title').html(this._format_followers(this.followers.length)); + self.message_is_follower = _.indexOf(this.followers.map(function (rec) { return rec[2]['is_uid']}), true) != -1; // truncate number of displayed followers var truncated = this.followers.slice(0, this.displayed_nb); _(truncated).each(function (record) { @@ -207,9 +208,6 @@ openerp_mail_followers = function(session, mail) { 'is_editable': record[2]['is_editable'], 'avatar_url': mail.ChatterUtils.get_image(self.session, 'res.partner', 'image_small', record[0]), } - if (partner.is_uid) { - self.message_is_follower = partner.is_uid; - } $(session.web.qweb.render('mail.followers.partner', {'record': partner, 'widget': self})).appendTo(node_user_list); // On mouse-enter it will show the edit_subtype pencil. if (partner.is_editable) { diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 3a7a5469ee1..9696fab789d 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -135,14 +135,14 @@ and - - + + - , others... + , others... <<< @@ -150,8 +150,8 @@ @@ -177,7 +177,7 @@

- +

@@ -263,11 +263,11 @@

- + - + : - +

@@ -283,8 +283,8 @@
- - + + updated document @@ -303,20 +303,20 @@ - - + + , - and more + and more notified - + @@ -333,7 +333,7 @@
show more message show one more message - show more messages + show more messages
@@ -353,7 +353,7 @@ --> - + 8 diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index a936b8237d6..6e8682cb533 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -43,13 +43,13 @@ - +
-
And more.
+
And more.
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 74aea3dfc01..2d09a925ca7 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -130,7 +130,7 @@ class mail_compose_message(osv.TransientModel): 'wizard_id', 'attachment_id', 'Attachments'), 'filter_id': fields.many2one('ir.filters', 'Filters'), } - + #TODO change same_thread to False in trunk (Require view update) _defaults = { 'composition_mode': 'comment', 'body': lambda self, cr, uid, ctx={}: '', @@ -268,6 +268,8 @@ class mail_compose_message(osv.TransientModel): 'mail.message', 0, context=context) mail_values['attachment_ids'] = m2m_attachment_ids + if not mail_values.get('reply_to'): + mail_values['reply_to'] = mail_values['email_from'] self.pool.get('mail.mail').create(cr, uid, mail_values, context=context) else: subtype = 'mail.mt_comment' @@ -321,10 +323,10 @@ class mail_compose_message(osv.TransientModel): if email_dict.get('email_from'): mail_values['email_from'] = email_dict.pop('email_from') # replies redirection: mass mailing only - if not wizard.same_thread: - mail_values['reply_to'] = email_dict.pop('reply_to', None) - else: + if wizard.same_thread and wizard.post: email_dict.pop('reply_to', None) + else: + mail_values['reply_to'] = email_dict.pop('reply_to', None) mail_values.update(email_dict) # mass mailing without post: mail_mail values if mass_mail_mode and not wizard.post: diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml index 948d9b3832c..23931649402 100644 --- a/addons/mail/wizard/mail_compose_message_view.xml +++ b/addons/mail/wizard/mail_compose_message_view.xml @@ -47,10 +47,10 @@ + attrs="{'invisible':['|', ('composition_mode', '!=', 'mass_mail'), ('post', '=', False)]}"/> + attrs="{'invisible':['|', '&', ('same_thread', '=', True), ('post', '=', True), ('composition_mode', '!=', 'mass_mail')], + 'required':['&', '|', ('post', '=', False), ('same_thread', '=', False), ('composition_mode', '=', 'mass_mail')]}"/>
diff --git a/addons/mass_mailing/mail_thread.py b/addons/mass_mailing/mail_thread.py index 0570596ba12..a4ff15a1a3f 100644 --- a/addons/mass_mailing/mail_thread.py +++ b/addons/mass_mailing/mail_thread.py @@ -48,6 +48,7 @@ class MailThread(osv.Model): if bounce_alias in email_to: bounce_match = tools.bounce_re.search(email_to) if bounce_match: + bounced_model, bounced_thread_id = None, False bounced_mail_id = bounce_match.group(1) stat_ids = self.pool['mail.mail.statistics'].set_bounced(cr, uid, mail_mail_ids=[bounced_mail_id], context=context) for stat in self.pool['mail.mail.statistics'].browse(cr, uid, stat_ids, context=context): @@ -55,7 +56,7 @@ class MailThread(osv.Model): bounced_thread_id = stat.res_id _logger.info('Routing mail from %s to %s with Message-Id %s: bounced mail from mail %s, model: %s, thread_id: %s', email_from, email_to, message_id, bounced_mail_id, bounced_model, bounced_thread_id) - if bounced_model and bounced_model in self.pool and hasattr(self.pool[bounced_model], 'message_receive_bounce'): + if bounced_model and bounced_model in self.pool and hasattr(self.pool[bounced_model], 'message_receive_bounce') and bounced_thread_id: self.pool[bounced_model].message_receive_bounce(cr, uid, [bounced_thread_id], mail_id=bounced_mail_id, context=context) return False diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index 5266147fef0..8b93e2a9bb6 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -111,9 +111,6 @@ class procurement_order(osv.osv): bom_result = production_obj.action_compute(cr, uid, [produce_id], properties=[x.id for x in procurement.property_ids]) production_obj.signal_button_confirm(cr, uid, [produce_id]) - if res_id: - move_obj.write(cr, uid, [res_id], - {'location_id': procurement.location_id.id}) self.production_order_create_note(cr, uid, ids, context=context) return res diff --git a/addons/pad/static/src/css/etherpad.css b/addons/pad/static/src/css/etherpad.css index facf15b28de..d8281ef4d48 100644 --- a/addons/pad/static/src/css/etherpad.css +++ b/addons/pad/static/src/css/etherpad.css @@ -13,13 +13,12 @@ border: solid 1px #ccc; border-radius:3px; text-align: center; - line-height: 22px; + line-height: 28px; overflow: hidden; -webkit-box-sizing: border-box; color: #666666; - padding-top:-3px; - padding-left:-1px; cursor: pointer; + font-size: 14px; } .oe_pad_switch:hover{ diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js index ba5ee3a3037..2d7f2c2737f 100644 --- a/addons/pad/static/src/js/pad.js +++ b/addons/pad/static/src/js/pad.js @@ -13,6 +13,8 @@ openerp.pad = function(instance) { this.switch_configured(); this.$('.oe_pad_switch').click(function() { self.$el.toggleClass('oe_pad_fullscreen'); + self.$el.find('.oe_pad_switch').toggleClass('fa-expand fa-compress'); + self.view.$el.find('.oe_chatter').toggle(); }); this.render_value(); }, diff --git a/addons/pad/static/src/xml/pad.xml b/addons/pad/static/src/xml/pad.xml index f915e867b35..5d2ab779ead 100644 --- a/addons/pad/static/src/xml/pad.xml +++ b/addons/pad/static/src/xml/pad.xml @@ -15,7 +15,7 @@
- &Ntilde; +
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 30fcff2e5e6..1f3564e3429 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -474,11 +474,12 @@ class pos_session(osv.osv): account_move_obj = self.pool.get('account.move') pos_order_obj = self.pool.get('pos.order') for session in self.browse(cr, uid, ids, context=context): + local_context = dict(context or {}, force_company=session.config_id.journal_id.company_id.id) order_ids = [order.id for order in session.order_ids if order.state == 'paid'] - move_id = account_move_obj.create(cr, uid, {'ref' : session.name, 'journal_id' : session.config_id.journal_id.id, }, context=context) + move_id = account_move_obj.create(cr, uid, {'ref' : session.name, 'journal_id' : session.config_id.journal_id.id, }, context=local_context) - pos_order_obj._create_account_move_line(cr, uid, order_ids, session, move_id, context=context) + pos_order_obj._create_account_move_line(cr, uid, order_ids, session, move_id, context=local_context) for order in session.order_ids: if order.state not in ('paid', 'invoiced'): @@ -948,22 +949,16 @@ class pos_order(osv.osv): # Tricky, via the workflow, we only have one id in the ids variable """Create a account move line of order grouped by products or not.""" account_move_obj = self.pool.get('account.move') - account_move_line_obj = self.pool.get('account.move.line') account_period_obj = self.pool.get('account.period') account_tax_obj = self.pool.get('account.tax') - user_proxy = self.pool.get('res.users') property_obj = self.pool.get('ir.property') cur_obj = self.pool.get('res.currency') - period = account_period_obj.find(cr, uid, context=context)[0] - #session_ids = set(order.session_id for order in self.browse(cr, uid, ids, context=context)) if session and not all(session.id == order.session_id.id for order in self.browse(cr, uid, ids, context=context)): raise osv.except_osv(_('Error!'), _('Selected orders do not have the same session!')) - current_company = user_proxy.browse(cr, uid, uid, context=context).company_id - grouped_data = {} have_to_group_by = session and session.config_id.group_by or False @@ -983,7 +978,7 @@ class pos_order(osv.osv): if order.state != 'paid': continue - user_company = user_proxy.browse(cr, order.user_id.id, order.user_id.id).company_id + current_company = order.sale_journal.company_id group_tax = {} account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context) @@ -1004,6 +999,7 @@ class pos_order(osv.osv): # if have_to_group_by: sale_journal_id = order.sale_journal.id + period = account_period_obj.find(cr, uid, context=dict(context or {}, company_id=current_company.id))[0] # 'quantity': line.qty, # 'product_id': line.product_id.id, @@ -1013,7 +1009,7 @@ class pos_order(osv.osv): 'journal_id' : sale_journal_id, 'period_id' : period, 'move_id' : move_id, - 'company_id': user_company and user_company.id or False, + 'company_id': current_company.id, }) if data_type == 'product': @@ -1054,7 +1050,10 @@ class pos_order(osv.osv): cur = order.pricelist_id.currency_id for line in order.lines: tax_amount = 0 - taxes = [t for t in line.product_id.taxes_id] + taxes = [] + for t in line.product_id.taxes_id: + if t.company_id.id == current_company.id: + taxes.append(t) computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit * (100.0-line.discount) / 100.0, line.qty)['taxes'] for tax in computed_taxes: diff --git a/addons/point_of_sale/report/pos_details_summary.py b/addons/point_of_sale/report/pos_details_summary.py index a4facaabcac..d6600926bd6 100644 --- a/addons/point_of_sale/report/pos_details_summary.py +++ b/addons/point_of_sale/report/pos_details_summary.py @@ -99,13 +99,10 @@ class pos_details_summary(report_sxw.rml_parse): def _get_tax_amount(self, objects): res = {} - list_ids = [] for order in objects: for line in order.lines: - if len(line.product_id.taxes_id): - tax = line.product_id.taxes_id[0] - res[tax.name] = (line.price_unit * line.qty * (1-(line.discount or 0.0) / 100.0)) + (tax.id in list_ids and res[tax.name] or 0) - list_ids.append(tax.id) + for tax in line.product_id.taxes_id: + res[tax.name] = res.setdefault(tax.name, 0.0) + (line.price_subtotal_incl - line.price_subtotal) return res def _get_sales_total(self, objects): diff --git a/addons/point_of_sale/report/pos_details_summary.rml b/addons/point_of_sale/report/pos_details_summary.rml index b1c71db7d40..6564f821010 100644 --- a/addons/point_of_sale/report/pos_details_summary.rml +++ b/addons/point_of_sale/report/pos_details_summary.rml @@ -232,7 +232,7 @@ - [[ t[0] ]] + [[ t[0].name ]] [[ formatLang(t[1], currency_obj=company.currency_id) ]] diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 279f921f6c9..65c4311f34a 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -244,13 +244,15 @@ class product_pricelist(osv.osv): for seller in product.seller_ids: if (not partner) or (seller.name.id<>partner): continue - product_default_uom = product.uom_id.id + qty_in_seller_uom = qty + from_uom = context.get('uom') or product.uom_id.id seller_uom = seller.product_uom and seller.product_uom.id or False - if seller_uom and product_default_uom and product_default_uom != seller_uom: + if seller_uom and from_uom and from_uom != seller_uom: + qty_in_seller_uom = product_uom_obj._compute_qty(cr, uid, from_uom, qty, to_uom_id=seller_uom) + else: uom_price_already_computed = True - qty = product_uom_obj._compute_qty(cr, uid, product_default_uom, qty, to_uom_id=seller_uom) for line in seller.pricelist_ids: - if line.min_quantity <= qty: + if line.min_quantity <= qty_in_seller_uom: price = line.price else: @@ -277,7 +279,6 @@ class product_pricelist(osv.osv): if price: if 'uom' in context and not uom_price_already_computed: - product = products_dict[product.id] uom = product.uos_id or product.uom_id price = product_uom_obj._compute_price(cr, uid, uom.id, price, context['uom']) diff --git a/addons/project/project.py b/addons/project/project.py index f03a4242de3..e5dcf5de2cf 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -358,6 +358,11 @@ class project(osv.osv): default['state'] = 'open' default['line_ids'] = [] default['tasks'] = [] + + # Don't prepare (expensive) data to copy children (analytic accounts), + # they are discarded in analytic.copy(), and handled in duplicate_template() + default['child_ids'] = [] + proj = self.browse(cr, uid, id, context=context) if not default.get('name', False): default.update(name=_("%s (copy)") % (proj.name)) @@ -690,23 +695,13 @@ class task(osv.osv): return {'value': vals} def duplicate_task(self, cr, uid, map_ids, context=None): - for new in map_ids.values(): - task = self.browse(cr, uid, new, context) - child_ids = [ ch.id for ch in task.child_ids] - if task.child_ids: - for child in task.child_ids: - if child.id in map_ids.keys(): - child_ids.remove(child.id) - child_ids.append(map_ids[child.id]) - - parent_ids = [ ch.id for ch in task.parent_ids] - if task.parent_ids: - for parent in task.parent_ids: - if parent.id in map_ids.keys(): - parent_ids.remove(parent.id) - parent_ids.append(map_ids[parent.id]) - #FIXME why there is already the copy and the old one - self.write(cr, uid, new, {'parent_ids':[(6,0,set(parent_ids))], 'child_ids':[(6,0, set(child_ids))]}) + mapper = lambda t: map_ids.get(t.id, t.id) + for task in self.browse(cr, uid, map_ids.values(), context): + new_child_ids = set(map(mapper, task.child_ids)) + new_parent_ids = set(map(mapper, task.parent_ids)) + if new_child_ids or new_parent_ids: + task.write({'parent_ids': [(6,0,list(new_parent_ids))], + 'child_ids': [(6,0,list(new_child_ids))]}) def copy_data(self, cr, uid, id, default=None, context=None): if default is None: diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index e40d219ef10..4fa0e760df1 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -176,7 +176,7 @@