Hi

   I have a small project and I have been unable to get the following 
statement to work. Any help would great.User inputs can either 
self_sale_head which is a $ value,if a $ value is not add a 
self.estimated_weight_hd is used to get the total weight, the code below 
should return a estimated_weight_total which can be used for the total sale 
price. All works when I add the estimated_weight_total manually. I am lost 
as why.

def calc_estimated_weight_total(self):
    if self.sale_head <= 0:
        amount = (self.number * self.estimated_weight_hd)
        return amount
def save(self):
    self.estimated_total_weight = self.calc_estimated_weight_total()
    super(SaleNote, self).save()



-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/70bb13fe-c61c-46b6-bd71-5ef2d8ada89a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to