From 7841bac687c98d29efa3b2529e44d0631f3d101a Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Mon, 29 Apr 2013 11:08:51 +0530 Subject: [PATCH 01/31] [IMP] Improved typo in Warning bzr revid: ggh@tinyerp.com-20130429053851-ipatcoxtjwrwfijk --- addons/account/account_invoice.py | 2 +- addons/account/wizard/account_validate_account_move.py | 2 +- addons/analytic/analytic.py | 2 +- addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 2 +- addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +- addons/point_of_sale/point_of_sale.py | 2 +- addons/stock/wizard/stock_partial_picking.py | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index c47cf70b673..dd016dd8ef0 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -600,7 +600,7 @@ class account_invoice(osv.osv): obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error!'), - _('Invoice line account\'s company and invoice\'s compnay does not match.')) + _('Invoice line account\'s company and invoice\'s company does not match.')) else: continue if company_id and type: diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py index 324248284f1..050191db187 100644 --- a/addons/account/wizard/account_validate_account_move.py +++ b/addons/account/wizard/account_validate_account_move.py @@ -57,7 +57,7 @@ class validate_account_move_lines(osv.osv_memory): move_ids.append(line.move_id.id) move_ids = list(set(move_ids)) if not move_ids: - raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.')) + raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move entries in draft state.')) obj_move.button_validate(cr, uid, move_ids, context) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index ac298713b04..ce79c4d5ffb 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -157,7 +157,7 @@ class account_analytic_account(osv.osv): for account in self.browse(cr, uid, ids, context=context): if account.company_id: if account.company_id.currency_id.id != value: - raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example.")) + raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really useful for consolidation purposes of several companies charts with different currencies, for example.")) if value: return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, )) diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py index 29a1a1508a4..a6c642ea789 100644 --- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py +++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py @@ -65,7 +65,7 @@ class partner_vat(osv.osv_memory): partners = [] partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context) if not partner_ids: - raise osv.except_osv(_('Error'),_('No belgian contact with a VAT number in your database.')) + raise osv.except_osv(_('Error'),_('No belgium contact with a VAT number in your database.')) cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover FROM account_move_line l diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index 703ab9db59b..fa298ca5124 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -120,7 +120,7 @@ class partner_vat_intra(osv.osv_memory): p_id_list = obj_partner.search(cr, uid, [('vat','!=',False)], context=context) if not p_id_list: - raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number asociated with him.')) + raise osv.except_osv(_('Insufficient Data!'),_('No partner has a VAT number associated with him.')) seq_declarantnum = obj_sequence.get(cr, uid, 'declarantnum') dnum = company_vat[2:] + seq_declarantnum[-4:] diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 349ad8b4f81..a4f2a30387a 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -407,7 +407,7 @@ class pos_session(osv.osv): # The pos manager can close statements with maximums. if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"): raise osv.except_osv( _('Error!'), - _("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff)) + _("Your ending balance is too different from the theoretical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff)) if (st.journal_id.type not in ['bank', 'cash']): raise osv.except_osv(_('Error!'), _("The type of the journal for your payment method should be bank or cash ")) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 47599d5f99e..46e5223e43a 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -178,7 +178,7 @@ class stock_partial_picking(osv.osv_memory): if line_uom.factor and line_uom.factor <> 0: if float_compare(qty_in_line_uom, wizard_line.quantity, precision_rounding=line_uom.rounding) != 0: - raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name)) + raise osv.except_osv(_('Warning!'), _('The unit of measure rounding does not allow you to ship "%s %s", only rounding of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name)) if move_id: #Check rounding Quantity.ex. #picking: 1kg, uom kg rounding = 0.01 (rounding to 10g), @@ -189,7 +189,7 @@ class stock_partial_picking(osv.osv_memory): qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id) without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor if float_compare(qty_in_initial_uom, without_rounding_qty, precision_rounding=initial_uom.rounding) != 0: - raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name)) + raise osv.except_osv(_('Warning!'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only rounding of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name)) else: seq_obj_name = 'stock.picking.' + picking_type move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name), From 1cdda962840b48d4e63a68c5ee8ec8313e7eca59 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Mon, 29 Apr 2013 11:22:49 +0530 Subject: [PATCH 02/31] [IMP] Improved Capitalize title bzr revid: ggh@tinyerp.com-20130429055249-7wwd6zwek1pddlhl --- addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 2 +- addons/l10n_be/wizard/l10n_be_partner_vat_listing.py | 4 ++-- addons/l10n_be/wizard/l10n_be_vat_intra.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py index b74cfa21b8a..0576e1d5f8f 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -84,7 +84,7 @@ class l10n_be_vat_declaration(osv.osv_memory): obj_company = obj_user.browse(cr, uid, uid, context=context).company_id vat_no = obj_company.partner_id.vat if not vat_no: - raise osv.except_osv(_('insufficient data!'), _('No VAT number associated with your company.')) + raise osv.except_osv(_('Insufficient Data!'), _('No VAT number associated with your company.')) vat_no = vat_no.replace(' ','').upper() vat = vat_no[2:] diff --git a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py index a6c642ea789..0ffa0c16a24 100644 --- a/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py +++ b/addons/l10n_be/wizard/l10n_be_partner_vat_listing.py @@ -60,7 +60,7 @@ class partner_vat(osv.osv_memory): company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id period_ids = obj_period.search(cr, uid, [('date_start' ,'>=', date_start), ('date_stop','<=',date_stop), ('company_id','=',company_id)]) if not period_ids: - raise osv.except_osv(_('insufficient data!'), _('No data for the selected year.')) + raise osv.except_osv(_('Insufficient Data!'), _('No data for the selected year.')) partners = [] partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context) @@ -90,7 +90,7 @@ class partner_vat(osv.osv_memory): partners.append(id_client) if not partners: - raise osv.except_osv(_('insufficient data!'), _('No data found for the selected year.')) + raise osv.except_osv(_('Insufficient Data!'), _('No data found for the selected year.')) context.update({'partner_ids': partners, 'year': data['year'], 'limit_amount': data['limit_amount']}) model_data_ids = obj_model_data.search(cr, uid, [('model','=','ir.ui.view'), ('name','=','view_vat_listing')]) resource_id = obj_model_data.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id'] diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py index fa298ca5124..a572c3b83b4 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra.py +++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py @@ -108,7 +108,7 @@ class partner_vat_intra(osv.osv_memory): # Get Company vat company_vat = data_company.partner_id.vat if not company_vat: - raise osv.except_osv(_('insufficient data!'),_('No VAT number associated with your company.')) + raise osv.except_osv(_('Insufficient Data!'),_('No VAT number associated with your company.')) company_vat = company_vat.replace(' ','').upper() issued_by = company_vat[:2] From 3b73e2b2a48f0e9b48256f97fa361156f58756c4 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Mon, 29 Apr 2013 12:45:57 +0530 Subject: [PATCH 03/31] [IMP]Removed space before Exclamation marks [!] bzr revid: ggh@tinyerp.com-20130429071557-vnxo5nni03vc886j --- addons/account/account.py | 12 ++++++------ addons/account/account_bank_statement.py | 2 +- addons/account/account_cash_statement.py | 2 +- addons/account/account_invoice.py | 10 +++++----- addons/account/account_move_line.py | 6 +++--- addons/account/installer.py | 2 +- .../account_analytic_analysis.py | 2 +- .../account_analytic_plans.py | 4 ++-- addons/account_voucher/account_voucher.py | 2 +- .../analytic_user_function.py | 4 ++-- addons/anonymization/anonymization.py | 10 +++++----- addons/base_status/base_state.py | 2 +- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- addons/delivery/sale.py | 4 ++-- .../hr_attendance/wizard/hr_attendance_error.py | 2 +- .../wizard/hr_payroll_payslips_by_employees.py | 2 +- .../hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +- addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 8 ++++---- addons/l10n_lu/wizard/print_vat.py | 2 +- addons/mrp_operations/mrp_operations.py | 4 ++-- addons/mrp_repair/mrp_repair.py | 4 ++-- addons/point_of_sale/point_of_sale.py | 4 ++-- .../point_of_sale/wizard/pos_open_statement.py | 2 +- addons/procurement/procurement.py | 2 +- addons/project/project.py | 4 ++-- addons/project_gtd/wizard/project_gtd_empty.py | 2 +- addons/project_timesheet/project_timesheet.py | 10 +++++----- addons/sale/sale.py | 4 ++-- addons/sale_crm/wizard/crm_make_sale.py | 2 +- addons/stock/stock.py | 4 ++-- addons/subscription/subscription.py | 4 ++-- addons/warning/warning.py | 16 ++++++++-------- 32 files changed, 71 insertions(+), 71 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3959799f1bb..cca3db63d29 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -648,10 +648,10 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): #Check for 'Closed' type if old_type == 'closed' and new_type !='closed': - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!")) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!")) # Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does) if (new_type in restricted_groups): - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,)) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,)) return True @@ -1015,14 +1015,14 @@ class account_period(osv.osv): if not result: result = self.search(cr, uid, args, context=context) if not result: - raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) + raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) return result def action_draft(self, cr, uid, ids, *args): mode = 'draft' for period in self.browse(cr, uid, ids): if period.fiscalyear_id.state == 'done': - raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year')) + raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year')) cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),)) cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),)) return True @@ -2307,7 +2307,7 @@ class account_model(osv.osv): try: entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')} except: - raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !')) + raise osv.except_osv(_('Wrong model!'), _('You have a wrong expression "%(...)s" in your model !')) move_id = account_move_obj.create(cr, uid, { 'ref': entry['name'], 'period_id': period_id, @@ -2319,7 +2319,7 @@ class account_model(osv.osv): analytic_account_id = False if line.analytic_account_id: if not model.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,)) analytic_account_id = line.analytic_account_id.id val = { 'move_id': move_id, diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 023765d73f0..8a15321b9c6 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -420,7 +420,7 @@ class account_bank_statement(osv.osv): for st_line in st.line_ids: if st_line.analytic_account_id: if not st.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,)) if not st_line.amount: continue st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 40f0ca80738..8e3e250d41c 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -252,7 +252,7 @@ class account_cash_statement(osv.osv): for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} if not self._user_allow(cr, uid, statement.id, context=context): - raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) + raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, ))) if statement.name and statement.name == '/': c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id} diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index dd016dd8ef0..2a530da30d9 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -69,7 +69,7 @@ class account_invoice(osv.osv): tt = type2journal.get(type_inv, 'sale') result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context) if not result: - raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,)) return result[0] def _get_type(self, cr, uid, context=None): @@ -736,7 +736,7 @@ class account_invoice(osv.osv): else: ref = self._convert_ref(cr, uid, inv.number) if not inv.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,)) il['analytic_lines'] = [(0,0, { 'name': il['name'], 'date': inv['date_invoice'], @@ -861,7 +861,7 @@ class account_invoice(osv.osv): if not inv.journal_id.sequence_id: raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.')) if not inv.invoice_line: - raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) + raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.')) if inv.move_id: continue @@ -882,7 +882,7 @@ class account_invoice(osv.osv): group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context) if group_check_total and uid in [x.id for x in group_check_total.users]: if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)): - raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.')) + raise osv.except_osv(_('Bad total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.')) if inv.payment_term: total_fixed = total_percent = 0 @@ -1423,7 +1423,7 @@ class account_invoice_line(osv.osv): context = dict(context) context.update({'company_id': company_id, 'force_company': company_id}) if not partner_id: - raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) + raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") ) if not product: if type in ('in_invoice', 'in_refund'): return {'value': {}, 'domain':{'product_uom':[]}} diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 006e2c55f5f..a7d32cc53f9 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -192,7 +192,7 @@ class account_move_line(osv.osv): for obj_line in self.browse(cr, uid, ids, context=context): if obj_line.analytic_account_id: if not obj_line.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, )) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, )) vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context) acc_ana_line_obj.create(cr, uid, vals_line) return True @@ -1101,7 +1101,7 @@ class account_move_line(osv.osv): period = period_obj.browse(cr, uid, period_id, context=context) for (state,) in result: if state == 'done': - raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name))) + raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name))) if not result: jour_period_obj.create(cr, uid, { 'name': (journal.code or journal.name)+':'+(period.name or ''), @@ -1181,7 +1181,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No piece number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) diff --git a/addons/account/installer.py b/addons/account/installer.py index 537371d0f64..fc1161db29b 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -111,7 +111,7 @@ class account_installer(osv.osv_memory): def check_unconfigured_cmp(self, cr, uid, context=None): """ check if there are still unconfigured companies """ if not self.get_unconfigured_cmp(cr, uid, context=context): - raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) + raise osv.except_osv(_('No unconfigured company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): if context is None: context = {} diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 33ab3be209c..c318bbc3363 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -641,7 +641,7 @@ class account_analytic_account(osv.osv): fpos_obj = self.pool.get('account.fiscal.position') if not contract.partner_id: - raise osv.except_osv(_('No Customer Defined !'),_("You must first select a Customer for Contract %s!") % contract.name ) + raise osv.except_osv(_('No Customer Defined!'),_("You must first select a Customer for Contract %s!") % contract.name ) fpos = contract.partner_id.property_account_position.id or False journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', contract.company_id.id or False)], limit=1) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index 54b15ad565b..4cf12098fff 100644 --- a/addons/account_analytic_plans/account_analytic_plans.py +++ b/addons/account_analytic_plans/account_analytic_plans.py @@ -332,7 +332,7 @@ class account_move_line(osv.osv): for line in self.browse(cr, uid, ids, context=context): if line.analytics_id: if not line.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (line.journal_id.name,)) toremove = analytic_line_obj.search(cr, uid, [('move_id','=',line.id)], context=context) if toremove: @@ -471,7 +471,7 @@ class account_bank_statement(osv.osv): for st_line in st.line_ids: if st_line.analytics_id: if not st.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal.") % (st.journal_id.name,)) if not st_line.amount: continue return True diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index b176c3b8fd9..52d44e84d48 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -965,7 +965,7 @@ class account_voucher(osv.osv): name = voucher_brw.number elif voucher_brw.journal_id.sequence_id: if not voucher_brw.journal_id.sequence_id.active: - raise osv.except_osv(_('Configuration Error !'), + 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}) diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 0573292c1f6..1adefb2d59d 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -104,7 +104,7 @@ class hr_analytic_timesheet(osv.osv): a = r.product_id.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error!'), - _('There is no expense account define ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) # Compute based on pricetype @@ -133,7 +133,7 @@ class hr_analytic_timesheet(osv.osv): a = r.product_id.categ_id.property_account_expense_categ.id if not a: raise osv.except_osv(_('Error!'), - _('There is no expense account define ' \ + _('There is no expense account defined ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) # Compute based on pricetype diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 025f1f79f70..a79305ea5b7 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -86,11 +86,11 @@ class ir_model_fields_anonymization(osv.osv): if context.get('manual'): global_state = self._get_global_state(cr, uid, context=context) if global_state == 'anonymized': - raise osv.except_osv('Error !', "The database is currently anonymized, you cannot create, modify or delete fields.") + raise osv.except_osv('Error!', "The database is currently anonymized, you cannot create, modify or delete fields.") elif global_state == 'unstable': msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) return True @@ -357,7 +357,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): else: msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to do anything else.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) res['arch'] = etree.tostring(eview) @@ -521,11 +521,11 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # check that all the defined fields are in the 'anonymized' state state = ir_model_fields_anonymization_model._get_global_state(cr, uid, context=context) if state == 'clear': - raise osv.except_osv_('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.") + raise osv.except_osv_('Error!', "The database is not currently anonymized, you cannot reverse the anonymization.") elif state == 'unstable': msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) wizards = self.browse(cr, uid, ids, context=context) for wizard in wizards: diff --git a/addons/base_status/base_state.py b/addons/base_status/base_state.py index b856bbd74ad..3fe59ecbd21 100644 --- a/addons/base_status/base_state.py +++ b/addons/base_status/base_state.py @@ -104,7 +104,7 @@ class base_state(object): if parent_id.change_responsible and parent_id.user_id: data['user_id'] = parent_id.user_id.id else: - raise osv.except_osv(_('Error !'), _('You can not escalate, you are already at the top level regarding your sales-team category.')) + raise osv.except_osv(_('Error!'), _('You can not escalate, you are already at the top level regarding your sales-team category.')) self.write(cr, uid, [case.id], data, context=context) case.case_escalate_send_note(parent_id, context=context) return True diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index e67b7c0c7be..3c847ade42a 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -86,7 +86,7 @@ class crm_lead2opportunity_partner(osv.osv_memory): lead_obj = self.pool.get('crm.lead') for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context): if lead.state in ['done', 'cancel']: - raise osv.except_osv(_("Warning !"), _("Closed/Cancelled leads cannot be converted into opportunities.")) + raise osv.except_osv(_("Warning!"), _("Closed/Cancelled leads cannot be converted into opportunities.")) return False def _convert_opportunity(self, cr, uid, ids, vals, context=None): diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py index 86a518ebca9..de7411bec67 100644 --- a/addons/delivery/sale.py +++ b/addons/delivery/sale.py @@ -51,10 +51,10 @@ class sale_order(osv.osv): for order in self.browse(cr, uid, ids, context=context): grid_id = carrier_obj.grid_get(cr, uid, [order.carrier_id.id], order.partner_shipping_id.id) if not grid_id: - raise osv.except_osv(_('No grid available !'), _('No grid matching for this carrier !')) + raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!')) if not order.state in ('draft'): - raise osv.except_osv(_('Order not in draft state !'), _('The order state have to be draft to add delivery lines.')) + raise osv.except_osv(_('Order Not In Draft State!'), _('The order state have to be draft to add delivery lines.')) grid = grid_obj.browse(cr, uid, grid_id, context=context) diff --git a/addons/hr_attendance/wizard/hr_attendance_error.py b/addons/hr_attendance/wizard/hr_attendance_error.py index 137bac30215..82d75149428 100644 --- a/addons/hr_attendance/wizard/hr_attendance_error.py +++ b/addons/hr_attendance/wizard/hr_attendance_error.py @@ -46,7 +46,7 @@ class hr_attendance_error(osv.osv_memory): cr.execute("SELECT id FROM hr_attendance WHERE employee_id IN %s AND to_char(name,'YYYY-mm-dd')<=%s AND to_char(name,'YYYY-mm-dd')>=%s AND action IN %s ORDER BY name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out']))) attendance_ids = [x[0] for x in cr.fetchall()] if not attendance_ids: - raise osv.except_osv(_('No Data Available !'), _('No records are found for your selection!')) + raise osv.except_osv(_('No Data Available!'), _('No records are found for your selection!')) attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context) for rec in attendance_records: diff --git a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py index 5837472be5f..3bf8b339300 100644 --- a/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py +++ b/addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py @@ -49,7 +49,7 @@ class hr_payslip_employees(osv.osv_memory): to_date = run_data.get('date_end', False) credit_note = run_data.get('credit_note', False) if not data['employee_ids']: - raise osv.except_osv(_("Warning !"), _("You must select employee(s) to generate payslip(s).")) + raise osv.except_osv(_("Warning!"), _("You must select employee(s) to generate payslip(s).")) for emp in emp_pool.browse(cr, uid, data['employee_ids'], context=context): slip_data = slip_pool.onchange_employee_id(cr, uid, [], from_date, to_date, emp.id, contract_id=False, context=context) res = { diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index f8c27bded5e..4e2e7911094 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -181,7 +181,7 @@ class account_analytic_line(osv.osv): for account in analytic_account_obj.browse(cr, uid, list(account_ids), context=context): partner = account.partner_id if (not partner) or not (account.pricelist_id): - raise osv.except_osv(_('Analytic Account incomplete !'), + raise osv.except_osv(_('Analytic Account incomplete!'), _('Contract incomplete. Please fill in the Customer and Pricelist fields.')) date_due = False diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index 348bb71c95e..fc715ece5b8 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -103,7 +103,7 @@ class payroll_advice(osv.osv): slip_ids = payslip_pool.search(cr, uid, [('date_from', '<=', advice.date), ('date_to', '>=', advice.date), ('state', '=', 'done')], context=context) for slip in payslip_pool.browse(cr, uid, slip_ids, context=context): if not slip.employee_id.bank_account_id and not slip.employee_id.bank_account_id.acc_number: - raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name)) + raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name)) line_ids = payslip_line_pool.search(cr, uid, [ ('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context) if line_ids: line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0] @@ -129,7 +129,7 @@ class payroll_advice(osv.osv): seq_obj = self.pool.get('ir.sequence') for advice in self.browse(cr, uid, ids, context=context): if not advice.line_ids: - raise osv.except_osv(_('Error !'), _('You can not confirm Payment advice without advice lines.')) + raise osv.except_osv(_('Error!'), _('You can not confirm Payment advice without advice lines.')) advice_date = datetime.strptime(advice.date, DATETIME_FORMAT) advice_year = advice_date.strftime('%m') + '-' + advice_date.strftime('%Y') number = seq_obj.get(cr, uid, 'payment.advice') @@ -183,7 +183,7 @@ class hr_payslip_run(osv.osv): users = self.pool.get('res.users').browse(cr, uid, [uid], context=context) for run in self.browse(cr, uid, ids, context=context): if run.available_advice: - raise osv.except_osv(_('Error !'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name)) + raise osv.except_osv(_('Error!'), _("Payment advice already exists for %s, 'Set to Draft' to create a new advice.") %(run.name)) advice_data = { 'batch_id': run.id, 'company_id': users[0].company_id.id, @@ -201,7 +201,7 @@ class hr_payslip_run(osv.osv): for slip in payslip_pool.browse(cr, uid, slip_ids, context=context): if not slip.employee_id.bank_account_id or not slip.employee_id.bank_account_id.acc_number: - raise osv.except_osv(_('Error !'), _('Please define bank account for the %s employee') % (slip.employee_id.name)) + raise osv.except_osv(_('Error!'), _('Please define bank account for the %s employee') % (slip.employee_id.name)) line_ids = payslip_line_pool.search(cr, uid, [('slip_id', '=', slip.id), ('code', '=', 'NET')], context=context) if line_ids: line = payslip_line_pool.browse(cr, uid, line_ids, context=context)[0] diff --git a/addons/l10n_lu/wizard/print_vat.py b/addons/l10n_lu/wizard/print_vat.py index bfa058720d3..74b8a80b1c8 100644 --- a/addons/l10n_lu/wizard/print_vat.py +++ b/addons/l10n_lu/wizard/print_vat.py @@ -64,7 +64,7 @@ class report_custom(report_int): self.obj.render() return (self.obj.pdf, 'pdf') except Exception: - raise osv.except_osv(_('pdf not created !'), _('Please check if package pdftk is installed!')) + raise osv.except_osv(_('pdf not created!'), _('Please check if package pdftk is installed!')) report_custom('report.l10n_lu.tax.report.print') diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index d6f026530dc..87861ba8fc6 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -128,7 +128,7 @@ class mrp_production_workcenter_line(osv.osv): elif prod_obj.state =='in_production': return else: - raise osv.except_osv(_('Error!'),_('Manufacturing order cannot start in state "%s"!') % (prod_obj.state,)) + raise osv.except_osv(_('Error!'),_('Manufacturing order cannot be started in state "%s"!') % (prod_obj.state,)) else: oper_ids = self.search(cr,uid,[('production_id','=',prod_obj.id)]) obj = self.browse(cr,uid,oper_ids) @@ -443,7 +443,7 @@ class mrp_operations_operation(osv.osv): if not oper_objs: if code.start_stop!='start': - raise osv.except_osv(_('Sorry!'),_('Operation is not started yet !')) + raise osv.except_osv(_('Sorry!'),_('Operation is not started yet!')) return False else: for oper in oper_objs: diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 43ee34b0c05..f7b082db74b 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -365,7 +365,7 @@ class mrp_repair(osv.osv): if repair.state in ('draft','cancel') or repair.invoice_id: continue if not (repair.partner_id.id and repair.partner_invoice_id.id): - raise osv.except_osv(_('No partner !'),_('You have to select a Partner Invoice Address in the repair form !')) + raise osv.except_osv(_('No partner!'),_('You have to select a Partner Invoice Address in the repair form!')) comment = repair.quotation_notes if (repair.invoice_method != 'none'): if group and repair.partner_invoice_id.id in invoices_group: @@ -582,7 +582,7 @@ class ProductChangeMixin(object): result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id or False if not pricelist: warning = { - 'title':'No Pricelist !', + 'title':'No Pricelist!', 'message': 'You have to select a pricelist in the Repair form !\n' 'Please set one before choosing a product.' diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index a4f2a30387a..089c577e940 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -545,7 +545,7 @@ class pos_order(osv.osv): def unlink(self, cr, uid, ids, context=None): for rec in self.browse(cr, uid, ids, context=context): if rec.state not in ('draft','cancel'): - raise osv.except_osv(_('Unable to Delete !'), _('In order to delete a sale, it must be new or cancelled.')) + raise osv.except_osv(_('Unable to Delete!'), _('In order to delete a sale, it must be new or cancelled.')) return super(pos_order, self).unlink(cr, uid, ids, context=context) def onchange_partner_id(self, cr, uid, ids, part=False, context=None): @@ -1163,7 +1163,7 @@ class pos_order_line(osv.osv): if not product_id: return {} if not pricelist: - raise osv.except_osv(_('No Pricelist !'), + raise osv.except_osv(_('No Pricelist!'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py index 97ffad805b7..30e407d2ad0 100644 --- a/addons/point_of_sale/wizard/pos_open_statement.py +++ b/addons/point_of_sale/wizard/pos_open_statement.py @@ -46,7 +46,7 @@ class pos_open_statement(osv.osv_memory): st_ids = [] j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context) if not j_ids: - raise osv.except_osv(_('No Cash Register Defined !'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".')) + raise osv.except_osv(_('No Cash Register Defined!'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".')) for journal in journal_obj.browse(cr, uid, j_ids, context=context): ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 672859db909..93b9417bded 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -307,7 +307,7 @@ class procurement_order(osv.osv): move_obj = self.pool.get('stock.move') for procurement in self.browse(cr, uid, ids, context=context): if procurement.product_qty <= 0.00: - raise osv.except_osv(_('Data Insufficient !'), + raise osv.except_osv(_('Data Insufficient!'), _('Please check the quantity in procurement order(s) for the product "%s", it should not be 0 or less!' % procurement.product_id.name)) if procurement.product_id.type in ('product', 'consu'): if not procurement.move_id: diff --git a/addons/project/project.py b/addons/project/project.py index 0b99356a9de..6435fef0be9 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -436,7 +436,7 @@ class project(osv.osv): for project in projects: if (not project.members) and force_members: - raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,)) + raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s'!") % (project.name,)) resource_pool = self.pool.get('resource.resource') @@ -941,7 +941,7 @@ class task(base_stage, osv.osv): if task.child_ids: for child in task.child_ids: if child.state in ['draft', 'open', 'pending']: - raise osv.except_osv(_("Warning !"), _("Child task still open.\nPlease cancel or complete child task first.")) + raise osv.except_osv(_("Warning!"), _("Child task still open.\nPlease cancel or complete child task first.")) return True def action_close(self, cr, uid, ids, context=None): diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py index 36c64cbc224..3233e2534af 100644 --- a/addons/project_gtd/wizard/project_gtd_empty.py +++ b/addons/project_gtd/wizard/project_gtd_empty.py @@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory): ids = obj_tb.search(cr, uid, [], context=context) if not len(ids): - raise osv.except_osv(_('Error!'), _('No timebox child of this one !')) + raise osv.except_osv(_('Error!'), _('No timebox child of this one!')) tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])]) for task in obj_task.browse(cr, uid, tids, context): if (task.state in ('cancel','done')) or (task.user_id.id <> uid): diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index ffee600f5a7..767cb4893b5 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -79,22 +79,22 @@ class project_work(osv.osv): emp_id = emp_obj.search(cr, uid, [('user_id', '=', user_id)]) if not emp_id: user_name = self.pool.get('res.users').read(cr, uid, [user_id], ['name'])[0]['name'] - raise osv.except_osv(_('Bad Configuration !'), + raise osv.except_osv(_('Bad Configuration!'), _('Please define employee for user "%s". You must create one.')% (user_name,)) emp = emp_obj.browse(cr, uid, emp_id[0]) if not emp.product_id: - raise osv.except_osv(_('Bad Configuration !'), + raise osv.except_osv(_('Bad Configuration!'), _('Please define product and product category property account on the related employee.\nFill in the HR Settings tab of the employee form.')) if not emp.journal_id: - raise osv.except_osv(_('Bad Configuration !'), + raise osv.except_osv(_('Bad Configuration!'), _('Please define journal on the related employee.\nFill in the timesheet tab of the employee form.')) acc_id = emp.product_id.property_account_expense.id if not acc_id: acc_id = emp.product_id.categ_id.property_account_expense_categ.id if not acc_id: - raise osv.except_osv(_('Bad Configuration !'), + raise osv.except_osv(_('Bad Configuration!'), _('Please define product and product category property account on the related employee.\nFill in the timesheet tab of the employee form.')) res['product_id'] = emp.product_id.id @@ -286,7 +286,7 @@ class account_analytic_line(osv.osv): st = acc.to_invoice.id res['value']['to_invoice'] = st or False if acc.state == 'close' or acc.state == 'cancelled': - raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.')) + raise osv.except_osv(_('Invalid Analytic Account!'), _('You cannot select a Analytic Account which is in Close or Cancelled state.')) return res diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 210e4dd3be6..0f54f3fc133 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -273,7 +273,7 @@ class sale_order(osv.osv): if s['state'] in ['draft', 'cancel']: unlink_ids.append(s['id']) else: - raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before !')) + raise osv.except_osv(_('Invalid Action!'), _('In order to delete a confirmed sales order, you must cancel it before!')) return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) @@ -870,7 +870,7 @@ class sale_order_line(osv.osv): context = context or {} lang = lang or context.get('lang',False) if not partner_id: - raise osv.except_osv(_('No Customer Defined !'), _('Before choosing a product,\n select a customer in the sales form.')) + raise osv.except_osv(_('No Customer Defined!'), _('Before choosing a product,\n select a customer in the sales form.')) warning = {} product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index 6bea6286456..0470bab4f8b 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -87,7 +87,7 @@ class crm_make_sale(osv.osv_memory): ['default', 'invoice', 'delivery', 'contact']) pricelist = partner.property_product_pricelist.id if False in partner_addr.values(): - raise osv.except_osv(_('Insufficient Data!'), _('No addresse(s) defined for this customer.')) + raise osv.except_osv(_('Insufficient Data!'), _('No addresse(es) defined for this customer.')) vals = { 'origin': _('Opportunity: %s') % str(case.id), diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 764d9de453e..2c293ab896c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1109,7 +1109,7 @@ class stock_picking(osv.osv): if isinstance(partner, int): partner = partner_obj.browse(cr, uid, [partner], context=context)[0] if not partner: - raise osv.except_osv(_('Error, no partner !'), + raise osv.except_osv(_('Error, no partner!'), _('Please put a partner on the picking list if you want to generate invoice.')) if not inv_type: @@ -1763,7 +1763,7 @@ class stock_move(osv.osv): for move in self.browse(cr, uid, ids, context=context): if move.state == 'done': if frozen_fields.intersection(vals): - raise osv.except_osv(_('Operation forbidden !'), + raise osv.except_osv(_('Operation Forbidden!'), _('Quantities, Units of Measure, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator).')) return super(stock_move, self).write(cr, uid, ids, vals, context=context) diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py index b7ae720c187..98e1d78b3be 100644 --- a/addons/subscription/subscription.py +++ b/addons/subscription/subscription.py @@ -115,7 +115,7 @@ class subscription_subscription(osv.osv): id = int(id) model = self.pool[model_name] except: - raise osv.except_osv(_('Wrong Source Document !'), _('Please provide another source document.\nThis one does not exist !')) + raise osv.except_osv(_('Wrong Source Document!'), _('Please provide another source document.\nThis one does not exist!')) default = {'state':'draft'} doc_obj = self.pool.get('subscription.document') @@ -142,7 +142,7 @@ class subscription_subscription(osv.osv): def unlink(self, cr, uid, ids, context=None): for record in self.browse(cr, uid, ids, context or {}): if record.state=="running": - raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription !')) + raise osv.except_osv(_('Error!'),_('You cannot delete an active subscription!')) return super(subscription_subscription, self).unlink(cr, uid, ids, context) def set_done(self, cr, uid, ids, context=None): diff --git a/addons/warning/warning.py b/addons/warning/warning.py index e9e9161bacb..8e1168e5d35 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -63,7 +63,7 @@ class sale_order(osv.osv): partner = self.pool.get('res.partner').browse(cr, uid, part, context=context) if partner.sale_warn != 'no-message': if partner.sale_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.sale_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.sale_warn_msg) title = _("Warning for %s") % partner.name message = partner.sale_warn_msg warning = { @@ -91,7 +91,7 @@ class purchase_order(osv.osv): partner = self.pool.get('res.partner').browse(cr, uid, part) if partner.purchase_warn != 'no-message': if partner.purchase_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.purchase_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.purchase_warn_msg) title = _("Warning for %s") % partner.name message = partner.purchase_warn_msg warning = { @@ -124,7 +124,7 @@ class account_invoice(osv.osv): partner = self.pool.get('res.partner').browse(cr, uid, partner_id) if partner.invoice_warn != 'no-message': if partner.invoice_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.invoice_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.invoice_warn_msg) title = _("Warning for %s") % partner.name message = partner.invoice_warn_msg @@ -155,7 +155,7 @@ class stock_picking(osv.osv): message = False if partner.picking_warn != 'no-message': if partner.picking_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg) title = _("Warning for %s") % partner.name message = partner.picking_warn_msg warning = { @@ -184,7 +184,7 @@ class stock_picking_in(osv.osv): message = False if partner.picking_warn != 'no-message': if partner.picking_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg) title = _("Warning for %s") % partner.name message = partner.picking_warn_msg warning = { @@ -210,7 +210,7 @@ class stock_picking_out(osv.osv): message = False if partner.picking_warn != 'no-message': if partner.picking_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.picking_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (partner.name), partner.picking_warn_msg) title = _("Warning for %s") % partner.name message = partner.picking_warn_msg warning = { @@ -257,7 +257,7 @@ class sale_order_line(osv.osv): if product_info.sale_line_warn != 'no-message': if product_info.sale_line_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.sale_line_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.sale_line_warn_msg) title = _("Warning for %s") % product_info.name message = product_info.sale_line_warn_msg warning['title'] = title @@ -289,7 +289,7 @@ class purchase_order_line(osv.osv): if product_info.purchase_line_warn != 'no-message': if product_info.purchase_line_warn == 'block': - raise osv.except_osv(_('Alert for %s !') % (product_info.name), product_info.purchase_line_warn_msg) + raise osv.except_osv(_('Alert for %s!') % (product_info.name), product_info.purchase_line_warn_msg) title = _("Warning for %s") % product_info.name message = product_info.purchase_line_warn_msg warning['title'] = title From e8ef63e0c0120cc8381551def5852c7e64311406 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Mon, 29 Apr 2013 14:59:24 +0530 Subject: [PATCH 04/31] [IMP] Improve warning title bzr revid: ggh@tinyerp.com-20130429092924-2qgaxvkfb801q4dl --- addons/account_voucher/account_voucher.py | 2 +- addons/edi/models/edi.py | 2 +- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +- addons/l10n_lu/wizard/print_vat.py | 2 +- addons/portal/wizard/portal_wizard.py | 2 +- addons/share/wizard/share_wizard.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 52d44e84d48..2163c735735 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1535,7 +1535,7 @@ class account_bank_statement(osv.osv): for bk_st in self.browse(cr, uid, ids, context=context): if vals.get('journal_id') and bk_st.line_ids: if any([x.voucher_id and True or False for x in bk_st.line_ids]): - raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!')) + raise osv.except_osv(_('Unable To Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!')) return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context) diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py index bfd59dae15a..1b9e0c4df08 100644 --- a/addons/edi/models/edi.py +++ b/addons/edi/models/edi.py @@ -126,7 +126,7 @@ class edi(osv.AbstractModel): module = edi_document.get('__import_module') or edi_document.get('__module') assert module, 'a `__module` or `__import_module` attribute is required in each EDI document.' if module != 'base' and not ir_module.search(cr, uid, [('name','=',module),('state','=','installed')]): - raise osv.except_osv(_('Missing application.'), + raise osv.except_osv(_('Missing Application.'), _("The document you are trying to import requires the OpenERP `%s` application. " "You can install it by connecting as the administrator and opening the configuration assistant.")%(module,)) model = edi_document.get('__import_model') or edi_document.get('__model') diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 4e2e7911094..6c4f6022c39 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -181,7 +181,7 @@ class account_analytic_line(osv.osv): for account in analytic_account_obj.browse(cr, uid, list(account_ids), context=context): partner = account.partner_id if (not partner) or not (account.pricelist_id): - raise osv.except_osv(_('Analytic Account incomplete!'), + raise osv.except_osv(_('Analytic Account Incomplete!'), _('Contract incomplete. Please fill in the Customer and Pricelist fields.')) date_due = False diff --git a/addons/l10n_lu/wizard/print_vat.py b/addons/l10n_lu/wizard/print_vat.py index 74b8a80b1c8..04d4fe9a3b7 100644 --- a/addons/l10n_lu/wizard/print_vat.py +++ b/addons/l10n_lu/wizard/print_vat.py @@ -64,7 +64,7 @@ class report_custom(report_int): self.obj.render() return (self.obj.pdf, 'pdf') except Exception: - raise osv.except_osv(_('pdf not created!'), _('Please check if package pdftk is installed!')) + raise osv.except_osv(_('PDF Not Created!'), _('Please check if package pdftk is installed!')) report_custom('report.l10n_lu.tax.report.print') diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index e3047cd5edb..61b23f4f07b 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -190,7 +190,7 @@ class wizard_user(osv.osv_memory): this_context = context this_user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context) if not this_user.email: - raise osv.except_osv(_('Email required'), + raise osv.except_osv(_('Email Required'), _('You must have an email address in your User Preferences to send emails.')) # determine subject and body in the portal user's language diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 3a26dcb9e6b..c70164749fd 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -831,7 +831,7 @@ class share_wizard(osv.TransientModel): notification_obj = self.pool.get('mail.notification') user = self.pool.get('res.users').browse(cr, UID_ROOT, uid) if not user.email: - raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) + raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) # TODO: also send an HTML version of this mail for result_line in wizard_data.result_line_ids: @@ -862,7 +862,7 @@ class share_wizard(osv.TransientModel): mail_mail = self.pool.get('mail.mail') user = self.pool.get('res.users').browse(cr, UID_ROOT, uid) if not user.email: - raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) + raise osv.except_osv(_('Email Required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) # TODO: also send an HTML version of this mail mail_ids = [] From b15a01ff1e9131b363c0a695912ee39aa1d1a590 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Mon, 29 Apr 2013 15:58:55 +0530 Subject: [PATCH 05/31] [IMP] Improved typos in warning bzr revid: ggh@tinyerp.com-20130429102855-jrixaqvo4xqc2fix --- addons/web/static/src/js/chrome.js | 21 +++--- addons/web/static/src/js/view_form.js | 97 ++++++++++++++++++++------- 2 files changed, 80 insertions(+), 38 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3870a7999b4..f357f6ac2e6 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -251,9 +251,9 @@ instance.web.CrashManager = instance.web.Class.extend({ if (handler) { new (handler)(this, error).display(); return; - }; + } if (error.data.name === "openerp.addons.web.session SessionExpiredException") { - this.show_warning({type: "Session Expired", data: { message: "Your OpenERP session expired. Please refresh the current web page." }}); + this.show_warning({type: "Session Expired", data: { message: _t("Your OpenERP session expired. Please refresh the current web page.") }}); return; } if (error.data.exception_type === "except_osv" || error.data.exception_type === "warning" @@ -530,16 +530,11 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ 'login': 'admin', 'password': form_obj['create_admin_pwd'], 'login_successful': function() { - var action = { - type: "ir.actions.client", - tag: 'reload', - params: { - url_search : { - db: form_obj['db_name'], - }, - } - }; - self.do_action(action); + var url = '/?db=' + form_obj['db_name']; + if (self.session.debug) { + url += '&debug'; + } + instance.web.redirect(url); }, }, _push_me: false, @@ -1374,7 +1369,7 @@ instance.web.WebClient = instance.web.Client.extend({ if (browser_offset !== user_offset) { var $icon = $(QWeb.render('WebClient.timezone_systray')); $icon.on('click', function() { - var notification = self.do_warn(_t("Timezone mismatch"), QWeb.render('WebClient.timezone_notification', { + var notification = self.do_warn(_t("Timezone Mismatch"), QWeb.render('WebClient.timezone_notification', { user_timezone: instance.session.user_context.tz || 'UTC', user_offset: user_offset, browser_offset: browser_offset, diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 53a7425c036..3269e07c186 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -765,7 +765,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.has_been_loaded.done(function() { if (self.datarecord.id && confirm(_t("Do you really want to delete this record?"))) { self.dataset.unlink([self.datarecord.id]).done(function() { - self.execute_pager_action('next'); + if (self.dataset.size()) { + self.execute_pager_action('next'); + } else { + self.do_action('history_back'); + } def.resolve(); }); } else { @@ -802,6 +806,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM if (save_obj.error) return $.Deferred().reject(); return $.when.apply($, save_obj.ret); + }).done(function() { + self.$el.removeClass('oe_form_dirty'); }); }, _process_save: function(save_obj) { @@ -1021,7 +1027,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return value; } var fields = _.chain(this.fields) - .map(function (field, name) { + .map(function (field) { var value = field.get_value(); // ignore fields which are empty, invisible, readonly, o2m // or m2m @@ -1036,7 +1042,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } return { - name: name, + name: field.name, string: field.string, value: value, displayed: display(field, value), @@ -1047,10 +1053,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM .value(); var conditions = _.chain(self.fields) .filter(function (field) { return field.field.change_default; }) - .map(function (field, name) { + .map(function (field) { var value = field.get_value(); return { - name: name, + name: field.name, string: field.string, value: value, displayed: display(field, value), @@ -1444,6 +1450,9 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt $(this).children().each(function() { var $td = $(this), $child = $td.children(':first'); + if ($child.attr('cell-class')) { + $td.addClass($child.attr('cell-class')); + } switch ($child[0].tagName.toLowerCase()) { case 'separator': break; @@ -1520,7 +1529,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt if (! page.__ic) return; page.__ic.on("change:effective_invisible", null, function() { - if (!page.__ic.get('effective_invisible')) { + if (!page.__ic.get('effective_invisible') && page.autofocus) { $new_notebook.tabs('select', i); return; } @@ -2126,7 +2135,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w value without triggering a re-rendering. */ internal_set_value: function(value_) { - var tmp = this.no_render; + var tmp = this.no_rerender; this.no_rerender = true; this.set({'value': value_}); this.no_rerender = tmp; @@ -2296,7 +2305,8 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we return this.get('value') === '' || this._super(); }, focus: function() { - this.$('input:first')[0].focus(); + var input = this.$('input:first')[0]; + return input ? input.focus() : false; }, set_dimensions: function (height, width) { this._super(height, width); @@ -2333,7 +2343,7 @@ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({ }, on_button_clicked: function() { if (!this.get('value') || !this.is_syntax_valid()) { - this.do_warn(_t("E-mail error"), _t("Can't send email to invalid e-mail address")); + this.do_warn(_t("E-mail Error"), _t("Can't send email to invalid e-mail address")); } else { location.href = 'mailto:' + this.get('value'); } @@ -2363,7 +2373,7 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({ }, on_button_clicked: function() { if (!this.get('value')) { - this.do_warn(_t("Resource error"), _t("This resource is empty")); + this.do_warn(_t("Resource Error"), _t("This resource is empty")); } else { var url = $.trim(this.get('value')); if(/^www\./i.test(url)) @@ -2393,7 +2403,8 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({ this._super.apply(this, [value_]); }, focus: function () { - this.$('input:first').select(); + var $input = this.$('input:first'); + return $input.length ? $input.select() : false; } }); @@ -2413,6 +2424,42 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({ this.$input = this.$el.find('input.oe_datepicker_master'); this.$input_picker = this.$el.find('input.oe_datepicker_container'); + $.datepicker.setDefaults({ + clearText: _t('Clear'), + clearStatus: _t('Erase the current date'), + closeText: _t('Done'), + closeStatus: _t('Close without change'), + prevText: _t(''), + nextStatus: _t('Show the next month'), + currentText: _t('Today'), + currentStatus: _t('Show the current month'), + monthNames: Date.CultureInfo.monthNames, + monthNamesShort: Date.CultureInfo.abbreviatedMonthNames, + monthStatus: _t('Show a different month'), + yearStatus: _t('Show a different year'), + weekHeader: _t('Wk'), + weekStatus: _t('Week of the year'), + dayNames: Date.CultureInfo.dayNames, + dayNamesShort: Date.CultureInfo.abbreviatedDayNames, + dayNamesMin: Date.CultureInfo.shortestDayNames, + dayStatus: _t('Set DD as first week day'), + dateStatus: _t('Select D, M d'), + firstDay: Date.CultureInfo.firstDayOfWeek, + initStatus: _t('Select a date'), + isRTL: false + }); + $.timepicker.setDefaults({ + timeOnlyTitle: _t('Choose Time'), + timeText: _t('Time'), + hourText: _t('Hour'), + minuteText: _t('Minute'), + secondText: _t('Second'), + currentText: _t('Now'), + closeText: _t('Done') + }); + this.picker({ onClose: this.on_picker_select, onSelect: this.on_picker_select, @@ -2539,9 +2586,8 @@ instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instanc return this.get('value') === '' || this._super(); }, focus: function() { - if (this.datewidget && this.datewidget.$input) { - this.datewidget.$input[0].focus(); - } + var input = this.datewidget && this.datewidget.$input[0]; + return input ? input.focus() : false; }, set_dimensions: function (height, width) { this._super(height, width); @@ -2622,9 +2668,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we return this.get('value') === '' || this._super(); }, focus: function($el) { - if (!this.get("effective_readonly") && this.$textarea) { - this.$textarea[0].focus(); - } + var input = !this.get("effective_readonly") && this.$textarea && this.$textarea[0]; + return input ? input.focus() : false; }, set_dimensions: function (height, width) { this._super(height, width); @@ -2707,7 +2752,8 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ this.$checkbox[0].checked = this.get('value'); }, focus: function() { - this.$checkbox[0].focus(); + var input = this.$checkbox && this.$checkbox[0]; + return input ? input.focus() : false; } }); @@ -2793,7 +2839,8 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan } }, focus: function() { - this.$('select:first')[0].focus(); + var input = this.$('select:first')[0]; + return input ? input.focus() : false; }, set_dimensions: function (height, width) { this._super(height, width); @@ -3336,7 +3383,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc } if (! no_recurse) { var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context()); - dataset.name_get([self.get("value")]).done(function(data) { + this.alive(dataset.name_get([self.get("value")])).done(function(data) { self.display_value["" + self.get("value")] = data[0][1]; self.render_value(true); }); @@ -3401,9 +3448,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc return ! this.get("value"); }, focus: function () { - if (!this.get('effective_readonly')) { - this.$input && this.$input[0].focus(); - } + var input = !this.get('effective_readonly') && this.$input && this.$input[0]; + return input ? input.focus() : false; }, _quick_create: function() { this.no_ed = true; @@ -4263,7 +4309,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in this.set({'value': _.uniq(this.get('value').concat([id]))}); }, focus: function () { - this.$text[0].focus(); + var input = this.$text && this.$text[0]; + return input ? input.focus() : false; }, set_dimensions: function (height, width) { this._super(height, width); @@ -5311,7 +5358,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie } if (result.error || !result.id ) { - this.do_warn( _t('Uploading error'), result.error); + this.do_warn( _t('Uploading Error'), result.error); delete this.data[0]; } else { if (this.data[0] && this.data[0].filename == result.filename && this.data[0].upload) { From 1b08798b52df8f0a3a72d116577cd7451b45b30c Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Tue, 30 Apr 2013 12:55:47 +0530 Subject: [PATCH 06/31] [TYPO]changes in typo bzr revid: vja@tinyerp.com-20130430072547-7gyl7nivdc8717ua --- addons/account/account.py | 2 +- addons/account/account_invoice.py | 2 +- addons/account/account_move_line.py | 2 +- addons/account/installer.py | 2 +- addons/account_voucher/account_voucher.py | 2 +- addons/delivery/sale.py | 2 +- addons/sale_crm/wizard/crm_make_sale.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index cca3db63d29..322207b515b 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2307,7 +2307,7 @@ class account_model(osv.osv): try: entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')} except: - raise osv.except_osv(_('Wrong model!'), _('You have a wrong expression "%(...)s" in your model !')) + raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!')) move_id = account_move_obj.create(cr, uid, { 'ref': entry['name'], 'period_id': period_id, diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 2a530da30d9..6fd045fc1e8 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -882,7 +882,7 @@ class account_invoice(osv.osv): group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context) if group_check_total and uid in [x.id for x in group_check_total.users]: if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)): - raise osv.except_osv(_('Bad total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.')) + raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.')) if inv.payment_term: total_fixed = total_percent = 0 diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index a7d32cc53f9..13fc4e502ae 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1181,7 +1181,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) diff --git a/addons/account/installer.py b/addons/account/installer.py index fc1161db29b..961b8f9e763 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -111,7 +111,7 @@ class account_installer(osv.osv_memory): def check_unconfigured_cmp(self, cr, uid, context=None): """ check if there are still unconfigured companies """ if not self.get_unconfigured_cmp(cr, uid, context=context): - raise osv.except_osv(_('No unconfigured company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) + raise osv.except_osv(_('No Unconfigured Company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed.")) def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): if context is None: context = {} diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 2163c735735..a9a70291f6a 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1535,7 +1535,7 @@ class account_bank_statement(osv.osv): for bk_st in self.browse(cr, uid, ids, context=context): if vals.get('journal_id') and bk_st.line_ids: if any([x.voucher_id and True or False for x in bk_st.line_ids]): - raise osv.except_osv(_('Unable To Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!')) + raise osv.except_osv(_('Unable to Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!')) return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context) diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py index de7411bec67..1b797290632 100644 --- a/addons/delivery/sale.py +++ b/addons/delivery/sale.py @@ -54,7 +54,7 @@ class sale_order(osv.osv): raise osv.except_osv(_('No Grid Available!'), _('No grid matching for this carrier!')) if not order.state in ('draft'): - raise osv.except_osv(_('Order Not In Draft State!'), _('The order state have to be draft to add delivery lines.')) + raise osv.except_osv(_('Order not in Draft State!'), _('The order state have to be draft to add delivery lines.')) grid = grid_obj.browse(cr, uid, grid_id, context=context) diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index 0470bab4f8b..da770af6d82 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -87,7 +87,7 @@ class crm_make_sale(osv.osv_memory): ['default', 'invoice', 'delivery', 'contact']) pricelist = partner.property_product_pricelist.id if False in partner_addr.values(): - raise osv.except_osv(_('Insufficient Data!'), _('No addresse(es) defined for this customer.')) + raise osv.except_osv(_('Insufficient Data!'), _('No address(es) defined for this customer.')) vals = { 'origin': _('Opportunity: %s') % str(case.id), From b16935efdc608361db0ad50f3ddffaabbf86d1e3 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 4 Jun 2013 13:13:54 +0200 Subject: [PATCH 07/31] [IMP] orm: include forbidden IDs when logging ir.rules violations, to make troubleshooting easier bzr revid: odo@openerp.com-20130604111354-1x5yc305okhx5ujk --- openerp/osv/orm.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index a451fbf6582..765ab434f9b 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -3853,11 +3853,12 @@ class BaseModel(object): # Attempt to distinguish record rule restriction vs deleted records, # to provide a more specific error message - check if the missinf cr.execute('SELECT id FROM ' + self._table + ' WHERE id IN %s', (tuple(missing_ids),)) - if cr.rowcount: + forbidden_ids = [x[0] for x in cr.fetchall()] + if forbidden_ids: # the missing ids are (at least partially) hidden by access rules if uid == SUPERUSER_ID: return - _logger.warning('Access Denied by record rules for operation: %s, uid: %s, model: %s', operation, uid, self._name) + _logger.warning('Access Denied by record rules for operation: %s on record ids: %r, uid: %s, model: %s', operation, forbidden_ids, uid, self._name) raise 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)) @@ -4817,8 +4818,8 @@ class BaseModel(object): order_field = order_split[0].strip() order_direction = order_split[1].strip() if len(order_split) == 2 else '' inner_clause = None - if order_field == 'id': - order_by_elements.append('"%s"."id" %s' % (self._table, order_direction)) + if order_field == 'id' or (self._log_access and order_field in LOG_ACCESS_COLUMNS.keys()): + order_by_elements.append('"%s"."%s" %s' % (self._table, order_field, order_direction)) elif order_field in self._columns: order_column = self._columns[order_field] if order_column._classic_read: @@ -4836,6 +4837,8 @@ class BaseModel(object): inner_clause = self._generate_m2o_order_by(order_field, query) else: continue # ignore non-readable or "non-joinable" fields + else: + raise ValueError( _("Sorting field %s not found on model %s") %( order_field, self._name)) if inner_clause: if isinstance(inner_clause, list): for clause in inner_clause: @@ -5092,20 +5095,18 @@ class BaseModel(object): :param parent: optional parent field name (default: ``self._parent_name = parent_id``) :return: **True** if the operation can proceed safely, or **False** if an infinite loop is detected. """ - if not parent: parent = self._parent_name - ids_parent = ids[:] - query = 'SELECT distinct "%s" FROM "%s" WHERE id IN %%s' % (parent, self._table) - while ids_parent: - ids_parent2 = [] - for i in range(0, len(ids), cr.IN_MAX): - sub_ids_parent = ids_parent[i:i+cr.IN_MAX] - cr.execute(query, (tuple(sub_ids_parent),)) - ids_parent2.extend(filter(None, map(lambda x: x[0], cr.fetchall()))) - ids_parent = ids_parent2 - for i in ids_parent: - if i in ids: + + # must ignore 'active' flag, ir.rules, etc. => direct SQL query + query = 'SELECT "%s" FROM "%s" WHERE id = %%s' % (parent, self._table) + for id in ids: + current_id = id + while current_id is not None: + cr.execute(query, (current_id,)) + result = cr.fetchone() + current_id = result[0] if result else None + if current_id == id: return False return True From 12e3ce123f476304319298a0a80dfa15ab3a8a9c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 5 Jun 2013 11:39:15 +0200 Subject: [PATCH 08/31] detail bzr revid: nicolas.vanhoren@openerp.com-20130605093915-kmwtw7cq578lb230 --- addons/web/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/http.py b/addons/web/http.py index 5ada5d4a68c..9377ab02df8 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -366,7 +366,7 @@ class RequestProxy(object): return delattr(_thlocal.stack[-1], name) @classmethod def set_request(cls, request): - class with_obj: + class with_obj(object): def __enter__(self): if getattr(_thlocal, "stack", None) is None: _thlocal.stack = [] From 9fd2e7297ffb0fe9cb96767bcb8ad686a66d064b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 5 Jun 2013 12:13:00 +0200 Subject: [PATCH 09/31] [IMP] Chatter: better display of date bzr revid: tde@openerp.com-20130605101300-t1lwykg3d6lp7au2 --- addons/mail/static/src/js/mail.js | 1 + addons/mail/static/src/xml/mail.xml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 2cd9c7c077d..70e93e2957c 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -259,6 +259,7 @@ openerp.mail = function (session) { format_data: function () { //formating and add some fields for render this.date = this.date ? session.web.str_to_datetime(this.date) : false; + this.display_date = this.date.toString('ddd MMM dd yyyy HH:mm'); if (this.date && new Date().getTime()-this.date.getTime() < 7*24*60*60*1000) { this.timerelative = $.timeago(this.date); } diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f5004941a8d..b3b79bcfc43 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -295,7 +295,10 @@ notified • - + + + + • From 9c57f6e1cdaf8a80a403486b51cd9e661c11e3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 12:24:37 +0200 Subject: [PATCH 10/31] [FIX] mail: various fixes Mass mailing: emails due to mass mailing are not queued instead of sent immediately. As most of cases go through mail_followers._notify(), a new argument is added that allows to control the force_send (like what is done in email_template). Chatter: better display of recipients when having a message_post due to mass mailing (not always displaying logged a note). Notified people: when having no subtype, just avoid notifying the followers but take into account specified recipients (partner_ids). bzr revid: tde@openerp.com-20130606102437-43s4xp96b5wa3r1q --- addons/mail/mail_followers.py | 17 +++++---- addons/mail/mail_mail.py | 16 ++++----- addons/mail/mail_message.py | 42 ++++++++++++++-------- addons/mail/static/src/xml/mail.xml | 6 ++-- addons/mail/wizard/mail_compose_message.py | 12 +++---- 5 files changed, 49 insertions(+), 44 deletions(-) diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index b85410a7a1c..93196976e90 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -150,11 +150,14 @@ class mail_notification(osv.Model): return footer - def _notify(self, cr, uid, msg_id, partners_to_notify=None, context=None): + def _notify(self, cr, uid, msg_id, partners_to_notify=None, context=None, force_send=False): """ Send by email the notification depending on the user preferences :param list partners_to_notify: optional list of partner ids restricting the notifications to process + :param bool force_send: if True, the generated mail.mail is + immediately sent after being created, as if the scheduler + was executed for this message only. """ if context is None: context = {} @@ -203,13 +206,9 @@ class mail_notification(osv.Model): 'recipient_ids': [(4, id) for id in notify_partner_ids], 'references': references, } - if msg.email_from: - mail_values['email_from'] = msg.email_from - if msg.reply_to: - mail_values['reply_to'] = msg.reply_to mail_mail = self.pool.get('mail.mail') email_notif_id = mail_mail.create(cr, uid, mail_values, context=context) - try: - return mail_mail.send(cr, uid, [email_notif_id], context=context) - except Exception: - return False + + if force_send: + mail_mail.send(cr, uid, [email_notif_id], context=context) + return True diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index a36ec85b27b..4da3b27bd7d 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -55,7 +55,6 @@ class mail_mail(osv.Model): 'auto_delete': fields.boolean('Auto Delete', help="Permanently delete this email after sending it, to save space"), 'references': fields.text('References', help='Message references, such as identifiers of previous messages', readonly=1), - 'email_from': fields.char('From', help='Message sender, taken from user preferences.'), 'email_to': fields.text('To', help='Message recipients (emails)'), 'recipient_ids': fields.many2many('res.partner', string='To (Partners)'), 'email_cc': fields.char('Cc', help='Carbon copy message recipients'), @@ -67,16 +66,10 @@ class mail_mail(osv.Model): } def _get_default_from(self, cr, uid, context=None): - this = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context) - if this.alias_domain: - return '%s <%s@%s>' % (this.name, this.alias_name, this.alias_domain) - elif this.email: - return '%s <%s>' % (this.name, this.email) - raise osv.except_osv(_('Invalid Action!'), _("Unable to send email, please configure the sender's email address or alias.")) + return self.pool['mail.message']._get_default_from(cr, uid, context=context) _defaults = { 'state': 'outgoing', - 'email_from': lambda self, cr, uid, ctx=None: self._get_default_from(cr, uid, ctx), } def default_get(self, cr, uid, fields, context=None): @@ -97,19 +90,22 @@ class mail_mail(osv.Model): # model, res_id: comes from values OR related message model = values.get('model') res_id = values.get('res_id') + email_from = values.get('email_from') if values.get('mail_message_id') and (not model or not res_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 + if not email_from: + email_from = message.email_from # 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'): email_reply_to = self.pool[model].message_get_reply_to(cr, uid, [res_id], context=context)[0] # 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] diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index b8a00a790a8..884d59ba9be 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -182,6 +182,14 @@ class mail_message(osv.Model): def _needaction_domain_get(self, cr, uid, context=None): return [('to_read', '=', True)] + def _get_default_from(self, cr, uid, context=None): + this = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context) + if this.alias_domain: + return '%s <%s@%s>' % (this.name, this.alias_name, this.alias_domain) + elif this.email: + return '%s <%s>' % (this.name, this.email) + raise osv.except_osv(_('Invalid Action!'), _("Unable to send email, please configure the sender's email address or alias.")) + def _get_default_author(self, cr, uid, context=None): return self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0] @@ -190,7 +198,7 @@ class mail_message(osv.Model): 'date': lambda *a: fields.datetime.now(), 'author_id': lambda self, cr, uid, ctx=None: self._get_default_author(cr, uid, ctx), 'body': '', - 'email_from': lambda self, cr, uid, ctx=None: self.pool.get('mail.mail')._get_default_from(cr, uid, ctx), + 'email_from': lambda self, cr, uid, ctx=None: self._get_default_from(cr, uid, ctx), } #------------------------------------------------------ @@ -315,8 +323,10 @@ class mail_message(osv.Model): for key, message in message_tree.iteritems(): if message.author_id: partner_ids |= set([message.author_id.id]) - if message.notified_partner_ids: + if message.subtype_id and message.notified_partner_ids: # take notified people of message with a subtype partner_ids |= set([partner.id for partner in message.notified_partner_ids]) + elif not message.subtype_id and message.partner_ids: # take specified people of message without a subtype (log) + partner_ids |= set([partner.id for partner in message.partner_ids]) if message.attachment_ids: attachment_ids |= set([attachment.id for attachment in message.attachment_ids]) # Read partners as SUPERUSER -> display the names like classic m2o even if no access @@ -336,9 +346,15 @@ class mail_message(osv.Model): else: author = (0, message.email_from) partner_ids = [] - for partner in message.notified_partner_ids: - if partner.id in partner_tree: - partner_ids.append(partner_tree[partner.id]) + if message.subtype_id: + partner_ids = [partner_tree[partner.id] for partner in message.notified_partner_ids + if partner.id in partner_tree] + else: + partner_ids = [partner_tree[partner.id] for partner in message.partner_ids + if partner.id in partner_tree] + # for partner in message.notified_partner_ids: + # if partner.id in partner_tree: + # partner_ids.append(partner_tree[partner.id]) attachment_ids = [] for attachment in message.attachment_ids: if attachment.id in attachments_tree: @@ -752,7 +768,7 @@ class mail_message(osv.Model): elif not values.get('message_id'): values['message_id'] = tools.generate_tracking_message_id('private') newid = super(mail_message, self).create(cr, uid, values, context) - self._notify(cr, uid, newid, context=context) + self._notify(cr, uid, newid, context=context, force_send=context.get('mail_notify_force_send', True)) # TDE FIXME: handle default_starred. Why not setting an inv on starred ? # Because starred will call set_message_starred, that looks for notifications. # When creating a new mail_message, it will create a notification to a message @@ -866,20 +882,16 @@ class mail_message(osv.Model): return '' return result - def _notify(self, cr, uid, newid, context=None): + def _notify(self, cr, uid, newid, context=None, force_send=False): """ Add the related record followers to the destination partner_ids if is not a private message. Call mail_notification.notify to manage the email sending """ notification_obj = self.pool.get('mail.notification') message = self.browse(cr, uid, newid, context=context) - partners_to_notify = set([]) - # message has no subtype_id: pure log message -> no partners, no one notified - if not message.subtype_id: - return True - # all followers of the mail.message document have to be added as partners and notified - if message.model and message.res_id: + # all followers of the mail.message document have to be added as partners and notified if a subtype is defined (otherwise: log message) + if message.subtype_id and message.model and message.res_id: fol_obj = self.pool.get("mail.followers") # browse as SUPERUSER because rules could restrict the search results fol_ids = fol_obj.search(cr, SUPERUSER_ID, [ @@ -889,7 +901,7 @@ class mail_message(osv.Model): ], context=context) partners_to_notify |= set(fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context)) # remove me from notified partners, unless the message is written on my own wall - if message.author_id and message.model == "res.partner" and message.res_id == message.author_id.id: + if message.subtype_id and message.author_id and message.model == "res.partner" and message.res_id == message.author_id.id: partners_to_notify |= set([message.author_id]) elif message.author_id: partners_to_notify -= set([message.author_id]) @@ -900,7 +912,7 @@ class mail_message(osv.Model): # notify if partners_to_notify: - notification_obj._notify(cr, uid, newid, partners_to_notify=[p.id for p in partners_to_notify], context=context) + notification_obj._notify(cr, uid, newid, partners_to_notify=[p.id for p in partners_to_notify], context=context, force_send=force_send) message.refresh() # An error appear when a user receive a notification without notifying diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index b3b79bcfc43..8c507925359 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -271,16 +271,16 @@ • - + logged a note - + to nobody - diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 7bf4d47d1ff..383929a6e07 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -126,7 +126,6 @@ class mail_compose_message(osv.TransientModel): _defaults = { 'composition_mode': 'comment', - 'email_from': lambda self, cr, uid, ctx={}: self.pool.get('mail.mail')._get_default_from(cr, uid, context=ctx), 'body': lambda self, cr, uid, ctx={}: '', 'subject': lambda self, cr, uid, ctx={}: False, 'partner_ids': lambda self, cr, uid, ctx={}: [], @@ -158,7 +157,7 @@ class mail_compose_message(osv.TransientModel): return super(mail_compose_message, self).check_access_rule(cr, uid, ids, operation, context=context) - def _notify(self, cr, uid, newid, context=None): + def _notify(self, cr, uid, newid, context=None, force_send=False): """ Override specific notify method of mail.message, because we do not want that feature in the wizard. """ return @@ -280,11 +279,10 @@ class mail_compose_message(osv.TransientModel): elif mass_mail_mode: # mass mail: is a log pushed to recipients unless specified, author not added if not wizard.notify: subtype = False - context = dict(context, mail_create_nosubscribe=True) # add context key to avoid subscribing the author - msg_id = active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **post_values) - # mass_mailing, post without notify: notify specific partners - if mass_mail_mode and not wizard.notify and post_values['partner_ids']: - self.pool.get('mail.notification')._notify(cr, uid, msg_id, post_values['partner_ids'], context=context) + context = dict(context, + mail_notify_force_send=False, # do not send emails directly but use the queue instead + mail_create_nosubscribe=True) # add context key to avoid subscribing the author + active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **post_values) return {'type': 'ir.actions.act_window_close'} From a216e70e8513d1b9cad807b738023d8a92d8c8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 14:32:30 +0200 Subject: [PATCH 11/31] [FIX] [IMP] mail: allow to use message_post on models not having message_post method defined. mail.compose.message wizard and messaage_process now check that the active model has message_post defined. Otherwise using thread_model context key that is better managed in message_post, it is possible to use mail_thread.message_post() with a thread_model and thread_id that should not allow message_post otherwise. Hint: look for backport into 7.0 bzr revid: tde@openerp.com-20130606123230-d7ql14yydzfrlc7h --- addons/mail/mail_thread.py | 5 ++++- addons/mail/wizard/mail_compose_message.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 6a32ed3bb52..e676e69552d 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -730,6 +730,9 @@ class mail_thread(osv.AbstractModel): else: assert thread_id == 0, "Posting a message without model should be with a null res_id, to create a private message." model_pool = self.pool.get('mail.thread') + if not hasattr(hasattr, 'message_post'): + context['thread_model'] = model + model_pool = self.pool['mail.thread'] new_msg_id = model_pool.message_post(cr, uid, [thread_id], context=context, subtype='mail.mt_comment', **msg) if partner_ids: @@ -1064,7 +1067,7 @@ class mail_thread(osv.AbstractModel): model = False if thread_id: model = context.get('thread_model', self._name) if self._name == 'mail.thread' else self._name - if model != self._name: + if model != self._name and hasattr(self.pool[model], 'message_post'): del context['thread_model'] return self.pool[model].message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 383929a6e07..e3383270548 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -234,6 +234,9 @@ class mail_compose_message(osv.TransientModel): for wizard in self.browse(cr, uid, ids, context=context): mass_mail_mode = wizard.composition_mode == 'mass_mail' active_model_pool = self.pool[wizard.model if wizard.model else 'mail.thread'] + if not hasattr(active_model_pool, 'message_post'): + context['thread_model'] = wizard.model + active_model_pool = self.pool['mail.thread'] # wizard works in batch mode: [res_id] or active_ids res_ids = active_ids if mass_mail_mode and wizard.model and active_ids else [wizard.res_id] From b3cde8da4a0345ba9f1314681339bcba76bc33d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 14:34:15 +0200 Subject: [PATCH 12/31] [FIX] email_template: allow to define context action even without having create access on ir.values and ir.action Hint: look for backport into 7.0 bzr revid: tde@openerp.com-20130606123415-vuelai2eh1yy3c87 --- addons/email_template/email_template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 4a767457321..c7efb9582fe 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -24,6 +24,7 @@ import base64 import logging import openerp +from openerp import SUPERUSER_ID from openerp.osv import osv, fields from openerp.osv import fields from openerp import tools @@ -199,7 +200,7 @@ class email_template(osv.osv): model_data_id = data_obj._get_id(cr, uid, 'mail', 'email_compose_message_wizard_form') res_id = data_obj.browse(cr, uid, model_data_id, context=context).res_id button_name = _('Send Mail (%s)') % template.name - vals['ref_ir_act_window'] = action_obj.create(cr, uid, { + vals['ref_ir_act_window'] = action_obj.create(cr, SUPERUSER_ID, { 'name': button_name, 'type': 'ir.actions.act_window', 'res_model': 'mail.compose.message', @@ -211,7 +212,7 @@ class email_template(osv.osv): 'target': 'new', 'auto_refresh':1 }, context) - vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, { + vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, SUPERUSER_ID, { 'name': button_name, 'model': src_obj, 'key2': 'client_action_multi', From 72f6a8c646179d433de11c2f26e5f589b5ad8cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 14:37:24 +0200 Subject: [PATCH 13/31] [FIX] mail.compose.message: supports user_signature of template. Note that in case of multiple wizards (send on ids that is not a singleton list), user_signature on one template is valid for all wizard. bzr revid: tde@openerp.com-20130606123724-f7q3mwm81ek7mr5c --- addons/email_template/wizard/mail_compose_message.py | 10 +++++++--- addons/mail/mail_followers.py | 10 +++++++--- addons/mail/mail_message.py | 9 ++++++--- addons/mail/wizard/mail_compose_message.py | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index 7f44828ce15..6fbc541341b 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -54,18 +54,22 @@ class mail_compose_message(osv.TransientModel): Indeed, basic mail.compose.message wizard duplicates attachments in mass mailing mode. But in 'single post' mode, attachments of an email template also have to be duplicated to avoid changing their ownership. """ + if context is None: + context = {} + wizard_context = dict(context) for wizard in self.browse(cr, uid, ids, context=context): + if wizard.template_id and not wizard.template_id.user_signature: + wizard_context['mail_notify_user_signature'] = False # template user_signature is added when generating body_html if not wizard.attachment_ids or wizard.composition_mode == 'mass_mail' or not wizard.template_id: continue - template = self.pool.get('email.template').browse(cr, uid, wizard.template_id.id, context=context) new_attachment_ids = [] for attachment in wizard.attachment_ids: - if attachment in template.attachment_ids: + if attachment in wizard.template.attachment_ids: new_attachment_ids.append(self.pool.get('ir.attachment').copy(cr, uid, attachment.id, {'res_model': 'mail.compose.message', 'res_id': wizard.id}, context=context)) else: new_attachment_ids.append(attachment.id) self.write(cr, uid, wizard.id, {'attachment_ids': [(6, 0, new_attachment_ids)]}, context=context) - return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context) + return super(mail_compose_message, self).send_mail(cr, uid, ids, context=wizard_context) def onchange_template_id(self, cr, uid, ids, template_id, composition_mode, model, res_id, context=None): """ - mass_mailing: we cannot render, so return the template values diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index 93196976e90..bc78c8c61d7 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -150,7 +150,8 @@ class mail_notification(osv.Model): return footer - def _notify(self, cr, uid, msg_id, partners_to_notify=None, context=None, force_send=False): + def _notify(self, cr, uid, msg_id, partners_to_notify=None, context=None, + force_send=False, user_signature=True): """ Send by email the notification depending on the user preferences :param list partners_to_notify: optional list of partner ids restricting @@ -158,6 +159,8 @@ class mail_notification(osv.Model): :param bool force_send: if True, the generated mail.mail is immediately sent after being created, as if the scheduler was executed for this message only. + :param bool user_signature: if True, the generated mail.mail body is + the body of the related mail.message with the author's signature """ if context is None: context = {} @@ -192,8 +195,9 @@ class mail_notification(osv.Model): # add signature body_html = msg.body user_id = msg.author_id and msg.author_id.user_ids and msg.author_id.user_ids[0] and msg.author_id.user_ids[0].id or None - signature_company = self.get_signature_footer(cr, uid, user_id, res_model=msg.model, res_id=msg.res_id, context=context) - body_html = tools.append_content_to_html(body_html, signature_company, plaintext=False, container_tag='div') + if user_signature: + signature_company = self.get_signature_footer(cr, uid, user_id, res_model=msg.model, res_id=msg.res_id, context=context) + body_html = tools.append_content_to_html(body_html, signature_company, plaintext=False, container_tag='div') references = False if msg.parent_id: diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 884d59ba9be..4a22684c36e 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -768,7 +768,9 @@ class mail_message(osv.Model): elif not values.get('message_id'): values['message_id'] = tools.generate_tracking_message_id('private') newid = super(mail_message, self).create(cr, uid, values, context) - self._notify(cr, uid, newid, context=context, force_send=context.get('mail_notify_force_send', True)) + self._notify(cr, uid, newid, context=context, + force_send=context.get('mail_notify_force_send', True), + user_signature=context.get('mail_notify_user_signature', True)) # TDE FIXME: handle default_starred. Why not setting an inv on starred ? # Because starred will call set_message_starred, that looks for notifications. # When creating a new mail_message, it will create a notification to a message @@ -882,7 +884,7 @@ class mail_message(osv.Model): return '' return result - def _notify(self, cr, uid, newid, context=None, force_send=False): + def _notify(self, cr, uid, newid, context=None, force_send=False, user_signature=True): """ Add the related record followers to the destination partner_ids if is not a private message. Call mail_notification.notify to manage the email sending """ @@ -912,7 +914,8 @@ class mail_message(osv.Model): # notify if partners_to_notify: - notification_obj._notify(cr, uid, newid, partners_to_notify=[p.id for p in partners_to_notify], context=context, force_send=force_send) + notification_obj._notify(cr, uid, newid, partners_to_notify=[p.id for p in partners_to_notify], context=context, + force_send=force_send, user_signature=user_signature) message.refresh() # An error appear when a user receive a notification without notifying diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index e3383270548..64886628478 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -157,7 +157,7 @@ class mail_compose_message(osv.TransientModel): return super(mail_compose_message, self).check_access_rule(cr, uid, ids, operation, context=context) - def _notify(self, cr, uid, newid, context=None, force_send=False): + def _notify(self, cr, uid, newid, context=None, force_send=False, user_signature=True): """ Override specific notify method of mail.message, because we do not want that feature in the wizard. """ return From 62a03693a39a59bf1833dbed0e4aff32ee5ca8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 15:08:51 +0200 Subject: [PATCH 14/31] [FIX] mail.compose.message in email_template: var typo bzr revid: tde@openerp.com-20130606130851-h5jswklvvz98enue --- addons/email_template/wizard/mail_compose_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index 6fbc541341b..746c2cc55f6 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -64,7 +64,7 @@ class mail_compose_message(osv.TransientModel): continue new_attachment_ids = [] for attachment in wizard.attachment_ids: - if attachment in wizard.template.attachment_ids: + if attachment in wizard.template_id.attachment_ids: new_attachment_ids.append(self.pool.get('ir.attachment').copy(cr, uid, attachment.id, {'res_model': 'mail.compose.message', 'res_id': wizard.id}, context=context)) else: new_attachment_ids.append(attachment.id) From 05d463a0e2172095589b6601548fcaaf4e5999be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 16:27:20 +0200 Subject: [PATCH 15/31] [FIX] mail_mail: sdearch view: no need to have default_type_email bzr revid: tde@openerp.com-20130606142720-ghs664yqhgemd132 --- addons/mail/mail_mail_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_mail_view.xml b/addons/mail/mail_mail_view.xml index 1ff9a2a292e..e8e544791c8 100644 --- a/addons/mail/mail_mail_view.xml +++ b/addons/mail/mail_mail_view.xml @@ -110,7 +110,7 @@ mail.mail form tree,form - {'search_default_outgoing': 1, 'search_default_type_email': 1} + {'search_default_outgoing': 1} From a1e942c0dec4d016655f12031c9a78336b2d83d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 16:28:14 +0200 Subject: [PATCH 16/31] [FIX] mail.compose.message: fixed reply_to from template in mass mailing. bzr revid: tde@openerp.com-20130606142814-jyw76nhaeivotu6k --- addons/mail/mail_mail.py | 10 +++++++--- addons/mail/mail_message.py | 3 --- addons/mail/wizard/mail_compose_message.py | 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 4da3b27bd7d..4cf319a0cc4 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -66,6 +66,9 @@ class mail_mail(osv.Model): } def _get_default_from(self, cr, uid, context=None): + """ Kept for compatibility + TDE TODO: remove me in 8.0 + """ return self.pool['mail.message']._get_default_from(cr, uid, context=context) _defaults = { @@ -85,14 +88,15 @@ class mail_mail(osv.Model): """ if values.get('reply_to'): return values.get('reply_to') - email_reply_to = False - # model, res_id: comes from values OR related message + # email_reply_to, model, res_id: comes from values OR related message + email_reply_to = False model = values.get('model') res_id = values.get('res_id') email_from = values.get('email_from') if values.get('mail_message_id') and (not model or not res_id): message = self.pool.get('mail.message').browse(cr, uid, values.get('mail_message_id'), context=context) + email_reply_to = message.reply_to if not model: model = message.model if not res_id: @@ -101,7 +105,7 @@ class mail_mail(osv.Model): email_from = message.email_from # 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 -> reply_to will be the email_from, only the email part if not email_reply_to and email_from: diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 4a22684c36e..a76807bb5e8 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -352,9 +352,6 @@ class mail_message(osv.Model): else: partner_ids = [partner_tree[partner.id] for partner in message.partner_ids if partner.id in partner_tree] - # for partner in message.notified_partner_ids: - # if partner.id in partner_tree: - # partner_ids.append(partner_tree[partner.id]) attachment_ids = [] for attachment in message.attachment_ids: if attachment.id in attachments_tree: diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 64886628478..7685a27f1ed 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -259,13 +259,15 @@ class mail_compose_message(osv.TransientModel): new_attach_id = ir_attachment_obj.copy(cr, uid, attach_id, {'res_model': self._name, 'res_id': wizard.id}, context=context) attachment_ids.append(new_attach_id) post_values['attachment_ids'] = attachment_ids - post_values.update(email_dict) # email_from: mass mailing only can specify another email_from if email_dict.get('email_from'): post_values['email_from'] = email_dict.pop('email_from') # replies redirection: mass mailing only if not wizard.same_thread: post_values['reply_to'] = email_dict.pop('reply_to') + else: + email_dict.pop('reply_to') + post_values.update(email_dict) # clean the context (hint: mass mailing sets some default values that # could be wrongly interpreted by mail_mail) context.pop('default_email_to', None) From 1ef65f15772bda4a82bd069b87bd1c782f09278e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 17:14:40 +0200 Subject: [PATCH 17/31] [FIX] mail_mail: reply_to: use tools.email_split to avoid issues when handling email addresses. bzr revid: tde@openerp.com-20130606151440-atdhk834ny248xqq --- addons/mail/mail_mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 4cf319a0cc4..34278079fb5 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -96,7 +96,7 @@ class mail_mail(osv.Model): email_from = values.get('email_from') if values.get('mail_message_id') and (not model or not res_id): message = self.pool.get('mail.message').browse(cr, uid, values.get('mail_message_id'), context=context) - email_reply_to = message.reply_to + email_reply_to = tools.email_split(message.reply_to) if not model: model = message.model if not res_id: From 30a77204524c964f28626207772552115861bbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 17:25:38 +0200 Subject: [PATCH 18/31] [IMP] mail_message: added reply_to to the form view of mail.message bzr revid: tde@openerp.com-20130606152538-4u3s1k4vvkotxz6c --- addons/mail/mail_mail.py | 3 ++- addons/mail/mail_message_view.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 34278079fb5..2b0bb6a6959 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -96,7 +96,8 @@ class mail_mail(osv.Model): email_from = values.get('email_from') if values.get('mail_message_id') and (not model or not res_id): message = self.pool.get('mail.message').browse(cr, uid, values.get('mail_message_id'), context=context) - email_reply_to = tools.email_split(message.reply_to) + if message.reply_to: + email_reply_to = tools.email_split(message.reply_to)[0] if not model: model = message.model if not res_id: diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index 8f2fb3f1020..abe381c9ceb 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -30,9 +30,9 @@ + - @@ -40,6 +40,7 @@ + From 216cb2122e8e3b5784e666ad2b06d60c3fc72751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Jun 2013 17:28:14 +0200 Subject: [PATCH 19/31] [IMP] mail: mass_mailing: avoid having 'Followers of' when having a specified reply_to coming from the mail_message bzr revid: tde@openerp.com-20130606152814-iqftppk06s7g8weg --- addons/mail/mail_mail.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 2b0bb6a6959..62c1a9fff19 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -88,6 +88,7 @@ class mail_mail(osv.Model): """ if values.get('reply_to'): return values.get('reply_to') + redirect_gateway = True # whether replies will be redirected inside the document # email_reply_to, model, res_id: comes from values OR related message email_reply_to = False @@ -97,7 +98,8 @@ class mail_mail(osv.Model): if values.get('mail_message_id') and (not model or not res_id): message = self.pool.get('mail.message').browse(cr, uid, values.get('mail_message_id'), context=context) if message.reply_to: - email_reply_to = tools.email_split(message.reply_to)[0] + email_reply_to = message.reply_to + redirect_gateway = False if not model: model = message.model if not res_id: @@ -115,7 +117,7 @@ class mail_mail(osv.Model): email_reply_to = emails[0] # format 'Document name ' - if email_reply_to and model and res_id: + if email_reply_to and model and res_id and redirect_gateway: document_name = self.pool[model].name_get(cr, SUPERUSER_ID, [res_id], context=context)[0] if document_name: # sanitize document name From a3e430ec639d8c65a91013879f95fa22fafee5df Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 6 Jun 2013 18:20:20 +0200 Subject: [PATCH 20/31] Changed to use werkzeug's LocalStack bzr revid: nicolas.vanhoren@openerp.com-20130606162020-oemq8eyuxr47a2e1 --- addons/web/http.py | 42 +++++++++++++------------------- addons/web/tests/test_dataset.py | 2 +- addons/web/tests/test_menu.py | 4 +-- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/addons/web/http.py b/addons/web/http.py index 9377ab02df8..e34ff3d382e 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -355,27 +355,19 @@ def httprequest(f): #---------------------------------------------------------- # Local storage of requests #---------------------------------------------------------- -_thlocal = threading.local() +from werkzeug.local import LocalStack -class RequestProxy(object): - def __getattr__(self, name): - return getattr(_thlocal.stack[-1], name) - def __setattr__(self, name, val): - return setattr(_thlocal.stack[-1], name, val) - def __delattr__(self, name): - return delattr(_thlocal.stack[-1], name) - @classmethod - def set_request(cls, request): - class with_obj(object): - def __enter__(self): - if getattr(_thlocal, "stack", None) is None: - _thlocal.stack = [] - _thlocal.stack.append(request) - def __exit__(self, *args): - _thlocal.stack.pop() - return with_obj() +_request_stack = LocalStack() -request = RequestProxy() +def set_request(request): + class with_obj(object): + def __enter__(self): + _request_stack.push(request) + def __exit__(self, *args): + _request_stack.pop() + return with_obj() + +request = _request_stack() #---------------------------------------------------------- # Controller registration with a metaclass @@ -659,16 +651,16 @@ class Root(object): if exposed == 'json': _logger.debug("Dispatch json to %s %s %s", ps, c, method_name) def fct(request): - req = JsonRequest(request) - with RequestProxy.set_request(req): - return req.dispatch(method) + _req = JsonRequest(request) + with set_request(_req): + return request.dispatch(method) return fct elif exposed == 'http': _logger.debug("Dispatch http to %s %s %s", ps, c, method_name) def fct(request): - req = HttpRequest(request) - with RequestProxy.set_request(req): - return req.dispatch(method) + _req = HttpRequest(request) + with set_request(_req): + return request.dispatch(method) return fct if method_name != "index": method_name = "index" diff --git a/addons/web/tests/test_dataset.py b/addons/web/tests/test_dataset.py index 72cd99a259b..8d6e7e78c03 100644 --- a/addons/web/tests/test_dataset.py +++ b/addons/web/tests/test_dataset.py @@ -3,7 +3,7 @@ import mock import unittest2 import openerp.addons.web.controllers.main from openerp.addons.web.http import request as req -from openerp.addons.web.http import RequestProxy +from openerp.addons.web.http import _request_stack class TestDataSetController(unittest2.TestCase): def setUp(self): diff --git a/addons/web/tests/test_menu.py b/addons/web/tests/test_menu.py index 7360354be43..6c86efe2fc6 100644 --- a/addons/web/tests/test_menu.py +++ b/addons/web/tests/test_menu.py @@ -3,7 +3,7 @@ import collections import mock import unittest2 from openerp.addons.web.http import request as req -from openerp.addons.web.http import RequestProxy +from openerp.addons.web.http import set_request from ..controllers import main @@ -15,7 +15,7 @@ class Placeholder(object): class LoadTest(unittest2.TestCase): def setUp(self): self.menu = main.Menu() - self.tmp_req = RequestProxy.set_request(mock.Mock()) + self.tmp_req = set_request(mock.Mock()) self.tmp_req.__enter__() # Have self.request.session.model() return a different mock object for From 3d782a25d91ff1472e2a2339d0bd112ee6bcd77a Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 6 Jun 2013 18:47:26 +0200 Subject: [PATCH 21/31] fix stupid bug bzr revid: nicolas.vanhoren@openerp.com-20130606164726-zdwd4rf93m7unt35 --- addons/web/http.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/http.py b/addons/web/http.py index e34ff3d382e..67d71ac7d37 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -650,15 +650,15 @@ class Root(object): method = c.get_wrapped_method(method_name) if exposed == 'json': _logger.debug("Dispatch json to %s %s %s", ps, c, method_name) - def fct(request): - _req = JsonRequest(request) + def fct(_request): + _req = JsonRequest(_request) with set_request(_req): return request.dispatch(method) return fct elif exposed == 'http': _logger.debug("Dispatch http to %s %s %s", ps, c, method_name) - def fct(request): - _req = HttpRequest(request) + def fct(_request): + _req = HttpRequest(_request) with set_request(_req): return request.dispatch(method) return fct From 72f82f8fa3cafbaaa8f0e1fbec87da571e2fbac6 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Fri, 7 Jun 2013 05:48:01 +0000 Subject: [PATCH 22/31] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20130607054801-oxz1o62tu2fx01d8 --- openerp/addons/base/i18n/ab.po | 4 ++-- openerp/addons/base/i18n/af.po | 4 ++-- openerp/addons/base/i18n/am.po | 4 ++-- openerp/addons/base/i18n/ar.po | 4 ++-- openerp/addons/base/i18n/bg.po | 4 ++-- openerp/addons/base/i18n/bs.po | 4 ++-- openerp/addons/base/i18n/ca.po | 4 ++-- openerp/addons/base/i18n/cs.po | 4 ++-- openerp/addons/base/i18n/da.po | 4 ++-- openerp/addons/base/i18n/de.po | 4 ++-- openerp/addons/base/i18n/el.po | 4 ++-- openerp/addons/base/i18n/en_GB.po | 4 ++-- openerp/addons/base/i18n/es.po | 4 ++-- openerp/addons/base/i18n/es_AR.po | 4 ++-- openerp/addons/base/i18n/es_CL.po | 4 ++-- openerp/addons/base/i18n/es_CR.po | 4 ++-- openerp/addons/base/i18n/es_DO.po | 4 ++-- openerp/addons/base/i18n/es_EC.po | 4 ++-- openerp/addons/base/i18n/es_MX.po | 12 ++++++------ openerp/addons/base/i18n/es_VE.po | 4 ++-- openerp/addons/base/i18n/et.po | 4 ++-- openerp/addons/base/i18n/eu.po | 4 ++-- openerp/addons/base/i18n/fa.po | 4 ++-- openerp/addons/base/i18n/fa_AF.po | 4 ++-- openerp/addons/base/i18n/fi.po | 4 ++-- openerp/addons/base/i18n/fr.po | 4 ++-- openerp/addons/base/i18n/fr_CA.po | 4 ++-- openerp/addons/base/i18n/gl.po | 4 ++-- openerp/addons/base/i18n/gu.po | 4 ++-- openerp/addons/base/i18n/he.po | 4 ++-- openerp/addons/base/i18n/hi.po | 4 ++-- openerp/addons/base/i18n/hr.po | 4 ++-- openerp/addons/base/i18n/hu.po | 4 ++-- openerp/addons/base/i18n/hy.po | 4 ++-- openerp/addons/base/i18n/id.po | 4 ++-- openerp/addons/base/i18n/is.po | 4 ++-- openerp/addons/base/i18n/it.po | 4 ++-- openerp/addons/base/i18n/ja.po | 4 ++-- openerp/addons/base/i18n/ka.po | 4 ++-- openerp/addons/base/i18n/kk.po | 4 ++-- openerp/addons/base/i18n/ko.po | 4 ++-- openerp/addons/base/i18n/lt.po | 6 +++--- openerp/addons/base/i18n/lv.po | 4 ++-- openerp/addons/base/i18n/mk.po | 4 ++-- openerp/addons/base/i18n/mn.po | 6 +++--- openerp/addons/base/i18n/nb.po | 4 ++-- openerp/addons/base/i18n/nl.po | 4 ++-- openerp/addons/base/i18n/nl_BE.po | 4 ++-- openerp/addons/base/i18n/pl.po | 4 ++-- openerp/addons/base/i18n/pt.po | 4 ++-- openerp/addons/base/i18n/pt_BR.po | 4 ++-- openerp/addons/base/i18n/ro.po | 6 +++--- openerp/addons/base/i18n/ru.po | 8 ++++---- openerp/addons/base/i18n/sk.po | 4 ++-- openerp/addons/base/i18n/sl.po | 4 ++-- openerp/addons/base/i18n/sq.po | 4 ++-- openerp/addons/base/i18n/sr.po | 4 ++-- openerp/addons/base/i18n/sr@latin.po | 4 ++-- openerp/addons/base/i18n/sv.po | 4 ++-- openerp/addons/base/i18n/th.po | 4 ++-- openerp/addons/base/i18n/tlh.po | 4 ++-- openerp/addons/base/i18n/tr.po | 4 ++-- openerp/addons/base/i18n/uk.po | 4 ++-- openerp/addons/base/i18n/ur.po | 4 ++-- openerp/addons/base/i18n/vi.po | 4 ++-- openerp/addons/base/i18n/zh_CN.po | 4 ++-- openerp/addons/base/i18n/zh_HK.po | 4 ++-- openerp/addons/base/i18n/zh_TW.po | 4 ++-- 68 files changed, 145 insertions(+), 145 deletions(-) diff --git a/openerp/addons/base/i18n/ab.po b/openerp/addons/base/i18n/ab.po index 7af6e1524f8..9cc0e7b2850 100644 --- a/openerp/addons/base/i18n/ab.po +++ b/openerp/addons/base/i18n/ab.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:34+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:37+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/af.po b/openerp/addons/base/i18n/af.po index 6d8573f34d4..0cf597bec43 100644 --- a/openerp/addons/base/i18n/af.po +++ b/openerp/addons/base/i18n/af.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:34+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:37+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/am.po b/openerp/addons/base/i18n/am.po index 00dbf2e5e26..08a42e5a6fe 100644 --- a/openerp/addons/base/i18n/am.po +++ b/openerp/addons/base/i18n/am.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:37+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ar.po b/openerp/addons/base/i18n/ar.po index 89575f91a34..551cc34f768 100644 --- a/openerp/addons/base/i18n/ar.po +++ b/openerp/addons/base/i18n/ar.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:37+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/bg.po b/openerp/addons/base/i18n/bg.po index c48bc218236..0efcc17590c 100644 --- a/openerp/addons/base/i18n/bg.po +++ b/openerp/addons/base/i18n/bg.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/bs.po b/openerp/addons/base/i18n/bs.po index 63e75a010fc..dc043123b88 100644 --- a/openerp/addons/base/i18n/bs.po +++ b/openerp/addons/base/i18n/bs.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ca.po b/openerp/addons/base/i18n/ca.po index 0e34428b4a9..ad5eb21372e 100644 --- a/openerp/addons/base/i18n/ca.po +++ b/openerp/addons/base/i18n/ca.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/cs.po b/openerp/addons/base/i18n/cs.po index 07c5ffaa626..474dab909d3 100644 --- a/openerp/addons/base/i18n/cs.po +++ b/openerp/addons/base/i18n/cs.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" "X-Poedit-Language: Czech\n" #. module: base diff --git a/openerp/addons/base/i18n/da.po b/openerp/addons/base/i18n/da.po index a0f1bdb1119..99f75200892 100644 --- a/openerp/addons/base/i18n/da.po +++ b/openerp/addons/base/i18n/da.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/de.po b/openerp/addons/base/i18n/de.po index fb99f781d75..aa787e2e7a0 100644 --- a/openerp/addons/base/i18n/de.po +++ b/openerp/addons/base/i18n/de.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/el.po b/openerp/addons/base/i18n/el.po index 251288b48e6..7ee65d7ab87 100644 --- a/openerp/addons/base/i18n/el.po +++ b/openerp/addons/base/i18n/el.po @@ -12,8 +12,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" "X-Poedit-Country: GREECE\n" "X-Poedit-Language: Greek\n" "X-Poedit-SourceCharset: utf-8\n" diff --git a/openerp/addons/base/i18n/en_GB.po b/openerp/addons/base/i18n/en_GB.po index 3b216230833..f5eaeeda21b 100644 --- a/openerp/addons/base/i18n/en_GB.po +++ b/openerp/addons/base/i18n/en_GB.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es.po b/openerp/addons/base/i18n/es.po index 3d654f3ffb9..a6318639b14 100644 --- a/openerp/addons/base/i18n/es.po +++ b/openerp/addons/base/i18n/es.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es_AR.po b/openerp/addons/base/i18n/es_AR.po index a7b4a38a7c4..85cc80ae370 100644 --- a/openerp/addons/base/i18n/es_AR.po +++ b/openerp/addons/base/i18n/es_AR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es_CL.po b/openerp/addons/base/i18n/es_CL.po index d260ce1daad..1ef637f698d 100644 --- a/openerp/addons/base/i18n/es_CL.po +++ b/openerp/addons/base/i18n/es_CL.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es_CR.po b/openerp/addons/base/i18n/es_CR.po index a570b5954fa..81b27514c2f 100644 --- a/openerp/addons/base/i18n/es_CR.po +++ b/openerp/addons/base/i18n/es_CR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" "Language: \n" #. module: base diff --git a/openerp/addons/base/i18n/es_DO.po b/openerp/addons/base/i18n/es_DO.po index b55f4ab702f..1fd0b6a74da 100644 --- a/openerp/addons/base/i18n/es_DO.po +++ b/openerp/addons/base/i18n/es_DO.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es_EC.po b/openerp/addons/base/i18n/es_EC.po index 5e3b2ae78b9..a7a2b61d368 100644 --- a/openerp/addons/base/i18n/es_EC.po +++ b/openerp/addons/base/i18n/es_EC.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:44+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/es_MX.po b/openerp/addons/base/i18n/es_MX.po index 19e3ffe29b4..97849d10113 100644 --- a/openerp/addons/base/i18n/es_MX.po +++ b/openerp/addons/base/i18n/es_MX.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:44+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing @@ -1499,7 +1499,7 @@ msgstr "" #: model:ir.module.category,name:base.module_category_purchase_management #: model:ir.ui.menu,name:base.menu_purchase_root msgid "Purchases" -msgstr "" +msgstr "Compras" #. module: base #: model:res.country,name:base.md @@ -2120,7 +2120,7 @@ msgstr "" #: model:ir.ui.menu,name:base.menu_administration #: model:res.groups,name:base.group_system msgid "Settings" -msgstr "" +msgstr "Configuración" #. module: base #: selection:ir.actions.act_window,view_type:0 @@ -11484,7 +11484,7 @@ msgstr "" #: model:ir.ui.menu,name:base.menu_mrp_config #: model:ir.ui.menu,name:base.menu_mrp_root msgid "Manufacturing" -msgstr "" +msgstr "Manufactura" #. module: base #: model:res.country,name:base.km @@ -12585,7 +12585,7 @@ msgstr "" #: model:ir.ui.menu,name:base.menu_procurement_management_supplier_name #: view:res.partner:0 msgid "Suppliers" -msgstr "" +msgstr "Proveedores" #. module: base #: field:res.request,ref_doc2:0 diff --git a/openerp/addons/base/i18n/es_VE.po b/openerp/addons/base/i18n/es_VE.po index 12a93c92dee..54f2110afc7 100644 --- a/openerp/addons/base/i18n/es_VE.po +++ b/openerp/addons/base/i18n/es_VE.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/et.po b/openerp/addons/base/i18n/et.po index 952d49f3582..03aa5ad4c01 100644 --- a/openerp/addons/base/i18n/et.po +++ b/openerp/addons/base/i18n/et.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:39+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/eu.po b/openerp/addons/base/i18n/eu.po index fdf28c901ed..371f9bbbfd2 100644 --- a/openerp/addons/base/i18n/eu.po +++ b/openerp/addons/base/i18n/eu.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/fa.po b/openerp/addons/base/i18n/fa.po index 587af30eaee..8d02e7fef3c 100644 --- a/openerp/addons/base/i18n/fa.po +++ b/openerp/addons/base/i18n/fa.po @@ -9,8 +9,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" "X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n" "X-Poedit-Language: Persian\n" diff --git a/openerp/addons/base/i18n/fa_AF.po b/openerp/addons/base/i18n/fa_AF.po index 6d518766f14..7b1d91cb0a7 100644 --- a/openerp/addons/base/i18n/fa_AF.po +++ b/openerp/addons/base/i18n/fa_AF.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:44+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/fi.po b/openerp/addons/base/i18n/fi.po index 2d09111d801..0b79c152cf3 100644 --- a/openerp/addons/base/i18n/fi.po +++ b/openerp/addons/base/i18n/fi.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:39+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/fr.po b/openerp/addons/base/i18n/fr.po index 417a71c97d7..7718c277767 100644 --- a/openerp/addons/base/i18n/fr.po +++ b/openerp/addons/base/i18n/fr.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:39+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/fr_CA.po b/openerp/addons/base/i18n/fr_CA.po index d05bf4276f8..720c275186a 100644 --- a/openerp/addons/base/i18n/fr_CA.po +++ b/openerp/addons/base/i18n/fr_CA.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/gl.po b/openerp/addons/base/i18n/gl.po index 6343c0e76b1..027385a2a25 100644 --- a/openerp/addons/base/i18n/gl.po +++ b/openerp/addons/base/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/gu.po b/openerp/addons/base/i18n/gu.po index 6bb3ca3d14e..0f26df674b4 100644 --- a/openerp/addons/base/i18n/gu.po +++ b/openerp/addons/base/i18n/gu.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/he.po b/openerp/addons/base/i18n/he.po index 69a0a2c88d1..502532e67ec 100644 --- a/openerp/addons/base/i18n/he.po +++ b/openerp/addons/base/i18n/he.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/hi.po b/openerp/addons/base/i18n/hi.po index 06f4e0fed4f..1f37935dad0 100644 --- a/openerp/addons/base/i18n/hi.po +++ b/openerp/addons/base/i18n/hi.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/hr.po b/openerp/addons/base/i18n/hr.po index 9e91efc2bb3..b4ade976630 100644 --- a/openerp/addons/base/i18n/hr.po +++ b/openerp/addons/base/i18n/hr.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" "Language: hr\n" #. module: base diff --git a/openerp/addons/base/i18n/hu.po b/openerp/addons/base/i18n/hu.po index 76a3f46e601..9b90b6992bc 100644 --- a/openerp/addons/base/i18n/hu.po +++ b/openerp/addons/base/i18n/hu.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:40+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/hy.po b/openerp/addons/base/i18n/hy.po index 99c15b74aa0..1facea9fc90 100644 --- a/openerp/addons/base/i18n/hy.po +++ b/openerp/addons/base/i18n/hy.po @@ -9,8 +9,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:38+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/id.po b/openerp/addons/base/i18n/id.po index 3836161f012..b533ca396af 100644 --- a/openerp/addons/base/i18n/id.po +++ b/openerp/addons/base/i18n/id.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/is.po b/openerp/addons/base/i18n/is.po index 0b001fa9200..36cdbb01fda 100644 --- a/openerp/addons/base/i18n/is.po +++ b/openerp/addons/base/i18n/is.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/it.po b/openerp/addons/base/i18n/it.po index 355c1a5e533..dcc5b7adb9b 100644 --- a/openerp/addons/base/i18n/it.po +++ b/openerp/addons/base/i18n/it.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ja.po b/openerp/addons/base/i18n/ja.po index 605651345ec..aff83c73a4c 100644 --- a/openerp/addons/base/i18n/ja.po +++ b/openerp/addons/base/i18n/ja.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ka.po b/openerp/addons/base/i18n/ka.po index b5d09929b8e..17aef0d8f33 100644 --- a/openerp/addons/base/i18n/ka.po +++ b/openerp/addons/base/i18n/ka.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:37+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:39+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/kk.po b/openerp/addons/base/i18n/kk.po index 47978eff537..5118d61c5f0 100644 --- a/openerp/addons/base/i18n/kk.po +++ b/openerp/addons/base/i18n/kk.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:38+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ko.po b/openerp/addons/base/i18n/ko.po index 3464b893144..293d8cc72f1 100644 --- a/openerp/addons/base/i18n/ko.po +++ b/openerp/addons/base/i18n/ko.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:41+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/lt.po b/openerp/addons/base/i18n/lt.po index aee19a61367..2ef5ef6b535 100644 --- a/openerp/addons/base/i18n/lt.po +++ b/openerp/addons/base/i18n/lt.po @@ -8,13 +8,13 @@ msgstr "" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" "PO-Revision-Date: 2012-08-20 15:52+0000\n" -"Last-Translator: Paulius Sladkevičius \n" +"Last-Translator: Paulius Sladkevičius @ hbee \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-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/lv.po b/openerp/addons/base/i18n/lv.po index 5ceb886ddbb..95fc28e15b9 100644 --- a/openerp/addons/base/i18n/lv.po +++ b/openerp/addons/base/i18n/lv.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/mk.po b/openerp/addons/base/i18n/mk.po index e5cf896bc7b..978576b95e6 100644 --- a/openerp/addons/base/i18n/mk.po +++ b/openerp/addons/base/i18n/mk.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/mn.po b/openerp/addons/base/i18n/mn.po index f85b6fe4463..f50197989d7 100644 --- a/openerp/addons/base/i18n/mn.po +++ b/openerp/addons/base/i18n/mn.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing @@ -4578,7 +4578,7 @@ msgstr "" #. module: base #: model:res.country,name:base.je msgid "Jersey" -msgstr "" +msgstr "Жерси" #. module: base #: model:ir.model,name:base.model_ir_translation diff --git a/openerp/addons/base/i18n/nb.po b/openerp/addons/base/i18n/nb.po index fe320066e8d..571e5cdf6c2 100644 --- a/openerp/addons/base/i18n/nb.po +++ b/openerp/addons/base/i18n/nb.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:39+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:42+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/nl.po b/openerp/addons/base/i18n/nl.po index 594601e0c7e..8ee10c1d7c0 100644 --- a/openerp/addons/base/i18n/nl.po +++ b/openerp/addons/base/i18n/nl.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:36+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:39+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/nl_BE.po b/openerp/addons/base/i18n/nl_BE.po index 289d79a74f2..2a5ed69834e 100644 --- a/openerp/addons/base/i18n/nl_BE.po +++ b/openerp/addons/base/i18n/nl_BE.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:46+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/pl.po b/openerp/addons/base/i18n/pl.po index 6ee42e74876..d5f070660a2 100644 --- a/openerp/addons/base/i18n/pl.po +++ b/openerp/addons/base/i18n/pl.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/pt.po b/openerp/addons/base/i18n/pt.po index 7f68992f3a6..27259e76463 100644 --- a/openerp/addons/base/i18n/pt.po +++ b/openerp/addons/base/i18n/pt.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/pt_BR.po b/openerp/addons/base/i18n/pt_BR.po index e54d792b492..c275b8703da 100644 --- a/openerp/addons/base/i18n/pt_BR.po +++ b/openerp/addons/base/i18n/pt_BR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ro.po b/openerp/addons/base/i18n/ro.po index b3f569ba43d..251db2d607d 100644 --- a/openerp/addons/base/i18n/ro.po +++ b/openerp/addons/base/i18n/ro.po @@ -8,13 +8,13 @@ msgstr "" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" "PO-Revision-Date: 2013-01-05 18:18+0000\n" -"Last-Translator: Fekete Mihai \n" +"Last-Translator: ERPSystems.ro \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-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ru.po b/openerp/addons/base/i18n/ru.po index 5a969f1484e..2613756d4fc 100644 --- a/openerp/addons/base/i18n/ru.po +++ b/openerp/addons/base/i18n/ru.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing @@ -9524,7 +9524,7 @@ msgstr "" #. module: base #: model:ir.module.module,shortdesc:base.module_base_status msgid "State/Stage Management" -msgstr "Управление этапами/состояниями" +msgstr "Управление этапами/стадиями" #. module: base #: model:ir.module.category,name:base.module_category_warehouse_management @@ -12473,7 +12473,7 @@ msgstr "Тип отчета" #: view:res.partner.bank:0 #: view:res.users:0 msgid "State" -msgstr "Состояние" +msgstr "Область" #. module: base #: selection:base.language.install,lang:0 diff --git a/openerp/addons/base/i18n/sk.po b/openerp/addons/base/i18n/sk.po index 803f9fb01b2..459fb621f31 100644 --- a/openerp/addons/base/i18n/sk.po +++ b/openerp/addons/base/i18n/sk.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/sl.po b/openerp/addons/base/i18n/sl.po index c47b970d7c5..9eefc4eb535 100644 --- a/openerp/addons/base/i18n/sl.po +++ b/openerp/addons/base/i18n/sl.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/sq.po b/openerp/addons/base/i18n/sq.po index 2b87d186310..1a77848d2f1 100644 --- a/openerp/addons/base/i18n/sq.po +++ b/openerp/addons/base/i18n/sq.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:35+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:37+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/sr.po b/openerp/addons/base/i18n/sr.po index 4514cb16e2f..91735110f72 100644 --- a/openerp/addons/base/i18n/sr.po +++ b/openerp/addons/base/i18n/sr.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:40+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:43+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/sr@latin.po b/openerp/addons/base/i18n/sr@latin.po index 6330e0e63c9..11a30571822 100644 --- a/openerp/addons/base/i18n/sr@latin.po +++ b/openerp/addons/base/i18n/sr@latin.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:44+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/sv.po b/openerp/addons/base/i18n/sv.po index d2707a81c30..0e94ed50ba6 100644 --- a/openerp/addons/base/i18n/sv.po +++ b/openerp/addons/base/i18n/sv.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/th.po b/openerp/addons/base/i18n/th.po index 66a72757e5c..2977930c94f 100644 --- a/openerp/addons/base/i18n/th.po +++ b/openerp/addons/base/i18n/th.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/tlh.po b/openerp/addons/base/i18n/tlh.po index d8cddb87e35..d1d38477152 100644 --- a/openerp/addons/base/i18n/tlh.po +++ b/openerp/addons/base/i18n/tlh.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:41+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:44+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/tr.po b/openerp/addons/base/i18n/tr.po index bf2ffb2683d..79968df3bd6 100644 --- a/openerp/addons/base/i18n/tr.po +++ b/openerp/addons/base/i18n/tr.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/uk.po b/openerp/addons/base/i18n/uk.po index 5048334a4da..27d7e4e4fd7 100644 --- a/openerp/addons/base/i18n/uk.po +++ b/openerp/addons/base/i18n/uk.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/ur.po b/openerp/addons/base/i18n/ur.po index afcdc966b84..8ef1ec3a21b 100644 --- a/openerp/addons/base/i18n/ur.po +++ b/openerp/addons/base/i18n/ur.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/vi.po b/openerp/addons/base/i18n/vi.po index e7376ca5a8b..7d7c995e483 100644 --- a/openerp/addons/base/i18n/vi.po +++ b/openerp/addons/base/i18n/vi.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/zh_CN.po b/openerp/addons/base/i18n/zh_CN.po index 0d82259b143..f3ca71ad6f9 100644 --- a/openerp/addons/base/i18n/zh_CN.po +++ b/openerp/addons/base/i18n/zh_CN.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:44+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/zh_HK.po b/openerp/addons/base/i18n/zh_HK.po index 654d083e2ed..df39d811268 100644 --- a/openerp/addons/base/i18n/zh_HK.po +++ b/openerp/addons/base/i18n/zh_HK.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:42+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:45+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing diff --git a/openerp/addons/base/i18n/zh_TW.po b/openerp/addons/base/i18n/zh_TW.po index 1c8a2f0abf2..8e673533192 100644 --- a/openerp/addons/base/i18n/zh_TW.po +++ b/openerp/addons/base/i18n/zh_TW.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-05-30 05:43+0000\n" -"X-Generator: Launchpad (build 16652)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:47+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: base #: model:ir.module.module,description:base.module_account_check_writing From 5deae0458532e46852488171853877f65a3b99d2 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Fri, 7 Jun 2013 05:48:25 +0000 Subject: [PATCH 23/31] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20130607054825-38kbw2umxndg1w3v --- addons/crm/i18n/ru.po | 19 +- addons/crm_helpdesk/i18n/zh_CN.po | 14 +- addons/crm_partner_assign/i18n/ru.po | 10 +- addons/multi_company/i18n/ru.po | 16 +- addons/note/i18n/ru.po | 286 +++++++++++++++++++++++++++ addons/sale/i18n/ru.po | 10 +- addons/sale_stock/i18n/ru.po | 100 +++++----- 7 files changed, 388 insertions(+), 67 deletions(-) create mode 100644 addons/note/i18n/ru.po diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po index ec2a9f35ee5..0029293866c 100644 --- a/addons/crm/i18n/ru.po +++ b/addons/crm/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-05-30 13:52+0000\n" +"PO-Revision-Date: 2013-06-06 09:56+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-05-31 05:38+0000\n" -"X-Generator: Launchpad (build 16660)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: crm #: view:crm.lead.report:0 @@ -56,6 +56,11 @@ msgid "" "Description: [[object.description]]\n" " " msgstr "" +"Внимание, необработанный кандидат создан более 5 дней назад.\n" +"Название: [[object.name ]]\n" +"Идентификатор: [[object.id ]]\n" +"Описание: [[object.description]]\n" +" " #. module: crm #: field:crm.opportunity2phonecall,action:0 @@ -953,7 +958,7 @@ msgstr "Следующее действие" #: code:addons/crm/crm_lead.py:763 #, python-format msgid "Partner set to %s." -msgstr "" +msgstr "Партнер установлен как %s." #. module: crm #: selection:crm.lead.report,state:0 @@ -1894,7 +1899,7 @@ msgstr "Кандидаты" #: code:addons/crm/crm_lead.py:563 #, python-format msgid "Merged leads" -msgstr "" +msgstr "Объединенные кандидаты" #. module: crm #: model:crm.case.categ,name:crm.categ_oppor5 @@ -2721,7 +2726,7 @@ msgstr "Улица (2-я строка)" #. module: crm #: field:sale.config.settings,module_crm_helpdesk:0 msgid "Manage Helpdesk and Support" -msgstr "" +msgstr "Управление поддержкой" #. module: crm #: field:crm.lead.report,delay_open:0 @@ -2830,7 +2835,7 @@ msgstr "Дата создания" #. module: crm #: view:crm.lead:0 msgid "at" -msgstr "" +msgstr "в" #. module: crm #: model:crm.case.stage,name:crm.stage_lead1 diff --git a/addons/crm_helpdesk/i18n/zh_CN.po b/addons/crm_helpdesk/i18n/zh_CN.po index 4a80e7f9385..7c8275f606a 100644 --- a/addons/crm_helpdesk/i18n/zh_CN.po +++ b/addons/crm_helpdesk/i18n/zh_CN.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-14 13:33+0000\n" -"Last-Translator: 盈通 ccdos \n" +"PO-Revision-Date: 2013-06-07 05:02+0000\n" +"Last-Translator: PeterGao <306739889@qq.com>\n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:46+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: crm_helpdesk #: field:crm.helpdesk.report,delay_close:0 @@ -656,6 +656,12 @@ msgid "" " \n" "If the case needs to be reviewed then the status is set to 'Pending'." msgstr "" +"当一个“case(事件)\"被新创建后,这个“case(事件)\"的状态为“草稿”状态。 " +" \n" +"若这个“case(事件)\"正在处理中,这个“case(事件)\"的状态为“开启”状态。\n" +"若这个“case(事件)\"已处理完结,这个“case(事件)\"的状态为“结单”状态。 " +" \n" +"若这个“case(事件)\"需暂停再议,这个“case(事件)\"的状态为“挂起”状态。" #. module: crm_helpdesk #: help:crm.helpdesk,message_ids:0 diff --git a/addons/crm_partner_assign/i18n/ru.po b/addons/crm_partner_assign/i18n/ru.po index 53a2929be4e..fa995c8e7a1 100644 --- a/addons/crm_partner_assign/i18n/ru.po +++ b/addons/crm_partner_assign/i18n/ru.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-05-30 14:10+0000\n" +"PO-Revision-Date: 2013-06-06 10:24+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-05-31 05:38+0000\n" -"X-Generator: Launchpad (build 16660)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: crm_partner_assign #: field:crm.lead.report.assign,delay_close:0 @@ -670,7 +670,7 @@ msgstr "" #. module: crm_partner_assign #: field:crm.partner.report.assign,period_id:0 msgid "Invoice Period" -msgstr "" +msgstr "Период счета" #. module: crm_partner_assign #: model:ir.model,name:crm_partner_assign.model_res_partner_grade @@ -706,6 +706,8 @@ msgid "" "Cannot contact geolocation servers. Please make sure that your internet " "connection is up and running (%s)." msgstr "" +"Не удается связаться с сервером геолокации. Пожалуйста, убедитесь, что ваше " +"подключение к интернету работает (%s)." #. module: crm_partner_assign #: selection:crm.lead.report.assign,month:0 diff --git a/addons/multi_company/i18n/ru.po b/addons/multi_company/i18n/ru.po index 3dea680c371..e1665d9c838 100644 --- a/addons/multi_company/i18n/ru.po +++ b/addons/multi_company/i18n/ru.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-08-17 11:09+0000\n" +"PO-Revision-Date: 2013-06-06 10:25+0000\n" "Last-Translator: Chertykov Denis \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:36+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: multi_company #: model:ir.ui.menu,name:multi_company.menu_custom_multicompany @@ -45,6 +45,16 @@ msgid "" "Thank you in advance for your cooperation.\n" "Best Regards," msgstr "" +"Уважаемые господа,\n" +"\n" +"Наши записи зафиксировали что некоторые платежи остаются неоплаченными. " +"Пожалуйста ознакомьтесь с подробностями ниже.\n" +"Если сумма уже была оплачена, пожалуйста проигнорируйте это оповещение. В " +"ином случае, пожалуйста перечислите нам всю сумму отображенную ниже.\n" +"Если у вас есть какие-либо замечания, пожалуйста свяжитесь с нами.\n" +"\n" +"Заранее благодарим за сотрудничество.\n" +"С наилучшими пожеланиями," #. module: multi_company #: view:multi_company.default:0 diff --git a/addons/note/i18n/ru.po b/addons/note/i18n/ru.po new file mode 100644 index 00000000000..ef2cd6be0c1 --- /dev/null +++ b/addons/note/i18n/ru.po @@ -0,0 +1,286 @@ +# Russian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 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-06-06 10:35+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-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" + +#. module: note +#: field:note.note,memo:0 +msgid "Note Content" +msgstr "Содержание заметки" + +#. module: note +#: view:note.stage:0 +msgid "Stages of Notes" +msgstr "Этапы заметок" + +#. module: note +#: model:note.stage,name:note.demo_note_stage_04 +#: model:note.stage,name:note.note_stage_02 +msgid "This Week" +msgstr "Эта неделя" + +#. module: note +#: model:ir.model,name:note.model_base_config_settings +msgid "base.config.settings" +msgstr "base.config.settings" + +#. module: note +#: model:ir.model,name:note.model_note_tag +msgid "Note Tag" +msgstr "Тег заметки" + +#. module: note +#: model:res.groups,name:note.group_note_fancy +msgid "Notes / Fancy mode" +msgstr "" + +#. module: note +#: model:ir.model,name:note.model_note_note +#: view:note.note:0 +msgid "Note" +msgstr "Заметка" + +#. module: note +#: view:note.note:0 +msgid "Group By..." +msgstr "Группировать по ..." + +#. module: note +#: field:note.note,message_follower_ids:0 +msgid "Followers" +msgstr "Подписчики" + +#. module: note +#: model:ir.actions.act_window,help:note.action_note_note +msgid "" +"

\n" +" Click to add a personal note.\n" +"

\n" +" Use notes to organize personal tasks or notes. All\n" +" notes are private; no one else will be able to see them. " +"However\n" +" you can share some notes with other people by inviting " +"followers\n" +" on the note. (Useful for meeting minutes, especially if\n" +" you activate the pad feature for collaborative writings).\n" +"

\n" +" You can customize how you process your notes/tasks by adding,\n" +" removing or modifying columns.\n" +"

\n" +" " +msgstr "" + +#. module: note +#: model:note.stage,name:note.demo_note_stage_01 +#: model:note.stage,name:note.note_stage_01 +msgid "Today" +msgstr "Сегодня" + +#. module: note +#: model:ir.model,name:note.model_res_users +msgid "Users" +msgstr "Пользователи" + +#. module: note +#: view:note.note:0 +msgid "í" +msgstr "" + +#. module: note +#: view:note.stage:0 +msgid "Stage of Notes" +msgstr "Этап заметок" + +#. module: note +#: field:note.note,message_unread:0 +msgid "Unread Messages" +msgstr "Непрочитанные" + +#. module: note +#: field:note.note,current_partner_id:0 +msgid "unknown" +msgstr "неизвестно" + +#. module: note +#: view:note.note:0 +msgid "By sticky note Category" +msgstr "" + +#. module: note +#: help:note.note,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "Если отмечено, новые сообщения требуют вашего внимания." + +#. module: note +#: field:note.stage,name:0 +msgid "Stage Name" +msgstr "Название этапа" + +#. module: note +#: field:note.note,message_is_follower:0 +msgid "Is a Follower" +msgstr "Подписан" + +#. module: note +#: model:note.stage,name:note.demo_note_stage_02 +msgid "Tomorrow" +msgstr "Завтра" + +#. module: note +#: view:note.note:0 +#: field:note.note,open:0 +msgid "Active" +msgstr "Активно" + +#. module: note +#: help:note.stage,user_id:0 +msgid "Owner of the note stage." +msgstr "Владелец этапа заметки" + +#. module: note +#: model:ir.ui.menu,name:note.menu_notes_stage +msgid "Categories" +msgstr "Категории" + +#. module: note +#: view:note.note:0 +#: field:note.note,stage_id:0 +msgid "Stage" +msgstr "Этап" + +#. module: note +#: field:note.tag,name:0 +msgid "Tag Name" +msgstr "Название тега" + +#. module: note +#: field:note.note,message_ids:0 +msgid "Messages" +msgstr "Сообщения" + +#. module: note +#: view:base.config.settings:0 +#: model:ir.actions.act_window,name:note.action_note_note +#: model:ir.ui.menu,name:note.menu_note_notes +#: view:note.note:0 +#: model:note.stage,name:note.note_stage_04 +msgid "Notes" +msgstr "Заметки" + +#. module: note +#: model:note.stage,name:note.demo_note_stage_03 +#: model:note.stage,name:note.note_stage_03 +msgid "Later" +msgstr "Позже" + +#. module: note +#: model:ir.model,name:note.model_note_stage +msgid "Note Stage" +msgstr "Этап заметки" + +#. module: note +#: field:note.note,message_summary:0 +msgid "Summary" +msgstr "Итог" + +#. module: note +#: field:note.note,stage_ids:0 +msgid "Stages of Users" +msgstr "Этапы пользователей" + +#. module: note +#: field:note.note,name:0 +msgid "Note Summary" +msgstr "Заметка - кратко" + +#. module: note +#: model:ir.actions.act_window,name:note.action_note_stage +#: view:note.note:0 +msgid "Stages" +msgstr "Этапы" + +#. module: note +#: help:note.note,message_ids:0 +msgid "Messages and communication history" +msgstr "Сообщения и история общения" + +#. module: note +#: view:note.note:0 +msgid "Delete" +msgstr "Удалить" + +#. module: note +#: field:note.note,color:0 +msgid "Color Index" +msgstr "Цветовая палитра" + +#. module: note +#: field:note.note,sequence:0 +#: field:note.stage,sequence:0 +msgid "Sequence" +msgstr "Нумерация" + +#. module: note +#: view:note.note:0 +#: field:note.note,tag_ids:0 +msgid "Tags" +msgstr "Теги" + +#. module: note +#: view:note.note:0 +msgid "Archive" +msgstr "Архив" + +#. module: note +#: field:base.config.settings,module_note_pad:0 +msgid "Use collaborative pads (etherpad)" +msgstr "Используйте совместный планшет (etherpad)" + +#. module: note +#: help:note.note,message_summary:0 +msgid "" +"Holds the Chatter summary (number of messages, ...). This summary is " +"directly in html format in order to be inserted in kanban views." +msgstr "" +"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате " +"html для возможности использования в канбан виде" + +#. module: note +#: field:base.config.settings,group_note_fancy:0 +msgid "Use fancy layouts for notes" +msgstr "" + +#. module: note +#: field:note.note,current_partner_id:0 +#: field:note.stage,user_id:0 +msgid "Owner" +msgstr "Владелец" + +#. module: note +#: help:note.stage,sequence:0 +msgid "Used to order the note stages" +msgstr "Используется для сортировки этапов заметок" + +#. module: note +#: field:note.note,date_done:0 +msgid "Date done" +msgstr "Дата выполнения" + +#. module: note +#: field:note.stage,fold:0 +msgid "Folded by Default" +msgstr "Свернуто по умолчанию" diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po index 8449bd83224..7ca635be446 100644 --- a/addons/sale/i18n/ru.po +++ b/addons/sale/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-06-03 07:54+0000\n" +"PO-Revision-Date: 2013-06-06 11:38+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-06-04 05:20+0000\n" -"X-Generator: Launchpad (build 16660)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: sale #: model:res.groups,name:sale.group_analytic_accounting @@ -191,7 +191,7 @@ msgstr "Счет аналитики" #: field:sale.config.settings,module_sale_journal:0 msgid "Allow batch invoicing of delivery orders through journals" msgstr "" -"Разрешить групповое выставление счета из заказов на доставку через журналы" +"Разрешить групповое выставление счетов из заказов доставки через журналы" #. module: sale #: field:sale.order.line,price_subtotal:0 @@ -223,7 +223,7 @@ msgstr "Особенности склада" #. module: sale #: field:sale.config.settings,time_unit:0 msgid "The default working time unit for services is" -msgstr "" +msgstr "Единица измерения времени для услуг" #. module: sale #: field:sale.order.line,product_uom:0 diff --git a/addons/sale_stock/i18n/ru.po b/addons/sale_stock/i18n/ru.po index f5c54417077..28f156fb871 100644 --- a/addons/sale_stock/i18n/ru.po +++ b/addons/sale_stock/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:06+0000\n" -"PO-Revision-Date: 2013-01-04 16:04+0000\n" +"PO-Revision-Date: 2013-06-06 11:30+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-07 05:48+0000\n" +"X-Generator: Launchpad (build 16667)\n" #. module: sale_stock #: help:sale.config.settings,group_invoice_deli_orders:0 @@ -22,11 +22,13 @@ msgid "" "To allow your salesman to make invoices for Delivery Orders using the menu " "'Deliveries to Invoice'." msgstr "" +"Позволяет вашему продавцу создавать счета для заказов доставки используя " +"меню \"Доставки в счета\"." #. module: sale_stock #: model:process.node,name:sale_stock.process_node_deliveryorder0 msgid "Delivery Order" -msgstr "Заказ на доставку" +msgstr "Заказ доставки" #. module: sale_stock #: model:ir.actions.act_window,name:sale_stock.outgoing_picking_list_to_invoice @@ -86,12 +88,12 @@ msgstr "" #. module: sale_stock #: model:process.transition,name:sale_stock.process_transition_saleprocurement0 msgid "Create Procurement Order" -msgstr "Создать заказ на снабжение" +msgstr "Создать заказ снабжения" #. module: sale_stock #: field:stock.picking.out,sale_id:0 msgid "Sale Order" -msgstr "Заказ" +msgstr "Заказ продажи" #. module: sale_stock #: model:process.transition,note:sale_stock.process_transition_saleorderprocurement0 @@ -99,8 +101,8 @@ msgid "" "For every sales order line, a procurement order is created to supply the " "sold product." msgstr "" -"Для каждой позиции заказа на продажу создается заказ на снабжение для " -"поставки проданных ТМЦ." +"Для каждой позиции заказа продаж создается заказ снабжения для поставки " +"проданных ТМЦ." #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:615 @@ -129,8 +131,7 @@ msgstr "Магазин" #. module: sale_stock #: model:process.node,note:sale_stock.process_node_saleorderprocurement0 msgid "Drives procurement orders for every sales order line." -msgstr "" -"Управление заказами на снабжение для каждой позиции заказа на продажу." +msgstr "Управление заказами снабжения для каждой позиции заказа продаж." #. module: sale_stock #: model:ir.model,name:sale_stock.model_stock_move @@ -151,7 +152,7 @@ msgstr "Табель проекта" #. module: sale_stock #: field:sale.config.settings,group_sale_delivery_address:0 msgid "Allow a different address for delivery and invoicing " -msgstr "" +msgstr "Разрешить различные адреса для доставки и выставления счета " #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:546 @@ -163,18 +164,18 @@ msgstr "Ошибка конфигурации!" #. module: sale_stock #: model:process.node,name:sale_stock.process_node_saleprocurement0 msgid "Procurement Order" -msgstr "Заказ на закупку" +msgstr "Заказ снабжения" #. module: sale_stock #: selection:sale.config.settings,default_order_policy:0 msgid "Invoice based on deliveries" -msgstr "Счет основанный на отгрузке" +msgstr "Счет основанный на доставках" #. module: sale_stock #: model:ir.model,name:sale_stock.model_sale_order #: field:stock.picking,sale_id:0 msgid "Sales Order" -msgstr "Заказ на продажу" +msgstr "Заказ продаж" #. module: sale_stock #: model:ir.model,name:sale_stock.model_stock_picking_out @@ -185,7 +186,7 @@ msgstr "Заказы доставки" #: model:ir.model,name:sale_stock.model_sale_order_line #: field:stock.move,sale_line_id:0 msgid "Sales Order Line" -msgstr "Позиция заказа на продажу" +msgstr "Позиция заказа продаж" #. module: sale_stock #: model:process.transition,note:sale_stock.process_transition_packing0 @@ -195,11 +196,11 @@ msgid "" "parts to the sales order. There is 1 pick list by sales order line which " "evolves with the availability of parts." msgstr "" -"Форма комплектовочного листа создастся как только заказ на продажу будет " -"подтвержден, в одно время с заказом на снабжение. Он представляет собой " -"определение комплектующих для заказа на продажу. Один комплектовочный лист " -"на позицию заказа на продажу, который будет меняться в соответствии с " -"наличием комплектующих." +"Форма комплектовочного листа создастся как только заказ продаж будет " +"подтвержден, в одно время с заказом снабжения. Он представляет собой " +"определение комплектующих для заказа продаж. Один комплектовочный лист на " +"позицию заказа продаж, который будет меняться в соответствии с наличием " +"комплектующих." #. module: sale_stock #: help:res.company,security_lead:0 @@ -240,7 +241,7 @@ msgstr "Документ перемещения к заказчику." #. module: sale_stock #: view:sale.order:0 msgid "View Delivery Order" -msgstr "" +msgstr "Вид заказа доставки" #. module: sale_stock #: field:sale.order.line,move_ids:0 @@ -276,7 +277,7 @@ msgstr "Снабжение" #: field:sale.report,shipped:0 #: field:sale.report,shipped_qty_1:0 msgid "Shipped" -msgstr "Доставлено" +msgstr "Отправлено" #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:240 @@ -292,24 +293,24 @@ msgid "" "production of products regarding to the rules and to the sales order's " "parameters. " msgstr "" -"Заказ на снабжение создастся автоматически как только заказ на продажу будет " +"Заказ снабжения создастся автоматически как только заказ продаж будет " "подтвержден или счет будет оплачен. Он определяет закупку и производство ТМЦ " -"по правилам и параметрам заказа на продажу. " +"по правилам и параметрам заказа продаж. " #. module: sale_stock #: help:sale.config.settings,group_mrp_properties:0 msgid "Allows you to tag sales order lines with properties." -msgstr "" +msgstr "Позволяет отмечать тегами позиции заказа продажи со свойствами" #. module: sale_stock #: field:sale.config.settings,group_invoice_deli_orders:0 msgid "Generate invoices after and based on delivery orders" -msgstr "" +msgstr "Генерировать счета после и из заказов доставки" #. module: sale_stock #: field:sale.config.settings,module_delivery:0 msgid "Allow adding shipping costs" -msgstr "" +msgstr "Позволяет добавлять стоимость доставки" #. module: sale_stock #: view:sale.order:0 @@ -327,6 +328,8 @@ msgid "" "International Commercial Terms are a series of predefined commercial terms " "used in international transactions." msgstr "" +"Международные правила по толкованию наиболее широко используемых торговых " +"терминов в области внешней торговли." #. module: sale_stock #: help:sale.config.settings,module_delivery:0 @@ -345,7 +348,7 @@ msgstr "Доставка всего сразу, если все готово." #. module: sale_stock #: model:res.groups,name:sale_stock.group_invoice_deli_orders msgid "Enable Invoicing Delivery orders" -msgstr "" +msgstr "Разрешить выставлять счета на заказы доставки" #. module: sale_stock #: field:res.company,security_lead:0 @@ -362,6 +365,8 @@ msgstr "Закупка проданного материала" msgid "" "Pick 'Deliver each product when available' if you allow partial delivery." msgstr "" +"Выбрать \"Доставить каждый товар по готовности\" если вы разрешили частичную " +"доставки" #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:206 @@ -380,7 +385,7 @@ msgid "" "It indicates that the sales order has been delivered. This field is updated " "only after the scheduler(s) have been launched." msgstr "" -"Показывает, что заказ на продажу был доставлен. Это поле обновляется только " +"Показывает, что заказ продаж был доставлен. Это поле обновляется только " "после запуска планировщика." #. module: sale_stock @@ -398,12 +403,12 @@ msgstr "Свойства изделия в позиции заказа" msgid "" "You can generate invoices based on sales orders or based on shippings." msgstr "" -"Вы можете создать счет на основе заказов на продажу или на основе доставок." +"Вы можете создать счет на основе заказов продаж или на основе доставок." #. module: sale_stock #: model:ir.model,name:sale_stock.model_sale_report msgid "Sales Orders Statistics" -msgstr "Статистика заказов на продажу" +msgstr "Статистика заказов продаж" #. module: sale_stock #: model:ir.model,name:sale_stock.model_res_company @@ -428,6 +433,8 @@ msgid "" "Allows you to specify different delivery and invoice addresses on a sales " "order." msgstr "" +"Позволяет задавать разные адреса для доставки и выставления счета в заказе " +"продажи." #. module: sale_stock #: model:process.node,note:sale_stock.process_node_saleprocurement0 @@ -435,7 +442,7 @@ msgid "" "One Procurement order for each sales order line and for each of the " "components." msgstr "" -"Один заказ на снабжение для каждой позиции заказа на продажу и для каждого " +"Один заказ снабжения для каждой позиции заказа продаж и для каждого " "компонента." #. module: sale_stock @@ -455,6 +462,7 @@ msgid "" "Number of days between the order confirmation and the shipping of the " "products to the customer" msgstr "" +"Количество дней между подтверждением заказа и отгрузкой продукции заказчику" #. module: sale_stock #: help:sale.config.settings,default_picking_policy:0 @@ -467,7 +475,7 @@ msgstr "" #. module: sale_stock #: selection:sale.config.settings,default_order_policy:0 msgid "Invoice based on sales orders" -msgstr "" +msgstr "Счет основан на заказах продаж" #. module: sale_stock #: model:process.node,name:sale_stock.process_node_invoiceafterdelivery0 @@ -487,6 +495,9 @@ msgid "" "In order to delete a confirmed sales order, you must cancel it.\n" "To do so, you must first cancel related picking for delivery orders." msgstr "" +"Для того, чтобы удалить подтвержденный заказ, вы должны отменить его.\n" +"Чтобы сделать это, Вы должны сначала отменить комплектование для заказов " +"доставки." #. module: sale_stock #: field:sale.order.line,number_packages:0 @@ -506,7 +517,7 @@ msgstr "Создать счет" #. module: sale_stock #: field:sale.config.settings,task_work:0 msgid "Prepare invoices based on task's activities" -msgstr "" +msgstr "Подготовка счетов основанных на действиях по задачам" #. module: sale_stock #: model:ir.model,name:sale_stock.model_sale_advance_payment_inv @@ -519,7 +530,7 @@ msgstr "Счет на авансовый платеж" msgid "You must first cancel stock moves attached to this sales order line." msgstr "" "Сначала вы должны отменить перемещения ТМЦ связанные с этой позицией заказа " -"на продажу." +"продаж." #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:535 @@ -536,7 +547,7 @@ msgstr "Инкотерм" #: code:addons/sale_stock/sale_stock.py:496 #, python-format msgid "Cannot cancel sales order line!" -msgstr "" +msgstr "Нельзя отменить позицию заказа продаж!" #. module: sale_stock #: model:process.transition.action,name:sale_stock.process_transition_action_cancelassignation0 @@ -551,7 +562,7 @@ msgstr "На основании отгруженного или заказанн #. module: sale_stock #: selection:sale.order,picking_policy:0 msgid "Deliver all products at once" -msgstr "Отгрузка всех товаров за раз" +msgstr "Доставка всех товаров за раз" #. module: sale_stock #: field:sale.order,picking_ids:0 @@ -561,7 +572,7 @@ msgstr "Связанное комплектование" #. module: sale_stock #: model:ir.model,name:sale_stock.model_sale_config_settings msgid "sale.config.settings" -msgstr "" +msgstr "sale.config.settings" #. module: sale_stock #: help:sale.order,picking_ids:0 @@ -569,21 +580,22 @@ msgid "" "This is a list of delivery orders that has been generated for this sales " "order." msgstr "" +"Это список заказов доставки который был создан для этого заказа продажи." #. module: sale_stock #: model:process.node,name:sale_stock.process_node_saleorderprocurement0 msgid "Sales Order Requisition" -msgstr "Запрос заказа на продажу" +msgstr "Запрос заказа продаж" #. module: sale_stock #: model:process.transition,name:sale_stock.process_transition_deliver0 msgid "Create Delivery Order" -msgstr "Создать заказ на доставку" +msgstr "Создать заказ доставки" #. module: sale_stock #: view:sale.order:0 msgid "Ignore Exception" -msgstr "Игнорировать исключение" +msgstr "Игнорировать исключительную ситуацию" #. module: sale_stock #: code:addons/sale_stock/sale_stock.py:588 @@ -598,12 +610,12 @@ msgstr "" #. module: sale_stock #: view:sale.order:0 msgid "Recreate Delivery Order" -msgstr "" +msgstr "Воссоздать заказ доставки" #. module: sale_stock #: help:sale.config.settings,group_multiple_shops:0 msgid "This allows to configure and use multiple shops." -msgstr "" +msgstr "Это позволяет настроить и использовать несколько магазинов." #. module: sale_stock #: field:sale.order,picked_rate:0 @@ -628,5 +640,5 @@ msgid "" "automatically." msgstr "" "В зависимости от настройки исходящего места хранения, перемещение между " -"зоной отгрузки и заказчиком выполняется с помощью заказа на доставку вручную " +"зоной отгрузки и заказчиком выполняется с помощью заказа доставки вручную " "или автоматически." From 9d412b63cb1d2ca391e58b37a89fc96e40e7e6cc Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 7 Jun 2013 10:01:08 +0200 Subject: [PATCH 24/31] fix another stupid bug bzr revid: nicolas.vanhoren@openerp.com-20130607080108-ajjly9a05ny96hmd --- addons/web/tests/test_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/tests/test_dataset.py b/addons/web/tests/test_dataset.py index 8d6e7e78c03..98c2f95447c 100644 --- a/addons/web/tests/test_dataset.py +++ b/addons/web/tests/test_dataset.py @@ -3,12 +3,12 @@ import mock import unittest2 import openerp.addons.web.controllers.main from openerp.addons.web.http import request as req -from openerp.addons.web.http import _request_stack +from openerp.addons.web.http import set_request class TestDataSetController(unittest2.TestCase): def setUp(self): self.dataset = openerp.addons.web.controllers.main.DataSet() - self.tmp_req = RequestProxy.set_request(mock.Mock()) + self.tmp_req = set_request(mock.Mock()) self.tmp_req.__enter__() self.read = req.session.model().read self.search = req.session.model().search From a1a66985584a5d8db49d5bdd2c5b7199ee0a0b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Jun 2013 11:16:11 +0200 Subject: [PATCH 25/31] [CLEAN] mail: cleaned reply_to code, finally. bzr revid: tde@openerp.com-20130607091611-7cpzlxzngkrs86a0 --- addons/mail/mail_mail.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/addons/mail/mail_mail.py b/addons/mail/mail_mail.py index 62c1a9fff19..1398e00255b 100644 --- a/addons/mail/mail_mail.py +++ b/addons/mail/mail_mail.py @@ -88,18 +88,16 @@ class mail_mail(osv.Model): """ if values.get('reply_to'): return values.get('reply_to') - redirect_gateway = True # whether replies will be redirected inside the document - - # email_reply_to, model, res_id: comes from values OR related message + format_name = True # whether to use a 'Followers of Pigs reply_to will be the email_from, only the email part + # no alias reply_to -> reply_to will be the email_from if not email_reply_to and email_from: - emails = tools.email_split(email_from) - if emails: - email_reply_to = emails[0] + email_reply_to = email_from # format 'Document name ' - if email_reply_to and model and res_id and redirect_gateway: + if email_reply_to and model and res_id and format_name: + emails = tools.email_split(email_reply_to) + if emails: + email_reply_to = emails[0] document_name = self.pool[model].name_get(cr, SUPERUSER_ID, [res_id], context=context)[0] if document_name: # sanitize document name From 636c793c70c6504fd6305a7d054ce6554bd613dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Jun 2013 11:16:19 +0200 Subject: [PATCH 26/31] [TESTS] mail: added tests bzr revid: tde@openerp.com-20130607091619-tfh78a1agqdiqc23 --- addons/mail/tests/test_mail_base.py | 1 + addons/mail/tests/test_mail_gateway.py | 97 ++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/addons/mail/tests/test_mail_base.py b/addons/mail/tests/test_mail_base.py index a3b90288f0b..7ca8b93135c 100644 --- a/addons/mail/tests/test_mail_base.py +++ b/addons/mail/tests/test_mail_base.py @@ -69,6 +69,7 @@ class TestMailBase(common.TransactionCase): self.group_employee_id = group_employee_ref and group_employee_ref[1] or False # Test users to use through the various tests + self.res_users.write(cr, uid, uid, {'name': 'Administrator'}) self.user_raoul_id = self.res_users.create(cr, uid, {'name': 'Raoul Grosbedon', 'signature': 'SignRaoul', 'email': 'raoul@raoul.fr', 'login': 'raoul', 'groups_id': [(6, 0, [self.group_employee_id])]}) self.user_bert_id = self.res_users.create(cr, uid, diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py index e4269d59d8b..51d6d8add30 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,102 @@ 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, user_raoul_id = self.cr, self.uid, self.user_raoul_id + + # Data: update + generic variables + reply_to1 = '_reply_to1@example.com' + reply_to2 = '_reply_to2@example.com' + email_from1 = 'from@example.com' + alias_domain = 'schlouby.fr' + raoul_from = 'Raoul Grosbedon ' + raoul_from_alias = 'Raoul Grosbedon ' + raoul_reply = '"Followers of Pigs" ' + raoul_reply_alias = '"Followers of Pigs" ' + # Data: remove alias_domain to see emails with alias + 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: free message; specified values > default values + msg_id = self.mail_message.create(cr, user_raoul_id, {'reply_to': reply_to1, 'email_from': email_from1}) + msg = self.mail_message.browse(cr, user_raoul_id, 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(msg.reply_to, reply_to1, + 'mail_message: incorrect reply_to: should come from values') + self.assertEqual(msg.email_from, email_from1, + 'mail_message: incorrect email_from: should come from values') + # Do: create a mail_mail with the previous mail_message + mail_id = self.mail_mail.create(cr, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel'}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, reply_to1, + 'mail_mail: incorrect reply_to: should come from mail.message') + self.assertEqual(mail.email_from, email_from1, + 'mail_mail: incorrect email_from: should come from mail.message') + # Do: create a mail_mail with the previous mail_message + specified reply_to + mail_id = self.mail_mail.create(cr, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel', 'reply_to': reply_to2}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, reply_to2, + 'mail_mail: incorrect reply_to: should come from values') + self.assertEqual(mail.email_from, email_from1, + 'mail_mail: incorrect email_from: should come from mail.message') + + # Do: mail_message attached to a document + msg_id = self.mail_message.create(cr, user_raoul_id, {'model': 'mail.group', 'res_id': self.group_pigs_id}) + msg = self.mail_message.browse(cr, user_raoul_id, 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: incorrect reply_to: should not be generated if not specified') + self.assertEqual(msg.email_from, raoul_from, + 'mail_message: incorrect email_from: should be Raoul') + # Do: create a mail_mail based on the previous mail_message + mail_id = self.mail_mail.create(cr, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel'}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, raoul_reply, + 'mail_mail: incorrect reply_to: should be Raoul') + + # Data: set catchall domain + self.registry('ir.config_parameter').set_param(cr, uid, 'mail.catchall.domain', alias_domain) + + # Update message + self.mail_message.write(cr, user_raoul_id, [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, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel'}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, raoul_reply_alias, + 'mail_mail: incorrect reply_to: should be Pigs alias') + + # Update message: test alias on email_from + msg_id = self.mail_message.create(cr, user_raoul_id, {}) + msg = self.mail_message.browse(cr, user_raoul_id, msg_id) + # Do: create a mail_mail based on the previous mail_message + mail_id = self.mail_mail.create(cr, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel'}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, raoul_from_alias, + 'mail_mail: incorrect reply_to: should be message email_from using Raoul alias') + + # Update message + self.mail_message.write(cr, user_raoul_id, [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, user_raoul_id, {'mail_message_id': msg_id, 'state': 'cancel'}) + mail = self.mail_mail.browse(cr, user_raoul_id, mail_id) + # Test: mail_mail content + self.assertEqual(mail.reply_to, msg.email_from, + 'mail_mail: incorrect reply_to: should be message email_from') + def test_10_message_process(self): """ Testing incoming emails processing. """ cr, uid, user_raoul = self.cr, self.uid, self.user_raoul From 956a05e0f264aaf988edec23a26aca1a4de97196 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 7 Jun 2013 11:18:56 +0200 Subject: [PATCH 27/31] Replaced main bzr revid: nicolas.vanhoren@openerp.com-20130607091856-mnjnllza9oafqxb7 --- addons/web/controllers/main.py | 277 ++++++++++++++++----------------- 1 file changed, 134 insertions(+), 143 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 78aa85669be..b7071eff9e2 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -36,6 +36,8 @@ from openerp.tools.translate import _ from .. import http openerpweb = http +from openerp.addons.web.http import request as req + #---------------------------------------------------------- # OpenERP Web helpers #---------------------------------------------------------- @@ -84,7 +86,7 @@ def rjsmin(script): ).strip() return result -def db_list(req): +def db_list(): proxy = req.session.proxy("db") dbs = proxy.list() h = req.httprequest.environ['HTTP_HOST'].split(':')[0] @@ -93,7 +95,7 @@ def db_list(req): dbs = [i for i in dbs if re.match(r, i)] return dbs -def db_monodb_redirect(req): +def db_monodb_redirect(): db = False redirect = False @@ -103,7 +105,7 @@ def db_monodb_redirect(req): return (db_url, False) try: - dbs = db_list(req) + dbs = db_list() except Exception: # ignore access denied dbs = [] @@ -124,11 +126,11 @@ def db_monodb_redirect(req): redirect = req.httprequest.path + '?' + urllib.urlencode(query) return (db, redirect) -def db_monodb(req): +def db_monodb(): # if only one db exists, return it else return False - return db_monodb_redirect(req)[0] + return db_monodb_redirect()[0] -def redirect_with_hash(req, url, code=303): +def redirect_with_hash(url, code=303): if req.httprequest.user_agent.browser == 'msie': try: version = float(req.httprequest.user_agent.version) @@ -182,7 +184,7 @@ def module_topological_sort(modules): visit(n) return L -def module_installed(req): +def module_installed(): # Candidates module the current heuristic is the /static dir loadable = openerpweb.addons_manifest.keys() modules = {} @@ -224,14 +226,14 @@ def module_installed_bypass_session(dbname): sorted_modules = module_topological_sort(modules) return sorted_modules -def module_boot(req, db=None): +def module_boot(db=None): server_wide_modules = openerp.conf.server_wide_modules or ['web'] serverside = [] dbside = [] for i in server_wide_modules: if i in openerpweb.addons_manifest: serverside.append(i) - monodb = db or db_monodb(req) + monodb = db or db_monodb() if monodb: dbside = module_installed_bypass_session(monodb) dbside = [i for i in dbside if i not in serverside] @@ -308,9 +310,9 @@ def fs2web(path): """convert FS path into web path""" return '/'.join(path.split(os.path.sep)) -def manifest_glob(req, extension, addons=None, db=None): +def manifest_glob(extension, addons=None, db=None): if addons is None: - addons = module_boot(req, db=db) + addons = module_boot(db=db) else: addons = addons.split(',') r = [] @@ -326,7 +328,7 @@ def manifest_glob(req, extension, addons=None, db=None): r.append((path, fs2web(path[len(addons_path):]))) return r -def manifest_list(req, extension, mods=None, db=None): +def manifest_list(extension, mods=None, db=None): """ list ressources to load specifying either: mods: a comma separated string listing modules db: a database name (return all installed modules in that database) @@ -338,7 +340,7 @@ def manifest_list(req, extension, mods=None, db=None): elif db: path += '?' + urllib.urlencode({'db': db}) return [path] - files = manifest_glob(req, extension, addons=mods, db=db) + files = manifest_glob(extension, addons=mods, db=db) return [wp for _fp, wp in files] def get_last_modified(files): @@ -355,15 +357,13 @@ def get_last_modified(files): for f in files) return datetime.datetime(1970, 1, 1) -def make_conditional(req, response, last_modified=None, etag=None): +def make_conditional(response, last_modified=None, etag=None): """ Makes the provided response conditional based upon the request, and mandates revalidation from clients Uses Werkzeug's own :meth:`ETagResponseMixin.make_conditional`, after setting ``last_modified`` and ``etag`` correctly on the response object - :param req: OpenERP request - :type req: web.common.http.WebRequest :param response: Werkzeug response :type response: werkzeug.wrappers.Response :param datetime.datetime last_modified: last modification date of the response content @@ -379,7 +379,7 @@ def make_conditional(req, response, last_modified=None, etag=None): response.set_etag(etag) return response.make_conditional(req.httprequest) -def login_and_redirect(req, db, login, key, redirect_url='/'): +def login_and_redirect(db, login, key, redirect_url='/'): wsgienv = req.httprequest.environ env = dict( base_location=req.httprequest.url_root.rstrip('/'), @@ -387,23 +387,23 @@ def login_and_redirect(req, db, login, key, redirect_url='/'): REMOTE_ADDR=wsgienv['REMOTE_ADDR'], ) req.session.authenticate(db, login, key, env) - return set_cookie_and_redirect(req, redirect_url) + return set_cookie_and_redirect(redirect_url) -def set_cookie_and_redirect(req, redirect_url): +def set_cookie_and_redirect(redirect_url): redirect = werkzeug.utils.redirect(redirect_url, 303) redirect.autocorrect_location_header = False cookie_val = urllib2.quote(simplejson.dumps(req.session_id)) redirect.set_cookie('instance0|session_id', cookie_val) return redirect -def load_actions_from_ir_values(req, key, key2, models, meta): +def load_actions_from_ir_values(key, key2, models, meta): Values = req.session.model('ir.values') actions = Values.get(key, key2, models, meta, req.context) - return [(id, name, clean_action(req, action)) + return [(id, name, clean_action(action)) for id, name, action in actions] -def clean_action(req, action): +def clean_action(action): action.setdefault('flags', {}) action_type = action.setdefault('type', 'ir.actions.act_window_close') if action_type == 'ir.actions.act_window': @@ -521,7 +521,7 @@ def xml2json_from_elementtree(el, preserve_whitespaces=False): res["children"] = kids return res -def content_disposition(filename, req): +def content_disposition(filename): filename = filename.encode('utf8') escaped = urllib2.quote(filename) browser = req.httprequest.user_agent.browser @@ -568,28 +568,28 @@ class Home(openerpweb.Controller): _cp_path = '/' @openerpweb.httprequest - def index(self, req, s_action=None, db=None, **kw): - db, redir = db_monodb_redirect(req) + def index(self, s_action=None, db=None, **kw): + db, redir = db_monodb_redirect() if redir: - return redirect_with_hash(req, redir) + return redirect_with_hash(redir) - js = "\n ".join('' % i for i in manifest_list(req, 'js', db=db)) - css = "\n ".join('' % i for i in manifest_list(req, 'css', db=db)) + js = "\n ".join('' % i for i in manifest_list('js', db=db)) + css = "\n ".join('' % i for i in manifest_list('css', db=db)) r = html_template % { 'js': js, 'css': css, - 'modules': simplejson.dumps(module_boot(req, db=db)), + 'modules': simplejson.dumps(module_boot(db=db)), 'init': 'var wc = new s.web.WebClient();wc.appendTo($(document.body));' } return r @openerpweb.httprequest - def login(self, req, db, login, key): - return login_and_redirect(req, db, login, key) + def login(self, db, login, key): + return login_and_redirect(db, login, key) @openerpweb.jsonrequest - def jsonrpc(self, req, service, method, args): + def jsonrpc(self, service, method, args): """ Method used by client APIs to contact OpenERP. """ return getattr(req.session.proxy(service), method)(*args) @@ -597,20 +597,20 @@ class WebClient(openerpweb.Controller): _cp_path = "/web/webclient" @openerpweb.jsonrequest - def csslist(self, req, mods=None): - return manifest_list(req, 'css', mods=mods) + def csslist(self, mods=None): + return manifest_list('css', mods=mods) @openerpweb.jsonrequest - def jslist(self, req, mods=None): - return manifest_list(req, 'js', mods=mods) + def jslist(self, mods=None): + return manifest_list('js', mods=mods) @openerpweb.jsonrequest - def qweblist(self, req, mods=None): - return manifest_list(req, 'qweb', mods=mods) + def qweblist(self, mods=None): + return manifest_list('qweb', mods=mods) @openerpweb.httprequest - def css(self, req, mods=None, db=None): - files = list(manifest_glob(req, 'css', addons=mods, db=db)) + def css(self, mods=None, db=None): + files = list(manifest_glob('css', addons=mods, db=db)) last_modified = get_last_modified(f[0] for f in files) if req.httprequest.if_modified_since and req.httprequest.if_modified_since >= last_modified: return werkzeug.wrappers.Response(status=304) @@ -656,12 +656,12 @@ class WebClient(openerpweb.Controller): content = '\n'.join(matches) return make_conditional( - req, req.make_response(content, [('Content-Type', 'text/css')]), + req.make_response(content, [('Content-Type', 'text/css')]), last_modified, checksum) @openerpweb.httprequest - def js(self, req, mods=None, db=None): - files = [f[0] for f in manifest_glob(req, 'js', addons=mods, db=db)] + def js(self, mods=None, db=None): + files = [f[0] for f in manifest_glob('js', addons=mods, db=db)] last_modified = get_last_modified(files) if req.httprequest.if_modified_since and req.httprequest.if_modified_since >= last_modified: return werkzeug.wrappers.Response(status=304) @@ -669,12 +669,12 @@ class WebClient(openerpweb.Controller): content, checksum = concat_js(files) return make_conditional( - req, req.make_response(content, [('Content-Type', 'application/javascript')]), + req.make_response(content, [('Content-Type', 'application/javascript')]), last_modified, checksum) @openerpweb.httprequest - def qweb(self, req, mods=None, db=None): - files = [f[0] for f in manifest_glob(req, 'qweb', addons=mods, db=db)] + def qweb(self, mods=None, db=None): + files = [f[0] for f in manifest_glob('qweb', addons=mods, db=db)] last_modified = get_last_modified(files) if req.httprequest.if_modified_since and req.httprequest.if_modified_since >= last_modified: return werkzeug.wrappers.Response(status=304) @@ -682,11 +682,11 @@ class WebClient(openerpweb.Controller): content, checksum = concat_xml(files) return make_conditional( - req, req.make_response(content, [('Content-Type', 'text/xml')]), + req.make_response(content, [('Content-Type', 'text/xml')]), last_modified, checksum) @openerpweb.jsonrequest - def bootstrap_translations(self, req, mods): + def bootstrap_translations(self, mods): """ Load local translations from *.po files, as a temporary solution until we have established a valid session. This is meant only for translating the login page and db management chrome, using @@ -709,7 +709,7 @@ class WebClient(openerpweb.Controller): "lang_parameters": None} @openerpweb.jsonrequest - def translations(self, req, mods, lang): + def translations(self, mods, lang): res_lang = req.session.model('res.lang') ids = res_lang.search([("code", "=", lang)]) lang_params = None @@ -734,20 +734,19 @@ class WebClient(openerpweb.Controller): "lang_parameters": lang_params} @openerpweb.jsonrequest - def version_info(self, req): + def version_info(self): return openerp.service.common.exp_version() class Proxy(openerpweb.Controller): _cp_path = '/web/proxy' @openerpweb.jsonrequest - def load(self, req, path): + def load(self, path): """ Proxies an HTTP request through a JSON request. It is strongly recommended to not request binary files through this, as the result will be a binary data blob as well. - :param req: OpenERP request :param path: actual request path :return: file content """ @@ -760,11 +759,11 @@ class Database(openerpweb.Controller): _cp_path = "/web/database" @openerpweb.jsonrequest - def get_list(self, req): - return db_list(req) + def get_list(self): + return db_list() @openerpweb.jsonrequest - def create(self, req, fields): + def create(self, fields): params = dict(map(operator.itemgetter('name', 'value'), fields)) return req.session.proxy("db").create_database( params['super_admin_pwd'], @@ -774,7 +773,7 @@ class Database(openerpweb.Controller): params['create_admin_pwd']) @openerpweb.jsonrequest - def duplicate(self, req, fields): + def duplicate(self, fields): params = dict(map(operator.itemgetter('name', 'value'), fields)) return req.session.proxy("db").duplicate_database( params['super_admin_pwd'], @@ -782,7 +781,7 @@ class Database(openerpweb.Controller): params['db_name']) @openerpweb.jsonrequest - def duplicate(self, req, fields): + def duplicate(self, fields): params = dict(map(operator.itemgetter('name', 'value'), fields)) duplicate_attrs = ( params['super_admin_pwd'], @@ -793,7 +792,7 @@ class Database(openerpweb.Controller): return req.session.proxy("db").duplicate_database(*duplicate_attrs) @openerpweb.jsonrequest - def drop(self, req, fields): + def drop(self, fields): password, db = operator.itemgetter( 'drop_pwd', 'drop_db')( dict(map(operator.itemgetter('name', 'value'), fields))) @@ -806,7 +805,7 @@ class Database(openerpweb.Controller): return {'error': _('Could not drop database !'), 'title': _('Drop Database')} @openerpweb.httprequest - def backup(self, req, backup_db, backup_pwd, token): + def backup(self, backup_db, backup_pwd, token): try: db_dump = base64.b64decode( req.session.proxy("db").dump(backup_pwd, backup_db)) @@ -817,14 +816,14 @@ class Database(openerpweb.Controller): } return req.make_response(db_dump, [('Content-Type', 'application/octet-stream; charset=binary'), - ('Content-Disposition', content_disposition(filename, req))], + ('Content-Disposition', content_disposition(filename))], {'fileToken': int(token)} ) except Exception, e: return simplejson.dumps([[],[{'error': openerp.tools.ustr(e), 'title': _('Backup Database')}]]) @openerpweb.httprequest - def restore(self, req, db_file, restore_pwd, new_db): + def restore(self, db_file, restore_pwd, new_db): try: data = base64.b64encode(db_file.read()) req.session.proxy("db").restore(restore_pwd, new_db, data) @@ -833,7 +832,7 @@ class Database(openerpweb.Controller): raise Exception("AccessDenied") @openerpweb.jsonrequest - def change_password(self, req, fields): + def change_password(self, fields): old_password, new_password = operator.itemgetter( 'old_pwd', 'new_pwd')( dict(map(operator.itemgetter('name', 'value'), fields))) @@ -847,7 +846,7 @@ class Database(openerpweb.Controller): class Session(openerpweb.Controller): _cp_path = "/web/session" - def session_info(self, req): + def session_info(self): req.session.ensure_valid() return { "session_id": req.session_id, @@ -858,11 +857,11 @@ class Session(openerpweb.Controller): } @openerpweb.jsonrequest - def get_session_info(self, req): - return self.session_info(req) + def get_session_info(self): + return self.session_info() @openerpweb.jsonrequest - def authenticate(self, req, db, login, password, base_location=None): + def authenticate(self, db, login, password, base_location=None): wsgienv = req.httprequest.environ env = dict( base_location=base_location, @@ -871,10 +870,10 @@ class Session(openerpweb.Controller): ) req.session.authenticate(db, login, password, env) - return self.session_info(req) + return self.session_info() @openerpweb.jsonrequest - def change_password (self,req,fields): + def change_password (self, fields): old_password, new_password,confirm_password = operator.itemgetter('old_pwd', 'new_password','confirm_pwd')( dict(map(operator.itemgetter('name', 'value'), fields))) if not (old_password.strip() and new_password.strip() and confirm_password.strip()): @@ -890,24 +889,24 @@ class Session(openerpweb.Controller): return {'error': _('Error, password not changed !'), 'title': _('Change Password')} @openerpweb.jsonrequest - def sc_list(self, req): + def sc_list(self): return req.session.model('ir.ui.view_sc').get_sc( req.session._uid, "ir.ui.menu", req.context) @openerpweb.jsonrequest - def get_lang_list(self, req): + def get_lang_list(self): try: return req.session.proxy("db").list_lang() or [] except Exception, e: return {"error": e, "title": _("Languages")} @openerpweb.jsonrequest - def modules(self, req): + def modules(self): # return all installed modules. Web client is smart enough to not load a module twice - return module_installed(req) + return module_installed() @openerpweb.jsonrequest - def save_session_action(self, req, the_action): + def save_session_action(self, the_action): """ This method store an action object in the session object and returns an integer identifying that action. The method get_session_action() can be used to get @@ -931,7 +930,7 @@ class Session(openerpweb.Controller): return key @openerpweb.jsonrequest - def get_session_action(self, req, key): + def get_session_action(self, key): """ Gets back a previously saved action. This method can return None if the action was saved since too much time (this case should be handled in a smart way). @@ -947,23 +946,21 @@ class Session(openerpweb.Controller): return saved_actions["actions"].get(key) @openerpweb.jsonrequest - def check(self, req): + def check(self): req.session.assert_valid() return None @openerpweb.jsonrequest - def destroy(self, req): + def destroy(self): req.session._suicide = True class Menu(openerpweb.Controller): _cp_path = "/web/menu" @openerpweb.jsonrequest - def get_user_roots(self, req): + def get_user_roots(self): """ Return all root menu ids visible for the session user. - :param req: A request object, with an OpenERP session attribute - :type req: < session -> OpenERPSession > :return: the root menu ids :rtype: list(int) """ @@ -983,18 +980,16 @@ class Menu(openerpweb.Controller): return Menus.search(menu_domain, 0, False, False, req.context) @openerpweb.jsonrequest - def load(self, req): + def load(self): """ Loads all menu items (all applications and their sub-menus). - :param req: A request object, with an OpenERP session attribute - :type req: < session -> OpenERPSession > :return: the menu root :rtype: dict('children': menu_nodes) """ Menus = req.session.model('ir.ui.menu') fields = ['name', 'sequence', 'parent_id', 'action'] - menu_root_ids = self.get_user_roots(req) + menu_root_ids = self.get_user_roots() menu_roots = Menus.read(menu_root_ids, fields, req.context) if menu_root_ids else [] menu_root = { 'id': False, @@ -1036,7 +1031,7 @@ class Menu(openerpweb.Controller): return menu_root @openerpweb.jsonrequest - def load_needaction(self, req, menu_ids): + def load_needaction(self, menu_ids): """ Loads needaction counters for specific menu ids. :return: needaction data @@ -1045,9 +1040,9 @@ class Menu(openerpweb.Controller): return req.session.model('ir.ui.menu').get_needaction_data(menu_ids, req.context) @openerpweb.jsonrequest - def action(self, req, menu_id): + def action(self, menu_id): # still used by web_shortcut - actions = load_actions_from_ir_values(req,'action', 'tree_but_open', + actions = load_actions_from_ir_values('action', 'tree_but_open', [('ir.ui.menu', menu_id)], False) return {"action": actions} @@ -1055,15 +1050,13 @@ class DataSet(openerpweb.Controller): _cp_path = "/web/dataset" @openerpweb.jsonrequest - def search_read(self, req, model, fields=False, offset=0, limit=False, domain=None, sort=None): - return self.do_search_read(req, model, fields, offset, limit, domain, sort) - def do_search_read(self, req, model, fields=False, offset=0, limit=False, domain=None + def search_read(self, model, fields=False, offset=0, limit=False, domain=None, sort=None): + return self.do_search_read(model, fields, offset, limit, domain, sort) + def do_search_read(self, model, fields=False, offset=0, limit=False, domain=None , sort=None): """ Performs a search() followed by a read() (if needed) using the provided search criteria - :param req: a JSON-RPC request object - :type req: openerpweb.JsonRequest :param str model: the name of the model to search on :param fields: a list of the fields to return in the result records :type fields: [str] @@ -1099,7 +1092,7 @@ class DataSet(openerpweb.Controller): } @openerpweb.jsonrequest - def load(self, req, model, id, fields): + def load(self, model, id, fields): m = req.session.model(model) value = {} r = m.read([id], False, req.context) @@ -1107,10 +1100,10 @@ class DataSet(openerpweb.Controller): value = r[0] return {'value': value} - def call_common(self, req, model, method, args, domain_id=None, context_id=None): - return self._call_kw(req, model, method, args, {}) + def call_common(self, model, method, args, domain_id=None, context_id=None): + return self._call_kw(model, method, args, {}) - def _call_kw(self, req, model, method, args, kwargs): + def _call_kw(self, model, method, args, kwargs): # Temporary implements future display_name special field for model#read() if method == 'read' and kwargs.get('context', {}).get('future_display_name'): if 'display_name' in args[1]: @@ -1125,26 +1118,26 @@ class DataSet(openerpweb.Controller): return getattr(req.session.model(model), method)(*args, **kwargs) @openerpweb.jsonrequest - def call(self, req, model, method, args, domain_id=None, context_id=None): - return self._call_kw(req, model, method, args, {}) + def call(self, model, method, args, domain_id=None, context_id=None): + return self._call_kw(model, method, args, {}) @openerpweb.jsonrequest - def call_kw(self, req, model, method, args, kwargs): - return self._call_kw(req, model, method, args, kwargs) + def call_kw(self, model, method, args, kwargs): + return self._call_kw(model, method, args, kwargs) @openerpweb.jsonrequest - def call_button(self, req, model, method, args, domain_id=None, context_id=None): - action = self._call_kw(req, model, method, args, {}) + def call_button(self, model, method, args, domain_id=None, context_id=None): + action = self._call_kw(model, method, args, {}) if isinstance(action, dict) and action.get('type') != '': - return clean_action(req, action) + return clean_action(action) return False @openerpweb.jsonrequest - def exec_workflow(self, req, model, id, signal): + def exec_workflow(self, model, id, signal): return req.session.exec_workflow(model, id, signal) @openerpweb.jsonrequest - def resequence(self, req, model, ids, field='sequence', offset=0): + def resequence(self, model, ids, field='sequence', offset=0): """ Re-sequences a number of records in the model, by their ids The re-sequencing starts at the first model of ``ids``, the sequence @@ -1170,7 +1163,7 @@ class View(openerpweb.Controller): _cp_path = "/web/view" @openerpweb.jsonrequest - def add_custom(self, req, view_id, arch): + def add_custom(self, view_id, arch): CustomView = req.session.model('ir.ui.view.custom') CustomView.create({ 'user_id': req.session._uid, @@ -1180,7 +1173,7 @@ class View(openerpweb.Controller): return {'result': True} @openerpweb.jsonrequest - def undo_custom(self, req, view_id, reset=False): + def undo_custom(self, view_id, reset=False): CustomView = req.session.model('ir.ui.view.custom') vcustom = CustomView.search([('user_id', '=', req.session._uid), ('ref_id' ,'=', view_id)], 0, False, False, req.context) @@ -1196,16 +1189,16 @@ class TreeView(View): _cp_path = "/web/treeview" @openerpweb.jsonrequest - def action(self, req, model, id): + def action(self, model, id): return load_actions_from_ir_values( - req,'action', 'tree_but_open',[(model, id)], + 'action', 'tree_but_open',[(model, id)], False) class Binary(openerpweb.Controller): _cp_path = "/web/binary" @openerpweb.httprequest - def image(self, req, model, id, field, **kw): + def image(self, model, id, field, **kw): last_update = '__last_update' Model = req.session.model(model) headers = [('Content-Type', 'image/png')] @@ -1245,7 +1238,7 @@ class Binary(openerpweb.Controller): image_data = base64.b64decode(image_base64) except Exception: - image_data = self.placeholder(req) + image_data = self.placeholder() headers.append(('ETag', retag)) headers.append(('Content-Length', len(image_data))) try: @@ -1255,20 +1248,18 @@ class Binary(openerpweb.Controller): pass return req.make_response(image_data, headers) - def placeholder(self, req, image='placeholder.png'): + def placeholder(self, image='placeholder.png'): addons_path = openerpweb.addons_manifest['web']['addons_path'] return open(os.path.join(addons_path, 'web', 'static', 'src', 'img', image), 'rb').read() @openerpweb.httprequest - def saveas(self, req, model, field, id=None, filename_field=None, **kw): + def saveas(self, model, field, id=None, filename_field=None, **kw): """ Download link for files stored as binary fields. If the ``id`` parameter is omitted, fetches the default value for the binary field (via ``default_get``), otherwise fetches the field for that precise record. - :param req: OpenERP request - :type req: :class:`web.common.http.HttpRequest` :param str model: name of the model to fetch the binary from :param str field: binary field :param str id: id of the record from which to fetch the binary @@ -1292,10 +1283,10 @@ class Binary(openerpweb.Controller): filename = res.get(filename_field, '') or filename return req.make_response(filecontent, [('Content-Type', 'application/octet-stream'), - ('Content-Disposition', content_disposition(filename, req))]) + ('Content-Disposition', content_disposition(filename))]) @openerpweb.httprequest - def saveas_ajax(self, req, data, token): + def saveas_ajax(self, data, token): jdata = simplejson.loads(data) model = jdata['model'] field = jdata['field'] @@ -1324,11 +1315,11 @@ class Binary(openerpweb.Controller): filename = res.get(filename_field, '') or filename return req.make_response(filecontent, headers=[('Content-Type', 'application/octet-stream'), - ('Content-Disposition', content_disposition(filename, req))], + ('Content-Disposition', content_disposition(filename))], cookies={'fileToken': int(token)}) @openerpweb.httprequest - def upload(self, req, callback, ufile): + def upload(self, callback, ufile): # TODO: might be useful to have a configuration flag for max-length file uploads out = """