Use instance to create credit note

issue6806
review43541002
This commit is contained in:
Cédric Krier committed 2017-10-06 13:59:37 +02:00
1 parent 99a59074c1
commit b20e2ba4d3
1 file changed
+3 -3
+3 -3
View File
@@ -99,9 +99,9 @@ class Invoice:
Commission.save(to_save)
def _credit(self):
values = super(Invoice, self)._credit()
values['agent'] = self.agent.id if self.agent else None
return values
credit = super(Invoice, self)._credit()
credit.agent = self.agent
return credit
class InvoiceLine: