diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index d771bc59506..af762611ec2 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -97,6 +97,8 @@ class account_invoice(osv.osv): for m in invoice.move_id.line_id: if m.account_id.type in ('receivable','payable'): result[invoice.id] += m.amount_residual_currency + #prevent the residual amount on the invoice to be less than 0 + result[invoice.id] = max(result[invoice.id], 0.0) return result # Give Journal Items related to the payment reconciled to this invoice diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index a96ed889aae..36d211c11d2 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -741,20 +741,17 @@ class account_move_line(osv.osv): def list_partners_to_reconcile(self, cr, uid, context=None): cr.execute( - """ - SELECT partner_id - FROM ( - SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit + """SELECT partner_id FROM ( + SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit, MAX(l.date) AS max_date FROM account_move_line l RIGHT JOIN account_account a ON (a.id = l.account_id) RIGHT JOIN res_partner p ON (l.partner_id = p.id) WHERE a.reconcile IS TRUE AND l.reconcile_id IS NULL - AND (p.last_reconciliation_date IS NULL OR l.date > p.last_reconciliation_date) AND l.state <> 'draft' GROUP BY l.partner_id, p.last_reconciliation_date ) AS s - WHERE debit > 0 AND credit > 0 + WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date) ORDER BY last_reconciliation_date""") ids = cr.fetchall() ids = len(ids) and [x[0] for x in ids] or [] diff --git a/addons/account/partner.py b/addons/account/partner.py index 346cc38f5df..ae8d2fc1871 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -233,7 +233,7 @@ class res_partner(osv.osv): help="This payment term will be used instead of the default one for purchase orders and supplier invoices"), 'ref_companies': fields.one2many('res.company', 'partner_id', 'Companies that refers to partner'), - 'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the date of the last reconciliation made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 ways: either the last debit/credit entry was reconciled, either the user pressed the button "Fully Reconciled" in the manual reconciliation process') + 'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.') } res_partner() diff --git a/addons/account/static/src/xml/account_move_reconciliation.xml b/addons/account/static/src/xml/account_move_reconciliation.xml index d7b5301238d..3074fdb49b1 100644 --- a/addons/account/static/src/xml/account_move_reconciliation.xml +++ b/addons/account/static/src/xml/account_move_reconciliation.xml @@ -22,13 +22,13 @@
\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/analytic_contract_hr_expense/analytic_contract_hr_expense.py b/addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py index 254dad95c7d..8b10381434d 100644 --- a/addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py +++ b/addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py @@ -76,11 +76,11 @@ class account_analytic_account(osv.osv): GROUP BY product_id, user_id, to_invoice, product_uom_id, line.name""", (account.id,)) res[account.id] = 0.0 - for product_id, price, user_id, factor_id, qty, uom, line_name in cr.fetchall(): + for product_id, total_amount, user_id, factor_id, qty, uom, line_name in cr.fetchall(): #the amount to reinvoice is the real cost. We don't use the pricelist - price = -price + total_amount = -total_amount factor = self.pool.get('hr_timesheet_invoice.factor').browse(cr, uid, factor_id, context=context) - res[account.id] += price * qty * (100 - factor.factor or 0.0) / 100.0 + res[account.id] += total_amount * (100 - factor.factor or 0.0) / 100.0 return res def _expense_invoiced_calc(self, cr, uid, ids, name, arg, context=None): @@ -89,8 +89,13 @@ class account_analytic_account(osv.osv): for account in self.browse(cr, uid, ids, context=context): res[account.id] = 0.0 line_ids = lines_obj.search(cr, uid, [('account_id','=', account.id), ('invoice_id','!=',False), ('to_invoice','!=', False), ('journal_id.type', '=', 'purchase')], context=context) + #Put invoices in separate array in order not to calculate them double + invoices = [] for line in lines_obj.browse(cr, uid, line_ids, context=context): - res[account.id] += line.invoice_id.amount_untaxed + if line.invoice_id not in invoices: + invoices.append(line.invoice_id) + for invoice in invoices: + res[account.id] += invoice.amount_untaxed return res def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 1c38f7f4eae..3f7ef2f3f0c 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -64,8 +64,13 @@ class OAuthController(oeweb.Controller): u = registry.get('res.users') credentials = u.auth_oauth(cr, SUPERUSER_ID, provider, kw, context=context) cr.commit() - action = state.get('a', None) - url = '/#action=' + action if action else '/' + action = state.get('a') + menu = state.get('m') + url = '/' + if action: + url = '/#action=%s' % action + elif menu: + url = '/#menu_id=%s' % menu return login_and_redirect(req, *credentials, redirect_url=url) except AttributeError: # auth_signup is not installed diff --git a/addons/auth_oauth/i18n/tr.po b/addons/auth_oauth/i18n/tr.po new file mode 100644 index 00000000000..7faa18ccebf --- /dev/null +++ b/addons/auth_oauth/i18n/tr.po @@ -0,0 +1,135 @@ +# Turkish 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 AUTHORA password reset was requested for the OpenERP account linked to this " +"email.
\n" +"\n" +"You may change your password by following this link.
\n" +"\n" +"Note: If you do not expect this, you can safely ignore this email.
" +msgstr "" +"\n" +"Se ha solicitado un cambio de contraseña dedse la cuenta de OpenERP " +"asociada con este correo eléctronico.
\n" +"\n" +"Debería cambiar su contraseña siguiendo este enlace.
\n" +"\n" +"Nota: Si no espera estanotificación, puede ignorarla de forma segura.
" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:111 +#, python-format +msgid "Please enter a name." +msgstr "Por favor, introduzca un nombre." + +#. module: auth_signup +#: model:ir.model,name:auth_signup.model_res_users +msgid "Users" +msgstr "Usuarios" + +#. module: auth_signup +#: field:res.partner,signup_url:0 +msgid "Signup URL" +msgstr "URL de Ingreso" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:114 +#, python-format +msgid "Please enter a username." +msgstr "Por favor, introduzca un nombre de usuario." + +#. module: auth_signup +#: selection:res.users,state:0 +msgid "Active" +msgstr "Activo(a)" + +#. module: auth_signup +#: code:addons/auth_signup/res_users.py:269 +#, python-format +msgid "" +"Cannot send email: no outgoing email server configured.\n" +"You can configure it under Settings/General Settings." +msgstr "" +"No se puede enviar el correo electrónico: no se ha configurado un servidor " +"de correo saliente.\n" +"Puede configurarlo en Configuración / Configuraciones Generales." + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:12 +#, python-format +msgid "Username" +msgstr "Nombre de Usuario" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:8 +#, python-format +msgid "Name" +msgstr "Nombre" + +#. 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 "" +"Por favor ingresea un Nombre de Usuario o dirección de correo electrónico." + +#. module: auth_signup +#: selection:res.users,state:0 +msgid "Resetting Password" +msgstr "Restableciendo la Contraseña" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:13 +#, python-format +msgid "Username (Email)" +msgstr "Nombre de Usuario (Dirección de correo electrónico)" + +#. module: auth_signup +#: field:res.partner,signup_expiration:0 +msgid "Signup Expiration" +msgstr "Vencimiento del Ingreso" + +#. module: auth_signup +#: help:base.config.settings,auth_signup_reset_password:0 +msgid "This allows users to trigger a password reset from the Login page." +msgstr "" +"Esto permite a los usuarios lanzar un restablecimiento de la contraseña " +"desde la página de Inicio de Sesión." + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22 +#, python-format +msgid "Log in" +msgstr "Iniciar Sesión" + +#. module: auth_signup +#: field:res.partner,signup_valid:0 +msgid "Signup Token is Valid" +msgstr "La Palabra de Ingreso es Válida" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:108 +#: code:addons/auth_signup/static/src/js/auth_signup.js:111 +#: code:addons/auth_signup/static/src/js/auth_signup.js:114 +#: code:addons/auth_signup/static/src/js/auth_signup.js:117 +#: code:addons/auth_signup/static/src/js/auth_signup.js:120 +#: code:addons/auth_signup/static/src/js/auth_signup.js:167 +#: code:addons/auth_signup/static/src/js/auth_signup.js:170 +#, python-format +msgid "Login" +msgstr "Inicio de Sesión" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:94 +#, python-format +msgid "Invalid signup token" +msgstr "Palabra de ingreso no válida" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:120 +#, python-format +msgid "Passwords do not match; please retype them." +msgstr "Las contraseñas no coinciden. Por favor vuelva a escribirlas." + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/js/auth_signup.js:108 +#: code:addons/auth_signup/static/src/js/auth_signup.js:167 +#, python-format +msgid "No database selected !" +msgstr "No se ha seleccionado ninguna base de datos!" + +#. module: auth_signup +#: view:res.users:0 +msgid "Reset Password" +msgstr "" + +#. module: auth_signup +#: field:base.config.settings,auth_signup_reset_password:0 +msgid "Enable password reset from Login page" +msgstr "" +"Habilitar restablecimiento de la contraseña desde la página de Inicio de " +"Sesión" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:27 +#, python-format +msgid "Back to Login" +msgstr "Volver al Inicio de Sesión" + +#. module: auth_signup +#. openerp-web +#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22 +#, python-format +msgid "Sign up" +msgstr "" + +#. module: auth_signup +#: model:ir.model,name:auth_signup.model_res_partner +msgid "Partner" +msgstr "Empresa/Cliente" + +#. module: auth_signup +#: field:res.partner,signup_token:0 +msgid "Signup Token" +msgstr "Palabra de Ingreso" diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml index 4e551fa21c5..5eaaf08dad4 100644 --- a/addons/base_action_rule/base_action_rule_view.xml +++ b/addons/base_action_rule/base_action_rule_view.xml @@ -27,8 +27,8 @@\n" +" Click to add a contact in your address book.\n" +"
\n" +" OpenERP helps you easily track all activities related to\n" +" a customer; discussions, history of business opportunities,\n" +" documents, etc.\n" +"
\n" +" " +msgstr "" +"\n" +" Pulse para añadir un contacto a su libreta de direcciones.\n" +"
\n" +" OpenERP le ayuda a seguir el rastro a todas las actividades " +"relativas a\n" +" un cliente: discusiones, histórico de oportunidades de negocio,\n" +" documentos, etc.\n" +"
\n" +" " + +#. module: contacts +#: model:ir.actions.act_window,name:contacts.action_contacts +#: model:ir.ui.menu,name:contacts.menu_contacts +msgid "Contacts" +msgstr "Contactos" diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml index 0e60a5b6af4..f78ad4a374d 100644 --- a/addons/hr_payroll/test/payslip.yml +++ b/addons/hr_payroll/test/payslip.yml @@ -68,9 +68,8 @@ I verify that the payslip is in done state - !python {model: hr.payslip}: | - from openerp.tools.translate import _ payslip_brw=self.browse(cr, uid, ref("hr_payslip_0")) - assert(payslip_brw.state == 'done'), _('State not changed!') + assert(payslip_brw.state == 'done'), 'State not changed!' - I want to check refund payslip so I click on refund button. - diff --git a/addons/hr_payroll_account/test/hr_payroll_account.yml b/addons/hr_payroll_account/test/hr_payroll_account.yml index c8b6bf42fdd..c637b5f319a 100644 --- a/addons/hr_payroll_account/test/hr_payroll_account.yml +++ b/addons/hr_payroll_account/test/hr_payroll_account.yml @@ -89,9 +89,8 @@ I verify the payslip is in draft state. - !python {model: hr.payslip}: | - from openerp.tools.translate import _ payslip_brw=self.browse(cr, uid, ref("hr_payslip_0")) - assert(payslip_brw.state == 'draft'), _('State not changed!') + assert(payslip_brw.state == 'draft'), 'State not changed!' - I click on "Compute Sheet" button. - @@ -120,7 +119,6 @@ I verify that the payslip is in done state. - !python {model: hr.payslip}: | - from openerp.tools.translate import _ payslip_brw=self.browse(cr, uid, ref("hr_payslip_0")) - assert(payslip_brw.state == 'done'), _('State not changed!') + assert(payslip_brw.state == 'done'), 'State not changed!' diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 6a538e5d09c..cc9c0653a85 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -74,8 +74,9 @@ class hr_analytic_timesheet(osv.osv): toremove = {} for obj in self.browse(cr, uid, ids, context=context): toremove[obj.line_id.id] = True + super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context) self.pool.get('account.analytic.line').unlink(cr, uid, toremove.keys(), context=context) - return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context) + return True def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, company_id, unit=False, journal_id=False, context=None): diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml index 74d0fa1daf6..17ac669d26d 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml @@ -9,16 +9,17 @@Hello ${object.partner_id.name},
\n" +" \n" +"Here is your ${object.state in ('draft', 'sent') and 'quotation' or " +"'order confirmation'} from ${object.company_id.name}:
\n" +"\n" +"\n"
+" REFERENCES
\n"
+" Order number: ${object.name}
\n"
+" Order total: ${object.amount_total} "
+"${object.pricelist_id.currency_id.name}
\n"
+" Order date: ${object.date_order}
\n"
+" % if object.origin:\n"
+" Order reference: ${object.origin}
\n"
+" % endif\n"
+" % if object.client_order_ref:\n"
+" Your reference: ${object.client_order_ref}
\n"
+" % endif\n"
+" % if object.user_id:\n"
+" Your contact: ${object.user_id.name}\n"
+" % endif\n"
+"
\n" +" You can access this document and pay online via our Customer Portal:\n" +"
\n" +" View ${object.state in ('draft', 'sent') " +"and 'Quotation' or 'Order'}\n" +" % endif\n" +"\n" +" % if object.paypal_url:\n" +"It is also possible to directly pay with Paypal:
\n" +" \n" +"If you have any question, do not hesitate to contact us.
\n" +"Thank you for choosing ${object.company_id.name or 'us'}!
\n" +"Hola, buen día ${object.partner_id.name}:
\n" +" \n" +"Esta es su ${object.state in ('draft', 'sent') and 'cotización' or " +"'pedido'} de ${object.company_id.name}:
\n" +"\n" +"\n"
+" REFERENCIAS
\n"
+" Número: ${object.name}
\n"
+" Total: ${object.amount_total} "
+"${object.pricelist_id.currency_id.name}
\n"
+" Fecha: ${object.date_order}
\n"
+" % if object.origin:\n"
+" Origen: ${object.origin}
\n"
+" % endif\n"
+" % if object.client_order_ref:\n"
+" Referencia de la orden de compra: "
+"${object.client_order_ref}
\n"
+" % endif\n"
+" % if object.user_id:\n"
+" Su contacto: ${object.user_id.name}\n"
+" % endif\n"
+"
\n" +" Usted puede acceder a este documento y pagarlo en linea vía nuestro " +"portal del cliente:\n" +"
\n" +" Ver ${object.state in ('draft', 'sent') " +"and 'Cotización' or 'Pedido'}\n" +" % endif\n" +"\n" +" % if object.paypal_url:\n" +"Tambien es posible pagarlo directamente con Paypal:
\n" +" \n" +"Si tiene alguna pregunta no dude en contactarnos.
\n" +"¡Gracias por seleccionar a ${object.company_id.name or 'us'}!
\n" +"Hello ${object.partner_id.name},
\n" +"\n" +"A new invoice is available for you:
\n" +" \n" +"\n"
+" REFERENCES
\n"
+" Invoice number: ${object.number}
\n"
+" Invoice total: ${object.amount_total} "
+"${object.currency_id.name}
\n"
+" Invoice date: ${object.date_invoice}
\n"
+" % if object.origin:\n"
+" Order reference: ${object.origin}
\n"
+" % endif\n"
+" % if object.user_id:\n"
+" Your contact: ${object.user_id.name}\n"
+" % endif\n"
+"
\n" +" You can access the invoice document and pay online via our Customer " +"Portal:\n" +"
\n" +" View Invoice\n" +" % endif\n" +" \n" +" % if object.paypal_url:\n" +"It is also possible to directly pay with Paypal:
\n" +" \n" +"If you have any question, do not hesitate to contact us.
\n" +"Thank you for choosing ${object.company_id.name or 'us'}!
\n" +"Hola, buen día ${object.partner_id.name}:
\n" +" \n" +"Esta es su ${object.state in ('draft', 'sent') and 'cotización' or " +"'pedido'} de ${object.company_id.name}:
\n" +"\n" +"\n"
+" REFERENCIAS
\n"
+" Número: ${object.name}
\n"
+" Total: ${object.amount_total} "
+"${object.pricelist_id.currency_id.name}
\n"
+" Fecha: ${object.date_order}
\n"
+" % if object.origin:\n"
+" Origen: ${object.origin}
\n"
+" % endif\n"
+" % if object.client_order_ref:\n"
+" Referencia de la orden de compra: "
+"${object.client_order_ref}
\n"
+" % endif\n"
+" % if object.user_id:\n"
+" Su contacto: ${object.user_id.name}\n"
+" % endif\n"
+"
\n" +" Usted puede acceder a este documento y pagarlo en linea vía nuestro " +"portal del cliente:\n" +"
\n" +" Ver ${object.state in ('draft', 'sent') " +"and 'Cotización' or 'Pedido'}\n" +" % endif\n" +"\n" +" % if object.paypal_url:\n" +"Tambien es posible pagarlo directamente con Paypal:
\n" +" \n" +"Si tiene alguna pregunta no dude en contactarnos.
\n" +"¡Gracias por seleccionar a ${object.company_id.name or 'us'}!
\n" +"