Skip to content
Snippets Groups Projects
Commit 3cf62e5c authored by Juliana's avatar Juliana
Browse files

[UPD]Mail on contract creation sent to non pmo user

parent 639035f6
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ class AccContract(models.Model): ...@@ -55,7 +55,7 @@ class AccContract(models.Model):
for doc in docs: for doc in docs:
operation_id = doc.acc_operation_id 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( user_seller = self.env["res.users"].search(
[("partner_id", "=", doc.seller_id.id)] [("partner_id", "=", doc.seller_id.id)]
) )
...@@ -67,7 +67,7 @@ class AccContract(models.Model): ...@@ -67,7 +67,7 @@ class AccContract(models.Model):
template.with_context( template.with_context(
operation_id=operation_id.description operation_id=operation_id.description
).send_mail(doc.seller_id.id, force_send=True) ).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( user_buyer = self.env["res.users"].search(
[("partner_id", "=", doc.buyer_id.id)] [("partner_id", "=", doc.buyer_id.id)]
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment