Browse Source

[IMP] unit price was hard coded.

Now it get the unit price from the subscription request
pull/1/head
houssine 6 years ago
parent
commit
706221a2fa
  1. 6
      easy_my_coop_export_xlsx/wizard/export_global_wizard.py

6
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) quantity = int(sub_request.ordered_parts)
worksheet1.write(j, i, quantity) worksheet1.write(j, i, quantity)
i += 1 i += 1
amount = quantity * 250
amount = quantity * sub_request.share_unit_price
worksheet1.write(j, i, amount) worksheet1.write(j, i, amount)
i += 2 i += 2
worksheet1.write(j, i, sub_request.date) worksheet1.write(j, i, sub_request.date)
@ -222,7 +222,7 @@ class export_global_report(models.TransientModel):
quantity = int(sub_request.ordered_parts) quantity = int(sub_request.ordered_parts)
worksheet1bis.write(j, i, quantity) worksheet1bis.write(j, i, quantity)
i += 1 i += 1
amount = quantity * 250
amount = quantity * sub_request.share_unit_price
worksheet1bis.write(j, i, amount) worksheet1bis.write(j, i, amount)
i += 2 i += 2
worksheet1bis.write(j, i, sub_request.sync_date) worksheet1bis.write(j, i, sub_request.sync_date)
@ -247,7 +247,7 @@ class export_global_report(models.TransientModel):
quantity = int(sub_request.ordered_parts) quantity = int(sub_request.ordered_parts)
worksheet2.write(j, i, quantity) worksheet2.write(j, i, quantity)
i += 1 i += 1
amount = quantity * 250
amount = quantity * sub_request.share_unit_price
worksheet2.write(j, i, amount) worksheet2.write(j, i, amount)
i += 1 i += 1
worksheet2.write(j, i, sub_request.state) worksheet2.write(j, i, sub_request.state)

Loading…
Cancel
Save