Empty the transaction id of a sale order on copy

This commit is contained in:
Guewen Baconnier
2014-10-09 09:20:04 +02:00
parent 9228bb0a68
commit b09cdf8a80

View File

@@ -34,6 +34,13 @@ class SaleOrder(Model):
help="Transaction id from the financial institute"),
}
def copy_data(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default['transaction_id'] = False
_super = super(SaleOrder, self)
return _super.copy_data(cr, uid, id, default=default, context=context)
def _prepare_invoice(self, cr, uid, order, lines, context=None):
# we put the transaction id in the generated invoices
invoice_vals = super(SaleOrder, self)._prepare_invoice(