diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 8943cafa975..35afac5a508 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -436,7 +436,7 @@ class account_invoice(osv.osv): if t['state'] in ('draft', 'cancel') and t['internal_number']== False: unlink_ids.append(t['id']) else: - raise osv.except_osv(_('Invalid Action!'), _('You cannot delete an invoice which is open or paid. You should refund it instead.')) + raise osv.except_osv(_('Invalid Action!'), _('You can not delete an invoice which is not cancelled. You should refund it instead.')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4feb97c2f5f..d3697b13ea9 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -436,7 +436,7 @@
- +
diff --git a/addons/account/i18n/es_AR.po b/addons/account/i18n/es_AR.po index b0c29e28c5d..15a06669417 100644 --- a/addons/account/i18n/es_AR.po +++ b/addons/account/i18n/es_AR.po @@ -7,20 +7,20 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-02-08 00:35+0000\n" -"PO-Revision-Date: 2011-03-17 20:16+0000\n" +"PO-Revision-Date: 2012-11-13 15:01+0000\n" "Last-Translator: jpdborgna \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: 2012-10-30 05:06+0000\n" -"X-Generator: Launchpad (build 16206)\n" +"X-Launchpad-Export-Date: 2012-11-14 04:40+0000\n" +"X-Generator: Launchpad (build 16251)\n" #. module: account #: view:account.invoice.report:0 #: view:analytic.entries.report:0 msgid "last month" -msgstr "" +msgstr "Ultimo mes" #. module: account #: model:process.transition,name:account.process_transition_supplierreconcilepaid0 @@ -146,7 +146,7 @@ msgstr "Referencia" #. module: account #: view:account.open.closed.fiscalyear:0 msgid "Choose Fiscal Year " -msgstr "" +msgstr "Seleccione el año fiscal " #. module: account #: help:account.payment.term,active:0 @@ -159,7 +159,7 @@ msgstr "" #: code:addons/account/account_invoice.py:1430 #, python-format msgid "Warning!" -msgstr "" +msgstr "¡Advertencia!" #. module: account #: code:addons/account/account.py:3129 @@ -187,7 +187,7 @@ msgstr "" #: code:addons/account/wizard/account_move_journal.py:95 #, python-format msgid "Journal: %s" -msgstr "" +msgstr "Diario: %s" #. module: account #: help:account.analytic.journal,type:0 @@ -228,6 +228,7 @@ msgstr "" #, python-format msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)" msgstr "" +"La factura '%s' está parcialmente pagada: %s%s de %s%s (%s%s pendiente)" #. module: account #: model:process.transition,note:account.process_transition_supplierentriesreconcile0 @@ -268,7 +269,7 @@ msgstr "" #. module: account #: view:account.fiscalyear.close.state:0 msgid "Close Fiscalyear" -msgstr "" +msgstr "Cerrar ejercicio fiscal" #. module: account #: field:account.automatic.reconcile,allow_write_off:0 @@ -335,7 +336,7 @@ msgstr "" #. module: account #: view:account.installer:0 msgid "Configure" -msgstr "" +msgstr "Configurar" #. module: account #: selection:account.entries.report,month:0 @@ -344,7 +345,7 @@ msgstr "" #: selection:report.account.sales,month:0 #: selection:report.account_type.sales,month:0 msgid "June" -msgstr "" +msgstr "Junio" #. module: account #: model:ir.actions.act_window,help:account.action_account_moves_bank @@ -378,12 +379,12 @@ msgstr "Fecha de creación" #. module: account #: selection:account.journal,type:0 msgid "Purchase Refund" -msgstr "" +msgstr "Devolución de compra" #. module: account #: selection:account.journal,type:0 msgid "Opening/Closing Situation" -msgstr "" +msgstr "Situación de apertura/cierre" #. module: account #: help:account.journal,currency:0 @@ -393,7 +394,7 @@ msgstr "La moneda utilizada para el extracto" #. module: account #: field:account.open.closed.fiscalyear,fyear_id:0 msgid "Fiscal Year to Open" -msgstr "Año fiscal para abrir" +msgstr "Ejercicio fiscal a abrir" #. module: account #: help:account.journal,sequence_id:0 @@ -495,7 +496,7 @@ msgstr "" #. module: account #: field:account.bank.statement,account_id:0 msgid "Account used in this journal" -msgstr "" +msgstr "Cuenta utilizada en este diario" #. module: account #: help:account.aged.trial.balance,chart_account_id:0 @@ -557,7 +558,7 @@ msgstr "Cerrar un año fiscal" #. module: account #: model:process.transition,note:account.process_transition_confirmstatementfromdraft0 msgid "The accountant confirms the statement." -msgstr "" +msgstr "El contador confirma la declaración." #. module: account #: report:account.account.balance:0 @@ -8156,7 +8157,7 @@ msgstr "" #: field:account.bank.statement,balance_end_real:0 #: field:account.treasury.report,ending_balance:0 msgid "Ending Balance" -msgstr "Balance final" +msgstr "Saldo Final" #. module: account #: help:account.move.line,blocked:0 diff --git a/addons/account/tests/__init__.py b/addons/account/tests/__init__.py new file mode 100644 index 00000000000..11fe4186db6 --- /dev/null +++ b/addons/account/tests/__init__.py @@ -0,0 +1,4 @@ +from . import test_tax + +fast_suite = [test_tax, + ] diff --git a/addons/account/tests/test_tax.py b/addons/account/tests/test_tax.py new file mode 100644 index 00000000000..a172a17e30d --- /dev/null +++ b/addons/account/tests/test_tax.py @@ -0,0 +1,49 @@ +from openerp.tests.common import TransactionCase + +class TestTax(TransactionCase): + """Tests for taxes (account.tax) + + We don't really need at this point to link taxes to tax codes + (account.tax.code) nor to companies (base.company) to check computation + results. + """ + + def setUp(self): + super(TestTax, self).setUp() + self.tax_model = self.registry('account.tax') + + def test_programmatic_tax(self): + cr, uid = self.cr, self.uid + tax_id = self.tax_model.create(cr, uid, dict( + name="Programmatic tax", + type='code', + python_compute='result = 12.0', + python_compute_inv='result = 11.0', + )) + + tax_records = self.tax_model.browse(cr, uid, [tax_id]) + res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2) + + tax_detail = res['taxes'][0] + self.assertEquals(tax_detail['amount'], 24.0) + self.assertEquals(res['total_included'], 124.0) + + def test_percent_tax(self): + """Test computations done by a 10 percent tax.""" + cr, uid = self.cr, self.uid + tax_id = self.tax_model.create(cr, uid, dict( + name="Percent tax", + type='percent', + amount='0.1', + )) + + tax_records = self.tax_model.browse(cr, uid, [tax_id]) + res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2) + + tax_detail = res['taxes'][0] + self.assertEquals(tax_detail['amount'], 10.0) + self.assertEquals(res['total_included'], 110.0) + + # now the inverse computation + res = self.tax_model.compute_inv(cr, uid, tax_records, 55.0, 2) + self.assertEquals(res[0]['amount'], 10.0) diff --git a/addons/account/wizard/account_financial_report_view.xml b/addons/account/wizard/account_financial_report_view.xml index 8388284be4a..507809e1961 100644 --- a/addons/account/wizard/account_financial_report_view.xml +++ b/addons/account/wizard/account_financial_report_view.xml @@ -14,15 +14,19 @@ - - - - - - - - - + + + + + + + + + + + + + diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index b8d64fac0b5..1b5622a589d 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear.py +++ b/addons/account/wizard/account_open_closed_fiscalyear.py @@ -27,7 +27,7 @@ class account_open_closed_fiscalyear(osv.osv_memory): _description = "Choose Fiscal Year" _columns = { 'fyear_id': fields.many2one('account.fiscalyear', \ - 'Fiscal Year to Open', required=True, help='Select Fiscal Year which you want to remove entries for its End of year entries journal'), + 'Fiscal Year', required=True, help='Select Fiscal Year which you want to remove entries for its End of year entries journal'), } def remove_entries(self, cr, uid, ids, context=None): @@ -36,7 +36,7 @@ class account_open_closed_fiscalyear(osv.osv_memory): data = self.browse(cr, uid, ids, context=context)[0] period_journal = data.fyear_id.end_journal_period_id or False if not period_journal: - raise osv.except_osv(_('Error!'), _('You have to set the end of the fiscal year for this journal.')) + raise osv.except_osv(_('Error!'), _("You have to set the 'End of Year Entries Journal' for this Fiscal Year which is set after generating opening entries from 'Generate Opening Entries'.")) ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)]) if ids_move: diff --git a/addons/account/wizard/account_open_closed_fiscalyear_view.xml b/addons/account/wizard/account_open_closed_fiscalyear_view.xml index c2c271af41b..d4cfd398920 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear_view.xml +++ b/addons/account/wizard/account_open_closed_fiscalyear_view.xml @@ -5,14 +5,18 @@ account.open.closed.fiscalyear.form account.open.closed.fiscalyear -
+ + +

+This wizard will remove the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year. +

- +
-
diff --git a/addons/account/wizard/account_report_account_balance_view.xml b/addons/account/wizard/account_report_account_balance_view.xml index b2c8ccd3011..3609ee3b4de 100644 --- a/addons/account/wizard/account_report_account_balance_view.xml +++ b/addons/account/wizard/account_report_account_balance_view.xml @@ -9,8 +9,7 @@ - - + diff --git a/addons/account_accountant/account_accountant_data.xml b/addons/account_accountant/account_accountant_data.xml index cf143b1bb58..c7d6eb80bc6 100644 --- a/addons/account_accountant/account_accountant_data.xml +++ b/addons/account_accountant/account_accountant_data.xml @@ -26,12 +26,10 @@ mail.group notification + Accounting and Finance application installed! - The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.

- ]]>
+ With OpenERP's accounting, you get instant access to your financial data, and can setup analytic accounting, forecast taxes, control budgets, easily create and send invoices, record bank statements, etc.

+

The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.

]]>
diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 0dddf441c59..a44226e76c8 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -377,9 +377,8 @@ class account_asset_depreciation_line(osv.osv): move_line_obj = self.pool.get('account.move.line') currency_obj = self.pool.get('res.currency') created_move_ids = [] + asset_ids = [] for line in self.browse(cr, uid, ids, context=context): - if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value): - can_close = True depreciation_date = time.strftime('%Y-%m-%d') period_ids = period_obj.find(cr, uid, depreciation_date, context=context) company_currency = line.asset_id.company_id.currency_id.id @@ -409,8 +408,8 @@ class account_asset_depreciation_line(osv.osv): 'period_id': period_ids and period_ids[0] or False, 'journal_id': journal_id, 'partner_id': partner_id, - 'currency_id': company_currency <> current_currency and current_currency or False, - 'amount_currency': company_currency <> current_currency and - sign * line.amount or 0.0, + 'currency_id': company_currency != current_currency and current_currency or False, + 'amount_currency': company_currency != current_currency and - sign * line.amount or 0.0, 'date': depreciation_date, }) move_line_obj.create(cr, uid, { @@ -423,16 +422,19 @@ class account_asset_depreciation_line(osv.osv): 'period_id': period_ids and period_ids[0] or False, 'journal_id': journal_id, 'partner_id': partner_id, - 'currency_id': company_currency <> current_currency and current_currency or False, - 'amount_currency': company_currency <> current_currency and sign * line.amount or 0.0, + 'currency_id': company_currency != current_currency and current_currency or False, + 'amount_currency': company_currency != current_currency and sign * line.amount or 0.0, 'analytic_account_id': line.asset_id.category_id.account_analytic_id.id, 'date': depreciation_date, 'asset_id': line.asset_id.id }) self.write(cr, uid, line.id, {'move_id': move_id}, context=context) created_move_ids.append(move_id) - if can_close: - asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context) + asset_ids.append(line.asset_id.id) + # we re-evaluate the assets to determine whether we can close them + for asset in asset_obj.browse(cr, uid, list(set(asset_ids)), context=context): + if currency_obj.is_zero(cr, uid, asset.currency_id, asset.value_residual): + asset.write({'state': 'close'}) return created_move_ids account_asset_depreciation_line() diff --git a/addons/account_bank_statement_extensions/account_bank_statement_view.xml b/addons/account_bank_statement_extensions/account_bank_statement_view.xml index 3d5560856a3..adc2963c803 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement_view.xml +++ b/addons/account_bank_statement_extensions/account_bank_statement_view.xml @@ -72,12 +72,12 @@ - + - - + + @@ -100,8 +100,8 @@ - - + + diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index b0c53b72835..32be8c34929 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -383,8 +383,9 @@ class account_voucher(osv.osv): total_tax = 0.0 if not tax[0].price_include: - for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes', []): - total_tax += tax_line.get('amount', 0.0) + for line in voucher.line_ids: + for tax_line in tax_pool.compute_all(cr, uid, tax, line.amount, 1).get('taxes', []): + total_tax += tax_line.get('amount', 0.0) total += total_tax else: for line in voucher.line_ids: @@ -415,31 +416,31 @@ class account_voucher(osv.osv): line_ids = resolve_o2m_operations(cr, uid, line_pool, line_ids, ["amount"], context) + total_tax = 0.0 for line in line_ids: line_amount = 0.0 line_amount = line.get('amount',0.0) + + if tax_id: + tax = [tax_pool.browse(cr, uid, tax_id, context=context)] + if partner_id: + partner = partner_pool.browse(cr, uid, partner_id, context=context) or False + taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax) + tax = tax_pool.browse(cr, uid, taxes, context=context) + + if not tax[0].price_include: + for tax_line in tax_pool.compute_all(cr, uid, tax, line_amount, 1).get('taxes', []): + total_tax += tax_line.get('amount') + voucher_total += line_amount - - total = voucher_total - total_tax = 0.0 - if tax_id: - tax = [tax_pool.browse(cr, uid, tax_id, context=context)] - if partner_id: - partner = partner_pool.browse(cr, uid, partner_id, context=context) or False - taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax) - tax = tax_pool.browse(cr, uid, taxes, context=context) - - if not tax[0].price_include: - for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes', []): - total_tax += tax_line.get('amount') - total += total_tax + total = voucher_total + total_tax res.update({ - 'amount':total or voucher_total, - 'tax_amount':total_tax + 'amount': total or voucher_total, + 'tax_amount': total_tax }) return { - 'value':res + 'value': res } def onchange_term_id(self, cr, uid, ids, term_id, amount): diff --git a/addons/account_voucher/account_voucher_data.xml b/addons/account_voucher/account_voucher_data.xml index 3d4252e697d..fc008e479e9 100644 --- a/addons/account_voucher/account_voucher_data.xml +++ b/addons/account_voucher/account_voucher_data.xml @@ -7,12 +7,10 @@ mail.group notification + eInvoicing & Payments application installed! - You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.

- ]]>
+ OpenERP's electronic invoicing accelerates the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.

+

You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.

]]>
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 1c9a095d6ed..708f9b3b196 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -327,7 +327,7 @@ class account_analytic_line(osv.osv): 'date': fields.date('Date', required=True, select=True), 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')), 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'), - 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]), + 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]), 'user_id': fields.many2one('res.users', 'User'), 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 45ab0c4fbb1..54284dee4da 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -346,8 +346,13 @@ class audittrail_objects_proxy(object_proxy): x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj)) x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id) - #recursive call on x2m fields that need to be checked too - data.update(self.get_data(cr, SUPERUSER_ID, pool, resource[field], x2m_model, method)) + field_resource_ids = list(set(resource[field])) + if model.model == x2m_model.model: + # we need to remove current resource_id from the many2many to prevent an infinit loop + if resource_id in field_resource_ids: + field_resource_ids.remove(resource_id) + data.update(self.get_data(cr, SUPERUSER_ID, pool, field_resource_ids, x2m_model, method)) + data[(model.id, resource_id)] = {'text':values_text, 'value': values} return data @@ -408,6 +413,10 @@ class audittrail_objects_proxy(object_proxy): x2m_new_values_ids = new_values.get(key, {'value': {}})['value'].get(field_name, []) # We use list(set(...)) to remove duplicates. res_ids = list(set(x2m_old_values_ids + x2m_new_values_ids)) + if model.model == x2m_model.model: + # we need to remove current resource_id from the many2many to prevent an infinit loop + if resource_id in res_ids: + res_ids.remove(resource_id) for res_id in res_ids: lines.update(self.prepare_audittrail_log_line(cr, SUPERUSER_ID, pool, x2m_model, res_id, method, old_values, new_values, field_list)) # if the value value is different than the old value: record the change diff --git a/addons/auth_anonymous/static/src/js/auth_anonymous.js b/addons/auth_anonymous/static/src/js/auth_anonymous.js index 8a78aca479c..6768bc63ff9 100644 --- a/addons/auth_anonymous/static/src/js/auth_anonymous.js +++ b/addons/auth_anonymous/static/src/js/auth_anonymous.js @@ -4,11 +4,11 @@ openerp.auth_anonymous = function(instance) { start: function() { var self = this; return $.when(this._super()).then(function() { - var dblist = self._db_list || []; + var dblist = self.db_list || []; if (!self.session.session_is_valid() && dblist.length === 1) { self.remember_credentials = false; // XXX get login/pass from server (via a rpc call) ? - return self.do_login(dblist[0], 'anonymous', 'anonymous') + return self.do_login(dblist[0], 'anonymous', 'anonymous'); } }); diff --git a/addons/auth_signup/static/src/js/auth_signup.js b/addons/auth_signup/static/src/js/auth_signup.js index bb249429894..3025069dece 100644 --- a/addons/auth_signup/static/src/js/auth_signup.js +++ b/addons/auth_signup/static/src/js/auth_signup.js @@ -41,7 +41,7 @@ openerp.auth_signup = function(instance) { on_token_loaded: function(result) { // select the right the database this.selected_db = result.db; - this.on_db_loaded({db_list: [result.db]}); + this.on_db_loaded([result.db]); if (result.token) { // switch to signup mode, set user name and login this.$el.addClass("oe_login_signup"); @@ -80,16 +80,16 @@ openerp.auth_signup = function(instance) { this.do_warn("Login", "No database selected !"); return false; } else if (!name) { - this.do_warn("Login", "Please enter a name.") + this.do_warn("Login", "Please enter a name."); return false; } else if (!login) { - this.do_warn("Login", "Please enter a username.") + this.do_warn("Login", "Please enter a username."); return false; } else if (!password || !confirm_password) { - this.do_warn("Login", "Please enter a password and confirm it.") + this.do_warn("Login", "Please enter a password and confirm it."); return false; } else if (password !== confirm_password) { - this.do_warn("Login", "Passwords do not match; please retype them.") + this.do_warn("Login", "Passwords do not match; please retype them."); return false; } var params = { diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 10c65ab850b..8590bcb8b49 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -221,7 +221,7 @@
- +
diff --git a/addons/base_import/__openerp__.py b/addons/base_import/__openerp__.py index 6555cd8e3e0..0df83eed035 100644 --- a/addons/base_import/__openerp__.py +++ b/addons/base_import/__openerp__.py @@ -24,7 +24,7 @@ Re-implement openerp's file import system: 'category': 'Uncategorized', 'website': 'http://www.openerp.com', 'author': 'OpenERP SA', - 'depends': ['base'], + 'depends': ['web'], 'installable': True, 'auto_install': False, 'css': [ @@ -37,4 +37,5 @@ Re-implement openerp's file import system: 'static/src/js/import.js', ], 'qweb': ['static/src/xml/import.xml'], + 'test': ['static/test/states.js'], } diff --git a/addons/base_import/static/test/states.js b/addons/base_import/static/test/states.js new file mode 100644 index 00000000000..3e349907a6f --- /dev/null +++ b/addons/base_import/static/test/states.js @@ -0,0 +1,6 @@ +$(document).ready(function () { + module('foo'); + test('dummy', function () { + ok(42); + }); +}); diff --git a/addons/base_setup/__openerp__.py b/addons/base_setup/__openerp__.py index de2d8236ece..e74238ba59c 100644 --- a/addons/base_setup/__openerp__.py +++ b/addons/base_setup/__openerp__.py @@ -44,7 +44,6 @@ Shows you a list of applications features to install from. 'installable': True, 'auto_install': False, 'images': ['images/base_setup1.jpeg','images/base_setup2.jpeg','images/base_setup3.jpeg','images/base_setup4.jpeg',], - 'js': ['static/src/js/base_setup.js'], 'css': ['static/src/css/base_setup.css'], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_tools/i18n/hu.po b/addons/base_tools/i18n/hu.po new file mode 100644 index 00000000000..64e4ab45ab5 --- /dev/null +++ b/addons/base_tools/i18n/hu.po @@ -0,0 +1,30 @@ +# Hungarian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2012-11-13 16:00+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Hungarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-11-14 04:40+0000\n" +"X-Generator: Launchpad (build 16251)\n" + +#. module: base_tools +#: model:ir.module.module,shortdesc:base_tools.module_meta_information +msgid "Common base for tools modules" +msgstr "" + +#. module: base_tools +#: model:ir.module.module,description:base_tools.module_meta_information +msgid "" +"\n" +" " +msgstr "" diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml index 9dfbd5f9948..f2bf56e34ac 100644 --- a/addons/crm/crm_data.xml +++ b/addons/crm/crm_data.xml @@ -58,9 +58,10 @@ mail.group notification + CRM application installed! - From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects. -To manage quotations and sale orders, install the "Sales Management" application. + From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.

+

To manage quotations and sale orders, install the "Sales Management" application.

]]>
diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index aa4243a6838..85507a32c0f 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -168,7 +168,7 @@
- +
diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 52f006ca7b2..1640b9d0318 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -95,7 +95,7 @@
- +
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index fbef2b016ac..0ca92d8effa 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -28,8 +28,6 @@ from osv import osv from osv import fields import tools from tools.translate import _ -from tools.html_sanitize import html_sanitize -from tools import append_content_to_html from urllib import quote as quote _logger = logging.getLogger(__name__) @@ -293,10 +291,10 @@ class email_template(osv.osv): or False if template.user_signature: signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature - values['body_html'] = append_content_to_html(values['body_html'], signature) + values['body_html'] = tools.append_content_to_html(values['body_html'], signature) if values['body_html']: - values['body'] = html_sanitize(values['body_html']) + values['body'] = tools.html_sanitize(values['body_html']) values.update(mail_server_id=template.mail_server_id.id or False, auto_delete=template.auto_delete, diff --git a/addons/email_template/tests/test_mail.py b/addons/email_template/tests/test_mail.py index 9a7b71a4e42..7c69295ce9f 100644 --- a/addons/email_template/tests/test_mail.py +++ b/addons/email_template/tests/test_mail.py @@ -20,10 +20,10 @@ ############################################################################## import base64 -from openerp.addons.mail.tests import test_mail +from openerp.addons.mail.tests import test_mail_mockup -class test_message_compose(test_mail.TestMailMockups): +class test_message_compose(test_mail_mockup.TestMailMockups): def setUp(self): super(test_message_compose, self).setUp() @@ -52,8 +52,8 @@ class test_message_compose(test_mail.TestMailMockups): # Mail data _subject1 = 'Pigs' _subject2 = 'Bird' - _body_html1 = 'Fans of Pigs, unite !\n
Admin
\n' - _body_html2 = 'I am angry !\n
Admin
\n' + _body_html1 = 'Fans of Pigs, unite !\n

Admin

\n' + _body_html2 = 'I am angry !\n

Admin

\n' _attachments = [ {'name': 'First', 'datas_fname': 'first.txt', 'datas': base64.b64encode('My first attachment')}, {'name': 'Second', 'datas_fname': 'second.txt', 'datas': base64.b64encode('My second attachment')} diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index 079ac5e388a..06d8cc1ee91 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -25,6 +25,21 @@ from osv import osv from osv import fields +def _reopen(self, res_id, model): + return {'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'view_type': 'form', + 'res_id': res_id, + 'res_model': self._name, + 'target': 'new', + # save original model in context, because selecting the list of available + # templates requires a model in context + 'context': { + 'default_model': model, + }, + } + + class mail_compose_message(osv.TransientModel): _inherit = 'mail.compose.message' @@ -42,10 +57,8 @@ class mail_compose_message(osv.TransientModel): else: model = context.get('default_model', context.get('active_model')) - if model: - record_ids = email_template_obj.search(cr, uid, [('model', '=', model)], context=context) - return email_template_obj.name_get(cr, uid, record_ids, context) + [(False, '')] - return [] + record_ids = email_template_obj.search(cr, uid, [('model', '=', model)], context=context) + return email_template_obj.name_get(cr, uid, record_ids, context) + [(False, '')] def default_get(self, cr, uid, fields, context=None): if context is None: @@ -110,7 +123,7 @@ class mail_compose_message(osv.TransientModel): onchange_res['partner_ids'] = [(4, partner_id) for partner_id in onchange_res.pop('partner_ids', [])] onchange_res['attachment_ids'] = [(4, attachment_id) for attachment_id in onchange_res.pop('attachment_ids', [])] record.write(onchange_res) - return True + return _reopen(self, record.id, record.model) def onchange_use_template(self, cr, uid, ids, use_template, template_id, composition_mode, model, res_id, context=None): """ onchange_use_template (values: True or False). If use_template is @@ -142,8 +155,8 @@ class mail_compose_message(osv.TransientModel): 'attachment_ids': [(6, 0, [att.id for att in record.attachment_ids])] } template_id = email_template.create(cr, uid, values, context=context) - record.write({'template_id': template_id, 'use_template': True}) - return True + record.write(record.onchange_template_id(True, template_id, record.composition_mode, record.model, record.res_id)['value']) + return _reopen(self, record.id, record.model) #------------------------------------------------------ # Wizard validation and send diff --git a/addons/email_template/wizard/mail_compose_message_view.xml b/addons/email_template/wizard/mail_compose_message_view.xml index 0a530299d4a..5afaf9745e1 100644 --- a/addons/email_template/wizard/mail_compose_message_view.xml +++ b/addons/email_template/wizard/mail_compose_message_view.xml @@ -14,12 +14,11 @@
-
Use template +
Use template
- or