You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
584 B
19 lines
584 B
# -*- coding: utf-8 -*-
|
|
# This file is part of OpenERP. The COPYRIGHT file at the top level of
|
|
# this module contains the full copyright notices and license terms.
|
|
|
|
from openerp import models, api
|
|
|
|
|
|
class POSOrder(models.Model):
|
|
_inherit = "pos.order"
|
|
|
|
@api.model
|
|
def add_payment(self, order_id, data):
|
|
journal_id = data.get('journal')
|
|
if journal_id:
|
|
journal = self.env['account.journal'].browse(journal_id)
|
|
if journal.no_bank_statement:
|
|
return None
|
|
|
|
return super(POSOrder, self).add_payment(order_id, data)
|