diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 624a60bab11..3016dfa68c2 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -109,7 +109,7 @@ class AccountInvoiceReport(models.Model): 1 AS nbr, ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id, ai.partner_bank_id, - SUM ((invoice_type.sign * ail.quantity) / u.factor * u2.factor) AS product_qty, + SUM ((invoice_type.sign_qty * ail.quantity) / u.factor * u2.factor) AS product_qty, SUM(ail.price_subtotal_signed * invoice_type.sign) AS price_total, SUM(ABS(ail.price_subtotal_signed)) / CASE WHEN SUM(ail.quantity / u.factor * u2.factor) <> 0::numeric @@ -119,7 +119,7 @@ class AccountInvoiceReport(models.Model): ai.residual_company_signed / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) * count(*) * invoice_type.sign AS residual, ai.commercial_partner_id as commercial_partner_id, - partner.country_id + coalesce(partner.country_id, partner_ai.country_id) AS country_id """ return select_str @@ -128,6 +128,7 @@ class AccountInvoiceReport(models.Model): FROM account_invoice_line ail JOIN account_invoice ai ON ai.id = ail.invoice_id JOIN res_partner partner ON ai.commercial_partner_id = partner.id + JOIN res_partner partner_ai ON ai.partner_id = partner_ai.id LEFT JOIN product_product pr ON pr.id = ail.product_id left JOIN product_template pt ON pt.id = pr.product_tmpl_id LEFT JOIN uom_uom u ON u.id = ail.uom_id @@ -138,7 +139,11 @@ class AccountInvoiceReport(models.Model): WHEN ai.type::text = ANY (ARRAY['in_refund'::character varying::text, 'in_invoice'::character varying::text]) THEN -1 ELSE 1 - END) AS sign + END) AS sign,(CASE + WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text]) + THEN -1 + ELSE 1 + END) AS sign_qty FROM account_invoice ai ) AS invoice_type ON invoice_type.id = ai.id """ @@ -150,7 +155,7 @@ class AccountInvoiceReport(models.Model): ai.partner_id, ai.payment_term_id, u2.name, u2.id, ai.currency_id, ai.journal_id, ai.fiscal_position_id, ai.user_id, ai.company_id, ai.type, invoice_type.sign, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual_company_signed, - ai.amount_total_company_signed, ai.commercial_partner_id, partner.country_id + ai.amount_total_company_signed, ai.commercial_partner_id, coalesce(partner.country_id, partner_ai.country_id) """ return group_by_str diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index b8d2b8dd9c5..08256402b0d 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -874,8 +874,14 @@ var StatementModel = BasicModel.extend({ } } }); - total = Math.round(total*1000)/1000 || 0; - amount_currency = Math.round(amount_currency); + var company_currency = session.get_currency(line.st_line.currency_id); + var company_precision = company_currency && company_currency.digits[1] || 2; + total = utils.round_precision(total*1000, company_precision)/1000 || 0; + if(isOtherCurrencyId){ + var other_currency = session.get_currency(isOtherCurrencyId); + var other_precision = other_currency && other_currency.digits[1] || 2; + amount_currency = utils.round_precision(amount_currency, other_precision) + } line.balance = { amount: total, amount_str: field_utils.format.monetary(Math.abs(total), {}, formatOptions), diff --git a/addons/account_payment/models/payment.py b/addons/account_payment/models/payment.py index cfc90258289..4e00fce7054 100644 --- a/addons/account_payment/models/payment.py +++ b/addons/account_payment/models/payment.py @@ -50,7 +50,7 @@ class PaymentTransaction(models.Model): if not s2s_result or self.state != valid_state: _logger.warning( _("<%s> transaction (%s) invalid state : %s") % - (self.acquirer_id.provider, self.id, self.state_mesage)) + (self.acquirer_id.provider, self.id, self.state_message)) return 'pay_invoice_tx_state' try: diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index 8d95dada86c..713a208e7c2 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -1760,8 +1760,6 @@ class Meeting(models.Model): def _fix_rrule(self, values): rule_str = values.get('rrule') if rule_str: - rule = rrule.rrulestr(rule_str) - if not rule._until and not rule._count: - rule._count = 100 - rule_str = str(rule).split('RRULE:')[-1] + if 'UNTIL' not in rule_str and 'COUNT' not in rule_str: + rule_str += ';COUNT=100' return rule_str diff --git a/addons/delivery/models/delivery_carrier.py b/addons/delivery/models/delivery_carrier.py index dafb0e484b4..2644163e5e3 100644 --- a/addons/delivery/models/delivery_carrier.py +++ b/addons/delivery/models/delivery_carrier.py @@ -210,6 +210,12 @@ class DeliveryCarrier(models.Model): carrier.product_id.list_price = carrier.fixed_price def fixed_rate_shipment(self, order): + carrier = self._match_address(order.partner_shipping_id) + if not carrier: + return {'success': False, + 'price': 0.0, + 'error_message': _('Error: this delivery method is not available for this address.'), + 'warning_message': False} price = self.fixed_price if self.company_id.currency_id.id != order.currency_id.id: price = self.env['res.currency']._compute(self.company_id.currency_id, order.currency_id, price) diff --git a/addons/delivery/models/delivery_grid.py b/addons/delivery/models/delivery_grid.py index dddc300dfe2..5779684c8c0 100644 --- a/addons/delivery/models/delivery_grid.py +++ b/addons/delivery/models/delivery_grid.py @@ -47,7 +47,7 @@ class ProviderGrid(models.Model): if not carrier: return {'success': False, 'price': 0.0, - 'error_message': _('Error: no matching grid.'), + 'error_message': _('Error: this delivery method is not available for this address.'), 'warning_message': False} try: diff --git a/addons/hr_attendance/static/src/js/my_attendances.js b/addons/hr_attendance/static/src/js/my_attendances.js index 4a19b2b9b28..2e87833bfa1 100644 --- a/addons/hr_attendance/static/src/js/my_attendances.js +++ b/addons/hr_attendance/static/src/js/my_attendances.js @@ -25,12 +25,12 @@ var MyAttendances = AbstractAction.extend({ args: [[['user_id', '=', this.getSession().uid]], ['attendance_state', 'name']], }) .then(function (res) { - if (_.isEmpty(res) ) { - self.$('.o_hr_attendance_employee').append(_t("Error : Could not find employee linked to user")); - return; - } self.employee = res[0]; self.$el.html(QWeb.render("HrAttendanceMyMainMenu", {widget: self})); + if (_.isEmpty(res) ) { + return; + } + }); return $.when(def, this._super.apply(this, arguments)); diff --git a/addons/hr_gamification/wizard/gamification_badge_user_wizard.py b/addons/hr_gamification/wizard/gamification_badge_user_wizard.py index a2feb024688..5bbb6848bd3 100644 --- a/addons/hr_gamification/wizard/gamification_badge_user_wizard.py +++ b/addons/hr_gamification/wizard/gamification_badge_user_wizard.py @@ -2,14 +2,27 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ -from odoo.exceptions import UserError +from odoo.exceptions import UserError, AccessError class GamificationBadgeUserWizard(models.TransientModel): _inherit = 'gamification.badge.user.wizard' employee_id = fields.Many2one('hr.employee', string='Employee', required=True) - user_id = fields.Many2one('res.users', string='User', related='employee_id.user_id', store=True) + user_id = fields.Many2one('res.users', string='User', + related='employee_id.user_id', store=True, readonly=True) + + # TODO 12.0/master remove this hack by changing the model + @api.model + def create(self, values): + employee = self.env['hr.employee'].browse(values['employee_id']) + values['user_id'] = employee.user_id.id + try: + return super(GamificationBadgeUserWizard, self).create(values) + except AccessError: + # an employee can not write on another employee + # force sudo because of related + return super(GamificationBadgeUserWizard, self.sudo()).create(values) @api.multi def action_grant_badge(self): diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml index 0d5664d6142..dba4df12325 100644 --- a/addons/hr_recruitment/views/hr_recruitment_views.xml +++ b/addons/hr_recruitment/views/hr_recruitment_views.xml @@ -855,7 +855,7 @@ - + diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index ccc13c433c1..24a8466218d 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -70,7 +70,7 @@ - + diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 6ba6c1ff62a..d5845003de2 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -58,7 +58,7 @@ index_template = """

%s

- The PosBox software installed on this posbox is version 17 BETA, + The PosBox software installed on this posbox is version 17, the posbox version number is independent from Odoo. You can upgrade the software on the upgrade page.

diff --git a/addons/l10n_th/data/l10n_th_chart_data.xml b/addons/l10n_th/data/l10n_th_chart_data.xml index 94c094695f8..95cfd8d09ef 100644 --- a/addons/l10n_th/data/l10n_th_chart_data.xml +++ b/addons/l10n_th/data/l10n_th_chart_data.xml @@ -361,7 +361,7 @@ Company Withholding Tax 1% (Transportation) percent - + purchase @@ -373,7 +373,7 @@ Company Withholding Tax 2% (Advertising) percent - + purchase @@ -385,7 +385,7 @@ Company Withholding Tax 3% (Service) percent - + purchase @@ -397,7 +397,7 @@ Company Withholding Tax 5% (Rental) percent - + purchase @@ -409,7 +409,7 @@ Personal Withholding Tax 1% (Transportation) percent - + purchase @@ -421,7 +421,7 @@ Personal Withholding Tax 2% (Advertising) percent - + purchase @@ -433,7 +433,7 @@ Personal Withholding Tax 3% (Service) percent - + purchase @@ -445,7 +445,7 @@ Personal Withholding Tax 5% (Rental) percent - + purchase @@ -457,7 +457,7 @@ Withholding Income Tax 1% (Transportation) percent - + sale @@ -468,7 +468,7 @@ Withholding Income Tax 2% (Advertising) percent - + sale @@ -479,7 +479,7 @@ Withholding Income Tax 3% (Service) percent - + sale @@ -490,7 +490,7 @@ Withholding Income Tax 5% (Rental) percent - + sale diff --git a/addons/mail/models/mail_activity.py b/addons/mail/models/mail_activity.py index 3656f7e64e8..33c4b76d79d 100644 --- a/addons/mail/models/mail_activity.py +++ b/addons/mail/models/mail_activity.py @@ -146,7 +146,13 @@ class MailActivity(models.Model): def _onchange_activity_type_id(self): if self.activity_type_id: self.summary = self.activity_type_id.summary - self.date_deadline = (datetime.now() + timedelta(days=self.activity_type_id.days)) + tz = self.user_id.sudo().tz + if tz: + today_utc = pytz.UTC.localize(datetime.utcnow()) + today = today_utc.astimezone(pytz.timezone(tz)) + else: + today = datetime.now() + self.date_deadline = (today + timedelta(days=self.activity_type_id.days)) @api.onchange('previous_activity_type_id') def _onchange_previous_activity_type_id(self): diff --git a/addons/mass_mailing_event/models/event.py b/addons/mass_mailing_event/models/event.py index be37000e6f2..16b9c066862 100644 --- a/addons/mass_mailing_event/models/event.py +++ b/addons/mass_mailing_event/models/event.py @@ -8,6 +8,10 @@ class Event(models.Model): _inherit = "event.event" def action_mass_mailing_attendees(self): + if len(self) == 1: + domain = "[('event_id', '=', {})]".format(self.id) + else: + domain = "[('event_id', 'in', {})]".format(self.ids) mass_mailing_action = dict( name='Mass Mail Attendees', type='ir.actions.act_window', @@ -17,7 +21,7 @@ class Event(models.Model): target='current', context=dict( default_mailing_model_id=self.env.ref('event.model_event_registration').id, - default_mailing_domain="[('event_id', 'in', %s)]" % self.ids, # , ('state', 'in', ['draft', 'open', 'done']) + default_mailing_domain=domain, ), ) - return mass_mailing_action \ No newline at end of file + return mass_mailing_action diff --git a/addons/mrp/views/mrp_workorder_views.xml b/addons/mrp/views/mrp_workorder_views.xml index 3fbb2ab111a..815034fff7c 100644 --- a/addons/mrp/views/mrp_workorder_views.xml +++ b/addons/mrp/views/mrp_workorder_views.xml @@ -155,7 +155,7 @@ - + diff --git a/addons/mrp/wizard/mrp_product_produce.py b/addons/mrp/wizard/mrp_product_produce.py index 37e85825cdd..dfd4c9a268d 100644 --- a/addons/mrp/wizard/mrp_product_produce.py +++ b/addons/mrp/wizard/mrp_product_produce.py @@ -103,7 +103,7 @@ class MrpProductProduce(models.TransientModel): elif len(move._get_move_lines()) < 2: move.quantity_done += float_round(quantity * move.unit_factor, precision_rounding=rounding) else: - self._set_quantity_done(move, quantity * move.unit_factor) + move._set_quantity_done(quantity * move.unit_factor) for move in self.production_id.move_finished_ids: if move.product_id.tracking == 'none' and move.state not in ('done', 'cancel'): rounding = move.product_uom.rounding @@ -120,40 +120,6 @@ class MrpProductProduce(models.TransientModel): }) return {'type': 'ir.actions.act_window_close'} - def _set_quantity_done(self, move, qty): - """ - Set the given quantity as quantity done on the move through the move lines. The method is - able to handle move lines with a different UoM than the move (but honestly, this would be - looking for trouble...). - @param move: stock.move - @param qty: quantity in the UoM of move.product_uom - """ - for ml in move.move_line_ids: - # Convert move line qty into move uom - ml_qty = ml.product_uom_qty - ml.qty_done - if ml.product_uom_id != move.product_uom: - ml_qty = ml.product_uom_id._compute_quantity(ml_qty, move.product_uom, round=False) - - taken_qty = min(qty, ml_qty) - # Convert taken qty into move line uom - if ml.product_uom_id != move.product_uom: - taken_qty = move.product_uom._compute_quantity(ml_qty, ml.product_uom_id, round=False) - - # Assign qty_done and explicitly round to make sure there is no inconsistency between - # ml.qty_done and qty. - taken_qty = float_round(taken_qty, precision_rounding=ml.product_uom_id.rounding) - ml.qty_done += taken_qty - if ml.product_uom_id != move.product_uom: - taken_qty = ml.product_uom_id._compute_quantity(ml_qty, move.product_uom, round=False) - qty -= taken_qty - - if float_compare(qty, 0.0, precision_rounding=move.product_uom.rounding) <= 0: - break - if float_compare(qty, 0.0, precision_rounding=move.product_uom.rounding) > 0: - vals = move._prepare_move_line_vals(quantity=0) - vals['qty_done'] = qty - ml = self.env['stock.move.line'].create(vals) - @api.multi def check_finished_move_lots(self): produce_move = self.production_id.move_finished_ids.filtered(lambda x: x.product_id == self.product_id and x.state not in ('done', 'cancel')) diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index 138c270e35d..ba5a14f7edd 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -7,7 +7,7 @@ from uuid import uuid4 import pprint import logging -from odoo import _ +from odoo.addons.payment.models.payment_acquirer import _partner_split_name from odoo.exceptions import ValidationError, UserError from odoo import _ @@ -153,6 +153,12 @@ class AuthorizeAPI(): payment_profile = etree.SubElement(profile, "paymentProfiles") etree.SubElement(payment_profile, "customerType").text = 'business' if partner.is_company else 'individual' billTo = etree.SubElement(payment_profile, "billTo") + if partner.is_company: + etree.SubElement(billTo, "firstName").text = ' ' + etree.SubElement(billTo, "lastName").text = partner.name + else: + etree.SubElement(billTo, "firstName").text = _partner_split_name(partner.name)[0] + etree.SubElement(billTo, "lastName").text = _partner_split_name(partner.name)[1] etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None missing_fields = [partner._fields[field].string for field in ['city', 'country_id'] if not partner[field]] diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 4bca599d908..00f19a70b84 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -824,7 +824,10 @@ class PosOrder(models.Model): 'lot_id': lot_id, }) if not pack_lots and not float_is_zero(qty_done, precision_rounding=move.product_uom.rounding): - move.quantity_done = qty_done + if len(move._get_move_lines()) < 2: + move.quantity_done = qty_done + else: + move._set_quantity_done(qty_done) return has_wrong_lots def _prepare_bank_statement_line_payment_values(self, data): diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 91e234dafc5..df20d976efd 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1238,6 +1238,15 @@ exports.Product = Backbone.Model.extend({ var self = this; var date = moment().startOf('day'); + // In case of nested pricelists, it is necessary that all pricelists are made available in + // the POS. Display a basic alert to the user in this case. + if (pricelist === undefined) { + alert(_t( + 'An error occurred when loading product prices. ' + + 'Make sure all pricelists are available in the POS.' + )); + } + var category_ids = []; var category = this.categ; while (category) { diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 95a7555e5d2..bb6e5a1f1cf 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1547,7 +1547,12 @@ var ReceiptScreenWidget = ScreenWidget.extend({ }; }, print_web: function() { - window.print(); + if($.browser.safari){ + document.execCommand('print', false, null); + } + else{ + window.print(); + } this.pos.get_order()._printed = true; }, print_xml: function() { diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml index 314b8030d82..dd98a420ed4 100644 --- a/addons/point_of_sale/views/pos_config_view.xml +++ b/addons/point_of_sale/views/pos_config_view.xml @@ -391,7 +391,7 @@ -
+
@@ -400,7 +400,7 @@
Print receipts automatically once the payment is registered
-
+
Skip Preview Screen
diff --git a/addons/pos_sale/models/crm_team.py b/addons/pos_sale/models/crm_team.py index ffbfcd026c6..b8ed1c48710 100644 --- a/addons/pos_sale/models/crm_team.py +++ b/addons/pos_sale/models/crm_team.py @@ -77,7 +77,7 @@ class CrmTeam(models.Model): for data_point in order_data: result.append({'x_value': data_point.get('user_id')[0], 'y_value': data_point.get('price_total')}) - else: + elif self.dashboard_graph_group_pos in ['day', 'week', 'month']: # locale en_GB is used to be able to obtain the datetime from the string returned by read_group # /!\ do not use en_US as it's not ISO-standard and does not match datetime's library order_data = self.env['report.pos.order'].with_context(lang='en_GB').read_group( diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py index 2e0f8528076..1ea74c36da4 100644 --- a/addons/project/controllers/portal.py +++ b/addons/project/controllers/portal.py @@ -104,7 +104,16 @@ class CustomerPortal(CustomerPortal): } # extends filterby criteria with project (criteria name is the project id) # Note: portal users can't view projects they don't follow - projects = request.env['project.project'].sudo().search([('privacy_visibility', '=', 'portal')]) + partner = request.env.user.partner_id + domain_projects = [ + '&', + ('privacy_visibility', '=', 'portal'), + '|', + ('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]), + ('task_ids.message_partner_ids', 'child_of', [partner.commercial_partner_id.id]) + ] + + projects = request.env['project.project'].sudo().search(domain_projects) domain = [('project_id', 'in', projects.ids)] for proj in projects: searchbar_filters.update({ diff --git a/addons/project/models/project.py b/addons/project/models/project.py index c4121bb8b58..3b3030b26e4 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -531,7 +531,7 @@ class Task(models.Model): def _compute_attachment_ids(self): for task in self: attachment_ids = self.env['ir.attachment'].search([('res_id', '=', task.id), ('res_model', '=', 'project.task')]).ids - message_attachment_ids = self.mapped('message_ids.attachment_ids').ids # from mail_thread + message_attachment_ids = task.mapped('message_ids.attachment_ids').ids # from mail_thread task.attachment_ids = list(set(attachment_ids) - set(message_attachment_ids)) @api.multi diff --git a/addons/purchase/models/account_invoice.py b/addons/purchase/models/account_invoice.py index 25225bdc8f6..f8c36aeed09 100644 --- a/addons/purchase/models/account_invoice.py +++ b/addons/purchase/models/account_invoice.py @@ -107,6 +107,7 @@ class AccountInvoice(models.Model): purchase_ids = self.invoice_line_ids.mapped('purchase_id') if purchase_ids: self.origin = ', '.join(purchase_ids.mapped('name')) + self.reference = ', '.join(purchase_ids.filtered('partner_ref').mapped('partner_ref')) or self.reference @api.onchange('partner_id', 'company_id') def _onchange_partner_id(self): diff --git a/addons/sale/models/analytic.py b/addons/sale/models/analytic.py index 3a49bdee295..8cb0384df6b 100644 --- a/addons/sale/models/analytic.py +++ b/addons/sale/models/analytic.py @@ -107,7 +107,14 @@ class AccountAnalyticLine(models.Model): continue if sale_order.state != 'sale': - raise UserError(_('The Sales Order %s linked to the Analytic Account must be validated before registering expenses.') % sale_order.name) + message_unconfirmed = _('The Sales Order %s linked to the Analytic Account %s must be validated before registering expenses.') + messages = { + 'draft': message_unconfirmed, + 'sent': message_unconfirmed, + 'done': _('The Sales Order %s linked to the Analytic Account %s is currently locked. You cannot register an expense on a locked Sales Order. Please create a new SO linked to this Analytic Account.'), + 'cancel': _('The Sales Order %s linked to the Analytic Account %s is cancelled. You cannot register an expense on a cancelled Sales Order.'), + } + raise UserError(messages[sale_order.state] % (sale_order.name, analytic_line.account_id.name)) so_line = None price = analytic_line._sale_get_invoice_price(sale_order) diff --git a/addons/sale_payment/controllers/payment.py b/addons/sale_payment/controllers/payment.py index 01c7c2241de..db94060df40 100644 --- a/addons/sale_payment/controllers/payment.py +++ b/addons/sale_payment/controllers/payment.py @@ -27,6 +27,9 @@ class PaymentPortal(http.Controller): except: return False + # we check if the order need to create a payment token + save_token = save_token or order_sudo._get_payment_type() == "form_save" + if request.env.user == request.env.ref('base.public_user'): save_token = False diff --git a/addons/sale_stock/report/stock_report_deliveryslip.xml b/addons/sale_stock/report/stock_report_deliveryslip.xml index ea8ca1c0612..893b898fa3c 100644 --- a/addons/sale_stock/report/stock_report_deliveryslip.xml +++ b/addons/sale_stock/report/stock_report_deliveryslip.xml @@ -2,10 +2,10 @@