Skip to content

Commit

Permalink
Replace Model search by model to name
Browse files Browse the repository at this point in the history
  • Loading branch information
raimonesteve committed Feb 6, 2025
1 parent c228ace commit 817dd7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions account.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def check_owners(cls, accounts):
model_name, field_name = value
Model = pool.get(model_name)
records = Model.search([(field_name, 'in', account_ids)])
model, = IrModel.search([('model', '=', model_name)])
model, = IrModel.search([('name', '=', model_name)])
field, = Field.search([
('model.model', '=', model_name),
('model.name', '=', model_name),
('name', '=', field_name),
], limit=1)
for record in records:
Expand Down

0 comments on commit 817dd7d

Please sign in to comment.