From 706221a2fad8c944665b64c3011943af54dfa5c1 Mon Sep 17 00:00:00 2001 From: houssine Date: Thu, 28 Feb 2019 17:42:23 +0100 Subject: [PATCH] [IMP] unit price was hard coded. Now it get the unit price from the subscription request --- easy_my_coop_export_xlsx/wizard/export_global_wizard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy_my_coop_export_xlsx/wizard/export_global_wizard.py b/easy_my_coop_export_xlsx/wizard/export_global_wizard.py index 5911f65..8fb7f7b 100644 --- a/easy_my_coop_export_xlsx/wizard/export_global_wizard.py +++ b/easy_my_coop_export_xlsx/wizard/export_global_wizard.py @@ -147,7 +147,7 @@ class export_global_report(models.TransientModel): quantity = int(sub_request.ordered_parts) worksheet1.write(j, i, quantity) i += 1 - amount = quantity * 250 + amount = quantity * sub_request.share_unit_price worksheet1.write(j, i, amount) i += 2 worksheet1.write(j, i, sub_request.date) @@ -222,7 +222,7 @@ class export_global_report(models.TransientModel): quantity = int(sub_request.ordered_parts) worksheet1bis.write(j, i, quantity) i += 1 - amount = quantity * 250 + amount = quantity * sub_request.share_unit_price worksheet1bis.write(j, i, amount) i += 2 worksheet1bis.write(j, i, sub_request.sync_date) @@ -247,7 +247,7 @@ class export_global_report(models.TransientModel): quantity = int(sub_request.ordered_parts) worksheet2.write(j, i, quantity) i += 1 - amount = quantity * 250 + amount = quantity * sub_request.share_unit_price worksheet2.write(j, i, amount) i += 1 worksheet2.write(j, i, sub_request.state)