[FIX] sale: Server Error when trying to process card

Due to this commit: b367625248
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
This commit is contained in:
Goffin Simon
2018-09-06 08:36:04 +02:00
parent 213759b03e
commit 3504529fb5
+5
View File
@@ -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)