diff --git a/product/ERP5/Document/PaySheetTransaction.py b/product/ERP5/Document/PaySheetTransaction.py index 4e97f6464c95e415eeaaaa0a772e0e222c3b468c..3fcaa1db849a8d16bacbdf97ff2daf543dbd785b 100644 --- a/product/ERP5/Document/PaySheetTransaction.py +++ b/product/ERP5/Document/PaySheetTransaction.py @@ -487,24 +487,25 @@ class PaySheetTransaction(Invoice): quantity = cell_dict['quantity'] price = cell_dict['price'] - cell_list.append(cell_dict) - - # update the base_participation - base_participation_list = service.getBaseAmountList(base=1) - for base_participation in base_participation_list: - if quantity: - if base_amount_dict.has_key(base_participation) and \ - base_amount_dict[base_participation].has_key(share): - old_val = base_amount_dict[base_participation][share] - else: - old_val = 0 - new_val = old_val + quantity - if not base_amount_dict.has_key(base_participation): - base_amount_dict[base_participation]={} - - if price: - new_val = round((old_val + quantity*price), precision) - base_amount_dict[base_participation][share] = new_val + if quantity: + cell_list.append(cell_dict) + + # update the base_participation + base_participation_list = service.getBaseAmountList(base=1) + for base_participation in base_participation_list: + if quantity: + if base_amount_dict.has_key(base_participation) and \ + base_amount_dict[base_participation].has_key(share): + old_val = base_amount_dict[base_participation][share] + else: + old_val = 0 + new_val = old_val + quantity + if not base_amount_dict.has_key(base_participation): + base_amount_dict[base_participation]={} + + if price: + new_val = round((old_val + quantity*price), precision) + base_amount_dict[base_participation][share] = new_val if cell_list: # create the PaySheetLine @@ -558,7 +559,7 @@ class PaySheetTransaction(Invoice): id_list = model_reference_dict[key] model = self.getPortalObject().restrictedTraverse(key) if model is None: - LOG("copyInheritanceSubObjects,", 0, "can't find model %s" % key) + LOG("getInheritedObjectValueList :", 0, "can't find model %s" % key) for id in id_list: object = model._getOb(id)