diff --git a/addons/account/i18n/es.po b/addons/account/i18n/es.po index ef861857698..5eabdf0a97c 100644 --- a/addons/account/i18n/es.po +++ b/addons/account/i18n/es.po @@ -9362,6 +9362,8 @@ msgstr "La referencia de asociado para esta factura." msgid "" "The partners of the journal's company and the related bank account mismatch." msgstr "" +"La empresa del diario de la compañía y el de la cuenta del banco " +"relacionada, no coinciden" #. module: account #: code:addons/account/models/account_payment.py:61 @@ -10665,6 +10667,7 @@ msgid "" "You cannot change the currency of the company since some journal items " "already exist" msgstr "" +"No puede cambiar la moneda de la compañía ya que contiene asientos contables" #. module: account #: code:addons/account/models/account.py:271 diff --git a/addons/account/i18n/fr.po b/addons/account/i18n/fr.po index 64a8bf75f7d..6103e3d269d 100644 --- a/addons/account/i18n/fr.po +++ b/addons/account/i18n/fr.po @@ -65,13 +65,14 @@ # Fabri Yohann , 2017 # Jérôme Tanché , 2017 # e2f , 2018 +# Schreiner Grégory , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~11.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-22 14:10+0000\n" "PO-Revision-Date: 2018-03-22 14:10+0000\n" -"Last-Translator: e2f , 2018\n" +"Last-Translator: Schreiner Grégory , 2018\n" "Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -9405,6 +9406,8 @@ msgstr "La référence donnée par le partenaire pour cette facture." msgid "" "The partners of the journal's company and the related bank account mismatch." msgstr "" +"Les partenaires du journal de la société et le compte bancaire lié ne " +"correspondent pas" #. module: account #: code:addons/account/models/account_payment.py:61 @@ -10707,6 +10710,8 @@ msgid "" "You cannot change the currency of the company since some journal items " "already exist" msgstr "" +"Vous ne pouvez pas modifier la devise de l'entreprise car certains articles " +"de journal existent déjà" #. module: account #: code:addons/account/models/account.py:271 diff --git a/addons/account/i18n/tr.po b/addons/account/i18n/tr.po index 05640cf7a2b..0d387c800f4 100644 --- a/addons/account/i18n/tr.po +++ b/addons/account/i18n/tr.po @@ -30,6 +30,10 @@ msgid "" " * The 'Paid' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled.\n" " * The 'Cancelled' status is used when user cancel invoice." msgstr "" +" * 'Taslak' durumu, bir kullanıcı yeni yada onaylanmamış bir fatura hazırlıyorsa kullanılır.\n" +" * 'Açık' durumu, kullanıcı bir fatura oluştururken kullanılır, fatura numarası oluşturulur. Kullanıcı faturayı ödeyinceye kadar açık durumdadır.\n" +" * 'Ödendi' durumu, fatura ödenince otomatik olarak ayarlanır. Yevmiye girişlerinin uzlaştırılımış yada uzlaştırılmamış olmasıyla ilgilidir.\n" +" * 'İptal edildi' durumu kullanıcı bir faturayı iptal ettiğinde kullanılır." #. module: account #: model:ir.model.fields,field_description:account.field_account_chart_template__code_digits diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 1cca2df5214..e3f03a48952 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -441,12 +441,17 @@ class account_payment(models.Model): @api.multi def button_invoices(self): + if self.partner_type == 'supplier': + views = [(self.env.ref('account.invoice_supplier_tree').id, 'tree'), (self.env.ref('account.invoice_supplier_form').id, 'form')] + else: + views = [(self.env.ref('account.invoice_tree').id, 'tree'), (self.env.ref('account.invoice_form').id, 'form')] return { 'name': _('Paid Invoices'), 'view_type': 'form', 'view_mode': 'tree,form', 'res_model': 'account.invoice', 'view_id': False, + 'views': views, 'type': 'ir.actions.act_window', 'domain': [('id', 'in', [x.id for x in self.invoice_ids])], } diff --git a/addons/analytic/i18n/tr.po b/addons/analytic/i18n/tr.po index 0248209cb6c..fd94a91c23b 100644 --- a/addons/analytic/i18n/tr.po +++ b/addons/analytic/i18n/tr.po @@ -11,13 +11,14 @@ # Ahmet Altinisik , 2017 # Martin Trigaux, 2017 # Ayhan KIZILTAN , 2017 +# Umur Akın , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~11.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-22 14:10+0000\n" "PO-Revision-Date: 2018-03-22 14:10+0000\n" -"Last-Translator: Ayhan KIZILTAN , 2017\n" +"Last-Translator: Umur Akın , 2018\n" "Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -148,7 +149,7 @@ msgstr "Bakiye" #. module: analytic #: model:ir.ui.view,arch_db:analytic.view_account_analytic_account_kanban msgid "Balance:" -msgstr "" +msgstr "Bakiye:" #. module: analytic #: model:ir.actions.act_window,name:analytic.action_analytic_account_form @@ -412,6 +413,8 @@ msgstr "Analitik Satırları Ara" #: model:ir.model.fields,help:analytic.field_account_analytic_tag__active msgid "Set active to false to hide the Analytic Tag without removing it." msgstr "" +"Analitik Etiketi kaldırmadan gizlemek için etkin seçeneğini yanlış olarak " +"ayarla." #. module: analytic #: model:ir.model.fields,field_description:analytic.field_account_analytic_line__tag_ids diff --git a/addons/analytic/models/analytic_account.py b/addons/analytic/models/analytic_account.py index d2e2a609e88..9cd801144e8 100644 --- a/addons/analytic/models/analytic_account.py +++ b/addons/analytic/models/analytic_account.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +from collections import defaultdict from odoo import api, fields, models, _ from odoo.osv import expression from odoo.exceptions import ValidationError @@ -78,9 +79,9 @@ class AccountAnalyticAccount(models.Model): @api.multi def _compute_debit_credit_balance(self): - res_currency_obj = self.env['res.currency'] + Curr = self.env['res.currency'] analytic_line_obj = self.env['account.analytic.line'] - domain = [('account_id', 'in', self.mapped('id'))] + domain = [('account_id', 'in', self.ids)] if self._context.get('from_date', False): domain.append(('date', '>=', self._context['from_date'])) if self._context.get('to_date', False): @@ -92,17 +93,23 @@ class AccountAnalyticAccount(models.Model): domain.append(('company_id', 'in', self._context['company_ids'])) user_currency = self.env.user.company_id.currency_id - account_amounts = analytic_line_obj.search_read(domain, ['account_id', 'amount', 'currency_id']) - account_ids = set([line['account_id'][0] for line in account_amounts]) - data_debit = {account_id: 0.0 for account_id in account_ids} - data_credit = {account_id: 0.0 for account_id in account_ids} - for account_amount in account_amounts: - currency_id = account_amount['currency_id'][0] - amount = res_currency_obj.browse(currency_id).compute(account_amount['amount'], user_currency) - if amount < 0.0: - data_debit[account_amount['account_id'][0]] += amount - else: - data_credit[account_amount['account_id'][0]] += amount + credit_groups = analytic_line_obj.read_group( + domain=domain + [('amount', '>=', 0.0)], + fields=['account_id', 'currency_id', 'amount'], + groupby=['account_id', 'currency_id'], + ) + data_credit = defaultdict(float) + for l in credit_groups: + data_credit[l['account_id'][0]] += Curr.browse(l['currency_id'][0]).compute(l['amount'], user_currency) + + debit_groups = analytic_line_obj.read_group( + domain=domain + [('amount', '<', 0.0)], + fields=['account_id', 'currency_id', 'amount'], + groupby=['account_id', 'currency_id'], + ) + data_debit = defaultdict(float) + for l in debit_groups: + data_debit[l['account_id'][0]] += Curr.browse(l['currency_id'][0]).compute(l['amount'], user_currency) for account in self: account.debit = abs(data_debit.get(account.id, 0.0)) diff --git a/addons/anonymization/i18n/tr.po b/addons/anonymization/i18n/tr.po index ae89afae2c5..c53cad2c808 100644 --- a/addons/anonymization/i18n/tr.po +++ b/addons/anonymization/i18n/tr.po @@ -11,13 +11,14 @@ # Ramiz Deniz Öner , 2017 # Gökhan Erdoğdu , 2017 # Özem Sökmem , 2017 +# Umur Akın , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~11.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-22 14:10+0000\n" "PO-Revision-Date: 2018-03-22 14:10+0000\n" -"Last-Translator: Özem Sökmem , 2017\n" +"Last-Translator: Umur Akın , 2018\n" "Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -396,6 +397,8 @@ msgid "" "This is the file created by the anonymization process. It should have the " "extension '.json' or '.pickle'." msgstr "" +"Bu dosya anonimleştirme işlemi tarafından oluşturulmuştur. Bunun uzantısı " +"'.json' yada '.pickle' dır." #. module: anonymization #: selection:ir.model.fields.anonymize.wizard,state:0 diff --git a/addons/barcodes/i18n/tr.po b/addons/barcodes/i18n/tr.po index 0cec71e252e..e1f85af3bdd 100644 --- a/addons/barcodes/i18n/tr.po +++ b/addons/barcodes/i18n/tr.po @@ -412,6 +412,8 @@ msgstr "Birim Ürün" msgid "" "Used to order rules such that rules with a smaller sequence match first" msgstr "" +"ilk olarak küçük sıralarla eşleyen kurallar gibi kullanılan sipariş " +"kuralları" #. module: barcodes #: model:ir.model.fields,help:barcodes.field_barcodes_barcode_events_mixin___barcode_scanned @@ -426,7 +428,7 @@ msgstr "Tartılmış Ürün" #. module: barcodes #: model:ir.model,name:barcodes.model_barcode_nomenclature msgid "barcode.nomenclature" -msgstr "" +msgstr "barcode.nomenclature" #. module: barcodes #: model:ir.model,name:barcodes.model_barcode_rule @@ -436,4 +438,4 @@ msgstr "barkod.kuralı" #. module: barcodes #: model:ir.model,name:barcodes.model_barcodes_barcode_events_mixin msgid "barcodes.barcode_events_mixin" -msgstr "" +msgstr "barcodes.barcode_events_mixin" diff --git a/addons/base_import/i18n/nl.po b/addons/base_import/i18n/nl.po index 317594a9792..b81f00756fb 100644 --- a/addons/base_import/i18n/nl.po +++ b/addons/base_import/i18n/nl.po @@ -145,7 +145,7 @@ msgstr "Decimaal scheidingsteken:" #: code:addons/base_import/static/src/xml/base_import.xml:76 #, python-format msgid "Defer parent/child computation" -msgstr "" +msgstr "Uitstellen boven/onderliggende berekening" #. module: base_import #: model:ir.model.fields,field_description:base_import.field_base_import_import__display_name diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index ddbb5a37880..161130e1e94 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -656,7 +656,13 @@ class Meeting(models.Model): }[data['rrule_type']] deadline = fields.Datetime.from_string(data['stop']) - return deadline + relativedelta(**{delay: count * mult}) + computed_final_date = False + while not computed_final_date and count > 0: + try: # may crash if year > 9999 (in case of recurring events) + computed_final_date = deadline + relativedelta(**{delay: count * mult}) + except ValueError: + count -= data['interval'] + return computed_final_date or deadline return final_date @api.multi diff --git a/addons/crm/i18n/nl.po b/addons/crm/i18n/nl.po index 845479dbeba..078a6c36e63 100644 --- a/addons/crm/i18n/nl.po +++ b/addons/crm/i18n/nl.po @@ -1022,7 +1022,7 @@ msgstr "Forceer toewijzing" #. module: crm #: model:ir.ui.view,arch_db:crm.res_config_settings_view_form msgid "Format phone numbers based on national conventions" -msgstr "" +msgstr "Opmaak telefoonnummers gebaseerd op nationale afspraken." #. module: crm #: code:addons/crm/models/crm_lead.py:588 @@ -1878,7 +1878,7 @@ msgstr "Telefoon" #. module: crm #: model:ir.model.fields,field_description:crm.field_res_config_settings__module_crm_phone_validation msgid "Phone Formatting" -msgstr "" +msgstr "Telefoonnummer opmaak" #. module: crm #: code:addons/crm/models/crm_team.py:165 diff --git a/addons/hr_attendance/static/src/js/kiosk_mode.js b/addons/hr_attendance/static/src/js/kiosk_mode.js index 59bd0c3f71e..6046b9bdbb2 100644 --- a/addons/hr_attendance/static/src/js/kiosk_mode.js +++ b/addons/hr_attendance/static/src/js/kiosk_mode.js @@ -2,6 +2,7 @@ odoo.define('hr_attendance.kiosk_mode', function (require) { "use strict"; var AbstractAction = require('web.AbstractAction'); +var ajax = require('web.ajax'); var core = require('web.core'); var Session = require('web.session'); @@ -28,6 +29,8 @@ var KioskMode = AbstractAction.extend({ self.$el.html(QWeb.render("HrAttendanceKioskMode", {widget: self})); self.start_clock(); }); + // Make a RPC call every day to keep the session alive + self._interval = window.setInterval(this._callServer.bind(this), (60*60*1000*24)); return $.when(def, this._super.apply(this, arguments)); }, @@ -56,8 +59,15 @@ var KioskMode = AbstractAction.extend({ destroy: function () { core.bus.off('barcode_scanned', this, this._onBarcodeScanned); clearInterval(this.clock_start); + clearInterval(this._interval); this._super.apply(this, arguments); }, + + _callServer: function () { + // Make a call to the database to avoid the auto close of the session + return ajax.rpc("/web/webclient/version_info", {}); + }, + }); core.action_registry.add('hr_attendance_kiosk_mode', KioskMode); diff --git a/addons/hr_holidays/report/hr_leave_reports.xml b/addons/hr_holidays/report/hr_leave_reports.xml index 18d8785721e..6f884671c37 100644 --- a/addons/hr_holidays/report/hr_leave_reports.xml +++ b/addons/hr_holidays/report/hr_leave_reports.xml @@ -33,8 +33,6 @@ - - @@ -118,7 +116,7 @@ hr.leave.report hr.employee form - tree,kanban + tree,kanban,form { 'search_default_group_type': 1, diff --git a/addons/iap/__manifest__.py b/addons/iap/__manifest__.py index 35124df76eb..6a30ed891c9 100644 --- a/addons/iap/__manifest__.py +++ b/addons/iap/__manifest__.py @@ -9,7 +9,7 @@ 'description': """ This module provides standard tools (account model, context manager and helpers) to support In-App purchases inside Odoo. """, - 'depends': ['web'], + 'depends': ['web', 'web_settings_dashboard'], 'data': [ 'security/ir.model.access.csv', 'security/ir_rule.xml', diff --git a/addons/l10n_co/__manifest__.py b/addons/l10n_co/__manifest__.py index 72a39483284..88f5fb464f9 100644 --- a/addons/l10n_co/__manifest__.py +++ b/addons/l10n_co/__manifest__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -# Copyright (C) David Arnold (devCO). -# Author David Arnold (devCO), dar@devco.co +# Copyright (C) David Arnold (XOE Solutions). +# Author David Arnold (XOE Solutions), dar@xoe.solutions # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Ivan Valencia Muñoz (TIX SAS) # Nhomar Hernandez (Vauxoo) @@ -13,7 +13,8 @@ 'version': '0.8', 'category': 'Localization', 'description': 'Colombian Accounting and Tax Preconfiguration', - 'author': 'David Arnold BA HSG (devCO)', + 'author': 'David Arnold (XOE Solutions)', + 'website': 'https://xoe.solutions', 'depends': [ 'account', ], diff --git a/addons/l10n_es/__manifest__.py b/addons/l10n_es/__manifest__.py index c5d7599074e..44b23a5e9c4 100644 --- a/addons/l10n_es/__manifest__.py +++ b/addons/l10n_es/__manifest__.py @@ -3,6 +3,7 @@ # List of contributors: # Jordi Esteve +# Ignacio Ibeas # Dpto. Consultoría Grupo Opentia # Pedro M. Baeza # Carlos Liébana diff --git a/addons/l10n_es/data/account_fiscal_position_template_data.xml b/addons/l10n_es/data/account_fiscal_position_template_data.xml index 49beed9d022..eef1bd1ac03 100644 --- a/addons/l10n_es/data/account_fiscal_position_template_data.xml +++ b/addons/l10n_es/data/account_fiscal_position_template_data.xml @@ -113,6 +113,16 @@ + + REAGYP - Agricultura + + + + + REAGYP - Ganadería y pesca + + + @@ -2889,6 +2899,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/l10n_es/data/account_tax_data.xml b/addons/l10n_es/data/account_tax_data.xml index d07503b0b88..327144f6fe1 100644 --- a/addons/l10n_es/data/account_tax_data.xml +++ b/addons/l10n_es/data/account_tax_data.xml @@ -1044,6 +1044,18 @@ + + P_IVA105_GAN + purchase + + 10,5% IVA Soportado régimen ganadero o pesca + + + + percent + + + S_IVA0_E sale @@ -1330,6 +1342,7 @@ + percent diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index e32bf8d270d..5ebfc94cc24 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -120,7 +120,8 @@ class MailThread(models.AbstractModel): followers = self.env['mail.followers'].sudo().search([ ('res_model', '=', self._name), ('partner_id', operator, operand)]) - return [('id', 'in', followers.mapped('res_id'))] + # using read() below is much faster than followers.mapped('res_id') + return [('id', 'in', [res['res_id'] for res in followers.read(['res_id'])])] @api.model def _search_follower_channels(self, operator, operand): @@ -133,7 +134,8 @@ class MailThread(models.AbstractModel): followers = self.env['mail.followers'].sudo().search([ ('res_model', '=', self._name), ('channel_id', operator, operand)]) - return [('id', 'in', followers.mapped('res_id'))] + # using read() below is much faster than followers.mapped('res_id') + return [('id', 'in', [res['res_id'] for res in followers.read(['res_id'])])] @api.multi @api.depends('message_follower_ids') @@ -143,7 +145,8 @@ class MailThread(models.AbstractModel): ('res_id', 'in', self.ids), ('partner_id', '=', self.env.user.partner_id.id), ]) - following_ids = followers.mapped('res_id') + # using read() below is much faster than followers.mapped('res_id') + following_ids = [res['res_id'] for res in followers.read(['res_id'])] for record in self: record.message_is_follower = record.id in following_ids @@ -155,9 +158,11 @@ class MailThread(models.AbstractModel): ]) # Cases ('message_is_follower', '=', True) or ('message_is_follower', '!=', False) if (operator == '=' and operand) or (operator == '!=' and not operand): - return [('id', 'in', followers.mapped('res_id'))] + # using read() below is much faster than followers.mapped('res_id') + return [('id', 'in', [res['res_id'] for res in followers.read(['res_id'])])] else: - return [('id', 'not in', followers.mapped('res_id'))] + # using read() below is much faster than followers.mapped('res_id') + return [('id', 'not in', [res['res_id'] for res in followers.read(['res_id'])])] @api.multi def _get_message_unread(self): diff --git a/addons/mail/static/src/js/activity.js b/addons/mail/static/src/js/activity.js index 4bb81489789..fce7eb29f6f 100644 --- a/addons/mail/static/src/js/activity.js +++ b/addons/mail/static/src/js/activity.js @@ -32,6 +32,7 @@ function _readActivities(self, ids) { model: 'mail.activity', method: 'read', args: [ids], + context: (self.record && self.record.getContext()) || self.getSession().user_context, }).then(function (activities) { // convert create_date and date_deadline to moments _.each(activities, function (activity) { @@ -108,6 +109,7 @@ var AbstractActivityField = AbstractField.extend({ method: 'action_feedback', args: [[id]], kwargs: {feedback: feedback}, + context: this.record.getContext(), }); }, _scheduleActivity: function (id, previous_activity_type_id, callback) { diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 7b1876cd211..61645b3c3b9 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -473,10 +473,16 @@ class MrpProduction(models.Model): @api.multi def _generate_workorders(self, exploded_boms): workorders = self.env['mrp.workorder'] + original_one = False for bom, bom_data in exploded_boms: # If the routing of the parent BoM and phantom BoM are the same, don't recreate work orders, but use one master routing if bom.routing_id.id and (not bom_data['parent_line'] or bom_data['parent_line'].bom_id.routing_id.id != bom.routing_id.id): - workorders += self._workorders_create(bom, bom_data) + temp_workorders = self._workorders_create(bom, bom_data) + workorders += temp_workorders + if temp_workorders: # In order to avoid two "ending work orders" + if original_one: + temp_workorders[-1].next_work_order_id = original_one + original_one = temp_workorders[0] return workorders def _workorders_create(self, bom, bom_data): diff --git a/addons/mrp/models/mrp_workorder.py b/addons/mrp/models/mrp_workorder.py index b8f826caec2..0c0ddf37ead 100644 --- a/addons/mrp/models/mrp_workorder.py +++ b/addons/mrp/models/mrp_workorder.py @@ -225,6 +225,7 @@ class MrpWorkorder(models.Model): 'done_wo': False, 'location_id': move.location_id.id, 'location_dest_id': move.location_dest_id.id, + 'date': move.date, }) qty_todo -= 1 elif float_compare(qty_todo, 0.0, precision_rounding=rounding) < 0: @@ -416,7 +417,12 @@ class MrpWorkorder(models.Model): @api.multi def button_start(self): - # TDE CLEANME + self.ensure_one() + # As button_start is automatically called in the new view + if self.state in ('done', 'cancel'): + return True + + # Need a loss in case of the real time exceeding the expected timeline = self.env['mrp.workcenter.productivity'] if self.duration < self.duration_expected: loss_id = self.env['mrp.workcenter.productivity.loss'].search([('loss_type','=','productive')], limit=1) diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 6f13400356b..ded83ea59d1 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -92,7 +92,7 @@ class WebsitePayment(http.Controller): 'type': 'form_save' if acquirer.save_token != 'none' and partner_id else 'form', } - tx = request.env['payment.transaction'].sudo().create(values) + tx = request.env['payment.transaction'].sudo().with_context(lang=None).create(values) request.session['website_payment_tx_id'] = tx.id render_values = { @@ -122,7 +122,7 @@ class WebsitePayment(http.Controller): 'type': 'form_save' if token.acquirer_id.save_token != 'none' and partner_id else 'form', } - tx = request.env['payment.transaction'].sudo().create(values) + tx = request.env['payment.transaction'].sudo().with_context(lang=None).create(values) request.session['website_payment_tx_id'] = tx.id try: diff --git a/addons/payment_ogone/models/payment.py b/addons/payment_ogone/models/payment.py index 8771addc151..5164fec16aa 100644 --- a/addons/payment_ogone/models/payment.py +++ b/addons/payment_ogone/models/payment.py @@ -357,7 +357,7 @@ class PaymentTxOgone(models.Model): 'AMOUNT': int(self.amount * 100), 'CURRENCY': self.currency_id.name, 'OPERATION': 'SAL', - 'ECI': 2, # Recurring (from MOTO) + 'ECI': 9, # Recurring (from eCommerce) 'ALIAS': self.payment_token_id.acquirer_ref, 'RTIMEOUT': 30, 'PARAMPLUS' : url_encode(param_plus) diff --git a/addons/pos_mercury/static/src/js/pos_mercury.js b/addons/pos_mercury/static/src/js/pos_mercury.js index e403b9bcf12..7f896e5661f 100644 --- a/addons/pos_mercury/static/src/js/pos_mercury.js +++ b/addons/pos_mercury/static/src/js/pos_mercury.js @@ -449,6 +449,7 @@ PaymentScreenWidget.include({ order.selected_paymentline.paid = true; order.selected_paymentline.mercury_swipe_pending = false; order.selected_paymentline.mercury_amount = response.authorize; + order.selected_paymentline.set_amount(response.authorize); order.selected_paymentline.mercury_card_number = decodedMagtek['number']; order.selected_paymentline.mercury_card_brand = response.card_type; order.selected_paymentline.mercury_card_owner_name = decodedMagtek['name']; diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 20578c30c93..36eb3d323be 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -218,6 +218,9 @@ class Project(models.Model): doc_count = fields.Integer(compute='_compute_attached_docs_count', string="Number of documents attached") date_start = fields.Date(string='Start Date') date = fields.Date(string='Expiration Date', index=True, track_visibility='onchange') + subtask_project_id = fields.Many2one('project.project', string='Sub-task Project', ondelete="restrict", + help="Choosing a sub-tasks project will both enable sub-tasks and set their default project (possibly the project itself)") + # rating fields percentage_satisfaction_task = fields.Integer( compute='_compute_percentage_satisfaction_task', string="Happy % on Task", store=True, default=-1) @@ -295,6 +298,8 @@ class Project(models.Model): # Prevent double project creation self = self.with_context(mail_create_nosubscribe=True) project = super(Project, self).create(vals) + if not vals.get('subtask_project_id'): + project.subtask_project_id = project.id if project.privacy_visibility == 'portal' and project.partner_id: project.message_subscribe(project.partner_id.ids) return project @@ -508,6 +513,7 @@ class Task(models.Model): legend_normal = fields.Char(related='stage_id.legend_normal', string='Kanban Ongoing Explanation', readonly=True, related_sudo=False) parent_id = fields.Many2one('project.task', string='Parent Task', index=True) child_ids = fields.One2many('project.task', 'parent_id', string="Sub-tasks", context={'active_test': False}) + subtask_project_id = fields.Many2one('project.project', related="project_id.subtask_project_id", string='Sub-task Project', readonly=True) subtask_count = fields.Integer("Sub-task count", compute='_compute_subtask_count') email_from = fields.Char(string='Email', help="These people will receive email.", index=True) email_cc = fields.Char(string='Watchers Emails', help="""These email addresses will be added to the CC field of all inbound diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 7bb76b1af98..8d85df10b3d 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -139,6 +139,7 @@ + @@ -413,7 +414,7 @@