Changeset 721dadc in rattail
- Timestamp:
- 08/03/2022 11:12:44 AM (6 months ago)
- Branches:
- master
- Children:
- 68b3011
- Parents:
- 3a7d5a6
- Location:
- rattail
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
rattail/app.py
r3a7d5a6 r721dadc 245 245 session.delete(setting) 246 246 247 def touch_object(self, session, obj): 248 """ 249 Mark the given object as having been changed, such that the 250 datasync will pick it up and propagate the object to other 251 nodes. 252 253 Note that this is *minimal* logic; only the given object will 254 be "touched" in this way, i.e. no related records will be 255 touched. So if those also need it, you must call this method 256 for each related object separately. 257 """ 258 model = self.model 259 change = model.Change() 260 change.class_name = obj.__class__.__name__ 261 change.instance_uuid = obj.uuid 262 change = session.merge(change) 263 change.deleted = False 264 247 265 def get_active_stores(self, session, **kwargs): 248 266 """ -
rattail/employment.py
r3a7d5a6 r721dadc 3 3 # 4 4 # Rattail -- Retail Software Framework 5 # Copyright © 2010-202 1Lance Edgar5 # Copyright © 2010-2022 Lance Edgar 6 6 # 7 7 # This file is part of Rattail. … … 37 37 Base class and default implementation for employment handlers. 38 38 """ 39 40 def touch_employee(self, session, employee): 41 self.app.touch_object(session, employee) 42 self.app.touch_object(session, employee.person) 43 44 for email in employee.emails: 45 self.app.touch_object(session, email) 46 47 for phone in employee.phones: 48 self.app.touch_object(session, phone) 49 50 for store in employee._stores: 51 self.app.touch_object(session, store) 52 53 for department in employee._departments: 54 self.app.touch_object(session, department) 39 55 40 56 def begin_employment(self, person, start_date, **kwargs):
Note: See TracChangeset
for help on using the changeset viewer.