diff --git a/models/acc_contract.py b/models/acc_contract.py index 78e8f1ec0e3328961deb3e33737f74b6094343d9..f988efe746f1b49bf8f34e2722140884cef0509e 100644 --- a/models/acc_contract.py +++ b/models/acc_contract.py @@ -55,7 +55,7 @@ class AccContract(models.Model): for doc in docs: operation_id = doc.acc_operation_id - if doc.seller_id: + if doc.seller_id and not doc.seller_id.is_pmo: user_seller = self.env["res.users"].search( [("partner_id", "=", doc.seller_id.id)] ) @@ -67,7 +67,7 @@ class AccContract(models.Model): template.with_context( operation_id=operation_id.description ).send_mail(doc.seller_id.id, force_send=True) - if doc.buyer_id: + if doc.buyer_id and not doc.buyer_id.is_pmo: user_buyer = self.env["res.users"].search( [("partner_id", "=", doc.buyer_id.id)] )