Commit bf62eb38 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add a new attribute variant_category_list into Group.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@547 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c28953b2
...@@ -122,6 +122,7 @@ class Group(Implicit): ...@@ -122,6 +122,7 @@ class Group(Implicit):
self.resource_id = movement.getResourceId() self.resource_id = movement.getResourceId()
self.resource_title = movement.getResourceTitle() self.resource_title = movement.getResourceTitle()
self.variation_base_category_list = movement.getVariationBaseCategoryList() self.variation_base_category_list = movement.getVariationBaseCategoryList()
self.variation_category_list = []
# self.total_price = movement.getTotalPrice() # This is likely an error JPSforYO # self.total_price = movement.getTotalPrice() # This is likely an error JPSforYO
# self.total_quantity = movement.getTotalQuantity() # This is likely an error JPSforYO # self.total_quantity = movement.getTotalQuantity() # This is likely an error JPSforYO
self.total_price = 0.0 # No need to add twice since we add it in append self.total_price = 0.0 # No need to add twice since we add it in append
...@@ -147,6 +148,9 @@ class Group(Implicit): ...@@ -147,6 +148,9 @@ class Group(Implicit):
# ie. N deliveries result in M invoices (1 invoice per currency) # ie. N deliveries result in M invoices (1 invoice per currency)
#self.total_quantity += movement.getTotalQuantity() # This is likely an error JPSforYO #self.total_quantity += movement.getTotalQuantity() # This is likely an error JPSforYO
self.total_quantity += movement.getInventoriatedQuantity() self.total_quantity += movement.getInventoriatedQuantity()
for category in movement.getVariationCategoryList():
if category not in self.variation_category_list:
self.variation_category_list.append(category)
def finish(self): def finish(self):
# Make up a list of cell ranges for setCellRange. # Make up a list of cell ranges for setCellRange.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment