mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
Remove patch that changes behaviour of copy() as it should only be applied after copy action for xxx2Many fields.
This commit is contained in:
parent
5721ed313b
commit
d0013d6dbb
|
@ -1,32 +0,0 @@
|
||||||
Index: invoice.py
|
|
||||||
===================================================================
|
|
||||||
|
|
||||||
--- ./trytond/trytond/modules/account_invoice/invoice.py
|
|
||||||
+++ ./trytond/trytond/modules/account_invoice/invoice.py
|
|
||||||
@@ -1049,24 +1049,11 @@
|
|
||||||
default['invoice_report_cache'] = None
|
|
||||||
default['invoice_report_format'] = None
|
|
||||||
default['payment_lines'] = None
|
|
||||||
- default['lines'] = None
|
|
||||||
- default['taxes'] = None
|
|
||||||
default.setdefault('invoice_date', None)
|
|
||||||
default.setdefault('accounting_date', None)
|
|
||||||
default['lines_to_pay'] = None
|
|
||||||
default.setdefault('origin', None)
|
|
||||||
-
|
|
||||||
- new_invoices = []
|
|
||||||
- for invoice in invoices:
|
|
||||||
- new_invoice, = super(Invoice, cls).copy([invoice], default=default)
|
|
||||||
- Line.copy(invoice.lines, default={
|
|
||||||
- 'invoice': new_invoice.id,
|
|
||||||
- })
|
|
||||||
- Tax.copy(invoice.taxes, default={
|
|
||||||
- 'invoice': new_invoice.id,
|
|
||||||
- })
|
|
||||||
- new_invoices.append(new_invoice)
|
|
||||||
- return new_invoices
|
|
||||||
+ return super(Invoice, cls).copy(invoices, default=default)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def validate(cls, invoices):
|
|
||||||
|
|
Loading…
Reference in a new issue