perf: reduce initial loyalty member load limit from 100 to 30 to improve POS startup speed
This commit is contained in:
parent
21425a5cbf
commit
afc702cdf8
@ -22,10 +22,10 @@ class ResPartner(models.Model):
|
||||
@api.model
|
||||
def _load_pos_data_domain(self, data, config):
|
||||
domain = super()._load_pos_data_domain(data, config)
|
||||
# Limit initial load of extra loyalty members to 100 to ensure fast POS startup (1-2 seconds)
|
||||
# Limit initial load of extra loyalty members to 30 to ensure fast POS startup (1-2 seconds)
|
||||
loyalty_members = self.search(
|
||||
[('is_company', '=', False), ('loyalty_card_ids', '!=', False)],
|
||||
limit=100,
|
||||
limit=30,
|
||||
order='write_date desc'
|
||||
)
|
||||
return ['|'] + domain + [('id', 'in', loyalty_members.ids)]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user