Skip to content

Commit

Permalink
[IMP] account_move_cutoff: improve settings exposing default cutoff m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
petrus-v committed Sep 23, 2024
1 parent ec6e843 commit 95bca13
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
15 changes: 15 additions & 0 deletions account_move_cutoff/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,18 @@ class ResConfigSettings(models.TransientModel):
config_parameter="account_move_cutoff.link_product",
help="Link product on deferred account.move.line.",
)
default_cutoff_method = fields.Selection(
[
("equal", "Equal"),
("monthly_prorata_temporis", "Prorata temporis (by month %)"),
],
string="Cutoff method",
config_parameter="account_move_cutoff.default_cutoff_method",
help=(
"Determine how to split amounts over periods:\n"
" * Equal: same amount is splitted over periods of the service"
" (using start and end date on the invoice line).\n"
" * Prorata temporis by month %: amount is splitted over"
" the rate of service days in the month.\n"
),
)
22 changes: 22 additions & 0 deletions account_move_cutoff/views/res_config_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@
</div>
</div>
</div>

<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<field
name="default_cutoff_method"
string="Default cutoff method"
/>
<div class="text-muted">
Determine how to split amounts over periods:
<li>
<ul
>Equal: same amount is splitted over periods of the service"
(using start and end date on the invoice line).</ul>
<ul>
Prorata temporis by month %: amount is splitted over"
the rate of service days in the month.\n"
</ul>
</li>
</div>
</div>
</div>
</xpath>

</field>
Expand Down

0 comments on commit 95bca13

Please sign in to comment.