Add patch to fix journal issue12271.diff
This commit is contained in:
parent
378b59f09f
commit
29ca6c612f
|
@ -0,0 +1,22 @@
|
|||
diff --git a/tryton/modules/account_invoice/invoice.py b/tryton/modules/account_invoice/invoice.py
|
||||
--- a/tryton/modules/account_invoice/invoice.py
|
||||
+++ b/tryton/modules/account_invoice/invoice.py
|
||||
@@ -514,11 +514,14 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
Journal = pool.get('account.journal')
|
||||
if self.state != 'draft':
|
||||
return self.journal
|
||||
+ journal_type = {
|
||||
+ 'out': 'revenue',
|
||||
+ 'in': 'expense',
|
||||
+ }.get(self.type)
|
||||
+ if self.journal and self.journal.type == journal_type:
|
||||
+ return self.journal
|
||||
pattern = pattern.copy() if pattern is not None else {}
|
||||
- pattern.setdefault('type', {
|
||||
- 'out': 'revenue',
|
||||
- 'in': 'expense',
|
||||
- }.get(self.type))
|
||||
+ pattern.setdefault('type', journal_type)
|
||||
return Journal.find(pattern)
|
||||
|
||||
@classmethod
|
4
series
4
series
|
@ -31,4 +31,6 @@ counterpart_party_payment_clearing.diff # [account_payment_clearing] Add the pos
|
|||
|
||||
issue11966.diff # [sao] Overlap label links in form view
|
||||
|
||||
issue12263-issue12239.diff # [account_invoice] Can't set invoice journal to null or other journal + Set invoice account only when changing party or dates
|
||||
#issue12263-issue12239.diff # [account_invoice] Can't set invoice journal to null or other journal + Set invoice account only when changing party or dates
|
||||
|
||||
issue12271.diff # [acocunt_invoice] Cannot change invoice journal
|
||||
|
|
Loading…
Reference in New Issue