diff --git a/som_generationkwh/investment.py b/som_generationkwh/investment.py index 4cd763c5..3e4ef416 100644 --- a/som_generationkwh/investment.py +++ b/som_generationkwh/investment.py @@ -1327,10 +1327,14 @@ def create_initial_invoices(self,cursor,uid, investment_ids, context=None): date_invoice = str(date.today()) tpv_payment = context.get('tpv_payment', False) - # The payment type TODO: change when tpv_payment? - payment_type_id = PaymentType.search(cursor, uid, [ - ('code', '=', 'RECIBO_CSB'), - ])[0] + if tpv_payment: + payment_type_id = PaymentType.search(cursor, uid, [ + ('code', '=', 'TPV'), + ])[0] + else: + payment_type_id = PaymentType.search(cursor, uid, [ + ('code', '=', 'RECIBO_CSB'), + ])[0] errors = [] def error(message): @@ -1478,6 +1482,7 @@ def invoices_to_payment_order(self,cursor,uid,invoice_ids, payment_mode_name): True) Invoice.afegeix_a_remesa(cursor,uid,invoice_ids, order_id) + def investment_payment(self,cursor,uid,investment_ids): """ Creates the invoices, open them and add the current payment order. diff --git a/som_generationkwh/som_generationkwh_data.xml b/som_generationkwh/som_generationkwh_data.xml index 1d71d950..d681781c 100644 --- a/som_generationkwh/som_generationkwh_data.xml +++ b/som_generationkwh/som_generationkwh_data.xml @@ -2273,5 +2273,32 @@ ${text_legal} Decimal definit amb punt. Exemple: "1.5" + + + + + + + + + TPVSOCI + + + + + cash + + + + + + + + Factures TPV Quota Soci + + +