From b09cdf8a8000938cd65797a98cdd7b20aad88e6c Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 9 Oct 2014 09:20:04 +0200 Subject: [PATCH] Empty the transaction id of a sale order on copy --- base_transaction_id/sale.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base_transaction_id/sale.py b/base_transaction_id/sale.py index ed18980e..398eb3c9 100644 --- a/base_transaction_id/sale.py +++ b/base_transaction_id/sale.py @@ -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(