diff --git a/account_commission/models/commission_settlement.py b/account_commission/models/commission_settlement.py index 1f36422e0..9aff08d02 100644 --- a/account_commission/models/commission_settlement.py +++ b/account_commission/models/commission_settlement.py @@ -93,7 +93,7 @@ def _prepare_invoice(self, journal, product, date=False): line_form.quantity = -1 if settlement.total < 0 else 1 line_form.price_unit = abs(settlement.total) # Put period string - partner = self.agent_id + partner = settlement.agent_id lang = self.env["res.lang"].search( [ (