Skip to content
Extraits de code Groupes Projets
Valider 8b17bcef rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[ADD]Add info invoice Conso

parent 16e37e0a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -249,7 +249,7 @@ class OperationsService(Component): ...@@ -249,7 +249,7 @@ class OperationsService(Component):
if type == "invoice" and invoice_exist: if type == "invoice" and invoice_exist:
datas["documents"] = ( datas["documents"] = (
acc_account_ids.mapped( acc_account_ids.sudo().mapped(
lambda n: { lambda n: {
"id": n.id, "id": n.id,
"name": n.name, "name": n.name,
...@@ -257,6 +257,8 @@ class OperationsService(Component): ...@@ -257,6 +257,8 @@ class OperationsService(Component):
"start_date": n.start_date, "start_date": n.start_date,
"end_date": n.end_date, "end_date": n.end_date,
"amount_total": n.amount_total, "amount_total": n.amount_total,
"consumer": n.consumer_id.name,
"prm_c": n.acc_delivery_id.name,
"url": base_url + n.get_portal_url(report_type="pdf"), "url": base_url + n.get_portal_url(report_type="pdf"),
} }
) )
...@@ -265,13 +267,14 @@ class OperationsService(Component): ...@@ -265,13 +267,14 @@ class OperationsService(Component):
) )
datas["factures_externes"] = ( datas["factures_externes"] = (
acc_contract_ids_f.mapped( acc_contract_ids_f.sudo().mapped(
lambda n: { lambda n: {
"id": n.id, "id": n.id,
"name": n.name, "name": n.name,
"start_date": n.start_date, "start_date": n.start_date,
"end_date": n.end_date, "end_date": n.end_date,
"type": n.type, "type": n.type,
"seller": n.seller_id.name,
"url": base_url + n.get_portal_url(), "url": base_url + n.get_portal_url(),
} }
) )
...@@ -776,6 +779,8 @@ class OperationsService(Component): ...@@ -776,6 +779,8 @@ class OperationsService(Component):
"end_date": {"type": "date", "nullable": True}, "end_date": {"type": "date", "nullable": True},
"amount_total": {"type": "float", "nullable": True}, "amount_total": {"type": "float", "nullable": True},
"url": {"type": "string", "nullable": True}, "url": {"type": "string", "nullable": True},
"consumer": {"type": "string", "nullable": True},
"prm_c": {"type": "string", "nullable": True},
}, },
}, },
}, },
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter