Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions account_billing_target_month/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
============================
Account Billing Target Month
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4727c2352f1c1afcefee757106fa4dbd50bec366643c764c8dd6ed5ec3172e99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Fhls--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/hls-custom/tree/18.0/account_billing_target_month
:alt: qrtl/hls-custom

|badge1| |badge2| |badge3|

This module extends ``l10n_jp_summary_invoice`` to add a **Target
Month** field to the billing document, computed automatically from the
threshold date. If the threshold date falls on the last day of the
month, the target month is set to the following month; otherwise it is
set to the same month as the threshold date.

The target month is also displayed as a prefix in the summary invoice
PDF title (e.g. "3 Summary Invoice").

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/hls-custom/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/qrtl/hls-custom/issues/new?body=module:%20account_billing_target_month%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Quartile

Maintainers
-----------

This module is part of the `qrtl/hls-custom <https://github.com/qrtl/hls-custom/tree/18.0/account_billing_target_month>`_ project on GitHub.

You are welcome to contribute.
4 changes: 4 additions & 0 deletions account_billing_target_month/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2026 Quartile
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
17 changes: 17 additions & 0 deletions account_billing_target_month/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 Quartile
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Billing Target Month",
"version": "18.0.1.0.0",
"author": "Quartile",
"website": "https://www.quartile.co",
"category": "Invoice",
"license": "AGPL-3",
"depends": ["l10n_jp_summary_invoice"],
"data": [
"views/account_billing_views.xml",
"reports/report_summary_invoice_templates.xml",
],
"installable": True,
}
87 changes: 87 additions & 0 deletions account_billing_target_month/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_billing_target_month
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-01 03:54+0000\n"
"PO-Revision-Date: 2026-04-01 03:54+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_billing_target_month
#: model:ir.model,name:account_billing_target_month.model_account_billing
msgid "Account Billing"
msgstr "合計請求書"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__4
msgid "April"
msgstr "4月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__8
msgid "August"
msgstr "8月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__12
msgid "December"
msgstr "12月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__2
msgid "February"
msgstr "2月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__1
msgid "January"
msgstr "1月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__7
msgid "July"
msgstr "7月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__6
msgid "June"
msgstr "6月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__3
msgid "March"
msgstr "3月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__5
msgid "May"
msgstr "5月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__11
msgid "November"
msgstr "11月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__10
msgid "October"
msgstr "10月"

#. module: account_billing_target_month
#: model:ir.model.fields.selection,name:account_billing_target_month.selection__account_billing__target_month__9
msgid "September"
msgstr "9月"

#. module: account_billing_target_month
#: model:ir.model.fields,field_description:account_billing_target_month.field_account_billing__target_month
#: model_terms:ir.ui.view,arch_db:account_billing_target_month.report_summary_invoice_document
msgid "Target Month"
msgstr "対象月"
4 changes: 4 additions & 0 deletions account_billing_target_month/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2026 Quartile
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_billing
36 changes: 36 additions & 0 deletions account_billing_target_month/models/account_billing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2026 Quartile
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class AccountBilling(models.Model):
_inherit = "account.billing"

target_month = fields.Selection(
selection=[
("1", "January"),
("2", "February"),
("3", "March"),
("4", "April"),
("5", "May"),
("6", "June"),
("7", "July"),
("8", "August"),
("9", "September"),
("10", "October"),
("11", "November"),
("12", "December"),
],
compute="_compute_target_month",
store=True,
readonly=False,
)

@api.depends("threshold_date")
def _compute_target_month(self):
for rec in self:
if not rec.threshold_date:
rec.target_month = False
continue
rec.target_month = str(rec.threshold_date.month)
3 changes: 3 additions & 0 deletions account_billing_target_month/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
8 changes: 8 additions & 0 deletions account_billing_target_month/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This module extends `l10n_jp_summary_invoice` to add a **Target Month**
field to the billing document, computed automatically from the threshold
date. If the threshold date falls on the last day of the month, the target
month is set to the following month; otherwise it is set to the same month
as the threshold date.

The target month is also displayed as a prefix in the summary invoice PDF
title (e.g. "3 Summary Invoice").
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="report_summary_invoice_document"
inherit_id="l10n_jp_summary_invoice.report_summary_invoice_document"
>
<xpath expr="//h2/span[1]" position="before">
<t t-if="o.target_month"><t t-esc="o.target_month" />Target Month </t>
</xpath>
</template>
</odoo>
Loading
Loading