Remove create_invoice_credit_with_refund patch

This commit is contained in:
Raimon Esteve 2020-11-30 10:56:20 +01:00
parent 43701f266d
commit 85b7351c6b
2 changed files with 0 additions and 28 deletions

View File

@ -1,27 +0,0 @@
diff -r a79db218f578 invoice.py
--- a/trytond/trytond/modules/account_invoice/invoice.py Mon Jun 10 19:14:56 2019 +0200
+++ b/trytond/trytond/modules/account_invoice/invoice.py Sat Jul 13 10:00:36 2019 +0200
@@ -1306,6 +1306,8 @@
Credit invoices and return ids of new invoices.
Return the list of new invoice
'''
+ MoveLine = Pool().get('account.move.line')
+
new_invoices = [i._credit() for i in invoices]
cls.save(new_invoices)
cls.update_taxes(new_invoices)
@@ -1317,9 +1319,11 @@
gettext('account_invoice'
'.msg_invoice_credit_refund_not_posted',
invoice=invoice.rec_name))
- invoice.cancel_move = new_invoice.move
- cls.save(invoices)
- cls.cancel(invoices)
+ if new_invoice.state == 'posted':
+ MoveLine.reconcile([l for l in invoice.lines_to_pay
+ if not l.reconciliation] +
+ [l for l in new_invoice.lines_to_pay
+ if not l.reconciliation])
return new_invoices
@classmethod

1
series
View File

@ -10,7 +10,6 @@ issue3932.diff # [account] rule account move and account move line by company
issue6253.diff # [account_invoice] add invoice type criteria
issue4506.diff # [account_invoice] Add credit invoices keyword from account.invoice
issue8479.diff # [account_invoice] missing invoice payment method rule by company
create_invoice_credit_with_refund.diff # [account_invoice] revert the creation of a credit invoice whith refund change. reconcile the 2 invoices, not cancell the origin one.
issue8618.diff # [account_invoice] Allow changing amount in manual invoice taxes
issue9032.diff # [account_invoice_stock] Skip sum quantity of cancelled invoices