From 3504529fb5d8b2fa8c6fce862e4979b3dbb43c64 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 5 Sep 2018 15:01:41 +0200 Subject: [PATCH] [FIX] sale: Server Error when trying to process card Due to this commit: b3676252487222e9f498f174d49cb870ef5d0ad3 The function "_get_payment_type" was not defined in module "sale_payment" but defined in "website_quote" The bridge module for "website_quote" and "sale_payment" is "sale" so the first definition of "_get_payment_type" must be in "sale". opw:1881990 --- addons/sale/models/sale.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index a32f251238c..38ef7123c62 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -112,6 +112,11 @@ class SaleOrder(models.Model): for order in self: order.order_line._compute_tax_id() + @api.multi + def _get_payment_type(self): + self.ensure_one() + return 'form' + name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, states={'draft': [('readonly', False)]}, index=True, default=lambda self: _('New')) origin = fields.Char(string='Source Document', help="Reference of the document that generated this sales order request.") client_order_ref = fields.Char(string='Customer Reference', copy=False)