> I get the following error. 'WorkOrder' object has not attribute
> 'get_values'. Any ideas?
Try this:
def _pre_save(self):
lastid = get_values(fields=['id'])[-1]['id']
self.wonum = 'WO-'+lastid+1
Andreas
Hello:
I'm having a problem trying to convert something that works great on
the python interpreter into the model.
I need to set a property of a model before it is saved. This propery
is dependent on the primary key (serial) of the record. I tried first
to do it using _post_save() but the i
2 matches
Mail list logo