diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 1f147f5da96..b2a87308372 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -636,9 +636,10 @@ class AccountInvoice(models.Model): for line in invoice_move_lines: if self.currency_id != company_currency: currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self)) - line['currency_id'] = currency.id - line['amount_currency'] = currency.round(line['price']) - line['price'] = currency.compute(line['price'], company_currency) + if not (line.get('currency_id') and line.get('amount_currency')): + line['currency_id'] = currency.id + line['amount_currency'] = currency.round(line['price']) + line['price'] = currency.compute(line['price'], company_currency) else: line['currency_id'] = False line['amount_currency'] = False diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 6471d809b15..d20a6eca15a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -929,6 +929,14 @@ class AccountMoveLine(models.Model): if 'analytic_account_id' in first_line_dict: del first_line_dict['analytic_account_id'] if 'tax_ids' in first_line_dict: + tax_ids = [] + #vals['tax_ids'] is a list of commands [[4, tax_id, None], ...] + for tax_id in vals['tax_ids']: + tax_ids.append(tax_id[1]) + amount = first_line_dict['credit'] - first_line_dict['debit'] + amount_tax = self.env['account.tax'].browse(tax_ids).compute_all(amount)['total_included'] + first_line_dict['credit'] = amount_tax > 0 and amount_tax or 0.0 + first_line_dict['debit'] = amount_tax < 0 and abs(amount_tax) or 0.0 del first_line_dict['tax_ids'] # Writeoff line in specified writeoff account diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index 3b4f097184c..a322230a410 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -234,15 +234,17 @@ class ResPartner(models.Model): def _credit_debit_get(self): tables, where_clause, where_params = self.env['account.move.line']._query_get() where_params = [tuple(self.ids)] + where_params - self._cr.execute("""SELECT l.partner_id, act.type, SUM(l.amount_residual) - FROM account_move_line l - LEFT JOIN account_account a ON (l.account_id=a.id) + if where_clause: + where_clause = 'AND ' + where_clause + self._cr.execute("""SELECT account_move_line.partner_id, act.type, SUM(account_move_line.amount_residual) + FROM account_move_line + LEFT JOIN account_account a ON (account_move_line.account_id=a.id) LEFT JOIN account_account_type act ON (a.user_type_id=act.id) WHERE act.type IN ('receivable','payable') - AND l.partner_id IN %s - AND l.reconciled IS FALSE + AND account_move_line.partner_id IN %s + AND account_move_line.reconciled IS FALSE """ + where_clause + """ - GROUP BY l.partner_id, act.type + GROUP BY account_move_line.partner_id, act.type """, where_params) for pid, type, val in self._cr.fetchall(): partner = self.browse(pid) diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index f298b946822..2e4f132f27b 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -1328,6 +1328,7 @@ + diff --git a/addons/auth_oauth/ir_configparameter.py b/addons/auth_oauth/ir_configparameter.py index b0fa17ffa5b..421d8531eb6 100644 --- a/addons/auth_oauth/ir_configparameter.py +++ b/addons/auth_oauth/ir_configparameter.py @@ -10,5 +10,7 @@ class ir_configparameter(osv.Model): if force: IMD = self.pool['ir.model.data'] oauth_oe = IMD.xmlid_to_object(cr, SUPERUSER_ID, 'auth_oauth.provider_openerp') + if not oauth_oe: + return dbuuid = self.get_param(cr, SUPERUSER_ID, 'database.uuid') oauth_oe.write({'client_id': dbuuid}) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index e191655e09c..741899daae7 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -685,15 +685,15 @@ class calendar_event(osv.Model): return [d.astimezone(pytz.UTC) for d in rset1] def _get_recurrency_end_date(self, cr, uid, id, context=None): - data = self.read(cr, uid, id, ['final_date', 'recurrency', 'rrule_type', 'count', 'end_type', 'stop'], context=context) + data = self.read(cr, uid, id, ['final_date', 'recurrency', 'rrule_type', 'count', 'end_type', 'stop', 'interval'], context=context) if not data.get('recurrency'): return False end_type = data.get('end_type') final_date = data.get('final_date') - if end_type == 'count' and all(data.get(key) for key in ['count', 'rrule_type', 'stop']): - count = data['count'] + 1 + if end_type == 'count' and all(data.get(key) for key in ['count', 'rrule_type', 'stop', 'interval']): + count = (data['count'] + 1) * data['interval'] delay, mult = { 'daily': ('days', 1), 'weekly': ('days', 7), @@ -973,12 +973,12 @@ class calendar_event(osv.Model): startdatetime = startdatetime or start if startdatetime: start = datetime.strptime(startdatetime, DEFAULT_SERVER_DATETIME_FORMAT) - value['start_date'] = datetime.strftime(start, DEFAULT_SERVER_DATE_FORMAT) + value['start_date'] = fields.date.context_today(self, cr, uid, context=context, timestamp=start) enddatetime = enddatetime or end if enddatetime: end = datetime.strptime(enddatetime, DEFAULT_SERVER_DATETIME_FORMAT) - value['stop_date'] = datetime.strftime(end, DEFAULT_SERVER_DATE_FORMAT) + value['stop_date'] = fields.date.context_today(self, cr, uid, context=context, timestamp=end) else: # from date to datetime user = self.pool['res.users'].browse(cr, uid, uid, context) tz = pytz.timezone(user.tz) if user.tz else pytz.utc @@ -1312,7 +1312,7 @@ class calendar_event(osv.Model): data['rrule_type'] = 'monthly' if r._bymonthday: - data['day'] = r._bymonthday[0] + data['day'] = list(r._bymonthday)[0] data['month_by'] = 'date' data['rrule_type'] = 'monthly' diff --git a/addons/event_sale/models/event.py b/addons/event_sale/models/event.py index e2e2f931d9f..e817aab483e 100644 --- a/addons/event_sale/models/event.py +++ b/addons/event_sale/models/event.py @@ -36,7 +36,7 @@ class EventTicket(models.Model): name = fields.Char(string='Name', required=True, translate=True) event_id = fields.Many2one('event.event', string="Event", required=True, ondelete='cascade') product_id = fields.Many2one('product.product', string='Product', - required=True, domain=[("event_type_id", "!=", False)], + required=True, domain=["|", ("event_type_id", "!=", False), ("event_ok", "=", True)], default=_default_product_id) registration_ids = fields.One2many('event.registration', 'event_ticket_id', string='Registrations') price = fields.Float(string='Price', digits=dp.get_precision('Product Price')) diff --git a/addons/google_calendar/google_calendar.py b/addons/google_calendar/google_calendar.py index 9520cfd4ccb..acd214703b8 100644 --- a/addons/google_calendar/google_calendar.py +++ b/addons/google_calendar/google_calendar.py @@ -201,8 +201,8 @@ class google_calendar(osv.AbstractModel): if not context: context = {} if event.allday: - start_date = fields.datetime.context_timestamp(cr, uid, datetime.strptime(event.start, tools.DEFAULT_SERVER_DATETIME_FORMAT), context=context).isoformat('T').split('T')[0] - final_date = fields.datetime.context_timestamp(cr, uid, datetime.strptime(event.stop, tools.DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(days=1), context=context).isoformat('T').split('T')[0] + start_date = event.start_date + final_date = (datetime.strptime(event.stop_date, tools.DEFAULT_SERVER_DATE_FORMAT) + timedelta(days=1)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) type = 'date' vstype = 'dateTime' else: diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 8038b97abed..0b1a2ec0267 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -18,6 +18,7 @@ from dateutil.relativedelta import relativedelta from openerp.exceptions import UserError, AccessError from openerp import tools, SUPERUSER_ID from openerp.osv import fields, osv +from openerp.tools import float_compare from openerp.tools.translate import _ _logger = logging.getLogger(__name__) @@ -500,7 +501,8 @@ class hr_holidays(osv.osv): if record.holiday_type != 'employee' or record.type != 'remove' or not record.employee_id or record.holiday_status_id.limit: continue leave_days = self.pool.get('hr.holidays.status').get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, context=context)[record.holiday_status_id.id] - if leave_days['remaining_leaves'] < 0 or leave_days['virtual_remaining_leaves'] < 0: + if float_compare(leave_days['remaining_leaves'], 0, precision_digits=2) == -1 or \ + float_compare(leave_days['virtual_remaining_leaves'], 0, precision_digits=2) == -1: return False return True diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py index 3b2986766a4..9ddd8fc4748 100644 --- a/addons/hr_holidays/report/holidays_summary_report.py +++ b/addons/hr_holidays/report/holidays_summary_report.py @@ -3,7 +3,7 @@ from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta -from openerp.osv import osv +from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT @@ -44,6 +44,7 @@ class HrHolidaySummaryReport(osv.AbstractModel): res = [] count = 0 start_date = datetime.strptime(start_date, DEFAULT_SERVER_DATE_FORMAT) + start_date = fields.datetime.context_timestamp(cr, uid, start_date, context=context).date() end_date = start_date + relativedelta(days=59) for index in range(0, 60): current = start_date + timedelta(index) @@ -55,8 +56,12 @@ class HrHolidaySummaryReport(osv.AbstractModel): holiday_type = ['confirm','validate'] if holiday_type == 'both' else ['confirm'] if holiday_type == 'Confirmed' else ['validate'] holidays_ids = holidays_obj.search(cr, uid, [('employee_id', '=', empid), ('state', 'in', holiday_type), ('type', '=', 'remove'), ('date_from', '<=', str(end_date)), ('date_to', '>=', str(start_date))], context=context) for holiday in holidays_obj.browse(cr, uid, holidays_ids, context=context): + # Convert date to user timezone, otherwise the report will not be consistent with the + # value displayed in the interface. date_from = datetime.strptime(holiday.date_from, DEFAULT_SERVER_DATETIME_FORMAT) + date_from = fields.datetime.context_timestamp(cr, uid, date_from, context=context).date() date_to = datetime.strptime(holiday.date_to, DEFAULT_SERVER_DATETIME_FORMAT) + date_to = fields.datetime.context_timestamp(cr, uid, date_to, context=context).date() for index in range(0, ((date_to - date_from).days + 1)): if date_from >= start_date and date_from <= end_date: res[(date_from-start_date).days]['color'] = holiday.holiday_status_id.color_name @@ -114,4 +119,4 @@ class HrHolidaySummaryReport(osv.AbstractModel): 'get_data_from_report': self._get_data_from_report(cr, uid, ids, data['form'], context=context), 'get_holidays_status': self._get_holidays_status(cr, uid, ids, context=context), } - return report_obj.render(cr, uid, ids, 'hr_holidays.report_holidayssummary', docargs, context=context) \ No newline at end of file + return report_obj.render(cr, uid, ids, 'hr_holidays.report_holidayssummary', docargs, context=context) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 8549a93d833..e950a4cac68 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -1,6 +1,7 @@ #-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +import babel import time from datetime import date from datetime import datetime @@ -637,7 +638,7 @@ class hr_payslip(osv.osv): ttyme = datetime.fromtimestamp(time.mktime(time.strptime(date_from, "%Y-%m-%d"))) employee_id = empolyee_obj.browse(cr, uid, employee_id, context=context) res['value'].update({ - 'name': _('Salary Slip of %s for %s') % (employee_id.name, tools.ustr(ttyme.strftime('%B-%Y'))), + 'name': _('Salary Slip of %s for %s') % (employee_id.name, tools.ustr(babel.dates.format_date(date=ttyme, format='MMMM-y', locale=context.get('lang', 'en_US')))), 'company_id': employee_id.company_id.id }) @@ -696,7 +697,7 @@ class hr_payslip(osv.osv): date_to = self.date_to ttyme = datetime.fromtimestamp(time.mktime(time.strptime(date_from, "%Y-%m-%d"))) - self.name = _('Salary Slip of %s for %s') % (employee_id.name, tools.ustr(ttyme.strftime('%B-%Y'))) + self.name = _('Salary Slip of %s for %s') % (employee_id.name, tools.ustr(babel.dates.format_date(date=ttyme, format='MMMM-y', locale=self.env.context.get('lang', 'en_US')))) self.company_id = employee_id.company_id if not self.env.context.get('contract') or not self.contract_id: diff --git a/addons/l10n_ch/i18n_extra/de.po b/addons/l10n_ch/i18n_extra/de.po index 8e237552541..1562904d951 100644 --- a/addons/l10n_ch/i18n_extra/de.po +++ b/addons/l10n_ch/i18n_extra/de.po @@ -1,39 +1,131 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * l10n_ch +# * l10n_ch # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-12-02 09:39+0000\n" -"PO-Revision-Date: 2014-12-02 09:39+0000\n" +"POT-Creation-Date: 2016-12-14 14:10+0000\n" +"PO-Revision-Date: 2016-12-15 14:35+0100\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"Language: de\n" +"X-Generator: Poedit 1.8.7.1\n" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1 -msgid "ACTIF" -msgstr "AKTIVEN" +#: model:account.tax.template,description:l10n_ch.vat_O_exclude +msgid "0% excl." +msgstr "0% Exkl." #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_10 -msgid "ACTIF CIRCULANT" -msgstr "UMLAUFVERMÖGEN" +#: model:account.tax.template,description:l10n_ch.vat_O_import +msgid "0% import." +msgstr "0% Import." #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_14 -msgid "ACTIF IMMOBILISE" -msgstr "ANLAGEVERMÖGEN" +#: model:account.tax.template,name:l10n_ch.vat_100_import +msgid "100% dédouanement TVA" +msgstr "100% Verzollung MwSt." #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_6 -msgid "AUTRES CHARGES D‘EXPLOITATION, AMORTISSEMENTS ET AJUSTEMENT DE VALEUR, RÉSULTAT FINANCIER" -msgstr "ÜBRIGER BETRIEBLICHER AUFWAND, ABSCHREIBUNGEN UND WERTBERICHTIGUNGEN SOWIE FINANZERGEBNIS" +#: model:account.tax.template,description:l10n_ch.vat_100_import +msgid "100% imp." +msgstr "100% Imp." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25 +msgid "2.5%" +msgstr "2.5%" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25_incl +msgid "2.5% Incl." +msgstr "2.5% Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25_purchase +msgid "2.5% achat" +msgstr "2.5% Einkauf" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25_purchase_incl +msgid "2.5% achat Incl." +msgstr "2.5% Einkauf Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25_invest +msgid "2.5% invest." +msgstr "2.5% Invest." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_25_invest_incl +msgid "2.5% invest. Incl." +msgstr "2.5% Invest. Incl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38 +msgid "3.8%" +msgstr "3.8%" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38_incl +msgid "3.8% Incl." +msgstr "3.8% Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38_purchase +msgid "3.8% achat" +msgstr "3.8% Einkauf" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38_purchase_incl +msgid "3.8% achat Incl." +msgstr "3.8% Einkauf Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38_invest +msgid "3.8% invest" +msgstr "3.8% Invest" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_38_invest_incl +msgid "3.8% invest Incl." +msgstr "3.8% Invest Incl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80 +msgid "8.0%" +msgstr "8.0%" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80_incl +msgid "8.0% Incl." +msgstr "8.0% Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80_purchase +msgid "8.0% achat" +msgstr "8.0% Einkauf" + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80_purchase_incl +msgid "8.0% achat Incl." +msgstr "8.0% Einkauf Inkl." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80_invest +msgid "8.0% invest." +msgstr "8.0% Invest." + +#. module: l10n_ch +#: model:account.tax.template,description:l10n_ch.vat_80_invest_incl +msgid "8.0% invest. Incl." +msgstr "8.0% Invest. Inkl." #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_4200 @@ -46,75 +138,20 @@ msgid "Acomptes de clients" msgstr "Erhaltene Anzahlungen" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_net -msgid "Acquisition - total" -msgstr "Einkauf - Gesamtbetrag" +#: model:account.account.template,name:l10n_ch.ch_coa_1208 +msgid "Acomptes sur les marchandises commerciales" +msgstr "" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_invest -msgid "Acquisition de biens d'invest. et autres charges" -msgstr "Kauf von Investitionsgütern und sonstiger Aufwand" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_invest25 -msgid "Acquisition de biens d'invest. et autres charges a 2.5% (TR)" -msgstr "Kauf von Investitionsgütern und sonstiger Aufwand bei 2,5% (USt)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_invest38 -msgid "Acquisition de biens d'invest. et autres charges a 3.8% (TS)" -msgstr "Kauf von Investitionsgütern und sonstiger Aufwand bei 3,8% (LSt)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_invest80 -msgid "Acquisition de biens d'invest. et autres charges a 8.0% (TN)" -msgstr "Kauf von Investitionsgütern und sonstiger Aufwand bei 8,0% (NRZ)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base -msgid "Acquisition de biens et services" -msgstr "Einkauf von Gütern und Dienstleistungen" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_0 -msgid "Acquisition de biens et services a 0%" -msgstr "Einkauf von Gütern und Dienstleistungen bei 0%" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_25 -msgid "Acquisition de biens et services a 2.5% (TR)" -msgstr "Einkauf von Gütern und Dienstleistungen bei 2,5% (Ust)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_38 -msgid "Acquisition de biens et services a 3.8% (TS)" -msgstr "Einkauf von Gütern und Dienstleistungen bei 3,8% (LSt)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_receivable_base_80 -msgid "Acquisition de biens et services a 8.0% (TN)" -msgstr "Einkauf von Gütern und Dienstleistungen bei 8,0% (NRZ)" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_130 -msgid "Actifs de régularisation (transitoires)" -msgstr "Aktive Rechnungsabgrenzungen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_106 -msgid "Actifs à court terme cotés en bourse" -msgstr "Kurzfristig gehaltene Aktiven mit Börsenkurs" +#: model:account.account.template,name:l10n_ch.ch_coa_1218 +msgid "Acomptes sur matières premières" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1149 msgid "Ajustement de la valeur des avances et des prêts" msgstr "Wertberichtigungen Vorschüsse und Darlehen" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1709 -msgid "Ajustement de la valeur des brevets, know-how, licences, droits, dév." -msgstr "Wertberichtigungen Patente, Know-how, Lizenzen, Rechte, Entwicklungen" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1199 msgid "Ajustement de la valeur des créances à court terme" @@ -130,26 +167,6 @@ msgstr "Wertberichtigungen langfristige Forderungen" msgid "Ajustement de la valeur des goodwill" msgstr "Wertberichtigungen Goodwill" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1609 -msgid "Ajustement de la valeur des immeubles d’exploitation" -msgstr "Wertberichtigungen Geschäftsliegenschaften" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1529 -msgid "Ajustement de la valeur des machines de bureau, inf. et syst. comm." -msgstr "Wertberichtigungen Büromaschinen, Informatik, Kommunikationstechnologie" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1509 -msgid "Ajustement de la valeur des machines et appareils" -msgstr "Wertberichtigungen Maschinen und Apparate" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1549 -msgid "Ajustement de la valeur des outillages et appareils" -msgstr "Wertberichtigungen Werkzeuge und Geräte" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1489 msgid "Ajustement de la valeur des participations" @@ -162,21 +179,60 @@ msgid "Ajustement de la valeur des titres" msgstr "Wertberichtigungen Wertschriften" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1539 -msgid "Ajustement de la valeur des véhicules" -msgstr "Wertberichtigungen Fahrzeuge" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1519 -msgid "Ajustement de la valeur du mobilier et des installations" -msgstr "Wertberichtigungen Mobiliar und Einrichtungen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_68 #: model:account.account.template,name:l10n_ch.ch_coa_6800 msgid "Amortissements et ajustements de valeur des postes sur immobilisations corporelles" msgstr "Abschreibungen und Wertberichtigungen auf Positionen des Anlagevermögens" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1519 +msgid "Amortissements sur le mobilier et les installations" +msgstr "Abschreibungen auf Mobiliar und Einrichtungen" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1599 +msgid "Amortissements sur les autres immobilisations corporelles meubles" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1709 +msgid "Amortissements sur les brevets, know-how, licences, droits, dév." +msgstr "Abschreibungen auf Patente, Know-how, Lizenzen, Rechte, Entwicklungen" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1609 +msgid "Amortissements sur les immeubles d’exploitation" +msgstr "Abschreibungen auf Geschäftsliegenschaften" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1559 +msgid "Amortissements sur les installations de stockage" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1529 +msgid "Amortissements sur les machines de bureau, inf. et syst. comm." +msgstr "Abschreibungen auf Büromaschinen, Informatik, Kommunikationstechnologie" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1509 +msgid "Amortissements sur les machines et appareils" +msgstr "Abschreibungen auf Maschinen und Apparate" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1549 +msgid "Amortissements sur les outillages et appareils" +msgstr "Abschreibungen auf Werkzeuge und Geräte" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1539 +msgid "Amortissements sur les véhicules" +msgstr "Abschreibungen auf Fahrzeuge" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1579 +msgid "Amortissements sur les équipements et installations" +msgstr "" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2270 msgid "Assurances sociales et institutions de prévoyance" @@ -193,19 +249,16 @@ msgid "Autres charges du personnel" msgstr "Übriger Personalaufwand" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_60 #: model:account.account.template,name:l10n_ch.ch_coa_6700 msgid "Autres charges d‘exploitation" msgstr "Übriger betrieblicher Aufwand" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_114 #: model:account.account.template,name:l10n_ch.ch_coa_1190 msgid "Autres créances à court terme" msgstr "Übrige kurzfristige Forderungen" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_220 #: model:account.account.template,name:l10n_ch.ch_coa_2210 msgid "Autres dettes à court terme" msgstr "Übrige kurzfristige Verbindlichkeiten" @@ -216,11 +269,15 @@ msgid "Autres dettes à court terme rémunérées" msgstr "Übrige verzinsliche Verbindlichkeiten" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_250 #: model:account.account.template,name:l10n_ch.ch_coa_2500 msgid "Autres dettes à long terme" msgstr "Übrige langfristige Verbindlichkeiten" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1590 +msgid "Autres immobilisations corporelles meubles" +msgstr "Autres immobilisations corporelles meubles" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3600 msgid "Autres ventes et prestations de services" @@ -231,26 +288,6 @@ msgstr "Übrige Erlöse aus Lieferungen und Leistungen" msgid "Avances et prêts" msgstr "Vorschüsse und Darlehen" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_B -msgid "BILAN" -msgstr "BILANZ" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1020 -msgid "Banque" -msgstr "Bankguthaben" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1021 -msgid "Banque EUR" -msgstr "Bankguthaben EUR" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_base_net -msgid "Base de calcul de TVA" -msgstr "Berechnungsgrundlage der MwSt." - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1700 msgid "Brevets, know-how, licences, droits, développement" @@ -266,56 +303,21 @@ msgstr "Jahresgewinn oder Jahresverlust" msgid "Bénéfice / perte reporté" msgstr "Gewinnvortrag oder Verlustvortrag" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_28 -msgid "CAPITAUX PROPRES" -msgstr "EIGENKAPITAL" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_4 -msgid "CHARGES DE MATERIEL, DE MARCHANDISES ET DE PRESTATIONS DE TIERS" -msgstr "AUFWAND FÜR MATERIAL, HANDELSWAREN, DIENSTLEISTUNGEN UND ENERGIE" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_5 -msgid "CHARGES DE PERSONNEL" -msgstr "PERSONALAUFWAND" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_3 -msgid "CHIFFRE D’AFFAIRES RESULTANT DES VENTES ET DES PRESTATIONS DE SERVICES" -msgstr "BETRIEBLICHER ERTRAG AUS LIEFERUNGEN UND LEISTUNGEN" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_R -msgid "COMPTE DE RESULTAT" -msgstr "GEWINN- UND VERLUSTRECHNUNG" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1000 -msgid "Caisse" -msgstr "Kasse" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1850 msgid "Capital actions, capital social, droits de participations ou capital de fondation non versés" msgstr "Nicht einbezahltes Aktien-, Stamm-, Anteilschein- oder" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_180 -msgid "Capital non versé : capital social, capital de fondation" -msgstr "Nicht einbezahltes Grund-, Gesellschafter- oder Stiftungs­ apital" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_280 -msgid "Capital social ou capital de fondation" -msgstr "Grund-, Gesellschafter- oder Stiftungskapital" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2800 msgid "Capital-actions, capital social, capital de fondation" msgstr "Aktien-, Stamm-, Anteilschein- oder Stiftungskapital" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4521 +msgid "Charbon, briquettes, bois" +msgstr "" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_7010 msgid "Charges accessoires" @@ -351,11 +353,6 @@ msgstr "Aufwand betriebliche Liegenschaft" msgid "Charges d‘administration" msgstr "Verwaltungsaufwand" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_4500 -msgid "Charges d‘énergie pour l‘exploitation" -msgstr "Energieaufwand zur Leistungserstellung" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_6400 msgid "Charges d’énergie et évacuation des déchets" @@ -397,75 +394,65 @@ msgid "Charges à payer" msgstr "Noch nicht bezahlter Aufwand" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_30 -msgid "Chiffre d'affaires" -msgstr "Umsatz" +#: model:account.account.template,name:l10n_ch.ch_coa_3803 +msgid "Commissions de tiers" +msgstr "" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_base_ca_total -msgid "Chiffre d'affaires - total" -msgstr "Bruttoumsatz - Gesamtbetrag" +#: model:account.account.template,name:l10n_ch.ch_coa_4903 +msgid "Commissions obtenues sur achats" +msgstr "" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_base_due -msgid "Chiffre d'affaires imposable" -msgstr "Zu versteuernder Umsatz" +#: model:account.account.template,name:l10n_ch.ch_coa_1099 +msgid "Compte d'attente autre" +msgstr "" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_0 -msgid "Chiffre d'affaires imposable a 0% (export)" -msgstr "Zu versteuernder Umsatz bei 0% (Export)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_25 -msgid "Chiffre d'affaires imposable a 2.5% (TR)" -msgstr "Zu versteuernder Umsatz bei 2,5% (USt)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_38 -msgid "Chiffre d'affaires imposable a 3.8% (TS)" -msgstr "Zu versteuernder Umsatz bei 3,8% (LSt)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_80 -msgid "Chiffre d'affaires imposable a 8.0% (TN)" -msgstr "Zu versteuernder Umsatz bei 8,0% (NRZ)" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_0_exclu -msgid "Chiffre d'affaires non-imposable a 0% (exclu)" -msgstr "Zu versteuernder Umsatz bei 0% (ausgeschlossen)" +#: model:account.account.template,name:l10n_ch.ch_coa_1091 +msgid "Compte d'attente pour salaires" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3710 msgid "Consommations propres" msgstr "Eigenverbrauch" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1269 +msgid "Correction de la valeur de stocks de produits finis" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1279 +msgid "Corrections de la valeur des stock produits semi-ouvrés" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1209 +msgid "Corrections de la valeur des stocks de marchandises" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1289 +msgid "Corrections de la valeur des travaux en cours" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1219 +msgid "Corrections de la valeur sur matières premières" +msgstr "" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1180 msgid "Créances envers les assurances sociales et institutions de prévoyance" msgstr "Forderungen gegenüber Sozialversicherungen und Vorsorgeeinrichtungen" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_110 -msgid "Créances résultant de livraisons et prestations" -msgstr "Forderungen aus Lieferungen und Leistungen" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2000 msgid "Créanciers" msgstr "Verbindlichkeiten aus Lieferungen und Leistungen (Kreditoren)" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_20 -msgid "DETTE A COURT TERME" -msgstr "KURZFRISTIGES FREMDKAPITAL" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_24 -msgid "DETTE A LONG TERME" -msgstr "LANGFRISTIGES FREMDKAPITAL" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2100 #: model:account.account.template,name:l10n_ch.ch_coa_2400 @@ -473,25 +460,26 @@ msgid "Dettes bancaires" msgstr "Bankverbindlichkeiten" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_210 -msgid "Dettes à court terme rémunérés" -msgstr "Kurzfristige verzinsliche Verbindlichkeiten" +#: model:account.account.template,name:l10n_ch.ch_coa_2160 +msgid "Dettes envers l'actionnaire" +msgstr "" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_200 -msgid "Dettes à court terme résultant d’achats et de prestations de services" -msgstr "Verbindlichkeiten aus Lieferungen und Leistungen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_240 -msgid "Dettes à long terme rémunérées" -msgstr "Langfristige verzinsliche Verbindlichkeiten" +#: model:account.account.template,name:l10n_ch.ch_coa_3806 +#: model:account.account.template,name:l10n_ch.ch_coa_4906 +msgid "Différences de change" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2261 msgid "Dividendes" msgstr "Beschlossene Ausschüttungen" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4071 +msgid "Droits de douanes à l'importation" +msgstr "" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1109 msgid "Ducroire" @@ -508,15 +496,25 @@ msgid "Décompte TVA" msgstr "Abrechnungskonto MWST" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_4900 -msgid "Déductions sur les charges" -msgstr "Aufwandminderungen" +#: model:account.account.template,name:l10n_ch.ch_coa_4009 +msgid "Déductions obtenues sur achats" +msgstr "" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_3800 +#: model:account.account.template,name:l10n_ch.ch_coa_3009 msgid "Déductions sur ventes" msgstr "Erlösminderungen" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4540 +msgid "Eau" +msgstr "Wasser" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4500 +msgid "Electricité" +msgstr "Strom" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2450 msgid "Emprunts" @@ -538,6 +536,47 @@ msgstr "Verbindlichkeiten aus Finanzierungsleasing" msgid "Entretien, réparations et remplacement des inst. servant à l’exploitation" msgstr "Unterhalt, Reparaturen, Ersatz mobile Sachanlagen" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1570 +msgid "Equipements et Installations" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_3800 +#: model:account.account.template,name:l10n_ch.ch_coa_4900 +msgid "Escomptes" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4530 +msgid "Essence" +msgstr "Benzin" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_3804 +msgid "Frais d'encaissement" +msgstr "Frais d'encaissement" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_3807 +msgid "Frais d'expédition" +msgstr "Frais d'expédition" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4072 +msgid "Frais de transport à l'achat" +msgstr "Frais de transport à l'achat" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4070 +msgid "Frêts à l'achat" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4510 +msgid "Gaz" +msgstr "Gaz" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1770 msgid "Goodwill" @@ -554,26 +593,6 @@ msgstr "Hypotheken" msgid "Immeubles d’exploitation" msgstr "Geschäftsliegenschaften" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_160 -msgid "Immobilisations corporelles immeubles" -msgstr "Immobile Sachanlagen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_150 -msgid "Immobilisations corporelles meubles" -msgstr "Mobile Sachanlagen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_140 -msgid "Immobilisations financières" -msgstr "Finanzanlagen" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_170 -msgid "Immobilisations incorporelles" -msgstr "Immaterielle Werte" - #. module: l10n_ch #: model:account.fiscal.position.template,name:l10n_ch.fiscal_position_template_import msgid "Import/Export" @@ -607,11 +626,15 @@ msgstr "Quellensteuer" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2208 -#: model:account.account.template,name:l10n_ch.ch_coa_89 #: model:account.account.template,name:l10n_ch.ch_coa_8900 msgid "Impôts directs" msgstr "Direkte Steuern" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1550 +msgid "Installations de stockage" +msgstr "Installations de stockage" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_6260 msgid "Leasing et location de véhicules" @@ -657,47 +680,51 @@ msgstr "Hilfs- und Verbrauchsmaterial" msgid "Matières premières" msgstr "Rohstoffe" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4520 +msgid "Mazout" +msgstr "Heizöl" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1510 msgid "Mobilier et installations" msgstr "Mobiliar und Einrichtungen" +#. module: l10n_ch +#: model:ir.actions.client,name:l10n_ch.action_client_l10n_ch_menu +msgid "Open Account Dashboard Menu" +msgstr " Buchführungsübersicht öffnen" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1540 msgid "Outillages et appareils" msgstr "Werkzeuge und Geräte" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_2 -msgid "PASSIF" -msgstr "PASSIVEN" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_148 #: model:account.account.template,name:l10n_ch.ch_coa_1480 msgid "Participations" msgstr "Beteiligungen" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_230 -msgid "Passifs de régularisation (transitoires) et provisions à court terme" -msgstr "Passive Rechnungsabgrenzungen und kurzfristige Rückstellungen" +#: model:account.account.template,name:l10n_ch.ch_coa_4086 +msgid "Pertes de matières" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3805 -msgid "Pertes sur clients, variation du ducroire" +msgid "Pertes sur créances clients, variation ducroire" msgstr "Verluste Forderungen (Debitoren), Veränderung Delkredere" +#. module: l10n_ch +#: model:account.chart.template,name:l10n_ch.l10nch_chart_template +msgid "Plan comptable 2015" +msgstr "Kontenrahmen 2015" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_4400 msgid "Prestations / travaux de tiers" msgstr "Aufwand für bezogene Dienstleistungen" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1280 -msgid "Prestations de services non facturées" -msgstr "Nicht fakturierte Dienstleistungen" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3700 msgid "Prestations propres" @@ -753,11 +780,6 @@ msgstr "Rückstellungen" msgid "Provisions à court terme" msgstr "Kurzfristige Rückstellungen" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_260 -msgid "Provisions à long termes et provisions légales" -msgstr "Rückstellungen sowie vom Gesetz vorgesehene ähnliche Positionen" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1440 msgid "Prêts" @@ -769,19 +791,20 @@ msgid "Publicité" msgstr "Werbeaufwand" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_7 -msgid "RESULTAT DES ACTIVITES ANNEXES D‘EXPLOITATION" -msgstr "BETRIEBLICHER NEBENERFOLG" +#: model:account.account.template,name:l10n_ch.ch_coa_3801 +msgid "Rabais et réduction de prix" +msgstr "" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_8 -msgid "RESULTATS EXTRAORDINAIRES ET HORS EXPLOITATION" -msgstr "BETRIEBSFREMDER, AUSSERORDENTLICHER, EINMALIGER ODER PERIODEN-FREMDER AUFWAND UND ERTRAG" +#: model:account.account.template,name:l10n_ch.ch_coa_4901 +msgid "Rabais et réductions de prix" +msgstr "" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_290 -msgid "Réserves / bénéfices et pertes" -msgstr "Reserven und Jahresgewinn oder Jahresverlust" +#: model:account.account.template,name:l10n_ch.ch_coa_3802 +#: model:account.account.template,name:l10n_ch.ch_coa_4092 +msgid "Ristournes" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2940 @@ -803,40 +826,25 @@ msgstr "Gesetzliche Gewinnreserve" msgid "Réserves légales issues du capital" msgstr "Gesetzliche Kapitalreserve" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_85 -msgid "Résultat extraordinaires" -msgstr "Ausserordentlichergebnis" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_69 -msgid "Résultat financier" -msgstr "Finanzergebnis" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_80 -msgid "Résultat hors exploitation" -msgstr "Betriebsfremdergebnis" - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_5000 msgid "Salaires" msgstr "Lohnaufwand" -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_balance_net -msgid "Solde de TVA a payer a l'AFC" -msgstr "An die ESTV zu zahlende MwSt." - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1260 msgid "Stocks de produits finis" msgstr "Fertige Erzeugnisse" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_120 -msgid "Stocks et prestations non facturées" -msgstr "Vorräte und nicht fakturierte Dienstleistungen" +#: model:account.account.template,name:l10n_ch.ch_coa_1270 +msgid "Stocks de produits semi-ouvrés" +msgstr "" + +#. module: l10n_ch +#: model:ir.ui.menu,name:l10n_ch.account_reports_ch_statements_menu +msgid "Swiss Statements" +msgstr "CH Bilanz- und Erfolgsrechnungen" #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_O_import @@ -848,41 +856,66 @@ msgstr "MwSt. 0% auf Importe von Gütern und Dienstleistungen" msgid "TVA 0% exclue" msgstr "MwSt. 0% ausgeschlossen" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_25_purchase_incl +msgid "TVA 2.5% sur achat B&S (Incl. TR)" +msgstr "MwSt. 2,5 % auf Einkäufe B&S (inkl. USt)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_25_purchase msgid "TVA 2.5% sur achat B&S (TR)" msgstr "MwSt. 2,5 % auf Einkäufe B&S (USt)" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_25_invest_incl +msgid "TVA 2.5% sur invest. et autres ch. (Incl. TR)" +msgstr "MwSt. 2,5% auf Invest. und sonst. Aufw. (inkl. USt)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_25_invest msgid "TVA 2.5% sur invest. et autres ch. (TR)" msgstr "MwSt. 2,5% auf Invest. und sonst. Aufw. (USt)" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_38_purchase_incl +msgid "TVA 3.8% sur achat B&S (Incl. TS)" +msgstr "MwSt. 3,8% auf Einkäufe B&S (inkl. LSt)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_38_purchase msgid "TVA 3.8% sur achat B&S (TS)" msgstr "MwSt. 3,8% auf Einkäufe B&S (LSt)" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_38_invest_incl +msgid "TVA 3.8% sur invest. et autres ch. (Incl. TS)" +msgstr "MwSt. 3,8% auf Invest. und sonst. Aufw. (inkl. LSt)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_38_invest msgid "TVA 3.8% sur invest. et autres ch. (TS)" msgstr "MwSt. 3,8% auf Invest. und sonst. Aufw. (LSt)" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_80_purchase_incl +msgid "TVA 8.0% sur achat B&S (Incl. TN)" +msgstr "MwSt. 8.0% auf Einkäufe B&S (inkl. NRZ)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_80_purchase msgid "TVA 8.0% sur achat B&S (TN)" msgstr "MwSt. 8,0% auf Einkäufe B&S (NRZ)" +#. module: l10n_ch +#: model:account.tax.template,name:l10n_ch.vat_80_invest_incl +msgid "TVA 8.0% sur invest. et autres ch. (Incl. TN)" +msgstr "MwSt. 8,0% auf Invest. und sonst. Aufw. (inkl. NRZ)" + #. module: l10n_ch #: model:account.tax.template,name:l10n_ch.vat_80_invest msgid "TVA 8.0% sur invest. et autres ch. (TN)" msgstr "MwSt. 8,0% auf Invest. und sonst. Aufw. (NRZ)" -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_tva -msgid "TVA Due " -msgstr "Zu zahlende MwSt. " - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_2200 msgid "TVA due" @@ -894,37 +927,34 @@ msgid "TVA due a 0% (Exportations)" msgstr "Zu zahlende MwSt. bei 0% (Exporte)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_tva25 #: model:account.tax.template,name:l10n_ch.vat_25 msgid "TVA due a 2.5% (TR)" msgstr "Zu zahlende MwSt. bei 2,5% (USt)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_tva38 #: model:account.tax.template,name:l10n_ch.vat_38 msgid "TVA due a 3.8% (TS)" msgstr "Zu zahlende MwSt. bei 3,8% (LSt)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_due_tva80 #: model:account.tax.template,name:l10n_ch.vat_80 msgid "TVA due a 8.0% (TN)" msgstr "Zu zahlende MwSt. bei 8,0% (NRZ)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_payable -msgid "TVA préalable sur acquisitions (a récupérer)" -msgstr "Vorsteuer auf Einkäufe (zu erstatten)" +#: model:account.tax.template,name:l10n_ch.vat_25_incl +msgid "TVA due à 2.5% (Incl. TR)" +msgstr "Zu zahlende MwSt. bei 2,5% (inkl. USt)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_payable_bs -msgid "TVA préalable sur biens et services" -msgstr "Vorsteuer auf Güter und Dienstleistungen" +#: model:account.tax.template,name:l10n_ch.vat_38_incl +msgid "TVA due à 3.8% (Incl. TS)" +msgstr "Zu zahlende MwSt. bei 3,8% (inkl. LSt)" #. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_payable_invest -msgid "TVA préalable sur invest. et autres ch." -msgstr "Vorsteurer auf Investitionen und sonstigen Aufwand" +#: model:account.tax.template,name:l10n_ch.vat_80_incl +msgid "TVA due à 8.0% (Incl. TN)" +msgstr "Zu zahlende MwSt. bei 8,0% (inkl. NRZ)" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_1060 @@ -937,29 +967,45 @@ msgid "Titres à long terme" msgstr "Wertschriften" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_1270 +#: model:account.account.template,name:l10n_ch.transfer_account_id +msgid "Transferts internes" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1280 msgid "Travaux en cours" msgstr "Unfertige Erzeugnisse" -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_100 -msgid "Trésorerie" -msgstr "Flüssige Mittel" - -#. module: l10n_ch -#: model:account.tax.code.template,name:l10n_ch.vat_code_chart_root -msgid "VAT" -msgstr "MwSt." - #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3940 msgid "Variation de la valeur des prestations non facturées" msgstr "Bestandesänderungen nicht fakturierte Dienstleistungen" #. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_39 -msgid "Variation des stocks" -msgstr "Bestandesänderungen" +#: model:account.account.template,name:l10n_ch.ch_coa_1287 +msgid "Variation de la valeur des travaux en cours" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1277 +msgid "Variation de stock produits semi-ouvrés" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1267 +msgid "Variation de stocks de produits finis" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1207 +#: model:account.account.template,name:l10n_ch.ch_coa_4800 +msgid "Variation des stocks de marchandises" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4801 +msgid "Variation des stocks de matières premières" +msgstr "" #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3901 @@ -971,6 +1017,17 @@ msgstr "Bestandesänderungen fertige Erzeugnisse" msgid "Variation des stocks de produits semi-finis" msgstr "Bestandesänderungen unfertige Erzeugnisse" +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_1217 +msgid "Variation des stocks des matières premières" +msgstr "" + +#. module: l10n_ch +#: model:account.account.template,name:l10n_ch.ch_coa_4008 +#: model:account.account.template,name:l10n_ch.ch_coa_4080 +msgid "Variations de stocks" +msgstr "" + #. module: l10n_ch #: model:account.account.template,name:l10n_ch.ch_coa_3200 msgid "Ventes de marchandises" @@ -990,57 +1047,3 @@ msgstr "Produktionserlöse" #: model:account.account.template,name:l10n_ch.ch_coa_1530 msgid "Véhicules" msgstr "Fahrzeuge" - -#. module: l10n_ch -#: model:account.account.template,name:l10n_ch.ch_coa_0 -msgid "Plan Comptable" -msgstr "Kontenrahmen" - -#: model:account.chart.template,name:l10n_ch.l10nch_chart_template -msgid "Plan comptable 2015" -msgstr "Kontenrahmen 2015" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_25_purchase_incl -msgid "TVA 2.5% sur achat B&S (Incl. TR)" -msgstr "MwSt. 2,5 % auf Einkäufe B&S (inkl. USt)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_25_invest_incl -msgid "TVA 2.5% sur invest. et autres ch. (Incl. TR)" -msgstr "MwSt. 2,5% auf Invest. und sonst. Aufw. (inkl. USt)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_38_purchase_incl -msgid "TVA 3.8% sur achat B&S (Incl. TS)" -msgstr "MwSt. 3,8% auf Einkäufe B&S (inkl. LSt)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_38_invest_incl -msgid "TVA 3.8% sur invest. et autres ch. (Incl. TS)" -msgstr "MwSt. 3,8% auf Invest. und sonst. Aufw. (inkl. LSt)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_80_purchase_incl -msgid "TVA 8.0% sur achat B&S (Incl. TN)" -msgstr "MwSt. 8.0% auf Einkäufe B&S (inkl. NRZ)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_80_invest_incl -msgid "TVA 8.0% sur invest. et autres ch. (Incl. TN)" -msgstr "MwSt. 8,0% auf Invest. und sonst. Aufw. (inkl. NRZ)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_38_incl -msgid "TVA due à 3.8% (Incl. TS)" -msgstr "Zu zahlende MwSt. bei 3,8% (inkl. LSt)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_80_incl -msgid "TVA due à 8.0% (Incl. TN)" -msgstr "Zu zahlende MwSt. bei 8,0% (inkl. NRZ)" - -#. module: l10n_ch -#: model:account.tax.template,name:l10n_ch.vat_25_incl -msgid "TVA due à 2.5% (Incl. TR)" -msgstr "Zu zahlende MwSt. bei 2,5% (inkl. USt)" diff --git a/addons/l10n_multilang/account.py b/addons/l10n_multilang/account.py index b34c3c28c58..934feecc63c 100644 --- a/addons/l10n_multilang/account.py +++ b/addons/l10n_multilang/account.py @@ -24,6 +24,7 @@ class account_tax(osv.osv): _inherit = 'account.tax' _columns = { 'name': fields.char('Tax Name', required=True, select=True, translate=True), + 'description': fields.char('Display on Invoices', translate=True), } @@ -31,6 +32,7 @@ class account_tax_template(osv.osv): _inherit = 'account.tax.template' _columns = { 'name': fields.char('Tax Name', required=True, select=True, translate=True), + 'description': fields.char('Display on Invoices', translate=True) } diff --git a/addons/l10n_multilang/l10n_multilang.py b/addons/l10n_multilang/l10n_multilang.py index fd2900dcbb8..03981dc19af 100644 --- a/addons/l10n_multilang/l10n_multilang.py +++ b/addons/l10n_multilang/l10n_multilang.py @@ -60,8 +60,10 @@ class AccountChartTemplate(models.Model): for company in company_ids: # write account.account translations in the real COA chart_template_id._process_accounts_translations(company.id, langs, 'name') - # copy account.tax translations + # copy account.tax name translations chart_template_id._process_taxes_translations(company.id, langs, 'name') + # copy account.tax description translations + chart_template_id._process_taxes_translations(company.id, langs, 'description') # copy account.fiscal.position translations chart_template_id._process_fiscal_pos_translations(company.id, langs, 'name') return True @@ -107,8 +109,10 @@ class base_language_install(models.TransientModel): for company in self.env['res.company'].search([('chart_template_id', '=', coa.id)]): # write account.account translations in the real COA coa._process_accounts_translations(company.id, [self.lang], 'name') - # copy account.tax translations + # copy account.tax name translations coa._process_taxes_translations(company.id, [self.lang], 'name') + # copy account.tax description translations + coa._process_taxes_translations(company.id, [self.lang], 'description') # copy account.fiscal.position translations coa._process_fiscal_pos_translations(company.id, [self.lang], 'name') return res diff --git a/addons/l10n_no/account_tax.xml b/addons/l10n_no/account_tax.xml index 4b786317ac5..2336d769095 100644 --- a/addons/l10n_no/account_tax.xml +++ b/addons/l10n_no/account_tax.xml @@ -12,7 +12,7 @@ taxes - Utgående 8% mva + Utgående 10% mva taxes @@ -24,7 +24,7 @@ taxes - Inngående 8% mva + Inngående 10% mva taxes @@ -63,9 +63,9 @@ - Utgående 8% mva - Utgående 8% mva - 8 + Utgående 10% mva + Utgående 10% mva + 10 percent sale @@ -96,9 +96,9 @@ - Inngående 8% mva - Inngående 8% mva - 8 + Inngående 10% mva + Inngående 10% mva + 10 percent purchase diff --git a/addons/mail/models/mail_followers.py b/addons/mail/models/mail_followers.py index eda2c0647a4..6c066b123dd 100644 --- a/addons/mail/models/mail_followers.py +++ b/addons/mail/models/mail_followers.py @@ -60,11 +60,16 @@ class Followers(models.Model): default_subtypes = self.env['mail.message.subtype'].search([ ('default', '=', True), '|', ('res_model', '=', res_model), ('res_model', '=', False)]) + external_default_subtypes = default_subtypes.filtered(lambda subtype: not subtype.internal) if force_mode: + employee_pids = self.env['res.users'].sudo().search([('partner_id', 'in', partner_data.keys()), ('share', '=', False)]).mapped('partner_id').ids for pid, data in partner_data.iteritems(): if not data: - partner_data[pid] = default_subtypes.ids + if pid not in employee_pids: + partner_data[pid] = external_default_subtypes.ids + else: + partner_data[pid] = default_subtypes.ids for cid, data in channel_data.iteritems(): if not data: channel_data[cid] = default_subtypes.ids diff --git a/addons/mail/tests/test_mail_followers.py b/addons/mail/tests/test_mail_followers.py index d987feb59e7..d0ca1560d14 100644 --- a/addons/mail/tests/test_mail_followers.py +++ b/addons/mail/tests/test_mail_followers.py @@ -75,6 +75,22 @@ class TestMailFollowers(TestMail): self.assertEqual(len(follower), 1) self.assertEqual(follower.subtype_ids, self.default_group_subtypes) + def test_followers_subtypes_default_internal(self): + mt_mg_def_int = self.env['mail.message.subtype'].create({'name': 'mt_mg_def', 'default': True, 'res_model': 'mail.channel', 'internal': True}) + self.group_pigs.message_subscribe_users(user_ids=[self.user_employee.id]) + follower = self.env['mail.followers'].search([ + ('res_model', '=', 'mail.channel'), + ('res_id', '=', self.group_pigs.id), + ('partner_id', '=', self.user_employee.partner_id.id)]) + self.assertEqual(follower.subtype_ids, self.default_group_subtypes | mt_mg_def_int) + + self.group_pigs.message_subscribe_users(user_ids=[self.user_portal.id]) + follower = self.env['mail.followers'].search([ + ('res_model', '=', 'mail.channel'), + ('res_id', '=', self.group_pigs.id), + ('partner_id', '=', self.user_portal.partner_id.id)]) + self.assertEqual(follower.subtype_ids, self.default_group_subtypes) + def test_followers_subtypes_specified(self): self.group_pigs.sudo(self.user_employee).message_subscribe_users(subtype_ids=[self.mt_mg_nodef.id]) self.assertEqual(self.group_pigs.message_follower_ids.mapped('partner_id'), self.user_employee.partner_id) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index 7e84ff62594..8c136114660 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -235,7 +235,7 @@ snippets_editor.Class.include({ var _set_value = window.top.odoo[callback+"_updown"]; var odoo_top = window.top.odoo; window.top.odoo[callback+"_updown"] = function (value, fields_values, field_name) { - if (!window) { + if (!window || window.closed) { delete odoo_top[callback+"_updown"]; return; } diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py index e71ef8d2546..87b68e19510 100644 --- a/addons/payment_paypal/controllers/main.py +++ b/addons/payment_paypal/controllers/main.py @@ -3,6 +3,7 @@ import json import logging import pprint +import urllib import urllib2 import werkzeug @@ -26,7 +27,7 @@ class PaypalController(http.Controller): return return_url def _parse_pdt_response(self, response): - """ Parse a text reponse for a PDT verification . + """ Parse a text response for a PDT verification . :param response str: text response, structured in the following way: STATUS\nkey1=value1\nkey2=value2...\n @@ -37,6 +38,9 @@ class PaypalController(http.Controller): lines = filter(None, response.split('\n')) status = lines.pop(0) pdt_post = dict(line.split('=', 1) for line in lines) + # html unescape + for post in pdt_post: + pdt_post[post] = urllib.unquote_plus(pdt_post[post]).decode('utf8') return status, pdt_post def paypal_validate_data(self, **post): diff --git a/addons/payment_paypal/views/payment_acquirer.xml b/addons/payment_paypal/views/payment_acquirer.xml index a624366c1ed..e8b2b72fbb6 100644 --- a/addons/payment_paypal/views/payment_acquirer.xml +++ b/addons/payment_paypal/views/payment_acquirer.xml @@ -15,7 +15,7 @@ - How to configure your paypal account? + How to configure your paypal account? diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index 25daab1ca6a..0321f95d58c 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -46,7 +46,7 @@ class PosOrderReport(models.Model): MIN(l.id) AS id, COUNT(*) AS nbr_lines, s.date_order AS date, - SUM(l.qty * u.factor) AS product_qty, + SUM(l.qty) AS product_qty, SUM(l.qty * l.price_unit) AS price_sub_total, SUM((l.qty * l.price_unit) * (100 - l.discount) / 100) AS price_total, SUM((l.qty * l.price_unit) * (l.discount / 100)) AS total_discount, diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index ccef7eb0bd5..27bc21835e5 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -81,7 +81,9 @@ class wizard_user(osv.osv_memory): _columns = { 'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True, ondelete='cascade'), - 'partner_id': fields.many2one('res.partner', string='Contact', required=True, readonly=True), + 'partner_id': fields.many2one( + 'res.partner', string='Contact', required=True, readonly=True, + ondelete='cascade'), 'email': fields.char(string='Email', size=240), 'in_portal': fields.boolean('In Portal'), 'user_id': fields.many2one('res.users', string='Login User'), diff --git a/addons/product/product.py b/addons/product/product.py index 8118b4918ab..0ff9bd760b8 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -566,7 +566,7 @@ class product_template(osv.osv): else: company_id = context.get('force_company') or product.env.user.company_id.id product = product.with_context(force_company=company_id) - res[product.id] = res[product.id] = product.sudo()[ptype] + res[product.id] = product.sudo()[ptype] if ptype == 'list_price': res[product.id] += product._name == "product.product" and product.price_extra or 0.0 if 'uom' in context: @@ -922,9 +922,11 @@ class product_product(osv.osv): result[product.id] = price_extra return result - def _select_seller(self, cr, uid, product_id, partner_id=False, quantity=0.0, date=time.strftime(DEFAULT_SERVER_DATE_FORMAT), uom_id=False, context=None): + def _select_seller(self, cr, uid, product_id, partner_id=False, quantity=0.0, date=None, uom_id=False, context=None): if context is None: context = {} + if date is None: + date = time.strftime(DEFAULT_SERVER_DATE_FORMAT) res = self.pool.get('product.supplierinfo').browse(cr, uid, []) for seller in product_id.seller_ids: # Set quantity in UoM of seller diff --git a/addons/purchase/test/average_price.yml b/addons/purchase/test/average_price.yml index 32e2cb9760b..b26bfa3814f 100644 --- a/addons/purchase/test/average_price.yml +++ b/addons/purchase/test/average_price.yml @@ -12,6 +12,7 @@ cost_method: average property_stock_account_input: o_expense property_stock_account_output: o_income + supplier_taxes_id: [] description: Average Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events. - I create a draft Purchase Order for first incoming shipment for 10 pieces at 60€ diff --git a/addons/purchase/test/fifo_price.yml b/addons/purchase/test/fifo_price.yml index a435ac65ab0..fd15b39a879 100644 --- a/addons/purchase/test/fifo_price.yml +++ b/addons/purchase/test/fifo_price.yml @@ -1,8 +1,9 @@ - Set the company currency as EURO for the sake of repeatibility - - !record {model: res.company, id: base.main_company}: - currency_id: base.EUR + !python {model: res.company}: | + company = self.browse(cr, uid, ref('base.main_company')) + company.currency_id = company.env['res.currency'].browse(ref('base.EUR')) - Set a product as using fifo price - @@ -19,13 +20,13 @@ valuation: real_time property_stock_account_input: o_expense property_stock_account_output: o_income + supplier_taxes_id: [] description: FIFO Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events. - I create a draft Purchase Order for first in move for 10 kg at 50 euro - !record {model: purchase.order, id: purchase_order_fifo1}: partner_id: base.res_partner_3 - currency_id: base.EUR order_line: - product_id: product_fifo_icecream product_qty: 10.0 @@ -268,6 +269,7 @@ valuation: real_time property_stock_account_input: o_expense property_stock_account_output: o_income + supplier_taxes_id: [] description: - Create outpicking. We create delivery order of 100 kg. diff --git a/addons/purchase/test/fifo_returns.yml b/addons/purchase/test/fifo_returns.yml index e5fa0ce9de2..33bbf1afa4b 100644 --- a/addons/purchase/test/fifo_returns.yml +++ b/addons/purchase/test/fifo_returns.yml @@ -13,6 +13,7 @@ valuation: real_time property_stock_account_input: o_expense property_stock_account_output: o_income + supplier_taxes_id: [] description: FIFO Ice Cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events. - I create a draft Purchase Order for first in move for 10 kg at 50 euro diff --git a/addons/sale/sale_analytic.py b/addons/sale/sale_analytic.py index e3b5fdcb440..622d2520c63 100644 --- a/addons/sale/sale_analytic.py +++ b/addons/sale/sale_analytic.py @@ -18,6 +18,11 @@ class SaleOrderLine(models.Model): domain, ['so_line', 'unit_amount', 'product_uom_id'], ['product_uom_id', 'so_line'], lazy=False ) + # If the unlinked analytic line was the last one on the SO line, the qty was not updated. + force_so_lines = self.env.context.get("force_so_lines") + if force_so_lines: + for line in force_so_lines: + lines.setdefault(line, 0.0) for d in data: if not d['product_uom_id']: continue @@ -42,6 +47,12 @@ class AccountAnalyticLine(models.Model): def _get_invoice_price(self, order): if self.unit_amount == 0.0: return 0.0 + + # Prevent unnecessary currency conversion that could be impacted by exchange rate + # fluctuations + if self.currency_id and self.amount_currency and self.currency_id == order.currency_id: + return abs(self.amount_currency / self.unit_amount) + price_unit = abs(self.amount / self.unit_amount) currency_id = self.company_id.currency_id if currency_id and currency_id != order.currency_id: @@ -124,3 +135,10 @@ class AccountAnalyticLine(models.Model): line.with_context(create=True).write(res) line.mapped('so_line').sudo()._compute_analytic() return line + + @api.multi + def unlink(self): + so_lines = self.mapped('so_line') + res = super(AccountAnalyticLine, self).unlink() + so_lines.with_context(force_so_lines=so_lines).sudo()._compute_analytic() + return res diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index ccddedc053e..a3a16bdf895 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -105,6 +105,11 @@ class Inventory(models.Model): if self.filter != 'pack': self.package_id = False + @api.onchange('location_id') + def onchange_location_id(self): + if self.location_id.company_id: + self.company_id = self.location_id.company_id + @api.one @api.constrains('filter', 'product_id', 'lot_id', 'partner_id', 'package_id') def _check_filter_product(self): @@ -177,6 +182,9 @@ class Inventory(models.Model): locations = self.env['stock.location'].search([('id', 'child_of', [self.location_id.id])]) domain = ' location_id in %s' args = (tuple(locations.ids),) + if self.company_id: + domain += ' AND company_id = %s' + args += (self.company_id.id,) if self.partner_id: domain += ' AND owner_id = %s' args += (self.partner_id.id,) diff --git a/addons/stock/views/stock_location_views.xml b/addons/stock/views/stock_location_views.xml index 37de384d398..7174d9e40bb 100644 --- a/addons/stock/views/stock_location_views.xml +++ b/addons/stock/views/stock_location_views.xml @@ -79,7 +79,7 @@ - + @@ -287,4 +287,4 @@ - \ No newline at end of file + diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py index 2e837a2c918..3033aa27ddd 100644 --- a/addons/stock_account/stock_account.py +++ b/addons/stock_account/stock_account.py @@ -82,13 +82,21 @@ class account_invoice(osv.osv): cacc = accounts['expense'].id if dacc and cacc: price_unit = i_line._get_anglo_saxon_price_unit() + if inv.currency_id.id != company_currency: + currency_id = inv.currency_id.id + amount_currency = self.env['account.invoice.line']._get_price(inv, company_currency, i_line, price_unit) + else: + currency_id = False + amount_currency = False return [ { 'type':'src', 'name': i_line.name[:64], 'price_unit': price_unit, 'quantity': i_line.quantity, - 'price': self.env['account.invoice.line']._get_price(inv, company_currency, i_line, price_unit), + 'price': price_unit * i_line.quantity, + 'currency_id': currency_id, + 'amount_currency': amount_currency, 'account_id':dacc, 'product_id':i_line.product_id.id, 'uom_id':i_line.uom_id.id, @@ -101,7 +109,9 @@ class account_invoice(osv.osv): 'name': i_line.name[:64], 'price_unit': price_unit, 'quantity': i_line.quantity, - 'price': -1 * self.env['account.invoice.line']._get_price(inv, company_currency, i_line, price_unit), + 'price': -1 * price_unit * i_line.quantity, + 'currency_id': currency_id, + 'amount_currency': -1 * amount_currency, 'account_id':cacc, 'product_id':i_line.product_id.id, 'uom_id':i_line.uom_id.id, diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js index 3f17d44db0a..81b8bca7626 100644 --- a/addons/web_editor/static/src/js/widgets.js +++ b/addons/web_editor/static/src/js/widgets.js @@ -299,7 +299,9 @@ var ImageDialog = Widget.extend({ self.display_attachments(); }); this.fetch_existing().then(function () { - self.set_image(_.find(self.records, function (record) { return record.url === o.url;}) || o); + if (o.url) { + self.set_image(_.find(self.records, function (record) { return record.url === o.url;}) || o); + } }); return res; }, diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index 3b18d6e2138..dac8468fb3c 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -345,7 +345,8 @@ class PageConverter(werkzeug.routing.PathConverter): query = query and query.startswith('website.') and query[8:] or query if query: domain += [('key', 'like', query)] - domain += ['|', ('website_id', '=', request.website.id), ('website_id', '=', False)] + website_id = request.context.get('website_id') or request.registry['website'].search(cr, uid, [], limit=1)[0] + domain += ['|', ('website_id', '=', website_id), ('website_id', '=', False)] views = View.search_read(cr, uid, domain, fields=['key', 'priority', 'write_date'], order='name', context=context) for view in views: diff --git a/addons/website/models/website.py b/addons/website/models/website.py index e74a56b2f7b..efe9a0d90ff 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -522,6 +522,7 @@ class website(osv.osv): of the same. :rtype: list({name: str, url: str}) """ + request.context = dict(request.context, **context) router = request.httprequest.app.get_db_router(request.db) # Force enumeration to be performed as public user url_set = set() diff --git a/addons/website_blog/views/website_blog_views.xml b/addons/website_blog/views/website_blog_views.xml index a1a68bcbe6f..94a86e0d06e 100644 --- a/addons/website_blog/views/website_blog_views.xml +++ b/addons/website_blog/views/website_blog_views.xml @@ -27,6 +27,7 @@ +
diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py index 4df83920c48..f793c833b38 100644 --- a/addons/website_sale/models/sale_order.py +++ b/addons/website_sale/models/sale_order.py @@ -295,7 +295,7 @@ class Website(models.Model): else: salesperson_id = request.website.salesperson_id.id addr = partner.address_get(['delivery', 'invoice']) - sale_order = self.env['sale.order'].sudo().create({ + so_data = { 'partner_id': partner.id, 'pricelist_id': pricelist_id, 'payment_term_id': partner.property_payment_term_id.id, @@ -303,7 +303,12 @@ class Website(models.Model): 'partner_invoice_id': addr['invoice'], 'partner_shipping_id': addr['delivery'], 'user_id': salesperson_id or self.salesperson_id.id, - }) + } + company = self.company_id or self.env['product.pricelist'].browse(pricelist_id).sudo().company_id + if company: + so_data['company_id'] = company.id + + sale_order = self.env['sale.order'].sudo().create(so_data) # set fiscal position if request.website.partner_id.id != partner.id: diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js index aaca350d82f..094185c91da 100644 --- a/addons/website_sale/static/src/js/website_sale.js +++ b/addons/website_sale/static/src/js/website_sale.js @@ -263,9 +263,12 @@ $('.oe_website_sale').each(function () { } $(oe_website_sale).on('change', 'input.js_product_change', function () { + var self = this; var $parent = $(this).closest('.js_product'); - $parent.find(".oe_default_price:first .oe_currency_value").html( price_to_str(+$(this).data('lst_price')) ); - $parent.find(".oe_price:first .oe_currency_value").html(price_to_str(+$(this).data('price')) ); + $.when(base.ready()).then(function() { + $parent.find(".oe_default_price:first .oe_currency_value").html( price_to_str(+$(self).data('lst_price')) ); + $parent.find(".oe_price:first .oe_currency_value").html(price_to_str(+$(self).data('price')) ); + }); update_product_image(this, +$(this).val()); }); @@ -287,8 +290,10 @@ $('.oe_website_sale').each(function () { var product_id = false; for (var k in variant_ids) { if (_.isEmpty(_.difference(variant_ids[k][1], values))) { - $price.html(price_to_str(variant_ids[k][2])); - $default_price.html(price_to_str(variant_ids[k][3])); + $.when(base.ready()).then(function() { + $price.html(price_to_str(variant_ids[k][2])); + $default_price.html(price_to_str(variant_ids[k][3])); + }); if (variant_ids[k][3]-variant_ids[k][2]>0.2) { $default_price.closest('.oe_website_sale').addClass("discount"); $optional_price.closest('.oe_optional').show().css('text-decoration', 'line-through'); @@ -342,9 +347,12 @@ $('.oe_website_sale').each(function () { $('input.js_variant_change, select.js_variant_change', this).first().trigger('change'); }); - var state_options = $("select[name='state_id']:visible option:not(:first)"); + $("select[name='state_id']").each(function(){ + $(this).data('options', $(this).find('option:not(:first)')); + }); $(oe_website_sale).on('change', "select[name='country_id']", function () { - var select = $("select[name='state_id']:visible"); + var select = $("select[name='state_id']:enabled"); + var state_options = select.data('options'); var selected_state = select.val(); state_options.detach(); var displayed_state = state_options.filter("[data-country_id="+($(this).val() || 0)+"]"); diff --git a/addons/website_sale_options/static/src/js/website_sale.js b/addons/website_sale_options/static/src/js/website_sale.js index e614ee8664b..bb246713e5d 100644 --- a/addons/website_sale_options/static/src/js/website_sale.js +++ b/addons/website_sale_options/static/src/js/website_sale.js @@ -41,7 +41,7 @@ $('.oe_website_sale #add_to_cart, .oe_website_sale #products_grid .a-submit') data: {lang: base.get_context().lang}, success: function (quantity) { if (!$a.hasClass('js_goto_shop')) { - window.location.href = window.location.href.replace(/shop([\/?].*)?$/, "shop/cart"); + window.location.pathname = window.location.pathname.replace(/shop([\/?].*)?$/, "shop/cart"); } var $q = $(".my_cart_quantity"); $q.parent().parent().removeClass("hidden", !quantity); diff --git a/doc/cla/corporate/camptocamp.md b/doc/cla/corporate/camptocamp.md index 04e9fff4084..5d75bb46fa9 100644 --- a/doc/cla/corporate/camptocamp.md +++ b/doc/cla/corporate/camptocamp.md @@ -29,3 +29,5 @@ Ferdinand Gassauer ferdinand.gassauer@camptocamp.com https://github.com/ferdiga Jean-Baptiste Aubort jean-baptiste.aubort@camptocamp.com Cyril Gaudin cyril.gaudin@camptocamp.com https://github.com/cyrilgdn Denis Leemann denis.leemann@camptocamp.com https://github.com/leemannd +Akim Juillerat akim.juillerat@camptocamp.com https://github.com/grindtildeath +Damien Crier damien.crier@camptocamp.com https://github.com/damdam-s diff --git a/doc/cla/corporate/microcom.md b/doc/cla/corporate/microcom.md index 819259990dd..ae922d84e05 100644 --- a/doc/cla/corporate/microcom.md +++ b/doc/cla/corporate/microcom.md @@ -16,5 +16,6 @@ List of contributors: - Stéphane Le Cornec stephane.lecornec@gmail.com https://github.com/coleste - Eric Lemire elemire@users.noreply.github.com https://github.com/elemire - Martin Malorni mmalorni@gmail.com https://github.com/mmalorni -- Gregory Savoie gs.microcom@gmail.com https://github.com/gregsavoie +- Samuel Chamberland sc.microcom@gmail.com https://github.com/sc-microcom - Noreddine Ben Jillali nbj.microcom@gmail.com https://github.com/nbj-microcom +- Rim Ben Dhaou rbd.microcom@gmail.com https://github.com/rbd-microcom diff --git a/doc/cla/individual/ceaucari.md b/doc/cla/individual/ceaucari.md new file mode 100644 index 00000000000..949d627b86c --- /dev/null +++ b/doc/cla/individual/ceaucari.md @@ -0,0 +1,11 @@ +United States, 2016-03-28 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +César Castillo ceaucari@gmail.com https://github.com/ceaucari diff --git a/doc/cla/individual/damendieta.md b/doc/cla/individual/damendieta.md new file mode 100644 index 00000000000..b95a7052c0b --- /dev/null +++ b/doc/cla/individual/damendieta.md @@ -0,0 +1,11 @@ +Ecuador, 2016-10-02 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Daniel A. Mendieta P. damendieta@gmail.com https://github.com/damendieta diff --git a/doc/cla/individual/jaronemo.md b/doc/cla/individual/jaronemo.md new file mode 100644 index 00000000000..3baf3ef5ca5 --- /dev/null +++ b/doc/cla/individual/jaronemo.md @@ -0,0 +1,11 @@ +Taiwan, 2016-08-09 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +JasonWu Tingyuan Wu jaronemo@msn.com https://github.com/jaronemo diff --git a/doc/cla/individual/javierjcf.md b/doc/cla/individual/javierjcf.md new file mode 100644 index 00000000000..9b1a479941b --- /dev/null +++ b/doc/cla/individual/javierjcf.md @@ -0,0 +1,11 @@ +Spain, 2016-04-15 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Javier Colmenero Fernández javierjcf@gmail.com https://github.com/javierjcf diff --git a/doc/cla/individual/jclopezar.md b/doc/cla/individual/jclopezar.md new file mode 100644 index 00000000000..577d7061759 --- /dev/null +++ b/doc/cla/individual/jclopezar.md @@ -0,0 +1,11 @@ +Ecuador, 2016-12-13 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Juan Cristobal Lopez Arrieta juancristobal@gmail.com https://github.com/jclopezar diff --git a/doc/cla/individual/noureddineme.md b/doc/cla/individual/noureddineme.md new file mode 100644 index 00000000000..3e90fcf4e2c --- /dev/null +++ b/doc/cla/individual/noureddineme.md @@ -0,0 +1,11 @@ +Algeria, 2016-08-11 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Noureddine LOUAHEDJ n.louahedj@gmail.com https://github.com/noureddineme diff --git a/doc/cla/individual/rigo1985.md b/doc/cla/individual/rigo1985.md new file mode 100644 index 00000000000..f58ef8491de --- /dev/null +++ b/doc/cla/individual/rigo1985.md @@ -0,0 +1,11 @@ +Cuba, 2016-12-01 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Rigoberto Martínez rigo1985@gmail.com https://github.com/rigo1985 diff --git a/doc/cla/individual/uynil.md b/doc/cla/individual/uynil.md new file mode 100644 index 00000000000..0e7ac38ef9e --- /dev/null +++ b/doc/cla/individual/uynil.md @@ -0,0 +1,11 @@ +China, 20160118 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +LIN Yu yu_lin@me.com https://github.com/uynil