Require fresh session to post invoice

issue7568
review51471002
This commit is contained in:
Cédric Krier committed 2018-08-26 18:06:56 +02:00
1 parent 648ff41e95
commit aa232ecf0e
1 file changed
+5
+5
View File
@@ -317,6 +317,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
'depends': ['state'],
},
})
cls.__rpc__.update({
'post': RPC(
readonly=False, instantiate=0, fresh_session=True),
})
@classmethod
def __register__(cls, module_name):
@@ -2548,6 +2552,7 @@ class PayInvoice(Wizard):
'create a partial payment with an amount greater than the '
'amount to pay.'),
})
cls.__rpc__['create'].fresh_session = True
def get_reconcile_lines_for_amount(self, invoice, amount):
if invoice.type == 'in':