Skip to content

Commit

Permalink
[IMP] Add some clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Sep 3, 2024
1 parent e624cbe commit 9e9498a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions argocd_sale/models/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ def _prepare_account_move_line_stat_product(
lambda l: date_from < l.date.date() < date_to
).mapped("value")
if stats:
quantity = max(stats)
quantity = max(
stats
) # TODO: Make configurable also what the policy should be if there's no stats found
return {
"product_id": stat_product.id,
"name": "> %s" % stat_product.name,
"name": "> %s" % stat_product.name, # TODO: Improve layout
"quantity": quantity,
"price_unit": stat_product.list_price,
"tax_ids": [Command.set(stat_product.taxes_id.ids)],
Expand All @@ -149,7 +151,7 @@ def _prepare_account_move(self, line_ids):
interval = int(self.template_id.recurring_interval)
recurring_previous_date = self.recurring_next_date - relativedelta(
**{type_interval: interval}
)
) # TODO: Add this as a field in sale.subscription instead

additional_invoice_line_ids = []
for line in self.sale_subscription_line_ids.filtered(
Expand Down

0 comments on commit 9e9498a

Please sign in to comment.