Make sure retrieved odoo users are active
This commit is contained in:
parent
dae5e7153b
commit
a3533ed651
1 changed files with 1 additions and 2 deletions
|
@ -127,10 +127,9 @@ def get_invoice_addresses(user):
|
|||
email = user.email
|
||||
or_conditions = [("email", "ilike", email)]
|
||||
|
||||
email = user if isinstance(user, str) else user.email
|
||||
odoo_users = CLIENT.search_read(
|
||||
model="res.users",
|
||||
domain=[("login", "=", email)],
|
||||
domain=[("login", "=", email), ("active", "=", True)],
|
||||
fields=["id"],
|
||||
limit=1,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue