Skip to content

Commit

Permalink
DOnar ptioritat als comprtes multicompany
Browse files Browse the repository at this point in the history
  • Loading branch information
eberloso committed Feb 2, 2024
1 parent a427ef6 commit 8dc71dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions poweremail_send_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ def _get_accounts(self, cr, uid, context=None):
)
logger = netsvc.Logger()

if template.enforce_from_account:
return [(template.enforce_from_account.id, '%s (%s)' % (template.enforce_from_account.name, template.enforce_from_account.email_id))]
elif template.enforce_from_account_by_company:
if template.enforce_from_account_by_company:
res = []
for account_for_company in template.enforce_from_account_by_company:
res.append(
(account_for_company.id, '%s (%s)' % (account_for_company.name, account_for_company.email_id))
)
return res
elif template.enforce_from_account:
return [(template.enforce_from_account.id, '%s (%s)' % (template.enforce_from_account.name, template.enforce_from_account.email_id))]
elif (context.get('from', False) and
isinstance(context.get('from'), int)):
# If account provided from context, check availability
Expand Down

0 comments on commit 8dc71dd

Please sign in to comment.