Hello everybody,

I'm gonna try to express my use case and hope you can help me to achieve
this objective because i can't figure it out how i can resolve it.

1) I have a model of Products, with a lot of data for description, and
other stuff.
(Let me say, ID, Short Description, Long Description,Minimun Amount Of
Products Per Sale, Cost Price, Sale Price,
2) Then I have an other table (you can call it Sales), in this i need to
save data of Products (Descriptions, Measure of units, and other specific
data of my project)
(Let me say, ID, Short Description, Long Description, Sale Price, Date of
Sale, Number of Document, etc.) where Short and Long Description, and Sale
Price it's from Products model.

The Sales model DO NOT have to be related to Products with a Foreign key
because we use Sales as Historic model too. So i need to take the data from
Products and save it in Sales. So, I think that I can rewrite the method
"save" in Sales model.

But... In the Admin Site, in the Sales form, I need a dropdown box of
Products and when i choose one of them I need to populate the needed data
in the fields of the Sales form, where the user can (If he wish), for
example, add more text to Long Description field.

How I can put data of Products in the fields of Sales form without any
relationship to Products, and how i can populate the fields based on the
selected product??

Thanks in advance !!

Rafael E. Ferrero

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJJc_8VScv11s-cwRE%2BCFXn2oH-29KL12iUk-%2BJHzD6A3TgVhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to