mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
26 lines
858 B
Diff
26 lines
858 B
Diff
OK: All Patches removed
|
|
|
|
[sale]
|
|
|
|
diff -r 5fae8484652f invoice.py
|
|
--- a/trytond/trytond/modules/sale/invoice.py Sat Nov 24 23:54:47 2018 +0100
|
|
+++ b/trytond/trytond/modules/sale/invoice.py Thu Oct 10 08:38:20 2019 +0200
|
|
@@ -108,12 +108,9 @@
|
|
@classmethod
|
|
@Workflow.transition('draft')
|
|
def draft(cls, invoices):
|
|
- Sale = Pool().get('sale.sale')
|
|
- sales = Sale.search([
|
|
- ('invoices', 'in', [i.id for i in invoices]),
|
|
- ])
|
|
- if sales and any(i.state == 'cancel' for i in invoices):
|
|
- cls.raise_user_error('reset_invoice_sale')
|
|
+ for invoice in invoices:
|
|
+ if invoice.sales and invoice.state == 'cancel':
|
|
+ cls.raise_user_error('reset_invoice_sale')
|
|
|
|
return super(Invoice, cls).draft(invoices)
|
|
|
|
Git diff not implented
|
|
OK: All Patches Applied
|