> I'm writing a bookkeeping system using Django latest code. I would
> like to make sure that when certain records are saved, changes are
> made to other records. For example, when I save a Sale model in the
> admin - or programmatic code - it may create (or update) a bunch of
> records in the general ledger tables. Overriding the model.save()
> method worked well up to a point.
>
> I have one model that uses inlines in a master-detail relationship.
> Think of Orders, and Lines within them. I enter an Order with 3
> Lines. Unfortunately, overriding Order.save() doesn't work, because
> when the save event fires, none of the lines have been saved or hooked
> up to it yet. post-save signals are no better.
>
> (Ugly workaround in admin: hit 'save and continue editing', then hit
> 'save'. The second time I save, the order rows exist)
>
> Can anyone suggest a strategy whereby, when an Order gets saved, I can
> hook into some event AFTER the related Lines have been saved?
Hi Andy.
Did you find a workaround for this? Or can anyone suggest something
now?
Thanks
Vinicius Massuchetto
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment