diff --git a/addons/account/account.py b/addons/account/account.py index e92bd3a7879..a68c1de0939 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -648,10 +648,10 @@ class account_account(osv.osv): if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]): #Check for 'Closed' type if old_type == 'closed' and new_type !='closed': - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!")) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!")) # Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does) if (new_type in restricted_groups): - raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,)) + raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,)) return True @@ -1015,14 +1015,14 @@ class account_period(osv.osv): if not result: result = self.search(cr, uid, args, context=context) if not result: - raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) + raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt) return result def action_draft(self, cr, uid, ids, *args): mode = 'draft' for period in self.browse(cr, uid, ids): if period.fiscalyear_id.state == 'done': - raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year')) + raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year')) cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),)) cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),)) return True @@ -1034,9 +1034,15 @@ class account_period(osv.osv): context = {} ids = [] if name: - ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit) + ids = self.search(cr, user, + [('code', 'ilike', name)] + args, + limit=limit, + context=context) if not ids: - ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit) + ids = self.search(cr, user, + [('name', operator, name)] + args, + limit=limit, + context=context) return self.name_get(cr, user, ids, context=context) def write(self, cr, uid, ids, vals, context=None): @@ -1059,10 +1065,14 @@ class account_period(osv.osv): raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.')) if period_date_start > period_date_stop: raise osv.except_osv(_('Error!'), _('Start period should precede then end period.')) + + # /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports + # on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen. + #for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search). if period_from.special: - return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)]) - return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)]) + return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)]) + return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)]) class account_journal_period(osv.osv): @@ -1854,6 +1864,12 @@ class account_tax_code(osv.osv): _order = 'code' +def get_precision_tax(): + def change_digit_tax(cr): + res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account') + return (16, res+3) + return change_digit_tax + class account_tax(osv.osv): """ A tax object. @@ -1874,12 +1890,6 @@ class account_tax(osv.osv): default.update({'name': name + _(' (Copy)')}) return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context) - def get_precision_tax(): - def change_digit_tax(cr): - res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account') - return (16, res+2) - return change_digit_tax - _name = 'account.tax' _description = 'Tax' _columns = { @@ -2307,7 +2317,7 @@ class account_model(osv.osv): try: entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')} except: - raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !')) + raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!')) move_id = account_move_obj.create(cr, uid, { 'ref': entry['name'], 'period_id': period_id, @@ -2319,7 +2329,7 @@ class account_model(osv.osv): analytic_account_id = False if line.analytic_account_id: if not model.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,)) analytic_account_id = line.analytic_account_id.id val = { 'move_id': move_id, @@ -2795,7 +2805,7 @@ class account_tax_template(osv.osv): 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True), 'name': fields.char('Tax Name', size=64, required=True), 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."), - 'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."), + 'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."), 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True), 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."), 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."), diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 023765d73f0..8a15321b9c6 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -420,7 +420,7 @@ class account_bank_statement(osv.osv): for st_line in st.line_ids: if st_line.analytic_account_id: if not st.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,)) if not st_line.amount: continue st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 40f0ca80738..8e3e250d41c 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -252,7 +252,7 @@ class account_cash_statement(osv.osv): for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} if not self._user_allow(cr, uid, statement.id, context=context): - raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, ))) + raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, ))) if statement.name and statement.name == '/': c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id} diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 14aabed86ad..01476374cf4 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -69,7 +69,7 @@ class account_invoice(osv.osv): tt = type2journal.get(type_inv, 'sale') result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context) if not result: - raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,)) return result[0] def _get_type(self, cr, uid, context=None): @@ -89,13 +89,43 @@ class account_invoice(osv.osv): return [('none', _('Free Reference'))] def _amount_residual(self, cr, uid, ids, name, args, context=None): + """Function of the field residua. It computes the residual amount (balance) for each invoice""" + if context is None: + context = {} + ctx = context.copy() result = {} + currency_obj = self.pool.get('res.currency') for invoice in self.browse(cr, uid, ids, context=context): + nb_inv_in_partial_rec = max_invoice_id = 0 result[invoice.id] = 0.0 if invoice.move_id: - for m in invoice.move_id.line_id: - if m.account_id.type in ('receivable','payable'): - result[invoice.id] += m.amount_residual_currency + for aml in invoice.move_id.line_id: + if aml.account_id.type in ('receivable','payable'): + if aml.currency_id and aml.currency_id.id == invoice.currency_id.id: + result[invoice.id] += aml.amount_residual_currency + else: + ctx['date'] = aml.date + result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx) + + if aml.reconcile_partial_id.line_partial_ids: + #we check if the invoice is partially reconciled and if there are other invoices + #involved in this partial reconciliation (and we sum these invoices) + for line in aml.reconcile_partial_id.line_partial_ids: + if line.invoice: + nb_inv_in_partial_rec += 1 + #store the max invoice id as for this invoice we will make a balance instead of a simple division + max_invoice_id = max(max_invoice_id, line.invoice.id) + if nb_inv_in_partial_rec: + #if there are several invoices in a partial reconciliation, we split the residual by the number + #of invoice to have a sum of residual amounts that matches the partner balance + new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec) + if invoice.id == max_invoice_id: + #if it's the last the invoice of the bunch of invoices partially reconciled together, we make a + #balance to avoid rounding errors + result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value) + else: + result[invoice.id] = new_value + #prevent the residual amount on the invoice to be less than 0 result[invoice.id] = max(result[invoice.id], 0.0) return result @@ -600,7 +630,7 @@ class account_invoice(osv.osv): obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configuration Error!'), - _('Invoice line account\'s company and invoice\'s compnay does not match.')) + _('Invoice line account\'s company and invoice\'s company does not match.')) else: continue if company_id and type: @@ -756,7 +786,7 @@ class account_invoice(osv.osv): else: ref = self._convert_ref(cr, uid, inv.number) if not inv.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,)) il['analytic_lines'] = [(0,0, { 'name': il['name'], 'date': inv['date_invoice'], @@ -882,7 +912,7 @@ class account_invoice(osv.osv): if not inv.journal_id.sequence_id: raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.')) if not inv.invoice_line: - raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) + raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.')) if inv.move_id: continue @@ -903,7 +933,7 @@ class account_invoice(osv.osv): group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context) if group_check_total and uid in [x.id for x in group_check_total.users]: if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)): - raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.')) + raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.')) if inv.payment_term: total_fixed = total_percent = 0 @@ -1445,7 +1475,7 @@ class account_invoice_line(osv.osv): context = dict(context) context.update({'company_id': company_id, 'force_company': company_id}) if not partner_id: - raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) + raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") ) if not product: if type in ('in_invoice', 'in_refund'): return {'value': {}, 'domain':{'product_uom':[]}} @@ -1460,6 +1490,7 @@ class account_invoice_line(osv.osv): result = {} res = self.pool.get('product.product').browse(cr, uid, product, context=context) + result['name'] = res.partner_ref if type in ('out_invoice','out_refund'): a = res.property_account_income.id if not a: @@ -1474,19 +1505,21 @@ class account_invoice_line(osv.osv): if type in ('out_invoice', 'out_refund'): taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False) + if res.description_sale: + result['name'] += '\n'+res.description_sale else: taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False) + if res.description_purchase: + result['name'] += '\n'+res.description_purchase + tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes) if type in ('in_invoice', 'in_refund'): result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} ) else: result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id}) - result['name'] = res.partner_ref result['uos_id'] = uom_id or res.uom_id.id - if res.description: - result['name'] += '\n'+res.description domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]} diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 7469c38decb..c71b97d5796 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -197,7 +197,7 @@ @@ -320,7 +320,7 @@ @@ -353,7 +353,7 @@ diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index d6c25364784..e604cc6d1a4 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -192,7 +192,7 @@ class account_move_line(osv.osv): for obj_line in self.browse(cr, uid, ids, context=context): if obj_line.analytic_account_id: if not obj_line.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, )) + raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, )) vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context) acc_ana_line_obj.create(cr, uid, vals_line) return True @@ -1101,7 +1101,7 @@ class account_move_line(osv.osv): period = period_obj.browse(cr, uid, period_id, context=context) for (state,) in result: if state == 'done': - raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name))) + raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name))) if not result: jour_period_obj.create(cr, uid, { 'name': (journal.code or journal.name)+':'+(period.name or ''), @@ -1181,7 +1181,7 @@ class account_move_line(osv.osv): move_id = move_obj.create(cr, uid, v, context) vals['move_id'] = move_id else: - raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) + raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.')) ok = not (journal.type_control_ids or journal.account_control_ids) if ('account_id' in vals): account = account_obj.browse(cr, uid, vals['account_id'], context=context) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 603c4254b19..e921e639642 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -907,9 +907,7 @@ diff --git a/addons/account_followup/i18n/ru.po b/addons/account_followup/i18n/ru.po index f6cb2cf0412..b57c8e4315e 100644 --- a/addons/account_followup/i18n/ru.po +++ b/addons/account_followup/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2011-11-11 15:21+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2013-05-31 10:28+0000\n" +"Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n" +"X-Generator: Launchpad (build 16660)\n" #. module: account_followup #: model:email.template,subject:account_followup.email_template_account_followup_default @@ -22,7 +22,7 @@ msgstr "" #: model:email.template,subject:account_followup.email_template_account_followup_level1 #: model:email.template,subject:account_followup.email_template_account_followup_level2 msgid "${user.company_id.name} Payment Reminder" -msgstr "" +msgstr "${user.company_id.name} напоминание о платеже" #. module: account_followup #: help:res.partner,latest_followup_level_id:0 @@ -43,12 +43,12 @@ msgstr "Дальнейшие действия" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(date)s" -msgstr "" +msgstr "%(date)s" #. module: account_followup #: field:res.partner,payment_next_action_date:0 msgid "Next Action Date" -msgstr "" +msgstr "Дата следующего действия" #. module: account_followup #: view:account_followup.followup.line:0 @@ -64,7 +64,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "⇾ Mark as Done" -msgstr "" +msgstr "⇾ отметить как сделанное" #. module: account_followup #: field:account_followup.followup.line,manual_action_note:0 @@ -94,7 +94,7 @@ msgstr "Тема эл.письма" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(user_signature)s" -msgstr "" +msgstr "%(user_signature)s" #. module: account_followup #: view:account_followup.followup.line:0 @@ -109,19 +109,19 @@ msgstr "" #. module: account_followup #: field:account_followup.print,email_body:0 msgid "Email Body" -msgstr "" +msgstr "Тело эл. письма" #. module: account_followup #: model:ir.actions.act_window,name:account_followup.action_account_followup_print msgid "Send Follow-Ups" -msgstr "" +msgstr "Послать напоминания" #. module: account_followup #: report:account_followup.followup.print:0 #: code:addons/account_followup/account_followup.py:263 #, python-format msgid "Amount" -msgstr "" +msgstr "Сумма" #. module: account_followup #: help:res.partner,payment_next_action:0 @@ -133,7 +133,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "No Responsible" -msgstr "" +msgstr "Нет ответственного" #. module: account_followup #: model:account_followup.followup.line,description:account_followup.demo_followup_line2 @@ -209,17 +209,17 @@ msgstr "Всего по дебету" #. module: account_followup #: field:res.partner,payment_next_action:0 msgid "Next Action" -msgstr "" +msgstr "Следующее действие" #. module: account_followup #: view:account_followup.followup.line:0 msgid ": Partner Name" -msgstr "" +msgstr ": Название партнера" #. module: account_followup #: field:account_followup.followup.line,manual_action_responsible_id:0 msgid "Assign a Responsible" -msgstr "" +msgstr "Назначить ответственного" #. module: account_followup #: view:account_followup.followup:0 @@ -305,7 +305,7 @@ msgstr "" #. module: account_followup #: view:account_followup.followup.line:0 msgid "%(partner_name)s" -msgstr "" +msgstr "%(partner_name)s" #. module: account_followup #: model:email.template,body_html:account_followup.email_template_account_followup_level1 @@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом #: code:addons/account_followup/wizard/account_followup_print.py:166 #, python-format msgid " will be sent" -msgstr "" +msgstr " будет отправлен" #. module: account_followup #: view:account_followup.followup.line:0 @@ -388,7 +388,7 @@ msgstr "" #: view:account_followup.followup.line:0 #: field:account_followup.followup.line,send_letter:0 msgid "Send a Letter" -msgstr "" +msgstr "Отправить письмо" #. module: account_followup #: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form @@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение" #: code:addons/account_followup/wizard/account_followup_print.py:155 #, python-format msgid "Anybody" -msgstr "" +msgstr "Кто угодно" #. module: account_followup #: help:account_followup.followup.line,send_email:0 @@ -528,7 +528,7 @@ msgstr "" #. module: account_followup #: view:res.partner:0 msgid "Search Partner" -msgstr "" +msgstr "Поиск партнера" #. module: account_followup #: model:ir.ui.menu,name:account_followup.account_followup_print_menu @@ -554,7 +554,7 @@ msgstr "" #. module: account_followup #: view:account_followup.print:0 msgid "or" -msgstr "" +msgstr "или" #. module: account_followup #: view:res.partner:0 diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml index 6fee6a77ac1..b7c38e89f5e 100644 --- a/addons/account_followup/report/account_followup_report.xml +++ b/addons/account_followup/report/account_followup_report.xml @@ -6,7 +6,7 @@ account_followup.stat.tree account_followup.stat - + diff --git a/addons/account_followup/security/account_followup_security.xml b/addons/account_followup/security/account_followup_security.xml index 1586403d701..69c9a44a1b9 100644 --- a/addons/account_followup/security/account_followup_security.xml +++ b/addons/account_followup/security/account_followup_security.xml @@ -4,7 +4,7 @@ Account Follow-up multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/account_payment/security/account_payment_security.xml b/addons/account_payment/security/account_payment_security.xml index 4bca00eaa6d..fbe29699e86 100644 --- a/addons/account_payment/security/account_payment_security.xml +++ b/addons/account_payment/security/account_payment_security.xml @@ -15,21 +15,21 @@ Payment Mode company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Payment order multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Payment line multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 08d36c45eff..03e25dfbc45 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -23,6 +23,7 @@ import time from lxml import etree from openerp.osv import fields, osv +from openerp.tools.translate import _ class payment_order_create(osv.osv_memory): """ @@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory): context.update({'line_ids': line_ids}) model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - return {'name': ('Entrie Lines'), + return {'name': _('Entry Lines'), 'context': context, 'view_type': 'form', 'view_mode': 'form', diff --git a/addons/account_test/i18n/ru.po b/addons/account_test/i18n/ru.po new file mode 100644 index 00000000000..d36d83d2e99 --- /dev/null +++ b/addons/account_test/i18n/ru.po @@ -0,0 +1,241 @@ +# Russian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-06-05 07:09+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n" +"X-Generator: Launchpad (build 16667)\n" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "" +"Code should always set a variable named `result` with the result of your " +"test, that can be a list or\n" +"a dictionary. If `result` is an empty list, it means that the test was " +"succesful. Otherwise it will\n" +"try to translate and print what is inside `result`.\n" +"\n" +"If the result of your test is a dictionary, you can set a variable named " +"`column_order` to choose in\n" +"what order you want to print `result`'s content.\n" +"\n" +"Should you need them, you can also use the following variables into your " +"code:\n" +" * cr: cursor to the database\n" +" * uid: ID of the current user\n" +"\n" +"In any ways, the code must be legal python statements with correct " +"indentation (if needed).\n" +"\n" +"Example: \n" +" sql = '''SELECT id, name, ref, date\n" +" FROM account_move_line \n" +" WHERE account_id IN (SELECT id FROM account_account WHERE type " +"= 'view')\n" +" '''\n" +" cr.execute(sql)\n" +" result = cr.dictfetchall()" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_02 +msgid "Test 2: Opening a fiscal year" +msgstr "Проверка 2: Открытие фискального года" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05 +msgid "" +"Check that reconciled invoice for Sales/Purchases has reconciled entries for " +"Payable and Receivable Accounts" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_03 +msgid "" +"Check if movement lines are balanced and have the same date and period" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,name:0 +msgid "Test Name" +msgstr "" + +#. module: account_test +#: report:account.test.assert.print:0 +msgid "Accouting tests on" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_01 +msgid "Test 1: General balance" +msgstr "Проверка 1: Общий баланс" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06 +msgid "Check that paid/reconciled invoices are not in 'Open' state" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_05_2 +msgid "" +"Check that reconciled account moves, that define Payable and Receivable " +"accounts, are belonging to reconciled invoices" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Tests" +msgstr "Проверки" + +#. module: account_test +#: field:accounting.assert.test,desc:0 +msgid "Test Description" +msgstr "Описание проверки" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Description" +msgstr "Описание" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_06_1 +msgid "Check that there's no move for any account with « View » account type" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_08 +msgid "Test 9 : Accounts and partners on account moves" +msgstr "" + +#. module: account_test +#: model:ir.actions.act_window,name:account_test.action_accounting_assert +#: model:ir.actions.report.xml,name:account_test.account_assert_test_report +#: model:ir.ui.menu,name:account_test.menu_action_license +msgid "Accounting Tests" +msgstr "" + +#. module: account_test +#: code:addons/account_test/report/account_test_report.py:74 +#, python-format +msgid "The test was passed successfully" +msgstr "Проверка прошла успешно" + +#. module: account_test +#: field:accounting.assert.test,active:0 +msgid "Active" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06 +msgid "Test 6 : Invoices status" +msgstr "" + +#. module: account_test +#: model:ir.model,name:account_test.model_accounting_assert_test +msgid "accounting.assert.test" +msgstr "accounting.assert.test" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05 +msgid "" +"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,code_exec:0 +msgid "Python code" +msgstr "Код на Python" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_07 +msgid "" +"Check on bank statement that the Closing Balance = Starting Balance + sum of " +"statement lines" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_07 +msgid "Test 8 : Closing balance on bank statements" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_03 +msgid "Test 3: Movement lines" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_05_2 +msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Expression" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_04 +msgid "Test 4: Totally reconciled mouvements" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_04 +msgid "Check if the totally reconciled movements are balanced" +msgstr "" + +#. module: account_test +#: field:accounting.assert.test,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_02 +msgid "" +"Check if the balance of the new opened fiscal year matches with last year's " +"balance" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Python Code" +msgstr "Код на Python" + +#. module: account_test +#: model:ir.actions.act_window,help:account_test.action_accounting_assert +msgid "" +"

\n" +" Click to create Accounting Test.\n" +"

\n" +" " +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_01 +msgid "Check the balance: Debit sum = Credit sum" +msgstr "Проверяет баланс: сумма дебита = сумма кредита" + +#. module: account_test +#: model:accounting.assert.test,desc:account_test.account_test_08 +msgid "Check that general accounts and partners on account moves are active" +msgstr "" + +#. module: account_test +#: model:accounting.assert.test,name:account_test.account_test_06_1 +msgid "Test 7: « View  » account type" +msgstr "" + +#. module: account_test +#: view:accounting.assert.test:0 +msgid "Code Help" +msgstr "" diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 850162ccf84..81eb76ff3a8 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1622,7 +1622,7 @@ class account_bank_statement(osv.osv): for bk_st in self.browse(cr, uid, ids, context=context): if vals.get('journal_id') and bk_st.line_ids: if any([x.voucher_id and True or False for x in bk_st.line_ids]): - raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!')) + raise osv.except_osv(_('Unable to Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!')) return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context) diff --git a/addons/account_voucher/html/index.html b/addons/account_voucher/html/index.html index 581dbb4fb96..d59c110dde5 100644 --- a/addons/account_voucher/html/index.html +++ b/addons/account_voucher/html/index.html @@ -7,7 +7,6 @@ Online Demo -   @@ -137,4 +136,5 @@ material. Define recurrencies to produce recurring invoice automatically. -
+
+
diff --git a/addons/account_voucher/i18n/ru.po b/addons/account_voucher/i18n/ru.po index 63cad344ed0..ef38a07e478 100644 --- a/addons/account_voucher/i18n/ru.po +++ b/addons/account_voucher/i18n/ru.po @@ -7,24 +7,24 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-05-10 17:46+0000\n" +"PO-Revision-Date: 2013-05-29 13:17+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:33+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-30 05:45+0000\n" +"X-Generator: Launchpad (build 16652)\n" #. module: account_voucher #: field:account.bank.statement.line,voucher_id:0 msgid "Reconciliation" -msgstr "" +msgstr "Сверка" #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_config_settings msgid "account.config.settings" -msgstr "" +msgstr "account.config.settings" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:369 @@ -45,7 +45,7 @@ msgstr "Общая сумма" #. module: account_voucher #: view:account.voucher:0 msgid "Open Customer Journal Entries" -msgstr "" +msgstr "Открыть записи журнала по заказчику" #. module: account_voucher #: view:account.voucher:0 @@ -63,7 +63,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "(Update)" -msgstr "" +msgstr "(Обновить)" #. module: account_voucher #: view:account.voucher:0 @@ -90,7 +90,7 @@ msgstr "Март" #. module: account_voucher #: field:account.voucher,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "Непрочитанные" #. module: account_voucher #: view:account.voucher:0 @@ -115,13 +115,13 @@ msgstr "Номер транзакции." #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by year of Invoice Date" -msgstr "" +msgstr "Группировать по году в дате счета" #. module: account_voucher #: view:sale.receipt.report:0 #: field:sale.receipt.report,user_id:0 msgid "Salesperson" -msgstr "" +msgstr "Продавец" #. module: account_voucher #: view:account.voucher:0 @@ -135,6 +135,8 @@ msgid "" "You can not change the journal as you already reconciled some statement " "lines!" msgstr "" +"Вы не можете изменить журнал, так как вы уже сверили некоторые позиции " +"документа!" #. module: account_voucher #: view:account.voucher:0 @@ -145,7 +147,7 @@ msgstr "Утвердить" #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment msgid "Supplier Payments" -msgstr "" +msgstr "Оплаты поставщикам" #. module: account_voucher #: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt @@ -167,7 +169,7 @@ msgstr "Искать ваучеры" #. module: account_voucher #: field:account.voucher,writeoff_acc_id:0 msgid "Counterpart Account" -msgstr "" +msgstr "Корреспондирующий счет" #. module: account_voucher #: field:account.voucher,account_id:0 @@ -189,7 +191,7 @@ msgstr "OK" #. module: account_voucher #: field:account.voucher.line,reconcile:0 msgid "Full Reconcile" -msgstr "" +msgstr "Полная сверка" #. module: account_voucher #: field:account.voucher,date_due:0 @@ -207,7 +209,7 @@ msgstr "Примечания" #. module: account_voucher #: field:account.voucher,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Сообщения" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt @@ -225,7 +227,7 @@ msgstr "Элемент журнала" #: code:addons/account_voucher/account_voucher.py:981 #, python-format msgid "Error!" -msgstr "" +msgstr "Ошибка!" #. module: account_voucher #: field:account.voucher.line,amount:0 @@ -235,7 +237,7 @@ msgstr "Суммма" #. module: account_voucher #: view:account.voucher:0 msgid "Payment Options" -msgstr "" +msgstr "Варианты оплаты" #. module: account_voucher #: view:account.voucher:0 @@ -254,6 +256,8 @@ msgstr "Отменено" msgid "" "You have to configure account base code and account tax code on the '%s' tax!" msgstr "" +"Вы должны настроить код базового счета и код налогового счета для налога " +"'%s'!" #. module: account_voucher #: model:ir.actions.act_window,help:account_voucher.action_sale_receipt @@ -271,7 +275,7 @@ msgstr "" #. module: account_voucher #: help:account.voucher,message_unread:0 msgid "If checked new messages require your attention." -msgstr "" +msgstr "Если отмечено, новые сообщения требуют вашего внимания." #. module: account_voucher #: model:ir.model,name:account_voucher.model_account_bank_statement_line @@ -294,12 +298,12 @@ msgstr "Налог" #: code:addons/account_voucher/account_voucher.py:879 #, python-format msgid "Invalid Action!" -msgstr "" +msgstr "Неверное действие!" #. module: account_voucher #: field:account.voucher,comment:0 msgid "Counterpart Comment" -msgstr "" +msgstr "Корреспондирующий коментарий" #. module: account_voucher #: field:account.voucher.line,account_analytic_id:0 @@ -312,6 +316,8 @@ msgid "" "Holds the Chatter summary (number of messages, ...). This summary is " "directly in html format in order to be inserted in kanban views." msgstr "" +"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате " +"html для возможности использования в канбан виде" #. module: account_voucher #: view:account.voucher:0 @@ -326,7 +332,7 @@ msgstr "Информация о платеже" #. module: account_voucher #: view:account.voucher:0 msgid "(update)" -msgstr "" +msgstr "(обновить)" #. module: account_voucher #: view:account.voucher:0 @@ -395,7 +401,7 @@ msgstr "Ваучер поставщика" #. module: account_voucher #: field:account.voucher,message_follower_ids:0 msgid "Followers" -msgstr "" +msgstr "Подписчики" #. module: account_voucher #: selection:account.voucher.line,type:0 @@ -406,7 +412,7 @@ msgstr "Дебет" #: code:addons/account_voucher/account_voucher.py:1547 #, python-format msgid "Unable to change journal !" -msgstr "" +msgstr "Невозможно изменить журнал!" #. module: account_voucher #: view:sale.receipt.report:0 @@ -446,7 +452,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "Open Supplier Journal Entries" -msgstr "" +msgstr "Открыть журнал проводок по поставщику" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list @@ -461,7 +467,7 @@ msgstr "Памятка" #. module: account_voucher #: view:account.voucher:0 msgid "Are you sure to unreconcile and cancel this record ?" -msgstr "" +msgstr "Вы уверены, что надо отменить сверку и саму запись ?" #. module: account_voucher #: field:account.voucher,is_multi_currency:0 @@ -494,13 +500,13 @@ msgstr "" #. module: account_voucher #: field:account.voucher,writeoff_amount:0 msgid "Difference Amount" -msgstr "" +msgstr "Сумма разницы" #. module: account_voucher #: view:sale.receipt.report:0 #: field:sale.receipt.report,due_delay:0 msgid "Avg. Due Delay" -msgstr "" +msgstr "Средн. задержка" #. module: account_voucher #: code:addons/account_voucher/invoice.py:34 @@ -554,7 +560,7 @@ msgstr "Оплаченная сумма" #. module: account_voucher #: field:account.voucher,payment_option:0 msgid "Payment Difference" -msgstr "" +msgstr "Оплата разницы" #. module: account_voucher #: view:account.voucher:0 @@ -568,7 +574,7 @@ msgstr "Для проверки" #: code:addons/account_voucher/account_voucher.py:1194 #, python-format msgid "change" -msgstr "" +msgstr "изменить" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:1014 @@ -599,7 +605,7 @@ msgstr "" #. module: account_voucher #: view:account.invoice:0 msgid "Register Payment" -msgstr "" +msgstr "Регистрация оплаты" #. module: account_voucher #: field:account.statement.from.invoice.lines,line_ids:0 @@ -614,7 +620,7 @@ msgstr "декабрём" #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by month of Invoice Date" -msgstr "" +msgstr "Группировать по месяцу даты счета" #. module: account_voucher #: view:sale.receipt.report:0 @@ -647,7 +653,7 @@ msgstr "" #. module: account_voucher #: view:account.voucher:0 msgid "Are you sure to unreconcile this record?" -msgstr "" +msgstr "Вы уверены в отмене сверки" #. module: account_voucher #: field:account.voucher,company_id:0 @@ -665,13 +671,13 @@ msgstr "" #. module: account_voucher #: selection:account.voucher,payment_option:0 msgid "Reconcile Payment Balance" -msgstr "" +msgstr "Сверка платежного баланса" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:975 #, python-format msgid "Configuration Error !" -msgstr "" +msgstr "Ошибка конфигурации !" #. module: account_voucher #: view:account.voucher:0 @@ -695,18 +701,18 @@ msgstr "" #: field:account.voucher,state:0 #: view:sale.receipt.report:0 msgid "Status" -msgstr "" +msgstr "Статус" #. module: account_voucher #: view:account.voucher:0 msgid "Allocation" -msgstr "" +msgstr "Распределение" #. module: account_voucher #: view:account.statement.from.invoice.lines:0 #: view:account.voucher:0 msgid "or" -msgstr "" +msgstr "или" #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -716,7 +722,7 @@ msgstr "Август" #. module: account_voucher #: view:account.voucher:0 msgid "Validate Payment" -msgstr "" +msgstr "Утвердить оплату" #. module: account_voucher #: help:account.voucher,audit:0 @@ -724,6 +730,8 @@ msgid "" "Check this box if you are unsure of that journal entry and if you want to " "note it as 'to be reviewed' by an accounting expert." msgstr "" +"Отметьте, если вы не уверены в этой проводке журнала и хотите отметить её " +"\"для проверки\" опытному бухгалтеру." #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -734,7 +742,7 @@ msgstr "Октябрь" #: code:addons/account_voucher/account_voucher.py:976 #, python-format msgid "Please activate the sequence of selected journal !" -msgstr "" +msgstr "Пожалуйста, включите нумерацию выбранного журнала!" #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -749,7 +757,7 @@ msgstr "" #. module: account_voucher #: field:account.voucher,paid:0 msgid "Paid" -msgstr "" +msgstr "Оплачено" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_sale_receipt @@ -760,7 +768,7 @@ msgstr "" #. module: account_voucher #: field:account.voucher,message_is_follower:0 msgid "Is a Follower" -msgstr "" +msgstr "Подписан" #. module: account_voucher #: field:account.voucher,analytic_id:0 @@ -787,7 +795,7 @@ msgstr "Расширенные фильтры..." #. module: account_voucher #: field:account.voucher,paid_amount_in_company_currency:0 msgid "Paid Amount in Company Currency" -msgstr "" +msgstr "Оплаченная сумма в валюте компании" #. module: account_voucher #: field:account.bank.statement.line,amount_reconciled:0 @@ -814,7 +822,7 @@ msgstr "Предыдущие платежи ?" #: code:addons/account_voucher/account_voucher.py:1112 #, python-format msgid "The invoice you are willing to pay is not valid anymore." -msgstr "" +msgstr "Счет, который вы готовы платить, уже не актуален ." #. module: account_voucher #: selection:sale.receipt.report,month:0 @@ -830,30 +838,30 @@ msgstr "Журнал ваучеров" #. module: account_voucher #: model:ir.model,name:account_voucher.model_res_company msgid "Companies" -msgstr "" +msgstr "Компании" #. module: account_voucher #: field:account.voucher,message_summary:0 msgid "Summary" -msgstr "" +msgstr "Итог" #. module: account_voucher #: field:account.voucher,active:0 msgid "Active" -msgstr "" +msgstr "Активно" #. module: account_voucher #: code:addons/account_voucher/account_voucher.py:982 #, python-format msgid "Please define a sequence on the journal." -msgstr "" +msgstr "Пожалуйста, определите нумерацию журнала." #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.act_pay_voucher #: model:ir.actions.act_window,name:account_voucher.action_vendor_receipt #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_receipt msgid "Customer Payments" -msgstr "" +msgstr "Платежи клиентов" #. module: account_voucher #: model:ir.actions.act_window,name:account_voucher.action_sale_receipt_report_all @@ -865,7 +873,7 @@ msgstr "" #. module: account_voucher #: view:sale.receipt.report:0 msgid "Group by Invoice Date" -msgstr "" +msgstr "Группировать по дате счета" #. module: account_voucher #: view:account.voucher:0 diff --git a/addons/account_voucher/security/account_voucher_security.xml b/addons/account_voucher/security/account_voucher_security.xml index 04540fd8aa0..daa5934b256 100644 --- a/addons/account_voucher/security/account_voucher_security.xml +++ b/addons/account_voucher/security/account_voucher_security.xml @@ -3,13 +3,13 @@ Voucher multi-company - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Voucher Line multi-company - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index ac298713b04..ce79c4d5ffb 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -157,7 +157,7 @@ class account_analytic_account(osv.osv): for account in self.browse(cr, uid, ids, context=context): if account.company_id: if account.company_id.currency_id.id != value: - raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example.")) + raise osv.except_osv(_('Error!'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really useful for consolidation purposes of several companies charts with different currencies, for example.")) if value: return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, )) diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml index 70688275de2..bf103ca8988 100644 --- a/addons/analytic/security/analytic_security.xml +++ b/addons/analytic/security/analytic_security.xml @@ -4,14 +4,14 @@ Analytic multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] Analytic line multi company rule - + ['|',('company_id','=',False),('company_id','child_of',[user.company_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 0477efa5b1f..c82afde103f 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -86,11 +86,11 @@ class ir_model_fields_anonymization(osv.osv): if context.get('manual'): global_state = self._get_global_state(cr, uid, context=context) if global_state == 'anonymized': - raise osv.except_osv('Error !', "The database is currently anonymized, you cannot create, modify or delete fields.") + raise osv.except_osv('Error!', "The database is currently anonymized, you cannot create, modify or delete fields.") elif global_state == 'unstable': msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) return True @@ -357,7 +357,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): else: msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to do anything else.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) res['arch'] = etree.tostring(eview) @@ -521,11 +521,11 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # check that all the defined fields are in the 'anonymized' state state = ir_model_fields_anonymization_model._get_global_state(cr, uid, context=context) if state == 'clear': - raise osv.except_osv_('Error !', "The database is not currently anonymized, you cannot reverse the anonymization.") + raise osv.except_osv_('Error!', "The database is not currently anonymized, you cannot reverse the anonymization.") elif state == 'unstable': msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") - raise osv.except_osv('Error !', msg) + raise osv.except_osv('Error!', msg) wizards = self.browse(cr, uid, ids, context=context) for wizard in wizards: diff --git a/addons/auth_openid/i18n/ru.po b/addons/auth_openid/i18n/ru.po index 6041300fe60..68b36626056 100644 --- a/addons/auth_openid/i18n/ru.po +++ b/addons/auth_openid/i18n/ru.po @@ -8,21 +8,21 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-03-23 11:37+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-05-28 06:19+0000\n" +"Last-Translator: Глория Хрусталёва \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-24 04:45+0000\n" -"X-Generator: Launchpad (build 16540)\n" +"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: auth_openid #. openerp-web #: code:addons/auth_openid/static/src/xml/auth_openid.xml:24 #, python-format msgid "Username" -msgstr "" +msgstr "Имя пользователя" #. module: auth_openid #. openerp-web @@ -30,7 +30,7 @@ msgstr "" #: view:res.users:0 #, python-format msgid "OpenID" -msgstr "" +msgstr "OpenID" #. module: auth_openid #. openerp-web @@ -46,14 +46,14 @@ msgstr "" #: code:addons/auth_openid/static/src/xml/auth_openid.xml:10 #, python-format msgid "Google" -msgstr "" +msgstr "Google" #. module: auth_openid #. openerp-web #: code:addons/auth_openid/static/src/xml/auth_openid.xml:11 #, python-format msgid "Launchpad" -msgstr "" +msgstr "Launchpad" #. module: auth_openid #: help:res.users,openid_email:0 @@ -82,7 +82,7 @@ msgstr "" #: code:addons/auth_openid/static/src/xml/auth_openid.xml:8 #, python-format msgid "Password" -msgstr "" +msgstr "Пароль" #. module: auth_openid #. openerp-web @@ -94,4 +94,4 @@ msgstr "" #. module: auth_openid #: model:ir.model,name:auth_openid.model_res_users msgid "Users" -msgstr "" +msgstr "Пользователи" diff --git a/addons/auth_signup/i18n/ru.po b/addons/auth_signup/i18n/ru.po index bddc6cde1ba..639a1e9bc3c 100644 --- a/addons/auth_signup/i18n/ru.po +++ b/addons/auth_signup/i18n/ru.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-11 06:59+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-05-27 12:12+0000\n" +"Last-Translator: Глория Хрусталёва \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:52+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-28 05:17+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: auth_signup #: field:res.partner,signup_type:0 @@ -25,25 +25,25 @@ msgstr "" #. module: auth_signup #: field:base.config.settings,auth_signup_uninvited:0 msgid "Allow external users to sign up" -msgstr "" +msgstr "Разрешить регистрацию внешним пользователям" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:16 #, python-format msgid "Confirm Password" -msgstr "" +msgstr "Подтвердите пароль" #. module: auth_signup #: help:base.config.settings,auth_signup_uninvited:0 msgid "If unchecked, only invited users may sign up." msgstr "" -"Если отмечено, только приглашенные пользователи могут зарегистрироваться" +"Если не отмечено, только приглашенные пользователи могут зарегистрироваться" #. module: auth_signup #: model:ir.model,name:auth_signup.model_base_config_settings msgid "base.config.settings" -msgstr "" +msgstr "base.config.settings" #. module: auth_signup #: code:addons/auth_signup/res_users.py:265 @@ -57,17 +57,17 @@ msgstr "Невозможно отправить письмо: у пользов #: code:addons/auth_signup/static/src/xml/auth_signup.xml:28 #, python-format msgid "Reset password" -msgstr "" +msgstr "Сброс пароля" #. module: auth_signup #: field:base.config.settings,auth_signup_template_user_id:0 msgid "Template user for new users created through signup" -msgstr "" +msgstr "Шаблон новых пользователей, созданных в процессе регистрации" #. module: auth_signup #: model:email.template,subject:auth_signup.reset_password_email msgid "Password reset" -msgstr "" +msgstr "Сброс пароля" #. module: auth_signup #. openerp-web @@ -88,12 +88,12 @@ msgstr "" #: code:addons/auth_signup/static/src/xml/auth_signup.xml:26 #, python-format msgid "Sign Up" -msgstr "" +msgstr "Регистрация" #. module: auth_signup #: selection:res.users,state:0 msgid "New" -msgstr "" +msgstr "Новый" #. module: auth_signup #: code:addons/auth_signup/res_users.py:258 @@ -104,7 +104,7 @@ msgstr "" #. module: auth_signup #: field:res.users,state:0 msgid "Status" -msgstr "" +msgstr "Статус" #. module: auth_signup #: model:email.template,body_html:auth_signup.reset_password_email @@ -118,18 +118,27 @@ msgid "" "\n" "

Note: If you do not expect this, you can safely ignore this email.

" msgstr "" +"\n" +"

Был запрошен сброс пароля для аккаунта OpenERP связанного с этим адресом " +"эл.почты

\n" +"\n" +"

Вы можете сменить пароль, проследовав по ссылке.

\n" +"\n" +"

Примечание: если вы не запрашивали сброс пароля, просто проигнорируйте " +"данное письмо

" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/js/auth_signup.js:111 #, python-format msgid "Please enter a name." -msgstr "" +msgstr "Пожалуйста, введите имя" #. module: auth_signup #: model:ir.model,name:auth_signup.model_res_users msgid "Users" -msgstr "" +msgstr "Пользователи" #. module: auth_signup #: field:res.partner,signup_url:0 @@ -146,7 +155,7 @@ msgstr "Пожалуйста, введите имя пользователя." #. module: auth_signup #: selection:res.users,state:0 msgid "Active" -msgstr "" +msgstr "Активен" #. module: auth_signup #: code:addons/auth_signup/res_users.py:269 @@ -155,39 +164,41 @@ msgid "" "Cannot send email: no outgoing email server configured.\n" "You can configure it under Settings/General Settings." msgstr "" +"Невозможно отправить email: не настроены сервера исходящей почты.\n" +"Вы можете настроить их в меню Настройки/Общие настройки" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:12 #, python-format msgid "Username" -msgstr "" +msgstr "Имя пользователя" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:8 #, python-format msgid "Name" -msgstr "" +msgstr "Имя" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/js/auth_signup.js:170 #, python-format msgid "Please enter a username or email address." -msgstr "" +msgstr "Пожалуйста, введите имя пользователя или адрес эл. почты." #. module: auth_signup #: selection:res.users,state:0 msgid "Resetting Password" -msgstr "" +msgstr "Переустановка пароля" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:13 #, python-format msgid "Username (Email)" -msgstr "" +msgstr "Имя пользователя (Email)" #. module: auth_signup #: field:res.partner,signup_expiration:0 @@ -198,13 +209,15 @@ msgstr "" #: help:base.config.settings,auth_signup_reset_password:0 msgid "This allows users to trigger a password reset from the Login page." msgstr "" +"Это позволяет пользователям запросить сброс пароля со страницы входа в " +"систему." #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:22 #, python-format msgid "Log in" -msgstr "" +msgstr "Вход" #. module: auth_signup #: field:res.partner,signup_valid:0 @@ -222,7 +235,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:170 #, python-format msgid "Login" -msgstr "" +msgstr "Вход" #. module: auth_signup #. openerp-web @@ -236,7 +249,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:120 #, python-format msgid "Passwords do not match; please retype them." -msgstr "" +msgstr "Пароли не совпадают; пожалуйста, введите их заново." #. module: auth_signup #. openerp-web @@ -244,7 +257,7 @@ msgstr "" #: code:addons/auth_signup/static/src/js/auth_signup.js:167 #, python-format msgid "No database selected !" -msgstr "" +msgstr "Не выбрана база данных!" #. module: auth_signup #: view:res.users:0 @@ -254,14 +267,14 @@ msgstr "" #. module: auth_signup #: field:base.config.settings,auth_signup_reset_password:0 msgid "Enable password reset from Login page" -msgstr "" +msgstr "Включить сброс пароля со страницы входа" #. module: auth_signup #. openerp-web #: code:addons/auth_signup/static/src/xml/auth_signup.xml:27 #, python-format msgid "Back to Login" -msgstr "" +msgstr "Вернуться к странице входа" #. module: auth_signup #. openerp-web @@ -273,7 +286,7 @@ msgstr "" #. module: auth_signup #: model:ir.model,name:auth_signup.model_res_partner msgid "Partner" -msgstr "" +msgstr "Партнер" #. module: auth_signup #: field:res.partner,signup_token:0 diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index f4a985280ac..891837f8813 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -23,6 +23,7 @@ import random from urllib import urlencode from urlparse import urljoin +from openerp.addons.base.ir.ir_mail_server import MailDeliveryException from openerp.osv import osv, fields from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT from openerp.tools.safe_eval import safe_eval @@ -55,19 +56,22 @@ class res_partner(osv.Model): def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None): """ generate a signup url for the given partner ids and action, possibly overriding the url state components (menu_id, id, view_type) """ + if context is None: + context= {} res = dict.fromkeys(ids, False) base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') for partner in self.browse(cr, uid, ids, context): # when required, make sure the partner has a valid signup token - if context and context.get('signup_valid') and not partner.user_ids: + if context.get('signup_valid') and not partner.user_ids: self.signup_prepare(cr, uid, [partner.id], context=context) partner.refresh() # the parameters to encode for the query and fragment part of url query = {'db': cr.dbname} - fragment = {'action': action, 'type': partner.signup_type} + signup_type = context.get('signup_force_type_in_url', partner.signup_type or '') + fragment = {'action': action, 'type': signup_type} - if partner.signup_token: + if partner.signup_token and signup_type: fragment['token'] = partner.signup_token elif partner.user_ids: fragment['db'] = cr.dbname @@ -103,6 +107,9 @@ class res_partner(osv.Model): def action_signup_prepare(self, cr, uid, ids, context=None): return self.signup_prepare(cr, uid, ids, context=context) + def signup_cancel(self, cr, uid, ids, context=None): + return self.write(cr, uid, ids, {'signup_token': False, 'signup_type': False, 'signup_expiration': False}, context=context) + def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None): """ generate a new token for the partners with the given validity, if necessary :param expiration: the expiration datetime of the token (string, optional) @@ -202,7 +209,7 @@ class res_users(osv.Model): }) if partner.company_id: values['company_id'] = partner.company_id.id - values['company_ids'] = [(6,0,[partner.company_id.id])] + values['company_ids'] = [(6, 0, [partner.company_id.id])] self._signup_create_user(cr, uid, values, context=context) else: # no token, sign up an external user @@ -259,25 +266,26 @@ class res_users(osv.Model): pass if not bool(template): template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email') - mail_obj = self.pool.get('mail.mail') assert template._name == 'email.template' for user in self.browse(cr, uid, ids, context): if not user.email: raise osv.except_osv(_("Cannot send email: user has no email address."), user.name) - mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, True, context=context) - mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context) - - if mail_state and mail_state['state'] == 'exception': - raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context) - else: - return True + try: + self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, force_send=True, raise_exception=True, context=context) + except Exception: + raise def create(self, cr, uid, values, context=None): + if context is None: + context = {} # overridden to automatically invite user to sign up user_id = super(res_users, self).create(cr, uid, values, context=context) user = self.browse(cr, uid, user_id, context=context) - if context and context.get('reset_password') and user.email: - ctx = dict(context, create_user=True) - self.action_reset_password(cr, uid, [user.id], context=ctx) + if user.email and not context.get('no_reset_password'): + context.update({'create_user': True}) + try: + self.action_reset_password(cr, uid, [user.id], context=context) + except MailDeliveryException: + self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context) return user_id diff --git a/addons/auth_signup/res_users_view.xml b/addons/auth_signup/res_users_view.xml index 28f66eb101d..60c419db737 100644 --- a/addons/auth_signup/res_users_view.xml +++ b/addons/auth_signup/res_users_view.xml @@ -31,9 +31,11 @@
-
+
+
diff --git a/addons/mrp/i18n/mn.po b/addons/mrp/i18n/mn.po index 8d3c0aee785..53f793c1804 100644 --- a/addons/mrp/i18n/mn.po +++ b/addons/mrp/i18n/mn.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-07-21 12:33+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2013-06-04 04:00+0000\n" +"Last-Translator: erdenebold \n" "Language-Team: Mongolian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:01+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-06-05 05:32+0000\n" +"X-Generator: Launchpad (build 16660)\n" #. module: mrp #: help:mrp.config.settings,module_mrp_repair:0 @@ -48,7 +48,7 @@ msgstr "Дамжлагуудын Ашиглалт" #. module: mrp #: view:mrp.routing.workcenter:0 msgid "Routing Work Centers" -msgstr "Дамжлагуудын маршрут" +msgstr "Шугамын дамжлагууд" #. module: mrp #: field:mrp.production.workcenter.line,cycle:0 @@ -86,12 +86,12 @@ msgstr "" #: model:ir.actions.act_window,name:mrp.mrp_routing_action #: model:ir.ui.menu,name:mrp.menu_mrp_routing_action msgid "Routings" -msgstr "Маршрут" +msgstr "Шугам" #. module: mrp #: view:mrp.bom:0 msgid "Search Bill Of Material" -msgstr "Жор Хайх" +msgstr "Орц Хайх" #. module: mrp #: model:process.node,note:mrp.process_node_stockproduct1 @@ -112,8 +112,8 @@ msgid "" "Number of iterations this work center has to do in the specified operation " "of the routing." msgstr "" -"Үйлдвэрлэлийн нэг маршрутын хувьд уг дамжлага өөрийн үйлдлийг давтан " -"гүйцэтгэх давтамжын тоо." +"Үйлдвэрлэлийн нэг шугамын хувьд уг дамжлага өөрийн үйлдлийг давтан гүйцэтгэх " +"давтамжын тоо." #. module: mrp #: view:product.product:0 @@ -214,7 +214,7 @@ msgstr "" #: code:addons/mrp/mrp.py:633 #, python-format msgid "Cannot cancel manufacturing order!" -msgstr "" +msgstr "Үйлдвэрийн захиалгыг цуцлах боломжгүй!" #. module: mrp #: field:mrp.workcenter,costs_cycle_account_id:0 @@ -337,7 +337,7 @@ msgstr "Бараа Үйлдвэрлэх" #. module: mrp #: constraint:mrp.bom:0 msgid "Error ! You cannot create recursive BoM." -msgstr "Алдаа ! Тойрог хамааралтай жор үүсгэж болохгүй." +msgstr "Алдаа ! Тойрог хамааралтай орц үүсгэж болохгүй." #. module: mrp #: model:ir.model,name:mrp.model_mrp_routing_workcenter @@ -423,7 +423,7 @@ msgstr "" #: field:mrp.production,product_qty:0 #: field:mrp.production.product.line,product_qty:0 msgid "Product Quantity" -msgstr "" +msgstr "Барааны тоо" #. module: mrp #: help:mrp.production,picking_id:0 @@ -491,13 +491,13 @@ msgstr "Товлогдсон огноо" #: code:addons/mrp/procurement.py:124 #, python-format msgid "Manufacturing Order %s created." -msgstr "" +msgstr "Үйлдвэрлэлийн захиалга %s үүсгэгдлээ." #. module: mrp #: view:mrp.bom:0 #: report:mrp.production.order:0 msgid "Bill Of Material" -msgstr "Жор" +msgstr "Орц" #. module: mrp #: help:mrp.routing,location_id:0 @@ -518,7 +518,7 @@ msgstr "Нөөцийн Үнийн Хазайлт" #. module: mrp #: model:ir.actions.act_window,name:mrp.action2 msgid "Bill of Materials Structure" -msgstr "Жорын Бүтэц" +msgstr "Орцын Бүтэц" #. module: mrp #: model:process.node,note:mrp.process_node_serviceproduct0 @@ -560,7 +560,7 @@ msgstr "" msgid "" "The Bill of Material is linked to a routing, i.e. the succession of work " "centers." -msgstr "Жор нь маршруттай холбогдсон, ө.х. дамжлагуудын цуваанууд" +msgstr "Орц нь шугамтай холбогдсон, ө.х. дамжлагуудын цуваанууд" #. module: mrp #: view:mrp.production:0 @@ -592,7 +592,7 @@ msgstr "Нөөцийн үнэ" #. module: mrp #: model:ir.actions.act_window,name:mrp.action_product_bom_structure msgid "Product BoM Structure" -msgstr "Барааны Жорын Бүтэц" +msgstr "Барааны Орцын Бүтэц" #. module: mrp #: view:mrp.production:0 @@ -603,12 +603,12 @@ msgstr "Үйлдвэрлэл Хайх" #: help:mrp.routing.workcenter,sequence:0 msgid "" "Gives the sequence order when displaying a list of routing Work Centers." -msgstr "Маршруутын дамжлагуудыг жагсаалтаар харуулах дэс дарааллыг өгнө." +msgstr "Шугамын дамжлагуудыг жагсаалтаар харуулах дэс дарааллыг өгнө." #. module: mrp #: field:mrp.bom,child_complete_ids:0 msgid "BoM Hierarchy" -msgstr "Жорын удамшил" +msgstr "Орцын удамшил" #. module: mrp #: model:process.transition,name:mrp.process_transition_stockproduction0 @@ -637,7 +637,7 @@ msgstr "Бэлтгэлтийн Сондгойрол" #. module: mrp #: field:mrp.bom,bom_lines:0 msgid "BoM Lines" -msgstr "Жорын мөрүүд" +msgstr "Орцын мөрүүд" #. module: mrp #: field:mrp.workcenter,time_start:0 @@ -650,13 +650,13 @@ msgid "" "If the active field is set to False, it will allow you to hide the routing " "without removing it." msgstr "" -"Идэвхтэй талбар нь худал буюу тэмдэглэгдээгүй байвал машрутыг устгалгүйгээр " +"Идэвхтэй талбар нь худал буюу тэмдэглэгдээгүй байвал шугамыг устгалгүйгээр " "нуудаг." #. module: mrp #: model:process.transition,name:mrp.process_transition_billofmaterialrouting0 msgid "Material Routing" -msgstr "Материалын Машрут" +msgstr "Материалын Шугам" #. module: mrp #: view:mrp.production:0 @@ -676,13 +676,13 @@ msgstr "Дамжлагын Ачаалал" #: code:addons/mrp/procurement.py:50 #, python-format msgid "No BoM defined for this product !" -msgstr "Энэ бараанд жор тодорхойлогдоогүй байна !" +msgstr "Энэ бараанд орц тодорхойлогдоогүй байна !" #. module: mrp #: model:ir.actions.act_window,name:mrp.mrp_bom_form_action2 #: model:ir.ui.menu,name:mrp.menu_mrp_bom_form_action2 msgid "Bill of Material Components" -msgstr "Жорын бүрдэлүүд" +msgstr "Орцын бүрдэлүүд" #. module: mrp #: model:ir.model,name:mrp.model_stock_move @@ -708,7 +708,7 @@ msgid "" "operations and to plan future loads on work centers based on production " "plannification." msgstr "" -"Эцсийн барааг үйлдвэрлэх үйлдлүүд (дамжлагууд)-н жагсаалт. Машрут гэдэг нь " +"Эцсийн барааг үйлдвэрлэх үйлдлүүд (дамжлагууд)-н жагсаалт. Шугам гэдэг нь " "үндсэндээ дамжлагуудын өртөгийг тооцоолох болон ажлын ачааллыг тооцоолоход " "үйлдвэрлэлийн төлөвлөгөөн дээр суурилан бодоход хэрэглэгддэг." @@ -734,7 +734,7 @@ msgstr "" #. module: mrp #: constraint:mrp.bom:0 msgid "BoM line product should not be same as BoM product." -msgstr "Жорын мөр нь жорын бараатайгаа ижил байж болохгүй." +msgstr "Орцын мөр нь орцын бараатайгаа ижил байж болохгүй." #. module: mrp #: view:mrp.production:0 @@ -744,7 +744,7 @@ msgstr "Үйлдвэрлэгдэж буй" #. module: mrp #: model:ir.ui.menu,name:mrp.menu_mrp_property msgid "Master Bill of Materials" -msgstr "Мастер жор" +msgstr "Мастер орц" #. module: mrp #: help:mrp.config.settings,module_product_manufacturer:0 @@ -907,7 +907,7 @@ msgid "" "All product quantities must be greater than 0.\n" "You should install the mrp_byproduct module if you want to manage extra " "products on BoMs !" -msgstr "" +msgstr "Бүх бүтээгдэхүүнийг тоог 0-оос эхэлж үүсгэнэ." #. module: mrp #: view:mrp.production:0 @@ -954,7 +954,7 @@ msgstr "" #. module: mrp #: field:mrp.bom,type:0 msgid "BoM Type" -msgstr "Жорын төрөл" +msgstr "Орцын төрөл" #. module: mrp #: code:addons/mrp/procurement.py:52 @@ -962,7 +962,7 @@ msgstr "Жорын төрөл" msgid "" "Procurement '%s' has an exception: 'No BoM defined for this product !'" msgstr "" -"'%s' татан авалтад сондгойрол байна: 'Бараанд жор тодорхойлогдоогүй !'" +"'%s' татан авалтад сондгойрол байна: 'Бараанд орц тодорхойлогдоогүй !'" #. module: mrp #: view:mrp.property:0 @@ -1077,7 +1077,7 @@ msgstr "Нөөцлүүлэх" #. module: mrp #: report:bom.structure:0 msgid "BOM Name" -msgstr "Жорын нэр" +msgstr "Орцын нэр" #. module: mrp #: model:ir.actions.act_window,name:mrp.act_product_manufacturing_open @@ -1167,7 +1167,7 @@ msgstr "Хийгдэж байгаа үйлдвэрлэлийн захиалгу #. module: mrp #: model:ir.actions.client,name:mrp.action_client_mrp_menu msgid "Open MRP Menu" -msgstr "" +msgstr "Нээлттэй MRP цэс" #. module: mrp #: model:ir.actions.act_window,name:mrp.mrp_production_action4 @@ -1194,7 +1194,7 @@ msgstr "Циклийн Өртөг" #: code:addons/mrp/wizard/change_production_qty.py:88 #, python-format msgid "Cannot find bill of material for this product." -msgstr "" +msgstr "Энэ бараа материалаар хайх боломжгүй." #. module: mrp #: selection:mrp.workcenter.load,measure_unit:0 @@ -1216,8 +1216,7 @@ msgstr "Нөөцүүд" msgid "" "Time in hours for this Work Center to achieve the operation of the specified " "routing." -msgstr "" -"Заагдсан маршрутын үйлдлийг гүйцэтгэхэд энэ дамжлагын хугацаа цагаар." +msgstr "Заагдсан шугамын үйлдлийг гүйцэтгэхэд энэ дамжлагын хугацаа цагаар." #. module: mrp #: field:mrp.workcenter,costs_journal_id:0 @@ -1272,7 +1271,7 @@ msgstr "Үйлдвэрлэлийг эхлүүлэхэд бэлэн Үйлдвэ #: field:mrp.production,bom_id:0 #: model:process.node,name:mrp.process_node_billofmaterial0 msgid "Bill of Material" -msgstr "Жор" +msgstr "Орц" #. module: mrp #: view:mrp.workcenter.load:0 @@ -1304,9 +1303,9 @@ msgid "" "Routing is indicated then,the third tab of a production order (Work Centers) " "will be automatically pre-completed." msgstr "" -"Маршрут нь дамжлагууд ямар хугацаагаар хэдэн циклээр ашиглагдахыг " -"илэрхийлдэг. Хэрэв маршрут байгаа бол гурав дахь үйлдвэрлэлийн дарааллын " -"хавтас автоматаар бөглөгддөг." +"Шугам нь дамжлагууд ямар хугацаагаар хэдэн циклээр ашиглагдахыг илэрхийлдэг. " +"Хэрэв шугам байгаа бол гурав дахь үйлдвэрлэлийн дарааллын хавтас автоматаар " +"бөглөгддөг." #. module: mrp #: code:addons/mrp/mrp.py:505 @@ -1431,7 +1430,7 @@ msgstr "Үйлдвэрлэлийн дамжлагыг хайх" #. module: mrp #: view:mrp.bom:0 msgid "BoM Structure" -msgstr "Жорын бүтэц" +msgstr "Орцын бүтэц" #. module: mrp #: field:mrp.production,date_start:0 @@ -1541,7 +1540,7 @@ msgstr "БЗ Дугаар" #: code:addons/mrp/mrp.py:505 #, python-format msgid "Cannot delete a manufacturing order in state '%s'." -msgstr "" +msgstr "Үйлдвэрлэлийн захиалгын '%s' төлөвт устгах боломжгүй." #. module: mrp #: selection:mrp.production,state:0 @@ -1689,7 +1688,7 @@ msgstr "Нөөц" #: help:mrp.bom,date_stop:0 msgid "Validity of this BoM or component. Keep empty if it's always valid." msgstr "" -"Энэ жор эсвэл бүрэлдхүүний зөв эсэхийн шалгалт. Хэрэв байнга зөв бол хоосон " +"Орц эсвэл бүрэлдэхүүний зөв эсэхийн шалгалт. Хэрэв байнга зөв бол хоосон " "үлдээнэ." #. module: mrp @@ -1710,7 +1709,7 @@ msgid "" "operations and to plan future loads on work centers based on production " "planning." msgstr "" -"Барааг үйлдвэрлэх үйлдлийн жагсаалт (дамжлагын жагсаалт). Машрут нь " +"Барааг үйлдвэрлэх үйлдлийн жагсаалт (дамжлагын жагсаалт). Шугам нь " "үйлдвэрлэлийн захиалга дээр үндэслэн дамжлагуудын өртөгийг тооцох, ажлын " "ирээдүйн ачааллыг тооцоолох зэрэгт голчлон хэрэглэгддэг." @@ -1816,8 +1815,8 @@ msgid "" "are products themselves) can also have their own Bill of Material (multi-" "level)." msgstr "" -"Жор гэдэг нь барааны задаргаа юм. Бүрэлдхүүнүүд (мөн бараанууд) нь мөн " -"өөрийн жортой буюу олон түвшний жор байж болно." +"Орц гэдэг нь барааны задаргаа юм. Бүрэлдэхүүнүүд (мөн бараанууд) нь мөн " +"өөрийн орцтой буюу олон түвшний орц байж болно." #. module: mrp #: field:mrp.bom,company_id:0 @@ -1882,7 +1881,7 @@ msgstr "Бүрэлдэхүүнүүд" #: report:bom.structure:0 #: model:ir.actions.report.xml,name:mrp.report_bom_structure msgid "BOM Structure" -msgstr "Жорын бүтэц" +msgstr "Орцын бүтэц" #. module: mrp #: field:mrp.config.settings,module_mrp_jit:0 @@ -1902,7 +1901,7 @@ msgstr "Хүчинтэй байх эхлэл" #. module: mrp #: selection:mrp.bom,type:0 msgid "Normal BoM" -msgstr "Хэвийн жор" +msgstr "Хэвийн орц" #. module: mrp #: field:res.company,manufacturing_lead:0 @@ -1958,7 +1957,7 @@ msgid "" "If the active field is set to False, it will allow you to hide the bills of " "material without removing it." msgstr "" -"Идэвхтэй талбар худал буюу тэмдэглэгдээгүй бол жорыг устгалгүйгээр нууна." +"Идэвхтэй талбар худал буюу тэмдэглэгдээгүй бол орцыг устгалгүйгээр нууна." #. module: mrp #: field:mrp.bom,product_rounding:0 @@ -2083,7 +2082,7 @@ msgstr "" #. module: mrp #: field:procurement.order,bom_id:0 msgid "BoM" -msgstr "Жор" +msgstr "Орц" #. module: mrp #: model:ir.model,name:mrp.model_report_mrp_inout @@ -2145,12 +2144,12 @@ msgstr "Хангах болон Үйлдвэрлэх" #. module: mrp #: field:mrp.bom,bom_id:0 msgid "Parent BoM" -msgstr "Эцэг жор" +msgstr "Эцэг орц" #. module: mrp #: report:bom.structure:0 msgid "BOM Ref" -msgstr "Жорын код" +msgstr "Орцын код" #. module: mrp #: code:addons/mrp/mrp.py:765 @@ -2190,7 +2189,7 @@ msgstr "Тоо хэмжээг сонго" #: view:product.product:0 #: field:product.product,bom_ids:0 msgid "Bill of Materials" -msgstr "Жорууд" +msgstr "Орцууд" #. module: mrp #: code:addons/mrp/mrp.py:610 @@ -2322,7 +2321,7 @@ msgstr "" msgid "" "a manufacturing\n" " order" -msgstr "" +msgstr "үйлдвэрлэл" #. module: mrp #: field:mrp.config.settings,group_mrp_properties:0 @@ -2344,7 +2343,7 @@ msgstr "Үзүүлэлтийн бүлэгүүд" #: view:mrp.routing:0 #: model:process.node,name:mrp.process_node_routing0 msgid "Routing" -msgstr "Маршрут" +msgstr "Шугам" #. module: mrp #: model:process.transition,note:mrp.process_transition_procurestockableproduct0 @@ -2390,8 +2389,8 @@ msgid "" "the BOM, through a run of the schedulers (MRP)." msgstr "" "Түүхий эдийг хангахын тулд (худалдан авах эсвэл үйлдвэрлэх) үйлдвэрлэлийн " -"захиалга нь жорд тодорхойлогдсон бүрдлүүдээр татан авах захиалга үүсгэдэг ба " -"энэ нь товлогчийг ажиллахад үүсдэг." +"захиалга нь орцонд тодорхойлогдсон бүрдлүүдээр татан авах захиалга үүсгэдэг " +"ба энэ нь товлогчийг ажиллахад үүсдэг." #. module: mrp #: help:mrp.product_price,number:0 @@ -2423,7 +2422,7 @@ msgstr "Нөөцийн Амралт, Чөлөө" #. module: mrp #: help:mrp.bom,sequence:0 msgid "Gives the sequence order when displaying a list of bills of material." -msgstr "Жорын жагсаалтыг харуулах дэс дарааллыг өгдөг." +msgstr "Орцын жагсаалтыг харуулах дэс дарааллыг өгдөг." #. module: mrp #: model:ir.model,name:mrp.model_mrp_config_settings diff --git a/addons/mrp/i18n/ru.po b/addons/mrp/i18n/ru.po index 5f7bf67a0e1..ef4cdb8675b 100644 --- a/addons/mrp/i18n/ru.po +++ b/addons/mrp/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2012-09-14 07:17+0000\n" -"Last-Translator: Chertykov Denis \n" +"PO-Revision-Date: 2013-05-27 12:24+0000\n" +"Last-Translator: Pavel \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:01+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-28 05:16+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: mrp #: help:mrp.config.settings,module_mrp_repair:0 @@ -131,7 +131,7 @@ msgstr "Конечный продукт" #. module: mrp #: view:mrp.production:0 msgid "Manufacturing Orders which are currently in production." -msgstr "" +msgstr "Производственные заказы, которые в настоящее время в изготовлении." #. module: mrp #: help:mrp.bom,message_summary:0 @@ -156,7 +156,7 @@ msgstr "" #. module: mrp #: view:mrp.production:0 msgid "Products to Finish" -msgstr "" +msgstr "Конечная продукция" #. module: mrp #: selection:mrp.bom,method:0 @@ -195,7 +195,7 @@ msgstr "Для приобретенного материала" #. module: mrp #: model:ir.ui.menu,name:mrp.menu_mrp_production_order_action msgid "Order Planning" -msgstr "" +msgstr "Планирование заказов" #. module: mrp #: field:mrp.config.settings,module_mrp_operations:0 @@ -206,7 +206,7 @@ msgstr "" #: code:addons/mrp/mrp.py:633 #, python-format msgid "Cannot cancel manufacturing order!" -msgstr "" +msgstr "Нельзя отменить производственый заказ!" #. module: mrp #: field:mrp.workcenter,costs_cycle_account_id:0 @@ -253,7 +253,7 @@ msgstr "" #: view:mrp.production:0 #: field:mrp.production,move_created_ids2:0 msgid "Produced Products" -msgstr "" +msgstr "Производимая продукция" #. module: mrp #: report:mrp.production.order:0 @@ -268,7 +268,7 @@ msgstr "Основные данные" #. module: mrp #: field:mrp.config.settings,module_mrp_byproduct:0 msgid "Produce several products from one manufacturing order" -msgstr "" +msgstr "Изготовить несколько продуктов по одному производственному заказу" #. module: mrp #: help:mrp.config.settings,group_mrp_properties:0 @@ -329,7 +329,7 @@ msgstr "Производимый продукт" #. module: mrp #: constraint:mrp.bom:0 msgid "Error ! You cannot create recursive BoM." -msgstr "" +msgstr "Ошибка! Вы не можете создавать рекурсивную спецификацию." #. module: mrp #: model:ir.model,name:mrp.model_mrp_routing_workcenter @@ -381,6 +381,8 @@ msgid "" "Fill this product to easily track your production costs in the analytic " "accounting." msgstr "" +"Заполнив этот продукт легко отслеживать ваши производственные издержки в " +"аналитическом учете." #. module: mrp #: field:mrp.workcenter,product_id:0 diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index b827a2731c9..dd52268e2d1 100644 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -131,96 +131,96 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml index 965f3f57d69..0005be6f48c 100644 --- a/addons/mrp/process/service_product_process.xml +++ b/addons/mrp/process/service_product_process.xml @@ -39,9 +39,9 @@ - - + + - \ No newline at end of file + diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml index e3fa1136822..a43a09313b8 100644 --- a/addons/mrp/process/stockable_product_process.xml +++ b/addons/mrp/process/stockable_product_process.xml @@ -69,16 +69,16 @@ - - + + - - + + diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index 3ad7155dad6..6347e22d576 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -33,6 +33,11 @@ class procurement_order(osv.osv): 'production_id': fields.many2one('mrp.production', 'Manufacturing Order'), } + def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None): + result = super(procurement_order, self)._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context) + result['property_ids'] = [(6, 0, [x.id for x in line.property_ids])] + return result + def check_produce_product(self, cr, uid, procurement, context=None): ''' Depict the capacity of the procurement workflow to produce products (not services)''' return True diff --git a/addons/mrp/report/order.rml b/addons/mrp/report/order.rml index 8833d08e596..f413a6cfc70 100644 --- a/addons/mrp/report/order.rml +++ b/addons/mrp/report/order.rml @@ -139,37 +139,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + @@ -178,16 +159,16 @@ - Product + Product - Quantity + Quantity - Source Location + Source Location - Destination Location + Destination Location @@ -196,20 +177,20 @@ - Production Order N° : [[ o.name ]] + Production Order N° : [[ o.name ]] - Source Document + Source Document - Product + Product - Quantity + Quantity @@ -232,16 +213,16 @@ - Scheduled Date + Scheduled Date - Printing date + Printing date - Partner Ref + Partner Ref - SO Number + SO Number @@ -266,26 +247,26 @@ - Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]] + Work Orders [[ o.workcenter_lines ==[] and removeParentNode('para')]] - Sequence + Sequence - Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]] + Name [[ o.workcenter_lines ==[] and removeParentNode('blockTable')]] - WorkCenter + WorkCenter - No. Of Cycles + No. Of Cycles - No. Of Hours + No. Of Hours @@ -317,28 +298,28 @@ - Bill Of Material + Bill Of Material - Product + Product - Quantity + Quantity - Source Location + Source Location - Destination Location + Destination Location
- Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]] + Products to Consume [[ o.move_lines ==[] and removeParentNode('section')]]
[[ repeatIn(o.move_lines,'line') ]] @@ -363,7 +344,7 @@ - Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]] + Consumed Products [[ o.move_lines2 ==[] and removeParentNode('section')]]
[[ repeatIn(o.move_lines2,'line2') ]] diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index d6f026530dc..87861ba8fc6 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -128,7 +128,7 @@ class mrp_production_workcenter_line(osv.osv): elif prod_obj.state =='in_production': return else: - raise osv.except_osv(_('Error!'),_('Manufacturing order cannot start in state "%s"!') % (prod_obj.state,)) + raise osv.except_osv(_('Error!'),_('Manufacturing order cannot be started in state "%s"!') % (prod_obj.state,)) else: oper_ids = self.search(cr,uid,[('production_id','=',prod_obj.id)]) obj = self.browse(cr,uid,oper_ids) @@ -443,7 +443,7 @@ class mrp_operations_operation(osv.osv): if not oper_objs: if code.start_stop!='start': - raise osv.except_osv(_('Sorry!'),_('Operation is not started yet !')) + raise osv.except_osv(_('Sorry!'),_('Operation is not started yet!')) return False else: for oper in oper_objs: diff --git a/addons/mrp_operations/process/mrp_operation_process.xml b/addons/mrp_operations/process/mrp_operation_process.xml index 452434bbe92..d448b6a299a 100644 --- a/addons/mrp_operations/process/mrp_operation_process.xml +++ b/addons/mrp_operations/process/mrp_operation_process.xml @@ -75,32 +75,32 @@ - - + + - - + + - - + + - - + + diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 43ee34b0c05..f7b082db74b 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -365,7 +365,7 @@ class mrp_repair(osv.osv): if repair.state in ('draft','cancel') or repair.invoice_id: continue if not (repair.partner_id.id and repair.partner_invoice_id.id): - raise osv.except_osv(_('No partner !'),_('You have to select a Partner Invoice Address in the repair form !')) + raise osv.except_osv(_('No partner!'),_('You have to select a Partner Invoice Address in the repair form!')) comment = repair.quotation_notes if (repair.invoice_method != 'none'): if group and repair.partner_invoice_id.id in invoices_group: @@ -582,7 +582,7 @@ class ProductChangeMixin(object): result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id or False if not pricelist: warning = { - 'title':'No Pricelist !', + 'title':'No Pricelist!', 'message': 'You have to select a pricelist in the Repair form !\n' 'Please set one before choosing a product.' diff --git a/addons/mrp_repair/security/mrp_repair_security.xml b/addons/mrp_repair/security/mrp_repair_security.xml index 0b34310fc4e..e94b675b57f 100644 --- a/addons/mrp_repair/security/mrp_repair_security.xml +++ b/addons/mrp_repair/security/mrp_repair_security.xml @@ -11,4 +11,4 @@ - \ No newline at end of file + 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/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml index 088aa35e915..c772a8fd67d 100644 --- a/addons/multi_company/multi_company_demo.xml +++ b/addons/multi_company/multi_company_demo.xml @@ -192,8 +192,8 @@ SAJ-OpenERP IN sale - - + + @@ -204,8 +204,8 @@ SCNJ-OpenERP IN sale_refund - - + + @@ -216,8 +216,8 @@ EXJ-OpenERP IN purchase - - + + @@ -228,8 +228,8 @@ ECNJ-OpenERP IN purchase_refund - - + + @@ -240,8 +240,8 @@ BNK-OpenERP IN bank - - + + @@ -252,8 +252,8 @@ CHK-OpenERP IN bank - - + + @@ -264,8 +264,8 @@ CSH-OpenERP IN cash - - + + @@ -277,8 +277,8 @@ SAJ-OpenERP US sale - - + + @@ -289,8 +289,8 @@ SCNJ-OpenERP US sale_refund - - + + @@ -301,8 +301,8 @@ EXJ-OpenERP US purchase - - + + @@ -313,8 +313,8 @@ ECNJ-OpenERP US purchase_refund - - + + @@ -325,8 +325,8 @@ BNK-OpenERP US bank - - + + @@ -337,8 +337,8 @@ CHK-OpenERP US bank - - + + @@ -349,8 +349,8 @@ CSH-OpenERP US cash - - + + @@ -363,8 +363,8 @@ SAJ-OpenERP BE sale - - + + @@ -375,8 +375,8 @@ SCNJ-OpenERP BE sale_refund - - + + @@ -387,8 +387,8 @@ EXJ-OpenERP BE purchase - - + + @@ -399,8 +399,8 @@ ECNJ-OpenERP BE purchase_refund - - + + @@ -411,8 +411,8 @@ BNK-OpenERP BE bank - - + + @@ -423,8 +423,8 @@ CHK-OpenERP BE bank - - + + @@ -435,8 +435,8 @@ CSH-OpenERP BE cash - - + + diff --git a/addons/note/html/index.html b/addons/note/html/index.html index 97736520f2f..7ef37c646e9 100644 --- a/addons/note/html/index.html +++ b/addons/note/html/index.html @@ -7,7 +7,6 @@ -   @@ -113,4 +112,5 @@ The real time collaborative writings on notes makes it the perfect tool to colla
-
+
+
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/note/note_view.xml b/addons/note/note_view.xml index 68ec6bfc4f7..f3b9e4669c7 100644 --- a/addons/note/note_view.xml +++ b/addons/note/note_view.xml @@ -175,7 +175,7 @@ form kanban,tree,form - {'search_default_open_true':True} + {}

Click to add a personal note. diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml index b0c79561355..2c6e9f3bc7f 100644 --- a/addons/note/security/ir.rule.xml +++ b/addons/note/security/ir.rule.xml @@ -3,7 +3,7 @@ Only followers can access a sticky notes - + [('message_follower_ids','=',user.partner_id.id)] @@ -14,7 +14,7 @@ Each user have his stage name - + ['|',('user_id','=',False),('user_id','=',user.id)] diff --git a/addons/point_of_sale/html/index.html b/addons/point_of_sale/html/index.html index 41f935d8ad9..130806ddb11 100644 --- a/addons/point_of_sale/html/index.html +++ b/addons/point_of_sale/html/index.html @@ -9,7 +9,6 @@ -  

diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 349ad8b4f81..089c577e940 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -407,7 +407,7 @@ class pos_session(osv.osv): # The pos manager can close statements with maximums. if not self.pool.get('ir.model.access').check_groups(cr, uid, "point_of_sale.group_pos_manager"): raise osv.except_osv( _('Error!'), - _("Your ending balance is too different from the theorical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff)) + _("Your ending balance is too different from the theoretical cash closing (%.2f), the maximum allowed is: %.2f. You can contact your manager to force it.") % (st.difference, st.journal_id.amount_authorized_diff)) if (st.journal_id.type not in ['bank', 'cash']): raise osv.except_osv(_('Error!'), _("The type of the journal for your payment method should be bank or cash ")) @@ -545,7 +545,7 @@ class pos_order(osv.osv): def unlink(self, cr, uid, ids, context=None): for rec in self.browse(cr, uid, ids, context=context): if rec.state not in ('draft','cancel'): - raise osv.except_osv(_('Unable to Delete !'), _('In order to delete a sale, it must be new or cancelled.')) + raise osv.except_osv(_('Unable to Delete!'), _('In order to delete a sale, it must be new or cancelled.')) return super(pos_order, self).unlink(cr, uid, ids, context=context) def onchange_partner_id(self, cr, uid, ids, part=False, context=None): @@ -1163,7 +1163,7 @@ class pos_order_line(osv.osv): if not product_id: return {} if not pricelist: - raise osv.except_osv(_('No Pricelist !'), + raise osv.except_osv(_('No Pricelist!'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index e4bf004c00f..a533f0a8ee6 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -319,6 +319,14 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.payment_line.set_amount(amount); } }, + checkAmount: function(e){ + if (e.which !== 0 && e.charCode !== 0) { + if(isNaN(String.fromCharCode(e.charCode))){ + return (String.fromCharCode(e.charCode) === "." && e.currentTarget.value.toString().split(".").length < 2)?true:false; + } + } + return true + }, changedAmount: function() { if (this.amount !== this.payment_line.get_amount()){ this.renderElement(); @@ -328,7 +336,8 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa var self = this; this.name = this.payment_line.get_cashregister().get('journal_id')[1]; this._super(); - this.$('input').keyup(function(event){ + this.$('input').keypress(_.bind(this.checkAmount, this)) + .keyup(function(event){ self.changeAmount(event); }); this.$('.delete-payment-line').click(function() { diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py index 97ffad805b7..30e407d2ad0 100644 --- a/addons/point_of_sale/wizard/pos_open_statement.py +++ b/addons/point_of_sale/wizard/pos_open_statement.py @@ -46,7 +46,7 @@ class pos_open_statement(osv.osv_memory): st_ids = [] j_ids = journal_obj.search(cr, uid, [('journal_user','=',1)], context=context) if not j_ids: - raise osv.except_osv(_('No Cash Register Defined !'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".')) + raise osv.except_osv(_('No Cash Register Defined!'), _('You have to define which payment method must be available in the point of sale by reusing existing bank and cash through "Accounting / Configuration / Journals / Journals". Select a journal and check the field "PoS Payment Method" from the "Point of Sale" tab. You can also create new payment methods directly from menu "PoS Backend / Configuration / Payment Methods".')) for journal in journal_obj.browse(cr, uid, j_ids, context=context): ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context) diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml index b2a76800023..02080bdc0ab 100644 --- a/addons/portal/security/portal_security.xml +++ b/addons/portal/security/portal_security.xml @@ -5,7 +5,7 @@ res_partner: read access on my partner - [('user_ids', 'in', user.id)] + [('id', 'child_of', user.commercial_partner_id.id)] diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index e3047cd5edb..3ec2850b4aa 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -20,7 +20,6 @@ ############################################################################## import logging -import random from openerp.osv import fields, osv from openerp.tools.translate import _ @@ -34,14 +33,15 @@ _logger = logging.getLogger(__name__) WELCOME_EMAIL_SUBJECT = _("Your OpenERP account at %(company)s") WELCOME_EMAIL_BODY = _("""Dear %(name)s, -You have been given access to %(portal)s. +You have been given access to %(company)s's %(portal)s. Your login account data is: -Database: %(db)s -Username: %(login)s + Username: %(login)s + Portal: %(portal_url)s + Database: %(db)s -In order to complete the signin process, click on the following url: -%(url)s +You can set or change your password via the following url: + %(signup_url)s %(welcome_message)s @@ -116,24 +116,57 @@ class wizard_user(osv.osv_memory): _description = 'Portal User Config' _columns = { - 'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True), + 'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True, ondelete='cascade'), 'partner_id': fields.many2one('res.partner', string='Contact', required=True, readonly=True), 'email': fields.char(size=240, string='Email'), 'in_portal': fields.boolean('In Portal'), } - def create(self, cr, uid, values, context=None): - """ overridden to update the partner's email (if necessary) """ - id = super(wizard_user, self).create(cr, uid, values, context) - wuser = self.browse(cr, uid, id, context) - if wuser.partner_id.email != wuser.email: - wuser.partner_id.write({'email': wuser.email}) - return id + def get_error_messages(self, cr, uid, ids, context=None): + res_users = self.pool.get('res.users') + emails = [] + error_empty = [] + error_emails = [] + error_user = [] + ctx = dict(context or {}, active_test=False) + for wizard_user in self.browse(cr, SUPERUSER_ID, ids, context): + if wizard_user.in_portal and not self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context): + email = extract_email(wizard_user.email) + if not email: + error_empty.append(wizard_user.partner_id) + elif email in emails and email not in error_emails: + error_emails.append(wizard_user.partner_id) + user = res_users.search(cr, SUPERUSER_ID, [('login', '=', email)], context=ctx) + if user: + error_user.append(wizard_user.partner_id) + emails.append(email) + + error_msg = [] + if error_empty: + error_msg.append("%s\n- %s" % (_("Some contacts don't have a valid email: "), + '\n- '.join(['%s' % (p.display_name,) for p in error_empty]))) + if error_emails: + error_msg.append("%s\n- %s" % (_("Several contacts have the same email: "), + '\n- '.join([p.email for p in error_emails]))) + if error_user: + error_msg.append("%s\n- %s" % (_("Some contacts have the same email as an existing portal user:"), + '\n- '.join(['%s <%s>' % (p.display_name, p.email) for p in error_user]))) + if error_msg: + error_msg.append(_("To resolve this error, you can: \n" + "- Correct the emails of the relevant contacts\n" + "- Grant access only to contacts with unique emails")) + return error_msg def action_apply(self, cr, uid, ids, context=None): + error_msg = self.get_error_messages(cr, uid, ids, context=context) + if error_msg: + raise osv.except_osv(_('Contacts Error'), "\n\n".join(error_msg)) + for wizard_user in self.browse(cr, SUPERUSER_ID, ids, context): portal = wizard_user.wizard_id.portal_id user = self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context) + if wizard_user.partner_id.email != wizard_user.email: + wizard_user.partner_id.write({'email': wizard_user.email}) if wizard_user.in_portal: # create a user if necessary, and make sure it is in the portal group if not user: @@ -142,8 +175,8 @@ class wizard_user(osv.osv_memory): user.write({'active': True, 'groups_id': [(4, portal.id)]}) # prepare for the signup process user.partner_id.signup_prepare() - wizard_user = self.browse(cr, SUPERUSER_ID, wizard_user.id, context) - self._send_email(cr, uid, wizard_user, context) + wizard_user.refresh() + self._send_email(cr, uid, wizard_user, context) else: # remove the user (if it exists) from the portal group if user and (portal in user.groups_id): @@ -158,13 +191,11 @@ class wizard_user(osv.osv_memory): @param wizard_user: browse record of model portal.wizard.user @return: browse record of model res.users """ - if wizard_user.partner_id.user_ids: - return wizard_user.partner_id.user_ids[0] - # the user may be inactive, search for it + context = dict(context or {}, active_test=False) res_users = self.pool.get('res.users') - domain = [('partner_id', '=', wizard_user.partner_id.id), ('active', '=', False)] - user_ids = res_users.search(cr, uid, domain) - return user_ids and res_users.browse(cr, uid, user_ids[0], context) or False + domain = [('partner_id', '=', wizard_user.partner_id.id)] + user_ids = res_users.search(cr, uid, domain, context=context) + return user_ids and res_users.browse(cr, uid, user_ids[0], context=context) or False def _create_user(self, cr, uid, wizard_user, context=None): """ create a new user for wizard_user.partner_id @@ -172,8 +203,9 @@ class wizard_user(osv.osv_memory): @return: browse record of model res.users """ res_users = self.pool.get('res.users') - create_context = dict(context or {}, noshortcut=True) # to prevent shortcut creation + create_context = dict(context or {}, noshortcut=True, no_reset_password=True) # to prevent shortcut creation values = { + 'email': extract_email(wizard_user.email), 'login': extract_email(wizard_user.email), 'partner_id': wizard_user.partner_id.id, 'groups_id': [(6, 0, [])], @@ -187,15 +219,22 @@ class wizard_user(osv.osv_memory): @param wizard_user: browse record of model portal.wizard.user @return: the id of the created mail.mail record """ + res_partner = self.pool['res.partner'] this_context = context this_user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context) if not this_user.email: - raise osv.except_osv(_('Email required'), + raise osv.except_osv(_('Email Required'), _('You must have an email address in your User Preferences to send emails.')) # determine subject and body in the portal user's language user = self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context) context = dict(this_context or {}, lang=user.lang) + ctx_portal_url = dict(context, signup_force_type_in_url='') + portal_url = res_partner._get_signup_url_for_action(cr, uid, + [user.partner_id.id], + context=ctx_portal_url)[user.partner_id.id] + res_partner.signup_prepare(cr, uid, [user.partner_id.id], context=context) + data = { 'company': this_user.company_id.name, 'portal': wizard_user.wizard_id.portal_id.name, @@ -203,7 +242,8 @@ class wizard_user(osv.osv_memory): 'db': cr.dbname, 'name': user.name, 'login': user.login, - 'url': user.signup_url, + 'signup_url': user.signup_url, + 'portal_url': portal_url, } mail_mail = self.pool.get('mail.mail') mail_values = { diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml index ace0daaff87..eca13258ff9 100644 --- a/addons/portal_hr_employees/hr_employee_view.xml +++ b/addons/portal_hr_employees/hr_employee_view.xml @@ -33,8 +33,9 @@ - HR - Employess Kanban + HR - Employees Kanban hr.employee + diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 672859db909..93b9417bded 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -307,7 +307,7 @@ class procurement_order(osv.osv): move_obj = self.pool.get('stock.move') for procurement in self.browse(cr, uid, ids, context=context): if procurement.product_qty <= 0.00: - raise osv.except_osv(_('Data Insufficient !'), + raise osv.except_osv(_('Data Insufficient!'), _('Please check the quantity in procurement order(s) for the product "%s", it should not be 0 or less!' % procurement.product_id.name)) if procurement.product_id.type in ('product', 'consu'): if not procurement.move_id: diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index 7f0a28d94dc..76432157555 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -18,6 +18,7 @@ + diff --git a/addons/procurement/stock_orderpoint.xml b/addons/procurement/stock_orderpoint.xml index 31c48046d64..67d610c65c9 100644 --- a/addons/procurement/stock_orderpoint.xml +++ b/addons/procurement/stock_orderpoint.xml @@ -1,4 +1,3 @@ - @@ -7,50 +6,50 @@ 25.0 5.0 - + - + 10.0 5.0 - + - + 12.0 5.0 - + - + 50.0 10.0 - + - + 15.0 5.0 - + - + 5.0 3.0 - + - + - + \ No newline at end of file diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml index 03ce904abad..652710fac94 100644 --- a/addons/product/process/product_process.xml +++ b/addons/product/process/product_process.xml @@ -43,8 +43,8 @@ - - + + diff --git a/addons/product/product.py b/addons/product/product.py index 518e455ddc1..656812bebbb 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -292,9 +292,14 @@ class product_template(osv.osv): _columns = { 'name': fields.char('Name', size=128, required=True, translate=True, select=True), 'product_manager': fields.many2one('res.users','Product Manager'), - 'description': fields.text('Description',translate=True), - 'description_purchase': fields.text('Purchase Description',translate=True), - 'description_sale': fields.text('Sale Description',translate=True), + 'description': fields.text('Description',translate=True, + help="A precise description of the Product, used only for internal information purposes."), + 'description_purchase': fields.text('Purchase Description',translate=True, + help="A description of the Product that you want to communicate to your suppliers. " + "This description will be copied to every Purchase Order, Reception and Supplier Invoice/Refund."), + 'description_sale': fields.text('Sale Description',translate=True, + help="A description of the Product that you want to communicate to your customers. " + "This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"), 'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."), 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."), 'rental': fields.boolean('Can be Rent'), diff --git a/addons/project/html/index.html b/addons/project/html/index.html index 072f279447f..93f1be8a41d 100644 --- a/addons/project/html/index.html +++ b/addons/project/html/index.html @@ -7,7 +7,6 @@ -   @@ -194,4 +193,5 @@ accurate reports on your team's performance.
-
+
+
diff --git a/addons/project/i18n/ru.po b/addons/project/i18n/ru.po index 1743d66e55d..b64662f916b 100644 --- a/addons/project/i18n/ru.po +++ b/addons/project/i18n/ru.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:04+0000\n" -"PO-Revision-Date: 2013-03-14 06:44+0000\n" +"PO-Revision-Date: 2013-05-28 06:22+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 04:56+0000\n" -"X-Generator: Launchpad (build 16532)\n" +"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n" +"X-Generator: Launchpad (build 16640)\n" #. module: project #: view:project.project:0 @@ -27,6 +27,8 @@ msgid "" "If checked, this contract will be available in the project menu and you will " "be able to manage tasks or track issues" msgstr "" +"Если выбрано, этот контракт станет активным в меню проекта, и вы сможете " +"редактировать задачи или отслеживать проблемы" #. module: project #: field:project.project,progress_rate:0 @@ -217,7 +219,7 @@ msgstr "Предложение контакта" #. module: project #: help:project.config.settings,group_time_work_estimation_tasks:0 msgid "Allows you to compute Time Estimation on tasks." -msgstr "" +msgstr "Позволяет вычислить расход времени на задачи." #. module: project #: field:report.project.task.user,user_id:0 @@ -913,6 +915,8 @@ msgid "" "Provides management of issues/bugs in projects.\n" " This installs the module project_issue." msgstr "" +"Обеспечивает управление проблем / ошибок в проектах.\n" +" Устанавливает модуль project_issue." #. module: project #: help:project.task,kanban_state:0 @@ -927,7 +931,7 @@ msgstr "" #. module: project #: view:project.task:0 msgid "10" -msgstr "" +msgstr "10" #. module: project #: help:project.project,analytic_account_id:0 @@ -953,7 +957,7 @@ msgstr "Отменить" #. module: project #: view:project.project:0 msgid "Other Info" -msgstr "" +msgstr "Прочая информация" #. module: project #: view:project.task.delegate:0 @@ -981,6 +985,8 @@ msgid "" "Follow this project to automatically track the events associated to tasks " "and issues of this project." msgstr "" +"Позволяет проекту автоматически отслеживать события, связанные с задачами и " +"проблемами этого проекта." #. module: project #: view:project.task:0 @@ -990,7 +996,7 @@ msgstr "Исполнитель" #. module: project #: model:mail.message.subtype,name:project.mt_task_stage msgid "Stage Changed" -msgstr "" +msgstr "Стадия изменена" #. module: project #: view:project.project:0 @@ -1006,7 +1012,7 @@ msgstr "Важное" #. module: project #: field:project.category,name:0 msgid "Name" -msgstr "" +msgstr "Название" #. module: project #: selection:report.project.task.user,month:0 @@ -1033,7 +1039,7 @@ msgstr "Общие" #: help:project.project,message_ids:0 #: help:project.task,message_ids:0 msgid "Messages and communication history" -msgstr "" +msgstr "Сообщения и история общения" #. module: project #: view:project.project:0 @@ -1041,6 +1047,8 @@ msgid "" "To invoice or setup invoicing and renewal options, go to the related " "contract:" msgstr "" +"Для выставления счета или изменения счета и обновления вариантов, перейти к " +"соответствующему контракту:" #. module: project #: field:project.task.delegate,state:0 @@ -1097,7 +1105,7 @@ msgstr "Порученные задания" #: view:project.task:0 #: field:project.task,message_unread:0 msgid "Unread Messages" -msgstr "" +msgstr "Непрочитанные" #. module: project #: view:project.task:0 @@ -1139,7 +1147,7 @@ msgstr "Показывать только срочные задания" #. module: project #: model:project.category,name:project.project_category_04 msgid "Usability" -msgstr "" +msgstr "Удобство использования" #. module: project #: view:report.project.task.user:0 @@ -1156,7 +1164,7 @@ msgstr "Выполнил(а)" #: code:addons/project/project.py:181 #, python-format msgid "Invalid Action!" -msgstr "" +msgstr "Неверное действие!" #. module: project #: help:project.task.type,state:0 @@ -1165,6 +1173,9 @@ msgid "" "stage. For example, if a stage is related to the status 'Close', when your " "document reaches this stage, it is automatically closed." msgstr "" +"Статус документа автоматически изменяется по выбранному этапу. Например, " +"если стадия связана со статусом «Закрыть» , когда ваш документ достигает " +"этой стадии, оно автоматически закрывается." #. module: project #: view:project.task:0 @@ -1174,7 +1185,7 @@ msgstr "Доп. информация" #. module: project #: view:project.task:0 msgid "Edit..." -msgstr "" +msgstr "Изменить..." #. module: project #: view:report.project.task.user:0 @@ -1185,7 +1196,7 @@ msgstr "№ задачи" #. module: project #: field:project.project,doc_count:0 msgid "Number of documents attached" -msgstr "" +msgstr "Количество прикрепленных документов" #. module: project #: field:project.task,priority:0 @@ -1205,6 +1216,9 @@ msgid "" "automatically synchronizedwith Tasks (or optionally Issues if the Issue " "Tracker module is installed)." msgstr "" +"Внутренние e-mail, связанный с этим проектом. Входящие письма автоматически " +"синхронизируются с заданиями (или проблемами, если модуль Issue Tracker " +"установлен)." #. module: project #: model:ir.actions.act_window,help:project.open_task_type_form @@ -1237,7 +1251,7 @@ msgstr "%s (копия)" #. module: project #: model:mail.message.subtype,name:project.mt_project_task_stage msgid "Task Stage Changed" -msgstr "" +msgstr "Этап задачи изменен" #. module: project #: view:project.task:0 @@ -1269,12 +1283,12 @@ msgstr "Время отсрочки" #. module: project #: view:project.project:0 msgid "Team" -msgstr "" +msgstr "Группа" #. module: project #: help:project.config.settings,time_unit:0 msgid "This will set the unit of measure used in projects and tasks." -msgstr "" +msgstr "Установить единицу измерения, используемую в проектах и задачах." #. module: project #: selection:project.task,priority:0 @@ -1328,7 +1342,7 @@ msgstr "Заголовок вашего проверочного задания" #. module: project #: field:project.config.settings,time_unit:0 msgid "Working time unit" -msgstr "" +msgstr "Единица рабочего времени" #. module: project #: view:project.project:0 @@ -1344,7 +1358,7 @@ msgstr "Низкий" #. module: project #: selection:project.project,state:0 msgid "Closed" -msgstr "" +msgstr "Закрыто" #. module: project #: view:project.project:0 @@ -1366,7 +1380,7 @@ msgstr "В ожидании" #: view:project.category:0 #: field:project.task,categ_ids:0 msgid "Tags" -msgstr "" +msgstr "Теги" #. module: project #: model:ir.model,name:project.model_project_task_history @@ -1386,7 +1400,7 @@ msgstr "" #. module: project #: help:project.config.settings,group_manage_delegation_task:0 msgid "Allows you to delegate tasks to other users." -msgstr "" +msgstr "Позволяет делегировать задачи другим пользователям." #. module: project #: field:project.project,active:0 @@ -1415,7 +1429,7 @@ msgstr "" #. module: project #: view:project.config.settings:0 msgid "Helpdesk & Support" -msgstr "" +msgstr "Поддержка" #. module: project #: help:report.project.task.user,opening_days:0 @@ -1441,7 +1455,7 @@ msgstr "" #: code:addons/project/project.py:220 #, python-format msgid "Attachments" -msgstr "" +msgstr "Вложения" #. module: project #: view:project.task:0 @@ -1464,6 +1478,8 @@ msgid "" "You cannot delete a project containing tasks. You can either delete all the " "project's tasks and then delete the project or simply deactivate the project." msgstr "" +"Вы не можете удалить проект, содержащий задачи. Вы можете либо удалить все " +"задачи проекта, а затем удалить проект или просто сделать проект неактивным." #. module: project #: model:process.transition.action,name:project.process_transition_action_draftopentask0 @@ -1474,7 +1490,7 @@ msgstr "Открытые" #. module: project #: field:project.project,privacy_visibility:0 msgid "Privacy / Visibility" -msgstr "" +msgstr "Безопасность/Видимость" #. module: project #: view:project.task:0 @@ -1488,7 +1504,7 @@ msgstr "Оставшееся время" #. module: project #: model:mail.message.subtype,description:project.mt_task_stage msgid "Stage changed" -msgstr "" +msgstr "Этап изменен" #. module: project #: constraint:project.task:0 @@ -1521,7 +1537,7 @@ msgstr "Общее время" #. module: project #: model:ir.model,name:project.model_project_config_settings msgid "project.config.settings" -msgstr "" +msgstr "project.config.settings" #. module: project #: model:project.task.type,name:project.project_tt_development @@ -1586,12 +1602,12 @@ msgstr "Назначить на" #. module: project #: model:res.groups,name:project.group_time_work_estimation_tasks msgid "Time Estimation on Tasks" -msgstr "" +msgstr "Оценка времени на задачи" #. module: project #: field:project.task,total_hours:0 msgid "Total" -msgstr "" +msgstr "Всего" #. module: project #: model:process.node,note:project.process_node_taskbydelegate0 @@ -1601,7 +1617,7 @@ msgstr "Поручить ваше задание другому пользова #. module: project #: model:mail.message.subtype,description:project.mt_task_started msgid "Task started" -msgstr "" +msgstr "Задание начато" #. module: project #: help:project.task.reevaluate,remaining_hours:0 @@ -1614,6 +1630,8 @@ msgid "" "This stage is not visible, for example in status bar or kanban view, when " "there are no records in that stage to display." msgstr "" +"Эта стадия не видима, например в статус-баре или виде канбан, когда нет " +"записей на этой стадии для отображения." #. module: project #: view:project.task:0 @@ -1643,7 +1661,7 @@ msgstr "Проекты в ожидании" #. module: project #: view:project.task:0 msgid "Remaining" -msgstr "" +msgstr "Осталось" #. module: project #: field:project.task,progress:0 @@ -1672,17 +1690,17 @@ msgstr "" #. module: project #: field:project.config.settings,module_project_issue:0 msgid "Track issues and bugs" -msgstr "" +msgstr "Отслеживание проблем и ошибок" #. module: project #: field:project.config.settings,module_project_mrp:0 msgid "Generate tasks from sale orders" -msgstr "" +msgstr "Создание задач из заказов" #. module: project #: model:ir.ui.menu,name:project.menu_task_types_view msgid "Task Stages" -msgstr "" +msgstr "Этапы задач" #. module: project #: model:process.node,note:project.process_node_drafttask0 @@ -1693,7 +1711,7 @@ msgstr "Определить требования и установить зап #: field:project.project,message_ids:0 #: field:project.task,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Сообщения" #. module: project #: field:project.project,color:0 @@ -1752,17 +1770,17 @@ msgstr "Дата окончания" #. module: project #: field:project.task.type,state:0 msgid "Related Status" -msgstr "" +msgstr "Связанный статус" #. module: project #: view:project.project:0 msgid "Documents" -msgstr "" +msgstr "Документы" #. module: project #: model:mail.message.subtype,description:project.mt_task_new msgid "Task created" -msgstr "" +msgstr "Задача создана" #. module: project #: view:report.project.task.user:0 @@ -1774,7 +1792,7 @@ msgstr "# дней" #: field:project.project,message_follower_ids:0 #: field:project.task,message_follower_ids:0 msgid "Followers" -msgstr "" +msgstr "Подписчики" #. module: project #: selection:project.project,state:0 @@ -1812,7 +1830,7 @@ msgstr "Проверка задания" #. module: project #: field:project.config.settings,module_project_long_term:0 msgid "Manage resources planning on gantt view" -msgstr "" +msgstr "Управление планированием ресурсов на диаграмме Ганта" #. module: project #: view:project.task:0 @@ -1871,7 +1889,7 @@ msgstr "Проекты" #. module: project #: model:res.groups,name:project.group_tasks_work_on_tasks msgid "Task's Work on Tasks" -msgstr "" +msgstr "Задачи, работающие на задачи" #. module: project #: help:project.task.delegate,name:0 @@ -1914,7 +1932,7 @@ msgstr "Декабрь" #: view:project.task.delegate:0 #: view:project.task.reevaluate:0 msgid "or" -msgstr "" +msgstr "или" #. module: project #: help:project.config.settings,module_project_mrp:0 @@ -1938,7 +1956,7 @@ msgstr "" #. module: project #: model:project.category,name:project.project_category_03 msgid "Experiment" -msgstr "" +msgstr "Эксперимент" #. module: project #: model:process.transition.action,name:project.process_transition_action_opendrafttask0 @@ -1998,7 +2016,7 @@ msgstr "" #: model:ir.actions.act_window,name:project.action_config_settings #: view:project.config.settings:0 msgid "Configure Project" -msgstr "" +msgstr "Настроить проект" #. module: project #: view:project.task.history.cumulative:0 @@ -2030,7 +2048,7 @@ msgstr "Пожалуйста, сначала удалите проект, ссы #: model:mail.message.subtype,name:project.mt_project_task_new #: model:mail.message.subtype,name:project.mt_task_new msgid "Task Created" -msgstr "" +msgstr "Задание создано" #. module: project #: view:report.project.task.user:0 @@ -2048,12 +2066,12 @@ msgstr "Проекты, в которых я менеджер" #: selection:project.task.history,kanban_state:0 #: selection:project.task.history.cumulative,kanban_state:0 msgid "Ready for next stage" -msgstr "" +msgstr "Готово к следующей стадии" #. module: project #: field:project.task.type,case_default:0 msgid "Default for New Projects" -msgstr "" +msgstr "По умолчанию для нового проекта" #. module: project #: view:project.task:0 @@ -2098,7 +2116,7 @@ msgstr "" #. module: project #: model:mail.message.subtype,description:project.mt_task_closed msgid "Task closed" -msgstr "" +msgstr "Задание закрыто" #. module: project #: selection:report.project.task.user,month:0 @@ -2130,13 +2148,13 @@ msgstr "" #. module: project #: selection:project.project,privacy_visibility:0 msgid "Followers Only" -msgstr "" +msgstr "Только для подписчиков" #. module: project #: view:board.board:0 #: field:project.project,task_count:0 msgid "Open Tasks" -msgstr "" +msgstr "Открытые задачи" #. module: project #: field:project.project,priority:0 diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index 4a73bfd00d1..9955fe1ffe1 100644 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -68,24 +68,24 @@ - - + + - - + + - - + + diff --git a/addons/project/project.py b/addons/project/project.py index 5d5abce3066..28e4bd6e5d2 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -85,7 +85,7 @@ class project(osv.osv): if context and context.get('user_preference'): cr.execute("""SELECT project.id FROM project_project project LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id - LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id + LEFT JOIN project_user_rel rel ON rel.project_id = project.id WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user)) return [(r[0]) for r in cr.fetchall()] return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, @@ -450,7 +450,7 @@ class project(osv.osv): for project in projects: if (not project.members) and force_members: - raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,)) + raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s'!") % (project.name,)) resource_pool = self.pool.get('resource.resource') @@ -581,12 +581,12 @@ class task(base_stage, osv.osv): _track = { 'state': { - 'project.mt_task_new': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new', + 'project.mt_task_new': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'], 'project.mt_task_started': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open', 'project.mt_task_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done', }, 'stage_id': { - 'project.mt_task_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'done', 'open'], + 'project.mt_task_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'done', 'open'], }, 'kanban_state': { # kanban state: tracked, but only block subtype 'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj['kanban_state'] == 'blocked', @@ -956,7 +956,7 @@ class task(base_stage, osv.osv): if task.child_ids: for child in task.child_ids: if child.state in ['draft', 'open', 'pending']: - raise osv.except_osv(_("Warning !"), _("Child task still open.\nPlease cancel or complete child task first.")) + raise osv.except_osv(_("Warning!"), _("Child task still open.\nPlease cancel or complete child task first.")) return True def action_close(self, cr, uid, ids, context=None): @@ -1120,10 +1120,12 @@ class task(base_stage, osv.osv): context = {} if not vals.get('stage_id'): ctx = context.copy() - if vals.get('project_id'): + if vals.get('project_id'): ctx['default_project_id'] = vals['project_id'] vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - task_id = super(task, self).create(cr, uid, vals, context=context) + # context: no_log, because subtype already handle this + create_context = dict(context, mail_create_nolog=True) + task_id = super(task, self).create(cr, uid, vals, context=create_context) self._store_history(cr, uid, [task_id], context=context) return task_id @@ -1197,6 +1199,17 @@ class task(base_stage, osv.osv): return [task.project_id.message_get_reply_to()[0] if task.project_id else False for task in self.browse(cr, uid, ids, context=context)] + def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None): + """ mail.message document permission rule: can post a new message if can read + because of portal document. """ + if not model_obj: + model_obj = self + if operation == 'create': + model_obj.check_access_rights(cr, uid, 'read') + model_obj.check_access_rule(cr, uid, mids, 'read', context=context) + else: + return super(task, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context) + def message_new(self, cr, uid, msg, custom_values=None, context=None): """ Override to updates the document according to the email. """ if custom_values is None: custom_values = {} @@ -1205,7 +1218,7 @@ class task(base_stage, osv.osv): 'planned_hours': 0.0, } defaults.update(custom_values) - return super(task,self).message_new(cr, uid, msg, custom_values=defaults, context=context) + return super(task, self).message_new(cr, uid, msg, custom_values=defaults, context=context) def message_update(self, cr, uid, ids, msg, update_vals=None, context=None): """ Override to update the task according to the email. """ diff --git a/addons/project/report/project_cumulative.xml b/addons/project/report/project_cumulative.xml index c30c91fe6c0..17e059c8de7 100644 --- a/addons/project/report/project_cumulative.xml +++ b/addons/project/report/project_cumulative.xml @@ -6,7 +6,7 @@ project.task.history.cumulative.tree project.task.history.cumulative - + diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py index 36c64cbc224..3233e2534af 100644 --- a/addons/project_gtd/wizard/project_gtd_empty.py +++ b/addons/project_gtd/wizard/project_gtd_empty.py @@ -49,7 +49,7 @@ class project_timebox_empty(osv.osv_memory): ids = obj_tb.search(cr, uid, [], context=context) if not len(ids): - raise osv.except_osv(_('Error!'), _('No timebox child of this one !')) + raise osv.except_osv(_('Error!'), _('No timebox child of this one!')) tids = obj_task.search(cr, uid, [('timebox_id', '=', context['active_id'])]) for task in obj_task.browse(cr, uid, tids, context): if (task.state in ('cancel','done')) or (task.user_id.id <> uid): diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index a008c670138..8bcac4581c3 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -19,11 +19,12 @@ # ############################################################################## +from openerp import SUPERUSER_ID from openerp.addons.base_status.base_stage import base_stage from openerp.addons.project.project import _TASK_STATE from openerp.addons.crm import crm from datetime import datetime -from openerp.osv import fields,osv +from openerp.osv import fields, osv, orm from openerp.tools.translate import _ import binascii import time @@ -49,12 +50,12 @@ class project_issue(base_stage, osv.osv): _track = { 'state': { - 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new', + 'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'], 'project_issue.mt_issue_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done', 'project_issue.mt_issue_started': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open', }, 'stage_id': { - 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'done', 'open'], + 'project_issue.mt_issue_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'done', 'open'], }, 'kanban_state': { 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj['kanban_state'] == 'blocked', @@ -69,7 +70,9 @@ class project_issue(base_stage, osv.osv): if vals.get('project_id'): ctx['default_project_id'] = vals['project_id'] vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx) - return super(project_issue, self).create(cr, uid, vals, context=context) + # context: no_log, because subtype already handle this + create_context = dict(context, mail_create_nolog=True) + return super(project_issue, self).create(cr, uid, vals, context=create_context) def _get_default_project_id(self, cr, uid, context=None): """ Gives default project by checking if present in the context """ @@ -492,13 +495,27 @@ class project_issue(base_stage, osv.osv): return [issue.project_id.message_get_reply_to()[0] if issue.project_id else False for issue in self.browse(cr, uid, ids, context=context)] + def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None): + """ mail.message document permission rule: can post a new message if can read + because of portal document. """ + if not model_obj: + model_obj = self + if operation == 'create': + model_obj.check_access_rights(cr, uid, 'read') + model_obj.check_access_rule(cr, uid, mids, 'read', context=context) + else: + return super(project_issue, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context) + def message_get_suggested_recipients(self, cr, uid, ids, context=None): recipients = super(project_issue, self).message_get_suggested_recipients(cr, uid, ids, context=context) - for issue in self.browse(cr, uid, ids, context=context): - if issue.email_from: - self._message_add_suggested_recipient(cr, uid, recipients, issue, email=issue.email_from, reason=_('Customer Email')) - elif issue.partner_id: - self._message_add_suggested_recipient(cr, uid, recipients, issue, partner=issue.partner_id, reason=_('Customer')) + try: + for issue in self.browse(cr, uid, ids, context=context): + if issue.partner_id: + self._message_add_suggested_recipient(cr, uid, recipients, issue, partner=issue.partner_id, reason=_('Customer')) + elif issue.email_from: + self._message_add_suggested_recipient(cr, uid, recipients, issue, email=issue.email_from, reason=_('Customer Email')) + except (osv.except_osv, orm.except_orm): # no read access rights -> just ignore suggested recipients because this imply modifying followers + pass return recipients def message_new(self, cr, uid, msg, custom_values=None, context=None): @@ -560,13 +577,10 @@ class project_issue(base_stage, osv.osv): """ if context is None: context = {} - res = super(project_issue, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) - if thread_id: - self.write(cr, uid, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) - - return res + self.write(cr, SUPERUSER_ID, thread_id, {'date_action_last': time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) + return res class project(osv.Model): diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index f15355e9cc8..46caba0021e 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -68,15 +68,16 @@