def convert_amount(self, amount): if amount: f_amount = format_amount.manageSeparator(amount, digits=0, separator=' ') print f_amount return f_amount
def get_amount_rubrique(self, rubrique): # for id in range(len(obj)): line_ids = self.line_ids total = 0 for line in line_ids: if line.code == rubrique: total = line.total result = format_amount.manageSeparator(total) return result
def getAmountWithouDiscount(self): amount = 0 if self.order_line: for line in self.order_line: tmp = line.price_unit * line.product_uom_qty amount += tmp montant = format_amount.manageSeparator(amount, digits=0, separator=' ') return montant
def get_somme_rubrique(self, code): annee = self.date_to[2:4] for payslip in self: cpt = 0 for line in self.line_ids: if line.salary_rule_id.code == code and self.date_to >= self.date_to and payslip.date_to[ 2:4] == annee: cpt += line.total result = format_amount.manageSeparator(cpt) return result
def computeAmount(self, amount): amount = format_amount.manageSeparator(amount, digits=0, separator=' ') return amount